From: Holger Hans Peter Freyther <ze...@selfish.org>

Currently the configure script of Qt is invoking pg_config
which is a native application and not staged. Even though
we pass the directory with the header files we will fail
the postgres test as pg_config from the host will tell us
something about /usr/include.

There is no need for us to check pg_config, hack it out.
---
 recipes/qt4/files/hack-out-pg_config.patch |   30 ++++++++++++++++++++++++++++
 recipes/qt4/qt4-embedded_4.5.2.bb          |    3 +-
 recipes/qt4/qt4-x11-free-gles_4.5.2.bb     |    1 +
 recipes/qt4/qt4-x11-free_4.5.2.bb          |    1 +
 4 files changed, 34 insertions(+), 1 deletions(-)
 create mode 100644 recipes/qt4/files/hack-out-pg_config.patch

diff --git a/recipes/qt4/files/hack-out-pg_config.patch 
b/recipes/qt4/files/hack-out-pg_config.patch
new file mode 100644
index 0000000..2231adf
--- /dev/null
+++ b/recipes/qt4/files/hack-out-pg_config.patch
@@ -0,0 +1,30 @@
+Hack to not use the pg_config of the host system which will add /usr/include
+
+pg_config is a native binary so using that when cross compiling
+will always fail.  The commented out fix would do, but for OE
+our -platform and -xplatform is the same so we are actually not
+really cross compiling. Just comment out the test, we are passing
+the location to the postgres headers and if they are okay we
+will padd.
+
+
+
+Index: qt-embedded-linux-opensource-src-4.5.2/configure
+===================================================================
+--- qt-embedded-linux-opensource-src-4.5.2.orig/configure      2009-08-10 
03:03:04.000000000 +0200
++++ qt-embedded-linux-opensource-src-4.5.2/configure   2009-08-10 
03:58:11.000000000 +0200
+@@ -4401,10 +4402,10 @@
+             ;;
+         psql)
+             if [ "$CFG_SQL_psql" != "no" ]; then
+-                if "$WHICH" pg_config >/dev/null 2>&1; then
+-                    QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
+-                    QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
+-                fi
++#                if [ "$QT_CROSS_COMPILE" = "no" ] && "$WHICH" pg_config 
>/dev/null 2>&1; then
++#                    QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
++#                    QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
++#                fi
+                 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
+                 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
+                 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" 
$OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" 
$QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS 
$MAC_ARCHS_COMMANDLINE; then
diff --git a/recipes/qt4/qt4-embedded_4.5.2.bb 
b/recipes/qt4/qt4-embedded_4.5.2.bb
index d94bc48..c941b25 100644
--- a/recipes/qt4/qt4-embedded_4.5.2.bb
+++ b/recipes/qt4/qt4-embedded_4.5.2.bb
@@ -3,4 +3,5 @@ require qt4-embedded.inc
 PR = "${INC_PR}.1"
 
 LICENSE = "LGPLv2.1 GPLv3"
-SRC_URI += "file://0010-no-simpledecoration-example.patch;patch=1"
+SRC_URI += "file://0010-no-simpledecoration-example.patch;patch=1 \
+            file://hack-out-pg_config.patch;patch=1"
diff --git a/recipes/qt4/qt4-x11-free-gles_4.5.2.bb 
b/recipes/qt4/qt4-x11-free-gles_4.5.2.bb
index 944378d..cd81841 100644
--- a/recipes/qt4/qt4-x11-free-gles_4.5.2.bb
+++ b/recipes/qt4/qt4-x11-free-gles_4.5.2.bb
@@ -12,6 +12,7 @@ PR = "${INC_PR}.3"
 
 DEPENDS += "virtual/egl"
 #SRC_URI += "file://sgx-hack.patch;patch=1"
+SRC_URI += "file://hack-out-pg_config.patch;patch=1"
 
 export EXTRA_QMAKE_MUNGE = " glmunge "
 
diff --git a/recipes/qt4/qt4-x11-free_4.5.2.bb 
b/recipes/qt4/qt4-x11-free_4.5.2.bb
index 0289f21..09f6336 100644
--- a/recipes/qt4/qt4-x11-free_4.5.2.bb
+++ b/recipes/qt4/qt4-x11-free_4.5.2.bb
@@ -2,3 +2,4 @@ require qt4-x11-free.inc
 LICENSE = "LGPLv2.1 GPLv3"
 PR = "${INC_PR}.2"
 
+SRC_URI += "file://hack-out-pg_config.patch;patch=1"
-- 
1.5.6.5


_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel

Reply via email to