Browse Source

php-mysql: add package

android-5
vishalbiswas 7 years ago
committed by Fredrik Fornwall
parent
commit
809be5bbeb
  1. 5
      packages/php/build.sh
  2. 10
      packages/php/ext-mysqli-config.m4.patch
  3. 13
      packages/php/ext-pdo_mysql-config.m4.patch
  4. 3
      packages/php/php-mysql.subpackage.sh

5
packages/php/build.sh

@ -35,12 +35,17 @@ 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-mysql-sock=$TERMUX_PREFIX/tmp/mysqld.sock
--with-apxs2=$TERMUX_PREFIX/bin/apxs
--enable-fpm
--sbindir=$TERMUX_PREFIX/bin
"
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/

10
packages/php/ext-mysqli-config.m4.patch

@ -0,0 +1,10 @@
--- ./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])

13
packages/php/ext-pdo_mysql-config.m4.patch

@ -0,0 +1,13 @@
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

3
packages/php/php-mysql.subpackage.sh

@ -0,0 +1,3 @@
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…
Cancel
Save