Ticket #46570: xraylib-perl-variants.diff

File xraylib-perl-variants.diff, 2.9 KB (added by mojca (Mojca Miklavec), 10 years ago)

A patch to use perl5_xy variants from the Perl PortGroup in xraylib

  • Portfile

     
    33
    44PortSystem          1.0
    55PortGroup           github 1.0
     6PortGroup           perl5 1.0
    67
    78name                xraylib
    89version             3.1.0
     
    4041use_parallel_build  no
    4142configure.ccache    no
    4243
     44perl5.conflict_variants yes
     45perl5.branches 5.16 5.18 5.20
     46perl5.create_variants ${perl5.branches}
    4347
    44 variant perl5_10 description {Perl 5.10 bindings} conflicts perl5_12 perl5_14 perl5_16 perl5_18 perl5_20 {
    45     configure.args-append --enable-perl --enable-perl-integration PERL=${prefix}/bin/perl5.10
     48if {[variant_isset perl5_16] || [variant_isset perl5_18] || [variant_isset perl5_20]} {
     49    configure.args-append --enable-perl --enable-perl-integration PERL=${prefix}/bin/perl${perl5.major}
    4650    configure.args-delete --disable-perl
    4751    depends_build-append port:swig-perl
    48     depends_lib-append port:perl5.10
    4952}
    5053
    51 variant perl5_12 description {Perl 5.12 bindings} conflicts perl5_10 perl5_14 perl5_16 perl5_18 perl5_20 {
    52     configure.args-append --enable-perl --enable-perl-integration PERL=${prefix}/bin/perl5.12
    53     configure.args-delete --disable-perl
    54     depends_build-append port:swig-perl
    55     depends_lib-append port:perl5.12
    56 }
    57 
    58 variant perl5_14 description {Perl 5.14 bindings} conflicts perl5_10 perl5_12 perl5_16 perl5_18 perl5_20 {
    59     configure.args-append --enable-perl --enable-perl-integration PERL=${prefix}/bin/perl5.14
    60     configure.args-delete --disable-perl
    61     depends_build-append port:swig-perl
    62     depends_lib-append port:perl5.14
    63 }
    64 
    65 variant perl5_16 description {Perl 5.16 bindings} conflicts perl5_10 perl5_12 perl5_14 perl5_18 perl5_20 {
    66     configure.args-append --enable-perl --enable-perl-integration PERL=${prefix}/bin/perl5.16
    67     configure.args-delete --disable-perl
    68     depends_build-append port:swig-perl
    69     depends_lib-append port:perl5.16
    70 }
    71 
    72 variant perl5_18 description {Perl 5.18 bindings} conflicts perl5_10 perl5_12 perl5_14 perl5_16 perl5_20 {
    73     configure.args-append --enable-perl --enable-perl-integration PERL=${prefix}/bin/perl5.18
    74     configure.args-delete --disable-perl
    75     depends_build-append port:swig-perl
    76     depends_lib-append port:perl5.18
    77 }
    78 
    79 variant perl5_20 description {Perl 5.20 bindings} conflicts perl5_10 perl5_12 perl5_14 perl5_16 perl5_18 {
    80     configure.args-append --enable-perl --enable-perl-integration PERL=${prefix}/bin/perl5.20
    81     configure.args-delete --disable-perl
    82     depends_build-append port:swig-perl
    83     depends_lib-append port:perl5.20
    84 }
    85 
    8654variant python26 description {Python 2.6 bindings} conflicts python27 python33 python34 {
    8755    configure.args-append --enable-python --enable-python-integration --enable-python-numpy PYTHON=${prefix}/bin/python2.6
    8856    configure.args-delete --disable-python --disable-python-numpy