[132613] trunk/dports/perl
cal at macports.org
cal at macports.org
Thu Feb 5 15:30:16 PST 2015
Revision: 132613
https://trac.macports.org/changeset/132613
Author: cal at macports.org
Date: 2015-02-05 15:30:15 -0800 (Thu, 05 Feb 2015)
Log Message:
-----------
eperl: Convert to regular port, replaces p5*-eperl, closes #46757, adds support for 5.16-5.20
Modified Paths:
--------------
trunk/dports/perl/eperl/Portfile
trunk/dports/perl/p5-eperl/Portfile
Added Paths:
-----------
trunk/dports/perl/eperl/
Modified: trunk/dports/perl/eperl/Portfile
===================================================================
--- trunk/dports/perl/p5-eperl/Portfile 2015-02-02 19:30:02 UTC (rev 132505)
+++ trunk/dports/perl/eperl/Portfile 2015-02-05 23:30:15 UTC (rev 132613)
@@ -2,36 +2,28 @@
# $Id$
PortSystem 1.0
-PortGroup perl5 1.0
-# replicate perl5.setup to create the subports
-name p5-eperl
+name eperl
version 2.2.14
-revision 6
-distname eperl-${version}
-license {Artistic-1 GPL}
-platforms darwin
-categories perl www
+
maintainers cal openmaintainer
+categories perl www
+platforms darwin
+homepage http://www.ossp.org/pkg/tool/eperl/
+license {Artistic-1 GPL}
description Embedded Perl Language
long_description ePerl interprets an ASCII file bristled with Perl 5 \
program statements by evaluating the Perl 5 code while \
passing through the plain ASCII data.
-homepage http://www.ossp.org/pkg/tool/eperl/
+master_sites http://distcache.freebsd.org/ports-distfiles/
-master_sites ftp://ftp.ossp.org/pkg/tool/eperl/ \
- ftp://freebsd.isc.org/pub/FreeBSD/ports/distfiles/ \
- http://freebsd.isc.org/pub/FreeBSD/ports/distfiles/
-
checksums rmd160 708c72d4a2bc494e9b3e953aa13efd0fe7933b98 \
sha256 a9add61ed59e3030027e0ff5c00195627d7309be48162c9b315f57d27730a295
use_configure yes
-perl5.branches 5.16
-
## Most patches are copied from the Debian distribution, which uses patch
## files with a prefix
patch.pre_args -p1
@@ -44,55 +36,60 @@
0007-debian-2.2.14-16-modified-and-added-shtool.diff \
0008-wml-2.0.11-merge.diff \
0009-configure-use-correct-perl.diff \
- 0010-redhat-with-thr.diff
+ 0010-redhat-with-thr.diff
-if {$subport != $name} {
- post-patch {
- # this file is added by 0007-*.diff, but must be executable
- file attributes "${worksrcpath}/etc/shtool" -permissions +x
- }
+post-patch {
+ # this file is added by 0007-*.diff, but must be executable
+ file attributes "${worksrcpath}/etc/shtool" -permissions +x
}
-# replaced_by and subport magic
-if {[string match p5-* $name]} {
- set rootname [string range $name 3 end]
+configure.args --enable-debug \
+ CC=\"${configure.cc} [get_canonical_archflags cc]\" \
+ LD=\"${configure.cc} [get_canonical_archflags ld]\"
- foreach v ${perl5.branches} {
- subport p${v}-${rootname} {
- depends_lib port:perl${v}
- perl5.major ${v}
- livecheck.type none
- }
+destroot.destdir prefix=${destroot}${prefix} \
+ mandir=${destroot}${prefix}/share/man/man1
+
+test.run yes
+
+# Choose the perl versions to support
+set perlversions {5.16 5.18 5.20}
+# Set the version that should be used as default
+set defaultversion 5.16
+
+# Internal helper variables
+set default_version [string map {. _} $defaultversion]
+set nondefault_set no
+
+# Generate the perl variants
+foreach perlversion $perlversions {
+ set variantname "perl[string map {. _} $perlversion]"
+
+ # so, if Tcl did support map… http://wiki.tcl.tk/12848
+ set conflicts [list]
+ foreach otherversion [lsearch -all -inline -not -exact -sorted $perlversions $perlversion] {
+ lappend conflicts "perl[string map {. _} $otherversion]"
}
- if {$subport == $name} {
- perl5.major
- distfiles
- supported_archs noarch
- replaced_by p[option perl5.default_branch]-${rootname}
- depends_lib port:p[option perl5.default_branch]-${rootname}
- use_configure no
- patch {}
- build {}
- destroot {
- xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
- system "echo $name is a stub port > ${destroot}${prefix}/share/doc/${name}/README"
- }
+ variant $variantname description "Use perl ${perlversion}" conflicts {*}$conflicts [subst {
+ depends_lib-append port:perl${perlversion}
- livecheck.type regex
- livecheck.version ${version}
- livecheck.url ${homepage}
- livecheck.regex {class="heavy">(\d+(?:\.\d+)*)<}
+ configure.args-append ${prefix}/bin/perl${perlversion}
+ }]
+
+ if {[variant_isset $variantname] && $perlversion ne $defaultversion} {
+ set nondefault_set yes
}
}
-# keep this behind the block setting perl5.major
-configure.args --with-perl=${perl5.bin} \
- --enable-debug \
- CC=\"${configure.cc} [get_canonical_archflags cc]\" \
- LD=\"${configure.cc} [get_canonical_archflags ld]\"
+if {![tbool nondefault_set]} {
+ default_variants +perl${default_version}
+ if {![variant_isset perl${default_version}]} {
+ ui_error "${name}: You must choose at least one perl variant"
+ error "Error evaluating variants"
+ }
+}
-destroot.destdir prefix=${destroot}${prefix} \
- mandir=${destroot}${prefix}/share/man/man1
-
-test.run yes
+livecheck.type regex
+livecheck.url ${homepage}
+livecheck.regex {class="heavy">(\d+(?:\.\d+)*)<}
Modified: trunk/dports/perl/p5-eperl/Portfile
===================================================================
--- trunk/dports/perl/p5-eperl/Portfile 2015-02-05 22:56:27 UTC (rev 132612)
+++ trunk/dports/perl/p5-eperl/Portfile 2015-02-05 23:30:15 UTC (rev 132613)
@@ -1,98 +1,18 @@
# -*- 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
+PortSystem 1.0
+name p5-eperl
+version 2.2.14
+revision 7
-# replicate perl5.setup to create the subports
-name p5-eperl
-version 2.2.14
-revision 6
-distname eperl-${version}
-license {Artistic-1 GPL}
-platforms darwin
-categories perl www
-maintainers cal openmaintainer
+license Permissive
+platforms darwin
+maintainers nomaintainer
-description Embedded Perl Language
-long_description ePerl interprets an ASCII file bristled with Perl 5 \
- program statements by evaluating the Perl 5 code while \
- passing through the plain ASCII data.
+subport p5.16-eperl {}
+subport p5.18-eperl {}
+subport p5.20-eperl {}
-homepage http://www.ossp.org/pkg/tool/eperl/
-
-master_sites ftp://ftp.ossp.org/pkg/tool/eperl/ \
- ftp://freebsd.isc.org/pub/FreeBSD/ports/distfiles/ \
- http://freebsd.isc.org/pub/FreeBSD/ports/distfiles/
-
-checksums rmd160 708c72d4a2bc494e9b3e953aa13efd0fe7933b98 \
- sha256 a9add61ed59e3030027e0ff5c00195627d7309be48162c9b315f57d27730a295
-
-use_configure yes
-
-perl5.branches 5.16 5.18 5.20
-
-## Most patches are copied from the Debian distribution, which uses patch
-## files with a prefix
-patch.pre_args -p1
-patchfiles 0001-copyright-updates.diff \
- 0002-eperl_2.2.14-15.2.diff \
- 0003-fix-spelling-errors.diff \
- 0004-document-double-shebang.diff \
- 0005-fix-preprocessor-comments-to-behave-as-documented.diff \
- 0006-fix-format-string-error-in-perl-stderr.diff \
- 0007-debian-2.2.14-16-modified-and-added-shtool.diff \
- 0008-wml-2.0.11-merge.diff \
- 0009-configure-use-correct-perl.diff \
- 0010-redhat-with-thr.diff
-
-if {$subport != $name} {
- post-patch {
- # this file is added by 0007-*.diff, but must be executable
- file attributes "${worksrcpath}/etc/shtool" -permissions +x
- }
-}
-
-# replaced_by and subport magic
-if {[string match p5-* $name]} {
- set rootname [string range $name 3 end]
-
- foreach v ${perl5.branches} {
- subport p${v}-${rootname} {
- depends_lib port:perl${v}
- perl5.major ${v}
- livecheck.type none
- }
- }
-
- if {$subport == $name} {
- perl5.major
- distfiles
- supported_archs noarch
- replaced_by p[option perl5.default_branch]-${rootname}
- depends_lib port:p[option perl5.default_branch]-${rootname}
- use_configure no
- patch {}
- build {}
- destroot {
- xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
- system "echo $name is a stub port > ${destroot}${prefix}/share/doc/${name}/README"
- }
-
- livecheck.type regex
- livecheck.version ${version}
- livecheck.url ${homepage}
- livecheck.regex {class="heavy">(\d+(?:\.\d+)*)<}
- }
-}
-
-# keep this behind the block setting perl5.major
-configure.args --with-perl=${perl5.bin} \
- --enable-debug \
- CC=\"${configure.cc} [get_canonical_archflags cc]\" \
- LD=\"${configure.cc} [get_canonical_archflags ld]\"
-
-destroot.destdir prefix=${destroot}${prefix} \
- mandir=${destroot}${prefix}/share/man/man1
-
-test.run yes
+replaced_by eperl
+PortGroup obsolete 1.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150205/e48679b0/attachment.html>
More information about the macports-changes
mailing list