<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/6b305516a2b779b38552c7cf4ed5b25bd878dcca">https://github.com/macports/macports-ports/commit/6b305516a2b779b38552c7cf4ed5b25bd878dcca</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 6b305516a2b779b38552c7cf4ed5b25bd878dcca
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Tue Jun 8 18:24:36 2021 +0100

<span style='display:block; white-space:pre;color:#404040;'>    vigra: simplify setting python variants
</span>---
 graphics/vigra/Portfile | 87 ++++++++++++++++++-------------------------------
 1 file changed, 31 insertions(+), 56 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/vigra/Portfile b/graphics/vigra/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 0a6d511c742..10d1313676c 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/vigra/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/vigra/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -62,7 +62,8 @@ post-patch {
</span> # Some additional parameters for cmake. All other params have already been set
 # by the cmake PortGroup
 configure.args-append   -DWITH_OPENEXR=ON \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-                        -DBUILD_SHARED_LIBS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                        -DBUILD_SHARED_LIBS=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                        -DWITH_VIGRANUMPY=NO
</span> 
 # recursive template instantiation exceeded maximum depth of 128
 configure.cxxflags-append -ftemplate-depth-1024
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -99,67 +100,41 @@ if {[variant_isset valgrind]} {
</span>     configure.args-append -DWITH_VALGRIND=NO
 }
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python27 conflicts python35 python36 python37 python38 python39 description "Also build vigranumpy python27 bindings" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                            -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-2.7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    depends_lib-append  port:python27 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py27-numpy \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py27-sphinx
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    require_active_variants [boost::depends_portname] python27
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python35 conflicts python27 python36 python37 python38 python39 description "Also build vigranumpy python35 bindings" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python3.5 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                            -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-3.5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    depends_lib-append  port:python35 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py35-numpy \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py35-sphinx
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    require_active_variants [boost::depends_portname] python35
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set py_vers [list 2.7 3.5 3.6 3.7 3.8 3.9]
</span> 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python36 conflicts python27 python35 python37 python38 python39 description "Also build vigranumpy python36 bindings" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python3.6 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                            -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-3.6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    depends_lib-append  port:python36 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py36-numpy \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py36-sphinx
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    require_active_variants [boost::depends_portname] python36
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python37 conflicts python27 python35 python36 python38 python39 description "Also build vigranumpy python37 bindings" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python3.7 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                            -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-3.7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    depends_lib-append  port:python37 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py37-numpy \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py37-sphinx
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    require_active_variants [boost::depends_portname] python37
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python38 conflicts python27 python35 python36 python37 python39 description "Also build vigranumpy python38 bindings" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python3.8 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                            -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-3.8
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    depends_lib-append  port:python38 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py38-numpy \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py38-sphinx
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    require_active_variants [boost::depends_portname] python38
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc py_conflict_list {py_vers py_ver} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set py_conf_vers [lsearch -inline -all -not -exact $py_vers $py_ver]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set conf [list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    foreach v [string map {. {}} ${py_conf_vers}] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        lappend conf python${v}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    return ${conf}
</span> }
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python39 conflicts python27 python35 python36 python37 python38 description "Also build vigranumpy python39 bindings" {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python3.9 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                            -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-3.9
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    depends_lib-append  port:python39 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py39-numpy \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:py39-sphinx
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    require_active_variants [boost::depends_portname] python39
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set active_py ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach py_ver ${py_vers} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set py_ver_nodot [string map {. {}} ${py_ver}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if { [variant_isset python${py_ver_nodot}] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set active_py ${py_ver}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set active_py_nodot [string map {. {}} ${py_ver}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    variant python${py_ver_nodot} conflicts [py_conflict_list ${py_vers} ${py_ver}] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        description "Also build vigranumpy python ${py_ver} bindings" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            configure.args-delete  -DWITH_VIGRANUMPY=NO
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            configure.args-append  -DPYTHON_EXECUTABLE=${prefix}/bin/python${active_py} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                   -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-${active_py}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            depends_lib-append  port:python${active_py_nodot} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                port:py${active_py_nodot}-numpy \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                port:py${active_py_nodot}-sphinx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            require_active_variants [boost::depends_portname] python${active_py_nodot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        }
</span> }
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {![variant_isset python27] && ![variant_isset python35] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ${active_py} eq "" } {
</span>     # default for boost
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    default_variants +python39
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-if {![variant_isset python27] && ![variant_isset python35] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    configure.args-append -DWITH_VIGRANUMPY=NO
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set active_py 3.9
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set active_py_nodot [string map {. {}} ${active_py}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    default_variants +python${active_py_nodot}
</span> }
 
 livecheck.version   ${version}
</pre><pre style='margin:0'>

</pre>