<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/93375c4a40f21a862b00c6c238a7801d036df0dd">https://github.com/macports/macports-ports/commit/93375c4a40f21a862b00c6c238a7801d036df0dd</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 93375c4a40f21a862b00c6c238a7801d036df0dd
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Sat Mar 7 06:41:33 2020 -0700
<span style='display:block; white-space:pre;color:#404040;'> ngsolve: ensure consistent Python with netgen
</span>---
math/ngsolve/Portfile | 63 ++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 50 insertions(+), 13 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/math/ngsolve/Portfile b/math/ngsolve/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index bd4f507..9590f01 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/math/ngsolve/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/math/ngsolve/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,9 +5,10 @@ PortGroup compilers 1.0
</span> PortGroup linear_algebra 1.0
PortGroup github 1.0
PortGroup cmake 1.1
<span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup active_variants 1.1
</span>
github.setup NGSolve ngsolve 6.2.2001 v
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> platforms darwin
categories math
license LGPL-2
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,9 +30,6 @@ compiler.cxx_standard 2017
</span> compilers.choose cc cxx
compilers.setup
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set python_branch 3.7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set python_version [string map {. ""} ${python_branch}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # avoid conflict with atlas
patchfiles-append patch-clapack.h.diff
post-extract {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -39,8 +37,6 @@ post-extract {
</span> ${worksrcpath}/basiclinalg/ng_clapack.h
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-depends_build-append port:pybind11
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> depends_lib-append port:SuiteSparse_AMD \
port:SuiteSparse_CCOLAMD \
port:SuiteSparse_CHOLMOD \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -48,7 +44,6 @@ depends_lib-append port:SuiteSparse_AMD \
</span> port:SuiteSparse_config \
port:jpeg \
port:netgen \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- port:python${python_version} \
</span> port:zlib
configure.args-append -DNETGEN_DIR=${prefix} \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -60,12 +55,54 @@ pre-configure {
</span> configure.args-append ${cmake_linalglib}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-post-destroot {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -d -m 0755 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${frameworks_dir}/Python.framework/Versions/${python_branch}/lib/python${python_branch}/site-packages
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ln -s \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${prefix}/lib/python${python_branch}/site-packages/ngsolve \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${frameworks_dir}/Python.framework/Versions/${python_branch}/lib/python${python_branch}/site-packages/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set pythonversions {3.7 3.8}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set any_python no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach pdv ${pythonversions} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pv [join [lrange [split ${pdv} .] 0 1] ""]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set conflist ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach v ${pythonversions} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${v} ne ${pdv}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set vv [join [lrange [split ${v} .] 0 1] ""]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set conflist "${conflist} python${vv}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant python${pv} conflicts {*}${conflist} description "Add bindings for Python ${pdv}" {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset python${pv}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set any_python yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {!${any_python}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants +python38
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set any_python no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach pdv ${pythonversions} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pv [join [lrange [split ${pdv} .] 0 1] ""]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # settings that depend on loop variables must be set in an appropriate if, not in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # variant declaration scope.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset python${pv}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:python${pv}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:pybind11 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${pv}-pybind11-stubgen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.env-append PATH=${frameworks_dir}/Python.framework/Versions/${pdv}/bin:$env(PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-append PATH=${frameworks_dir}/Python.framework/Versions/${pdv}/bin:$env(PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set any_python yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ require_active_variants netgen python${pv}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d -m 0755 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${frameworks_dir}/Python.framework/Versions/${pdv}/lib/python${pdv}/site-packages
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s ${prefix}/lib/python${pdv}/site-packages/ngsolve \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${frameworks_dir}/Python.framework/Versions/${pdv}/lib/python${pdv}/site-packages/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {!${any_python}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach pdv ${pythonversions} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pv [join [lrange [split ${pdv} .] 0 1] ""]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ require_active_variants netgen "" python${pv}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
post-destroot {
</pre><pre style='margin:0'>
</pre>