| @@ -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) |
41 | APACHE_MK= # defined | | 41 | APACHE_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 | |
50 | PKG_APACHE_DEFAULT?= apache22 | | 50 | PKG_APACHE_DEFAULT?= apache22 |
51 | BUILD_DEFS+= PKG_APACHE_DEFAULT | | 51 | BUILD_DEFS+= PKG_APACHE_DEFAULT |
52 | BUILD_DEFS_EFFECTS+= PKG_APACHE APACHE_PKG_PREFIX | | 52 | BUILD_DEFS_EFFECTS+= PKG_APACHE APACHE_PKG_PREFIX |
53 | | | 53 | |
54 | # Package-settable variables | | 54 | # Package-settable variables |
55 | PKG_APACHE_ACCEPTED?= ${_PKG_APACHES} | | 55 | PKG_APACHE_ACCEPTED?= ${_PKG_APACHES} |
56 | USE_APR?= no | | 56 | USE_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}) |
78 | PKG_FAIL_REASON+= "[apache.mk] Invalid apache package \""${PKG_APACHE_DEFAULT:Q}"\" in PKG_APACHE_DEFAULT." | | 82 | PKG_FAIL_REASON+= "[apache.mk] Invalid apache package \""${PKG_APACHE_DEFAULT:Q}"\" in PKG_APACHE_DEFAULT." |
79 | PKG_APACHE_DEFAULT= apache2 | | 83 | PKG_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_}) |
84 | PKG_FAIL_REASON+= "[apache.mk] Invalid apache package \""${_ap_:Q}"\" in PKG_APACHE_ACCEPTED." | | 88 | PKG_FAIL_REASON+= "[apache.mk] Invalid apache package \""${_ap_:Q}"\" in PKG_APACHE_ACCEPTED." |
85 | PKG_APACHE_ACCEPTED= # none | | 89 | PKG_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 |
125 | PKG_FAIL_REASON+= "[apache.mk] No acceptable apache package found." | | 129 | PKG_FAIL_REASON+= "[apache.mk] No acceptable apache package found." |
126 | PKG_APACHE= none | | 130 | PKG_APACHE= none |
127 | .endif | | 131 | .endif |
128 | | | 132 | |
129 | APACHE_PKG_PREFIX= ${_APACHE_PKG_PREFIX.${PKG_APACHE}} | | 133 | APACHE_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 |
140 | MULTI+= PKG_APACHE=${PKG_APACHE} | | 144 | MULTI+= PKG_APACHE=${PKG_APACHE} |
141 | | | 145 | |
142 | .endif # APACHE_MK | | 146 | .endif # APACHE_MK |