Sat Apr 14 12:58:19 2012 UTC ()
Added support for apache24


(adam)
diff -r1.26 -r1.27 pkgsrc/mk/apache.mk

cvs diff -r1.26 -r1.27 pkgsrc/mk/apache.mk (expand / switch to unified diff)

--- pkgsrc/mk/apache.mk 2011/03/12 14:07:13 1.26
+++ pkgsrc/mk/apache.mk 2012/04/14 12:58:19 1.27
@@ -1,85 +1,89 @@ @@ -1,85 +1,89 @@
1# $NetBSD: apache.mk,v 1.26 2011/03/12 14:07:13 wiz Exp $ 1# $NetBSD: apache.mk,v 1.27 2012/04/14 12:58:19 adam Exp $
2# 2#
3# This file is meant to be included by packages that require an apache 3# This file is meant to be included by packages that require an apache
4# web server. 4# web server.
5# 5#
6# User-settable variables: 6# User-settable variables:
7# 7#
8# PKG_APACHE_DEFAULT 8# PKG_APACHE_DEFAULT
9# The default apache server to use and install. If there already 9# The default apache server to use and install. If there already
10# is an apache installed, this will have no effect. 10# is an apache installed, this will have no effect.
11# 11#
12# Possible values: apache13 apache2 apache22 12# Possible values: apache13 apache2 apache22 apache24
13# 13#
14# Package-settable variables: 14# Package-settable variables:
15# 15#
16# PKG_APACHE_ACCEPTED 16# PKG_APACHE_ACCEPTED
17# The list of apache packages that can be used as a dependency for 17# The list of apache packages that can be used as a dependency for
18# the package. 18# the package.
19# 19#
20# Possible values: (see PKG_APACHE_DEFAULT) 20# Possible values: (see PKG_APACHE_DEFAULT)
21# 21#
22# USE_APR 22# USE_APR
23# If apache2 is chosen by this file and this variable is set to 23# If apache2 is chosen by this file and this variable is set to
24# "yes", a full dependency to the Apache Portable Runtime library 24# "yes", a full dependency to the Apache Portable Runtime library
25# will be added. 25# will be added.
26# 26#
27# Variables defined by this file: 27# Variables defined by this file:
28# 28#
29# PKG_APACHE 29# PKG_APACHE
30# The Apache version that is actually used. 30# The Apache version that is actually used.
31# 31#
32# Possible values: (see PKG_APACHE_DEFAULT) 32# Possible values: (see PKG_APACHE_DEFAULT)
33# 33#
34# APACHE_PKG_PREFIX 34# APACHE_PKG_PREFIX
35# The package name prefix for apache modules. 35# The package name prefix for apache modules.
36# 36#
37# Possible values: ap13 ap2 ap22 37# Possible values: ap13 ap2 ap22 ap24
38# 38#
39 39
40.if !defined(APACHE_MK) 40.if !defined(APACHE_MK)
41APACHE_MK= # defined 41APACHE_MK= # defined
42 42
43_VARGROUPS+= apache 43_VARGROUPS+= apache
44_USER_VARS.apache= PKG_APACHE_DEFAULT 44_USER_VARS.apache= PKG_APACHE_DEFAULT
45_PKG_VARS.apache= PKG_APACHE_ACCEPTED USE_APR 45_PKG_VARS.apache= PKG_APACHE_ACCEPTED USE_APR
46_SYS_VARS.apache= PKG_APACHE APACHE_PKG_PREFIX 46_SYS_VARS.apache= PKG_APACHE APACHE_PKG_PREFIX
47 47
48.include "bsd.fast.prefs.mk" 48.include "bsd.fast.prefs.mk"
49 49
50PKG_APACHE_DEFAULT?= apache22 50PKG_APACHE_DEFAULT?= apache22
51BUILD_DEFS+= PKG_APACHE_DEFAULT 51BUILD_DEFS+= PKG_APACHE_DEFAULT
52BUILD_DEFS_EFFECTS+= PKG_APACHE APACHE_PKG_PREFIX 52BUILD_DEFS_EFFECTS+= PKG_APACHE APACHE_PKG_PREFIX
53 53
54# Package-settable variables 54# Package-settable variables
55PKG_APACHE_ACCEPTED?= ${_PKG_APACHES} 55PKG_APACHE_ACCEPTED?= ${_PKG_APACHES}
56USE_APR?= no 56USE_APR?= no
57 57
58# The available apache packages: 58# The available apache packages:
59_PKG_APACHES= apache13 apache2 apache22 59_PKG_APACHES= apache13 apache2 apache22 apache24
60 60
61_APACHE_PKGBASE.apache13= apache-1* 61_APACHE_PKGBASE.apache13= apache-1*
62_APACHE_PKG_PREFIX.apache13= ap13 62_APACHE_PKG_PREFIX.apache13= ap13
63_APACHE_PKGSRCDIR.apache13= ../../www/apache 63_APACHE_PKGSRCDIR.apache13= ../../www/apache
64 64
65_APACHE_PKGBASE.apache2= apache-2.0* 65_APACHE_PKGBASE.apache2= apache-2.0*
66_APACHE_PKG_PREFIX.apache2= ap2 66_APACHE_PKG_PREFIX.apache2= ap2
67_APACHE_PKGSRCDIR.apache2= ../../www/apache2 67_APACHE_PKGSRCDIR.apache2= ../../www/apache2
68 68
69_APACHE_PKGBASE.apache22= apache-2.[23456789]* 69_APACHE_PKGBASE.apache22= apache-2.[23]*
70_APACHE_PKG_PREFIX.apache22= ap22 70_APACHE_PKG_PREFIX.apache22= ap22
71_APACHE_PKGSRCDIR.apache22= ../../www/apache22 71_APACHE_PKGSRCDIR.apache22= ../../www/apache22
72 72
 73_APACHE_PKGBASE.apache24= apache-2.[456789]*
 74_APACHE_PKG_PREFIX.apache24= ap24
 75_APACHE_PKGSRCDIR.apache24= ../../www/apache24
 76
73# 77#
74# Sanity checks. 78# Sanity checks.
75# 79#
76 80
77.if empty(_PKG_APACHES:M${PKG_APACHE_DEFAULT}) 81.if empty(_PKG_APACHES:M${PKG_APACHE_DEFAULT})
78PKG_FAIL_REASON+= "[apache.mk] Invalid apache package \""${PKG_APACHE_DEFAULT:Q}"\" in PKG_APACHE_DEFAULT." 82PKG_FAIL_REASON+= "[apache.mk] Invalid apache package \""${PKG_APACHE_DEFAULT:Q}"\" in PKG_APACHE_DEFAULT."
79PKG_APACHE_DEFAULT= apache2 83PKG_APACHE_DEFAULT= apache2
80.endif 84.endif
81 85
82.for _ap_ in ${PKG_APACHE_ACCEPTED} 86.for _ap_ in ${PKG_APACHE_ACCEPTED}
83. if empty(_PKG_APACHES:M${_ap_}) 87. if empty(_PKG_APACHES:M${_ap_})
84PKG_FAIL_REASON+= "[apache.mk] Invalid apache package \""${_ap_:Q}"\" in PKG_APACHE_ACCEPTED." 88PKG_FAIL_REASON+= "[apache.mk] Invalid apache package \""${_ap_:Q}"\" in PKG_APACHE_ACCEPTED."
85PKG_APACHE_ACCEPTED= # none 89PKG_APACHE_ACCEPTED= # none
@@ -120,23 +124,23 @@ PKG_APACHE?= ${ap} @@ -120,23 +124,23 @@ PKG_APACHE?= ${ap}
120.endfor 124.endfor
121 125
122.if defined(PKG_APACHE) 126.if defined(PKG_APACHE)
123. include "${_APACHE_PKGSRCDIR.${PKG_APACHE}}/buildlink3.mk" 127. include "${_APACHE_PKGSRCDIR.${PKG_APACHE}}/buildlink3.mk"
124.else 128.else
125PKG_FAIL_REASON+= "[apache.mk] No acceptable apache package found." 129PKG_FAIL_REASON+= "[apache.mk] No acceptable apache package found."
126PKG_APACHE= none 130PKG_APACHE= none
127.endif 131.endif
128 132
129APACHE_PKG_PREFIX= ${_APACHE_PKG_PREFIX.${PKG_APACHE}} 133APACHE_PKG_PREFIX= ${_APACHE_PKG_PREFIX.${PKG_APACHE}}
130 134
131.if (${PKG_APACHE} == "apache2") && !empty(USE_APR:M[yY][eE][sS]) 135.if (${PKG_APACHE} == "apache2") && !empty(USE_APR:M[yY][eE][sS])
132. include "../../devel/apr0/buildlink3.mk" 136. include "../../devel/apr0/buildlink3.mk"
133.elif (${PKG_APACHE} == "apache22") && !empty(USE_APR:M[Yy][Ee][Ss]) 137.elif (${PKG_APACHE} != "apache13") && !empty(USE_APR:M[Yy][Ee][Ss])
134. include "../../devel/apr/buildlink3.mk" 138. include "../../devel/apr/buildlink3.mk"
135. include "../../devel/apr-util/buildlink3.mk" 139. include "../../devel/apr-util/buildlink3.mk"
136.endif 140.endif
137 141
138# 142#
139# Variable assignment for multi-apache packages 143# Variable assignment for multi-apache packages
140MULTI+= PKG_APACHE=${PKG_APACHE} 144MULTI+= PKG_APACHE=${PKG_APACHE}
141 145
142.endif # APACHE_MK 146.endif # APACHE_MK