<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/adb624d2646818ef3bd623db6634fd89001baf9c">https://github.com/macports/macports-ports/commit/adb624d2646818ef3bd623db6634fd89001baf9c</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit adb624d2646818ef3bd623db6634fd89001baf9c
</span>Author: Fred Wright <fw@fwright.net>
AuthorDate: Wed Feb 28 22:41:08 2024 -0800
<span style='display:block; white-space:pre;color:#404040;'> libffi: Several Portfile fixes and improvements
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This makes a number of changes to the Portfile:
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> 1) Removes the superfluous dependency on expect. This was probably a
</span><span style='display:block; white-space:pre;color:#404040;'> holdover from a time when dejagnu was missing the expect dependency.
</span><span style='display:block; white-space:pre;color:#404040;'> Not only is this dependency superfluous (since the tests don't
</span><span style='display:block; white-space:pre;color:#404040;'> reference expect directly), but it's also more heavy-handed since
</span><span style='display:block; white-space:pre;color:#404040;'> dejagnu's expect dependency only applies when the OS-supplied expect
</span><span style='display:block; white-space:pre;color:#404040;'> is too old.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> 2) Fixes the build to get the default architecture correctly. This is
</span><span style='display:block; white-space:pre;color:#404040;'> a general fix that replaces the narrow fix for the 10.6/ppc/Rosetta
</span><span style='display:block; white-space:pre;color:#404040;'> case. See the Portfile comments for details.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> 3) Removes the tweak to force the use of the integrated assembler when
</span><span style='display:block; white-space:pre;color:#404040;'> building with clang. This is now obsolete (since all builds work
</span><span style='display:block; white-space:pre;color:#404040;'> without it), and causes some slightly inferior results in some tests.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> 4) Made the clearing of cxx_stdlib unconditional. This was only
</span><span style='display:block; white-space:pre;color:#404040;'> being done in the specific case where not doing so led to a circular
</span><span style='display:block; white-space:pre;color:#404040;'> dependency, but since libffi doesn't use C++ at all, it's preferable
</span><span style='display:block; white-space:pre;color:#404040;'> to do it in all cases and avoid unnecessary compiler constraints.
</span><span style='display:block; white-space:pre;color:#404040;'> See the Portfile comments for more details.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> 5) Adds myself as the maintainer (previously nomaintainer).
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Since #3 may affect the installed content in some cases, it includes a
</span><span style='display:block; white-space:pre;color:#404040;'> revbump. No revbumping of dependents is necessary.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> TESTED:
</span><span style='display:block; white-space:pre;color:#404040;'> Tested on 10.4-10.5 ppc, 10.5-10.6 ppc (x86_64 Rosetta), 10.4-10.6
</span><span style='display:block; white-space:pre;color:#404040;'> i386, 10.4-12.x x86_64, and 11.x-14.x arm64.
</span><span style='display:block; white-space:pre;color:#404040;'> Builds on all tested platforms except 10.5 ppc +universal, with
</span><span style='display:block; white-space:pre;color:#404040;'> test results equal to or better than the previous state.
</span>---
devel/libffi/Portfile | 48 ++++++++++++++++++++++++++++++++----------------
1 file changed, 32 insertions(+), 16 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libffi/Portfile b/devel/libffi/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index f995e2ad417..0050876e593 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/libffi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/libffi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,7 +5,7 @@ PortGroup muniversal 1.0
</span> PortGroup github 1.0
github.setup libffi libffi 3.4.6 v
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span>
checksums rmd160 8e927f6bc340564414a87cc5b6dffc9ce53eefd8 \
sha256 b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -14,7 +14,7 @@ checksums rmd160 8e927f6bc340564414a87cc5b6dffc9ce53eefd8 \
</span> github.tarball_from releases
categories devel
license MIT
<span style='display:block; white-space:pre;background:#ffe0e0;'>-maintainers nomaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {fwright.net:fw @fhgwright} openmaintainer
</span>
description A portable foreign function interface library
long_description The libffi library provides a portable, high level \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -30,24 +30,40 @@ patchfiles patch-pre-snowleopard.diff
</span> # Don't use macports gcc or clang toolchains to build this due to dependency cycles
compiler.blacklist-append macports-*
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${os.platform} eq "darwin" && ${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Doesn't actually use C++, and having the stdlib set to libc++
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # on 10.6 causes a macports-clang compiler to be chosen.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Since libffi doesn't use C++, the cxx_stdlib setting is irrelevant, and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# having it differ from the OS default stdlib constrains the compiler selection,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# possibly even resulting in a circular dependency. Hence, we clear the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# cxx_stdlib setting.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Although libffi itself doesn't use C++, it provides support for the C++ ABI,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# and hence includes some tests written in C++. The stdlib selection is not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# expected to impact libffi's own behavior, and if it did there would need to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# be appropriate conditional code to accommodate the difference.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# On the relevant OS versions (currently 10.6-10.8), this assumption can be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# tested by running the applicable port commands with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# "configure.cxx_stdlib=libc++".
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platform darwin {
</span> configure.cxx_stdlib
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Fix for Rosetta: https://trac.macports.org/ticket/64485
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-platform darwin {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.major} == 10 && ${build_arch} eq "ppc"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-append --build=powerpc-apple-darwin${os.major}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The architecture-detection code in the configure script is based on the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# compiler's default architecture. We need to force this to match the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# target architecture to get the correct build. Merely providing the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# correct architecture options in xxFLAGS is insufficient.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This is a more general fix than the former fix for 10.6/ppc/Rosetta
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if { [variant_isset universal] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ merger_arch_compiler yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cc "${configure.cc} ${configure.cc_archflags}"
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Older versions of cctools have a history of being problematic with complex
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# asm like libffi has, so opt for the integrated assembler if it's available
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-if {[string match *clang* ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.cflags-append -integrated-as
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# There used to be a hack to force the use of the integrated assembler when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# building with clang. Not only is that no longer necessary, but it also
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# causes slightly worse test results in at least one case.
</span>
array set merger_host {
ppc64 powerpc-apple-darwin
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -57,7 +73,7 @@ lappend merger_dont_diff \
</span> ${prefix}/include/ffi.h \
${prefix}/include/ffitarget.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-depends_test-append port:expect port:dejagnu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_test-append port:dejagnu
</span> test.run yes
test.target check
</pre><pre style='margin:0'>
</pre>