Revert "Remove pkg-config related hack instead depend on pkg-config (>= 0.23)"
authorMarc Andre Tanner <mat@brain-dump.org>
Mon, 4 Oct 2010 19:51:07 +0000 (4 21:51 +0200)
committerMarc Andre Tanner <mat@brain-dump.org>
Mon, 4 Oct 2010 19:51:07 +0000 (4 21:51 +0200)
pkg-config 0.22 seems to be in widespread use, for example Ubuntu Lucid is
stuck with it.

This reverts commit a32800b6c486ddd0cf09b380608dde0dc81df296.

README
sources/functions.sh
sources/sections/ecore.sh
sources/sections/eina.sh
sources/sections/evas.sh
sources/sections/freetype.sh
sources/sections/libpng.sh
sources/sections/tslib.sh

diff --git a/README b/README
index 3a95646..5d556ba 100644 (file)
--- 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
  ------------------------------
index 19bc130..8d795e4 100755 (executable)
@@ -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" ]
index e0777f0..9dedb73 100644 (file)
@@ -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
index 43dc92b..82c6319 100644 (file)
@@ -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
index c758265..7feae62 100644 (file)
@@ -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
index f2e7b43..940b149 100644 (file)
@@ -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
index 4101169..7af1cc5 100644 (file)
@@ -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
index 48a1502..22348f2 100644 (file)
@@ -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