[115617] trunk/dports/python/py-cvxopt

larryv at macports.org larryv at macports.org
Mon Jan 6 17:32:33 PST 2014


Revision: 115617
          https://trac.macports.org/changeset/115617
Author:   larryv at macports.org
Date:     2014-01-06 17:32:33 -0800 (Mon, 06 Jan 2014)
Log Message:
-----------
py*-cvxopt: Update to 1.1.6 (maintainer, #38887, #40754).

Also:
- Use github-1.0 PortGroup.
- Replace Python 2.5 and 2.6 subports with 3.x subports.
- Use patches instead of reinplaces where convenient.
- Use less confusing reinplaces to enable modules.
- Reword variant descriptions.
- Update homepage.
- Remove pointless configure phase.
- Let github-1.0 handle livecheck.

Modified Paths:
--------------
    trunk/dports/python/py-cvxopt/Portfile

Added Paths:
-----------
    trunk/dports/python/py-cvxopt/files/

Modified: trunk/dports/python/py-cvxopt/Portfile
===================================================================
--- trunk/dports/python/py-cvxopt/Portfile	2014-01-07 00:47:31 UTC (rev 115616)
+++ trunk/dports/python/py-cvxopt/Portfile	2014-01-07 01:32:33 UTC (rev 115617)
@@ -3,10 +3,10 @@
 
 PortSystem          1.0
 PortGroup           python 1.0
+PortGroup           github 1.0
 
+github.setup        cvxopt cvxopt 1.1.6
 name                py-cvxopt
-version             1.1.3
-revision            1
 categories-append   math
 platforms           darwin
 license             GPL-3+
@@ -24,91 +24,54 @@
                     by building on Python's extensive standard library \
                     and on the strengths of Python as a high-level \
                     programming language.
-homepage            http://abel.ee.ucla.edu/cvxopt/
+homepage            http://cvxopt.org/
 
-master_sites        http://abel.ee.ucla.edu/src/
+checksums           rmd160  52069a2a4597b6d6ce6263ebe91e4aab21a4a2cf \
+                    sha256  7b4ccf3ed896dde6624623431c0b1f5e32d874384329ed716f51babcbf416227 
 
-distname            cvxopt-${version}
-checksums           sha1    fe048bd21bb33eb99adb2759eda6f06d7520aa31 \
-                    rmd160  cd0fdf51db957b388803b305f43ff323415b2252
+python.versions     27 31 32 33
 
-python.versions     25 26 27
-
 if {${subport} ne ${name}} {
-    variant atlas description {Use ATLAS as BLAS, LAPACK library} {
+    patchfiles      patch-setup.py.diff
+    patch.pre_args  -p1
+    post-patch {
+        reinplace "s|__PREFIX__|${prefix}|g" setup.py
+    }
+
+    variant atlas description {Use ATLAS for BLAS and LAPACK} {
         depends_lib-append  port:atlas
+        patchfiles-append   atlas.patch
     }
 
-    variant gsl description {Allow linking to gsl} {
+    variant gsl description {Build GSL module} {
         depends_lib-append  port:gsl
+        post-patch {
+            reinplace {s/BUILD_GSL = 0/BUILD_GSL = 1/} setup.py
+        }
     }
 
-    variant fftw description {Link to fftw library} {
+    variant fftw description {Build FFTW module} {
         depends_lib-append  port:fftw-3
+        post-patch {
+            reinplace {s/BUILD_FFTW = 0/BUILD_FFTW = 1/} setup.py
+        }
     }
 
-    variant glpk description {Link to glpk library} {
+    variant glpk description {Build GLPK module} {
         depends_lib-append  port:glpk
+        post-patch {
+            reinplace {s/BUILD_GLPK = 0/BUILD_GLPK = 1/} setup.py
+        }
     }
 
-    variant dsdp description {Link to DSDP library} {
+    variant dsdp description {Build DSDP module} {
         depends_lib-append  port:DSDP
+        post-patch {
+            reinplace {s/BUILD_DSDP = 0/BUILD_DSDP = 1/} setup.py
+        }
     }
 
     default_variants +gsl +glpk +fftw +dsdp
 
-    configure {
-        if {[variant_isset atlas]} {
-            reinplace "s|ATLAS_LIB_DIR = .*|ATLAS_LIB_DIR = '${prefix}/lib'|" \
-                  ${worksrcpath}/src/setup.py
-            
-            # default to cblas if ${prefix}/lib/libblas.dylib doesnt exist
-            if {![file exists ${prefix}/lib/libblas.dylib]} {
-                reinplace "s|libraries = \\(.*\\)'blas'\\(.*\\)|libraries = \\1'cblas'\\2|g" \
-                    ${worksrcpath}/src/setup.py
-            }
-        }
-
-        if {[variant_isset gsl]} {
-            reinplace "s|BUILD_GSL = .*|BUILD_GSL = 1|" \
-                  ${worksrcpath}/src/setup.py
-            reinplace "s|GSL_LIB_DIR = .*|GSL_LIB_DIR = '${prefix}/lib'|" \
-                  ${worksrcpath}/src/setup.py
-            reinplace "s|GSL_INC_DIR = .*|GSL_INC_DIR = '${prefix}/include'|" \
-                  ${worksrcpath}/src/setup.py
-        }
-        if {[variant_isset glpk]} {
-            reinplace "s|BUILD_GLPK = .*|BUILD_GLPK = 1|" \
-                  ${worksrcpath}/src/setup.py
-            reinplace "s|GLPK_LIB_DIR = .*|GLPK_LIB_DIR = '${prefix}/lib'|" \
-                  ${worksrcpath}/src/setup.py
-            reinplace "s|GLPK_INC_DIR = .*|GLPK_INC_DIR = '${prefix}/include'|" \
-                  ${worksrcpath}/src/setup.py
-        }
-        if {[variant_isset fftw]} {
-            reinplace "s|BUILD_FFTW = .*|BUILD_FFTW = 1|" \
-                  ${worksrcpath}/src/setup.py
-            reinplace "s|FFTW_LIB_DIR = .*|FFTW_LIB_DIR = '${prefix}/lib'|" \
-                  ${worksrcpath}/src/setup.py
-            reinplace "s|FFTW_INC_DIR = .*|FFTW_INC_DIR = '${prefix}/include'|" \
-                  ${worksrcpath}/src/setup.py
-        }
-        if {[variant_isset dsdp]} {
-            reinplace "s|BUILD_DSDP = .*|BUILD_DSDP = 1|" \
-                  ${worksrcpath}/src/setup.py
-            reinplace "s|DSDP_LIB_DIR = .*|DSDP_LIB_DIR = '${prefix}/lib'|" \
-                  ${worksrcpath}/src/setup.py
-            reinplace "s|DSDP_INC_DIR = .*|DSDP_INC_DIR = '${prefix}/include'|" \
-                  ${worksrcpath}/src/setup.py
-        }
-    }
-
-    build.dir       ${worksrcpath}/src
-
-    destroot.dir    ${build.dir}
-
     livecheck.type 	none
-} else {
-    livecheck.type 	regex
-    livecheck.regex <h2> Current release </h2><p>Version (.*) includes:</p>
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140106/719b68b8/attachment.html>


More information about the macports-changes mailing list