Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/dilfridge:master commit in: www-apache/mod_perl/, www-apache/mod_perl/files/
Date: Fri, 30 Sep 2016 23:23:00
Message-Id: 1475277750.86c67a7eeea89832912c8dad9e86140e0e47fa10.dilfridge@gentoo
1 commit: 86c67a7eeea89832912c8dad9e86140e0e47fa10
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 30 23:22:30 2016 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 30 23:22:30 2016 +0000
6 URL: https://gitweb.gentoo.org/dev/dilfridge.git/commit/?id=86c67a7e
7
8 www-apache/mod_perl: Builds and installs. Some tests still fail.
9
10 Package-Manager: portage-2.3.1
11
12 ...perl-2.0.10_pre201601-bundled-Apache-Test.patch | 123 ---------------------
13 .../mod_perl-2.0.10_rc1-bundled-Apache-Test.patch | 80 ++++++++++++++
14 www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild | 93 ++++++++--------
15 3 files changed, 129 insertions(+), 167 deletions(-)
16
17 diff --git a/www-apache/mod_perl/files/mod_perl-2.0.10_pre201601-bundled-Apache-Test.patch b/www-apache/mod_perl/files/mod_perl-2.0.10_pre201601-bundled-Apache-Test.patch
18 deleted file mode 100644
19 index af53cad..0000000
20 --- a/www-apache/mod_perl/files/mod_perl-2.0.10_pre201601-bundled-Apache-Test.patch
21 +++ /dev/null
22 @@ -1,123 +0,0 @@
23 -diff -ruN mod_perl-2.0.10_pre201601.orig/Makefile.PL mod_perl-2.0.10_pre201601/Makefile.PL
24 ---- mod_perl-2.0.10_pre201601.orig/Makefile.PL 2015-05-13 10:01:18.000000000 +0200
25 -+++ mod_perl-2.0.10_pre201601/Makefile.PL 2016-01-09 21:02:00.000000000 +0100
26 -@@ -25,7 +25,7 @@
27 -
28 - }
29 -
30 --use lib qw(lib Apache-Test/lib);
31 -+use lib qw(lib);
32 -
33 - use Config;
34 - use File::Spec::Functions;
35 -@@ -122,15 +122,6 @@
36 -
37 - sub configure {
38 -
39 -- # mod_perl test suite relies on having Apache-Test bundled with
40 -- # the mod_perl source, since any pre-installed version may not do
41 -- # the right thing
42 -- unless (-d "Apache-Test") {
43 -- error "Can't find a sub-directory Apache-Test. " .
44 -- "Make sure that you are using a complete source distribution";
45 -- exit 1;
46 -- }
47 --
48 - set_modperl_version();
49 -
50 - if ($old_modperl_version) {
51 -@@ -853,14 +844,9 @@
52 - run_subtests ::
53 - cd ModPerl-Registry && $(MAKE) test
54 -
55 --run_subtests ::
56 -- cd Apache-Reload && $(MAKE) test
57 --
58 - EOF
59 -
60 - $preamble .= <<'EOF' unless $build->mpm_is_threaded();
61 --run_subtests ::
62 -- cd Apache-SizeLimit && $(MAKE) test
63 -
64 - EOF
65 -
66 -@@ -871,42 +857,6 @@
67 - return $preamble;
68 - }
69 -
70 --sub MY::postamble {
71 -- my $self = shift;
72 --
73 -- my $string = $self->ModPerl::BuildMM::MY::postamble;
74 --
75 -- if (!WIN32) {
76 -- $string .= <<'EOF';
77 --rpm: dist
78 -- @[ -d $(PWD)/rpm ] || mkdir $(PWD)/rpm
79 -- rpmbuild -ta --define "_rpmdir $(PWD)/rpm" \
80 -- --define "_srcrpmdir $(PWD)/rpm" \
81 -- $(DISTVNAME).tar.gz
82 -- @mv $(PWD)/rpm/*/*.rpm $(PWD)/rpm/
83 -- @rm -rf $(PWD)/rpm/*/
84 --
85 --EOF
86 -- }
87 --
88 -- $string .= <<'EOF';
89 --mydist : Apache-Test/META.yml mod_perl.spec manifest tardist
90 --
91 --mod_perl.spec: build/make_rpm_spec
92 -- $(PERL) build/make_rpm_spec
93 --
94 --Apache-Test/META.yml:
95 -- cd Apache-Test && make metafile
96 --
97 --tag :
98 -- svn copy https://svn.apache.org/repos/asf/perl/modperl/trunk https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM)
99 -- svn copy https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM) https://svn.apache.org/repos/asf/perl/modperl/tags/$(VERSION_SYM)
100 -- svn copy https://svn.apache.org/repos/asf/perl/modperl/docs/trunk https://svn.apache.org/repos/asf/perl/modperl/docs/tags/$(VERSION_SYM)
101 --EOF
102 --
103 -- return $string;
104 --}
105 --
106 - # this is a workaround so that ModPerl::MM will move MY::constants
107 - # away, and Apache-Test/Makefile.PL which has its own MY::constants
108 - # won't get complaints on MY::constants redefined
109 -diff -ruN mod_perl-2.0.10_pre201601.orig/lib/ModPerl/BuildMM.pm mod_perl-2.0.10_pre201601/lib/ModPerl/BuildMM.pm
110 ---- mod_perl-2.0.10_pre201601.orig/lib/ModPerl/BuildMM.pm 2015-04-01 18:19:18.000000000 +0200
111 -+++ mod_perl-2.0.10_pre201601/lib/ModPerl/BuildMM.pm 2016-01-09 21:04:34.000000000 +0100
112 -@@ -39,12 +39,10 @@
113 - ModPerl::MM::override_eu_mm_mv_all_methods(@methods);
114 - use strict 'refs';
115 -
116 --my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib";
117 --
118 - #to override MakeMaker MOD_INSTALL macro
119 - sub mod_install {
120 - q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" .
121 -- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" .
122 -+ qq{-MModPerl::BuildMM \\}."\n" .
123 - q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n";
124 - }
125 -
126 -@@ -271,7 +269,7 @@
127 -
128 - push @target,
129 - '$(FULLPERL) -I$(INST_LIB) ' .
130 -- "-I$apache_test_dir -MModPerl::BuildMM " .
131 -+ "-MModPerl::BuildMM " .
132 - "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib";
133 -
134 - # Win32 doesn't normally install man pages
135 -diff -ruN mod_perl-2.0.10_pre201601.orig/lib/ModPerl/Manifest.pm mod_perl-2.0.10_pre201601/lib/ModPerl/Manifest.pm
136 ---- mod_perl-2.0.10_pre201601.orig/lib/ModPerl/Manifest.pm 2015-05-13 09:23:09.000000000 +0200
137 -+++ mod_perl-2.0.10_pre201601/lib/ModPerl/Manifest.pm 2016-01-09 21:04:50.000000000 +0100
138 -@@ -119,7 +119,6 @@
139 - t/apr-ext/perlio
140 - # PAUSE breaks if a dist has more than one META.yml. the top-level
141 - # META.yml already excludes Apache-Test from indexing
142 --Apache-Test/META.yml
143 - # exclude Apache-Test/MANIFEST since it confuses the mp2 build (e.g it
144 - # wants Apache-Test/META.yml which we don't supply, see above)
145 - Apache-Test/MANIFEST
146
147 diff --git a/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch b/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch
148 new file mode 100644
149 index 0000000..e8ec5d0
150 --- /dev/null
151 +++ b/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch
152 @@ -0,0 +1,80 @@
153 +diff -ruN mod_perl-2.0.10-rc1.orig/Makefile.PL mod_perl-2.0.10-rc1/Makefile.PL
154 +--- mod_perl-2.0.10-rc1.orig/Makefile.PL 2016-09-30 14:45:23.000000000 +0200
155 ++++ mod_perl-2.0.10-rc1/Makefile.PL 2016-10-01 00:35:17.140862642 +0200
156 +@@ -25,7 +25,7 @@
157 +
158 + }
159 +
160 +-use lib qw(lib Apache-Test/lib);
161 ++use lib qw(lib);
162 +
163 + use Config;
164 + use File::Spec::Functions;
165 +@@ -122,15 +122,6 @@
166 +
167 + sub configure {
168 +
169 +- # mod_perl test suite relies on having Apache-Test bundled with
170 +- # the mod_perl source, since any pre-installed version may not do
171 +- # the right thing
172 +- unless (-d "Apache-Test") {
173 +- error "Can't find a sub-directory Apache-Test. " .
174 +- "Make sure that you are using a complete source distribution";
175 +- exit 1;
176 +- }
177 +-
178 + set_modperl_version();
179 +
180 + if ($old_modperl_version) {
181 +@@ -853,14 +844,9 @@
182 + run_subtests ::
183 + cd ModPerl-Registry && $(MAKE) test
184 +
185 +-run_subtests ::
186 +- cd Apache-Reload && $(MAKE) test
187 +-
188 + EOF
189 +
190 + $preamble .= <<'EOF' unless $build->mpm_is_threaded();
191 +-run_subtests ::
192 +- cd Apache-SizeLimit && $(MAKE) test
193 +
194 + EOF
195 +
196 +diff -ruN mod_perl-2.0.10-rc1.orig/lib/ModPerl/BuildMM.pm mod_perl-2.0.10-rc1/lib/ModPerl/BuildMM.pm
197 +--- mod_perl-2.0.10-rc1.orig/lib/ModPerl/BuildMM.pm 2016-09-30 14:45:23.000000000 +0200
198 ++++ mod_perl-2.0.10-rc1/lib/ModPerl/BuildMM.pm 2016-10-01 00:35:17.140862642 +0200
199 +@@ -39,12 +39,10 @@
200 + ModPerl::MM::override_eu_mm_mv_all_methods(@methods);
201 + use strict 'refs';
202 +
203 +-my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib";
204 +-
205 + #to override MakeMaker MOD_INSTALL macro
206 + sub mod_install {
207 + q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" .
208 +- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" .
209 ++ qq{-MModPerl::BuildMM \\}."\n" .
210 + q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n";
211 + }
212 +
213 +@@ -271,7 +269,7 @@
214 +
215 + push @target,
216 + '$(FULLPERL) -I$(INST_LIB) ' .
217 +- "-I$apache_test_dir -MModPerl::BuildMM " .
218 ++ "-MModPerl::BuildMM " .
219 + "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib";
220 +
221 + # Win32 doesn't normally install man pages
222 +diff -ruN mod_perl-2.0.10-rc1.orig/lib/ModPerl/Manifest.pm mod_perl-2.0.10-rc1/lib/ModPerl/Manifest.pm
223 +--- mod_perl-2.0.10-rc1.orig/lib/ModPerl/Manifest.pm 2016-09-30 14:45:23.000000000 +0200
224 ++++ mod_perl-2.0.10-rc1/lib/ModPerl/Manifest.pm 2016-10-01 00:35:17.140862642 +0200
225 +@@ -119,7 +119,6 @@
226 + t/apr-ext/perlio
227 + # PAUSE breaks if a dist has more than one META.yml. the top-level
228 + # META.yml already excludes Apache-Test from indexing
229 +-Apache-Test/META.yml
230 + # exclude Apache-Test/MANIFEST since it confuses the mp2 build (e.g it
231 + # wants Apache-Test/META.yml which we don't supply, see above)
232 + Apache-Test/MANIFEST
233
234 diff --git a/www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild b/www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild
235 index 16d7f02..9d615e1 100644
236 --- a/www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild
237 +++ b/www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild
238 @@ -2,7 +2,7 @@
239 # Distributed under the terms of the GNU General Public License v2
240 # $Id$
241
242 -EAPI=6
243 +EAPI=5
244
245 inherit depend.apache apache-module perl-module eutils
246
247 @@ -13,23 +13,40 @@ SRC_URI="mirror://apache/perl/${P/_rc1/-rc1}.tar.gz"
248 LICENSE="GPL-2"
249 SLOT="1"
250 #KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
251 -IUSE="debug"
252 +IUSE="debug test apache2_mpms_event apache2_mpms_worker apache2_mpms_prefork"
253
254 -# The "solutions" for the following bugs have been removed here to simplify
255 -# the ebuild. Needs checking if the problem still occurs.
256 -#
257 -# bug 373943: precise threading conditions
258 +S=${WORKDIR}/${P/_rc1/-rc1}
259
260 +SRC_TEST=do
261
262 -DEPEND="
263 - >=dev-perl/Apache-Reload-0.11
264 - >=dev-perl/Apache-SizeLimit-0.95
265 - >=dev-perl/Apache-Test-1.360
266 - >=dev-perl/CGI-3.08
267 - dev-lang/perl[ithreads]
268 - www-servers/apache
269 +# We only support mod_perl as dynamic module.
270 +
271 +# Apache::Reload, Apache::SizeLimit, and Apache::Test are force-unbundled.
272 +# The minimum versions requested here are the bundled versions.
273 +
274 +# The test dependencies are from CPAN (Bundle::Apache2); the list
275 +# is not complete yet as not all are packaged.
276 +
277 +# When all MPMs are disabled via useflags, the apache ebuild selects a
278 +# default one, which will likely need threading...
279 +
280 +RDEPEND="
281 + >=dev-perl/Apache-Reload-0.130.0
282 + >=dev-perl/Apache-SizeLimit-0.970.0
283 + >=dev-perl/Apache-Test-1.400.0
284 + >=www-servers/apache-2.0.47
285 + apache2_mpms_event? ( dev-lang/perl[ithreads] )
286 + apache2_mpms_worker? ( dev-lang/perl[ithreads] )
287 + !apache2_mpms_event? ( !apache2_mpms_worker? ( !apache2_mpms_prefork? ( dev-lang/perl[ithreads] ) ) )
288 "
289 -RDEPEND="${DEPEND}
290 +DEPEND="${RDEPEND}
291 + dev-perl/Module-Build
292 + test? (
293 + >=dev-perl/CGI-3.110.0
294 + dev-perl/Devel-Symdump
295 + dev-perl/libwww-perl
296 + www-servers/apache[apache2_modules_version,-apache2_modules_unique_id]
297 + )
298 "
299
300 APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so"
301 @@ -38,33 +55,30 @@ APACHE2_MOD_DEFINE="PERL"
302
303 need_apache2
304
305 +PATCHES=(
306 + "${FILESDIR}/${PN}"-2.0.1-sneak-tmpdir.patch # seems to fix the make test problem
307 + "${FILESDIR}/${PN}"-2.0.4-inline.patch # 550244
308 + "${FILESDIR}/${PN}"-2.0.10_rc1-bundled-Apache-Test.patch # 352724
309 +)
310 +
311 src_prepare() {
312 perl-module_src_prepare
313
314 - # rendhalver - this got redone for 2.0.1 and seems to fix the make test problems
315 - epatch "${FILESDIR}"/${PN}-2.0.1-sneak-tmpdir.patch
316 - epatch "${FILESDIR}"/${PN}-2.0.4-inline.patch #550244
317 -
318 - # bug 352724
319 - epatch "${FILESDIR}/${P}-bundled-Apache-Test.patch"
320 + # some chainsaw unbundling
321 rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/
322 -
323 - # 410453
324 - epatch "${FILESDIR}/use-client_ip-client_add-instead-of-remote_ip-remote.patch"
325 - epatch "${FILESDIR}/use-log.level-instead-of-loglevel.patch"
326 }
327
328 src_configure() {
329 local debug=$(usex debug 1 0)
330 - perl Makefile.PL \
331 - PREFIX="${EPREFIX}"/usr \
332 - INSTALLDIRS=vendor \
333 - MP_USE_DSO=1 \
334 - MP_APXS=${APXS} \
335 - MP_APR_CONFIG=/usr/bin/apr-1-config \
336 - MP_TRACE=${debug} \
337 - MP_DEBUG=${debug} \
338 - || die
339 + myconf=(
340 + MP_USE_DSO=1
341 + MP_APXS=${APXS}
342 + MP_APR_CONFIG=/usr/bin/apr-1-config
343 + MP_TRACE=${debug}
344 + MP_DEBUG=${debug}
345 + )
346 +
347 + perl-module_src_configure
348 }
349
350 src_test() {
351 @@ -77,8 +91,6 @@ src_test() {
352 chown nobody:nobody "${WORKDIR}" "${T}"
353 fi
354
355 - # this does not || die because of bug 21325. kudos to smark for
356 - # the idea of setting HOME.
357 TMPDIR="${T}" HOME="${T}/" perl-module_src_test
358 }
359
360 @@ -86,14 +98,8 @@ src_install() {
361 apache-module_src_install
362
363 default
364 -#emake DESTDIR="${D}" install || die
365
366 - # TODO: add some stuff from docs/ back?
367 -
368 - # rendhalver - fix the perllocal.pod that gets installed
369 - # it seems to me that this has been getting installed for ages
370 perl_delete_localpod
371 - # Remove empty .bs files as well
372 perl_delete_packlist
373
374 insinto "${APACHE_MODULES_CONFDIR}"
375 @@ -105,8 +111,7 @@ src_install() {
376 # just go with a clean slate. should be much easier to see what's
377 # happening and revert if problematic.
378
379 - # Sorry for this evil hack...
380 - perl_set_version # just to be sure...
381 + perl_set_version
382 sed -i \
383 -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
384 -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
385 @@ -117,7 +122,7 @@ src_install() {
386 grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}"
387 sed -i -e "s:\(${D}\|${S}\):/:g" ${fname}
388 done
389 - # All the rest
390 +
391 perl_remove_temppath
392 }