From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- www-apache/mod_perl/Manifest | 12 ++ .../mod_perl/files/2.0.3/75_mod_perl.2.2.conf | 50 ++++++++ www-apache/mod_perl/files/2.0.3/75_mod_perl.conf | 54 ++++++++ .../files/2.0.3/apache2-mod_perl-startup.pl | 24 ++++ .../files/mod_perl-2.0.1-sneak-tmpdir.patch | 11 ++ .../mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch | 36 ++++++ .../mod_perl-2.0.10_rc1-bundled-Apache-Test.patch | 80 ++++++++++++ .../mod_perl/files/mod_perl-2.0.4-inline.patch | 22 ++++ www-apache/mod_perl/metadata.xml | 15 +++ www-apache/mod_perl/mod_perl-2.0.10.ebuild | 137 +++++++++++++++++++++ 10 files changed, 441 insertions(+) create mode 100644 www-apache/mod_perl/Manifest create mode 100644 www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf create mode 100644 www-apache/mod_perl/files/2.0.3/75_mod_perl.conf create mode 100644 www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl create mode 100644 www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch create mode 100644 www-apache/mod_perl/files/mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch create mode 100644 www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch create mode 100644 www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch create mode 100644 www-apache/mod_perl/metadata.xml create mode 100644 www-apache/mod_perl/mod_perl-2.0.10.ebuild (limited to 'www-apache/mod_perl') diff --git a/www-apache/mod_perl/Manifest b/www-apache/mod_perl/Manifest new file mode 100644 index 000000000000..5c92ce4dca9b --- /dev/null +++ b/www-apache/mod_perl/Manifest @@ -0,0 +1,12 @@ +AUX 2.0.3/75_mod_perl.2.2.conf 1221 SHA256 e7c2f4b84e9c9fc73e421740736f67674ebc7e7f13f8b2f71c9360f746fd441a SHA512 caaf66604e385f24ddebf282c42b880362fa19f9195fca105171b3d3edfa5b995d7bda9899be60f78341e20e2fad75fbb097740ea43781a44a60a4a5b7f650b7 WHIRLPOOL 8601fb27162befa58c94009e4e726cbd6fec7f2014a23b68b93b88f18d0b44cbebeee3ebdb0970600aa9785b5cff6f86eb6edb33d59f874622dfb828b22b5d0b +AUX 2.0.3/75_mod_perl.conf 1295 SHA256 b26ede61b2e03fd14432725ee6e5180dc3f289a123567073ee0dc9e7679b41f2 SHA512 f6842055bf41b457e77f25de4fccb4981456669e269a01faf606f5de31050fe41c2741c2591bc89a46914c876bfebb914e7d3a07108db8220ec0b8218781c22e WHIRLPOOL 12be8c9fe44f02b50140b87d0f68b5444f3df5e6eb0bf1d51da9f01f7c4101ebeba5c0803ce8656c2be157619e2f74f5713401ebd827895738ac4d5434d48930 +AUX 2.0.3/apache2-mod_perl-startup.pl 478 SHA256 f77741fb3bb18928fb15f95c6908a17d8f06d7efbb6785e0732f201347e26544 SHA512 3af399b3aa0bf5421ddef581b1042cbd71fa3fc9d27aa87feafb4754cc8e7bf9659eb70082f0c73f0022b31e8870ff68021af692e41b391dec6c5e7608589e29 WHIRLPOOL 78518f0d5952246700424af8d85dae73a17061e009b7d89aa55c7c93fed877addc8550524ebf6fb5f353ee50210a3773dadac9e1c8f84f2b2bc32c4ab2df2981 +AUX mod_perl-2.0.1-sneak-tmpdir.patch 337 SHA256 1f319a15e3d12a349c46c0783c7ad840d81d01ed41adda55c47d4ac31595615d SHA512 8e41d94db8cdd181393be8b4922a9e9760576cb051f93d652cf3f324671a464bfc2741bf18661ac4509db257cb5975b408f33799aea76a2e46ad15af08a68792 WHIRLPOOL a24853b0ada357b2a53d5ffe34969f792305a674388d6dc385912167a7ce45d376035a0810f75a1740872bac452187e7172f11afe06f8553f25560476a5fa1da +AUX mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch 1517 SHA256 7d3e4aa00a1ec564f2af9b93ef4e184ca5ecac2927a5d7d10d1c99fae1eac768 SHA512 4ac22d4e8942d2fb4d07f10897c7670acd77d28a7b47049e95dffe026d335c26681a0fa4a43c67b53fafa8c5bdba7991bad150e3bc00a8e3c40a7d7e59938c63 WHIRLPOOL f91cb45f45d87e5c05a843270aa2adf4bbaff6e3618a54128db6929c4d163cd0f02ae91f1ac7f67753da6328b67b8f47f41f5585ac719793e800d2ebc258f8fb +AUX mod_perl-2.0.10_rc1-bundled-Apache-Test.patch 2777 SHA256 c1740e70637f8077bac80c8542f649ed9eaa8c60437c3c514b978f8ff48a2375 SHA512 ebb583607d4a8587d340384bb5c8deb50a3001beaaf9a536f4731baa3664a6d2667de309d1549175bf721643ad3f107988de4d2c9e213429888044dd726447ee WHIRLPOOL 44c8c9ab97a7f586ac554cd90111c0fc9209a9623715d4e415ea98661c599dbacdcd1ed7dbde4364a23b096a270d949b3b4251b1d8404ee9530cd0cc7559fc3b +AUX mod_perl-2.0.4-inline.patch 678 SHA256 4438195d61e62d39cf2c6d8427238426cd98bd8778d25c0086c2093e8ab55f29 SHA512 5669230db6e70b31b087851fd792004c4a292975e507f248b8dc7ce195559ab9b0579db8bea84d823f7d53e351990ecda057d7fe63273d486b5f12204d7160a5 WHIRLPOOL 6c9b1a8262b7caaf803e6f1246eacb83fe9e677a973d02bd0d2e39aa2718e424f59ac15aeea073057dd68268e5fd066b653abd7ad418c326f34e027de5227566 +DIST mod_perl-2.0.10.tar.gz 3846211 SHA256 d1cf83ed4ea3a9dfceaa6d9662ff645177090749881093051020bf42f9872b64 SHA512 0bf1a885cb32a3393e95f87e71983097613e263b9052dbf22494663b506e36a25d0256afed24285232276d9f43ebd3adaa18b91129bfb62116a8ccb023855bca WHIRLPOOL 5ca9c3d961292a36d6be08e6f619385d54dd3551fc27a7387f53604e9971429c732fc988df50c35b1d62d520bab763fe4d127beb09aef86209583f2ef0d21eaf +EBUILD mod_perl-2.0.10.ebuild 3723 SHA256 2b57bb66ecafd0409db715eb356dc4f1f8fa5c13371fdbef95cce0ae83e0f23f SHA512 61e4ad8cfdd7f61aec044c8a3315f4c7e37d0c6bb55fe50975a65b8a45609f7adf84c24374dc2e8a308ceecda6453b06159bc331fff4d727681d5e92463621b1 WHIRLPOOL 9cc4912d688fb3ed5ad909cfe446b732957aae295dd9da7e859b994be7020ab7aa8930912b2891f15e447925a74363cc55e3d9ab534456d4d08f01b29398a7f0 +MISC ChangeLog 6690 SHA256 7ef24f5deabb87d26ca3dc5f64d6546401c703fde9b13fd19549d355d428ae6a SHA512 1f7391188652dbd32b35d544be4c57f1cfcce8d2827d0f7b93ce714c70cec205e605221822ccb811814bdc9c0591a8c3165d5c435a293ad30bf9ed849bbea084 WHIRLPOOL 3a28d2260fabad886cf73465a2a03f24ee493d3354f3a0522aed7b75b0f913a07b7e6a9f960572a270551576f4e81307a6674a21bb58650947c2c3c858114b6d +MISC ChangeLog-2015 26961 SHA256 9b2aa1e0e1dfaaaeba4726b4e3b6a5854465496a1b87103dff7b51c6ba3eb72d SHA512 7bdad7572461e5874b8dbc51ba8a973126d24efc587697102ea2c932b2f7077c7cf4060577a75aa819b8c9d318c907b0d2dcc1f25be8f999e0c8bee68e0a2179 WHIRLPOOL 97e8f553953b9232d89a9b4767b37c0b80d4d6bd98835414a7e8cd0556aaba72c545b7b851c02f3cb727b0a40b899c7709608a1658c0944ad166db7323866880 +MISC metadata.xml 486 SHA256 0f5204aa677dc5bd349b670d2be6f4e6c2327f79db8e2ae2c8fd96c5f33abdb2 SHA512 fe1670239ff1d6375cd0d6d3ef70e93cc687d6116693e4cd3df2670823c88b757e9c77e7955b09e33cc241785944cf2e99d336495e36846b3097cbbd96a5c5ac WHIRLPOOL f7352f1c9195dbef8152a1e01623a01f713dcdf8c8a3d11c8108f21e9a9722c1d95d7b649a3bf24ecba318778de06ff0e003fc240db4d6043f089931a5ed25eb diff --git a/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf b/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf new file mode 100644 index 000000000000..596d2cc73c6e --- /dev/null +++ b/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf @@ -0,0 +1,50 @@ + +LoadModule perl_module modules/mod_perl.so + +#PerlTrace all +PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl" +PerlModule ModPerl::Registry + +# Provide two aliases to the same cgi-bin directory, to see the effects of the +# 2 different mod_perl modes for Apache2::Registry Mode +Alias /perl/ /var/www/localhost/perl/ +# for Apache2::Perlrun Mode +Alias /cgi-perl/ /var/www/localhost/perl/ + + + SetHandler perl-script + PerlResponseHandler Apache2::Status + Order deny,allow + Deny from all + Allow from 127.0.0.1 + + + + SetHandler perl-script + PerlResponseHandler ModPerl::PerlRun + Options -Indexes ExecCGI + PerlOptions +ParseHeaders + + +# set Apache::Registry Mode for /perl Alias + + SetHandler perl-script + PerlResponseHandler ModPerl::Registry + Options -Indexes ExecCGI + PerlSendHeader On + Order allow,deny + Allow from all + + +# set Apache::PerlRun Mode for /cgi-perl Alias + + SetHandler perl-script + PerlResponseHandler ModPerl::PerlRun + Options -Indexes ExecCGI + PerlSendHeader On + Order allow,deny + Allow from all + + + +# vim: ts=4 filetype=apache diff --git a/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf b/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf new file mode 100644 index 000000000000..9cf7b7b4394f --- /dev/null +++ b/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf @@ -0,0 +1,54 @@ + +LoadModule perl_module modules/mod_perl.so + +#PerlTrace all +PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl" +PerlModule ModPerl::Registry + +# Provide two aliases to the same cgi-bin directory, to see the effects of the +# 2 different mod_perl modes for Apache2::Registry Mode +Alias /perl/ /var/www/localhost/perl/ +# for Apache2::Perlrun Mode +Alias /cgi-perl/ /var/www/localhost/perl/ + + + SetHandler perl-script + PerlResponseHandler Apache2::Status + Require host localhost + + + + SetHandler perl-script + PerlResponseHandler ModPerl::PerlRun + PerlOptions +ParseHeaders + + # Clear all existing options and only permit cgi. + Options ExecCGI + + +# set Apache::Registry Mode for /perl Alias + + SetHandler perl-script + PerlResponseHandler ModPerl::Registry + PerlSendHeader On + + # Clear all existing options and only permit cgi. + Options ExecCGI + + Require all granted + + +# set Apache::PerlRun Mode for /cgi-perl Alias + + SetHandler perl-script + PerlResponseHandler ModPerl::PerlRun + PerlSendHeader On + + # Clear all existing options and only permit cgi. + Options ExecCGI + + Require all granted + + + +# vim: ts=4 filetype=apache diff --git a/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl b/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl new file mode 100644 index 000000000000..afc048ac125b --- /dev/null +++ b/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl @@ -0,0 +1,24 @@ +use lib qw(/home/httpd/perl); + +# enable if the mod_perl 1.0 compatibility is needed +#use Apache2::compat (); + +use ModPerl::Util (); #for CORE::GLOBAL::exit + +use Apache2::RequestRec (); +use Apache2::RequestIO (); +use Apache2::RequestUtil (); + +use Apache2::ServerRec (); +use Apache2::ServerUtil (); +use Apache2::Connection (); +use Apache2::Log (); + +use APR::Table (); + +use ModPerl::Registry (); + +use Apache2::Const -compile => ':common'; +use APR::Const -compile => ':common'; + +1; diff --git a/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch b/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch new file mode 100644 index 000000000000..0930278aeba3 --- /dev/null +++ b/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch @@ -0,0 +1,11 @@ +--- t/conf/modperl_extra.pl.orig 2005-05-16 18:27:45.000000000 +1000 ++++ t/conf/modperl_extra.pl 2005-05-16 18:34:46.000000000 +1000 +@@ -136,6 +136,8 @@ + sub test_modperl_env { + # see t/response/TestModperl/env.pm + $ENV{MODPERL_EXTRA_PL} = __FILE__; ++ $ENV{TMPDIR} = __FILE__; ++ $ENV{TMPDIR} =~ s,/work/.*,/temp,; + } + + 1; diff --git a/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch b/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch new file mode 100644 index 000000000000..578878f05d04 --- /dev/null +++ b/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch @@ -0,0 +1,36 @@ +Tests fail because the server banner contains "Gentoo" instead of "Unix". Disable them. + + +diff -ruN mod_perl-2.0.10-rc1.orig/t/response/TestAPI/server_const.pm mod_perl-2.0.10-rc1/t/response/TestAPI/server_const.pm +--- mod_perl-2.0.10-rc1.orig/t/response/TestAPI/server_const.pm 2016-09-30 14:45:31.000000000 +0200 ++++ mod_perl-2.0.10-rc1/t/response/TestAPI/server_const.pm 2016-10-01 13:18:02.359794404 +0200 +@@ -25,7 +25,7 @@ + + my $r = shift; + +- plan $r, tests => 6; ++ plan $r, tests => 4; + + # test Apache2::ServerUtil constant subroutines + +@@ -45,13 +45,13 @@ + ok t_cmp($server_descr, qr!\bworld domination series/2\.0\b!, + 'Apache2::ServerUtil::get_server_description() -- component'); + +- # assuming ServerTokens Full (default) the banner equals description +- ok t_cmp(Apache2::ServerUtil::get_server_banner, $server_descr, +- 'Apache2::ServerUtil::get_server_banner()'); +- +- # version is just an alias for banner +- ok t_cmp(Apache2::ServerUtil::get_server_version, $server_descr, +- 'Apache2::ServerUtil::get_server_version()'); ++# # assuming ServerTokens Full (default) the banner equals description ++# ok t_cmp(Apache2::ServerUtil::get_server_banner, $server_descr, ++# 'Apache2::ServerUtil::get_server_banner()'); ++ ++# # version is just an alias for banner ++# ok t_cmp(Apache2::ServerUtil::get_server_version, $server_descr, ++# 'Apache2::ServerUtil::get_server_version()'); + + Apache2::Const::OK; + } 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 000000000000..e8ec5d0308da --- /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/files/mod_perl-2.0.4-inline.patch b/www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch new file mode 100644 index 000000000000..5c51a803b816 --- /dev/null +++ b/www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/550244 + +taken from Fedora: +http://pkgs.fedoraproject.org/cgit/mod_perl.git/tree/mod_perl-2.0.4-inline.patch?h=f22 + +fixes building with gcc-5: +apache2: Syntax error on line 148 of /etc/apache2/httpd.conf: +Syntax error on line 2 of /etc/apache2/modules.d/75_mod_perl.conf: +Cannot load modules/mod_perl.so into server: +/usr/lib64/apache2/modules/mod_perl.so: undefined symbol: modperl_handler_name + +--- mod_perl-2.0.4/src/modules/perl/modperl_common_util.h.inline ++++ mod_perl-2.0.4/src/modules/perl/modperl_common_util.h +@@ -22,7 +22,7 @@ + #ifdef MP_DEBUG + #define MP_INLINE + #else +-#define MP_INLINE APR_INLINE ++#define MP_INLINE + #endif + + #ifdef CYGWIN diff --git a/www-apache/mod_perl/metadata.xml b/www-apache/mod_perl/metadata.xml new file mode 100644 index 000000000000..28acd8c80937 --- /dev/null +++ b/www-apache/mod_perl/metadata.xml @@ -0,0 +1,15 @@ + + + + + idl0r@gentoo.org + Christian Ruppert + + + perl@gentoo.org + Gentoo Perl Project + + + Build for use with thread-capable perl, needs same setting as in dev-lang/perl + + diff --git a/www-apache/mod_perl/mod_perl-2.0.10.ebuild b/www-apache/mod_perl/mod_perl-2.0.10.ebuild new file mode 100644 index 000000000000..f83252b19f5f --- /dev/null +++ b/www-apache/mod_perl/mod_perl-2.0.10.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit depend.apache apache-module perl-module eutils + +DESCRIPTION="An embedded Perl interpreter for Apache2" +HOMEPAGE="https://perl.apache.org/ https://projects.apache.org/project.html?perl-mod_perl" +SRC_URI="mirror://apache/perl/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="1" +KEYWORDS="alpha amd64 ~arm ppc ppc64 x86" +IUSE="debug ithreads test" + +SRC_TEST=do + +# 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). + +# When all MPMs are disabled via useflags, the apache ebuild selects a +# default one, which will likely need threading... + +RDEPEND=" + dev-lang/perl[ithreads=] + >=dev-perl/Apache-Test-1.400.0 + >=www-servers/apache-2.0.47 + >=dev-libs/apr-util-1.4 + !ithreads? ( www-servers/apache[-apache2_mpms_event,-apache2_mpms_worker,apache2_mpms_prefork] ) +" +DEPEND="${RDEPEND} + dev-perl/Module-Build + test? ( + >=dev-perl/CGI-3.110.0 + dev-perl/Chatbot-Eliza + dev-perl/Devel-Symdump + dev-perl/HTML-Parser + dev-perl/IPC-Run3 + dev-perl/libwww-perl + www-servers/apache[apache2_modules_version,-apache2_modules_unique_id] + !www-apache/mpm_itk + ) +" +PDEPEND=" + >=dev-perl/Apache-Reload-0.130.0 + >=dev-perl/Apache-SizeLimit-0.970.0 +" + +APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so" +APACHE2_MOD_CONF="2.0.3/75_${PN}" +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 + "${FILESDIR}/${PN}"-2.0.10_rc1-Gentoo-not-Unix.patch +) + +src_prepare() { + perl-module_src_prepare + + # chainsaw unbundling + rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/ || die +} + +src_configure() { + local debug=$(usex debug 1 0) + local nothreads=$(usex ithreads 0 1) + myconf=( + MP_USE_DSO=1 + MP_APXS=${APXS} + MP_APR_CONFIG=/usr/bin/apr-1-config + MP_TRACE=${debug} + MP_DEBUG=${debug} + MP_NO_THREADS=${nothreads} + ) + + perl-module_src_configure +} + +src_test() { + # make test notes whether it is running as root, and drops + # privileges all the way to "nobody" if so, so we must adjust + # write permissions accordingly in this case. + + # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail! + if [[ "$(id -u)" == "0" ]]; then + chown nobody:nobody "${WORKDIR}" "${T}" || die + fi + + # We force verbose tests for now to get meaningful bug reports. + MAKEOPTS+=" -j1" + TMPDIR="${T}" HOME="${T}/" TEST_VERBOSE=1 perl-module_src_test +} + +src_install() { + apache-module_src_install + + default + + perl_delete_localpod + perl_delete_packlist + + insinto "${APACHE_MODULES_CONFDIR}" + doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl + + # this is an attempt to get @INC in line with /usr/bin/perl. + # there is blib garbage in the mainstream one that can only be + # useful during internal testing, so we wait until here and then + # just go with a clean slate. should be much easier to see what's + # happening and revert if problematic. + + perl_set_version + sed -i \ + -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \ + -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \ + -e "s,${S}\(/[^[:space:]\"\']\+\)\?,/,g" \ + "${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die + + local fname + for fname in $(find "${D}" -type f -not -name '*.so'); do + grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}" + sed -i -e "s:\(${D}\|${S}\):/:g" ${fname} || die + done + + perl_remove_temppath +} + +pkg_postinst() { + apache-module_pkg_postinst +} -- cgit v1.2.3