3723afa1f8ae41ced73c20057e8023f32278f0d0
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / qt / 0007-configure-add-psql_config-option.patch
1 From c5f2c2d2b1e35606e38d5bf575bb6db74620c247 Mon Sep 17 00:00:00 2001
2 From: Peter Seiderer <ps.report@gmx.net>
3 Date: Wed, 11 Mar 2015 20:55:42 +0100
4 Subject: [PATCH] configure: add '-psql_config' option
5
6 Allow setting of pg_config path for cross compilation (do
7 the same as for mysql_config).
8
9 Signed-off-by: Peter Seiderer <ps.report@gmx.net>
10 ---
11  configure | 13 +++++++++----
12  1 file changed, 9 insertions(+), 4 deletions(-)
13
14 diff --git a/configure b/configure
15 index c7d2cea..a3cde93 100755
16 --- a/configure
17 +++ b/configure
18 @@ -741,6 +741,7 @@ CFG_INCREMENTAL=auto
19  CFG_QCONFIG=full
20  CFG_DEBUG=auto
21  CFG_MYSQL_CONFIG=
22 +CFG_PSQL_CONFIG=
23  CFG_DEBUG_RELEASE=no
24  CFG_SHARED=yes
25  CFG_SM=auto
26 @@ -1159,7 +1160,7 @@ while [ "$#" -gt 0 ]; do
27          shift
28          VAL=$1
29          ;;
30 -    -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)
31 +    -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)
32          VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
33          shift
34          VAL="$1"
35 @@ -1371,6 +1372,9 @@ while [ "$#" -gt 0 ]; do
36      mysql_config)
37         CFG_MYSQL_CONFIG="$VAL"
38         ;;
39 +    psql_config)
40 +       CFG_PSQL_CONFIG="$VAL"
41 +       ;;
42      prefix)
43          QT_INSTALL_PREFIX="$VAL"
44          ;;
45 @@ -5568,10 +5572,11 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
46              ;;
47          psql)
48              if [ "$CFG_SQL_psql" != "no" ]; then
49 +                [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
50                  # Be careful not to use native pg_config when cross building.
51 -                if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
52 -                    QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
53 -                    QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
54 +                if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
55 +                    QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
56 +                    QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
57                  fi
58                  [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
59                  [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
60 -- 
61 2.1.4
62