commit: e1e7598335f12aa5cfd328de0c09da3e2b6a3417 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> AuthorDate: Fri Sep 30 17:12:01 2016 +0000 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> CommitDate: Fri Sep 30 17:12:01 2016 +0000 URL: https://gitweb.gentoo.org/dev/dilfridge.git/commit/?id=e1e75983
www-apache/mod_perl: Start simplifying Package-Manager: portage-2.3.0 www-apache/mod_perl/Manifest | 1 - .../mod_perl/mod_perl-2.0.10_pre201601-r1.ebuild | 127 +++++++++++++++++++++ 2 files changed, 127 insertions(+), 1 deletion(-) diff --git a/www-apache/mod_perl/Manifest b/www-apache/mod_perl/Manifest index 3c73173..9d6f756 100644 --- a/www-apache/mod_perl/Manifest +++ b/www-apache/mod_perl/Manifest @@ -1,2 +1 @@ DIST mod_perl-2.0.10_pre201601.tar.gz 3854229 SHA256 a89c23b66b21c600b74a48125c02c91159c07b08cc07fb4f55015e8e07713697 SHA512 04e57e79031374f3ec432e950fb9f79d1202da9dfc0d86a5137b7346c18f313a4e58ecfffed51efd7e6494baec86b22a42d6712ce5f7824f9f479c05bac00659 WHIRLPOOL 5d37b067aa945cafc0cc7a1f1b27257d8409f6804f22880ae7fd6c21424bbd2c07bace483d95590d255678725f67d081741978cff24cfc91716c08294547e622 -DIST mod_perl-2.0.8.tar.gz 3790026 SHA256 35dc1b7a40a90a395ce88bba2df84f22289975f34d1757de6d715560c20a20e6 SHA512 d5090651699c4436fe8d0a525226543c971aa05db337dc1b1e89023183df1c7dd8b8775f3a0f7d3b9ec40e8c058ac23bd24141cf15a5fe5806226d634dfb4c87 WHIRLPOOL d22e1c353339b08ad752e9f9c7fc0ec4d6a173c4cd3004380b14098e1028737e0eb69d2f56dbe0da3cbfb01b31232c5073d7edb28bf4fed6b2ccd67b09ad7080 diff --git a/www-apache/mod_perl/mod_perl-2.0.10_pre201601-r1.ebuild b/www-apache/mod_perl/mod_perl-2.0.10_pre201601-r1.ebuild new file mode 100644 index 0000000..1fac22f --- /dev/null +++ b/www-apache/mod_perl/mod_perl-2.0.10_pre201601-r1.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit depend.apache apache-module perl-module eutils + +DESCRIPTION="An embedded Perl interpreter for Apache2" +HOMEPAGE="https://perl.apache.org/" +#SRC_URI="mirror://apache/perl/${P}.tar.gz" +SRC_URI="http://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="1" +#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug" + +# 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 + + +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 +" +RDEPEND="${DEPEND} +" + +APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so" +APACHE2_MOD_CONF="2.0.3/75_${PN}" +APACHE2_MOD_DEFINE="PERL" + +need_apache2 + +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" + 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 +} + +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}" + 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 +} + +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}" + 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. + + # Sorry for this evil hack... + perl_set_version # just to be sure... + 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 + + 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} + done + # All the rest + perl_remove_temppath +} + +pkg_postinst() { + apache-module_pkg_postinst +}
