chiark / gitweb /
php: Link opcache.so against libpcre (fixes #2232)
authorFredrik Fornwall <fredrik@fornwall.net>
Sat, 10 Mar 2018 23:28:24 +0000 (00:28 +0100)
committerFredrik Fornwall <fredrik@fornwall.net>
Sat, 10 Mar 2018 23:28:24 +0000 (00:28 +0100)
packages/php/build.sh
packages/php/ext-opcache-config.m4.patch

index 527e89adcad8aa99da1292a8442ce43ac87ae9a5..37b1a0b5491069684ea43b59968efb606ea50215 100644 (file)
@@ -1,6 +1,7 @@
 TERMUX_PKG_HOMEPAGE=https://php.net
 TERMUX_PKG_DESCRIPTION="Server-side, HTML-embedded scripting language"
 TERMUX_PKG_VERSION=7.2.3
+TERMUX_PKG_REVISION=1
 TERMUX_PKG_SHA256=b3a94f1b562f413c0b96f54bc309706d83b29ac65d9b172bc7ed9fb40a5e651f
 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):
index 3a54724cd7f7974585ba21b62ad884d81199b890..34c118c48d033e1f91529136ca238529436e8aed 100644 (file)
@@ -1,7 +1,7 @@
-diff -u -r ../php-5.6.15/ext/opcache/config.m4 ./ext/opcache/config.m4
---- ../php-5.6.15/ext/opcache/config.m4        2015-10-29 05:55:01.000000000 -0400
-+++ ./ext/opcache/config.m4    2015-11-10 15:24:37.080935147 -0500
-@@ -341,7 +341,15 @@
+diff -u -r ../php-7.2.3/ext/opcache/config.m4 ./ext/opcache/config.m4
+--- ../php-7.2.3/ext/opcache/config.m4 2018-02-27 16:33:06.000000000 +0000
++++ ./ext/opcache/config.m4    2018-03-10 22:37:13.039992109 +0000
+@@ -358,7 +358,15 @@
        flock_type=linux
      AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
      AC_MSG_RESULT("yes")
@@ -18,7 +18,7 @@ diff -u -r ../php-5.6.15/ext/opcache/config.m4 ./ext/opcache/config.m4
  
  AC_MSG_CHECKING("whether flock struct is BSD ordered")
  AC_TRY_RUN([
-@@ -357,7 +365,13 @@
+@@ -374,7 +382,13 @@
        flock_type=bsd
      AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) 
      AC_MSG_RESULT("yes")
@@ -31,5 +31,15 @@ diff -u -r ../php-5.6.15/ext/opcache/config.m4 ./ext/opcache/config.m4
 +])
 +
  
- if test "$flock_type" == "unknown"; then
+ if test "$flock_type" = "unknown"; then
        AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
+@@ -417,6 +431,9 @@
+       Optimizer/zend_dump.c,
+       shared,,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,,yes)
++  OPCACHE_SHARED_LIBADD=-lpcre
++  PHP_SUBST(OPCACHE_SHARED_LIBADD)
++
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+ fi