<pre style='margin:0'>
Ryan Carsten Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ac42249d9868eb46bf0f968997064d4a006f542b">https://github.com/macports/macports-ports/commit/ac42249d9868eb46bf0f968997064d4a006f542b</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit ac42249d9868eb46bf0f968997064d4a006f542b
</span>Author: Ryan Carsten Schmidt <ryandesign@macports.org>
AuthorDate: Wed Apr 17 07:07:13 2024 -0500
<span style='display:block; white-space:pre;color:#404040;'> meson pg: add meson.native.binaries option
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Ports can append key=value pairs to meson.native.binaries to override
</span><span style='display:block; white-space:pre;color:#404040;'> the results of find_program.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://trac.macports.org/ticket/63356
</span><span style='display:block; white-space:pre;color:#404040;'> See: mesonbuild/meson#13096
</span>---
_resources/port1.0/group/meson-1.0.tcl | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/meson-1.0.tcl b/_resources/port1.0/group/meson-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 3fb98fd2578..58e04272d2d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/meson-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/meson-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -37,6 +37,27 @@ destroot.env-append DESTDIR=${destroot}
</span> default destroot.cmd {${prefix}/bin/meson}
default destroot.post_args ""
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# There shouldn't be any need to change the name of the native file.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options meson.native_file
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default meson.native_file {${workpath}/meson_native.ini}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# To override the results of find_program, add key/value pairs, e.g.:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# meson.native.binaries-append m4=${prefix}/bin/gm4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options meson.native.binaries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default meson.native.binaries {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-configure {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[option meson.native.binaries] ne {}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fp [open [option meson.native_file] w]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts ${fp} {[binaries]}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach kv [option meson.native.binaries] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set kv [split ${kv} =]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts ${fp} "[lindex ${kv} 0]='[lindex ${kv} 1]'"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ close ${fp}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> namespace eval meson { }
proc meson::get_post_args {} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -54,6 +75,9 @@ proc meson::get_post_args {} {
</span> } else {
lappend args ${build_dir}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[option meson.native.binaries] ne {}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend args --native-file=[option meson.native_file]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> lappend args --wrap-mode=[option meson.wrap_mode]
return ${args}
}
</pre><pre style='margin:0'>
</pre>