<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/270c13b905d57c46140d87b5fc32b3817280dbef">https://github.com/macports/macports-ports/commit/270c13b905d57c46140d87b5fc32b3817280dbef</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 270c13b905d py-pytorch: patch for clang 13 unused-but-set-variable Fixes: https://trac.macports.org/ticket/65501
</span>270c13b905d is described below

<span style='display:block; white-space:pre;color:#808000;'>commit 270c13b905d57c46140d87b5fc32b3817280dbef
</span>Author: Christopher Nielsen <mascguy@github.com>
AuthorDate: Sun Jul 17 17:47:56 2022 -0400

<span style='display:block; white-space:pre;color:#404040;'>    py-pytorch: patch for clang 13 unused-but-set-variable
</span><span style='display:block; white-space:pre;color:#404040;'>    Fixes: https://trac.macports.org/ticket/65501
</span>---
 python/py-pytorch/Portfile                         |  7 +++++-
 .../files/patch-cmake-clang-unused-but-set.diff    | 26 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pytorch/Portfile b/python/py-pytorch/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 968a2720b86..750d12de906 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-pytorch/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-pytorch/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -93,6 +93,11 @@ if {${name} ne ${subport}} {
</span>         system -W ${worksrcpath} "git submodule update --init --recursive"
     }
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    # Resolve issue with Clang 13: warning option 'unused-but-set' not available.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # Fixed by upstream, and will be included in future release.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # See: https://trac.macports.org/ticket/65501
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    patchfiles-append        patch-cmake-clang-unused-but-set.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>     # Patch to fix init issue with google-glog 0.5.0, caused by breaking API change.
     # Refer to patch header for detailed background.
     # Upstream PyTorch issue: https://github.com/pytorch/pytorch/issues/58054
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -117,7 +122,7 @@ if {${name} ne ${subport}} {
</span>         depends_lib-append   port:py${python.version}-mkl
         depends_build-append port:py${python.version}-mkl-include
     }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>     # ZSTD support broke with 1.2.0-1.3.1. Check with future releases.
     build.env-append \
         CMAKE_LIBRARY_PATH=${prefix}/lib:${prefix}/lib/libomp \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pytorch/files/patch-cmake-clang-unused-but-set.diff b/python/py-pytorch/files/patch-cmake-clang-unused-but-set.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..2813d05ea10
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-pytorch/files/patch-cmake-clang-unused-but-set.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#============================================================================================================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Resolve issue with Clang 13, due to warning option 'unused-but-set-variable' not being available.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Fixed by upstream, and will be included in next release.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Details:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# - https://github.com/pytorch/pytorch/issues/74805
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# - https://github.com/pytorch/pytorch/pull/80916
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#============================================================================================================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/cmake/Dependencies.cmake     2022-07-17 17:29:02.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/cmake/Dependencies.cmake     2022-07-17 17:30:28.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -817,8 +817,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     set_property(TARGET fbgemm_avx512 PROPERTY POSITION_INDEPENDENT_CODE ON)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     set_property(TARGET fbgemm PROPERTY POSITION_INDEPENDENT_CODE ON)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.0.0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-        # See https://github.com/pytorch/pytorch/issues/74352
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-        target_compile_options(asmjit PRIVATE -Wno-deprecated-copy -Wno-unused-but-set-variable)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++      # See https://github.com/pytorch/pytorch/issues/74352
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++      target_compile_options(asmjit PRIVATE -Wno-deprecated-copy)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++      if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.6)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++        OR("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0.0))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++        # -Wno-unused-but-set-variable doesn't exist in Apple clang version 13.0.0 (clang-1300.0.29.30)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++        target_compile_options(asmjit PRIVATE -Wno-unused-but-set-variable)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++      endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span></pre><pre style='margin:0'>

</pre>