Reacting to build errors from a Portfile (e.g. giving specific hints)

Daniel J. Luke dluke at geeklair.net
Fri Aug 30 19:46:39 UTC 2024


On Aug 30, 2024, at 5:48 AM, René J. V. Bertin <rjvbertin at gmail.com> wrote:
> It looks like the best way to achieve what I'm looking for is to roll a custom 
> `build {}` block that `catch`es errors in the actual build execution and might 
> then even try to take the suggested corrective action and re-launch the build 
> command.

It's probably better to fix the build system.

Failing that, I think it's more flexible and more supportable if you just wrap the build system with your own script that does whatever magic you are doing and have macports call your script in the build phase instead of trying to wrangle the macports machinery into doing what you're attempting.

(As a bonus, you don't have to implement your script in tcl if you don't want to).

-- 
Daniel J. Luke



More information about the macports-dev mailing list