<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/b3427f9e6de113b64620377780cf52f80248d152">https://github.com/macports/macports-ports/commit/b3427f9e6de113b64620377780cf52f80248d152</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit b3427f9e6de113b64620377780cf52f80248d152
</span>Author: Frederik van Hövell <frederik@fvhovell.nl>
AuthorDate: Mon Apr 1 15:35:18 2024 +0200
<span style='display:block; white-space:pre;color:#404040;'> luajit: Support 'universal' variant
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> * Add PortGroup muniversal 1.1
</span><span style='display:block; white-space:pre;color:#404040;'> * Use `muniversal` portgroup, which builds each requested arch separately
</span><span style='display:block; white-space:pre;color:#404040;'> * Suggestion by Ryan Carsten Schmidt (ryandesign) - see ticket below
</span><span style='display:block; white-space:pre;color:#404040;'> * Fix universal build on x86_64 hosts
</span><span style='display:block; white-space:pre;color:#404040;'> * Cleanup options for building on separate architecture (that is not runnable on current host)
</span><span style='display:block; white-space:pre;color:#404040;'> * i.e. when targetting arm64 from a x86_64 host system
</span><span style='display:block; white-space:pre;color:#404040;'> * Based on:
</span><span style='display:block; white-space:pre;color:#404040;'> * https://www.freelists.org/post/luajit/Building-universal-libraries-x86-64-and-arm64-for-osx,4
</span><span style='display:block; white-space:pre;color:#404040;'> * https://git.openembedded.org/meta-openembedded/plain/meta-oe/recipes-devtools/luajit/luajit_git.bb
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/41304
</span>---
lang/luajit/Portfile | 13 +++++++++++++
1 file changed, 13 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/luajit/Portfile b/lang/luajit/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 6073ab6d9d3..f80395022e9 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/luajit/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/luajit/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,6 +6,7 @@ PortGroup xcode_workaround 1.0
</span> PortGroup github 1.0
PortGroup legacysupport 1.1
PortGroup makefile 1.0
<span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup muniversal 1.1
</span>
set branch 2.1
set version_date 2024-03-10T16:29:48Z
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -49,6 +50,18 @@ post-patch {
</span>
compiler.blacklist {clang < 700} *gcc-4.2 macports-clang-3.3 macports-clang-3.4
<span style='display:block; white-space:pre;background:#e0ffe0;'>+## Fix universal builds, see:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# - https://www.freelists.org/post/luajit/Building-universal-libraries-x86-64-and-arm64-for-osx,4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# - https://git.openembedded.org/meta-openembedded/plain/meta-oe/recipes-devtools/luajit/luajit_git.bb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Clean automatically set options that apply to both host and target architectures (which we do not want)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.post_args-append CCOPT= CCOPT_x86= TARGET_STRIP='@:'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach arch ${muniversal.architectures} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.args.${arch}-append TARGET_FLAGS+="[muniversal::get_archflag cc ${arch}]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.post_args.${arch}-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFLAGS="${configure.cflags} [configure.cflags.${arch}]" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LDFLAGS="${configure.ldflags} [configure.ldflags.${arch}]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # changes to compiler flags must be made before `CFLAGS=...`
xcode_workaround.type append_to_compiler_flags
</pre><pre style='margin:0'>
</pre>