<pre style='margin:0'>
Michael Dickens (michaelld) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/81a7e2eb04a817caede82184bb38b7c35cd40a89">https://github.com/macports/macports-ports/commit/81a7e2eb04a817caede82184bb38b7c35cd40a89</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 81a7e2e libiio: add Python variants, default to +python37
</span>81a7e2e is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 81a7e2eb04a817caede82184bb38b7c35cd40a89
</span>Author: Michael Dickens <michaelld@macports.org>
AuthorDate: Wed Dec 11 10:05:31 2019 -0500
<span style='display:block; white-space:pre;color:#404040;'> libiio: add Python variants, default to +python37
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> These don't impact destroot in any significant manner, so no rev-bump.
</span>---
science/libiio/Portfile | 79 ++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 75 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/libiio/Portfile b/science/libiio/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 64d19e9..950513a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/science/libiio/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/libiio/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -92,17 +92,88 @@ configure.args-append \
</span> -DLIBLZMA_LIBRARY:FILEPATH=${prefix}/lib/liblzma.dylib \
-DLIBUSB_INCLUDE_DIR:PATH=${prefix}/include \
-DLIBUSB_LIBRARIES:FILEPATH=${prefix}/lib/libusb-1.0.dylib \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python2.7 \
</span> -DZLIB_INCLUDE_DIR:PATH=${prefix}/include \
-DZLIB_LIBRARY_RELEASE:FILEPATH=${prefix}/lib/libz.dylib \
-DOSX_PACKAGE=OFF \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -DCMAKE_INSTALL_MP_FRAMEWORKS_DIR=${frameworks_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWITH_MATLAB_BINDINGS_API=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# specify the Python dependencies; these are checked for at configure,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# then used for building, but not at runtime.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set pythons_suffixes {27 35 36 37 38}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set pythons_ports {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend pythons_ports python${s}
</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;'>+foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set p python${s}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set v [string index ${s} 0].[string index ${s} 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set i [lsearch -exact ${pythons_ports} ${p}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set c [lreplace ${pythons_ports} ${i} ${i}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant ${p} description "Build ${name} using Python ${v}" conflicts {*}${c} ""
</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;'>+# default to Py37 if not selected by the user
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set selected_python_no_dot 37
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset python${s}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set selected_python_no_dot ${s}
</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;'>+default_variants +python${selected_python_no_dot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# make sure the default python variant wasn't
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# deselected without selecting another one
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set selected_python_no_dot ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset python${s}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set selected_python_no_dot ${s}
</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 {${selected_python_no_dot} eq ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set py_vars ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set final_s [lindex ${pythons_suffixes} end]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${s} eq ${final_s}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set py_vars "${py_vars}or "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set py_vars "${py_vars}+python${s}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${s} ne ${final_s}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set py_vars "${py_vars}, "
</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;'>+ ui_error "\n\nYou must select one of the variants ${py_vars}.\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "Invalid variant selection"
</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;'>+set selected_python_with_dot [join [split ${selected_python_no_dot} ""] "."]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set python_top_dir ${frameworks_dir}/Python.framework/Versions/${selected_python_with_dot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set python_name python${selected_python_with_dot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# required Python
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib-append port:python${selected_python_no_dot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# specify the Python version to use; currently depends on port version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${subport} eq ${name}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DPYTHON_EXECUTABLE=${python_top_dir}/bin/${python_name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DPython_EXECUTABLE=${python_top_dir}/bin/${python_name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
post-destroot {
# move Python install to frameworks_dir for Python
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set py_install_dir ${frameworks_dir}/Python.framework/Versions/2.7/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set py_install_dir ${python_top_dir}/lib
</span> xinstall -m 755 -d ${destroot}${py_install_dir}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- move ${destroot}${prefix}/lib/python2.7 ${destroot}${py_install_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${destroot}${prefix}/lib/${python_name} ${destroot}${py_install_dir}
</span>
# link from iio.framework to normal
set iio_framework_version 0.18
</pre><pre style='margin:0'>
</pre>