Ticket #46339: magicspp-python.patch

File magicspp-python.patch, 2.5 KB (added by larryv (Lawrence Velázquez), 10 years ago)
  • dports/science/magicspp/Portfile

    diff --git a/dports/science/magicspp/Portfile b/dports/science/magicspp/Portfile
    index ffeebc1..80c7b07 100644
    a b perl5.branches 5.8 5.10 5.12 5.16 
    1010
    1111name                magicspp
    1212version             2.22.6
    13 revision            1
     13revision            2
    1414platforms           darwin
    1515maintainers         takeshi
    1616license             Apache-2
    universal_variant no 
    6060if {![fortran_variant_isset]} {
    6161    default_variants-append +gcc48
    6262}
    63 if {![variant_isset python25] && ![variant_isset python26]} {
    64     default_variants-append +python27
    65 }
     63default_variants-append +python27
    6664
    6765use_configure           yes
    6866configure.cmd           cmake
    build.dir ${workpath}/build 
    130128post-destroot {
    131129    xinstall -m 644 ${worksrcpath}/src/common/magics_api.h ${destroot}${prefix}/include
    132130    file rename ${destroot}${prefix}/share/templates ${destroot}${prefix}/share/magics
    133     if {[variant_isset python25] || [variant_isset python26] || [variant_isset python27]} {
     131    if {[variant_isset python27]} {
    134132        file mkdir ${destroot}${frameworks_dir}/Python.framework/Versions/${pyver}/lib/python${pyver}/site-packages
    135133        file rename ${destroot}${prefix}/lib/python${pyver}/site-packages/Magics ${destroot}${frameworks_dir}/Python.framework/Versions/${pyver}/lib/python${pyver}/site-packages
    136134    }
    if {[fortran_variant_isset]} { 
    142140                            -DGFORTRAN_LIB=${prefix}/lib/[fortran_variant_name]/libgfortran.dylib
    143141}
    144142
    145 if {[variant_isset python25]} {
    146     set pyver 2.5
    147 }
    148 if {[variant_isset python26]} {
    149     set pyver 2.6
    150 }
    151143if {[variant_isset python27]} {
    152144    set pyver 2.7
    153 }
    154 if {[variant_isset python25] || [variant_isset python26] || [variant_isset python27]} {
    155145    configure.args-delete   -DENABLE_PYTHON=OFF
    156146    configure.args-append   -DENABLE_PYTHON=ON
    157147    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python${pyver} \
    158148                            -DPYTHON_CONFIG=${prefix}/bin/python${pyver}-config
    159149}
    160150
    161 variant python25 description {Add support for python25} {
    162     depends_lib-append      port:py25-numpy
    163 }
    164 
    165 variant python26 description {Add support for python26} {
    166     depends_lib-append      port:py26-numpy
    167 }
     151# TODO: Remove after 2015-12-26.
     152variant python25 requires python27 description {Legacy variant} {}
     153variant python26 requires python27 description {Legacy variant} {}
    168154
    169155variant python27 description {Add support for python27} {
    170156    depends_lib-append      port:py27-numpy