source: trunk/dports/python/py25-cvxopt/Portfile @ 76473

Last change on this file since 76473 was 76473, checked in by mnick@…, 7 years ago

update to version 1.1.3 (closes #28398)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
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
2# $Id: Portfile 76473 2011-02-24 20:58:11Z mnick@macports.org $
3
4PortSystem         1.0
5PortGroup          python25 1.0
6
7categories-append  math
8name               py25-cvxopt
9version            1.1.3
10distname           cvxopt-${version}
11maintainers        mnick
12platforms          darwin
13license            GPL
14
15description        Python module for convex optimization
16long_description   CVXOPT is a free software package for convex optimization \
17based on the Python programming language. It can be used with the interactive \
18Python interpreter, on the command line by executing Python scripts, or \
19integrated in other software via Python extension modules. Its main purpose is \
20to make the development of software for convex optimization applications \
21straightforward by building on Python's extensive standard library and on the \
22strengths of Python as a high-level programming language.
23
24homepage            http://abel.ee.ucla.edu/cvxopt/
25
26master_sites        http://abel.ee.ucla.edu/src/
27
28checksums           sha1    fe048bd21bb33eb99adb2759eda6f06d7520aa31 \
29                    rmd160  cd0fdf51db957b388803b305f43ff323415b2252
30
31variant atlas description {Use ATLAS as BLAS, LAPACK library} {
32    depends_lib-append port:atlas
33}
34
35variant gsl description {Allow linking to gsl} {
36  depends_lib-append port:gsl
37}
38
39variant fftw description {Link to fftw library} {
40  depends_lib-append port:fftw-3
41}
42
43variant glpk description {Link to glpk library} {
44  depends_lib-append port:glpk
45}
46
47variant dsdp description {Link to DSDP library} {
48  depends_lib-append port:DSDP
49}
50
51default_variants +gsl +glpk +fftw +dsdp
52
53configure {
54    if {[variant_isset atlas]} {
55        reinplace "s|ATLAS_LIB_DIR = .*|ATLAS_LIB_DIR = '${prefix}/lib'|" \
56              ${worksrcpath}/src/setup.py
57       
58        # default to cblas if ${prefix}/lib/libblas.dylib doesnt exist
59        if {![file exists ${prefix}/lib/libblas.dylib]} {
60            reinplace "s|libraries = \\(.*\\)'blas'\\(.*\\)|libraries = \\1'cblas'\\2|g" \
61                ${worksrcpath}/src/setup.py
62        }
63    }
64
65    if {[variant_isset gsl]} {
66        reinplace "s|BUILD_GSL = .*|BUILD_GSL = 1|" \
67              ${worksrcpath}/src/setup.py
68        reinplace "s|GSL_LIB_DIR = .*|GSL_LIB_DIR = '${prefix}/lib'|" \
69              ${worksrcpath}/src/setup.py
70        reinplace "s|GSL_INC_DIR = .*|GSL_INC_DIR = '${prefix}/include'|" \
71              ${worksrcpath}/src/setup.py
72    }
73    if {[variant_isset glpk]} {
74        reinplace "s|BUILD_GLPK = .*|BUILD_GLPK = 1|" \
75              ${worksrcpath}/src/setup.py
76        reinplace "s|GLPK_LIB_DIR = .*|GLPK_LIB_DIR = '${prefix}/lib'|" \
77              ${worksrcpath}/src/setup.py
78        reinplace "s|GLPK_INC_DIR = .*|GLPK_INC_DIR = '${prefix}/include'|" \
79              ${worksrcpath}/src/setup.py
80    }
81    if {[variant_isset fftw]} {
82        reinplace "s|BUILD_FFTW = .*|BUILD_FFTW = 1|" \
83              ${worksrcpath}/src/setup.py
84        reinplace "s|FFTW_LIB_DIR = .*|FFTW_LIB_DIR = '${prefix}/lib'|" \
85              ${worksrcpath}/src/setup.py
86        reinplace "s|FFTW_INC_DIR = .*|FFTW_INC_DIR = '${prefix}/include'|" \
87              ${worksrcpath}/src/setup.py
88    }
89    if {[variant_isset dsdp]} {
90        reinplace "s|BUILD_DSDP = .*|BUILD_DSDP = 1|" \
91              ${worksrcpath}/src/setup.py
92        reinplace "s|DSDP_LIB_DIR = .*|DSDP_LIB_DIR = '${prefix}/lib'|" \
93              ${worksrcpath}/src/setup.py
94        reinplace "s|DSDP_INC_DIR = .*|DSDP_INC_DIR = '${prefix}/include'|" \
95              ${worksrcpath}/src/setup.py
96    }
97}
98
99build.dir ${worksrcpath}/src
100
101destroot.dir ${build.dir}
102
103livecheck.type          regex
104livecheck.regex         <h2> Current release </h2><p>Version (.*) includes:</p>
Note: See TracBrowser for help on using the repository browser.