8075fe4579445b779ec7bbfc0e43c6c29bf3eb13
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / qt5 / qt5base / 0007-configure-add-psql_config-option.patch
1 From f23a18de3c398c908c92b8cf8f20edc12435b9d1 Mon Sep 17 00:00:00 2001
2 From: Peter Seiderer <ps.report@gmx.net>
3 Date: Thu, 19 Feb 2015 22:41:02 +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 | 12 +++++++++---
12  1 file changed, 9 insertions(+), 3 deletions(-)
13
14 diff --git a/configure b/configure
15 index 0c66ecf..491486a 100755
16 --- a/configure
17 +++ b/configure
18 @@ -578,6 +578,7 @@ CFG_WIDGETS=yes
19  CFG_QCONFIG=full
20  CFG_DEBUG=auto
21  CFG_MYSQL_CONFIG=
22 +CFG_PSQL_CONFIG=
23  CFG_DEBUG_RELEASE=no
24  CFG_FORCEDEBUGINFO=no
25  CFG_SHARED=yes
26 @@ -885,6 +886,7 @@ while [ "$#" -gt 0 ]; do
27      -arch| \
28      -host-arch| \
29      -mysql_config| \
30 +    -psql_config| \
31      -qpa| \
32      -qconfig| \
33      -qreal| \
34 @@ -1066,6 +1068,9 @@ while [ "$#" -gt 0 ]; do
35      mysql_config)
36         CFG_MYSQL_CONFIG="$VAL"
37         ;;
38 +    psql_config)
39 +       CFG_PSQL_CONFIG="$VAL"
40 +       ;;
41      prefix)
42          QT_INSTALL_PREFIX="$VAL"
43          ;;
44 @@ -4369,10 +4374,11 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
45              ;;
46          psql)
47              if [ "$CFG_SQL_psql" != "no" ]; then
48 +               [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
49                  # Be careful not to use native pg_config when cross building.
50 -                if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
51 -                    QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null | filterIncludePath`
52 -                    QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null | filterLibraryPath`
53 +                if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
54 +                    QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
55 +                    QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
56                  fi
57                  [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
58                  [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
59 -- 
60 2.1.4
61