question about PR: ports/147009: Mk/bsd.apache.mk: [patch]
default to www/apache22
Olli Hauer
ohauer at FreeBSD.org
Fri Jan 7 00:19:26 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2011-01-05 19:56, Philip M. Gollucci wrote:
> On 01/05/11 08:55, Olli Hauer wrote:
>> Hi Philip,
>
>> I've looked into PR ports/147009: Mk/bsd.apache.mk: [patch] default to www/apache22
>> and to me it is not clear what pav mentioned
>
>> By: pav
>> Why: This patch is ineffective - the default apache version is still 2.0
>> I don't see how you can expect to match two lines with grep with single line input
>
>> Which two lines does pav mean?
>
>> Any Hint? I have some time I can spend to look into this.
>
> Basically you want to think about do I have a '+' in the USE_APACHE=x
> line in the port Makefile. IIRC all ports that depend on apache have
> this now and none of them are =yes!
>
> Given that if you have a +, you want to set APACHE_PORT to the highest
> value (currently 22). If don't have a plus, you need exactly that value.
>
>
Hi Philip,
I found a working solution for PR ports/147009
Mk/bsd.apache.mk: [patch] default to www/apache22
I tested the following diff in a clean chroot environment
Results:
================================================
USE_APACHE= 1.3 or 13 => APACHE_VERSION=13
USE_APACHE= 1.3+ or 13 => APACHE_VERSION=22
USE_APACHE= 2.0 or 20 => APACHE_VERSION=20
USE_APACHE= 2.0+ or 20 => APACHE_VERSION=22
Instead
${USE_APACHE:C/\.//:S/13//:S/20//:C/\+/PLUS/}
the following expression works also
${USE_APACHE:C/\.//:C/[12][30]//:C/\+/PLUS/} => not optimal
But then a definition of 23+ will downgrade to 22.
Index: bsd.apache.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.apache.mk,v
retrieving revision 1.26
diff -u -r1.26 bsd.apache.mk
- --- bsd.apache.mk 7 Jun 2010 14:38:44 -0000 1.26
+++ bsd.apache.mk 7 Jan 2011 00:08:17 -0000
@@ -259,8 +259,12 @@
.else
AP_CUR_VERSION= none
. if !defined(APACHE_PORT)
- -#Fallback to smallest version...
+# If we found '13+' or '20+' make apache22 the default
+. if ${USE_APACHE:C/\.//:S/13//:S/20//:C/\+/PLUS/} == "PLUS"
+APACHE_VERSION= 22
+. else
APACHE_VERSION= ${AP_VERSION:C/\+//}
+. endif
. endif
.endif
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJNJlzyAAoJEOVuBrNdAI8aIrAH+wbNmk51i0lUhqj9biOd6fX2
8eEcIQOeN+CoZi2zfoNwCC3CBkvh5CugOgwTwV9TzJ0cw3Y76Ux4hkLtf6a/W+j2
1tx+8mYC70OtuuZVbpskAdkJLIxZncTB71m5K1Hd2beN5vZUhCPA25arfzPHQDi6
6UmB5gLXXA/C3e9+QYKbBgJn4hMMUclSF6tPRPMOpyRruQ7ZeZbwJJtMTP7E+yl4
NWa8djZRdvYmtKflQZyQ0GrIKsSawOvIW7E1pCzR37YNkhIjJiv44fpCcpKs7zq0
JBCSmjhWtxdIpqVRDc+cmRU6btPx8zLFUI/Um9H8if7UPDLCLUp+rE038o1fbXI=
=Nra4
-----END PGP SIGNATURE-----
More information about the freebsd-apache
mailing list