blob: e9bd612e7cf913ca639027f6b1e4e26691356ff4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
# $NetBSD: options.mk,v 1.10 2015/06/26 19:25:12 ryoon Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.apache
PKG_SUPPORTED_OPTIONS= lua suexec apache-mpm-event apache-mpm-prefork apache-mpm-worker
PKG_SUGGESTED_OPTIONS= apache-mpm-event apache-mpm-prefork \
apache-mpm-worker
.if ${OPSYS} == "SunOS" && !empty(OS_VERSION:M5.1[0-9])
PKG_SUPPORTED_OPTIONS+= privileges
# Disabled until DTrace support is fully implemented/fixed
# PKG_SUPPORTED_OPTIONS+= dtrace
.endif
.include "../../mk/bsd.options.mk"
# Set the "Multi-Processing Model" used by Apache to handle requests.
# Valid values are:
# event multi-threaded based in worker, designed
# to allow more requests to be served
# simultaneously by passing off some processing
# work to supporting threads.
# BEWARE: does not work with SSL or input filters.
# prefork non-threaded, pre-forking web server
# worker hybrid multi-threaded multi-process web server
#
PLIST_VARS+= worker prefork event only-prefork not-only-prefork
.if !empty(PKG_OPTIONS:Mapache-mpm-event)
MPMS+= event
PLIST.event= yes
.endif
.if !empty(PKG_OPTIONS:Mapache-mpm-worker)
MPMS+= worker
PLIST.worker= yes
.endif
.if !empty(PKG_OPTIONS:Mapache-mpm-prefork)
MPMS+= prefork
PLIST.prefork= yes
.endif
CONFIGURE_ARGS+= --enable-mpms-shared='${MPMS}'
MESSAGE_SUBST+= MPMS=${MPMS:Q}
# If only prefork mpm is supported, ...
.if empty(PKG_OPTIONS:Mapache-mpm-event) && \
empty(PKG_OPTIONS:Mapache-mpm-worker) && \
!empty(PKG_OPTIONS:Mapache-mpm-prefork)
CONFIGURE_ARGS+= --with-mpm=prefork
PLIST.only-prefork= yes
.else
PLIST.not-only-prefork= yes
.endif
BUILD_DEFS+= APACHE_MODULES
PLIST_VARS+= suexec
.if !empty(PKG_OPTIONS:Msuexec)
BUILD_DEFS+= APACHE_SUEXEC_PATH
BUILD_DEFS+= APACHE_SUEXEC_DOCROOT APACHE_SUEXEC_LOGFILE
APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs
APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
APACHE_SUEXEC_LOGFILE?= ${VARBASE}/log/httpd/suexec.log
APACHE_SUEXEC_CONFIGURE_ARGS+= \
--with-suexec-bin=${PREFIX}/sbin/suexec \
--with-suexec-caller=${APACHE_USER} \
--with-suexec-safepath='${APACHE_SUEXEC_PATH:Q}' \
--with-suexec-docroot=${APACHE_SUEXEC_DOCROOT:Q} \
--with-suexec-logfile=${APACHE_SUEXEC_LOGFILE}
CONFIGURE_ARGS+= --enable-modules="all suexec"
APACHE_MODULES+= suexec
CONFIGURE_ARGS+= ${APACHE_SUEXEC_CONFIGURE_ARGS:M--with-suexec-*}
BUILD_DEFS+= APACHE_SUEXEC_CONFIGURE_ARGS
BUILD_TARGET= all suexec
PLIST.suexec= yes
SPECIAL_PERMS+= sbin/suexec ${REAL_ROOT_USER} ${APACHE_GROUP} 4510
.endif
PLIST_VARS+= lua
.if !empty(PKG_OPTIONS:Mlua)
CONFIGURE_ARGS+= --enable-lua
.include "../../lang/lua/buildlink3.mk"
PLIST.lua= yes
.else
CONFIGURE_ARGS+= --disable-lua
.endif
PLIST_VARS+= privileges
.if !empty(PKG_OPTIONS:Mprivileges)
CONFIGURE_ARGS+= --enable-privileges
PLIST.privileges= yes
.endif
# DTrace support is manifest, but actually not implemented at all
# .if !empty(PKG_OPTIONS:Mdtrace)
# CONFIGURE_ARGS+= --enable-dtrace
# .endif
|