View | Details | Raw Unified | Return to bug 50455
Collapse All | Expand All

(-)Makefile (-16 / +71 lines)
Lines 41-66 Link Here
41
41
42
DATADIR=	${PREFIX}/www
42
DATADIR=	${PREFIX}/www
43
DOCUMENT_ROOT=	${DATADIR}/data
43
DOCUMENT_ROOT=	${DATADIR}/data
44
DEFAULT_PATH=/bin:/usr/bin:${PREFIX}/bin
45
44
46
.if defined(WITH_APACHE_SUEXEC) && ${WITH_APACHE_SUEXEC} == yes
45
.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == yes
47
46
47
APACHE_SUEXEC_CALLER?=www
48
APACHE_SUEXEC_DOCROOT?=${DOCUMENT_ROOT}
48
APACHE_SUEXEC_DOCROOT?=${DOCUMENT_ROOT}
49
APACHE_SUEXEC_LOG?=/var/log/httpd-suexec.log
49
APACHE_SUEXEC_USERDIR?=public_html
50
APACHE_SUEXEC_USERDIR?=public_html
51
APACHE_SUEXEC_UIDMIN?=1000
52
APACHE_SUEXEC_GIDMIN?=1000
53
APACHE_SUEXEC_SAFE_PATH?=/bin:/usr/bin:${PREFIX}/bin
50
54
51
SUEXEC_CONF=\
55
SUEXEC_CONF=	--enable-suexec \
52
		--enable-suexec \
56
		--suexec-caller=${APACHE_SUEXEC_CALLER} \
53
		--suexec-docroot=${APACHE_SUEXEC_DOCROOT} \
57
		--suexec-docroot=${APACHE_SUEXEC_DOCROOT} \
54
		--suexec-caller=www \
58
		--suexec-logfile=${APACHE_SUEXEC_LOG} \
55
		--suexec-uidmin=1000 \
56
		--suexec-gidmin=1000 \
57
		--suexec-logfile=/var/log/httpd-suexec.log \
58
		--suexec-userdir=${APACHE_SUEXEC_USERDIR} \
59
		--suexec-userdir=${APACHE_SUEXEC_USERDIR} \
59
		--suexec-safepath=${DEFAULT_PATH}
60
		--suexec-uidmin=${APACHE_SUEXEC_UIDMIN} \
61
		--suexec-gidmin=${APACHE_SUEXEC_GIDMIN} \
62
		--suexec-safepath=${APACHE_SUEXEC_SAFE_PATH}
60
63
61
.if defined(APACHE_SUEXEC_UMASK)
64
.if defined(APACHE_SUEXEC_UMASK)
62
SUEXEC_CONF+=\
65
SUEXEC_CONF+=	--suexec-umask=${APACHE_SUEXEC_UMASK}
63
		--suexec-umask=${APACHE_SUEXEC_UMASK}
64
.endif
66
.endif
65
67
66
PLIST_SUB+=	SUB_SUEXEC=""
68
PLIST_SUB+=	SUB_SUEXEC=""
Lines 91-105 Link Here
91
		--enable-module=define \
93
		--enable-module=define \
92
		${SUEXEC_CONF}
94
		${SUEXEC_CONF}
93
95
94
OPTIM=		-DHARD_SERVER_LIMIT=512 \
96
.if defined(APACHE_HARD_SERVER_LIMIT)
97
HARD_SERVER_LIMIT=-DHARD_SERVER_LIMIT=${APACHE_HARD_SERVER_LIMIT}
98
.else
99
HARD_SERVER_LIMIT=-DHARD_SERVER_LIMIT=512
100
.endif
101
102
OPTIM=		${HARD_SERVER_LIMIT} \
95
		-DDOCUMENT_LOCATION=\\"${PREFIX}/www/data/\\" \
103
		-DDOCUMENT_LOCATION=\\"${PREFIX}/www/data/\\" \
96
		-DDEFAULT_PATH=\\"${PREFIX}/bin:/bin:/usr/bin\\" \
104
		-DDEFAULT_PATH=\\"${PREFIX}/bin:/bin:/usr/bin\\" \
97
		-DACCEPT_FILTER_NAME=\\"httpready\\"
105
		-DACCEPT_FILTER_NAME=\\"httpready\\"
98
106
99
.if defined(WITH_APACHE_PERF_TUNING) && ${WITH_APACHE_PERF_TUNING} == YES
107
.if defined(APACHE_FD_SETSIZE)
100
OPTIM+=		-DBUFFERED_LOGS -DFD_SETSIZE=1024
108
OPTIM+=		-DFD_SETSIZE=${APACHE_FD_SETSIZE}
101
CFLAGS+=	-O6 -funroll-loops -fstrength-reduce -fomit-frame-pointer \
109
.else
102
		-fexpensive-optimizations -ffast-math
110
OPTIM+=		-DFD_SETSIZE=1024
111
.endif
112
113
.if defined(APACHE_BUFFERED_LOGS) && ${APACHE_BUFFERED_LOGS} == yes
114
OPTIM+=		-DBUFFERED_LOGS
115
.endif
116
117
.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == yes
118
CFLAGS+=	-O3
103
.endif
119
.endif
104
120
105
.include "${PORTSDIR}/security/openssl/Makefile.ssl"
121
.include "${PORTSDIR}/security/openssl/Makefile.ssl"
Lines 119-124 Link Here
119
TYPE=	test
135
TYPE=	test
120
CRT=
136
CRT=
121
KEY=
137
KEY=
138
139
pre-fetch:
140
	@${ECHO} ""
141
	@${ECHO} "You may use the following build options:"
142
	@${ECHO} ""
143
	@${ECHO} "  APACHE_SUEXEC=yes		enable the suEXEC feature"
144
	@${ECHO} "				[default is no]"
145
	@${ECHO} "  APACHE_SUEXEC_CALLER=user	set the suEXEC username of the allowed caller"
146
	@${ECHO} "				[default is www]"
147
	@${ECHO} "  APACHE_SUEXEC_DOCROOT=dir	set the suEXEC root directory"
148
	@${ECHO} "				[default is ${DOCUMENT_ROOT}]"
149
	@${ECHO} "  APACHE_SUEXEC_LOG=file	set the suEXEC logfile"
150
	@${ECHO} "				[default is /var/log/httpd-suexec.log]"
151
	@${ECHO} "  APACHE_SUEXEC_USERDIR=dir	set the suEXEC user subdirectory"
152
	@${ECHO} "				[default is public_html]"
153
	@${ECHO} "  APACHE_SUEXEC_UIDMIN=uid	set the suEXEC minimal allowed UID"
154
	@${ECHO} "				[default is 1000]"
155
	@${ECHO} "  APACHE_SUEXEC_GIDMIN=gid	set the suEXEC minimal allowed GID"
156
	@${ECHO} "				[default is 1000]"
157
	@${ECHO} "  APACHE_SUEXEC_SAFE_PATH=path	set the suEXEC safe PATH"
158
	@${ECHO} "				[default is /bin:/usr/bin:${PREFIX}/bin]"
159
	@${ECHO} "  APACHE_SUEXEC_UMASK=umask	set the umask for the suEXEC'd script"
160
	@${ECHO} "				[default is inherited from the Apache process]"
161
	@${ECHO} ""
162
	@${ECHO} "  APACHE_HARD_SERVER_LIMIT=nr	Maximum number of Apache processes."
163
	@${ECHO} "				[default is 512]"
164
	@${ECHO} "  APACHE_FD_SETSIZE=nr		Maximum number of descriptors."
165
	@${ECHO} "				[default is 1024]"
166
	@${ECHO} ""
167
	@${ECHO} "  APACHE_BUFFERED_LOGS=yes	Log entries are buffered before writing."
168
	@${ECHO} "				Writes may not be atomic, entries from multiple"
169
	@${ECHO} "				children could become mixed together and your"
170
	@${ECHO} "				web stats may be inaccurate."
171
	@${ECHO} "				[default is no]"
172
	@${ECHO} "  APACHE_PERF_TUNING=yes	CFLAGS optimization."
173
	@${ECHO} "				This setting may produce broken code and thus"
174
	@${ECHO} "				is not recommended for production servers."
175
	@${ECHO} "				[default is no]"
176
	@${ECHO} ""
122
177
123
post-extract:
178
post-extract:
124
	@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \
179
	@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \

Return to bug 50455