From 7cfe5d9a2c4b809fcfa9b48856adcc28c33e5d6b Mon Sep 17 00:00:00 2001 From: "Andreas K. Hüttel" Date: Sat, 22 Oct 2016 01:28:11 +0200 Subject: www-apache/mod_perl: Better flag handling, force threading support on/off, bug 522698 Package-Manager: portage-2.3.2 --- www-apache/mod_perl/metadata.xml | 5 +- www-apache/mod_perl/mod_perl-2.0.10_rc1-r1.ebuild | 139 ++++++++++++++++++++++ www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild | 138 --------------------- 3 files changed, 143 insertions(+), 139 deletions(-) create mode 100644 www-apache/mod_perl/mod_perl-2.0.10_rc1-r1.ebuild delete mode 100644 www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild (limited to 'www-apache/mod_perl') diff --git a/www-apache/mod_perl/metadata.xml b/www-apache/mod_perl/metadata.xml index f75208ced862..28acd8c80937 100644 --- a/www-apache/mod_perl/metadata.xml +++ b/www-apache/mod_perl/metadata.xml @@ -5,8 +5,11 @@ 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_rc1-r1.ebuild b/www-apache/mod_perl/mod_perl-2.0.10_rc1-r1.ebuild new file mode 100644 index 000000000000..3036d9f7fc57 --- /dev/null +++ b/www-apache/mod_perl/mod_perl-2.0.10_rc1-r1.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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" +SRC_URI="https://dist.apache.org/repos/dist/dev/perl/mod_perl-2.0.10-rc1.tar.gz" + +LICENSE="Apache-2.0" +SLOT="1" +KEYWORDS="~amd64 ~x86" +IUSE="debug ithreads test" + +S=${WORKDIR}/${P/_rc1/-rc1} + +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 + !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] + ) +" +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 +} 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 deleted file mode 100644 index f1db3195b4da..000000000000 --- a/www-apache/mod_perl/mod_perl-2.0.10_rc1.ebuild +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -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" -SRC_URI="https://dist.apache.org/repos/dist/dev/perl/mod_perl-2.0.10-rc1.tar.gz" - -LICENSE="Apache-2.0" -SLOT="1" -KEYWORDS="~amd64 ~x86" -IUSE="debug test apache2_mpms_event apache2_mpms_worker apache2_mpms_prefork" - -S=${WORKDIR}/${P/_rc1/-rc1} - -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-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] ) ) ) -" -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] - ) -" -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) - 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() { - # 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-65-gdbad