<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/09fefbb200ac09d7aec97c992b5302be2fa2c512">https://github.com/macports/macports-ports/commit/09fefbb200ac09d7aec97c992b5302be2fa2c512</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 09fefbb200a avahi: simplify python variant code
</span>09fefbb200a is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 09fefbb200ac09d7aec97c992b5302be2fa2c512
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Jul 4 21:31:42 2023 +1000
<span style='display:block; white-space:pre;color:#404040;'> avahi: simplify python variant code
</span>---
net/avahi/Portfile | 76 +++++++++++++++++++++---------------------------------
1 file changed, 29 insertions(+), 47 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/avahi/Portfile b/net/avahi/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 61432a371a0..92ff8c996c4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/avahi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/avahi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -13,7 +13,7 @@ license LGPL-2.1+
</span> description Avahi is an Implementation of the DNS Service Discovery and Multicast DNS \
specifications for Zeroconf Networking.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-long_description ${description} It uses D-Bus for communication between user applications and a \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description {*}${description} It uses D-Bus for communication between user applications and a \
</span> system daemon. The daemon is used to coordinate application efforts in caching \
replies, necessary to minimize the traffic imposed on networks.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -189,58 +189,40 @@ set py_versions [list \
</span> 3.11 \
]
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc py_ver_set {} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global py_versions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach py_ver ${py_versions} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set py_ver_nodot [string map {. {}} ${py_ver}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set py_variant python${py_ver_nodot}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[variant_isset ${py_variant}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ${py_ver}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach py_ver ${py_versions} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set py_ver_nodot($py_ver) [string map {. ""} ${py_ver}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend py_variants python$py_ver_nodot($py_ver)
</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 py_ver ${py_versions} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set py_variant python$py_ver_nodot($py_ver)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant $py_variant conflicts {*}[ldelete $py_variants $py_variant] description "Build with Python $py_ver" "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global python_framework
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set python_framework ${frameworks_dir}/Python.framework/Versions/${py_ver}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.python ${prefix}/bin/python${py_ver}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:dbus-python$py_ver_nodot($py_ver) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py$py_ver_nodot($py_ver)-gdbm \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py$py_ver_nodot($py_ver)-gobject3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.pkg_config_path-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \${python_framework}/lib/pkgconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset $py_variant]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set py_variant_set 1
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return ""
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc py_setup {py_ver} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global prefix frameworks_dir worksrcpath python_framework
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set py_ver_nodot [string map {"." ""} ${py_ver}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set python_framework ${frameworks_dir}/Python.framework/Versions/${py_ver}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.python ${prefix}/bin/python${py_ver}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append port:dbus-python${py_ver_nodot} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:py${py_ver_nodot}-gdbm \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:py${py_ver_nodot}-gobject3
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.pkg_config_path-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${python_framework}/lib/pkgconfig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- post-patch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|PYTHON_PREFIX=\'\${prefix}\'|PYTHON_PREFIX=\'${python_framework}\'|" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists python_framework]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ error "This port requires that one python variant be enabled"
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python27 conflicts python38 python39 python310 python311 description {Build with Python 2.7} {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python38 conflicts python27 python39 python310 python311 description {Build with Python 3.8} {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python39 conflicts python27 python38 python310 python311 description {Build with Python 3.9} {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python310 conflicts python27 python38 python39 python311 description {Build with Python 3.10} {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-variant python311 conflicts python27 python38 python39 python310 description {Build with Python 3.11} {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-if {[py_ver_set] eq ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_variants +python311
</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;'>-set py_ver [py_ver_set]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${py_ver} ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- py_setup ${py_ver}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|PYTHON_PREFIX=\'\${prefix}\'|PYTHON_PREFIX=\'${python_framework}\'|" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/configure
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-pre-configure {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${py_ver} eq ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- error "This port requires that one python variant be enabled"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {![info exists py_variant_set]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants +python311
</span> }
variant x11 conflicts quartz {
</pre><pre style='margin:0'>
</pre>