Switching to Perl 5.16
Jeremy Huddleston Sequoia
jeremyhu at macports.org
Mon Jul 1 11:45:14 PDT 2013
On Jul 1, 2013, at 10:58 AM, Jeremy Huddleston Sequoia <jeremyhu at apple.com> wrote:
>> Still doesn't work. perl5.major isn't guaranteed to be the same at build
>> time and activation time. (And what do dependents use for INTLTOOL_PERL?)
>
> So then do we really need variants for each perl version in each dependent application? Should we add logic to the perl5 port group that used perl5_Y variants for this stuff? I don't want to see that mess land in Portfiles like it has for python.
>
>
>> The problem isn't really with intltool itself, it's that the autoconf
>> macro isn't smart enough to figure out which perl intltool is using on
>> its own. (Or possibly that it even cares about such a thing; shouldn't
>> the presence of a working intltool be enough without also checking for
>> an implementation detail such as XML::Parser?)
>
> I agree with that statement, but I also think we need a solution to the general problem of "hey I need perl with these modules, and I don't care what version of perl it is"
So then I guess we're basically stuck with recipes like this … right?:
Index: Portfile
===================================================================
--- Portfile (revision 107497)
+++ Portfile (working copy)
@@ -5,6 +5,7 @@
name intltool
version 0.50.2
+revision 1
maintainers nomaintainer
categories textproc gnome
license GPL-2+
@@ -30,15 +31,37 @@
sha256 67f25c5c6fb71d095793a7f895b245e65e829e8bde68c6c8b4c912144ff34406
depends_build port:gnome-common
-depends_lib port:expat \
- port:perl5.12 \
- port:p5.12-xml-parser \
- port:p5.12-getopt-long \
- port:p5.12-pathtools \
- port:p5.12-scalar-list-utils
+depends_lib port:expat
-configure.perl ${prefix}/bin/perl5.12
+# TODO: This perlver cruft should be done in the perl5 PortGroup
+if {[variant_isset perl5_8]} {
+ set perlver 5.8
+} elseif {[variant_isset perl5_10]} {
+ set perlver 5.10
+} elseif {[variant_isset perl5_14]} {
+ set perlver 5.14
+} elseif {[variant_isset perl5_16]} {
+ set perlver 5.16
+} else {
+ set perlver 5.12
+ default_variants +perl5_12
+}
+variant perl5_8 conflicts perl5_10 perl5_12 perl5_14 perl5_16 description {use perl 5.8} {}
+variant perl5_10 conflicts perl5_8 perl5_12 perl5_14 perl5_16 description {use perl 5.10} {}
+variant perl5_12 conflicts perl5_8 perl5_10 perl5_14 perl5_16 description {use perl 5.12} {}
+variant perl5_14 conflicts perl5_8 perl5_10 perl5_12 perl5_16 description {use perl 5.14} {}
+variant perl5_16 conflicts perl5_8 perl5_10 perl5_12 perl5_14 description {use perl 5.16} {}
+
+depends_lib-append \
+ port:perl${perlver} \
+ port:p${perlver}-xml-parser \
+ port:p${perlver}-getopt-long \
+ port:p${perlver}-pathtools \
+ port:p${perlver}-scalar-list-utils
+
+configure.perl ${prefix}/bin/perl${perlver}
+
test.run yes
test.target check
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130701/1f64bc63/attachment-0001.p7s>
More information about the macports-dev
mailing list