Lines 94-99
Link Here
|
94 |
# This variable needs to be set in the ebuild and contains a list of available |
94 |
# This variable needs to be set in the ebuild and contains a list of available |
95 |
# built-in modules |
95 |
# built-in modules |
96 |
|
96 |
|
|
|
97 |
# @ECLASS-VARIABLE: APACHE2_HAS_SHARED_MPMS |
98 |
# @DESCRIPTION: |
99 |
# When this variable is set to any value in an ebuild, the build supports |
100 |
# several, shared MPMs chosen at runtime |
101 |
# Requires Apache 2.4 or greater |
102 |
|
103 |
|
97 |
IUSE_MPMS="${IUSE_MPMS_FORK} ${IUSE_MPMS_THREAD}" |
104 |
IUSE_MPMS="${IUSE_MPMS_FORK} ${IUSE_MPMS_THREAD}" |
98 |
IUSE="${IUSE} debug doc ldap libressl selinux ssl static suexec threads" |
105 |
IUSE="${IUSE} debug doc ldap libressl selinux ssl static suexec threads" |
99 |
|
106 |
|
Lines 131-153
Link Here
|
131 |
# @DESCRIPTION: |
138 |
# @DESCRIPTION: |
132 |
# This internal variable contains the selected MPM after a call to setup_mpm() |
139 |
# This internal variable contains the selected MPM after a call to setup_mpm() |
133 |
|
140 |
|
|
|
141 |
# @ECLASS-VARIABLE: MY_SHARED_MPMS |
142 |
# @DESCRIPTION: |
143 |
# This internal variable contains the selected shared MPMs when the build |
144 |
# supports shared MPMs and not static |
145 |
|
134 |
# @FUNCTION: setup_mpm |
146 |
# @FUNCTION: setup_mpm |
135 |
# @DESCRIPTION: |
147 |
# @DESCRIPTION: |
136 |
# This internal function makes sure that only one of APACHE2_MPMS was selected |
148 |
# This internal function makes sure that only one of APACHE2_MPMS was selected |
137 |
# or a default based on USE=threads is selected if APACHE2_MPMS is empty |
149 |
# or a default based on USE=threads is selected if APACHE2_MPMS is empty |
138 |
setup_mpm() { |
150 |
setup_mpm() { |
139 |
MY_MPM="" |
151 |
MY_MPM="" |
|
|
152 |
MY_SHARED_MPMS="" |
140 |
for x in ${IUSE_MPMS} ; do |
153 |
for x in ${IUSE_MPMS} ; do |
141 |
if use apache2_mpms_${x} ; then |
154 |
if use apache2_mpms_${x} ; then |
142 |
if [[ -z "${MY_MPM}" ]] ; then |
155 |
if [[ -n "${APACHE2_HAS_SHARED_MPMS}" ]] && ! use static ; then |
143 |
MY_MPM=${x} |
156 |
MY_SHARED_MPMS+="${x} " |
144 |
elog |
|
|
145 |
elog "Selected MPM: ${MY_MPM}" |
146 |
elog |
147 |
else |
157 |
else |
148 |
eerror "You have selected more then one mpm USE-flag." |
158 |
if [[ -z "${MY_MPM}" ]] ; then |
149 |
eerror "Only one MPM is supported." |
159 |
MY_MPM=${x} |
150 |
die "more then one mpm was specified" |
160 |
elog |
|
|
161 |
elog "Selected MPM: ${MY_MPM}" |
162 |
elog |
163 |
else |
164 |
eerror "You have selected more then one mpm USE-flag." |
165 |
eerror "Only one MPM is supported." |
166 |
die "more then one mpm was specified" |
167 |
fi |
151 |
fi |
168 |
fi |
152 |
fi |
169 |
fi |
153 |
done |
170 |
done |
Lines 358-363
Link Here
|
358 |
fi |
375 |
fi |
359 |
done |
376 |
done |
360 |
|
377 |
|
|
|
378 |
if [[ -n "${MY_SHARED_MPMS}" ]] ; then |
379 |
mod_lines="${mod_lines}\n\n# Available MPM modules; Only one can be active at a time" |
380 |
fi |
381 |
|
382 |
for m in ${MY_SHARED_MPMS} ; do |
383 |
if [[ -e "${mod_dir}/mod_mpm_${m}.so" ]] ; then |
384 |
if [[ "${m}x" = "${MY_MPM}x" ]] ; then |
385 |
mod_lines="${mod_lines}\nLoadModule ${m}_module modules/mod_mpm_${m}.so" |
386 |
else |
387 |
mod_lines="${mod_lines}\n#LoadModule ${m}_module modules/mod_mpm_${m}.so" |
388 |
fi |
389 |
fi |
390 |
done |
391 |
|
361 |
sed -i -e "s:%%LOAD_MODULE%%:${mod_lines}:" \ |
392 |
sed -i -e "s:%%LOAD_MODULE%%:${mod_lines}:" \ |
362 |
"${GENTOO_PATCHDIR}"/conf/httpd.conf |
393 |
"${GENTOO_PATCHDIR}"/conf/httpd.conf |
363 |
} |
394 |
} |
Lines 501-506
Link Here
|
501 |
use debug && append-flags -DMPM_PERUSER_DEBUG |
532 |
use debug && append-flags -DMPM_PERUSER_DEBUG |
502 |
fi |
533 |
fi |
503 |
|
534 |
|
|
|
535 |
if [[ -n "${MY_SHARED_MPMS}" ]] ; then |
536 |
MY_CONF+=( --enable-mpms-shared="${MY_SHARED_MPMS}" ) |
537 |
fi |
538 |
|
504 |
# econf overwrites the stuff from config.layout, so we have to put them into |
539 |
# econf overwrites the stuff from config.layout, so we have to put them into |
505 |
# our myconf line too |
540 |
# our myconf line too |
506 |
ac_cv_path_PKGCONFIG=${PKG_CONFIG} \ |
541 |
ac_cv_path_PKGCONFIG=${PKG_CONFIG} \ |