php: use mysqlnd and integrate php-mysql into main package
This commit is contained in:
parent
666fde4970
commit
bcd1e1d34a
@ -1,6 +1,7 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://php.net
|
||||
TERMUX_PKG_DESCRIPTION="Server-side, HTML-embedded scripting language"
|
||||
TERMUX_PKG_VERSION=7.1.12
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SHA256=a0118850774571b1f2d4e30b4fe7a4b958ca66f07d07d65ebdc789c54ba6eeb3
|
||||
TERMUX_PKG_SRCURL=http://www.php.net/distributions/php-${TERMUX_PKG_VERSION}.tar.xz
|
||||
# Build native php for phar to build (see pear-Makefile.frag.patch):
|
||||
@ -8,6 +9,9 @@ TERMUX_PKG_HOSTBUILD=true
|
||||
# Build the native php without xml support as we only need phar:
|
||||
TERMUX_PKG_EXTRA_HOSTBUILD_CONFIGURE_ARGS="--disable-libxml --disable-dom --disable-simplexml --disable-xml --disable-xmlreader --disable-xmlwriter --without-pear"
|
||||
TERMUX_PKG_DEPENDS="libandroid-glob, libxml2, liblzma, openssl, pcre, libbz2, libcrypt, libcurl, libgd, readline, freetype"
|
||||
# mysql modules were initially shared libs
|
||||
TERMUX_PKG_CONFLICTS="php-mysql"
|
||||
TERMUX_PKG_REPLACES="php-mysql"
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="php/php/fpm"
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
@ -35,8 +39,8 @@ ac_cv_func_res_nsearch=no
|
||||
--with-zlib
|
||||
--with-pgsql=shared,$TERMUX_PREFIX
|
||||
--with-pdo-pgsql=shared,$TERMUX_PREFIX
|
||||
--with-mysqli=shared,$TERMUX_PREFIX/bin/mysql_config
|
||||
--with-pdo-mysql=shared,$TERMUX_PREFIX/bin/mysql
|
||||
--with-mysqli=mysqlnd
|
||||
--with-pdo-mysql=mysqlnd
|
||||
--with-mysql-sock=$TERMUX_PREFIX/tmp/mysqld.sock
|
||||
--with-apxs2=$TERMUX_PREFIX/bin/apxs
|
||||
--enable-fpm
|
||||
@ -44,8 +48,6 @@ ac_cv_func_res_nsearch=no
|
||||
"
|
||||
|
||||
termux_step_pre_configure () {
|
||||
#because the new mariadb hides away all these includes inside server subdir
|
||||
CFLAGS+=" -I$TERMUX_PREFIX/include/mysql/server -I$TERMUX_PREFIX/include/mysql"
|
||||
LDFLAGS+=" -landroid-glob -llog"
|
||||
|
||||
export PATH=$PATH:$TERMUX_PKG_HOSTBUILD_DIR/sapi/cli/
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- ./ext/mysqli/config.m4 2017-10-25 12:34:36.000000000 +0530
|
||||
+++ ./ext/mysqli/config.m4 2017-11-07 21:59:15.529313719 +0530
|
||||
@@ -120,6 +120,7 @@
|
||||
mysqli_fe.c mysqli_report.c mysqli_driver.c mysqli_warning.c \
|
||||
mysqli_exception.c mysqli_result_iterator.c $mysqli_extra_sources"
|
||||
PHP_NEW_EXTENSION(mysqli, $mysqli_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
|
||||
+ PHP_ADD_LIBRARY(mariadb,, MYSQLI_SHARED_LIBADD)
|
||||
PHP_SUBST(MYSQLI_SHARED_LIBADD)
|
||||
PHP_INSTALL_HEADERS([ext/mysqli/php_mysqli_structs.h])
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4
|
||||
index c165fb6..2c42f3a 100755
|
||||
--- a/ext/pdo_mysql/config.m4
|
||||
+++ b/ext/pdo_mysql/config.m4
|
||||
@@ -166,6 +166,8 @@ if test "$PHP_PDO_MYSQL" != "no"; then
|
||||
])
|
||||
PDO_MYSQL_MODULE_TYPE=external
|
||||
|
||||
+ PHP_ADD_LIBRARY(mariadb,, PDO_MYSQL_SHARED_LIBADD)
|
||||
+
|
||||
PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)
|
||||
PHP_SUBST_OLD(PDO_MYSQL_MODULE_TYPE)
|
||||
fi
|
@ -1,3 +0,0 @@
|
||||
TERMUX_SUBPKG_INCLUDE="lib/php/mysqli.so lib/php/pdo_mysql.so"
|
||||
TERMUX_SUBPKG_DEPENDS="php, mariadb"
|
||||
TERMUX_SUBPKG_DESCRIPTION="MySQL modules for PHP"
|
Loading…
Reference in New Issue
Block a user