qt5: mysql and sqlite plugins
authorWojciech Slenska <wojciech.slenska@gmail.com>
Tue, 28 May 2013 09:05:37 +0000 (09:05 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 30 May 2013 21:47:56 +0000 (23:47 +0200)
Added support for mysql and sqlite plugins. Configuration is based on qt package.

[Peter: strip trailing spaces]
Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/qt5/qt5base/Config.in
package/qt5/qt5base/qt5base.mk

index 79743571184ea4b7901b1921a89be4f8859a6059..9c7fd15da033b1cdb64dc8b8ac95506c75938397 100644 (file)
@@ -43,6 +43,42 @@ config BR2_PACKAGE_QT5BASE_SQL
        help
          This options enables the Qt5Sql library.
 
+if BR2_PACKAGE_QT5BASE_SQL
+config BR2_PACKAGE_QT5BASE_MYSQL
+       bool "MySQL Plugin"
+       select BR2_PACKAGE_MYSQL_CLIENT
+       select BR2_PACKAGE_NCURSES
+       select BR2_PACKAGE_READLINE
+       depends on BR2_USE_MMU # mysql
+       help
+         Build MySQL plugin
+         If unsure, say n.
+choice
+       prompt "SQLite 3 support"
+       default BR2_PACKAGE_QT5BASE_SQLITE_NONE
+       help
+         Select SQLite support.
+
+config BR2_PACKAGE_QT5BASE_SQLITE_NONE
+       bool "No sqlite support"
+       help
+         Do not compile any kind of SQLite support.
+
+config BR2_PACKAGE_QT5BASE_SQLITE_QT
+       bool "Qt SQLite"
+       help
+         Use Qt bundled SQLite support.
+
+config BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM
+       bool "System SQLite"
+       select BR2_PACKAGE_SQLITE
+       help
+         Use system SQLite.
+
+endchoice
+
+endif
+
 config BR2_PACKAGE_QT5BASE_TEST
        bool "test module"
        help
index 7c6a093bc1b0f1da8546fcc4a4c4925582960856..cfa06ea1ecbb2388713c3c8588ff9c1b78dfd2f0 100644 (file)
@@ -60,6 +60,21 @@ QT5BASE_LICENSE = Commercial license
 QT5BASE_REDISTRIBUTE = NO
 endif
 
+# Qt5 SQL Plugins
+ifeq ($(BR2_PACKAGE_QT5BASE_SQL),y)
+ifeq ($(BR2_PACKAGE_QT5BASE_MYSQL),y)
+QT5BASE_CONFIGURE_OPTS += -plugin-sql-mysql -mysql_config $(STAGING_DIR)/usr/bin/mysql_config
+QT5BASE_DEPENDENCIES   += mysql_client
+else
+QT5BASE_CONFIGURE_OPTS += -no-sql-mysql
+endif
+
+QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_QT),-plugin-sql-sqlite)
+QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),-system-sqlite)
+QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),sqlite)
+QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_NONE),-no-sql-sqlite)
+endif
+
 # We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb
 # is to add a link against the "inuxfb" library.
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-gui,-no-gui)