qt: add postgresql driver support
authorFloris Bos <bos@je-eigen-domein.nl>
Wed, 13 Aug 2014 14:05:42 +0000 (16:05 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 15 Aug 2014 09:22:34 +0000 (11:22 +0200)
Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
Reviewed-by: Fatih Aşıcı <fatih.asici@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/qt/Config.sql.in
package/qt/qt.mk

index 259a5746218de2257429265feb27447273074875..fd62657f009337aebeac7ddd7f7103be88875136 100644 (file)
@@ -30,11 +30,15 @@ config BR2_PACKAGE_QT_ODBC
 
 config BR2_PACKAGE_QT_PSQL
        bool "PostgreSQL Driver"
-       depends on BROKEN # libpgsql not in BR
+       select BR2_PACKAGE_POSTGRESQL
+       depends on BR2_TOOLCHAIN_USES_GLIBC
        help
          Build PostgreSQL driver
          If unsure, say n.
 
+comment "PostgreSQL needs an (e)glibc toolchain"
+       depends on !BR2_TOOLCHAIN_USES_GLIBC
+
 choice
        prompt "SQLite 3 support"
        default BR2_PACKAGE_QT_SQLITE_NONE
index 880e835a22d26a6a654dc5185b27dcc0e0c62ab9..92a090f67f5a7037e8be83d2d31b0b24ca5e5597 100644 (file)
@@ -343,6 +343,8 @@ 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_DEPENDENCIES   += postgresql
 endif
 ifeq ($(BR2_PACKAGE_QT_SQLITE_QT),y)
 QT_CONFIGURE_OPTS += -qt-sql-sqlite
@@ -503,6 +505,7 @@ define QT_CONFIGURE_CMDS
                PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
                PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
                PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
+               $(QT_CONFIGURE_ENV) \
                MAKEFLAGS="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" ./configure \
                $(if $(VERBOSE),-verbose,-silent) \
                -force-pkg-config \