On 2012/09/20 09:30, Giovanni Bechis wrote:
> On 09/19/12 21:11, Stuart Henderson wrote:
> > On 2012/09/19 16:30, Giovanni Bechis wrote:
> >> Hi,
> >> I start needing the apache2 flavour of php, can it be built by default ?
> >>  Cheers
> >>   Giovanni
> > 
> > you need to change lang/php/Makefile rather than lang/Makefile for
> > this, but you'll get another set of packages for each plugin, it looks
> > like the fullpkgpath for those probably need to be overwritten..
> >
> Isn't this a correct fullpkgpath ?
> $ make show=FULLPKGPATH
> ===> lang/php/5.2
> lang/php/5.2,-main
> ===> lang/php/5.3
> lang/php/5.3,-main
> ===> lang/php/5.3,ap2
> lang/php/5.3,-main,ap2

cc'ing ports@ for more eyes ;)

The problem is the plugins, not the main package

$ FLAVOR=ap2 make show="FULLPKGPATH-curl FULLPKGNAME-curl"
lang/php/5.3,-curl,ap2
php-curl-5.3.17-ap2

I don't think we want another set of plugin packages for ap2,
the normal plugin packages ought to work for this (but I think we
do still need separate no_suhosin ones), so something like this
might be needed (packages need testing though, i.e. ap2 php needs
testing with non-ap2 plugins and vice-versa)

Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/lang/php/Makefile.inc,v
retrieving revision 1.32
diff -u -p -r1.32 Makefile.inc
--- Makefile.inc        23 Aug 2012 19:19:17 -0000      1.32
+++ Makefile.inc        20 Sep 2012 08:31:48 -0000
@@ -346,6 +346,9 @@ DESCR-${i}=         ${.CURDIR}/../files/DESCR-$
 MESSAGE-${i}=          ${.CURDIR}/../files/MESSAGE-ext
 UNMESSAGE-${i}=                ${.CURDIR}/../files/UNMESSAGE-ext
 PKGNAME-${i}=          php-${i}-${V}
+# don't build separate plugins for -ap2
+FULLPKGNAME-${i}=      php-${i}-${V}${FLAVOR_EXT:S/-ap2//}
+FULLPKGPATH-${i}=      ${PKGPATH},-${i}${FLAVOR_EXT:S/-ap2//:S/-/,/g}
 .if ${V:M5.2*}
 PKGSPEC-${i}=          php-${i}->=5.2,<5.3
 .else if ${V:M5.3*}

Also looking at "make show=PKGNAMES", it probably doesn't make much
sense to build these for ap2,

php-fpm-5.3.17-ap2
php-fastcgi-5.3.17-ap2

Diff below does this, but it has to be done in 5.x/Makefile rather
than Makefile.inc because we need to be finished setting the
MULTI_PACKAGES variable before the .include is done.

Index: 5.2/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/5.2/Makefile,v
retrieving revision 1.30
diff -u -p -r1.30 Makefile
--- 5.2/Makefile        23 Aug 2012 19:19:17 -0000      1.30
+++ 5.2/Makefile        20 Sep 2012 08:13:28 -0000
@@ -40,4 +40,9 @@ CONFIGURE_ARGS+=        --with-sybase-ct
 LIB_DEPENDS-sybase_ct= databases/freetds
 WANTLIB-sybase_ct=     c ct pthread
 
+.include <bsd.port.arch.mk>
+.if ${FLAVOR:L:Map2}
+BUILD_PACKAGES :=      ${BUILD_PACKAGES:N-fastcgi}
+.endif
+
 .include <bsd.port.mk>
Index: 5.3/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/5.3/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- 5.3/Makefile        24 Aug 2012 08:11:13 -0000      1.39
+++ 5.3/Makefile        20 Sep 2012 08:13:28 -0000
@@ -28,5 +28,10 @@ COMMENT-pcntl=               PCNTL extensions for php
 CONFIGURE_ARGS+=       --enable-pcntl=shared
 LIB_DEPENDS-pcntl=
 WANTLIB-pcntl=         c pthread
+
+.include <bsd.port.arch.mk>
+.if ${FLAVOR:L:Map2}
+BUILD_PACKAGES :=      ${BUILD_PACKAGES:N-fpm:N-fastcgi}
+.endif
 
 .include <bsd.port.mk>

Reply via email to