Lines 1-131
Link Here
|
1 |
# $FreeBSD$ |
1 |
# $FreeBSD$ |
2 |
# |
2 |
# |
3 |
# bsd.apache.mk - Apache related macros. |
3 |
# apache.mk - Apache related macros. |
4 |
# Author: Clement Laforet <clement@FreeBSD.org> |
4 |
# Author: Clement Laforet <clement@FreeBSD.org> |
5 |
# Author: Olli Hauer <ohauer@FreeBSD.org> |
5 |
# Author: Olli Hauer <ohauer@FreeBSD.org> |
|
|
6 |
# Author: Bernard Spil <brnrd@FreeSBD.org> |
6 |
# |
7 |
# |
7 |
# Please view me with 4 column tabs! |
8 |
# Please view me with 4 column tabs! |
8 |
|
9 |
|
9 |
# ========================================================================= |
10 |
# Feature: apache |
10 |
# User controlled parameters for usage in /etc/make.conf: |
11 |
# Usage: USES=apache or USES=apache:args |
|
|
12 |
# Valid args: <version>, build, run, server |
11 |
# |
13 |
# |
12 |
# DEFAULT_VERSIONS - define the default apache version |
14 |
# version If your port requires a specific Apache httpd version, you can |
13 |
# valid args: apache=2.2, apache=2.4 |
15 |
# set this to [min]-[max] or min+ or -max or an explicit version |
14 |
# |
16 |
# |
15 |
# APACHE_PORT - use www/apache22-(event|itk|peruser|worker)-mpm |
17 |
# USES=apache:2.2 # Only use Apache 2.2 |
16 |
# instead www/apache22. Use this parameter only in |
18 |
# USES=apache:2.4+ # Use Apache 2.4 or newer |
17 |
# combination with "DEFAULT_VERSIONS+= apache=2.2" |
19 |
# USES=apache:2.2-2.4 # Use Apache 2.2 or 2.4 |
|
|
20 |
# USES=apache # Use the default apache version |
18 |
# |
21 |
# |
19 |
# Example entry in /etc/make.conf: |
22 |
# Valid version numbers are specified in the variable |
20 |
# - Set apache22 as default version |
23 |
# APACHE_SUPPORTED_VERSION below |
21 |
# DEFAULT_VERSIONS+= apache=2.2 |
|
|
22 |
# |
24 |
# |
23 |
# - Additional use a special www/apache22-$MPM port |
25 |
# build Indicates that Apache is needed at build time and adds it to |
24 |
# APACHE_PORT= www/apache22-event-mpm |
26 |
# BUILD_DEPENDS. |
|
|
27 |
# run Indicates that Apache is needed at run time and adds it to |
28 |
# RUN_DEPENDS. |
29 |
# server Indicates that the port is a server port. |
25 |
# |
30 |
# |
26 |
# Note: |
31 |
# If build and run are omitted, Apache will be added as BUILD_DEPENDS and |
27 |
# - This parameters should never be used in the Makefile of a port! |
32 |
# RUN_DEPENDS |
28 |
# - To get a list of "possible" APACHE_PORT values execute the command: |
|
|
29 |
# $> awk '/apache22-/ {print "www/" $3}' ports/www/Makefile |
30 |
# |
33 |
# |
31 |
# ========================================================================= |
34 |
# Variables, which can be set by the port: |
32 |
# |
35 |
# |
33 |
# This script will be included if one of the following parameter |
36 |
# AP_FAST_BUILD automatic module build |
34 |
# is defined in the Makefile of the port |
|
|
35 |
# |
37 |
# |
36 |
# USE_APACHE - Set apache and apxs as build and run dependency |
38 |
# AP_GENPLIST automatic PLIST generation plus add |
37 |
# USE_APACHE_BUILD - Set apache and apxs as build dependency |
39 |
# the module disabled into httpd.conf |
38 |
# USE_APACHE_RUN - Set apache and apxs as run dependency |
40 |
# (only if no pkg-plist exist) |
39 |
# |
41 |
# |
40 |
# The following example is representative of all three possible |
42 |
# MODULENAME Name of the Apache module |
41 |
# parameters to use. |
43 |
# default: ${PORTNAME} |
|
|
44 |
# SHORTMODNAME Short name of the Apache module |
45 |
# default: ${MODULENAME:S/mod_//} |
46 |
# SRC_FILE Source file of the APACHE MODULE |
47 |
# default: ${MODULENAME}.c |
42 |
# |
48 |
# |
43 |
# Examples: |
49 |
# Variables, for internal use by the Apache ports framework only |
44 |
# USE_APACHE= 22 # specify exact version |
50 |
# The following values for USE_APACHE are reserved and only valid |
45 |
# USE_APACHE= 22+ # specify [min] version, no [max] version |
51 |
# in apache-server ports! |
46 |
# USE_APACHE= 22-24 # specify [min]-[max] range |
52 |
# USES= apache:common2.2 |
47 |
# USE_APACHE= -22 # specify [max] version, no [min] version |
|
|
48 |
# |
53 |
# |
49 |
# Note: |
|
|
50 |
# - If "+" is specified and no apache is installed, then |
51 |
# ${DEFAULT_APACHE_VERSION} will be used. |
52 |
# |
54 |
# |
53 |
# - Valid version numbers are specified in the variable |
55 |
# The following variables can be read by ports and must not be modified |
54 |
# APACHE_SUPPORTED_VERSION below |
56 |
# |
|
|
57 |
# APACHE_VERSION The major-minor release version of the chosen |
58 |
# Apache server, e.g. 2.2 or 2.4 |
55 |
# |
59 |
# |
56 |
# - The following values for USE_APACHE are reserverd and only valid |
60 |
# APACHEETCDIR Location of the Apache configuration directory |
57 |
# in apache-server ports! |
61 |
# Default: ${LOCALBASE}/etc/apache24 |
58 |
# USE_APACHE= common22 |
|
|
59 |
# |
62 |
# |
|
|
63 |
# APACHEINCLUDEDIR Location of the Apache include files |
64 |
# Default: ${LOCALBASE}/include/apache24 |
60 |
# |
65 |
# |
61 |
# The following variables can be used (ro) in ports Makefile |
66 |
# APACHEMODDIR Location of the Apache modules |
62 |
# ========================================================================= |
67 |
# Default: ${LOCALBASE}/libxexec/apache24 |
63 |
# - APACHE_VERSION |
|
|
64 |
# - APACHEETCDIR |
65 |
# - APACHEINCLUDEDIR |
66 |
# - APACHEMODDIR |
67 |
# - DEFAULT_APACHE_VERSION |
68 |
# |
68 |
# |
|
|
69 |
# DEFAULT_APACHE_VERSION Default Apache version |
69 |
# |
70 |
# |
70 |
# Parameters for building third party apache modules: |
|
|
71 |
# ========================================================================= |
72 |
# - AP_FAST_BUILD # automatic module build |
73 |
# |
74 |
# - AP_GENPLIST # automatic PLIST generation plus add |
75 |
# # the module disabled into httpd.conf |
76 |
# # (only if no pkg-plist exist) |
77 |
# |
78 |
# - MODULENAME # default: ${PORTNAME} |
79 |
# - SHORTMODNAME # default: ${MODULENAME:S/mod_//} |
80 |
# - SRC_FILE # default: ${MODULENAME}.c |
81 |
# |
82 |
# |
83 |
|
71 |
|
84 |
.if !defined(Apache_Pre_Include) |
72 |
.if !defined(_INCLUDE_USES_APACHE_PRE_MK) |
|
|
73 |
_INCLUDE_USES_APACHE_PRE_MK= yes |
74 |
_USES_POST+= apache |
85 |
|
75 |
|
86 |
Apache_Pre_Include= bsd.apache.mk |
|
|
87 |
|
88 |
.if defined(DEFAULT_APACHE_VER) |
89 |
WARNING+= "DEFAULT_APACHE_VER is defined, consider using DEFAULT_VERSIONS+=apache=${DEFAULT_APACHE_VER} instead" |
90 |
.endif |
91 |
|
92 |
DEFAULT_APACHE_VERSION?= ${APACHE_DEFAULT:S/.//} |
76 |
DEFAULT_APACHE_VERSION?= ${APACHE_DEFAULT:S/.//} |
93 |
# When adding a version, please keep the comment in |
77 |
# When adding a version, please keep the comment in |
94 |
# Mk/bsd.default-versions.mk in sync. |
78 |
# Mk/bsd.default-versions.mk in sync. |
95 |
APACHE_SUPPORTED_VERSION= 24 22 # preferred version first |
79 |
_APACHE_VERSIONS= 2.4 2.2 2.5# preferred version first |
96 |
|
80 |
|
97 |
# Print warnings |
81 |
# Print warnings |
98 |
_ERROR_MSG= : Error from bsd.apache.mk. |
82 |
_ERROR_MSG= : Error from apache.mk. |
99 |
|
83 |
|
100 |
# Important Note: |
84 |
# Important Note: |
101 |
# Keep apache version in ascending order! |
85 |
# Keep apache version in ascending order! |
102 |
# The "+" sign is only valid as last sign, not between |
86 |
# The "+" sign is only valid as last sign, not between |
103 |
# two versions or in combination with range! |
87 |
# two versions or in combination with range! |
104 |
.if defined(USE_APACHE) && !empty(USE_APACHE) |
88 |
.if defined(apache_ARGS) && !empty(apache_ARGS) |
105 |
. if ${USE_APACHE:Mcommon*} != "" |
89 |
# Preserve original arguments list |
106 |
AP_PORT_IS_SERVER= yes |
90 |
_APACHE_ARGS= ${apache_ARGS} |
107 |
. elif ${USE_APACHE:C/\-//:S/^22//:S/^24//:C/\+$//} == "" |
91 |
. if ${_APACHE_ARGS:Mserver} || ${_APACHE_ARGS:Mcommon*} != "" |
108 |
AP_PORT_IS_MODULE= yes |
92 |
_APACHE_ARGS:= ${_APACHE_ARGS:S/common/server /} |
109 |
. if ${USE_APACHE:C/\-//:S/^22//:S/^24//} == "+" |
93 |
_APACHE_PORT_IS_SERVER= yes |
110 |
AP_PLUS= yes |
94 |
_APACHE_ARGS:= ${_APACHE_ARGS:Nserver} |
|
|
95 |
. endif |
96 |
. if ${_APACHE_ARGS:Mbuild} |
97 |
_APACHE_BUILD_DEP= yes |
98 |
_APACHE_ARGS:= ${_APACHE_ARGS:Nbuild} |
99 |
. endif |
100 |
. if ${_APACHE_ARGS:Mrun} |
101 |
_APACHE_RUN_DEP= yes |
102 |
_APACHE_ARGS:= ${_APACHE_ARGS:Nrun} |
103 |
. endif |
104 |
# _APACHE_ARGS is now empty or contains a version(-range) |
105 |
. if ${_APACHE_ARGS:C/\-//:S/^2.2//:S/^2.4//:S/^2.5//:C/\+$//} == "" |
106 |
_APACHE_PORT_IS_MODULE= yes |
107 |
. if ${_APACHE_ARGS:C/\-//:S/^2.2//:S/^2.4//:S/^2.5//} == "+" |
108 |
_APACHE_PLUS= yes |
111 |
. endif |
109 |
. endif |
112 |
. else |
110 |
. else |
113 |
IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) |
111 |
IGNORE= ${_ERROR_MSG} 1 Illegal use of USES= apache ( ${apache_ARGS} ) |
114 |
. endif |
112 |
. endif |
115 |
# Catch unknown apache versions and silly USE_APACHE constructs |
113 |
# Catch unknown apache versions and silly USE_APACHE constructs |
116 |
. if empty(AP_PORT_IS_SERVER) && empty(AP_PORT_IS_MODULE) |
114 |
. if empty(_APACHE_PORT_IS_SERVER) && empty(_APACHE_PORT_IS_MODULE) |
117 |
IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) |
115 |
IGNORE= ${_ERROR_MSG} 2 Illegal use of USES= apache ( ${apache_ARGS} ) |
118 |
. endif |
116 |
. endif |
119 |
# Catch USE_APACHE [min]-[max]+ |
117 |
# Catch USE_APACHE [min]-[max]+ |
120 |
. if defined(AP_PLUS) && ${USE_APACHE:C/[.+0-9]//g} == "-" |
118 |
. if defined(_APACHE_PLUS) && ${apache_ARGS:C/[.a-z0-9]//g} == "-+" |
121 |
IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) |
119 |
IGNORE= ${_ERROR_MSG} Illegal use of USES= apache ( ${apache_ARGS} ) |
122 |
. endif |
120 |
. endif |
123 |
.elif defined(USE_APACHE) |
121 |
.elif defined(apache_ARGS) |
124 |
IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( no version specified ) |
122 |
IGNORE= ${_ERROR_MSG} Illegal use of USES= apache (no version specified) |
125 |
.endif # defined(USE_APACHE) |
123 |
.endif # defined(apache_ARGS) |
126 |
|
124 |
|
|
|
125 |
.if !defined(_APACHE_BUILD_DEP) && !defined(_APACHE_RUN_DEP) && \ |
126 |
!defined(_APACHE_PORT_IS_SERVER) |
127 |
_APACHE_BUILD_DEP= yes |
128 |
_APACHE_RUN_DEP= yes |
129 |
.endif |
130 |
|
131 |
.if defined(DEFAULT_APACHE_VER) |
132 |
WARNING+= "DEFAULT_APACHE_VER is defined, consider using DEFAULT_VERSIONS+=apache=${DEFAULT_APACHE_VER} instead" |
133 |
.endif |
134 |
|
135 |
.if defined(WITH_MODULES) || defined(WITHOUT_MODULES) |
136 |
IGNORE= ${_ERROR_MSG} WITH(OUT)_MODULES has been removed, use www_${PORTNAME}_(UN)SET |
137 |
.endif |
138 |
|
127 |
# =============================================================== |
139 |
# =============================================================== |
128 |
.if defined(AP_PORT_IS_SERVER) |
140 |
.if defined(_APACHE_PORT_IS_SERVER) |
129 |
# Module selection |
141 |
# Module selection |
130 |
.for category in ${DEFAULT_MODULES_CATEGORIES} |
142 |
.for category in ${DEFAULT_MODULES_CATEGORIES} |
131 |
DEFAULT_MODULES+= ${${category}_MODULES} |
143 |
DEFAULT_MODULES+= ${${category}_MODULES} |
Lines 135-171
Link Here
|
135 |
AVAILABLE_MODULES+= ${${category}_MODULES} |
147 |
AVAILABLE_MODULES+= ${${category}_MODULES} |
136 |
.endfor |
148 |
.endfor |
137 |
|
149 |
|
138 |
# detect invalid lowercase params in make.conf |
|
|
139 |
# keep this check until end of 2012 |
140 |
.if defined(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M[a-z]*} |
141 |
IGNORE= lowercase WITH_STATIC_MODULES="${WITH_STATIC_MODULES}"\ |
142 |
detected (make.conf), they shoud be UPPERCASE |
143 |
.endif |
144 |
|
145 |
# Setting "@comment " as default. |
146 |
.for module in ${AVAILABLE_MODULES:O} |
147 |
${module}PLIST_SUB= "@comment " |
148 |
_DISABLE_MODULES+= --disable-${module:tl} |
149 |
.endfor |
150 |
|
151 |
# Configure |
152 |
# dirty hacks to make sure all modules are disabled before we select them |
153 |
.if ${USE_APACHE:Mcommon2*} |
154 |
CONFIGURE_ARGS+= ${_DISABLE_MODULES:O:u} |
155 |
.endif |
156 |
|
157 |
# OPTIONS handling |
150 |
# OPTIONS handling |
158 |
.for module in ${AVAILABLE_MODULES} |
151 |
.for module in ${AVAILABLE_MODULES} |
159 |
. if ${PORT_OPTIONS:M${module}} |
152 |
. if ${PORT_OPTIONS:M${module}} |
160 |
_APACHE_MODULES+= ${module} |
153 |
_APACHE_ENABLED_MODS+= ${module} |
161 |
. else |
154 |
. else |
162 |
WITHOUT_MODULES+= ${module} |
155 |
_APACHE_DISABLED_MODS+= ${module} |
163 |
. endif |
156 |
. endif |
164 |
.endfor |
157 |
.endfor |
165 |
|
158 |
|
166 |
.if !defined(WITH_STATIC_APACHE) |
159 |
.if !defined(WITH_STATIC_APACHE) |
167 |
# FYI |
|
|
168 |
#DYNAMIC_MODULES= so |
169 |
CONFIGURE_ARGS+= --enable-so |
160 |
CONFIGURE_ARGS+= --enable-so |
170 |
.else |
161 |
.else |
171 |
CONFIGURE_ARGS+= --disable-so |
162 |
CONFIGURE_ARGS+= --disable-so |
Lines 173-179
Link Here
|
173 |
.endif |
164 |
.endif |
174 |
|
165 |
|
175 |
.if ${PORT_OPTIONS:MSUEXEC} |
166 |
.if ${PORT_OPTIONS:MSUEXEC} |
176 |
_APACHE_MODULES+= ${SUEXEC_MODULES} |
167 |
_APACHE_ENABLED_MODS+= ${SUEXEC_MODULES} |
177 |
SUEXEC_CONFARGS= with-suexec |
168 |
SUEXEC_CONFARGS= with-suexec |
178 |
|
169 |
|
179 |
# SUEXEC_DOCROOT should exist |
170 |
# SUEXEC_DOCROOT should exist |
Lines 204-257
Link Here
|
204 |
. endif |
195 |
. endif |
205 |
.endif |
196 |
.endif |
206 |
|
197 |
|
207 |
.if !defined(WITHOUT_MODULES) |
198 |
.if !defined(_APACHE_DISABLED_MODS) |
208 |
APACHE_MODULES= ${_APACHE_MODULES} |
199 |
APACHE_MODULES= ${_APACHE_ENABLED_MODS} |
209 |
.else |
200 |
.else |
210 |
.for module in ${_APACHE_MODULES:O:u} |
201 |
.for module in ${_APACHE_ENABLED_MODS:O:u} |
211 |
. if !${WITHOUT_MODULES:M${module}} |
202 |
. if !${_APACHE_DISABLED_MODS:M${module}} |
212 |
APACHE_MODULES+= ${module} |
203 |
APACHE_MODULES+= ${module} |
213 |
. endif |
204 |
. endif |
214 |
.endfor |
205 |
.endfor |
215 |
.endif |
206 |
.endif |
216 |
|
207 |
|
217 |
.if defined(WITH_STATIC_MODULES) |
208 |
.if defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES) |
218 |
.for module in ${APACHE_MODULES} |
|
|
219 |
. if ${WITH_STATIC_MODULES:M${module}} |
220 |
_CONFIGURE_ARGS+= --enable-${module:tl}=static |
221 |
. else |
222 |
_CONFIGURE_ARGS+= --enable-${module:tl}=shared |
223 |
. endif |
224 |
.endfor |
225 |
CONFIGURE_ARGS+= ${_CONFIGURE_ARGS:O} |
226 |
.elif defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES) |
227 |
WITH_STATIC_MODULES= ${APACHE_MODULES} |
209 |
WITH_STATIC_MODULES= ${APACHE_MODULES} |
228 |
CONFIGURE_ARGS+= --enable-modules="${APACHE_MODULES:O:tl}" |
|
|
229 |
.else |
230 |
CONFIGURE_ARGS+= --enable-mods-shared="${APACHE_MODULES:O:tl}" |
231 |
.endif |
210 |
.endif |
232 |
|
211 |
|
233 |
# ==================================== |
212 |
.for module in ${AVAILABLE_MODULES} |
234 |
# start pkg-plist adjustments |
213 |
. if !empty(WITH_STATIC_MODULES:M${module}) |
235 |
.if defined(WITH_STATIC_MODULES) |
214 |
CONFIGURE_ARGS+= --enable-${module:tl}=static |
236 |
.for module in ${APACHE_MODULES} |
215 |
PLIST_SUB+= MOD_${module}="@comment " |
237 |
. if !${WITH_STATIC_MODULES:M${module}} |
216 |
. elif !empty(APACHE_MODULES:M${module}) |
238 |
_SHARED_MODULES+= ${module} |
217 |
CONFIGURE_ARGS+= --enable-${module:tl}=shared |
|
|
218 |
PLIST_SUB+= MOD_${module}="" |
219 |
. else |
220 |
CONFIGURE_ARGS+= --disable-${module:tl} |
221 |
PLIST_SUB+= MOD_${module}="@comment " |
239 |
. endif |
222 |
. endif |
240 |
.endfor |
223 |
.endfor |
241 |
|
224 |
|
242 |
SHARED_MODULES= ${_SHARED_MODULES} |
|
|
243 |
.elif !defined(WITH_ALL_STATIC_MODULES) |
244 |
SHARED_MODULES= ${APACHE_MODULES} |
245 |
.endif |
246 |
|
247 |
.for module in ${SHARED_MODULES} |
248 |
${module}PLIST_SUB= "" |
249 |
.endfor |
250 |
|
251 |
.for module in ${AVAILABLE_MODULES:O:u} |
252 |
PLIST_SUB+= MOD_${module}=${${module}PLIST_SUB} |
253 |
.endfor |
254 |
|
255 |
# pkg-plist workaround STATIC support |
225 |
# pkg-plist workaround STATIC support |
256 |
.if ${PORT_OPTIONS:MSUEXEC} |
226 |
.if ${PORT_OPTIONS:MSUEXEC} |
257 |
PLIST_SUB+= SUEXEC="" |
227 |
PLIST_SUB+= SUEXEC="" |
Lines 265-276
Link Here
|
265 |
PLIST_SUB+= FORENSIC="@comment " |
235 |
PLIST_SUB+= FORENSIC="@comment " |
266 |
.endif |
236 |
.endif |
267 |
|
237 |
|
268 |
# end pkg-plist adjustments |
238 |
#### End of _APACHE_PORT_IS_SERVER #### |
269 |
|
239 |
|
270 |
#### End of AP_PORT_IS_SERVER #### |
|
|
271 |
|
272 |
# =============================================================== |
240 |
# =============================================================== |
273 |
.elif defined(AP_PORT_IS_MODULE) || defined(USE_APACHE_RUN) || defined(USE_APACHE_BUILD) |
241 |
.elif defined(_APACHE_PORT_IS_MODULE) || defined(_APACHE_RUN_DEP) || defined(_APACHE_BUILD_DEP) |
274 |
APXS?= ${LOCALBASE}/sbin/apxs |
242 |
APXS?= ${LOCALBASE}/sbin/apxs |
275 |
HTTPD?= ${LOCALBASE}/sbin/httpd |
243 |
HTTPD?= ${LOCALBASE}/sbin/httpd |
276 |
|
244 |
|
Lines 280-326
Link Here
|
280 |
|
248 |
|
281 |
.if exists(${HTTPD}) |
249 |
.if exists(${HTTPD}) |
282 |
_APACHE_VERSION!= ${HTTPD} -v | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p' |
250 |
_APACHE_VERSION!= ${HTTPD} -v | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p' |
283 |
.elif defined(APACHE_PORT) |
|
|
284 |
_APACHE_VERSION!= ${ECHO_CMD} ${APACHE_PORT} | ${SED} -ne 's,.*/apache\([0-9]*\).*,\1,p' |
285 |
.endif |
251 |
.endif |
286 |
|
252 |
|
287 |
.if defined(USE_APACHE) |
253 |
.if defined(_APACHE_ARGS) |
288 |
_USE_APACHE:= ${USE_APACHE} |
254 |
_USE_APACHE:= ${_APACHE_ARGS:S/.//g} |
289 |
.elif defined(USE_APACHE_BUILD) |
|
|
290 |
_USE_APACHE:= ${USE_APACHE_BUILD} |
291 |
.elif defined(USE_APACHE_RUN) |
292 |
_USE_APACHE:= ${USE_APACHE_RUN} |
293 |
.endif |
255 |
.endif |
294 |
|
256 |
|
295 |
_APACHE_VERSION_CHECK:= ${_USE_APACHE:C/^([1-9][0-9])$/\1-\1/} |
257 |
_APACHE_VERSION_CHECK:= ${_USE_APACHE:C/^([1-9][0-9])$/\1-\1/} |
296 |
_APACHE_VERSION_MINIMUM_TMP:= ${_APACHE_VERSION_CHECK:C/([1-9][0-9])[-+].*/\1/} |
258 |
_APACHE_VERSION_MIN:= ${_APACHE_VERSION_CHECK:C/([1-9][0-9])[-+].*/\1/} |
297 |
_APACHE_VERSION_MINIMUM:= ${_APACHE_VERSION_MINIMUM_TMP:M[1-9][0-9]} |
259 |
_APACHE_VERSION_MAX:= ${_APACHE_VERSION_CHECK:C/.*-([1-9][0-9])/\1/} |
298 |
_APACHE_VERSION_MAXIMUM_TMP:= ${_APACHE_VERSION_CHECK:C/.*-([1-9][0-9])/\1/} |
|
|
299 |
_APACHE_VERSION_MAXIMUM:= ${_APACHE_VERSION_MAXIMUM_TMP:M[1-9][0-9]} |
300 |
|
260 |
|
301 |
# ============================================================== |
261 |
# ============================================================== |
302 |
# num+ |
262 |
# num+ |
303 |
.if ${_USE_APACHE:M*+} |
263 |
.if !empty(_USE_APACHE:M*+) |
304 |
_APACHE_WANTED_VERSIONS= ${DEFAULT_APACHE_VERSION} |
264 |
_APACHE_WANTED_VERSIONS= ${DEFAULT_APACHE_VERSION} |
305 |
|
265 |
|
306 |
# -num |
266 |
# -num |
307 |
.elif ${_USE_APACHE:M\-[0-9][0-9]} |
267 |
.elif !empty(_USE_APACHE:M\-[0-9][0-9]) |
308 |
.for _v in ${APACHE_SUPPORTED_VERSION:O} |
268 |
.for _v in ${_APACHE_VERSIONS:O} |
309 |
. if ${_APACHE_VERSION_MAXIMUM} >= ${_v} |
269 |
. if ${_APACHE_VERSION_MAX} >= ${_v} |
310 |
_APACHE_WANTED_VERSIONS+= ${_v} |
270 |
_APACHE_WANTED_VERSIONS+= ${_v} |
311 |
. endif |
271 |
. endif |
312 |
.endfor |
272 |
.endfor |
313 |
|
273 |
|
314 |
# num-num |
274 |
# num-num |
315 |
.elif ${_USE_APACHE:M[0-9][0-9]-[0-9][0-9]} |
275 |
.elif !empty(_USE_APACHE:M[0-9][0-9]-[0-9][0-9]) |
316 |
.for _v in ${APACHE_SUPPORTED_VERSION} |
276 |
.for _v in ${_APACHE_VERSIONS} |
317 |
. if ${_APACHE_VERSION_MINIMUM} <= ${_v} && ${_APACHE_VERSION_MAXIMUM} >= ${_v} |
277 |
. if ${_APACHE_VERSION_MIN} <= ${_v} && ${_APACHE_VERSION_MAX} >= ${_v} |
318 |
_APACHE_WANTED_VERSIONS+= ${_v} |
278 |
_APACHE_WANTED_VERSIONS+= ${_v} |
319 |
. endif |
279 |
. endif |
320 |
.endfor |
280 |
.endfor |
321 |
|
281 |
|
322 |
# num |
282 |
# num |
323 |
.elif ${_USE_APACHE:M[0-9][0-9]} |
283 |
.elif !empty(_USE_APACHE:M[0-9][0-9]) |
324 |
_APACHE_WANTED_VERSIONS= ${_USE_APACHE:M[0-9][0-9]} |
284 |
_APACHE_WANTED_VERSIONS= ${_USE_APACHE:M[0-9][0-9]} |
325 |
.endif |
285 |
.endif |
326 |
# ============================================================== |
286 |
# ============================================================== |
Lines 382-392
Link Here
|
382 |
PKGNAMEPREFIX?= ${APACHE_PKGNAMEPREFIX} |
342 |
PKGNAMEPREFIX?= ${APACHE_PKGNAMEPREFIX} |
383 |
.endif |
343 |
.endif |
384 |
|
344 |
|
385 |
.if defined(USE_APACHE) || defined(USE_APACHE_BUILD) |
345 |
.if defined(_APACHE_BUILD_DEP) |
386 |
BUILD_DEPENDS+= ${APXS}:${APACHE_PORT} |
346 |
BUILD_DEPENDS+= ${APXS}:${APACHE_PORT} |
387 |
.endif |
347 |
.endif |
388 |
|
348 |
|
389 |
.if defined(USE_APACHE) || defined(USE_APACHE_RUN) |
349 |
.if defined(_APACHE_RUN_DEP) |
390 |
RUN_DEPENDS+= ${APXS}:${APACHE_PORT} |
350 |
RUN_DEPENDS+= ${APXS}:${APACHE_PORT} |
391 |
.endif |
351 |
.endif |
392 |
|
352 |
|
Lines 404-444
Link Here
|
404 |
AP_EXTRAS+= -L ${AP_LIB} |
364 |
AP_EXTRAS+= -L ${AP_LIB} |
405 |
.endif |
365 |
.endif |
406 |
|
366 |
|
407 |
.endif # End of AP_PORT_IS_SERVER / AP_PORT_IS_MOULE |
367 |
.endif # End of _APACHE_PORT_IS_SERVER / _APACHE_PORT_IS_MOULE |
408 |
.endif # End of !Apache_Pre_Include |
368 |
.endif # End of !_INCLUDE_USES_APACHE_PRE_MK |
409 |
|
369 |
|
410 |
# =============================================================== |
370 |
# =============================================================== |
411 |
.if defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include) |
371 |
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_APACHE_POST_MK) |
412 |
Apache_Post_Include= bsd.apache.mk |
372 |
_INCLUDE_USES_APACHE_POST_MK= apache.mk |
413 |
|
373 |
.if defined(NO_BUILD) && !defined(_APACHE_RUN_DEP) |
414 |
.if defined(USE_APACHE_RUN) && !empty(USE_APACHE_RUN) |
374 |
BROKEN= If NO_BUILD is used, then apache:run is sufficient. Please fix your Makefile |
415 |
. if ${USE_APACHE_RUN:C/\-//:S/^22//:S/^24//:C/\+$//} != "" |
|
|
416 |
IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( ${USE_APACHE_RUN} ) |
417 |
. endif |
418 |
.elif defined(USE_APACHE_RUN) |
419 |
IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( no valid version specified ) |
420 |
.endif |
375 |
.endif |
421 |
|
376 |
|
422 |
.if defined(USE_APACHE_BUILD) && !empty(USE_APACHE_BUILD) |
377 |
.if defined(_APACHE_PORT_IS_SERVER) |
423 |
. if ${USE_APACHE_BUILD:C/\-//:S/^22//:S/^24//:C/\+$//} != "" |
|
|
424 |
IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( ${USE_APACHE_BUILD} ) |
425 |
. endif |
426 |
.elif defined(USE_APACHE_BUILD) |
427 |
IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( no valid version specified ) |
428 |
.endif |
429 |
|
430 |
# Check if USE_APACHE(_BUILD|_RUN) are mixed together |
431 |
.if defined(USE_APACHE) && ( defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) ) |
432 |
IGNORE= ${_ERROR_MSG} specify only one of: USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN |
433 |
.elif defined(USE_APACHE_BUILD) && defined(USE_APACHE_RUN) |
434 |
IGNORE= ${_ERROR_MSG} use USE_APACHE instead of USE_APACHE_BUILD and USE_APACHE_RUN together |
435 |
.endif |
436 |
|
437 |
.if defined(NO_BUILD) && defined(USE_APACHE) |
438 |
BROKEN= If NO_BUILD is used, then USE_APACHE_RUN is sufficient. Please fix your Makefile |
439 |
.endif |
440 |
|
441 |
.if defined(AP_PORT_IS_SERVER) |
442 |
.if !target(print-closest-mirrors) |
378 |
.if !target(print-closest-mirrors) |
443 |
print-closest-mirrors: |
379 |
print-closest-mirrors: |
444 |
@${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2 |
380 |
@${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2 |
Lines 474-480
Link Here
|
474 |
.endif |
410 |
.endif |
475 |
.endif |
411 |
.endif |
476 |
|
412 |
|
477 |
.elif defined(AP_PORT_IS_MODULE) |
413 |
.elif defined(_APACHE_PORT_IS_MODULE) |
478 |
|
414 |
|
479 |
.if defined(AP_MODENABLE) |
415 |
.if defined(AP_MODENABLE) |
480 |
AP_MOD_EN= -a |
416 |
AP_MOD_EN= -a |
Lines 516-520
Link Here
|
516 |
.endif |
452 |
.endif |
517 |
|
453 |
|
518 |
.endif # defined(AP_FAST_BUILD) |
454 |
.endif # defined(AP_FAST_BUILD) |
519 |
.endif # defined(AP_PORT_IS_SERVER / AP_PORT_IS_MODULE) |
455 |
.endif # defined(_APACHE_PORT_IS_SERVER / _APACHE_PORT_IS_MODULE) |
520 |
.endif # defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include) |
456 |
.endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_APACHE_PRE_MK) |