diff --git a/packages/php/build.sh b/packages/php/build.sh index d69f3482f..70aeca82a 100644 --- a/packages/php/build.sh +++ b/packages/php/build.sh @@ -1,20 +1,26 @@ TERMUX_PKG_HOMEPAGE=http://php.net/ TERMUX_PKG_DESCRIPTION="Server-side, HTML-embedded scripting language" -TERMUX_PKG_VERSION=5.6.15 -TERMUX_PKG_BUILD_REVISION=1 +TERMUX_PKG_VERSION=5.6.16 TERMUX_PKG_SRCURL=http://php.net/get/php-${TERMUX_PKG_VERSION}.tar.xz/from/this/mirror +TERMUX_PKG_NO_SRC_CACHE=yes +# Build native php for phar to build (see pear-Makefile.frag.patch): +TERMUX_PKG_HOSTBUILD=true TERMUX_PKG_FOLDERNAME=php-${TERMUX_PKG_VERSION} -TERMUX_PKG_DEPENDS="libxml2, liblzma" +TERMUX_PKG_DEPENDS="libxml2, liblzma, openssl, pcre" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-iconv" # http://php.net/manual/en/libxml.installation.php # "If configure cannot find xml2-config in the directory specified by --with-libxml-dir, # then it'll continue on and check the default locations." TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-libxml-dir=$TERMUX_PREFIX" -TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-phar" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-openssl=$TERMUX_PREFIX" +# http://php.net/manual/en/pcre.installation.php: pcre always enabled, use platform library: +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-pcre-regex=$TERMUX_PREFIX" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_res_nsearch=no" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --mandir=$TERMUX_PREFIX/share/man" termux_step_pre_configure () { + export NATIVE_PHP_EXECUTABLE=$TERMUX_PKG_HOSTBUILD_DIR/sapi/cli/php + # Run autoconf since we have patched config.m4 files. cd $TERMUX_PKG_SRCDIR autoconf diff --git a/packages/php/ext-phar-Makefile.frag.patch b/packages/php/ext-phar-Makefile.frag.patch new file mode 100644 index 000000000..f2eba6ac3 --- /dev/null +++ b/packages/php/ext-phar-Makefile.frag.patch @@ -0,0 +1,25 @@ +diff -u -r ../php-5.6.16/ext/phar/Makefile.frag ./ext/phar/Makefile.frag +--- ../php-5.6.16/ext/phar/Makefile.frag 2015-11-25 15:28:38.000000000 -0500 ++++ ./ext/phar/Makefile.frag 2015-12-22 05:31:09.794496317 -0500 +@@ -4,20 +4,7 @@ + pharcmd: $(builddir)/phar.php $(builddir)/phar.phar + + PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' +-PHP_PHARCMD_EXECUTABLE = ` \ +- if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \ +- $(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \ +- if test "x$(PHP_MODULES)" != "x"; then \ +- $(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \ +- for i in bz2 zlib phar; do \ +- if test -f "$(top_builddir)/modules/$$i.la"; then \ +- . $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \ +- fi; \ +- done; \ +- fi; \ +- else \ +- $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \ +- fi;` ++PHP_PHARCMD_EXECUTABLE = $(NATIVE_PHP_EXECUTABLE) + PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` + + $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc