Ticket #38887: py-cvxopt_Portfile.3.diff

File py-cvxopt_Portfile.3.diff, 4.8 KB (added by jjstickel (Jonathan Stickel), 11 years ago)
  • python/py-cvxopt/Portfile

    old new  
    1 # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    22# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $
    33
    44PortSystem         1.0
    55PortGroup          python 1.0
     6PortGroup          github 1.0
     7
     8github.setup       cvxopt cvxopt 1.1.6
    69
    7 categories-append  math
    810name               py-cvxopt
    9 version            1.1.3
    10 revision           1
    11 distname           cvxopt-${version}
    12 maintainers        nomaintainer
     11categories-append  math
     12maintainers        gmail.com:jjstickel openmaintainer
    1313platforms          darwin
    1414license            GPL-3+
    1515
     
    2222straightforward by building on Python's extensive standard library and on the \
    2323strengths of Python as a high-level programming language.
    2424
    25 homepage            http://abel.ee.ucla.edu/cvxopt/
     25homepage            http://cvxopt.org/
    2626
    27 master_sites        http://abel.ee.ucla.edu/src/
     27checksums           sha256  7b4ccf3ed896dde6624623431c0b1f5e32d874384329ed716f51babcbf416227 \
     28                    rmd160  52069a2a4597b6d6ce6263ebe91e4aab21a4a2cf
    2829
    29 checksums           sha1    fe048bd21bb33eb99adb2759eda6f06d7520aa31 \
    30                     rmd160  cd0fdf51db957b388803b305f43ff323415b2252
    31 
    32 python.versions     25 26 27
     30python.versions     27 31 32 33
    3331python.default_version 27
    3432
    35 if {${name} ne ${subport}} {
     33if {$subport != $name} {
    3634variant atlas description {Use ATLAS as BLAS, LAPACK library} {
    3735    depends_lib-append port:atlas
    3836}
     
    5755
    5856configure {
    5957    if {[variant_isset atlas]} {
    60         reinplace "s|ATLAS_LIB_DIR = .*|ATLAS_LIB_DIR = '${prefix}/lib'|" \
    61               ${worksrcpath}/src/setup.py
     58        reinplace "s|BLAS_LIB_DIR = .*|BLAS_LIB_DIR = '${prefix}/lib'|" \
     59              ${worksrcpath}/setup.py
    6260       
    63         # default to cblas if ${prefix}/lib/libblas.dylib doesnt exist
    64         if {![file exists ${prefix}/lib/libblas.dylib]} {
    65             reinplace "s|libraries = \\(.*\\)'blas'\\(.*\\)|libraries = \\1'cblas'\\2|g" \
    66                 ${worksrcpath}/src/setup.py
    67         }
     61        # correct targets for blas and lapack libs (libtatlas.dylib)
     62        reinplace "s|BLAS_LIB = \\(.*\\)'blas'\\(.*\\)|BLAS_LIB = \\1'tatlas'\\2|g" \
     63              ${worksrcpath}/setup.py
     64        reinplace "s|LAPACK_LIB = \\(.*\\)'lapack'\\(.*\\)|LAPACK_LIB = \\1'tatlas'\\2|g" \
     65              ${worksrcpath}/setup.py
    6866    }
    6967
    7068    if {[variant_isset gsl]} {
    7169        reinplace "s|BUILD_GSL = .*|BUILD_GSL = 1|" \
    72               ${worksrcpath}/src/setup.py
     70              ${worksrcpath}/setup.py
    7371        reinplace "s|GSL_LIB_DIR = .*|GSL_LIB_DIR = '${prefix}/lib'|" \
    74               ${worksrcpath}/src/setup.py
     72              ${worksrcpath}/setup.py
    7573        reinplace "s|GSL_INC_DIR = .*|GSL_INC_DIR = '${prefix}/include'|" \
    76               ${worksrcpath}/src/setup.py
     74              ${worksrcpath}/setup.py
    7775    }
    7876    if {[variant_isset glpk]} {
    7977        reinplace "s|BUILD_GLPK = .*|BUILD_GLPK = 1|" \
    80               ${worksrcpath}/src/setup.py
     78              ${worksrcpath}/setup.py
    8179        reinplace "s|GLPK_LIB_DIR = .*|GLPK_LIB_DIR = '${prefix}/lib'|" \
    82               ${worksrcpath}/src/setup.py
     80              ${worksrcpath}/setup.py
    8381        reinplace "s|GLPK_INC_DIR = .*|GLPK_INC_DIR = '${prefix}/include'|" \
    84               ${worksrcpath}/src/setup.py
     82              ${worksrcpath}/setup.py
    8583    }
    8684    if {[variant_isset fftw]} {
    8785        reinplace "s|BUILD_FFTW = .*|BUILD_FFTW = 1|" \
    88               ${worksrcpath}/src/setup.py
     86              ${worksrcpath}/setup.py
    8987        reinplace "s|FFTW_LIB_DIR = .*|FFTW_LIB_DIR = '${prefix}/lib'|" \
    90               ${worksrcpath}/src/setup.py
     88              ${worksrcpath}/setup.py
    9189        reinplace "s|FFTW_INC_DIR = .*|FFTW_INC_DIR = '${prefix}/include'|" \
    92               ${worksrcpath}/src/setup.py
     90              ${worksrcpath}/setup.py
    9391    }
    9492    if {[variant_isset dsdp]} {
    9593        reinplace "s|BUILD_DSDP = .*|BUILD_DSDP = 1|" \
    96               ${worksrcpath}/src/setup.py
     94              ${worksrcpath}/setup.py
    9795        reinplace "s|DSDP_LIB_DIR = .*|DSDP_LIB_DIR = '${prefix}/lib'|" \
    98               ${worksrcpath}/src/setup.py
     96              ${worksrcpath}/setup.py
    9997        reinplace "s|DSDP_INC_DIR = .*|DSDP_INC_DIR = '${prefix}/include'|" \
    100               ${worksrcpath}/src/setup.py
     98              ${worksrcpath}/setup.py
    10199    }
    102100}
    103101
    104 build.dir ${worksrcpath}/src
    105 
    106102destroot.dir ${build.dir}
    107103
    108104livecheck.type          none