Mailed too soon. Here's an update that includes LOCALBASE.
On 06/17/18 13:52, Martijn van Duren wrote:
> On 06/15/18 11:36, Stuart Henderson wrote:
>> On 2018/06/15 10:04, Martijn van Duren wrote:
>>> Any takers for this one?
>>
>> There are some hardcoded /usr/local which should use a variable.
>
> The hardcoded /usr/local for php_c{g,l}i_binary was already there and
> even with LOCALBASE added to SUBST_VARS doesn't it want to replace
> $LOCALBASE when applying the patch (contrary to e.g. ${PV} in
> patches/patch-main_php_ini_c). So I would like to replace all the
> hardcoded /usr/local with variables, but I don't see how atm.
>
>> Also, what testing have you done?
>>
> With this particular patch on top of the prior pcre patch: compile,
> php -i, minor preg_match testing and compiling graphics/pecl-imagick.
>
> The problem prior to this pcre.h was inside the php include directories,
> now it's in /usr/local/include, which isn't in the include path by
> default, so the compiler couldn't find it.
>>
>>> martijn@
>>>
Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/lang/php/Makefile.inc,v
retrieving revision 1.118
diff -u -p -r1.118 Makefile.inc
--- Makefile.inc 15 Jun 2018 10:20:53 -0000 1.118
+++ Makefile.inc 17 Jun 2018 14:28:20 -0000
@@ -82,7 +82,7 @@ CONFIGURE_ARGS+= --with-gettext=${LOCALB
--with-iconv=${LOCALBASE} \
--with-onig=${LOCALBASE} \
--with-openssl \
- --with-pcre-regex \
+ --with-pcre-regex=${LOCALBASE} \
--with-zlib \
--enable-bcmath \
--enable-calendar \
@@ -146,9 +146,10 @@ COMMENT-dbg= interactive php debugger
CONFIGURE_ARGS+= --enable-phpdbg
.for i in ${SAPI}
-WANTLIB$i += c crypto curses iconv intl lzma m onig
+WANTLIB$i += c crypto curses iconv intl lzma m onig pcre
WANTLIB$i += pthread readline ssl xml2 z
LIB_DEPENDS$i += devel/gettext \
+ devel/pcre \
textproc/libxml \
textproc/oniguruma
.endfor
@@ -432,6 +433,7 @@ DESTDIRNAME= INSTALL_ROOT
pre-configure:
${SUBST_CMD} ${WRKSRC}/main/php_ini.c
+ ${SUBST_CMD} ${WRKSRC}/scripts/php-config.in
@perl -pi -e "s,OPENBSD_PEAR_ROOT,'${CHROOT_DIR}/pear',g;" \
-e "s,OPENBSD_PREFIX,${TRUEPREFIX},;" \
${WRKSRC}/scripts/phpize.in \
Index: 5.6/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/5.6/Makefile,v
retrieving revision 1.78
diff -u -p -r1.78 Makefile
--- 5.6/Makefile 15 Jun 2018 10:20:53 -0000 1.78
+++ 5.6/Makefile 17 Jun 2018 14:28:20 -0000
@@ -2,10 +2,7 @@
PV= 5.6
V= ${PV}.36
-REVISION= 8
-REVISION-apache= 9
-REVISION-gd= 9
-REVISION-main= 10
+REVISION= 11
MASTER_SITES0= https://download.suhosin.org/
Index: 5.6/patches/patch-scripts_php-config_in
===================================================================
RCS file: /cvs/ports/lang/php/5.6/patches/patch-scripts_php-config_in,v
retrieving revision 1.1
diff -u -p -r1.1 patch-scripts_php-config_in
--- 5.6/patches/patch-scripts_php-config_in 15 Nov 2014 13:43:01 -0000
1.1
+++ 5.6/patches/patch-scripts_php-config_in 17 Jun 2018 14:28:20 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-scripts_php-config_in,v 1.1 2014/11/15 13:43:01 robert Exp $
---- scripts/php-config.in.orig.port Thu Jul 18 16:37:33 2013
-+++ scripts/php-config.in Sun Jul 28 11:30:20 2013
-@@ -1,12 +1,12 @@
+Index: scripts/php-config.in
+--- scripts/php-config.in.orig
++++ scripts/php-config.in
+@@ -1,13 +1,13 @@
#! /bin/sh
SED="@SED@"
@@ -12,20 +13,22 @@ $OpenBSD: patch-scripts_php-config_in,v
version="@PHP_VERSION@"
vernum="@PHP_VERSION_ID@"
-include_dir="@includedir@/php"
+-includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM
-I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
+include_dir="@PEAR_INSTALLDIR@/include"
- includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM
-I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
++includes="-I${LOCALBASE}/include -I$include_dir -I$include_dir/main
-I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext
-I$include_dir/ext/date/lib"
ldflags="@PHP_LDFLAGS@"
libs="@EXTRA_LIBS@"
-@@ -24,10 +24,11 @@ php_sapis="@PHP_INSTALLED_SAPIS@"
+ extension_dir='@EXTENSION_DIR@'
+@@ -24,10 +24,10 @@ php_sapis="@PHP_INSTALLED_SAPIS@"
for sapi in $php_sapis; do
case $sapi in
cli)
-
php_cli_binary="@bindir@/${program_prefix}php${program_suffix}${exe_extension}"
-+ php_cli_binary="/usr/local/bin/php${program_suffix}"
++ php_cli_binary="${LOCALBASE}/bin/php${program_suffix}"
;;
cgi)
-
php_cgi_binary="@bindir@/${program_prefix}php-cgi${program_suffix}${exe_extension}"
-+ php_cgi_binary="/usr/local/bin/php-cgi${program_suffix}"
+-
php_cgi_binary="@bindir@/${program_prefix}php-cgi${program_suffix}${exe_extension}"
++ php_cgi_binary="${LOCALBASE}/bin/php-cgi${program_suffix}"
;;
esac
done
Index: 5.6/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/php/5.6/pkg/PLIST-main,v
retrieving revision 1.21
diff -u -p -r1.21 PLIST-main
--- 5.6/pkg/PLIST-main 15 Jun 2018 10:20:53 -0000 1.21
+++ 5.6/pkg/PLIST-main 17 Jun 2018 14:28:20 -0000
@@ -222,12 +222,6 @@ share/php-${PV}/include/ext/mysqlnd/mysq
share/php-${PV}/include/ext/mysqlnd/mysqlnd_wireprotocol.h
share/php-${PV}/include/ext/mysqlnd/php_mysqlnd.h
share/php-${PV}/include/ext/pcre/
-share/php-${PV}/include/ext/pcre/pcrelib/
-share/php-${PV}/include/ext/pcre/pcrelib/config.h
-share/php-${PV}/include/ext/pcre/pcrelib/pcre.h
-share/php-${PV}/include/ext/pcre/pcrelib/pcre_internal.h
-share/php-${PV}/include/ext/pcre/pcrelib/pcreposix.h
-share/php-${PV}/include/ext/pcre/pcrelib/ucp.h
share/php-${PV}/include/ext/pcre/php_pcre.h
share/php-${PV}/include/ext/pdo/
share/php-${PV}/include/ext/pdo/php_pdo.h
Index: 7.0/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/7.0/Makefile,v
retrieving revision 1.61
diff -u -p -r1.61 Makefile
--- 7.0/Makefile 15 Jun 2018 10:20:53 -0000 1.61
+++ 7.0/Makefile 17 Jun 2018 14:28:20 -0000
@@ -2,10 +2,7 @@
PV= 7.0
V= ${PV}.30
-REVISION= 8
-REVISION-apache= 9
-REVISION-gd= 9
-REVISION-main= 10
+REVISION= 11
BUILD_DEPENDS+= devel/bison
Index: 7.0/patches/patch-scripts_php-config_in
===================================================================
RCS file: /cvs/ports/lang/php/7.0/patches/patch-scripts_php-config_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-scripts_php-config_in
--- 7.0/patches/patch-scripts_php-config_in 14 Dec 2015 17:58:46 -0000
1.1.1.1
+++ 7.0/patches/patch-scripts_php-config_in 17 Jun 2018 14:28:20 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-scripts_php-config_in,v 1.1.1.1 2015/12/14 17:58:46 robert Exp
$
---- scripts/php-config.in.orig.port Thu Jul 18 16:37:33 2013
-+++ scripts/php-config.in Sun Jul 28 11:30:20 2013
-@@ -1,12 +1,12 @@
+Index: scripts/php-config.in
+--- scripts/php-config.in.orig
++++ scripts/php-config.in
+@@ -1,13 +1,13 @@
#! /bin/sh
SED="@SED@"
@@ -12,20 +13,22 @@ $OpenBSD: patch-scripts_php-config_in,v
version="@PHP_VERSION@"
vernum="@PHP_VERSION_ID@"
-include_dir="@includedir@/php"
+-includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM
-I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
+include_dir="@PEAR_INSTALLDIR@/include"
- includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM
-I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
++includes="-I${LOCALBASE}/include -I$include_dir -I$include_dir/main
-I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext
-I$include_dir/ext/date/lib"
ldflags="@PHP_LDFLAGS@"
libs="@EXTRA_LIBS@"
-@@ -24,10 +24,11 @@ php_sapis="@PHP_INSTALLED_SAPIS@"
+ extension_dir='@EXTENSION_DIR@'
+@@ -24,10 +24,10 @@ php_sapis="@PHP_INSTALLED_SAPIS@"
for sapi in $php_sapis; do
case $sapi in
cli)
-
php_cli_binary="@bindir@/${program_prefix}php${program_suffix}${exe_extension}"
-+ php_cli_binary="/usr/local/bin/php${program_suffix}"
++ php_cli_binary="${LOCALBASE}/bin/php${program_suffix}"
;;
cgi)
-
php_cgi_binary="@bindir@/${program_prefix}php-cgi${program_suffix}${exe_extension}"
-+ php_cgi_binary="/usr/local/bin/php-cgi${program_suffix}"
+-
php_cgi_binary="@bindir@/${program_prefix}php-cgi${program_suffix}${exe_extension}"
++ php_cgi_binary="${LOCALBASE}/bin/php-cgi${program_suffix}"
;;
esac
done
Index: 7.0/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/php/7.0/pkg/PLIST-main,v
retrieving revision 1.17
diff -u -p -r1.17 PLIST-main
--- 7.0/pkg/PLIST-main 15 Jun 2018 10:20:53 -0000 1.17
+++ 7.0/pkg/PLIST-main 17 Jun 2018 14:28:20 -0000
@@ -220,12 +220,6 @@ share/php-${PV}/include/ext/mysqlnd/mysq
share/php-${PV}/include/ext/mysqlnd/mysqlnd_wireprotocol.h
share/php-${PV}/include/ext/mysqlnd/php_mysqlnd.h
share/php-${PV}/include/ext/pcre/
-share/php-${PV}/include/ext/pcre/pcrelib/
-share/php-${PV}/include/ext/pcre/pcrelib/config.h
-share/php-${PV}/include/ext/pcre/pcrelib/pcre.h
-share/php-${PV}/include/ext/pcre/pcrelib/pcre_internal.h
-share/php-${PV}/include/ext/pcre/pcrelib/pcreposix.h
-share/php-${PV}/include/ext/pcre/pcrelib/ucp.h
share/php-${PV}/include/ext/pcre/php_pcre.h
share/php-${PV}/include/ext/pdo/
share/php-${PV}/include/ext/pdo/php_pdo.h