[packages/qt4] package support for qt4-pgsql - thanks to obsy (fixes ticket 9146)
authorMirko Vogt <mirko@openwrt.org>
Mon, 26 Mar 2012 15:24:59 +0000 (15:24 +0000)
committerMirko Vogt <mirko@openwrt.org>
Mon, 26 Mar 2012 15:24:59 +0000 (15:24 +0000)
SVN-Revision: 31078

xorg/lib/qt4/Makefile

index 87bb309b0735f47ccc958441fd8d54c4d7ff9236..4735386f118e6c0ab2071939279fa5dd5aa5ff03 100644 (file)
@@ -33,6 +33,7 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_qt4-phonon \
        CONFIG_PACKAGE_qt4-sqlite \
        CONFIG_PACKAGE_qt4-mysql \
+       CONFIG_PACKAGE_qt4-pgsql \
        CONFIG_PACKAGE_qt4-webkit \
        CONFIG_PACKAGE_qt4-script \
        CONFIG_PACKAGE_qt4-scriptools \
@@ -110,6 +111,18 @@ define Package/qt4-mysql
   DEPENDS+=+libmysqlclient
 endef
 
+define Package/qt4-pgsql
+  $(call Package/qt4/Default)
+  TITLE+=(pgsql)
+  DEPENDS+=+libpq
+endef
+
+define Package/qt4-pgsql
+  $(call Package/qt4/Default)
+  TITLE+=(pgsql)
+  DEPENDS+=+libpq
+endef
+
 define Package/qt4-openssl
   $(call Package/qt4/Default)
   TITLE+=(openssl)
@@ -341,6 +354,7 @@ define Build/Configure
                        -system-sqlite \
                        $(if $(CONFIG_PACKAGE_qt4-sqlite),-plugin-sql-sqlite) \
                        $(if $(CONFIG_PACKAGE_qt4-mysql),-plugin-sql-mysql) \
+                       $(if $(CONFIG_PACKAGE_qt4-pgsql),-plugin-sql-psql) \
                        -no-decoration-styled \
                        -no-decoration-windows \
                        -no-decoration-default \
@@ -575,6 +589,19 @@ define Package/qt4-mysql/install
                $(1)/usr/lib/Qt/plugins/sqldrivers/
 endef
 
+define Package/qt4-pgsql/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/sqldrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtSql.so* \
+               $(1)/usr/lib/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/sqldrivers/libqsqlpsql.so \
+               $(1)/usr/lib/Qt/plugins/sqldrivers/
+endef
+
 #define Package/qt4-multimedia/install
 #      $(INSTALL_DIR) \
 #              $(1)/usr/bin
@@ -761,6 +788,7 @@ $(eval $(call BuildPackage,qt4-examples))
 $(eval $(call BuildPackage,qt4-network))
 $(eval $(call BuildPackage,qt4-sqlite))
 $(eval $(call BuildPackage,qt4-mysql))
+$(eval $(call BuildPackage,qt4-pgsql))
 $(eval $(call BuildPackage,qt4-openssl))
 #$(eval $(call BuildPackage,qt4-multimedia))
 #$(eval $(call BuildPackage,qt4-audio-backend))