1 |
commit: 7525642205c8a5f840aa737439226bcfedc26578 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 26 09:31:21 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 26 09:31:21 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75256422 |
7 |
|
8 |
apache-2.eclass: Removed code specific for apache-2.2 |
9 |
|
10 |
Minor eclass overhaul. |
11 |
|
12 |
eclass/apache-2.eclass | 69 ++++++++++++++++++++++++-------------------------- |
13 |
1 file changed, 33 insertions(+), 36 deletions(-) |
14 |
|
15 |
diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass |
16 |
index 7b30b48e089..3b98fc775c4 100644 |
17 |
--- a/eclass/apache-2.eclass |
18 |
+++ b/eclass/apache-2.eclass |
19 |
@@ -27,10 +27,6 @@ case $(get_version_component_range 1-2) in |
20 |
CDEPEND=">=dev-libs/apr-1.5.1:= |
21 |
!www-apache/mod_macro" #492578 #477702 |
22 |
;; |
23 |
- 2.2) |
24 |
- DEFAULT_MPM_THREADED="worker" |
25 |
- CDEPEND=">=dev-libs/apr-1.4.5:=" #368651 |
26 |
- ;; |
27 |
*) |
28 |
die "Unknown MAJOR.MINOR apache version." |
29 |
;; |
30 |
@@ -47,14 +43,14 @@ esac |
31 |
# If you want to override this in an ebuild, use: |
32 |
# ORIG_PR="(revision of Gentoo stuff you want)" |
33 |
# GENTOO_PATCHNAME="gentoo-${PN}-${PV}${ORIG_PR:+-${ORIG_PR}}" |
34 |
-[[ -n "$GENTOO_PATCHNAME" ]] || GENTOO_PATCHNAME="gentoo-${PF}" |
35 |
+[[ -n "${GENTOO_PATCHNAME}" ]] || GENTOO_PATCHNAME="gentoo-${PF}" |
36 |
|
37 |
# @ECLASS-VARIABLE: GENTOO_PATCHDIR |
38 |
# @DESCRIPTION: |
39 |
# This internal variable contains the working directory where patches and config |
40 |
# files are located. |
41 |
# Defaults to the patchset name appended to the working directory. |
42 |
-[[ -n "$GENTOO_PATCHDIR" ]] || GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}" |
43 |
+[[ -n "${GENTOO_PATCHDIR}" ]] || GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}" |
44 |
|
45 |
# @VARIABLE: GENTOO_DEVELOPER |
46 |
# @DESCRIPTION: |
47 |
@@ -70,7 +66,7 @@ esac |
48 |
# @DESCRIPTION: |
49 |
# This variable should contain the entire filename of patch tarball. |
50 |
# Defaults to the name of the patchset, with a datestamp. |
51 |
-[[ -n "$GENTOO_PATCH_A" ]] || GENTOO_PATCH_A="${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2" |
52 |
+[[ -n "${GENTOO_PATCH_A}" ]] || GENTOO_PATCH_A="${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2" |
53 |
|
54 |
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2 |
55 |
https://dev.gentoo.org/~${GENTOO_DEVELOPER}/dist/apache/${GENTOO_PATCH_A}" |
56 |
@@ -332,7 +328,7 @@ setup_modules() { |
57 |
# This internal function generates the LoadModule lines for httpd.conf based on |
58 |
# the current module selection and MODULE_DEFINES |
59 |
generate_load_module() { |
60 |
- local endit=0 mod_lines= mod_dir="${ED}/usr/$(get_libdir)/apache2/modules" |
61 |
+ local endit=0 mod_lines= mod_dir="${ED%/}/usr/$(get_libdir)/apache2/modules" |
62 |
|
63 |
if use static; then |
64 |
sed -i -e "/%%LOAD_MODULE%%/d" \ |
65 |
@@ -534,24 +530,25 @@ apache-2_src_configure() { |
66 |
|
67 |
# econf overwrites the stuff from config.layout, so we have to put them into |
68 |
# our myconf line too |
69 |
+ MY_CONF+=( |
70 |
+ --includedir="${EPREFIX}"/usr/include/apache2 |
71 |
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/apache2/modules |
72 |
+ --datadir="${EPREFIX}"/var/www/localhost |
73 |
+ --sysconfdir="${EPREFIX}"/etc/apache2 |
74 |
+ --localstatedir="${EPREFIX}"/var |
75 |
+ --with-mpm=${MY_MPM} |
76 |
+ --with-apr="${SYSROOT}${EPREFIX}"/usr |
77 |
+ --with-apr-util="${SYSROOT}${EPREFIX}"/usr |
78 |
+ --with-pcre="${T}"/pcre-config |
79 |
+ --with-z="${EPREFIX}"/usr |
80 |
+ --with-port=80 |
81 |
+ --with-program-name=apache2 |
82 |
+ --enable-layout=Gentoo |
83 |
+ ) |
84 |
ac_cv_path_PKGCONFIG=${PKG_CONFIG} \ |
85 |
- econf \ |
86 |
- --includedir="${EPREFIX}"/usr/include/apache2 \ |
87 |
- --libexecdir="${EPREFIX}"/usr/$(get_libdir)/apache2/modules \ |
88 |
- --datadir="${EPREFIX}"/var/www/localhost \ |
89 |
- --sysconfdir="${EPREFIX}"/etc/apache2 \ |
90 |
- --localstatedir="${EPREFIX}"/var \ |
91 |
- --with-mpm=${MY_MPM} \ |
92 |
- --with-apr="${SYSROOT}${EPREFIX}"/usr \ |
93 |
- --with-apr-util="${SYSROOT}${EPREFIX}"/usr \ |
94 |
- --with-pcre="${T}"/pcre-config \ |
95 |
- --with-z="${EPREFIX}"/usr \ |
96 |
- --with-port=80 \ |
97 |
- --with-program-name=apache2 \ |
98 |
- --enable-layout=Gentoo \ |
99 |
- "${MY_CONF[@]}" |
100 |
- |
101 |
- sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h |
102 |
+ econf "${MY_CONF[@]}" |
103 |
+ |
104 |
+ sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h || die |
105 |
} |
106 |
|
107 |
# @FUNCTION: apache-2_src_install |
108 |
@@ -575,15 +572,15 @@ apache-2_src_install() { |
109 |
|
110 |
# generate a sane default APACHE2_OPTS |
111 |
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO" |
112 |
- use doc && APACHE2_OPTS="${APACHE2_OPTS} -D MANUAL" |
113 |
- use ssl && APACHE2_OPTS="${APACHE2_OPTS} -D SSL -D SSL_DEFAULT_VHOST" |
114 |
- use suexec && APACHE2_OPTS="${APACHE2_OPTS} -D SUEXEC" |
115 |
+ use doc && APACHE2_OPTS+=" -D MANUAL" |
116 |
+ use ssl && APACHE2_OPTS+=" -D SSL -D SSL_DEFAULT_VHOST" |
117 |
+ use suexec && APACHE2_OPTS+=" -D SUEXEC" |
118 |
if has negotiation ${APACHE2_MODULES} && use apache2_modules_negotiation; then |
119 |
- APACHE2_OPTS="${APACHE2_OPTS} -D LANGUAGE" |
120 |
+ APACHE2_OPTS+=" -D LANGUAGE" |
121 |
fi |
122 |
|
123 |
sed -i -e "s:APACHE2_OPTS=\".*\":APACHE2_OPTS=\"${APACHE2_OPTS}\":" \ |
124 |
- "${GENTOO_PATCHDIR}"/init/apache2.confd || die "sed failed" |
125 |
+ "${GENTOO_PATCHDIR}"/init/apache2.confd || die |
126 |
|
127 |
newconfd "${GENTOO_PATCHDIR}"/init/apache2.confd apache2 |
128 |
newinitd "${GENTOO_PATCHDIR}"/init/apache2.initd apache2 |
129 |
@@ -605,19 +602,19 @@ apache-2_src_install() { |
130 |
|
131 |
# drop in a convenient link to the manual |
132 |
if use doc ; then |
133 |
- sed -i -e "s:VERSION:${PVR}:" "${ED}/etc/apache2/modules.d/00_apache_manual.conf" |
134 |
+ sed -i -e "s:VERSION:${PVR}:" "${ED%/}/etc/apache2/modules.d/00_apache_manual.conf" |
135 |
docompress -x /usr/share/doc/${PF}/manual # 503640 |
136 |
else |
137 |
- rm -f "${ED}/etc/apache2/modules.d/00_apache_manual.conf" |
138 |
- rm -Rf "${ED}/usr/share/doc/${PF}/manual" |
139 |
+ rm -f "${ED%/}/etc/apache2/modules.d/00_apache_manual.conf" |
140 |
+ rm -Rf "${ED%/}/usr/share/doc/${PF}/manual" |
141 |
fi |
142 |
|
143 |
# the default icons and error pages get stored in |
144 |
# /usr/share/apache2/{error,icons} |
145 |
dodir /usr/share/apache2 |
146 |
- mv -f "${ED}/var/www/localhost/error" "${ED}/usr/share/apache2/error" |
147 |
- mv -f "${ED}/var/www/localhost/icons" "${ED}/usr/share/apache2/icons" |
148 |
- rm -rf "${ED}/var/www/localhost/" |
149 |
+ mv -f "${ED%/}/var/www/localhost/error" "${ED%/}/usr/share/apache2/error" |
150 |
+ mv -f "${ED%/}/var/www/localhost/icons" "${ED%/}/usr/share/apache2/icons" |
151 |
+ rm -rf "${ED%/}/var/www/localhost/" |
152 |
eend $? |
153 |
|
154 |
# set some sane permissions for suexec |