Ticket #46570: openbrowser-perl-variants.diff

File openbrowser-perl-variants.diff, 1.7 KB (added by mojca (Mojca Miklavec), 10 years ago)
  • Portfile

     
    22# $Id$
    33
    44PortSystem              1.0
     5PortGroup               perl5 1.0
    56
    67name                    openbrowser
    78version                 1.0.1
     
    2425
    2526distfiles
    2627
    27 variant perl5_12 conflicts perl5_14 perl5_16 perl5_18 description {use perl 5.12} {}
    28 variant perl5_14 conflicts perl5_12 perl5_16 perl5_18 description {use perl 5.14} {}
    29 variant perl5_16 conflicts perl5_12 perl5_14 perl5_18 description {use perl 5.16} {}
    30 variant perl5_18 conflicts perl5_12 perl5_14 perl5_16 description {use perl 5.18} {}
    31 if {![variant_isset perl5_12] && ![variant_isset perl5_14] && ![variant_isset perl5_16] && ![variant_isset perl5_18]} {
    32     default_variants +perl5_16
    33 }
     28perl5.require_variant   yes
     29perl5.conflict_variants yes
     30perl5.branches          5.16 5.18 5.20
     31perl5.create_variants   ${perl5.branches}
    3432
    35 if {[variant_isset perl5_12]} {
    36     set perl_version 5.12
    37 } elseif {[variant_isset perl5_14]} {
    38     set perl_version 5.14
    39 } elseif {[variant_isset perl5_16]} {
    40     set perl_version 5.16
    41 } elseif {[variant_isset perl5_18]} {
    42     set perl_version 5.18
    43 }
     33depends_lib
     34depends_run-append      port:perl${perl5.major} \
     35                        port:p${perl5.major}-mac-propertylist
    4436
    45 depends_run-append      port:p${perl_version}-mac-propertylist
    46 
    4737extract.mkdir           yes
    4838
    4939configure {
     
    5141}
    5242
    5343build {
    54     reinplace "s|/usr/bin/env perl|${prefix}/bin/perl${perl_version}|g" ${worksrcpath}/${name}
     44    reinplace "s|/usr/bin/env perl|${prefix}/bin/perl${perl5.major}|g" ${worksrcpath}/${name}
    5545}
    5646
    5747destroot {