Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Jan 2011 01:23:14 +0100
From:      Olli Hauer <ohauer@FreeBSD.org>
To:        "Philip M. Gollucci" <pgollucci@p6m7g8.com>
Cc:        ohauer@FreeBSD.org, "Philip M. Gollucci" <pgollucci@FreeBSD.org>, apache@FreeBSD.org
Subject:   Re: question about PR: ports/147009: Mk/bsd.apache.mk: [patch] default to www/apache22
Message-ID:  <4D265CF2.5090208@FreeBSD.org>
In-Reply-To: <4D24BED1.7070004@p6m7g8.com>
References:  <4D243209.5040703@FreeBSD.org> <4D24BED1.7070004@p6m7g8.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D265CF2.5090208>