From c7b0f8f57389bfbfb2d7f8fa157960bf018e6abf Mon Sep 17 00:00:00 2001 From: Marc Andre Tanner Date: Mon, 4 Oct 2010 21:51:07 +0200 Subject: [PATCH] Revert "Remove pkg-config related hack instead depend on pkg-config (>= 0.23)" pkg-config 0.22 seems to be in widespread use, for example Ubuntu Lucid is stuck with it. This reverts commit a32800b6c486ddd0cf09b380608dde0dc81df296. --- README | 2 +- sources/functions.sh | 9 +++++++++ sources/sections/ecore.sh | 1 + sources/sections/eina.sh | 1 + sources/sections/evas.sh | 1 + sources/sections/freetype.sh | 1 + sources/sections/libpng.sh | 1 + sources/sections/tslib.sh | 1 + 8 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README b/README index 3a95646..5d556ba 100644 --- a/README +++ b/README @@ -28,7 +28,7 @@ Pre-Requirements installed: git svn cvs lzop dfu-util autoconf automake libtool gettext - mkimage pkg-config (>= 0.23) + mkimage uClibc armv4tl cross toolchain ------------------------------ diff --git a/sources/functions.sh b/sources/functions.sh index 19bc130..8d795e4 100755 --- a/sources/functions.sh +++ b/sources/functions.sh @@ -23,6 +23,15 @@ function libtool_fixup_libdir() { cd - > /dev/null } +# In theory this should be controllable with the $PKG_CONFIG_SYSROOT_DIR +# environment variable but this feature was introduced in pkg-config 0.23 +# and Debian unstable still ships with 0.22 so we hardwire the paths. + +function pkgconfig_fixup_prefix() { + find "$STAGING_DIR/usr/lib/pkgconfig" -name $1\*.pc | xargs \ + sed -i "s,^prefix=.*$,prefix=$STAGING_DIR/usr,g" +} + function install_shared_library() { cp -P $STAGING_DIR/usr/lib/lib$1*.so* $ROOT_DIR/usr/lib || dienow if [ -d "$STAGING_DIR/usr/lib/$1" ] diff --git a/sources/sections/ecore.sh b/sources/sections/ecore.sh index e0777f0..9dedb73 100644 --- a/sources/sections/ecore.sh +++ b/sources/sections/ecore.sh @@ -43,6 +43,7 @@ if [ ! -z "$QI_BOOTMENU_SHARED" ]; then cp -P $STAGING_DIR/usr/lib/libecore*.so* $ROOT_DIR/usr/lib || dienow fi +pkgconfig_fixup_prefix ecore libtool_fixup_libdir ecore cleanup ecore diff --git a/sources/sections/eina.sh b/sources/sections/eina.sh index 43dc92b..82c6319 100644 --- a/sources/sections/eina.sh +++ b/sources/sections/eina.sh @@ -23,6 +23,7 @@ make DESTDIR="$STAGING_DIR" install || dienow [ ! -z "$QI_BOOTMENU_SHARED" ] && install_shared_library eina +pkgconfig_fixup_prefix eina libtool_fixup_libdir eina cleanup eina diff --git a/sources/sections/evas.sh b/sources/sections/evas.sh index c758265..7feae62 100644 --- a/sources/sections/evas.sh +++ b/sources/sections/evas.sh @@ -78,6 +78,7 @@ if [ ! -z "$QI_BOOTMENU_SHARED" ]; then rm -rf "$ROOT_DIR/usr/lib/evas/modules/savers" fi +pkgconfig_fixup_prefix evas libtool_fixup_libdir evas cleanup evas diff --git a/sources/sections/freetype.sh b/sources/sections/freetype.sh index f2e7b43..940b149 100644 --- a/sources/sections/freetype.sh +++ b/sources/sections/freetype.sh @@ -26,6 +26,7 @@ if [ ! -z "$QI_BOOTMENU_SHARED" ]; then cp -P $STAGING_DIR/usr/lib/libfreetype.so* $ROOT_DIR/usr/lib || dienow fi +pkgconfig_fixup_prefix freetype libtool_fixup_libdir freetype cleanup freetype diff --git a/sources/sections/libpng.sh b/sources/sections/libpng.sh index 4101169..7af1cc5 100644 --- a/sources/sections/libpng.sh +++ b/sources/sections/libpng.sh @@ -11,6 +11,7 @@ if [ ! -z "$QI_BOOTMENU_SHARED" ]; then cp -P $STAGING_DIR/usr/lib/libpng*.so* $ROOT_DIR/usr/lib || dienow fi +pkgconfig_fixup_prefix libpng libtool_fixup_libdir libpng cleanup libpng diff --git a/sources/sections/tslib.sh b/sources/sections/tslib.sh index 48a1502..22348f2 100644 --- a/sources/sections/tslib.sh +++ b/sources/sections/tslib.sh @@ -24,6 +24,7 @@ make DESTDIR="$STAGING_DIR" install || dienow [ ! -z "$QI_BOOTMENU_SHARED" ] && install_shared_library ts +pkgconfig_fixup_prefix ts libtool_fixup_libdir ts cleanup tslib -- 2.11.4.GIT