<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/1b4e6a113d58d164c6d0f07cafb787530e554e77">https://github.com/macports/macports-base/commit/1b4e6a113d58d164c6d0f07cafb787530e554e77</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 1b4e6a113 Never error out in build_getmaketype
</span>1b4e6a113 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 1b4e6a113d58d164c6d0f07cafb787530e554e77
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Fri Oct 20 16:34:07 2023 +1100
<span style='display:block; white-space:pre;color:#404040;'> Never error out in build_getmaketype
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This could prevent parsing of ports that read the value of build.cmd
</span><span style='display:block; white-space:pre;color:#404040;'> outside of any phase. Instead, return an empty string when the command
</span><span style='display:block; white-space:pre;color:#404040;'> isn't found, and only error out if it's empty when it's about to
</span><span style='display:block; white-space:pre;color:#404040;'> actually be run.
</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/60881
</span>---
src/port1.0/portbuild.tcl | 80 ++++++++++++++++++++++++++---------------------
1 file changed, 45 insertions(+), 35 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portbuild.tcl b/src/port1.0/portbuild.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 87b3a8ed9..15e50b5ae 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portbuild.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portbuild.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -87,46 +87,52 @@ options build.type.add_deps
</span> default build.type.add_deps yes
proc portbuild::build_getmaketype {args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option build.type] eq "default"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [findBinary make $portutil::autoconf::make_path]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- switch -exact -- [option build.type] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bsd {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option os.platform] eq "darwin"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [findBinary bsdmake $portutil::autoconf::bsdmake_path]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[option os.platform] eq "freebsd"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [findBinary make $portutil::autoconf::make_path]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [findBinary pmake $portutil::autoconf::bsdmake_path]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports_try -pass_signal {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[option build.type] eq "default"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [findBinary make $portutil::autoconf::make_path]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- gnu {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option os.platform] eq "darwin"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [findBinary gnumake $portutil::autoconf::gnumake_path]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[option os.platform] eq "linux"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [findBinary make $portutil::autoconf::make_path]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [findBinary gmake $portutil::autoconf::gnumake_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch -exact -- [option build.type] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bsd {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[option os.platform] eq "darwin"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [findBinary bsdmake $portutil::autoconf::bsdmake_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[option os.platform] eq "freebsd"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [findBinary make $portutil::autoconf::make_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [findBinary pmake $portutil::autoconf::bsdmake_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- pbx -
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xcode {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[option os.platform] ne "darwin"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "[format [msgcat::mc "This port requires 'xcodebuild', which is not available on %s."] [option os.platform]]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gnu {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[option os.platform] eq "darwin"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [findBinary gnumake $portutil::autoconf::gnumake_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[option os.platform] eq "linux"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [findBinary make $portutil::autoconf::make_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [findBinary gmake $portutil::autoconf::gnumake_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global xcodebuildcmd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$xcodebuildcmd ne "none"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return $xcodebuildcmd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "xcodebuild was not found on this system!"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pbx -
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xcode {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[option os.platform] ne "darwin"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ error "[format [msgcat::mc "This port requires 'xcodebuild', which is not available on %s."] [option os.platform]]"
</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;'>+ global xcodebuildcmd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$xcodebuildcmd ne "none"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $xcodebuildcmd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ error "xcodebuild was not found on this system!"
</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;'>+ default {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "[format [msgcat::mc "Unknown build.type %s, using 'gnumake'"] [option build.type]]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [findBinary gnumake $portutil::autoconf::gnumake_path]
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- default {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "[format [msgcat::mc "Unknown build.type %s, using 'gnumake'"] [option build.type]]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [findBinary gnumake $portutil::autoconf::gnumake_path]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } on error {eMessage} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn $eMessage
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "Unable to find build command for build.type '[option build.type]'"
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ""
</span> }
proc portbuild::build_getjobs {args} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -188,7 +194,11 @@ proc portbuild::build_getjobsarg {args} {
</span> }
proc portbuild::build_start {args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global UI_PREFIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global UI_PREFIX build.cmd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${build.cmd} eq ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ error "No build command found"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
ui_notice "$UI_PREFIX [format [msgcat::mc "Building %s"] [option subport]]"
}
</pre><pre style='margin:0'>
</pre>