package/php: switch from libmysqlclient to mysqlnd
authorFloris Bos <bos@je-eigen-domein.nl>
Tue, 23 Aug 2016 16:54:48 +0000 (18:54 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 6 Sep 2016 21:21:50 +0000 (23:21 +0200)
The Mysql Native Driver has been the default mysql driver since
PHP 5.4, but buildroot was still using libmysqlclient.

Mysqlnd has several advantages such as improved memory management
and the more favorable PHP licensing terms.
(can combine it with proprietary PHP extensions like Ioncube
loader, while libmysqlclient requires commercial licensing if you
link to it and do not fall under their GPL/FOSS license exception)

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/php/Config.ext
package/php/php.mk

index 82aaf41eb0c720b6b6392c03ca48ff2b5ed78d20..7c3ba7e8c44e2283423dd25be884e9134f6adab0 100644 (file)
@@ -113,10 +113,6 @@ endif
 
 config BR2_PACKAGE_PHP_EXT_MYSQLI
        bool "Mysqli"
-       depends on BR2_INSTALL_LIBSTDCPP
-       depends on BR2_USE_MMU # mysql
-       depends on BR2_TOOLCHAIN_HAS_THREADS # mysql
-       select BR2_PACKAGE_MYSQL
        help
          MySQL Improved extension support
 
@@ -135,17 +131,9 @@ if BR2_PACKAGE_PHP_EXT_PDO
 
 config BR2_PACKAGE_PHP_EXT_PDO_MYSQL
        bool "MySQL"
-       depends on BR2_INSTALL_LIBSTDCPP
-       depends on BR2_USE_MMU # mysql
-       depends on BR2_TOOLCHAIN_HAS_THREADS # mysql
-       select BR2_PACKAGE_MYSQL
        help
          PDO driver for MySQL
 
-comment "MySQL drivers need a toolchain w/ C++, threads"
-       depends on BR2_USE_MMU
-       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
-
 config BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL
        bool "PostgreSQL"
        select BR2_PACKAGE_POSTGRESQL
index d7e27a13dcf4d257ceb4f0e3cb7edfb9c717ee73..deaf56ef4f2c575ed1346c91ce07c3e2c6380cdb 100644 (file)
@@ -181,8 +181,7 @@ endif
 
 ### Native SQL extensions
 ifeq ($(BR2_PACKAGE_PHP_EXT_MYSQLI),y)
-PHP_CONF_OPTS += --with-mysqli=$(STAGING_DIR)/usr/bin/mysql_config
-PHP_DEPENDENCIES += mysql
+PHP_CONF_OPTS += --with-mysqli
 endif
 ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y)
 PHP_CONF_OPTS += --with-sqlite3=$(STAGING_DIR)/usr
@@ -199,8 +198,7 @@ PHP_DEPENDENCIES += sqlite
 PHP_CFLAGS += -DSQLITE_OMIT_LOAD_EXTENSION
 endif
 ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y)
-PHP_CONF_OPTS += --with-pdo-mysql=$(STAGING_DIR)/usr
-PHP_DEPENDENCIES += mysql
+PHP_CONF_OPTS += --with-pdo-mysql
 endif
 ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL),y)
 PHP_CONF_OPTS += --with-pdo-pgsql=$(STAGING_DIR)/usr