[72409] trunk/dports/www/ikiwiki/Portfile
tommyd at macports.org
tommyd at macports.org
Wed Oct 13 15:51:15 PDT 2010
Revision: 72409
http://trac.macports.org/changeset/72409
Author: tommyd at macports.org
Date: 2010-10-13 15:51:13 -0700 (Wed, 13 Oct 2010)
Log Message:
-----------
* The variants did not do the right thing as they didn't
hinder us installing ikiwiki into a system with two
or more incompatible perl versions. And since MP has
still not gathered version-specific dependencies, we're
building this on our own here and require that
PREFIX/bin/perl has at least some version we can work
with (5.10 as of now). At the same time we hint the user
at the problems he might run into if he just upgrades
his Perl version from an older version.
(closes #26320)
* Bump ikiwiki's version to 3.20100926
Modified Paths:
--------------
trunk/dports/www/ikiwiki/Portfile
Modified: trunk/dports/www/ikiwiki/Portfile
===================================================================
--- trunk/dports/www/ikiwiki/Portfile 2010-10-13 21:44:41 UTC (rev 72408)
+++ trunk/dports/www/ikiwiki/Portfile 2010-10-13 22:51:13 UTC (rev 72409)
@@ -3,9 +3,8 @@
PortSystem 1.0
PortGroup perl5 1.0
-perl5.setup ikiwiki 3.20100831
+perl5.setup ikiwiki 3.20100926
name ikiwiki
-revision 1
categories www perl
description A wiki compiler.
long_description Ikiwiki is a wiki compiler. It converts wiki pages \
@@ -23,28 +22,12 @@
patchfiles patch-Makefile.PL.diff
-checksums md5 0270ac24e132cf43d96e13e509b1ccdc \
- sha1 7aac193e19b572fa8f5395e2cf6fbc8b85d74f39 \
- rmd160 958591f586aee203cc122c76b8f746602ae59ae8
+checksums md5 34935e59046c73c44b821465e9981e83 \
+ sha1 6d68d75185f8b6d5abffd896319039c205b72b37 \
+ rmd160 ad6691b1903dffb1e2f895ff6c17e79db7173587
depends_build port:coreutils
-if {![variant_isset perl510]} {
- default_variants +perl512
-}
-
-set perl_binary ""
-
-variant perl510 conflicts perl512 description "Require an installed Perl 5.10" {
- depends_build-append port:perl5.10
- set perl_binary "perl5.10"
-}
-
-variant perl512 conflicts perl510 description "Require an installed Perl 5.12" {
- depends_build-append port:perl5.12
- set perl_binary "perl5.12"
-}
-
# needed modules (see Bundle/IkiWiki.pm)
depends_lib-append port:p5-cgi-formbuilder \
port:p5-cgi-session \
@@ -75,8 +58,28 @@
destroot.target CP=gcp install
configure.args INSTALLDIRS=vendor PREFIX=${prefix}
+set min_perl_req "10"
+
+pre-extract {
+ set perl_binary "${prefix}/bin/perl"
+ if { ![file exists ${perl_binary}] } {
+ # This shouldn't happen, because perl is a prereq for installing.
+ ui_error "No Perl version found in ${prefix}/bin."
+ return -code error "${perl_binary} is missing."
+ }
+
+ set min_perl_inst [lindex [split [exec ${perl_binary} -e "printf '%vd\n', $^V"] .] 1]
+ if { ${min_perl_inst} < ${min_perl_req} } {
+ ui_error "The current Perl version does not meet the version requirements"
+ ui_error "(wanted Perl >= 5.${min_perl_req}, got Perl 5.${min_perl_inst})."
+ ui_error "Consider installing Perl 5.${min_perl_req} (or higher), re-install"
+ ui_error "all dependent p5-* modules and then try to install $name again."
+ return -code error "Perl version does not match required version."
+ }
+}
+
post-patch {
- reinplace "s|/usr/bin/perl|${prefix}/bin/${perl_binary}|g" \
+ reinplace "s|/usr/bin/perl|${prefix}/bin/perl|g" \
${worksrcpath}/ikiwiki.in \
${worksrcpath}/IkiWiki.pm \
${worksrcpath}/Makefile.PL \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101013/ed69e516/attachment.html>
More information about the macports-changes
mailing list