[143328] trunk/dports/devel/ossp-uuid/Portfile

devans at macports.org devans at macports.org
Sat Dec 12 09:31:18 PST 2015


Revision: 143328
          https://trac.macports.org/changeset/143328
Author:   devans at macports.org
Date:     2015-12-10 16:10:20 -0800 (Thu, 10 Dec 2015)
Log Message:
-----------
ossp-uuid: use perl5 port group to create variants, allow port group to set default variant.

Modified Paths:
--------------
    trunk/dports/devel/ossp-uuid/Portfile

Modified: trunk/dports/devel/ossp-uuid/Portfile
===================================================================
--- trunk/dports/devel/ossp-uuid/Portfile	2015-12-11 00:01:46 UTC (rev 143327)
+++ trunk/dports/devel/ossp-uuid/Portfile	2015-12-11 00:10:20 UTC (rev 143328)
@@ -2,7 +2,8 @@
 # $Id$
 
 PortSystem              1.0
-PortGroup muniversal    1.0
+PortGroup               muniversal 1.0
+PortGroup               perl5 1.0
 
 name                    ossp-uuid
 version                 1.6.2
@@ -69,44 +70,36 @@
     file rename -force ${destroot}${prefix}/share/man/man1/uuid-config.1 ${destroot}${prefix}/share/man/man1/ossp-uuid-config.1
 }
 
-variant perl5_16 conflicts perl5_18 perl5_20 perl5_22 description {Perl bindings with perl 5.16} {
-    depends_lib-append     port:perl5.16
+# use perl5 port group to create variants
+# allow port group to set default variant
+# perl support is possibly required by dependents rpm5[234] (unverified)
+
+perl5.conflict_variants yes
+perl5.branches 5.16 5.18 5.20 5.22
+perl5.create_variants ${perl5.branches}
+
+if {[variant_isset perl5_22]} {
     configure.args-delete   --without-perl
     configure.args-append   --with-perl --with-perl-compat
-    configure.env-append   PERL=${prefix}/bin/perl5.16
-    patchfiles-append      patch-uuid-uuid.h.in.diff
-}
-
-variant perl5_18 conflicts perl5_16 perl5_20 perl5_22 description {Perl bindings with perl 5.18} {
-    depends_lib-append      port:perl5.18
+    configure.perl          ${prefix}/bin/perl5.22
+    patchfiles-append       patch-uuid-uuid.h.in.diff
+} elseif {[variant_isset perl5_20]} {
     configure.args-delete   --without-perl
     configure.args-append   --with-perl --with-perl-compat
-    configure.env-append   PERL=${prefix}/bin/perl5.18
-    patchfiles-append      patch-uuid-uuid.h.in.diff
-}
-
-variant perl5_20 conflicts perl5_16 perl5_18 perl5_22 description {Perl bindings with perl 5.20} {
-    depends_lib-append      port:perl5.20
+    configure.perl          ${prefix}/bin/perl5.20
+    patchfiles-append       patch-uuid-uuid.h.in.diff
+} elseif {[variant_isset perl5_18]} {
     configure.args-delete   --without-perl
     configure.args-append   --with-perl --with-perl-compat
-    configure.env-append   PERL=${prefix}/bin/perl5.20
-    patchfiles-append      patch-uuid-uuid.h.in.diff
-}
-
-variant perl5_22 conflicts perl5_16 perl5_18 perl5_20 description {Perl bindings with perl 5.22} {
-    depends_lib-append      port:perl5.22
+    configure.perl          ${prefix}/bin/perl5.18
+    patchfiles-append       patch-uuid-uuid.h.in.diff
+} elseif {[variant_isset perl5_16]} {
     configure.args-delete   --without-perl
     configure.args-append   --with-perl --with-perl-compat
-    configure.env-append   PERL=${prefix}/bin/perl5.22
-    patchfiles-append      patch-uuid-uuid.h.in.diff
+    configure.perl          ${prefix}/bin/perl5.16
+    patchfiles-append       patch-uuid-uuid.h.in.diff
 }
 
-# default variant is possibly required by rpm5[234] (unverified)
-
-if {![variant_isset perl5_18] && ![variant_isset perl5_20] && ![variant_isset perl5_22]} {
-    default_variants    +perl5_16
-}
-
 test.run                yes
 test.target             check
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/3c8e3e12/attachment-0001.html>


More information about the macports-changes mailing list