[82629] trunk/dports/www/ikiwiki/Portfile

dports at macports.org dports at macports.org
Tue Aug 16 21:45:23 PDT 2011


Revision: 82629
          http://trac.macports.org/changeset/82629
Author:   dports at macports.org
Date:     2011-08-16 21:45:21 -0700 (Tue, 16 Aug 2011)
Log Message:
-----------
ikiwiki: update for perl portgroup changes:
 * specify perl5.major
 * fix mangling of version number
 * remove the build-time version check on $prefix/bin/perl

Modified Paths:
--------------
    trunk/dports/www/ikiwiki/Portfile

Modified: trunk/dports/www/ikiwiki/Portfile
===================================================================
--- trunk/dports/www/ikiwiki/Portfile	2011-08-17 04:30:20 UTC (rev 82628)
+++ trunk/dports/www/ikiwiki/Portfile	2011-08-17 04:45:21 UTC (rev 82629)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 
 PortSystem 1.0
@@ -3,6 +4,10 @@
 PortGroup perl5 1.0
 
-perl5.setup             ikiwiki 3.20110608
 name                    ikiwiki
+perl5.major             5.12
+perl5.setup             ikiwiki 3.20110608
+# reset version because perl5 portgroup incorrectly converts it
+version                 3.20110608
+revision                1
 categories              www perl
 description             A wiki compiler.
@@ -36,57 +41,37 @@
 depends_build           port:coreutils
 
 # needed modules (see Bundle/IkiWiki.pm)
-depends_lib-append      port:p5-cgi-formbuilder \
-                        port:p5-cgi-session \
-                        port:p5-data-dumper \
-                        port:p5-html-parser \
-                        port:p5-html-scrubber \
-                        port:p5-html-template \
-                        port:p5-html-tree \
-                        port:p5-mail-sendmail \
-                        port:p5-text-markdown \
-                        port:p5-uri \
-                        port:p5-timedate \
-                        port:p5-xml-simple
+depends_lib-append      port:p${perl5.major}-cgi-formbuilder \
+                        port:p${perl5.major}-cgi-session \
+                        port:p${perl5.major}-data-dumper \
+                        port:p${perl5.major}-html-parser \
+                        port:p${perl5.major}-html-scrubber \
+                        port:p${perl5.major}-html-template \
+                        port:p${perl5.major}-html-tree \
+                        port:p${perl5.major}-mail-sendmail \
+                        port:p${perl5.major}-text-markdown \
+                        port:p${perl5.major}-uri \
+                        port:p${perl5.major}-timedate \
+                        port:p${perl5.major}-xml-simple
 
 # a couple of optional extra modules bundled from MacPorts used by plugins
 # (for a complete list see Bundle/IkiWiki/Extras.pm)
-depends_lib-append      port:p5-crypt-ssleay \
-                        port:p5-digest-sha1 \
-                        port:p5-file-mimeinfo \
-                        port:p5-locale-gettext \
-                        port:p5-rpc-xml \
-                        port:p5-term-readline-gnu \
-                        port:p5-text-csv \
-                        port:p5-text-wikiformat \
-                        port:p5-xml-feed \
-                        port:p5-yaml
+depends_lib-append      port:p${perl5.major}-crypt-ssleay \
+                        port:p${perl5.major}-digest-sha1 \
+                        port:p${perl5.major}-file-mimeinfo \
+                        port:p${perl5.major}-locale-gettext \
+                        port:p${perl5.major}-rpc-xml \
+                        port:p${perl5.major}-term-readline-gnu \
+                        port:p${perl5.major}-text-csv \
+                        port:p${perl5.major}-text-wikiformat \
+                        port:p${perl5.major}-xml-feed \
+                        port:p${perl5.major}-yaml
 
 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|g" \
+    reinplace "s|/usr/bin/perl|${prefix}/bin/perl${perl5.major}|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/20110816/f85a746b/attachment-0001.html>


More information about the macports-changes mailing list