On Wed, Apr 13, 2016 at 12:32:03PM +0200, Frank Groeneveld wrote:
> ...
>
> One other small bug: files/php.conf contains "php5" in some places, it
> should be dynamic, depending on the php major version. I'm not sure how
> to capture only the first char from the $PV variable, otherwise I could
> make a diff for you.
I've made a diff that defines a new variable MV (major version) that is
used to fix this bug. My diff is against 5.9-stable, but I think it will
apply to -current without problems.
Would be great to get this committed into -stable as well.
Frank
? major_version.diff
Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/lang/php/Makefile.inc,v
retrieving revision 1.72
diff -u -p -r1.72 Makefile.inc
--- Makefile.inc 1 Feb 2016 21:53:06 -0000 1.72
+++ Makefile.inc 14 Apr 2016 09:35:31 -0000
@@ -429,7 +429,7 @@ post-install:
${INSTALL_DATA} ${.CURDIR}/../files/php.conf \
${PREFIX}/share/examples/php-${PV}/php.conf
- @perl -pi -e "s,!!PREFIX!!,${TRUEPREFIX},g;s,!!PV!!,${PV},g" \
+ @perl -pi -e
"s,!!PREFIX!!,${TRUEPREFIX},g;s,!!PV!!,${PV},g;s,!!MV!!,${MV},g" \
${PREFIX}/share/examples/php-${PV}/php.conf
.for m in ${MULTI_PACKAGES:N-main:N-fastcgi:N-fpm:S/-//g}
Index: 5.4/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/5.4/Makefile,v
retrieving revision 1.52
diff -u -p -r1.52 Makefile
--- 5.4/Makefile 1 Feb 2016 21:53:06 -0000 1.52
+++ 5.4/Makefile 14 Apr 2016 09:35:31 -0000
@@ -1,6 +1,7 @@
# $OpenBSD: Makefile,v 1.52 2016/02/01 21:53:06 sthen Exp $
-PV= 5.4
+MV= 5
+PV= ${MV}.4
V= ${PV}.45
REVISION= 2
Index: 5.5/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/5.5/Makefile,v
retrieving revision 1.49
diff -u -p -r1.49 Makefile
--- 5.5/Makefile 6 Feb 2016 23:31:20 -0000 1.49
+++ 5.5/Makefile 14 Apr 2016 09:35:31 -0000
@@ -1,6 +1,7 @@
# $OpenBSD: Makefile,v 1.49 2016/02/06 23:31:20 sthen Exp $
-PV= 5.5
+MV= 5
+PV= ${MV}.5
V= ${PV}.32
.include <bsd.port.mk>
Index: 5.6/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/5.6/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- 5.6/Makefile 6 Feb 2016 23:30:25 -0000 1.25
+++ 5.6/Makefile 14 Apr 2016 09:35:31 -0000
@@ -1,6 +1,7 @@
# $OpenBSD: Makefile,v 1.25 2016/02/06 23:30:25 sthen Exp $
-PV= 5.6
+MV= 5
+PV= ${MV}.6
V= ${PV}.18
WANTLIB-main+= stdc++ ncurses readline
Index: 7.0/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/7.0/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- 7.0/Makefile 1 Feb 2016 21:53:06 -0000 1.5
+++ 7.0/Makefile 14 Apr 2016 09:35:31 -0000
@@ -1,6 +1,7 @@
# $OpenBSD: Makefile,v 1.5 2016/02/01 21:53:06 sthen Exp $
-PV= 7.0
+MV= 7
+PV= ${MV}.0
V= ${PV}.2
REVISION= 0
Index: files/php.conf
===================================================================
RCS file: /cvs/ports/lang/php/files/php.conf,v
retrieving revision 1.2
diff -u -p -r1.2 php.conf
--- files/php.conf 5 Jan 2011 09:31:23 -0000 1.2
+++ files/php.conf 14 Apr 2016 09:35:31 -0000
@@ -1,6 +1,6 @@
-LoadModule php5_module !!PREFIX!!/lib/php-!!PV!!/libphp5.so
+LoadModule php!!MV!!_module !!PREFIX!!/lib/php-!!PV!!/libphp!!MV!!.so
-<IfModule mod_php5.c>
+<IfModule mod_php!!MV!!.c>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
# Most php configs require this