summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2016-10-01 01:22:30 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2016-10-01 01:22:30 +0200
commit86c67a7eeea89832912c8dad9e86140e0e47fa10 (patch)
tree5256b692b1d467b623cd53755e264da8ca116b91
parentwww-apache/mod_perl: Use newest rc for experiments (diff)
downloaddilfridge-86c67a7e.tar.gz
dilfridge-86c67a7e.tar.bz2
dilfridge-86c67a7e.zip
www-apache/mod_perl: Builds and installs. Some tests still fail.
Package-Manager: portage-2.3.1
-rw-r--r--www-apache/mod_perl/files/mod_perl-2.0.10_pre201601-bundled-Apache-Test.patch123
-rw-r--r--www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch80
-rw-r--r--www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild93
3 files changed, 129 insertions, 167 deletions
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
deleted file mode 100644
index af53cad..0000000
--- a/www-apache/mod_perl/files/mod_perl-2.0.10_pre201601-bundled-Apache-Test.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-diff -ruN mod_perl-2.0.10_pre201601.orig/Makefile.PL mod_perl-2.0.10_pre201601/Makefile.PL
---- mod_perl-2.0.10_pre201601.orig/Makefile.PL 2015-05-13 10:01:18.000000000 +0200
-+++ mod_perl-2.0.10_pre201601/Makefile.PL 2016-01-09 21:02:00.000000000 +0100
-@@ -25,7 +25,7 @@
-
- }
-
--use lib qw(lib Apache-Test/lib);
-+use lib qw(lib);
-
- use Config;
- use File::Spec::Functions;
-@@ -122,15 +122,6 @@
-
- sub configure {
-
-- # mod_perl test suite relies on having Apache-Test bundled with
-- # the mod_perl source, since any pre-installed version may not do
-- # the right thing
-- unless (-d "Apache-Test") {
-- error "Can't find a sub-directory Apache-Test. " .
-- "Make sure that you are using a complete source distribution";
-- exit 1;
-- }
--
- set_modperl_version();
-
- if ($old_modperl_version) {
-@@ -853,14 +844,9 @@
- run_subtests ::
- cd ModPerl-Registry && $(MAKE) test
-
--run_subtests ::
-- cd Apache-Reload && $(MAKE) test
--
- EOF
-
- $preamble .= <<'EOF' unless $build->mpm_is_threaded();
--run_subtests ::
-- cd Apache-SizeLimit && $(MAKE) test
-
- EOF
-
-@@ -871,42 +857,6 @@
- return $preamble;
- }
-
--sub MY::postamble {
-- my $self = shift;
--
-- my $string = $self->ModPerl::BuildMM::MY::postamble;
--
-- if (!WIN32) {
-- $string .= <<'EOF';
--rpm: dist
-- @[ -d $(PWD)/rpm ] || mkdir $(PWD)/rpm
-- rpmbuild -ta --define "_rpmdir $(PWD)/rpm" \
-- --define "_srcrpmdir $(PWD)/rpm" \
-- $(DISTVNAME).tar.gz
-- @mv $(PWD)/rpm/*/*.rpm $(PWD)/rpm/
-- @rm -rf $(PWD)/rpm/*/
--
--EOF
-- }
--
-- $string .= <<'EOF';
--mydist : Apache-Test/META.yml mod_perl.spec manifest tardist
--
--mod_perl.spec: build/make_rpm_spec
-- $(PERL) build/make_rpm_spec
--
--Apache-Test/META.yml:
-- cd Apache-Test && make metafile
--
--tag :
-- svn copy https://svn.apache.org/repos/asf/perl/modperl/trunk https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM)
-- 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)
-- svn copy https://svn.apache.org/repos/asf/perl/modperl/docs/trunk https://svn.apache.org/repos/asf/perl/modperl/docs/tags/$(VERSION_SYM)
--EOF
--
-- return $string;
--}
--
- # this is a workaround so that ModPerl::MM will move MY::constants
- # away, and Apache-Test/Makefile.PL which has its own MY::constants
- # won't get complaints on MY::constants redefined
-diff -ruN mod_perl-2.0.10_pre201601.orig/lib/ModPerl/BuildMM.pm mod_perl-2.0.10_pre201601/lib/ModPerl/BuildMM.pm
---- mod_perl-2.0.10_pre201601.orig/lib/ModPerl/BuildMM.pm 2015-04-01 18:19:18.000000000 +0200
-+++ mod_perl-2.0.10_pre201601/lib/ModPerl/BuildMM.pm 2016-01-09 21:04:34.000000000 +0100
-@@ -39,12 +39,10 @@
- ModPerl::MM::override_eu_mm_mv_all_methods(@methods);
- use strict 'refs';
-
--my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib";
--
- #to override MakeMaker MOD_INSTALL macro
- sub mod_install {
- q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" .
-- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" .
-+ qq{-MModPerl::BuildMM \\}."\n" .
- q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n";
- }
-
-@@ -271,7 +269,7 @@
-
- push @target,
- '$(FULLPERL) -I$(INST_LIB) ' .
-- "-I$apache_test_dir -MModPerl::BuildMM " .
-+ "-MModPerl::BuildMM " .
- "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib";
-
- # Win32 doesn't normally install man pages
-diff -ruN mod_perl-2.0.10_pre201601.orig/lib/ModPerl/Manifest.pm mod_perl-2.0.10_pre201601/lib/ModPerl/Manifest.pm
---- mod_perl-2.0.10_pre201601.orig/lib/ModPerl/Manifest.pm 2015-05-13 09:23:09.000000000 +0200
-+++ mod_perl-2.0.10_pre201601/lib/ModPerl/Manifest.pm 2016-01-09 21:04:50.000000000 +0100
-@@ -119,7 +119,6 @@
- t/apr-ext/perlio
- # PAUSE breaks if a dist has more than one META.yml. the top-level
- # META.yml already excludes Apache-Test from indexing
--Apache-Test/META.yml
- # exclude Apache-Test/MANIFEST since it confuses the mp2 build (e.g it
- # wants Apache-Test/META.yml which we don't supply, see above)
- Apache-Test/MANIFEST
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
new file mode 100644
index 0000000..e8ec5d0
--- /dev/null
+++ b/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch
@@ -0,0 +1,80 @@
+diff -ruN mod_perl-2.0.10-rc1.orig/Makefile.PL mod_perl-2.0.10-rc1/Makefile.PL
+--- mod_perl-2.0.10-rc1.orig/Makefile.PL 2016-09-30 14:45:23.000000000 +0200
++++ mod_perl-2.0.10-rc1/Makefile.PL 2016-10-01 00:35:17.140862642 +0200
+@@ -25,7 +25,7 @@
+
+ }
+
+-use lib qw(lib Apache-Test/lib);
++use lib qw(lib);
+
+ use Config;
+ use File::Spec::Functions;
+@@ -122,15 +122,6 @@
+
+ sub configure {
+
+- # mod_perl test suite relies on having Apache-Test bundled with
+- # the mod_perl source, since any pre-installed version may not do
+- # the right thing
+- unless (-d "Apache-Test") {
+- error "Can't find a sub-directory Apache-Test. " .
+- "Make sure that you are using a complete source distribution";
+- exit 1;
+- }
+-
+ set_modperl_version();
+
+ if ($old_modperl_version) {
+@@ -853,14 +844,9 @@
+ run_subtests ::
+ cd ModPerl-Registry && $(MAKE) test
+
+-run_subtests ::
+- cd Apache-Reload && $(MAKE) test
+-
+ EOF
+
+ $preamble .= <<'EOF' unless $build->mpm_is_threaded();
+-run_subtests ::
+- cd Apache-SizeLimit && $(MAKE) test
+
+ EOF
+
+diff -ruN mod_perl-2.0.10-rc1.orig/lib/ModPerl/BuildMM.pm mod_perl-2.0.10-rc1/lib/ModPerl/BuildMM.pm
+--- mod_perl-2.0.10-rc1.orig/lib/ModPerl/BuildMM.pm 2016-09-30 14:45:23.000000000 +0200
++++ mod_perl-2.0.10-rc1/lib/ModPerl/BuildMM.pm 2016-10-01 00:35:17.140862642 +0200
+@@ -39,12 +39,10 @@
+ ModPerl::MM::override_eu_mm_mv_all_methods(@methods);
+ use strict 'refs';
+
+-my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib";
+-
+ #to override MakeMaker MOD_INSTALL macro
+ sub mod_install {
+ q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" .
+- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" .
++ qq{-MModPerl::BuildMM \\}."\n" .
+ q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n";
+ }
+
+@@ -271,7 +269,7 @@
+
+ push @target,
+ '$(FULLPERL) -I$(INST_LIB) ' .
+- "-I$apache_test_dir -MModPerl::BuildMM " .
++ "-MModPerl::BuildMM " .
+ "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib";
+
+ # Win32 doesn't normally install man pages
+diff -ruN mod_perl-2.0.10-rc1.orig/lib/ModPerl/Manifest.pm mod_perl-2.0.10-rc1/lib/ModPerl/Manifest.pm
+--- mod_perl-2.0.10-rc1.orig/lib/ModPerl/Manifest.pm 2016-09-30 14:45:23.000000000 +0200
++++ mod_perl-2.0.10-rc1/lib/ModPerl/Manifest.pm 2016-10-01 00:35:17.140862642 +0200
+@@ -119,7 +119,6 @@
+ t/apr-ext/perlio
+ # PAUSE breaks if a dist has more than one META.yml. the top-level
+ # META.yml already excludes Apache-Test from indexing
+-Apache-Test/META.yml
+ # exclude Apache-Test/MANIFEST since it confuses the mp2 build (e.g it
+ # wants Apache-Test/META.yml which we don't supply, see above)
+ Apache-Test/MANIFEST
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
index 16d7f02..9d615e1 100644
--- a/www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild
+++ b/www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=6
+EAPI=5
inherit depend.apache apache-module perl-module eutils
@@ -13,23 +13,40 @@ SRC_URI="mirror://apache/perl/${P/_rc1/-rc1}.tar.gz"
LICENSE="GPL-2"
SLOT="1"
#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="debug"
+IUSE="debug test apache2_mpms_event apache2_mpms_worker apache2_mpms_prefork"
-# The "solutions" for the following bugs have been removed here to simplify
-# the ebuild. Needs checking if the problem still occurs.
-#
-# bug 373943: precise threading conditions
+S=${WORKDIR}/${P/_rc1/-rc1}
+SRC_TEST=do
-DEPEND="
- >=dev-perl/Apache-Reload-0.11
- >=dev-perl/Apache-SizeLimit-0.95
- >=dev-perl/Apache-Test-1.360
- >=dev-perl/CGI-3.08
- dev-lang/perl[ithreads]
- www-servers/apache
+# We only support mod_perl as dynamic module.
+
+# Apache::Reload, Apache::SizeLimit, and Apache::Test are force-unbundled.
+# The minimum versions requested here are the bundled versions.
+
+# The test dependencies are from CPAN (Bundle::Apache2); the list
+# is not complete yet as not all are packaged.
+
+# When all MPMs are disabled via useflags, the apache ebuild selects a
+# default one, which will likely need threading...
+
+RDEPEND="
+ >=dev-perl/Apache-Reload-0.130.0
+ >=dev-perl/Apache-SizeLimit-0.970.0
+ >=dev-perl/Apache-Test-1.400.0
+ >=www-servers/apache-2.0.47
+ apache2_mpms_event? ( dev-lang/perl[ithreads] )
+ apache2_mpms_worker? ( dev-lang/perl[ithreads] )
+ !apache2_mpms_event? ( !apache2_mpms_worker? ( !apache2_mpms_prefork? ( dev-lang/perl[ithreads] ) ) )
"
-RDEPEND="${DEPEND}
+DEPEND="${RDEPEND}
+ dev-perl/Module-Build
+ test? (
+ >=dev-perl/CGI-3.110.0
+ dev-perl/Devel-Symdump
+ dev-perl/libwww-perl
+ www-servers/apache[apache2_modules_version,-apache2_modules_unique_id]
+ )
"
APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so"
@@ -38,33 +55,30 @@ APACHE2_MOD_DEFINE="PERL"
need_apache2
+PATCHES=(
+ "${FILESDIR}/${PN}"-2.0.1-sneak-tmpdir.patch # seems to fix the make test problem
+ "${FILESDIR}/${PN}"-2.0.4-inline.patch # 550244
+ "${FILESDIR}/${PN}"-2.0.10_rc1-bundled-Apache-Test.patch # 352724
+)
+
src_prepare() {
perl-module_src_prepare
- # rendhalver - this got redone for 2.0.1 and seems to fix the make test problems
- epatch "${FILESDIR}"/${PN}-2.0.1-sneak-tmpdir.patch
- epatch "${FILESDIR}"/${PN}-2.0.4-inline.patch #550244
-
- # bug 352724
- epatch "${FILESDIR}/${P}-bundled-Apache-Test.patch"
+ # some chainsaw unbundling
rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/
-
- # 410453
- epatch "${FILESDIR}/use-client_ip-client_add-instead-of-remote_ip-remote.patch"
- epatch "${FILESDIR}/use-log.level-instead-of-loglevel.patch"
}
src_configure() {
local debug=$(usex debug 1 0)
- perl Makefile.PL \
- PREFIX="${EPREFIX}"/usr \
- INSTALLDIRS=vendor \
- MP_USE_DSO=1 \
- MP_APXS=${APXS} \
- MP_APR_CONFIG=/usr/bin/apr-1-config \
- MP_TRACE=${debug} \
- MP_DEBUG=${debug} \
- || die
+ myconf=(
+ MP_USE_DSO=1
+ MP_APXS=${APXS}
+ MP_APR_CONFIG=/usr/bin/apr-1-config
+ MP_TRACE=${debug}
+ MP_DEBUG=${debug}
+ )
+
+ perl-module_src_configure
}
src_test() {
@@ -77,8 +91,6 @@ src_test() {
chown nobody:nobody "${WORKDIR}" "${T}"
fi
- # this does not || die because of bug 21325. kudos to smark for
- # the idea of setting HOME.
TMPDIR="${T}" HOME="${T}/" perl-module_src_test
}
@@ -86,14 +98,8 @@ src_install() {
apache-module_src_install
default
-#emake DESTDIR="${D}" install || die
- # TODO: add some stuff from docs/ back?
-
- # rendhalver - fix the perllocal.pod that gets installed
- # it seems to me that this has been getting installed for ages
perl_delete_localpod
- # Remove empty .bs files as well
perl_delete_packlist
insinto "${APACHE_MODULES_CONFDIR}"
@@ -105,8 +111,7 @@ src_install() {
# just go with a clean slate. should be much easier to see what's
# happening and revert if problematic.
- # Sorry for this evil hack...
- perl_set_version # just to be sure...
+ perl_set_version
sed -i \
-e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
-e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
@@ -117,7 +122,7 @@ src_install() {
grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}"
sed -i -e "s:\(${D}\|${S}\):/:g" ${fname}
done
- # All the rest
+
perl_remove_temppath
}