pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/php72 Switch lang/php72 to use pkgsrc pcre librar...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/35cadb180eb0
branches:  trunk
changeset: 375178:35cadb180eb0
user:      jdolecek <jdolecek%pkgsrc.org@localhost>
date:      Mon Feb 05 08:51:25 2018 +0000

description:
Switch lang/php72 to use pkgsrc pcre library instead of the bundled one

PHP bundles it's own copy of pcre 8.41 with the distribution, which
is used when build doesn't find system one. Switch to the pkgsrc
pcre, so that we don't need to maintain local PHP JIT patch here.
Upcoming PHP 7.3 already switched to pcre2, so no value maintaining
private PCRE patch any more (if there ever was).

XXX devel/pcre doesn't seem to enable PCRE JIT, might be good to do so

diffstat:

 lang/php72/Makefile                                |  11 +-------
 lang/php72/Makefile.common                         |   9 ++++++-
 lang/php72/Makefile.php                            |   7 ++++-
 lang/php72/PLIST                                   |   7 +----
 lang/php72/buildlink3.mk                           |   6 ++--
 lang/php72/distinfo                                |   3 +-
 lang/php72/patches/patch-ext_pcre_pcrelib_config.h |  27 ----------------------
 7 files changed, 21 insertions(+), 49 deletions(-)

diffs (167 lines):

diff -r c2b7fb1b1c49 -r 35cadb180eb0 lang/php72/Makefile
--- a/lang/php72/Makefile       Mon Feb 05 00:07:56 2018 +0000
+++ b/lang/php72/Makefile       Mon Feb 05 08:51:25 2018 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.4 2018/02/04 16:19:00 jdolecek Exp $
+# $NetBSD: Makefile,v 1.5 2018/02/05 08:51:25 jdolecek Exp $
 
 #
 # We can't omit PKGNAME here to handle PKG_OPTIONS.
 #
 PKGNAME=               php-${PHP_VERSION:S/RC/rc/}
 CATEGORIES=            lang
-PKGREVISION=    1
+PKGREVISION=   2
 
 HOMEPAGE=              http://www.php.net/
 COMMENT=               PHP Hypertext Preprocessor version 7.2
@@ -42,13 +42,6 @@
 
 INSTALLATION_DIRS+=    ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php
 
-# segfault generating phar.phar for i386 & SPARC
-# revisit this if builtin PCRE is updated beyond PCRE1 8.38
-# https://bugs.php.net/bug.php?id=73880
-.if ${MACHINE_ARCH} != "x86_64"
-CONFIGURE_ARGS+=       --without-pcre-jit
-.endif
-
 # Make sure modules can link correctly
 .if ${OPSYS} == "Darwin"
 INSTALL_UNSTRIPPED=    yes
diff -r c2b7fb1b1c49 -r 35cadb180eb0 lang/php72/Makefile.common
--- a/lang/php72/Makefile.common        Mon Feb 05 00:07:56 2018 +0000
+++ b/lang/php72/Makefile.common        Mon Feb 05 08:51:25 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
+# $NetBSD: Makefile.common,v 1.2 2018/02/05 08:51:25 jdolecek Exp $
 # used by lang/php72/Makefile.php
 # used by lang/php/ext.mk
 # used by meta-pkgs/php72-extensions/Makefile
@@ -18,3 +18,10 @@
 # configure test gets confused by wrappers dropping -R /usr/lib
 CONFIGURE_ARGS+=       php_cv_cc_dashr=no
 .endif
+
+# not every extension actually depend on PCRE, and those which do
+# don't use internal pcre structures, so default to build-time
+# dependency only
+BUILDLINK_DEPMETHOD.pcre?=     build
+CONFIGURE_ARGS+=       --with-pcre-dir=${BUILDLINK_PREFIX.pcre}
+.include "../../devel/pcre/buildlink3.mk"
diff -r c2b7fb1b1c49 -r 35cadb180eb0 lang/php72/Makefile.php
--- a/lang/php72/Makefile.php   Mon Feb 05 00:07:56 2018 +0000
+++ b/lang/php72/Makefile.php   Mon Feb 05 08:51:25 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.3 2018/02/04 16:19:00 jdolecek Exp $
+# $NetBSD: Makefile.php,v 1.4 2018/02/05 08:51:25 jdolecek Exp $
 # used by lang/php72/Makefile
 # used by www/ap-php/Makefile
 # used by www/php-fpm/Makefile
@@ -8,6 +8,9 @@
 GCC_REQD+=              4.9
 .endif
 
+# the binary actually needs full dep on PCRE
+BUILDLINK_DEPMETHOD.pcre=      full
+
 .include "../../lang/php72/Makefile.common"
 
 DISTINFO_FILE= ${.CURDIR}/../../lang/php72/distinfo
@@ -44,6 +47,8 @@
 CONFIGURE_ARGS+=       --with-libxml-dir=${PREFIX}
 .include "../../textproc/libxml2/buildlink3.mk"
 
+CONFIGURE_ARGS+=       --with-pcre-regex=${BUILDLINK_PREFIX.pcre}
+
 PKG_OPTIONS_VAR=       PKG_OPTIONS.${PHP_PKG_PREFIX}
 PKG_SUPPORTED_OPTIONS+=        inet6 ssl maintainer-zts readline argon2 sqlite3
 PKG_SUGGESTED_OPTIONS+=        inet6 ssl readline sqlite3
diff -r c2b7fb1b1c49 -r 35cadb180eb0 lang/php72/PLIST
--- a/lang/php72/PLIST  Mon Feb 05 00:07:56 2018 +0000
+++ b/lang/php72/PLIST  Mon Feb 05 08:51:25 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
+@comment $NetBSD: PLIST,v 1.2 2018/02/05 08:51:25 jdolecek Exp $
 bin/phar
 bin/phar.phar
 bin/php
@@ -131,11 +131,6 @@
 include/php/ext/mysqlnd/mysqlnd_vio.h
 include/php/ext/mysqlnd/mysqlnd_wireprotocol.h
 include/php/ext/mysqlnd/php_mysqlnd.h
-include/php/ext/pcre/pcrelib/config.h
-include/php/ext/pcre/pcrelib/pcre.h
-include/php/ext/pcre/pcrelib/pcre_internal.h
-include/php/ext/pcre/pcrelib/pcreposix.h
-include/php/ext/pcre/pcrelib/ucp.h
 include/php/ext/pcre/php_pcre.h
 include/php/ext/phar/php_phar.h
 include/php/ext/session/mod_files.h
diff -r c2b7fb1b1c49 -r 35cadb180eb0 lang/php72/buildlink3.mk
--- a/lang/php72/buildlink3.mk  Mon Feb 05 00:07:56 2018 +0000
+++ b/lang/php72/buildlink3.mk  Mon Feb 05 08:51:25 2018 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2018/02/05 08:51:25 jdolecek Exp $
 
 BUILDLINK_TREE+=       php
 
 .if !defined(PHP_BUILDLINK3_MK)
 PHP_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.php+=    php>=7.2.0rc1<7.3
-BUILDLINK_ABI_DEPENDS.php+=    php>=7.2.0rc1<7.3
+BUILDLINK_API_DEPENDS.php+=    php>=7.2.2nb2<7.3
+BUILDLINK_ABI_DEPENDS.php+=    php>=7.2.2nb2<7.3
 BUILDLINK_PKGSRCDIR.php?=      ../../lang/php72
 
 .include "../../textproc/libxml2/buildlink3.mk"
diff -r c2b7fb1b1c49 -r 35cadb180eb0 lang/php72/distinfo
--- a/lang/php72/distinfo       Mon Feb 05 00:07:56 2018 +0000
+++ b/lang/php72/distinfo       Mon Feb 05 08:51:25 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2018/02/04 16:19:00 jdolecek Exp $
+$NetBSD: distinfo,v 1.16 2018/02/05 08:51:25 jdolecek Exp $
 
 SHA1 (php-7.2.2.tar.bz2) = 69903dabf7ceb4a84620683092e235b29d2d1066
 RMD160 (php-7.2.2.tar.bz2) = c7193e0298ae8e709ad19129023ff213085f50ca
@@ -7,7 +7,6 @@
 SHA1 (patch-configure) = 5dad0ba760f5fb6aa55dc3136655b78c29e23bca
 SHA1 (patch-ext_gd_config.m4) = 67730ccc13410adaf8829f77a6b044f16e412489
 SHA1 (patch-ext_imap_config.m4) = 6a667b2580901dccfd0174aec56dad629689d7bd
-SHA1 (patch-ext_pcre_pcrelib_config.h) = c5fba95856628f68639fe63feeef04a5f83d3916
 SHA1 (patch-ext_phar_Makefile.frag) = 558869b60f8ed6674a3ba1d595a65f010df4c426
 SHA1 (patch-ext_phar_phar_phar.php) = f630e3946b21b76d4fe857a43e00e25c9445f2c8
 SHA1 (patch-ext_recode_recode.c) = 639bf762302c7a30c88d3f3fa862494e0f847bdb
diff -r c2b7fb1b1c49 -r 35cadb180eb0 lang/php72/patches/patch-ext_pcre_pcrelib_config.h
--- a/lang/php72/patches/patch-ext_pcre_pcrelib_config.h        Mon Feb 05 00:07:56 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-$NetBSD: patch-ext_pcre_pcrelib_config.h,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
-
---- ext/pcre/pcrelib/config.h.orig     2016-09-29 02:15:39.000000000 +0000
-+++ ext/pcre/pcrelib/config.h
-@@ -400,8 +400,21 @@ them both to 0; an emulation function wi
- 
- /* Define to any value to enable support for Just-In-Time compiling. */
- #if HAVE_PCRE_JIT_SUPPORT
--#define SUPPORT_JIT
-+#if defined(__i386__) || defined(__i386) \
-+|| defined(__x86_64__) \
-+|| defined(__arm__) || defined(__ARM__) \
-+|| defined (__aarch64__) \
-+|| defined(__ppc64__) || defined(__powerpc64__) || defined(_ARCH_PPC64) \
-+|| (defined(_POWER) && defined(__64BIT__)) \
-+|| defined(__ppc__) || defined(__powerpc__) || defined(_ARCH_PPC) \
-+|| defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defined(_POWER) \
-+|| (defined(__mips__) && !defined(_LP64)) \
-+|| defined(__mips64) \
-+|| defined(__sparc__) || defined(__sparc) \
-+|| defined(__tilegx__)
-+  #define SUPPORT_JIT
- #endif
-+#endif /* HAVE_PCRE_JIT_SUPPORT */
- 
- /* Define to any value to allow pcregrep to be linked with libbz2, so that it
-    is able to handle .bz2 files. */



Home | Main Index | Thread Index | Old Index