View | Details | Raw Unified | Return to bug 223691 | Differences between
and this patch

Collapse All | Expand All

(-)CHANGES (+5 lines)
Lines 10-15 Link Here
10
10
11
All ports committers are allowed to commit to this file.
11
All ports committers are allowed to commit to this file.
12
12
13
20171210:
14
AUTHOR: brnrd@FreeBSD.org
15
16
  USE_APACHE has been replaced by USES=apache.
17
13
20171130:
18
20171130:
14
AUTHOR: mat@FreeBSD.org
19
AUTHOR: mat@FreeBSD.org
15
20
(-)Mk/bsd.apache.mk (-520 lines)
Lines 1-520 Link Here
1
# $FreeBSD$
2
#
3
# bsd.apache.mk - Apache related macros.
4
# Author: Clement Laforet <clement@FreeBSD.org>
5
# Author: Olli Hauer <ohauer@FreeBSD.org>
6
#
7
# Please view me with 4 column tabs!
8
9
# =========================================================================
10
# User controlled parameters for usage in /etc/make.conf:
11
#
12
#  DEFAULT_VERSIONS  - define the default apache version
13
#                      valid args: apache=2.2, apache=2.4
14
#
15
#  APACHE_PORT       - use www/apache22-(event|itk|peruser|worker)-mpm
16
#                      instead www/apache22.  Use this parameter only in
17
#                      combination with "DEFAULT_VERSIONS+= apache=2.2"
18
#
19
# Example entry in /etc/make.conf:
20
# - Set apache22 as default version
21
#    DEFAULT_VERSIONS+= apache=2.2
22
#
23
# - Additional use a special www/apache22-$MPM port
24
#    APACHE_PORT= www/apache22-event-mpm
25
#
26
# Note:
27
#  - This parameters should never be used in the Makefile of a port!
28
#  - To get a list of "possible" APACHE_PORT values execute the command:
29
#    $> awk '/apache22-/ {print "www/" $3}' ports/www/Makefile
30
#
31
# =========================================================================
32
#
33
# This script will be included if one of the following parameter
34
# is defined in the Makefile of the port
35
#
36
# USE_APACHE         - Set apache and apxs as build and run dependency
37
# USE_APACHE_BUILD   - Set apache and apxs as build dependency
38
# USE_APACHE_RUN     - Set apache and apxs as run dependency
39
#
40
# The following example is representative of all three possible
41
# parameters to use.
42
#
43
# Examples:
44
#  USE_APACHE= 22       # specify exact version
45
#  USE_APACHE= 22+      # specify [min] version, no [max] version
46
#  USE_APACHE= 22-24    # specify [min]-[max] range
47
#  USE_APACHE= -22      # specify [max] version, no [min] version
48
#
49
# Note:
50
#  - If "+" is specified and no apache is installed, then
51
#    ${DEFAULT_APACHE_VERSION} will be used.
52
#
53
#  - Valid version numbers are specified in the variable
54
#    APACHE_SUPPORTED_VERSION below
55
#
56
#  - The following values for USE_APACHE are reserverd and only valid
57
#    in apache-server ports!
58
#      USE_APACHE= common22
59
#
60
#
61
# The following variables can be used (ro) in ports Makefile
62
# =========================================================================
63
#  - APACHE_VERSION
64
#  - APACHEETCDIR
65
#  - APACHEINCLUDEDIR
66
#  - APACHEMODDIR
67
#  - DEFAULT_APACHE_VERSION
68
#
69
#
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
84
.if !defined(Apache_Pre_Include)
85
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/.//}
93
# When adding a version, please keep the comment in
94
# Mk/bsd.default-versions.mk in sync.
95
APACHE_SUPPORTED_VERSION=	24 22 # preferred version first
96
97
# Print warnings
98
_ERROR_MSG=	: Error from bsd.apache.mk.
99
100
# Important Note:
101
#  Keep apache version in ascending order!
102
#  The "+" sign is only valid as last sign, not between
103
#  two versions or in combination with range!
104
.if defined(USE_APACHE) && !empty(USE_APACHE)
105
.	if ${USE_APACHE:Mcommon*} != ""
106
AP_PORT_IS_SERVER=	yes
107
.	elif ${USE_APACHE:C/\-//:S/^22//:S/^24//:C/\+$//} == ""
108
AP_PORT_IS_MODULE=	yes
109
.		if ${USE_APACHE:C/\-//:S/^22//:S/^24//} == "+"
110
AP_PLUS=	yes
111
.		endif
112
.	else
113
IGNORE=	${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
114
.	endif
115
# Catch unknown apache versions and silly USE_APACHE constructs
116
.	if empty(AP_PORT_IS_SERVER) && empty(AP_PORT_IS_MODULE)
117
IGNORE=	${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
118
.	endif
119
# Catch USE_APACHE [min]-[max]+
120
.	if defined(AP_PLUS) && ${USE_APACHE:C/[.+0-9]//g} == "-"
121
IGNORE=	${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
122
.	endif
123
.elif defined(USE_APACHE)
124
IGNORE=	${_ERROR_MSG} Illegal use of USE_APACHE ( no version specified )
125
.endif # defined(USE_APACHE)
126
127
# ===============================================================
128
.if defined(AP_PORT_IS_SERVER)
129
# Module selection
130
.for category in ${DEFAULT_MODULES_CATEGORIES}
131
DEFAULT_MODULES+=	${${category}_MODULES}
132
.endfor
133
134
.for category in ${ALL_MODULES_CATEGORIES}
135
AVAILABLE_MODULES+=	${${category}_MODULES}
136
.endfor
137
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
158
.for module in ${AVAILABLE_MODULES}
159
.	if ${PORT_OPTIONS:M${module}}
160
_APACHE_MODULES+=	${module}
161
.	else
162
WITHOUT_MODULES+=	${module}
163
.	endif
164
.endfor
165
166
.if !defined(WITH_STATIC_APACHE)
167
# FYI
168
#DYNAMIC_MODULES=	so
169
CONFIGURE_ARGS+=	--enable-so
170
.else
171
CONFIGURE_ARGS+=	--disable-so
172
WITH_ALL_STATIC_MODULES=	yes
173
.endif
174
175
.if ${PORT_OPTIONS:MSUEXEC}
176
_APACHE_MODULES+=	${SUEXEC_MODULES}
177
SUEXEC_CONFARGS=	with-suexec
178
179
# SUEXEC_DOCROOT should exist
180
SUEXEC_DOCROOT?=	${PREFIX}/www/data
181
#SUEXEC_DOCROOT?=	${WWWDIR}
182
SUEXEC_USERDIR?=	public_html
183
# avoid duplicate search paths
184
.if ${LOCALBASE} == ${PREFIX}
185
SUEXEC_SAFEPATH?=	${LOCALBASE}/bin:/usr/bin:/bin
186
.else
187
SUEXEC_SAFEPATH?=	${PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:/bin
188
.endif
189
SUEXEC_LOGFILE?=	/var/log/httpd-suexec.log
190
SUEXEC_UIDMIN?=		1000
191
SUEXEC_GIDMIN?=		1000
192
SUEXEC_CALLER?=		${WWWOWN}
193
CONFIGURE_ARGS+=	--${SUEXEC_CONFARGS}-caller=${SUEXEC_CALLER} \
194
			--${SUEXEC_CONFARGS}-uidmin=${SUEXEC_UIDMIN} \
195
			--${SUEXEC_CONFARGS}-gidmin=${SUEXEC_GIDMIN} \
196
			--${SUEXEC_CONFARGS}-userdir="${SUEXEC_USERDIR}" \
197
			--${SUEXEC_CONFARGS}-docroot="${SUEXEC_DOCROOT}" \
198
			--${SUEXEC_CONFARGS}-safepath="${SUEXEC_SAFEPATH}" \
199
			--${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" \
200
			--${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec"
201
202
.	if defined(WITH_SUEXEC_UMASK)
203
CONFIGURE_ARGS+=	--${SUEXEC_CONFARGS}-umask=${SUEXEC_UMASK}
204
.	endif
205
.endif
206
207
.if !defined(WITHOUT_MODULES)
208
APACHE_MODULES=		${_APACHE_MODULES}
209
.else
210
.for module in ${_APACHE_MODULES:O:u}
211
.	if !${WITHOUT_MODULES:M${module}}
212
APACHE_MODULES+=	${module}
213
.	endif
214
.endfor
215
.endif
216
217
.if defined(WITH_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}
228
CONFIGURE_ARGS+=	--enable-modules="${APACHE_MODULES:O:tl}"
229
.else
230
CONFIGURE_ARGS+=	--enable-mods-shared="${APACHE_MODULES:O:tl}"
231
.endif
232
233
# ====================================
234
# start pkg-plist adjustments
235
.if defined(WITH_STATIC_MODULES)
236
.for module in ${APACHE_MODULES}
237
.	if !${WITH_STATIC_MODULES:M${module}}
238
_SHARED_MODULES+=	${module}
239
.	endif
240
.endfor
241
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
256
.if ${PORT_OPTIONS:MSUEXEC}
257
PLIST_SUB+=	SUEXEC=""
258
.else
259
PLIST_SUB+=	SUEXEC="@comment "
260
.endif
261
262
.if ${PORT_OPTIONS:MLOG_FORENSIC}
263
PLIST_SUB+=	FORENSIC=""
264
.else
265
PLIST_SUB+=	FORENSIC="@comment "
266
.endif
267
268
# end pkg-plist adjustments
269
270
#### End of AP_PORT_IS_SERVER ####
271
272
# ===============================================================
273
.elif defined(AP_PORT_IS_MODULE) || defined(USE_APACHE_RUN) || defined(USE_APACHE_BUILD)
274
APXS?=		${LOCALBASE}/sbin/apxs
275
HTTPD?=		${LOCALBASE}/sbin/httpd
276
277
MODULENAME?=	${PORTNAME}
278
SHORTMODNAME?=	${MODULENAME:S/mod_//}
279
SRC_FILE?=	${MODULENAME}.c
280
281
.if exists(${HTTPD})
282
_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
286
287
.if defined(USE_APACHE)
288
_USE_APACHE:=	${USE_APACHE}
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
294
295
_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/}
297
_APACHE_VERSION_MINIMUM:=	${_APACHE_VERSION_MINIMUM_TMP:M[1-9][0-9]}
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
301
# ==============================================================
302
# num+
303
.if ${_USE_APACHE:M*+}
304
_APACHE_WANTED_VERSIONS=	${DEFAULT_APACHE_VERSION}
305
306
# -num
307
.elif ${_USE_APACHE:M\-[0-9][0-9]}
308
.for _v in ${APACHE_SUPPORTED_VERSION:O}
309
.	if ${_APACHE_VERSION_MAXIMUM} >= ${_v}
310
_APACHE_WANTED_VERSIONS+=	${_v}
311
.	endif
312
.endfor
313
314
# num-num
315
.elif ${_USE_APACHE:M[0-9][0-9]-[0-9][0-9]}
316
.for _v in ${APACHE_SUPPORTED_VERSION}
317
.	if ${_APACHE_VERSION_MINIMUM} <= ${_v} && ${_APACHE_VERSION_MAXIMUM} >= ${_v}
318
_APACHE_WANTED_VERSIONS+=	${_v}
319
.	endif
320
.endfor
321
322
# num
323
.elif ${_USE_APACHE:M[0-9][0-9]}
324
_APACHE_WANTED_VERSIONS=	${_USE_APACHE:M[0-9][0-9]}
325
.endif
326
# ==============================================================
327
328
.if !defined(_APACHE_WANTED_VERSIONS)
329
_APACHE_WANTED_VERSIONS=	${DEFAULT_APACHE_VERSION}
330
.endif
331
332
.for _v in ${_APACHE_WANTED_VERSIONS:O:u}
333
_APACHE_HIGHEST_VERSION:=	${_v}
334
.	if defined (_APACHE_VERSION) && ${_APACHE_VERSION} == ${_v}
335
_APACHE_WANTED_VERSION:=	${_v}
336
.	endif
337
.endfor
338
339
.if !defined(_APACHE_WANTED_VERSION)
340
# next line is broken on 8.x and 9.x but working on 10
341
#_APACHE_WANTED_VERSION:=	${_APACHE_WANTED_VERSIONS:O:u:M${DEFAULT_APACHE_VERSION}}
342
# working line on 8.x, 9.x, 10
343
_APACHE_WANTED_VERSION:=	${_APACHE_WANTED_VERSIONS:O:u:MDEFAULT_APACHE_VERSION}
344
.	if empty(_APACHE_WANTED_VERSION)
345
_APACHE_WANTED_VERSION:=	${_APACHE_HIGHEST_VERSION}
346
.	endif
347
.endif
348
349
.if defined(_APACHE_VERSION) && ${_APACHE_VERSION} != ${_APACHE_WANTED_VERSION}
350
BROKEN=	${_ERROR_MSG} apache${_APACHE_VERSION} is installed (or APACHE_PORT is defined) and port requires apache${_APACHE_VERSION_NONSUPPORTED}
351
.endif
352
353
APACHE_VERSION:=	${_APACHE_WANTED_VERSION}
354
355
.if exists(${APXS})
356
APXS_PREFIX!=	${APXS} -q prefix 2> /dev/null || echo NULL
357
.	if ${APXS_PREFIX} == NULL
358
IGNORE=	: Your apache does not support DSO modules
359
.	endif
360
.	if defined(AP_GENPLIST) && ${APXS_PREFIX} != ${PREFIX}
361
IGNORE?=	PREFIX must be equal to APXS_PREFIX.
362
.	endif
363
.endif
364
365
APACHEMODDIR=	libexec/apache${APACHE_VERSION}
366
APACHEINCLUDEDIR=include/apache${APACHE_VERSION}
367
APACHEETCDIR=	etc/apache${APACHE_VERSION}
368
APACHE_PORT?=	www/apache${APACHE_VERSION}
369
370
PLIST_SUB+=	APACHEMODDIR="${APACHEMODDIR}" \
371
		APACHEINCLUDEDIR="${APACHEINCLUDEDIR}" \
372
		APACHEETCDIR="${APACHEETCDIR}" \
373
		APACHE_VERSION="${APACHE_VERSION}"
374
375
SUB_LIST+=	APACHEMODDIR="${APACHEMODDIR}" \
376
		APACHEETCDIR="${APACHEETCDIR}" \
377
		APACHE_VERSION="${APACHE_VERSION}"
378
379
APACHE_PKGNAMEPREFIX=	ap${APACHE_VERSION}-
380
381
.if defined(AP_FAST_BUILD)
382
PKGNAMEPREFIX?=	${APACHE_PKGNAMEPREFIX}
383
.endif
384
385
.if defined(USE_APACHE) || defined(USE_APACHE_BUILD)
386
BUILD_DEPENDS+=	${APXS}:${APACHE_PORT}
387
.endif
388
389
.if defined(USE_APACHE) || defined(USE_APACHE_RUN)
390
RUN_DEPENDS+=	${APXS}:${APACHE_PORT}
391
.endif
392
393
PLIST_SUB+=	AP_NAME="${SHORTMODNAME}"
394
PLIST_SUB+=	AP_MODULE="${MODULENAME}.so"
395
396
.if defined(AP_GENPLIST)
397
PLIST?=		${WRKDIR}/ap-plist
398
.endif
399
400
.if defined(AP_INC)
401
AP_EXTRAS+=	-I ${AP_INC}
402
.endif
403
.if defined(AP_LIB)
404
AP_EXTRAS+=	-L ${AP_LIB}
405
.endif
406
407
.endif # End of AP_PORT_IS_SERVER   / AP_PORT_IS_MOULE
408
.endif # End of !Apache_Pre_Include
409
410
# ===============================================================
411
.if defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include)
412
Apache_Post_Include=	bsd.apache.mk
413
414
.if defined(USE_APACHE_RUN) && !empty(USE_APACHE_RUN)
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
421
422
.if defined(USE_APACHE_BUILD) && !empty(USE_APACHE_BUILD)
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)
443
print-closest-mirrors:
444
	@${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2
445
	@MIRRORS=`${FETCH_CMD} -T 30 -qo - http://www.apache.org/dyn/closer.cgi/httpd/ 2> /dev/null\
446
	| ${GREP} /httpd/ | ${SED} 's/.*href="\(.*\)"><str.*/\1/g' | \
447
	${HEAD} -7 | ${TAIL} -6` ; \
448
	${ECHO_MSG} done >&2; if [ "x$$MIRRORS" != "x" ]; then \
449
	${ECHO_MSG} -n "MASTER_SITE_APACHE_HTTPD?= ";\
450
	${ECHO_MSG} $$MIRRORS; else \
451
	${ECHO_MSG} "No mirrors found!">&2 ; fi
452
.endif
453
454
.if !target(show-modules)
455
show-modules:
456
.if !empty(APACHE_MODULES)
457
.for module in ${AVAILABLE_MODULES}
458
	@${PRINTF} "%-20s : " ${module}
459
.	if ${APACHE_MODULES:M${module}}
460
		@${ECHO} -n "enabled "
461
.		if !empty(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M${module}}
462
			@${ECHO_CMD} " (static)"
463
.		else
464
			@${ECHO_CMD} "(shared)"
465
.		endif
466
.	else
467
		@${ECHO_CMD} disabled
468
.	endif
469
.endfor
470
.else
471
.for module in ${AVAILABLE_MODULES}
472
	@${PRINTF} "%-20s : disabled\n" ${module}
473
.endfor
474
.endif
475
.endif
476
477
.elif defined(AP_PORT_IS_MODULE)
478
479
.if defined(AP_MODENABLE)
480
AP_MOD_EN=	-a
481
.else
482
AP_MOD_EN=	-A
483
.endif
484
PLIST_SUB+=	AP_MOD_EN="${AP_MOD_EN}"
485
486
.if defined(AP_FAST_BUILD)
487
.if !target(ap-gen-plist)
488
_USES_build+=	490:ap-gen-plist
489
ap-gen-plist:
490
.if defined(AP_GENPLIST)
491
.	if !exists(${PLIST})
492
	@${ECHO} "===>  Generating apache plist"
493
	@${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST}
494
	@${ECHO} "@postexec %D/sbin/apxs -e ${AP_MOD_EN} -n %%AP_NAME%% %D/%F" >> ${PLIST}
495
	@${ECHO} "@postunexec ${SED} -i '' -E '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' %D/%%APACHEETCDIR%%/httpd.conf" >> ${PLIST}
496
	@${ECHO} "@postunexec echo \"Don't forget to remove all ${MODULENAME}-related directives in your httpd.conf\"">> ${PLIST}
497
.	endif
498
.endif
499
.endif
500
501
.if !target(do-build)
502
do-build:
503
	(cd ${WRKSRC} && ${APXS} -c ${AP_EXTRAS} -o ${MODULENAME}.la ${SRC_FILE})
504
.endif
505
506
.if !target(do-install)
507
do-install:
508
	@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}
509
	${APXS} -S LIBEXECDIR=${STAGEDIR}${PREFIX}/${APACHEMODDIR} -i -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.la
510
.	if !defined(DEBUG)
511
		@${ECHO_MSG} "===> strip ${APACHEMODDIR}/${MODULENAME}.so"
512
		@[ -e ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so ] && ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so
513
.	else
514
		@${ECHO_MSG} "===> DEBUG is set, will not strip ${APACHEMODDIR}/${MODULENAME}.so"
515
.	endif
516
.endif
517
518
.endif          # defined(AP_FAST_BUILD)
519
.endif          # defined(AP_PORT_IS_SERVER / AP_PORT_IS_MODULE)
520
.endif          # defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include)
(-)Mk/Uses/apache.mk (-253 / +166 lines)
Lines 1-131 Link Here
1
#-*- tab-width: 4; -*-
2
# ex:ts=4
3
#
1
# $FreeBSD$
4
# $FreeBSD$
2
#
5
#
3
# bsd.apache.mk - Apache related macros.
6
# apache.mk - Apache related macros.
4
# Author: Clement Laforet <clement@FreeBSD.org>
7
# Author: Clement Laforet <clement@FreeBSD.org>
5
# Author: Olli Hauer <ohauer@FreeBSD.org>
8
# Author: Olli Hauer <ohauer@FreeBSD.org>
9
# Author: Bernard Spil <brnrd@FreeSBD.org>
6
#
10
#
7
# Please view me with 4 column tabs!
11
# Please view me with 4 column tabs!
8
12
9
# =========================================================================
13
# Feature:		apache
10
# User controlled parameters for usage in /etc/make.conf:
14
# Usage:		USES=apache or USES=apache:args
15
# Valid args:	<version>, build, run, server
11
#
16
#
12
#  DEFAULT_VERSIONS  - define the default apache version
17
# version	If your port requires a specific Apache httpd version, you can
13
#                      valid args: apache=2.2, apache=2.4
18
#			set this to [min]-[max] or min+ or -max or an explicit version
14
#
19
#
15
#  APACHE_PORT       - use www/apache22-(event|itk|peruser|worker)-mpm
20
#				USES=apache:2.2		# Only use Apache 2.2
16
#                      instead www/apache22.  Use this parameter only in
21
#				USES=apache:2.4+	# Use Apache 2.4 or newer
17
#                      combination with "DEFAULT_VERSIONS+= apache=2.2"
22
#				USES=apache:2.2-2.4	# Use Apache 2.2 or 2.4
23
#				USES=apache:-2.4	# Use Apache 2.4 or earlier
24
#				USES=apache			# Use the default apache version
18
#
25
#
19
# Example entry in /etc/make.conf:
26
#			Valid version numbers are specified in the variable
20
# - Set apache22 as default version
27
#			APACHE_SUPPORTED_VERSIONS below
21
#    DEFAULT_VERSIONS+= apache=2.2
22
#
28
#
23
# - Additional use a special www/apache22-$MPM port
29
# build		Indicates that Apache is needed at build time and adds it to
24
#    APACHE_PORT= www/apache22-event-mpm
30
#			BUILD_DEPENDS.
31
# run		Indicates that Apache is needed at run time and adds it to
32
#			RUN_DEPENDS.
33
# server	Indicates that the port is a server port.
25
#
34
#
26
# Note:
35
# 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!
36
# 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
#
37
#
31
# =========================================================================
38
# Variables, which can be set by the port:
32
#
39
#
33
# This script will be included if one of the following parameter
40
#  AP_FAST_BUILD	automatic module build
34
# is defined in the Makefile of the port
35
#
41
#
36
# USE_APACHE         - Set apache and apxs as build and run dependency
42
#  AP_GENPLIST		automatic PLIST generation plus add
37
# USE_APACHE_BUILD   - Set apache and apxs as build dependency
43
#					the module disabled into httpd.conf
38
# USE_APACHE_RUN     - Set apache and apxs as run dependency
44
#					(only if no pkg-plist exist)
39
#
45
#
40
# The following example is representative of all three possible
46
#  MODULENAME		Name of the Apache module
41
# parameters to use.
47
#					default: ${PORTNAME}
48
#  SHORTMODNAME		Short name of the Apache module
49
#					default: ${MODULENAME:S/mod_//}
50
#  SRC_FILE			Source file of the APACHE MODULE
51
#					default: ${MODULENAME}.c
42
#
52
#
43
# Examples:
53
# Variables, for internal use by the Apache ports framework only
44
#  USE_APACHE= 22       # specify exact version
54
#  The following values for USE_APACHE are reserved and only valid
45
#  USE_APACHE= 22+      # specify [min] version, no [max] version
55
#  in apache-server ports!
46
#  USE_APACHE= 22-24    # specify [min]-[max] range
56
#      USES= apache:server,2.2
47
#  USE_APACHE= -22      # specify [max] version, no [min] version
48
#
57
#
49
# Note:
50
#  - If "+" is specified and no apache is installed, then
51
#    ${DEFAULT_APACHE_VERSION} will be used.
52
#
58
#
53
#  - Valid version numbers are specified in the variable
59
# The following variables can be read by ports and must not be modified
54
#    APACHE_SUPPORTED_VERSION below
60
# 
61
#  APACHE_VERSION		The major-minor release version of the chosen
62
#						Apache server, e.g. 2.2 or 2.4
55
#
63
#
56
#  - The following values for USE_APACHE are reserverd and only valid
64
#  APACHEETCDIR			Location of the Apache configuration directory
57
#    in apache-server ports!
65
#						Default: ${LOCALBASE}/etc/apache24
58
#      USE_APACHE= common22
59
#
66
#
67
#  APACHEINCLUDEDIR		Location of the Apache include files
68
#						Default: ${LOCALBASE}/include/apache24
60
#
69
#
61
# The following variables can be used (ro) in ports Makefile
70
#  APACHEMODDIR			Location of the Apache modules
62
# =========================================================================
71
#						Default: ${LOCALBASE}/libxexec/apache24
63
#  - APACHE_VERSION
64
#  - APACHEETCDIR
65
#  - APACHEINCLUDEDIR
66
#  - APACHEMODDIR
67
#  - DEFAULT_APACHE_VERSION
68
#
72
#
73
#  APACHE_DEFAULT		Default Apache version
69
#
74
#
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
75
84
.if !defined(Apache_Pre_Include)
76
.if !defined(_INCLUDE_USES_APACHE_PRE_MK)
77
_INCLUDE_USES_APACHE_PRE_MK=	yes
78
_USES_POST+=	apache
85
79
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/.//}
93
# When adding a version, please keep the comment in
80
# When adding a version, please keep the comment in
94
# Mk/bsd.default-versions.mk in sync.
81
# Mk/bsd.default-versions.mk in sync.
95
APACHE_SUPPORTED_VERSION=	24 22 # preferred version first
82
_APACHE_SUPPORTED_VERSIONS=	2.4 2.2 2.5	# preferred version first
96
83
97
# Print warnings
84
# Print warnings
98
_ERROR_MSG=	: Error from bsd.apache.mk.
85
_ERROR_MSG=	: Error from apache.mk.
99
86
100
# Important Note:
87
# Important Note:
101
#  Keep apache version in ascending order!
102
#  The "+" sign is only valid as last sign, not between
88
#  The "+" sign is only valid as last sign, not between
103
#  two versions or in combination with range!
89
#  two versions or in combination with range!
104
.if defined(USE_APACHE) && !empty(USE_APACHE)
90
.if defined(apache_ARGS) && !empty(apache_ARGS)
105
.	if ${USE_APACHE:Mcommon*} != ""
91
# Preserve original arguments list
106
AP_PORT_IS_SERVER=	yes
92
_APACHE_ARGS=		${apache_ARGS}
107
.	elif ${USE_APACHE:C/\-//:S/^22//:S/^24//:C/\+$//} == ""
93
.	if ${_APACHE_ARGS:Mserver}
108
AP_PORT_IS_MODULE=	yes
94
_APACHE_PORT_IS_SERVER=	yes
109
.		if ${USE_APACHE:C/\-//:S/^22//:S/^24//} == "+"
95
_APACHE_ARGS:=		${_APACHE_ARGS:Nserver}
110
AP_PLUS=	yes
111
.		endif
112
.	else
113
IGNORE=	${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
114
.	endif
96
.	endif
115
# Catch unknown apache versions and silly USE_APACHE constructs
97
.	if ${_APACHE_ARGS:Mbuild}
116
.	if empty(AP_PORT_IS_SERVER) && empty(AP_PORT_IS_MODULE)
98
_APACHE_BUILD_DEP=	yes
117
IGNORE=	${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
99
_APACHE_ARGS:=		${_APACHE_ARGS:Nbuild}
118
.	endif
100
.	endif
119
# Catch USE_APACHE [min]-[max]+
101
.	if ${_APACHE_ARGS:Mrun}
120
.	if defined(AP_PLUS) && ${USE_APACHE:C/[.+0-9]//g} == "-"
102
_APACHE_RUN_DEP=	yes
121
IGNORE=	${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
103
_APACHE_ARGS:=		${_APACHE_ARGS:Nrun}
122
.	endif
104
.	endif
123
.elif defined(USE_APACHE)
105
.	if empty(_APACHE_ARGS)
124
IGNORE=	${_ERROR_MSG} Illegal use of USE_APACHE ( no version specified )
106
_APACHE_ARGS=		${APACHE_DEFAULT}
125
.endif # defined(USE_APACHE)
107
.	endif
108
# _APACHE_ARGS must now contain a version(-range)
109
.	if !empty(_APACHE_ARGS:C/^2\.[0-9]//:S/^-//:C/^2\.[0-9]//:C/\+$//) 
110
IGNORE= ${_ERROR_MSG} Illegal use of USES= ${USES:Mapache*}
111
# Catch USES= apache:[min]-[max]+
112
.	elif ${apache_ARGS:C/[.a-z0-9]//g} == "-+"
113
IGNORE= ${_ERROR_MSG} Illegal use of USES= ${USES:Mapache*}
114
.	endif
115
.endif # defined(apache_ARGS)
126
116
117
# The port does not specify a build, run or server dependency, assume both
118
# build and run are required.
119
.if !defined(_APACHE_BUILD_DEP) && !defined(_APACHE_RUN_DEP) && \
120
	!defined(_APACHE_PORT_IS_SERVER)
121
_APACHE_BUILD_DEP=	yes
122
_APACHE_RUN_DEP=	yes
123
.endif
124
125
.if defined(DEFAULT_APACHE_VER)
126
IGNORE+=	"DEFAULT_APACHE_VER is defined, consider using DEFAULT_VERSIONS+=apache=${DEFAULT_APACHE_VER} instead"
127
.endif
128
129
.if defined(WITH_MODULES) || defined(WITHOUT_MODULES)
130
IGNORE=	${_ERROR_MSG} WITH(OUT)_MODULES has been removed, use www_${PORTNAME}_(UN)SET
131
.endif
132
127
# ===============================================================
133
# ===============================================================
128
.if defined(AP_PORT_IS_SERVER)
134
.if defined(_APACHE_PORT_IS_SERVER)
135
129
# Module selection
136
# Module selection
130
.for category in ${DEFAULT_MODULES_CATEGORIES}
137
.for category in ${DEFAULT_MODULES_CATEGORIES}
131
DEFAULT_MODULES+=	${${category}_MODULES}
138
DEFAULT_MODULES+=	${${category}_MODULES}
Lines 135-171 Link Here
135
AVAILABLE_MODULES+=	${${category}_MODULES}
142
AVAILABLE_MODULES+=	${${category}_MODULES}
136
.endfor
143
.endfor
137
144
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
145
# OPTIONS handling
158
.for module in ${AVAILABLE_MODULES}
146
.for module in ${AVAILABLE_MODULES}
159
.	if ${PORT_OPTIONS:M${module}}
147
.	if ${PORT_OPTIONS:M${module}}
160
_APACHE_MODULES+=	${module}
148
_APACHE_ENABLED_MODS+=	${module}
161
.	else
149
.	else
162
WITHOUT_MODULES+=	${module}
150
_APACHE_DISABLED_MODS+=	${module}
163
.	endif
151
.	endif
164
.endfor
152
.endfor
165
153
166
.if !defined(WITH_STATIC_APACHE)
154
.if !defined(WITH_STATIC_APACHE)
167
# FYI
168
#DYNAMIC_MODULES=	so
169
CONFIGURE_ARGS+=	--enable-so
155
CONFIGURE_ARGS+=	--enable-so
170
.else
156
.else
171
CONFIGURE_ARGS+=	--disable-so
157
CONFIGURE_ARGS+=	--disable-so
Lines 173-179 Link Here
173
.endif
159
.endif
174
160
175
.if ${PORT_OPTIONS:MSUEXEC}
161
.if ${PORT_OPTIONS:MSUEXEC}
176
_APACHE_MODULES+=	${SUEXEC_MODULES}
162
_APACHE_ENABLED_MODS+=	${SUEXEC_MODULES}
177
SUEXEC_CONFARGS=	with-suexec
163
SUEXEC_CONFARGS=	with-suexec
178
164
179
# SUEXEC_DOCROOT should exist
165
# SUEXEC_DOCROOT should exist
Lines 204-257 Link Here
204
.	endif
190
.	endif
205
.endif
191
.endif
206
192
207
.if !defined(WITHOUT_MODULES)
193
.if !defined(_APACHE_DISABLED_MODS)
208
APACHE_MODULES=		${_APACHE_MODULES}
194
APACHE_MODULES=		${_APACHE_ENABLED_MODS}
209
.else
195
.else
210
.for module in ${_APACHE_MODULES:O:u}
196
.for module in ${_APACHE_ENABLED_MODS:O:u}
211
.	if !${WITHOUT_MODULES:M${module}}
197
.	if !${_APACHE_DISABLED_MODS:M${module}}
212
APACHE_MODULES+=	${module}
198
APACHE_MODULES+=	${module}
213
.	endif
199
.	endif
214
.endfor
200
.endfor
215
.endif
201
.endif
216
202
217
.if defined(WITH_STATIC_MODULES)
203
.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}
204
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
205
.endif
232
206
233
# ====================================
207
.for module in ${AVAILABLE_MODULES}
234
# start pkg-plist adjustments
208
.	if !empty(WITH_STATIC_MODULES:M${module})
235
.if defined(WITH_STATIC_MODULES)
209
CONFIGURE_ARGS+=	--enable-${module:tl}=static
236
.for module in ${APACHE_MODULES}
210
PLIST_SUB+=	MOD_${module}="@comment "
237
.	if !${WITH_STATIC_MODULES:M${module}}
211
.	elif !empty(APACHE_MODULES:M${module})
238
_SHARED_MODULES+=	${module}
212
CONFIGURE_ARGS+=	--enable-${module:tl}=shared
213
PLIST_SUB+=	MOD_${module}=""
214
.	else
215
CONFIGURE_ARGS+=	--disable-${module:tl}
216
PLIST_SUB+=	MOD_${module}="@comment "
239
.	endif
217
.	endif
240
.endfor
218
.endfor
241
219
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
220
# pkg-plist workaround STATIC support
256
.if ${PORT_OPTIONS:MSUEXEC}
221
.if ${PORT_OPTIONS:MSUEXEC}
257
PLIST_SUB+=	SUEXEC=""
222
PLIST_SUB+=	SUEXEC=""
Lines 265-277 Link Here
265
PLIST_SUB+=	FORENSIC="@comment "
230
PLIST_SUB+=	FORENSIC="@comment "
266
.endif
231
.endif
267
232
268
# end pkg-plist adjustments
233
#### End of _APACHE_PORT_IS_SERVER ####
269
234
270
#### End of AP_PORT_IS_SERVER ####
271
272
# ===============================================================
235
# ===============================================================
273
.elif defined(AP_PORT_IS_MODULE) || defined(USE_APACHE_RUN) || defined(USE_APACHE_BUILD)
236
.else
274
APXS?=		${LOCALBASE}/sbin/apxs
275
HTTPD?=		${LOCALBASE}/sbin/httpd
237
HTTPD?=		${LOCALBASE}/sbin/httpd
276
238
277
MODULENAME?=	${PORTNAME}
239
MODULENAME?=	${PORTNAME}
Lines 279-357 Link Here
279
SRC_FILE?=	${MODULENAME}.c
241
SRC_FILE?=	${MODULENAME}.c
280
242
281
.if exists(${HTTPD})
243
.if exists(${HTTPD})
282
_APACHE_VERSION!=	${HTTPD} -v | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p'
244
_APACHE_VERSION!=	${HTTPD} -v | ${SED} -ne 's/^Server version: Apache\/\([1-9]\.[0-9]*\).*/\1/p'
283
.elif defined(APACHE_PORT)
284
_APACHE_VERSION!=	${ECHO_CMD} ${APACHE_PORT} | ${SED} -ne 's,.*/apache\([0-9]*\).*,\1,p'
285
.endif
245
.endif
286
246
287
.if defined(USE_APACHE)
247
# Validate Apache version whether it meets the version restriction.
288
_USE_APACHE:=	${USE_APACHE}
248
_APACHE_VERSION_CHECK:=		${_APACHE_ARGS:C/^([1-9]\.[0-9])$/\1-\1/}
289
.elif defined(USE_APACHE_BUILD)
249
_APACHE_VERSION_MIN_TMP:=	${_APACHE_VERSION_CHECK:C/([1-9]\.[0-9])[-+].*/\1/}
290
_USE_APACHE:=	${USE_APACHE_BUILD}
250
_APACHE_VERSION_MIN:=		${_APACHE_VERSION_MIN_TMP:M[1-9].[0-9]}
291
.elif defined(USE_APACHE_RUN)
251
_APACHE_VERSION_MAX_TMP:=	${_APACHE_VERSION_CHECK:C/.*-([1-9]\.[0-9])/\1/}
292
_USE_APACHE:=	${USE_APACHE_RUN}
252
_APACHE_VERSION_MAX:=		${_APACHE_VERSION_MAX_TMP:M[1-9].[0-9]}
293
.endif
294
253
295
_APACHE_VERSION_CHECK:=		${_USE_APACHE:C/^([1-9][0-9])$/\1-\1/}
254
# Remove from _WANTED_VERSIONS that which is not wanted
296
_APACHE_VERSION_MINIMUM_TMP:=	${_APACHE_VERSION_CHECK:C/([1-9][0-9])[-+].*/\1/}
255
_APACHE_WANTED_VERSIONS=	${_APACHE_SUPPORTED_VERSIONS}
297
_APACHE_VERSION_MINIMUM:=	${_APACHE_VERSION_MINIMUM_TMP:M[1-9][0-9]}
256
.for _ver in ${_APACHE_SUPPORTED_VERSIONS:O}
298
_APACHE_VERSION_MAXIMUM_TMP:=	${_APACHE_VERSION_CHECK:C/.*-([1-9][0-9])/\1/}
257
.	if !empty(_APACHE_VERSION_MIN) && ${_ver} < ${_APACHE_VERSION_MIN}
299
_APACHE_VERSION_MAXIMUM:=	${_APACHE_VERSION_MAXIMUM_TMP:M[1-9][0-9]}
258
_APACHE_WANTED_VERSIONS:=	${_APACHE_WANTED_VERSIONS:N${_ver}}
300
301
# ==============================================================
302
# num+
303
.if ${_USE_APACHE:M*+}
304
_APACHE_WANTED_VERSIONS=	${DEFAULT_APACHE_VERSION}
305
306
# -num
307
.elif ${_USE_APACHE:M\-[0-9][0-9]}
308
.for _v in ${APACHE_SUPPORTED_VERSION:O}
309
.	if ${_APACHE_VERSION_MAXIMUM} >= ${_v}
310
_APACHE_WANTED_VERSIONS+=	${_v}
311
.	endif
259
.	endif
312
.endfor
260
.	if !empty(_APACHE_VERSION_MAX) && ${_ver} > ${_APACHE_VERSION_MAX}
313
261
_APACHE_WANTED_VERSIONS:=	${_APACHE_WANTED_VERSIONS:N${_ver}}		
314
# num-num
315
.elif ${_USE_APACHE:M[0-9][0-9]-[0-9][0-9]}
316
.for _v in ${APACHE_SUPPORTED_VERSION}
317
.	if ${_APACHE_VERSION_MINIMUM} <= ${_v} && ${_APACHE_VERSION_MAXIMUM} >= ${_v}
318
_APACHE_WANTED_VERSIONS+=	${_v}
319
.	endif
262
.	endif
320
.endfor
263
.endfor
321
264
322
# num
265
# Check if installed Apache version matches a wanted version
323
.elif ${_USE_APACHE:M[0-9][0-9]}
266
.if defined(_APACHE_VERSION) && $(_APACHE_WANTED_VERSIONS:M${_APACHE_VERSION})
324
_APACHE_WANTED_VERSIONS=	${_USE_APACHE:M[0-9][0-9]}
267
_APACHE_WANTED_VERSION=	${_APACHE_VERSION}
325
.endif
268
.endif
326
# ==============================================================
269
# Select Apache version if not already set
327
270
.for _ver in ${APACHE_DEFAULT} ${_APACHE_SUPPORTED_VERSIONS}
328
.if !defined(_APACHE_WANTED_VERSIONS)
271
.	if !defined(_APACHE_WANTED_VERSION) && ${_APACHE_WANTED_VERSIONS:M${_ver}}
329
_APACHE_WANTED_VERSIONS=	${DEFAULT_APACHE_VERSION}
272
_APACHE_WANTED_VERSION=	${_ver}
330
.endif
331
332
.for _v in ${_APACHE_WANTED_VERSIONS:O:u}
333
_APACHE_HIGHEST_VERSION:=	${_v}
334
.	if defined (_APACHE_VERSION) && ${_APACHE_VERSION} == ${_v}
335
_APACHE_WANTED_VERSION:=	${_v}
336
.	endif
273
.	endif
337
.endfor
274
.endfor
338
275
339
.if !defined(_APACHE_WANTED_VERSION)
276
APACHE_VERSION:=	${_APACHE_WANTED_VERSION}
340
# next line is broken on 8.x and 9.x but working on 10
277
341
#_APACHE_WANTED_VERSION:=	${_APACHE_WANTED_VERSIONS:O:u:M${DEFAULT_APACHE_VERSION}}
278
.if defined(_APACHE_VERSION) && ${_APACHE_VERSION} != ${APACHE_VERSION}
342
# working line on 8.x, 9.x, 10
279
BROKEN=	${_ERROR_MSG} Apache ${_APACHE_VERSION} is installed and port requires ${_APACHE_WANTED_VERSION}
343
_APACHE_WANTED_VERSION:=	${_APACHE_WANTED_VERSIONS:O:u:MDEFAULT_APACHE_VERSION}
344
.	if empty(_APACHE_WANTED_VERSION)
345
_APACHE_WANTED_VERSION:=	${_APACHE_HIGHEST_VERSION}
346
.	endif
347
.endif
280
.endif
348
281
349
.if defined(_APACHE_VERSION) && ${_APACHE_VERSION} != ${_APACHE_WANTED_VERSION}
282
.if ${APACHE_VERSION} >= 2.5
350
BROKEN=	${_ERROR_MSG} apache${_APACHE_VERSION} is installed (or APACHE_PORT is defined) and port requires apache${_APACHE_VERSION_NONSUPPORTED}
283
APXS?=	${LOCALBASE}/bin/apxs
284
.else
285
APXS?=	${LOCALBASE}/sbin/apxs
351
.endif
286
.endif
352
287
353
APACHE_VERSION:=	${_APACHE_WANTED_VERSION}
354
355
.if exists(${APXS})
288
.if exists(${APXS})
356
APXS_PREFIX!=	${APXS} -q prefix 2> /dev/null || echo NULL
289
APXS_PREFIX!=	${APXS} -q prefix 2> /dev/null || echo NULL
357
.	if ${APXS_PREFIX} == NULL
290
.	if ${APXS_PREFIX} == NULL
Lines 362-371 Link Here
362
.	endif
295
.	endif
363
.endif
296
.endif
364
297
365
APACHEMODDIR=	libexec/apache${APACHE_VERSION}
298
APACHEMODDIR=		libexec/apache${APACHE_VERSION:S/.//}
366
APACHEINCLUDEDIR=include/apache${APACHE_VERSION}
299
APACHEINCLUDEDIR=	include/apache${APACHE_VERSION:S/.//}
367
APACHEETCDIR=	etc/apache${APACHE_VERSION}
300
APACHEETCDIR=		etc/apache${APACHE_VERSION:S/.//}
368
APACHE_PORT?=	www/apache${APACHE_VERSION}
301
.if ${APACHE_VERSION} == 2.5
302
APACHE_PORT?=		www/apache${APACHE_VERSION:S/.//}-devel
303
.else
304
APACHE_PORT?=		www/apache${APACHE_VERSION:S/.//}
305
.endif
369
306
370
PLIST_SUB+=	APACHEMODDIR="${APACHEMODDIR}" \
307
PLIST_SUB+=	APACHEMODDIR="${APACHEMODDIR}" \
371
		APACHEINCLUDEDIR="${APACHEINCLUDEDIR}" \
308
		APACHEINCLUDEDIR="${APACHEINCLUDEDIR}" \
Lines 376-392 Link Here
376
		APACHEETCDIR="${APACHEETCDIR}" \
313
		APACHEETCDIR="${APACHEETCDIR}" \
377
		APACHE_VERSION="${APACHE_VERSION}"
314
		APACHE_VERSION="${APACHE_VERSION}"
378
315
379
APACHE_PKGNAMEPREFIX=	ap${APACHE_VERSION}-
316
APACHE_PKGNAMEPREFIX=	ap${APACHE_VERSION:S/.//}-
380
317
381
.if defined(AP_FAST_BUILD)
318
.if defined(AP_FAST_BUILD)
382
PKGNAMEPREFIX?=	${APACHE_PKGNAMEPREFIX}
319
PKGNAMEPREFIX?=	${APACHE_PKGNAMEPREFIX}
383
.endif
320
.endif
384
321
385
.if defined(USE_APACHE) || defined(USE_APACHE_BUILD)
322
.if defined(_APACHE_BUILD_DEP)
386
BUILD_DEPENDS+=	${APXS}:${APACHE_PORT}
323
BUILD_DEPENDS+=	${APXS}:${APACHE_PORT}
387
.endif
324
.endif
388
325
389
.if defined(USE_APACHE) || defined(USE_APACHE_RUN)
326
.if defined(_APACHE_RUN_DEP)
390
RUN_DEPENDS+=	${APXS}:${APACHE_PORT}
327
RUN_DEPENDS+=	${APXS}:${APACHE_PORT}
391
.endif
328
.endif
392
329
Lines 404-444 Link Here
404
AP_EXTRAS+=	-L ${AP_LIB}
341
AP_EXTRAS+=	-L ${AP_LIB}
405
.endif
342
.endif
406
343
407
.endif # End of AP_PORT_IS_SERVER   / AP_PORT_IS_MOULE
344
.endif # End of _APACHE_PORT_IS_SERVER / _APACHE_PORT_IS_MOULE
408
.endif # End of !Apache_Pre_Include
345
.endif # End of !_INCLUDE_USES_APACHE_PRE_MK
409
346
410
# ===============================================================
347
# ===============================================================
411
.if defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include)
348
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_APACHE_POST_MK)
412
Apache_Post_Include=	bsd.apache.mk
349
_INCLUDE_USES_APACHE_POST_MK=	apache.mk
413
350
.if defined(NO_BUILD) && !defined(_APACHE_RUN_DEP)
414
.if defined(USE_APACHE_RUN) && !empty(USE_APACHE_RUN)
351
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
352
.endif
421
353
422
.if defined(USE_APACHE_BUILD) && !empty(USE_APACHE_BUILD)
354
.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)
355
.if !target(print-closest-mirrors)
443
print-closest-mirrors:
356
print-closest-mirrors:
444
	@${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2
357
	@${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2
Lines 474-480 Link Here
474
.endif
387
.endif
475
.endif
388
.endif
476
389
477
.elif defined(AP_PORT_IS_MODULE)
390
.else
478
391
479
.if defined(AP_MODENABLE)
392
.if defined(AP_MODENABLE)
480
AP_MOD_EN=	-a
393
AP_MOD_EN=	-a
Lines 516-520 Link Here
516
.endif
429
.endif
517
430
518
.endif          # defined(AP_FAST_BUILD)
431
.endif          # defined(AP_FAST_BUILD)
519
.endif          # defined(AP_PORT_IS_SERVER / AP_PORT_IS_MODULE)
432
.endif          # defined(_APACHE_PORT_IS_SERVER / _APACHE_PORT_IS_MODULE)
520
.endif          # defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include)
433
.endif          # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_APACHE_PRE_MK)
(-)Mk/bsd.port.mk (-8 / +6 lines)
Lines 437-444 Link Here
437
#				  ${PREFIX}/etc/rc.d if ${PREFIX} is not /usr, otherwise they
437
#				  ${PREFIX}/etc/rc.d if ${PREFIX} is not /usr, otherwise they
438
#				  will be installed in /etc/rc.d/ and added to the packing list.
438
#				  will be installed in /etc/rc.d/ and added to the packing list.
439
##
439
##
440
# USE_APACHE	- If set, this port relies on an apache webserver.
441
#
442
# Conflict checking.  Use if your port cannot be installed at the same time as
440
# Conflict checking.  Use if your port cannot be installed at the same time as
443
# another package.
441
# another package.
444
#
442
#
Lines 1415-1422 Link Here
1415
.include "${PORTSDIR}/Mk/bsd.ocaml.mk"
1413
.include "${PORTSDIR}/Mk/bsd.ocaml.mk"
1416
.endif
1414
.endif
1417
1415
1418
.if defined(USE_APACHE) || defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN)
1416
.if defined(USE_APACHE_BUILD)
1419
.include "${PORTSDIR}/Mk/bsd.apache.mk"
1417
USES+=	apache:build,${USE_APACHE_BUILD:C/2([0-9])/2.\1/g}
1418
.elif defined(USE_APACHE_RUN)
1419
USES+=	apache:run,${USE_APACHE_RUN:C/2([0-9])/2.\1/g}
1420
.elif defined(USE_APACHE)
1421
USES+=	apache:${USE_APACHE:C/2([0-9])/2.\1/g}
1420
.endif
1422
.endif
1421
1423
1422
.if defined(USE_QT4) || defined(USE_QT5)
1424
.if defined(USE_QT4) || defined(USE_QT5)
Lines 1982-1991 Link Here
1982
.include "${PORTSDIR}/Mk/bsd.wx.mk"
1984
.include "${PORTSDIR}/Mk/bsd.wx.mk"
1983
.endif
1985
.endif
1984
1986
1985
.if defined(USE_APACHE) || defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN)
1986
.include "${PORTSDIR}/Mk/bsd.apache.mk"
1987
.endif
1988
1989
.if defined(USE_AUTOTOOLS)
1987
.if defined(USE_AUTOTOOLS)
1990
.include "${PORTSDIR}/Mk/bsd.autotools.mk"
1988
.include "${PORTSDIR}/Mk/bsd.autotools.mk"
1991
.endif
1989
.endif
(-)Mk/bsd.sanity.mk (-2 / +7 lines)
Lines 176-186 Link Here
176
		USE_PYTHON_PREFIX USE_BZIP2 USE_XZ USE_PGSQL NEED_ROOT \
176
		USE_PYTHON_PREFIX USE_BZIP2 USE_XZ USE_PGSQL NEED_ROOT \
177
		UNIQUENAME LATEST_LINK USE_SQLITE USE_FIREBIRD USE_PHPEXT \
177
		UNIQUENAME LATEST_LINK USE_SQLITE USE_FIREBIRD USE_PHPEXT \
178
		USE_ZENDEXT USE_PHP_BUILD USE_BDB PLIST_DIRSTRY USE_RCORDER \
178
		USE_ZENDEXT USE_PHP_BUILD USE_BDB PLIST_DIRSTRY USE_RCORDER \
179
		USE_OPENSSL WANT_GNOME
179
		USE_OPENSSL WANT_GNOME APACHE_PORT
180
SANITY_DEPRECATED=	PYTHON_PKGNAMESUFFIX USE_AUTOTOOLS \
180
SANITY_DEPRECATED=	PYTHON_PKGNAMESUFFIX USE_AUTOTOOLS \
181
			USE_MYSQL WANT_MYSQL_VER \
181
			USE_MYSQL WANT_MYSQL_VER \
182
			USE_PHPIZE WANT_PHP_CLI WANT_PHP_CGI WANT_PHP_MOD \
182
			USE_PHPIZE WANT_PHP_CLI WANT_PHP_CGI WANT_PHP_MOD \
183
			WANT_PHP_WEB WANT_PHP_EMB
183
			WANT_PHP_WEB WANT_PHP_EMB \
184
			USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN
184
SANITY_NOTNEEDED=	CMAKE_NINJA WX_UNICODE
185
SANITY_NOTNEEDED=	CMAKE_NINJA WX_UNICODE
185
186
186
USE_AUTOTOOLS_ALT=	USES=autoreconf and GNU_CONFIGURE=yes
187
USE_AUTOTOOLS_ALT=	USES=autoreconf and GNU_CONFIGURE=yes
Lines 237-242 Link Here
237
WANT_PHP_EMB_ALT=	USES=php:embed
238
WANT_PHP_EMB_ALT=	USES=php:embed
238
USE_RCORDER_ALT=	USE_RC_SUBR=${USE_RCORDER}
239
USE_RCORDER_ALT=	USE_RC_SUBR=${USE_RCORDER}
239
WANT_GNOME_ALT=		USES=gnome
240
WANT_GNOME_ALT=		USES=gnome
241
USE_APACHE_ALT=		USES=apache:${USE_APACHE:C/2(0-9)/2.\1/g}
242
USE_APACHE_BUILD_ALT=	USES=apache:build,${USE_APACHE_BUILD:C/2(0-9)/2.\1/g}
243
USE_APACHE_RUN_ALT=	USES=apache:run,${USE_APACHE_RUN:C/2(0-9)/2.\1/g}
244
APACHE_PORT_ALT=	DEFAULT_VERSIONS+=apache=${APACHE_PORT:S/www\/apache//:C/2(0-9)/2.\1/}
240
245
241
.for a in ${SANITY_DEPRECATED}
246
.for a in ${SANITY_DEPRECATED}
242
.if defined(${a})
247
.if defined(${a})
(-)Mk/Uses/php.mk (-1 / +1 lines)
Lines 206-212 Link Here
206
RUN_DEPENDS+=	${PHPBASE}/include/php/main/php.h:${PHP_PORT}
206
RUN_DEPENDS+=	${PHPBASE}/include/php/main/php.h:${PHP_PORT}
207
.  if  ${php_ARGS:Mmod} || (${php_ARGS:Mweb} && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "")
207
.  if  ${php_ARGS:Mmod} || (${php_ARGS:Mweb} && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "")
208
USE_APACHE_RUN=	22+
208
USE_APACHE_RUN=	22+
209
.include "${PORTSDIR}/Mk/bsd.apache.mk"
209
.include "${PORTSDIR}/Mk/Uses/apache.mk"
210
# libphpX.so only has the major version number in it, so remove the last digit of PHP_VER to get it.
210
# libphpX.so only has the major version number in it, so remove the last digit of PHP_VER to get it.
211
RUN_DEPENDS+=	${PHPBASE}/${APACHEMODDIR}/libphp${PHP_VER:C/.$//}.so:${MOD_PHP_PORT}
211
RUN_DEPENDS+=	${PHPBASE}/${APACHEMODDIR}/libphp${PHP_VER:C/.$//}.so:${MOD_PHP_PORT}
212
.  endif
212
.  endif
(-)www/apache22/Makefile (-2 / +1 lines)
Lines 26-33 Link Here
26
DEPRECATED=		Upstream propose EoL of apache 2.2.x during the next 12 months
26
DEPRECATED=		Upstream propose EoL of apache 2.2.x during the next 12 months
27
EXPIRATION_DATE=	2017-07-01
27
EXPIRATION_DATE=	2017-07-01
28
28
29
USE_APACHE=	common22
29
USES=		apache:server,2.2 autoreconf bdb cpe iconv libtool perl5 tar:bzip2
30
USES=		autoreconf bdb cpe iconv libtool perl5 tar:bzip2
31
30
32
USE_PERL5=	run
31
USE_PERL5=	run
33
USE_RC_SUBR=	apache22 htcacheclean
32
USE_RC_SUBR=	apache22 htcacheclean
(-)www/apache22/Makefile.modules (-6 / +3 lines)
Lines 83-98 Link Here
83
CONFIGURE_ARGS+=	--enable-exception-hook
83
CONFIGURE_ARGS+=	--enable-exception-hook
84
.endif
84
.endif
85
85
86
.if ${PORT_OPTIONS:MAUTH_BASIC} || ${PORT_OPTIONS:MAUTH_DIGEST}
86
.if ( ${PORT_OPTIONS:MAUTH_BASIC} || ${PORT_OPTIONS:MAUTH_DIGEST} ) && \
87
.  if !${APACHE_MODULES:MAUTHN*}
87
	empty(_APACHE_ENABLED_MODS:MAUTHN*)
88
IGNORE=	AUTH_BASIC and AUTH_DIGEST need at least one AUTHN provider
88
IGNORE=	AUTH_BASIC and AUTH_DIGEST need at least one AUTHN provider
89
.  endif
90
.endif
89
.endif
91
90
92
.if ${PORT_OPTIONS:MAUTH_BASIC}
91
.if ${PORT_OPTIONS:MAUTH_BASIC} && empty(_APACHE_ENABLED_MODS:MAUTHZ*)
93
.  if !${APACHE_MODULES:MAUTHZ*}
94
IGNORE=	AUTH_BASIC need at least one AUTHZ provider
92
IGNORE=	AUTH_BASIC need at least one AUTHZ provider
95
.  endif
96
.endif
93
.endif
97
94
98
CONFIGURE_ARGS+=	--with-mpm=${WITH_MPM}
95
CONFIGURE_ARGS+=	--with-mpm=${WITH_MPM}
(-)www/apache24/Makefile (-2 / +1 lines)
Lines 20-27 Link Here
20
CONFLICTS_INSTALL=	caudium14-1.* \
20
CONFLICTS_INSTALL=	caudium14-1.* \
21
			apache-*-2.2.* apache22-*
21
			apache-*-2.2.* apache22-*
22
22
23
USE_APACHE=	common24
23
USES=		apache:server,2.4 autoreconf cpe iconv libtool perl5 tar:bzip2
24
USES=		autoreconf cpe iconv libtool perl5 tar:bzip2
25
USE_PERL5=	run
24
USE_PERL5=	run
26
USE_RC_SUBR=	apache24 htcacheclean
25
USE_RC_SUBR=	apache24 htcacheclean
27
GNU_CONFIGURE=	yes
26
GNU_CONFIGURE=	yes
(-)www/apache24/Makefile.modules (-6 / +3 lines)
Lines 68-83 Link Here
68
CONFIGURE_ARGS+=	--enable-exception-hook
68
CONFIGURE_ARGS+=	--enable-exception-hook
69
.endif
69
.endif
70
70
71
.if ${PORT_OPTIONS:MAUTH_BASIC} || ${PORT_OPTIONS:MAUTH_DIGEST}
71
.if ( ${PORT_OPTIONS:MAUTH_BASIC} || ${PORT_OPTIONS:MAUTH_DIGEST} ) && \
72
.  if !${APACHE_MODULES:MAUTHN*}
72
	empty(PORT_OPTIONS:MAUTHN*)
73
IGNORE=	AUTH_BASIC and AUTH_DIGEST need at least one AUTHN provider
73
IGNORE=	AUTH_BASIC and AUTH_DIGEST need at least one AUTHN provider
74
.  endif
75
.endif
74
.endif
76
75
77
.if ${PORT_OPTIONS:MAUTH_BASIC}
76
.if ${PORT_OPTIONS:MAUTH_BASIC} && empty(PORT_OPTIONS:MAUTHZ*)
78
.  if !${APACHE_MODULES:MAUTHZ*}
79
IGNORE=	AUTH_BASIC need at least one AUTHZ provider
77
IGNORE=	AUTH_BASIC need at least one AUTHZ provider
80
.  endif
81
.endif
78
.endif
82
79
83
.if ${PORT_OPTIONS:MXML2ENC} || ${PORT_OPTIONS:MPROXY_HTML}
80
.if ${PORT_OPTIONS:MXML2ENC} || ${PORT_OPTIONS:MPROXY_HTML}
(-)lang/php56/Makefile (-1 / +1 lines)
Lines 88-94 Link Here
88
88
89
.if defined(PKGNAMEPREFIX)
89
.if defined(PKGNAMEPREFIX)
90
USE_APACHE=	22+
90
USE_APACHE=	22+
91
.include "${PORTSDIR}/Mk/bsd.apache.mk"
91
.include "${PORTSDIR}/Mk/Uses/apache.mk"
92
.if ${PORT_OPTIONS:MAP2FILTER}
92
.if ${PORT_OPTIONS:MAP2FILTER}
93
CONFIGURE_ARGS+=--with-apxs2filter=${APXS}
93
CONFIGURE_ARGS+=--with-apxs2filter=${APXS}
94
.else
94
.else
(-)lang/php70/Makefile (-1 / +1 lines)
Lines 92-98 Link Here
92
92
93
.if defined(PKGNAMEPREFIX)
93
.if defined(PKGNAMEPREFIX)
94
USE_APACHE=	22+
94
USE_APACHE=	22+
95
.include "${PORTSDIR}/Mk/bsd.apache.mk"
95
.include "${PORTSDIR}/Mk/Uses/apache.mk"
96
.if ${PORT_OPTIONS:MAP2FILTER}
96
.if ${PORT_OPTIONS:MAP2FILTER}
97
CONFIGURE_ARGS+=--with-apxs2filter=${APXS}
97
CONFIGURE_ARGS+=--with-apxs2filter=${APXS}
98
.else
98
.else
(-)lang/php71/Makefile (-1 / +1 lines)
Lines 94-100 Link Here
94
94
95
.if defined(PKGNAMEPREFIX)
95
.if defined(PKGNAMEPREFIX)
96
USE_APACHE=	22+
96
USE_APACHE=	22+
97
.include "${PORTSDIR}/Mk/bsd.apache.mk"
97
.include "${PORTSDIR}/Mk/Uses/apache.mk"
98
.if ${PORT_OPTIONS:MAP2FILTER}
98
.if ${PORT_OPTIONS:MAP2FILTER}
99
CONFIGURE_ARGS+=--with-apxs2filter=${APXS}
99
CONFIGURE_ARGS+=--with-apxs2filter=${APXS}
100
.else
100
.else
(-)lang/php72/Makefile (-1 / +1 lines)
Lines 86-92 Link Here
86
86
87
.if defined(PKGNAMEPREFIX)
87
.if defined(PKGNAMEPREFIX)
88
USE_APACHE=	22+
88
USE_APACHE=	22+
89
.include "${PORTSDIR}/Mk/bsd.apache.mk"
89
.include "${PORTSDIR}/Mk/Uses/apache.mk"
90
.if ${PORT_OPTIONS:MAP2FILTER}
90
.if ${PORT_OPTIONS:MAP2FILTER}
91
CONFIGURE_ARGS+=--with-apxs2filter=${APXS}
91
CONFIGURE_ARGS+=--with-apxs2filter=${APXS}
92
.else
92
.else
(-)www/mod_auth_pubtkt/Makefile (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
.include <bsd.port.pre.mk>
19
.include <bsd.port.pre.mk>
20
20
21
.if ${APACHE_VERSION} > 22
21
.if ${APACHE_VERSION:S/.//} > 22
22
AP_EXTRAS=	-DAPACHE24
22
AP_EXTRAS=	-DAPACHE24
23
.else
23
.else
24
AP_EXTRAS=	-DAPACHE22
24
AP_EXTRAS=	-DAPACHE22
(-)www/mod_evasive/Makefile (-1 / +1 lines)
Lines 30-36 Link Here
30
	@${REINPLACE_CMD} -e "s|/bin/mail|/usr/bin/mail|g" \
30
	@${REINPLACE_CMD} -e "s|/bin/mail|/usr/bin/mail|g" \
31
		${WRKSRC}/mod_evasive.c ${WRKSRC}/mod_evasive20.c \
31
		${WRKSRC}/mod_evasive.c ${WRKSRC}/mod_evasive20.c \
32
		${WRKSRC}/mod_evasiveNSAPI.c
32
		${WRKSRC}/mod_evasiveNSAPI.c
33
.if ${APACHE_VERSION:M24}
33
.if ${APACHE_VERSION:S/.//:M24}
34
	@${REINPLACE_CMD} -e 's/remote_ip/client_ip/g' ${WRKSRC}/mod_evasive20.c
34
	@${REINPLACE_CMD} -e 's/remote_ip/client_ip/g' ${WRKSRC}/mod_evasive20.c
35
.endif
35
.endif
36
36
(-)www/mod_perl2/Makefile (-2 / +2 lines)
Lines 33-40 Link Here
33
33
34
.include <bsd.port.pre.mk>
34
.include <bsd.port.pre.mk>
35
35
36
# Provider is build iff apache24 is in use
36
# Provider is built if apache24 is in use
37
.if ${APACHE_VERSION:M22}
37
.if ${APACHE_VERSION:S/.//:M22}
38
PLIST_SUB+=	AP22="@comment "
38
PLIST_SUB+=	AP22="@comment "
39
.else
39
.else
40
PLIST_SUB+=	AP22=""
40
PLIST_SUB+=	AP22=""
(-)www/mod_scgi/Makefile (-1 / +1 lines)
Lines 22-28 Link Here
22
22
23
.include <bsd.port.pre.mk>
23
.include <bsd.port.pre.mk>
24
24
25
.if ${APACHE_VERSION} == 24
25
.if ${APACHE_VERSION:S/.//} == 24
26
EXTRA_PATCHES=	${FILESDIR}/apache24-compat-mod__scgi.c
26
EXTRA_PATCHES=	${FILESDIR}/apache24-compat-mod__scgi.c
27
.endif
27
.endif
28
28

Return to bug 223691