Ticket #66271: Portfile-stimfit.diff

File Portfile-stimfit.diff, 4.4 KB (added by neurodroid (Christoph Schmidt-Hieber), 18 months ago)

stimfit Portfile patch

  • Portfile

    diff -ur a/Portfile b/Portfile
    a b  
    22# $Id$
    33PortSystem          1.0
    44PortGroup           wxWidgets 1.0
    5 PortGroup           boost 1.0
    65
    76name                stimfit
    8 version             0.15.8
    9 revision            7
     7version             0.16.2
    108categories          science
    119platforms           darwin
    1210license             GPL-2
     
    1614homepage            http://www.stimfit.org
    1715master_sites        ${homepage}
    1816
    19 checksums           rmd160  960efd2fa4f88aba153af560cc49adc40090995b \
    20                     sha256  0fc6b0f52057d9c45107557e615f314179ac92e180123ed9d1da98e7f812df8b
     17checksums           rmd160  bab67cce67e60bc8251942c83f73f643fae15a5c \
     18                    sha256  309cd3381caabb2d2fdc258520d376e11f8ab2ab047ba7851c3e6ab3ee78e20f
    2119
    22 wxWidgets.use       wxPython-3.0
     20wxWidgets.use       wxWidgets-3.2
    2321
    2422depends_lib         port:fftw-3 \
    2523                    port:hdf5 \
    2624                    port:${wxWidgets.port}
    2725
    28 configure.args      --with-wx-config=${wxWidgets.wxconfig} \
    29                     --disable-dependency-tracking \
     26configure.args      --disable-dependency-tracking \
    3027                    --disable-python \
    31                     --without-biosig
     28                    --with-biosiglite \
     29                    --with-wx-config=${wxWidgets.wxconfig}
    3230
    33 # Only Python 2.7 is supported until wxpython gets available for Python 3.x
    34 variant python27 description {Build with Python shell.} {
    35     depends_build-append \
    36         port:swig-python
     31default_variants    +python310
    3732
    38     depends_lib-append \
    39         port:python27 \
    40         port:py27-wxpython-3.0 \
    41         port:py27-numpy \
    42         port:py27-matplotlib \
    43         port:py27-cvxopt
     33set python_branches {3.9 3.10}
    4434
    45     configure.python \
    46         ${prefix}/bin/python2.7
     35foreach python_branch ${python_branches} {
     36    set python_version [join [lrange [split ${python_branch} .] 0 1] ""]
    4737
    48     configure.args-replace \
    49         --disable-python \
    50         --enable-python
     38    set variant_line {variant python${python_version} description "Enable Python ${python_branch} shell"}
     39
     40    foreach over ${python_branches} {
     41        if {${python_branch} == ${over}} {
     42            continue
     43        }
     44
     45        set over_no_dot [join [lrange [split ${over} .] 0 1] ""]
     46        append variant_line " conflicts python${over_no_dot}"
     47    }
     48    append variant_line { {}}
     49
     50    eval $variant_line
    5151}
    5252
     53foreach python_branch ${python_branches} {
     54    set python_version [join [lrange [split ${python_branch} .] 0 1] ""]
     55    if {[variant_isset python${python_version}]} {
     56        depends_build-append \
     57            port:swig-python
     58
     59        depends_lib-replace \
     60            port:${wxWidgets.port} \
     61            port:py${python_version}-wxpython-4.0
     62
     63        depends_lib-append \
     64            port:python${python_version} \
     65            port:py${python_version}-numpy \
     66            port:py${python_version}-matplotlib \
     67            port:py${python_version}-cvxopt
     68
     69        configure.python \
     70            ${prefix}/bin/python${python_branch}
     71
     72        configure.args-replace \
     73            --disable-python \
     74            --enable-python
     75
     76        configure.args-replace \
     77            --with-wx-config=${wxWidgets.wxconfig} \
     78            --with-wx-config=${frameworks_dir}/Python.framework/Versions/${python_branch}/bin/wx-config
     79    }
     80}
     81
    5382variant atlas description {Use MacPorts ATLAS libraries.} {
    5483    depends_lib-append \
    5584        port:atlas
     
    5887        --with-lapack-lib=${prefix}/lib/libatlas.a
    5988}
    6089
    61 variant biosig conflicts biosiglite description {Use external biosig library for file I/O.} {
    62     depends_lib-append \
    63         port:libbiosig
    64 
    65     configure.args-replace \
    66         --without-biosig \
    67         --with-biosig2
    68 }
    69 
    70 variant biosiglite conflicts biosig description {Use internal biosiglite library for file I/O.} {
    71     configure.args-replace \
    72         --without-biosig \
    73         --with-biosiglite
    74 }
    75 
    7690configure.ldflags-append \
    7791                    -headerpad_max_install_names
    78 
    79 # Commented out for now; will be required when wxpython gets available for Python 3.x
    80 # if {![variant_isset python27]} {
    81 default_variants    +python27
    82 # }
    83 if {![variant_isset biosig]} {
    84     default_variants-append \
    85                     +biosiglite
    86 }
    8792
    8893destroot.destdir    DESTDIR=${destroot}${applications_dir}
    8994