Skip to content

Commit

Permalink
mod_perl2:
Browse files Browse the repository at this point in the history
update to 2.0.8 to fix build failure with perl5.18 (https://trac.macports.org/ticket/42582; maintainer timeout)
update master_sites
use clang patch for all clangs, not just the clang from the Xcode command line tools
use 'system -W ... "..."' instead of 'system "cd ... && ...'
remove checks for perl's threads and shared variants, because those features were turned on unconditionally and the variants removed in https://trac.macports.org/changeset/94655
install with xinstall rather than using 'system "install ..."'
use notes instead of post-install ui_msgs

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@118330 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
ryandesign committed Mar 30, 2014
1 parent cb08821 commit b7a2ae9
Showing 1 changed file with 19 additions and 30 deletions.
49 changes: 19 additions & 30 deletions www/mod_perl2/Portfile
Expand Up @@ -4,8 +4,7 @@
PortSystem 1.0

name mod_perl2
version 2.0.7
revision 1
version 2.0.8
maintainers cyberscript.net:ryan
categories www
license Apache-2
Expand All @@ -25,44 +24,32 @@ long_description mod_perl brings together the full power of the Perl programming
templating sytems, to complete XML content delivery systems. Web sites like \
Slashdot and Wired Magazine use mod_perl.
homepage http://perl.apache.org/
master_sites http://perl.apache.org/dist/
master_sites apache:perl/
distname mod_perl-${version}

checksums rmd160 14505fd08f6915c8a260c9068608bde6ebcbac24 \
sha256 53414be9db843054b927f23a35edb7b82d99e32e031b3cd81d5ff2473f51e3c6
checksums rmd160 5863f229c1fe982852f05bf5c1af5d28dae28b7f \
sha256 35dc1b7a40a90a395ce88bba2df84f22289975f34d1757de6d715560c20a20e6

depends_lib path:bin/perl:perl5 port:apache2
worksrcdir mod_perl-${version}

if {${configure.compiler} == "clang"} {
if {[string match *clang* ${configure.compiler}]} {
patchfiles-append clang-compatibility_src-modules-perl-modperl_common_util.h.patch
}

pre-configure {
set perl5bin "${prefix}/bin/perl5"
if {[string first "true" [exec ${perl5bin} -V:useshrplib]] == -1} {
ui_error "${name} requires perl5 to be installed with the +shared variant."
return -code error "perl5 must be +shared"
}
if {[string first "define" [exec ${perl5bin} -V:usethreads]] == -1} {
ui_error "${name} requires perl5 to be installed with the +threads variant."
return -code error "perl5 must be +threads"
}
}
set APXS ${prefix}/apache2/bin/apxs

configure {
set APXS ${prefix}/apache2/bin/apxs
system "cd ${workpath}/${worksrcdir} && \
${prefix}/bin/perl Makefile.PL MP_APXS=${APXS}"
system -W ${worksrcpath} "${prefix}/bin/perl Makefile.PL MP_APXS=${APXS}"
}

destroot.violate_mtree yes

post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/apache2/include/modules/perl \
${destroot}${prefix}/apache2/libexec
system "install -m 755 ${worksrcpath}/src/modules/perl/*.h \
${destroot}${prefix}/apache2/include/modules/perl"
eval xinstall -m 755 [glob ${worksrcpath}/src/modules/perl/*.h] \
${destroot}${prefix}/apache2/include/modules/perl

xinstall -m 755 ${worksrcpath}/src/modules/perl/mod_perl.so \
${destroot}${prefix}/apache2/libexec/
Expand All @@ -79,14 +66,16 @@ post-destroot {
}
}

post-install {
ui_msg "\nIf this your first install, you might want to"
ui_msg " * enable mod_perl in apache :\n"
ui_msg "cd ${prefix}/apache2/libexec"
ui_msg "${prefix}/apache2/bin/apxs -a -e -n \"perl\" mod_perl.so\n"
ui_msg " * And then relaunch apache \n"
ui_msg "${prefix}/apache2/bin/apachectl restart\n"
}
notes "
If this your first install, you might want to enable mod_perl in apache:
cd ${prefix}/apache2/libexec
${APXS} -a -e -n \"perl\" mod_perl.so
And then relaunch apache:
${prefix}/apache2/bin/apachectl restart
"

livecheck.url [lindex ${master_sites} 0]
livecheck.type regex
Expand Down

0 comments on commit b7a2ae9

Please sign in to comment.