Last active
December 18, 2017 11:07
-
-
Save MilhouseVH/df082b26dea1137093ad11cc2f84e8dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/config/path b/config/path | |
index 8a0ddc8..4be62db 100644 | |
--- a/config/path | |
+++ b/config/path | |
@@ -114,6 +114,7 @@ unset LD_LIBRARY_PATH | |
fi | |
if [ -n "$PKG_DIR" -a -r $PKG_DIR/package.mk ]; then | |
+ unset -f configure_package | |
. $PKG_DIR/package.mk | |
fi | |
@@ -211,6 +212,13 @@ if [ "$DISABLE_COLORS" != "yes" ]; then | |
endcolor="\e[0m" | |
fi | |
+# If sourcing a package, configure any package variables dependent on variables we have set | |
+if [ -n "$PKG_DIR" -a -r $PKG_DIR/package.mk ]; then | |
+ if [ "$(type -t configure_package)" = "function" ]; then | |
+ configure_package | |
+ fi | |
+fi | |
+ | |
# multilib? nah | |
unset CONFIG_SITE | |
diff --git a/packages/mediacenter/kodi/package.mk b/packages/mediacenter/kodi/package.mk | |
index bbb6531..e84f515 100644 | |
--- a/packages/mediacenter/kodi/package.mk | |
+++ b/packages/mediacenter/kodi/package.mk | |
@@ -200,6 +200,7 @@ KODI_LIBDVD="$KODI_DVDCSS \ | |
-DLIBDVDNAV_URL=$ROOT/$SOURCES/libdvdnav/libdvdnav-$(get_pkg_version libdvdnav).tar.gz \ | |
-DLIBDVDREAD_URL=$ROOT/$SOURCES/libdvdread/libdvdread-$(get_pkg_version libdvdread).tar.gz" | |
+configure_package() { | |
PKG_CMAKE_OPTS_TARGET="-DNATIVEPREFIX=$TOOLCHAIN \ | |
-DWITH_TEXTUREPACKER=$TOOLCHAIN/bin/TexturePacker \ | |
-DDEPENDS_PATH=$PKG_BUILD/depends \ | |
@@ -241,6 +242,9 @@ PKG_CMAKE_OPTS_TARGET="-DNATIVEPREFIX=$TOOLCHAIN \ | |
$KODI_BLURAY \ | |
$KODI_PLAYER" | |
+PKG_STAMP="${PKG_CMAKE_OPTS_TARGET//$'\n'/ }" | |
+} | |
+ | |
pre_configure_target() { | |
# kodi should never be built with lto | |
strip_lto | |
diff --git a/scripts/build b/scripts/build | |
index 5986653..dd7128c 100755 | |
--- a/scripts/build | |
+++ b/scripts/build | |
@@ -80,6 +80,7 @@ rm -f $STAMP | |
setup_toolchain $TARGET | |
# unset functions | |
+unset -f configure_package | |
unset -f pre_build_target | |
unset -f pre_configure_target | |
unset -f configure_target | |
@@ -207,6 +208,11 @@ BOOTSTRAP_MESON_OPTS="$HOST_MESON_OPTS" | |
# include buildfile | |
. $PKG_DIR/package.mk | |
+# finalise package configuration | |
+if [ "$(type -t configure_package)" = "function" ]; then | |
+ configure_package | |
+fi | |
+ | |
if [ "$PKG_IS_KERNEL_PKG" = "yes" ]; then | |
if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then | |
TARGET_PREFIX=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment