Add www-apache/mod_perl from ::gentoo.
[mjo-overlay.git] / www-apache / mod_perl / files / mod_perl-2.0.7-bundled-Apache-Test.patch
1 diff --git a/Makefile.PL b/Makefile.PL
2 index c4a0430..e85cf01 100644
3 --- a/Makefile.PL
4 +++ b/Makefile.PL
5 @@ -24,7 +24,7 @@ BEGIN {
6
7 }
8
9 -use lib qw(lib Apache-Test/lib);
10 +use lib qw(lib);
11
12 use Config;
13 use File::Spec::Functions;
14 @@ -117,16 +117,6 @@ sub get_DEFINE {
15 }
16
17 sub configure {
18 -
19 - # mod_perl test suite relies on having Apache-Test bundled with
20 - # the mod_perl source, since any pre-installed version may not do
21 - # the right thing
22 - unless (-d "Apache-Test") {
23 - error "Can't find a sub-directory Apache-Test. " .
24 - "Make sure that you are using a complete source distribution";
25 - exit 1;
26 - }
27 -
28 set_modperl_version();
29
30 if ($old_modperl_version) {
31 @@ -798,14 +788,9 @@ run_tests : test_clean
32 run_subtests ::
33 cd ModPerl-Registry && $(MAKE) test
34
35 -run_subtests ::
36 - cd Apache-Reload && $(MAKE) test
37 -
38 EOF
39
40 $preamble .= <<'EOF' unless $build->mpm_is_threaded();
41 -run_subtests ::
42 - cd Apache-SizeLimit && $(MAKE) test
43
44 EOF
45
46 @@ -816,36 +801,6 @@ EOF
47 return $preamble;
48 }
49
50 -sub MY::postamble {
51 - my $self = shift;
52 -
53 - my $string = $self->ModPerl::BuildMM::MY::postamble;
54 -
55 - $string .= <<'EOF';
56 -mydist : Apache-Test/META.yml mod_perl.spec manifest tardist
57 -
58 -rpm: dist
59 - @[ -d $(PWD)/rpm ] || mkdir $(PWD)/rpm
60 - rpmbuild -ta --define "_rpmdir $(PWD)/rpm" \
61 - --define "_srcrpmdir $(PWD)/rpm" \
62 - $(DISTVNAME).tar.gz
63 - @mv $(PWD)/rpm/*/*.rpm $(PWD)/rpm/
64 - @rm -rf $(PWD)/rpm/*/
65 -
66 -mod_perl.spec: build/make_rpm_spec
67 - $(PERL) build/make_rpm_spec
68 -
69 -Apache-Test/META.yml:
70 - cd Apache-Test && make metafile
71 -
72 -tag :
73 - 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)
74 - svn copy https://svn.apache.org/repos/asf/perl/modperl/docs/trunk https://svn.apache.org/repos/asf/perl/modperl/docs/tags/$(VERSION_SYM)
75 -EOF
76 -
77 - return $string;
78 -}
79 -
80 # this is a workaround so that ModPerl::MM will move MY::constants
81 # away, and Apache-Test/Makefile.PL which has its own MY::constants
82 # won't get complaints on MY::constants redefined
83 diff --git a/ModPerl-Registry/Makefile.PL b/ModPerl-Registry/Makefile.PL
84 index e72e65c..8610935 100644
85 --- a/ModPerl-Registry/Makefile.PL
86 +++ b/ModPerl-Registry/Makefile.PL
87 @@ -14,7 +14,7 @@ use Apache::TestMM qw(test clean);
88
89 # prerequisites
90 my %require = (
91 - "Apache::Test" => "", # any version will do?
92 + "Apache::Test" => 0, # any version will do?
93 );
94
95 my @scripts = qw(t/TEST t/SMOKE);
96 diff --git a/lib/ModPerl/BuildMM.pm b/lib/ModPerl/BuildMM.pm
97 index 1c729e2..8651999 100644
98 --- a/lib/ModPerl/BuildMM.pm
99 +++ b/lib/ModPerl/BuildMM.pm
100 @@ -38,12 +38,10 @@ my @methods = grep *{$stash->{$_}}{CODE}, keys %$stash;
101 ModPerl::MM::override_eu_mm_mv_all_methods(@methods);
102 use strict 'refs';
103
104 -my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib";
105 -
106 #to override MakeMaker MOD_INSTALL macro
107 sub mod_install {
108 q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" .
109 - qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" .
110 + qq{-MModPerl::BuildMM \\}."\n" .
111 q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n";
112 }
113
114 @@ -269,7 +267,7 @@ sub ModPerl::BuildMM::MY::postamble {
115
116 push @target,
117 '$(FULLPERL) -I$(INST_LIB) ' .
118 - "-I$apache_test_dir -MModPerl::BuildMM " .
119 + "-MModPerl::BuildMM " .
120 "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib";
121
122 # Win32 doesn't normally install man pages
123 diff --git a/lib/ModPerl/Manifest.pm b/lib/ModPerl/Manifest.pm
124 index 1e856bc..9f1833c 100644
125 --- a/lib/ModPerl/Manifest.pm
126 +++ b/lib/ModPerl/Manifest.pm
127 @@ -33,7 +33,6 @@ our @EXPORT_OK = qw(mkmanifest);
128 my @add_files = qw{
129 MANIFEST
130 mod_perl.spec
131 - Apache-Test/META.yml
132 };
133
134 sub get_svn_files {