[76038] contrib/cpan2port/cpan2port

l2g at macports.org l2g at macports.org
Wed Feb 16 23:17:25 PST 2011


Revision: 76038
          http://trac.macports.org/changeset/76038
Author:   l2g at macports.org
Date:     2011-02-16 23:17:24 -0800 (Wed, 16 Feb 2011)
Log Message:
-----------
Don't bother outputting extract.suffix if it's going to be the default
(".tar.gz") anyway

Modified Paths:
--------------
    contrib/cpan2port/cpan2port

Modified: contrib/cpan2port/cpan2port
===================================================================
--- contrib/cpan2port/cpan2port	2011-02-17 07:12:49 UTC (rev 76037)
+++ contrib/cpan2port/cpan2port	2011-02-17 07:17:24 UTC (rev 76038)
@@ -235,22 +235,31 @@
          }
     }
 
-'# -*- 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
-# $I'.'d$
+    my $portfile = <<STOP;
+# -*- 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
 PortGroup       perl5 1.0
-'."
+
 perl5.setup     $$info{prefix} $$info{version}
 platforms       darwin
 maintainers     $$info{maintainers}
 description     $$info{description}
-extract.suffix  .$$info{suffix}
+STOP
+
+    if ( $$info{suffix} ne 'tar.gz' ) {
+        $portfile .= qq{extract.suffix  .$$info{suffix}\n};
+    }
+
+    $portfile .= <<STOP;
 master_sites    http://search.cpan.org/CPAN/authors/id/$$info{cpan_path}
 $checksums
 $depends
 $build_depends
-"
+STOP
+
+    return $portfile;
 }
 
 sub fmt {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110216/116f84ec/attachment.html>


More information about the macports-changes mailing list