mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
scripts/build: use pkg_call
This commit is contained in:
parent
8b9fd53759
commit
9959b29df9
@ -192,9 +192,7 @@ BOOTSTRAP_MESON_OPTS="$HOST_MESON_OPTS"
|
|||||||
. $PKG_DIR/package.mk
|
. $PKG_DIR/package.mk
|
||||||
|
|
||||||
# finalise package configuration
|
# finalise package configuration
|
||||||
if [ "$(type -t configure_package)" = "function" ]; then
|
pkg_call_optional configure_package
|
||||||
configure_package
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build dependencies, only when PKG_DEPENDS_? is filled
|
# build dependencies, only when PKG_DEPENDS_? is filled
|
||||||
unset _pkg_depends
|
unset _pkg_depends
|
||||||
@ -274,9 +272,7 @@ if [ "$PKG_TOOLCHAIN" = "autotools" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# include build template and build
|
# include build template and build
|
||||||
if [ "$(type -t pre_build_$TARGET)" = "function" ]; then
|
pkg_call_optional pre_build_$TARGET
|
||||||
pre_build_$TARGET
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ensure $PKG_BUILD is there. (installer? PKG_URL="")
|
# ensure $PKG_BUILD is there. (installer? PKG_URL="")
|
||||||
if [ ! -d "$PKG_BUILD" ] ; then
|
if [ ! -d "$PKG_BUILD" ] ; then
|
||||||
@ -299,12 +295,9 @@ if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" -o -f "$PKG_MESON_SCRI
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# configure
|
# configure
|
||||||
if [ "$(type -t pre_configure_$TARGET)" = "function" ]; then
|
pkg_call_optional pre_configure_$TARGET
|
||||||
pre_configure_$TARGET
|
|
||||||
fi
|
if ! pkg_call configure_$TARGET; then
|
||||||
if [ "$(type -t configure_$TARGET)" = "function" ]; then
|
|
||||||
configure_$TARGET
|
|
||||||
else
|
|
||||||
case "$PKG_TOOLCHAIN:$TARGET" in
|
case "$PKG_TOOLCHAIN:$TARGET" in
|
||||||
# meson builds
|
# meson builds
|
||||||
"meson:target")
|
"meson:target")
|
||||||
@ -383,17 +376,13 @@ else
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if [ "$(type -t post_configure_$TARGET)" = "function" ]; then
|
|
||||||
post_configure_$TARGET
|
pkg_call_optional post_configure_$TARGET
|
||||||
fi
|
|
||||||
|
|
||||||
# make
|
# make
|
||||||
if [ "$(type -t pre_make_$TARGET)" = "function" ]; then
|
pkg_call_optional pre_make_$TARGET
|
||||||
pre_make_$TARGET
|
|
||||||
fi
|
if ! pkg_call make_$TARGET; then
|
||||||
if [ "$(type -t make_$TARGET)" = "function" ]; then
|
|
||||||
make_$TARGET
|
|
||||||
else
|
|
||||||
case "$PKG_TOOLCHAIN:$TARGET" in
|
case "$PKG_TOOLCHAIN:$TARGET" in
|
||||||
# ninja based builds
|
# ninja based builds
|
||||||
"meson:target"|"cmake:target"|"ninja:target")
|
"meson:target"|"cmake:target"|"ninja:target")
|
||||||
@ -432,17 +421,13 @@ else
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if [ "$(type -t post_make_$TARGET)" = "function" ]; then
|
|
||||||
post_make_$TARGET
|
pkg_call_optional post_make_$TARGET
|
||||||
fi
|
|
||||||
|
|
||||||
# make install
|
# make install
|
||||||
if [ "$(type -t pre_makeinstall_$TARGET)" = "function" ]; then
|
pkg_call_optional pre_makeinstall_$TARGET
|
||||||
pre_makeinstall_$TARGET
|
|
||||||
fi
|
if ! pkg_call makeinstall_$TARGET; then
|
||||||
if [ "$(type -t makeinstall_$TARGET)" = "function" ]; then
|
|
||||||
makeinstall_$TARGET
|
|
||||||
else
|
|
||||||
case "$PKG_TOOLCHAIN:$TARGET" in
|
case "$PKG_TOOLCHAIN:$TARGET" in
|
||||||
# ninja based builds
|
# ninja based builds
|
||||||
"meson:target"|"cmake:target")
|
"meson:target"|"cmake:target")
|
||||||
@ -475,9 +460,8 @@ else
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if [ "$(type -t post_makeinstall_$TARGET)" = "function" ]; then
|
|
||||||
post_makeinstall_$TARGET
|
pkg_call_optional post_makeinstall_$TARGET
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$TARGET" = "target" -o "$TARGET" = "init" ]; then
|
if [ "$TARGET" = "target" -o "$TARGET" = "init" ]; then
|
||||||
if [ -d $INSTALL ]; then
|
if [ -d $INSTALL ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user