chiark / gitweb /
php: Enable glob() function
[termux-packages] / packages / php / build.sh
CommitLineData
e054b9eb
FF
1TERMUX_PKG_HOMEPAGE=http://php.net/
2TERMUX_PKG_DESCRIPTION="Server-side, HTML-embedded scripting language"
f72fc782 3TERMUX_PKG_VERSION=5.6.17
e054b9eb 4TERMUX_PKG_SRCURL=http://php.net/get/php-${TERMUX_PKG_VERSION}.tar.xz/from/this/mirror
f72fc782 5TERMUX_PKG_NO_SRC_CACHE=yes # Caching with filename does not work for 'mirror'
e339be42
FF
6# Build native php for phar to build (see pear-Makefile.frag.patch):
7TERMUX_PKG_HOSTBUILD=true
e054b9eb 8TERMUX_PKG_FOLDERNAME=php-${TERMUX_PKG_VERSION}
daba97c6 9TERMUX_PKG_DEPENDS="libandroid-glob, libxml2, liblzma, openssl, pcre"
e054b9eb
FF
10# http://php.net/manual/en/libxml.installation.php
11# "If configure cannot find xml2-config in the directory specified by --with-libxml-dir,
12# then it'll continue on and check the default locations."
13TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-libxml-dir=$TERMUX_PREFIX"
e339be42
FF
14TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-openssl=$TERMUX_PREFIX"
15# http://php.net/manual/en/pcre.installation.php: pcre always enabled, use platform library:
c7bdfff6
FF
16TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-pcre-regex=$TERMUX_PREFIX"
17TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-iconv=$TERMUX_PREFIX"
18TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-zip"
e054b9eb
FF
19TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_res_nsearch=no"
20TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --mandir=$TERMUX_PREFIX/share/man"
f72fc782 21TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-sockets"
e054b9eb 22
daba97c6 23LDFLAGS+=" -landroid-glob"
24
e054b9eb 25termux_step_pre_configure () {
7e606cc7 26 export PATH=$PATH:$TERMUX_PKG_HOSTBUILD_DIR/sapi/cli/
e339be42
FF
27 export NATIVE_PHP_EXECUTABLE=$TERMUX_PKG_HOSTBUILD_DIR/sapi/cli/php
28
e054b9eb
FF
29 # Run autoconf since we have patched config.m4 files.
30 cd $TERMUX_PKG_SRCDIR
31 autoconf
32}
33
34termux_step_post_configure () {
35 perl -p -i -e 's/#define HAVE_RES_NSEARCH 1//' $TERMUX_PKG_BUILDDIR/main/php_config.h
36}