summaryrefslogtreecommitdiff
path: root/package/qt
diff options
context:
space:
mode:
authorPeter Seiderer <ps.report@gmx.net>2015-03-11 22:23:31 +0100
committerPeter Korsgaard <peter@korsgaard.com>2015-03-12 23:42:04 +0100
commit5c7bf1cdf20c77e9c0056cd759d7c927abb84c97 (patch)
treec7eba77cae33e8743f6de039a44dde6cf2b0bc01 /package/qt
parenta4788aa6157d1496cdd32cb9802710d4e97bc550 (diff)
qt: fix postgresql plugin compile
Add qt4 '-psql_config' configure option and use it to set pg_config path in configure step instead of legacy PSQL_LIBS environment variable. Fixes [1]: PostgreSQL support cannot be enabled due to functionality tests! Turn on verbose messaging (-v) to ./configure to see the final report. If you believe this message is in error you may use the continue switch (-continue) to ./configure to continue. make: *** [/ssd1/thomas/autobuild/instance-0/output/build/qt-4.8.6/.stamp_configured] Error 101 Patch suggested upstream ([2]). [1] http://autobuild.buildroot.net/results/1e9/1e949d4593836bc45a55e071cc54ff9c00fad8ae [2] https://codereview.qt-project.org/108345 Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/qt')
-rw-r--r--package/qt/0007-configure-add-psql_config-option.patch62
-rw-r--r--package/qt/qt.mk3
2 files changed, 63 insertions, 2 deletions
diff --git a/package/qt/0007-configure-add-psql_config-option.patch b/package/qt/0007-configure-add-psql_config-option.patch
new file mode 100644
index 000000000..3723afa1f
--- /dev/null
+++ b/package/qt/0007-configure-add-psql_config-option.patch
@@ -0,0 +1,62 @@
+From c5f2c2d2b1e35606e38d5bf575bb6db74620c247 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Wed, 11 Mar 2015 20:55:42 +0100
+Subject: [PATCH] configure: add '-psql_config' option
+
+Allow setting of pg_config path for cross compilation (do
+the same as for mysql_config).
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ configure | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/configure b/configure
+index c7d2cea..a3cde93 100755
+--- a/configure
++++ b/configure
+@@ -741,6 +741,7 @@ CFG_INCREMENTAL=auto
+ CFG_QCONFIG=full
+ CFG_DEBUG=auto
+ CFG_MYSQL_CONFIG=
++CFG_PSQL_CONFIG=
+ CFG_DEBUG_RELEASE=no
+ CFG_SHARED=yes
+ CFG_SM=auto
+@@ -1159,7 +1160,7 @@ while [ "$#" -gt 0 ]; do
+ shift
+ VAL=$1
+ ;;
+- -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-device-option|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
++ -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-device-option|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-psql_config|-sysroot)
+ VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
+ shift
+ VAL="$1"
+@@ -1371,6 +1372,9 @@ while [ "$#" -gt 0 ]; do
+ mysql_config)
+ CFG_MYSQL_CONFIG="$VAL"
+ ;;
++ psql_config)
++ CFG_PSQL_CONFIG="$VAL"
++ ;;
+ prefix)
+ QT_INSTALL_PREFIX="$VAL"
+ ;;
+@@ -5568,10 +5572,11 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
+ ;;
+ psql)
+ if [ "$CFG_SQL_psql" != "no" ]; then
++ [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
+ # Be careful not to use native pg_config when cross building.
+- if [ "$XPLATFORM_MINGW" != "yes" ] && "$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`
++ if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
++ QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
++ QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
+ fi
+ [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
+ [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
+--
+2.1.4
+
diff --git a/package/qt/qt.mk b/package/qt/qt.mk
index 3fb557fae..53c487d41 100644
--- a/package/qt/qt.mk
+++ b/package/qt/qt.mk
@@ -361,8 +361,7 @@ ifeq ($(BR2_PACKAGE_QT_ODBC),y)
QT_CONFIGURE_OPTS += -qt-sql-odbc
endif
ifeq ($(BR2_PACKAGE_QT_PSQL),y)
-QT_CONFIGURE_OPTS += -qt-sql-psql
-QT_CONFIGURE_ENV += PSQL_LIBS=-L$(STAGING_DIR)/usr/lib
+QT_CONFIGURE_OPTS += -qt-sql-psql -psql_config $(STAGING_DIR)/usr/bin/pg_config
QT_DEPENDENCIES += postgresql
endif
ifeq ($(BR2_PACKAGE_QT_SQLITE_QT),y)