<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/1bf00a310fed564c82722fe3887b78ce97ff5043">https://github.com/macports/macports-ports/commit/1bf00a310fed564c82722fe3887b78ce97ff5043</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 1bf00a310fed564c82722fe3887b78ce97ff5043
</span>Author: Sergey Fedorov <barracuda@macos-powerpc.org>
AuthorDate: Thu Jun 20 03:32:27 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> fortran-stdlib: drop unnecessary hackish code to detect ieee_arithmetic presence; add a comment instead
</span>---
lang/fortran-stdlib/Portfile | 64 ++++++++------------------------------------
1 file changed, 11 insertions(+), 53 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/fortran-stdlib/Portfile b/lang/fortran-stdlib/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 57095d41d53..62ffd9bf30a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/fortran-stdlib/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/fortran-stdlib/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -58,60 +58,18 @@ configure.args-append \
</span> -DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# TODO: add gcc13 after it is tested and confirmed to build fine.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# The experimental port was added in https://github.com/macports/macports-ports/pull/20607
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-platform darwin powerpc {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://github.com/fortran-lang/stdlib/issues/690
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # This will normally fail, since atm GCC does not support ieee_arithmetic on Darwin PPC;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # however, we rather make it conditional on the module actually being present for a given compiler.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # See discussion here: https://github.com/iains/darwin-toolchains-start-here/discussions/40
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # These have to be updated following GCC releases:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string match macports-gcc-10 ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_major 10
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_full ${gcc_v_major}.4.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[string match macports-gcc-11 ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_major 11
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_full ${gcc_v_major}.4.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[string match macports-gcc-12 ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_major 12
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_full ${gcc_v_major}.3.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[string match macports-gcc-13 ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_major 13
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_full ${gcc_v_major}.2.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[string match macports-gcc-devel ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_major -devel
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set gcc_v_full 14.0.0
</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;'>- if {${build_arch} eq "ppc"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Macports presently sets incorrect dir name on PowerPC, using build_arch instead of powerpc*; check both:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![file exists "${prefix}/lib/gcc${gcc_v_major}/gcc/powerpc-apple-darwin${os.major}/${gcc_v_full}/finclude/ieee_arithmetic.mod"] \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && ![file exists "${prefix}/lib/gcc${gcc_v_major}/gcc/ppc-apple-darwin${os.major}/${gcc_v_full}/finclude/ieee_arithmetic.mod]"]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- known_fail yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- pre-fetch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "Building ${name} requires ieee_arithmetic module in Gfortran, however it is absent in this GCC version.\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- There is an experimental branch with ieee_arithmetic support for Darwin PowerPC here: https://github.com/barracuda156/gcc-git/tree/gfortran"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "Unsupported compiler."
</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;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${build_arch} eq "ppc64"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Macports presently sets incorrect dir name on PowerPC, using build_arch instead of powerpc*; check both:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![file exists "${prefix}/lib/gcc${gcc_v_major}/gcc/powerpc64-apple-darwin${os.major}/${gcc_v_full}/finclude/ieee_arithmetic.mod"] \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && ![file exists "${prefix}/lib/gcc${gcc_v_major}/gcc/ppc64-apple-darwin${os.major}/${gcc_v_full}/finclude/ieee_arithmetic.mod]"]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- known_fail yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- pre-fetch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "Building ${name} requires ieee_arithmetic module in Gfortran, however it is absent in this GCC version.\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- There is an experimental branch with ieee_arithmetic support for Darwin PowerPC here: https://github.com/barracuda156/gcc-git/tree/gfortran"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "Unsupported compiler."
</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;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Notice that this port requires ieee_arithmetic support in gfortran,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# which may not be available for some targets.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/fortran-lang/stdlib/issues/690
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# In particular, GCC does not support ieee_arithmetic on Darwin PPC yet.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# However, there is an experimental implementation, which will be submitted to GCC upstream.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/barracuda156/gcc-git/tree/gfortran
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# See discussion here: https://github.com/iains/darwin-toolchains-start-here/discussions/40
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# I have dropped checks for ieee_arithmetic module, since those require that directories
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# match exactly; that is fragile and may unnecessarily prevent the port from building.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The right fix is to support ieee_arithmetic in gfortran, not to carry hacks for its detection.
</span>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+platform darwin powerpc {
</span> # See: https://github.com/fortran-lang/stdlib/issues/694
configure.args-append \
-DWITH_XDP=OFF
</pre><pre style='margin:0'>
</pre>