php: add pdo_pgsql extension
authorFloris Bos <bos@je-eigen-domein.nl>
Wed, 13 Aug 2014 13:57:11 +0000 (15:57 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 17 Aug 2014 19:19:50 +0000 (21:19 +0200)
Adds support for the PDO PostgreSQL extension to the PHP package.

[Thomas: slightly adjust Config.in comment to indicate that's it's the
"Postgresql driver" that needs (e)glibc and not just "Postgresql".]

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/php/Config.ext
package/php/php.mk

index 078be8daa7cdbdc34c9baabf94a95df537dae32e..cac28929848ad83678b1b9011e265c2dee6e246d 100644 (file)
@@ -135,6 +135,16 @@ comment "MySQL drivers need a toolchain w/ C++"
        depends on BR2_USE_MMU
        depends on !BR2_INSTALL_LIBSTDCPP
 
+config BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL
+       bool "PostgreSQL"
+       depends on BR2_TOOLCHAIN_USES_GLIBC
+       select BR2_PACKAGE_POSTGRESQL
+       help
+         PDO driver for PostgreSQL
+
+comment "PostgreSQL driver needs an (e)glibc toolchain"
+       depends on !BR2_TOOLCHAIN_USES_GLIBC
+
 config BR2_PACKAGE_PHP_EXT_PDO_SQLITE
        bool "SQLite3"
        select BR2_PACKAGE_SQLITE
index de7d668355d11e58d1742f6a4dd39e6ba7b7cd21..d0418ad62d3fe36ddf02b56f5fb05331984e0f21 100644 (file)
@@ -162,6 +162,10 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y)
        PHP_CONF_OPT += --with-pdo-mysql=$(STAGING_DIR)/usr
        PHP_DEPENDENCIES += mysql
 endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL),y)
+       PHP_CONF_OPT += --with-pdo-pgsql=$(STAGING_DIR)/usr
+       PHP_DEPENDENCIES += postgresql
+endif
 endif
 
 ### Use external PCRE if it's available