<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/8d29d2bab776ff96c378108b8f36149b33a5e61a">https://github.com/macports/macports-ports/commit/8d29d2bab776ff96c378108b8f36149b33a5e61a</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 8d29d2bab77 weechat: Fix +python311
</span>8d29d2bab77 is described below

<span style='display:block; white-space:pre;color:#808000;'>commit 8d29d2bab776ff96c378108b8f36149b33a5e61a
</span>Author: Clemens Lang <cal@macports.org>
AuthorDate: Tue Jan 24 22:57:56 2023 +0100

<span style='display:block; white-space:pre;color:#404040;'>    weechat: Fix +python311
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Append to PKG_CONFIG_PATH instead of patching FindPython.cmake at
</span><span style='display:block; white-space:pre;color:#404040;'>    runtime, because evidently people forget adjusting both the variant
</span><span style='display:block; white-space:pre;color:#404040;'>    definition and the block in post-patch when adding new versions, and
</span><span style='display:block; white-space:pre;color:#404040;'>    this approach does not require source code modification.
</span>---
 irc/weechat/Portfile | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/irc/weechat/Portfile b/irc/weechat/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 0db1e0c891b..13bdcc5f02a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/irc/weechat/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/irc/weechat/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -79,26 +79,36 @@ variant python requires python311 description {Compatibility variant, requires +
</span> 
 variant python37 description "Bindings for Python 3.7 plugins" conflicts python38 python39 python310 python311 {
     configure.args-replace  -DENABLE_PYTHON=OFF -DENABLE_PYTHON=ON
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    configure.pkg_config_path-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                            ${frameworks_dir}/Python.framework/Versions/3.7/lib/pkgconfig
</span>     depends_lib-append      port:python37
 }
 
 variant python38 description "Bindings for Python 3.8 plugins" conflicts python37 python39 python310 python311 {
     configure.args-replace  -DENABLE_PYTHON=OFF -DENABLE_PYTHON=ON
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    configure.pkg_config_path-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                            ${frameworks_dir}/Python.framework/Versions/3.8/lib/pkgconfig
</span>     depends_lib-append      port:python38
 }
 
 variant python39 description "Bindings for Python 3.9 plugins" conflicts python37 python38 python310 python311 {
     configure.args-replace  -DENABLE_PYTHON=OFF -DENABLE_PYTHON=ON
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    configure.pkg_config_path-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                            ${frameworks_dir}/Python.framework/Versions/3.9/lib/pkgconfig
</span>     depends_lib-append      port:python39
 }
 
 variant python310 description "Bindings for Python 3.10 plugins" conflicts python37 python38 python39 python311 {
     configure.args-replace  -DENABLE_PYTHON=OFF -DENABLE_PYTHON=ON
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    configure.pkg_config_path-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                            ${frameworks_dir}/Python.framework/Versions/3.10/lib/pkgconfig
</span>     depends_lib-append      port:python310
 }
 
 variant python311 description "Bindings for Python 3.11 plugins" conflicts python37 python38 python39 python310 {
     configure.args-replace  -DENABLE_PYTHON=OFF -DENABLE_PYTHON=ON
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    configure.pkg_config_path-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                            ${frameworks_dir}/Python.framework/Versions/3.11/lib/pkgconfig
</span>     depends_lib-append      port:python311
 }
 
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -130,19 +140,6 @@ variant ruby32 description "Bindings for Ruby 3.2 plugins" conflicts ruby30 ruby
</span> 
 
 post-patch {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    # specify Python version for CMake to find and use
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    set patchfile ${worksrcpath}/cmake/FindPython.cmake
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    if {[variant_isset python37]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        reinplace -E "s|PYTHON python3|PYTHON python-3.7|g" ${patchfile}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    } elseif {[variant_isset python38]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        reinplace -E "s|PYTHON python3|PYTHON python-3.8|g" ${patchfile}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    } elseif {[variant_isset python39]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        reinplace -E "s|PYTHON python3|PYTHON python-3.9|g" ${patchfile}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    } elseif {[variant_isset python310]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        reinplace -E "s|PYTHON python3|PYTHON python-3.10|g" ${patchfile}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span>     # specify Ruby version for CMake to find and use
     set patchfile ${worksrcpath}/cmake/FindRuby.cmake
 
</pre><pre style='margin:0'>

</pre>