[Bug 270514] tools/build/Makefile: should include `/opt/local/bin` in PATH for host tools

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 29 Mar 2023 07:19:27 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270514

            Bug ID: 270514
           Summary: tools/build/Makefile: should include `/opt/local/bin`
                    in PATH for host tools
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: tkmcintosh@me.com

MacPorts (the primary packaging system for macOS) places installed tools under
`/opt/local/bin` by default. This path should be included in PATH as an
alternative to `/usr/local/bin` for cross-building under macOS:

--- tools/build/Makefile.orig   2023-03-29 00:13:46
+++ tools/build/Makefile        2023-03-29 00:14:16
@@ -302,7 +302,7 @@
 host-symlinks:
        @echo "Linking host tools into ${DESTDIR}/bin"
 .for _tool in ${_host_tools_to_symlink}
-       @export PATH=$${PATH}:/usr/local/bin; \
+       @export PATH=$${PATH}:/usr/local/bin:/opt/local/bin; \
        source_path=`which ${_tool} || echo /dev/null/no/such`; \
        if [ ! -e "$${source_path}" ] ; then \
                echo "Cannot find host tool '${_tool}' in PATH ($$PATH)." >&2;
false; \

-- 
You are receiving this mail because:
You are the assignee for the bug.