pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/tools
Module Name: pkgsrc
Committed By: schmonz
Date: Wed Mar 20 15:59:54 UTC 2024
Modified Files:
pkgsrc/mk/tools: tools.Darwin.mk
Log Message:
macOS: fix false positives from xcrun --find.
xcrun lately seems to include PATH in its search, which means programs
that aren't part of Apple's developer tools get matched:
:; xcrun --find mutt
/opt/pkg/bin/mutt
xcrun also has a cache, so this can produce even odder results:
:; xcrun --find yacc
/opt/pkg/bin/yacc
:; env - xcrun --find yacc
/opt/pkg/bin/yacc
:; xcrun --no-cache --find yacc
/opt/pkg/bin/yacc
:; env - xcrun --no-cache --find yacc
xcrun: error: unable to find utility "yacc", not a developer tool or in PATH
Since xcrun has had the "--no-cache" argument dating back to at least
the days of OS X 10.6.8 with gcc 4.2.1 and Apple clang 1.7, add it to
"xcrun --find" commands (along with an empty PATH) for more
deterministic results.
To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 pkgsrc/mk/tools/tools.Darwin.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/tools/tools.Darwin.mk
diff -u pkgsrc/mk/tools/tools.Darwin.mk:1.64 pkgsrc/mk/tools/tools.Darwin.mk:1.65
--- pkgsrc/mk/tools/tools.Darwin.mk:1.64 Mon Mar 11 14:11:24 2024
+++ pkgsrc/mk/tools/tools.Darwin.mk Wed Mar 20 15:59:54 2024
@@ -1,7 +1,9 @@
-# $NetBSD: tools.Darwin.mk,v 1.64 2024/03/11 14:11:24 schmonz Exp $
+# $NetBSD: tools.Darwin.mk,v 1.65 2024/03/20 15:59:54 schmonz Exp $
#
# System-supplied tools for the Darwin (Mac OS X) operating system.
+OSX_XCRUN= ${SETENV} PATH= /usr/bin/xcrun --no-cache
+
TOOLS_PLATFORM.[?= [ # shell builtin
TOOLS_PLATFORM.awk?= /usr/bin/awk
TOOLS_PLATFORM.basename?= /usr/bin/basename
@@ -17,7 +19,7 @@ TOOLS_PLATFORM.bsdtar?= /usr/bin/bsdtar
# CLT 15.3.0.0.1.1708646388 does not provide yacc. Check whether the
# /usr/bin/yacc xcode-select stub's target exists before defaulting to it.
.if !defined(OSX_PATH_TO_YACC)
-OSX_PATH_TO_YACC_cmd= /usr/bin/xcrun --find yacc 2>/dev/null | \
+OSX_PATH_TO_YACC_cmd= ${OSX_XCRUN} --find yacc 2>/dev/null | \
sed -e 's|^/Library/Developer/CommandLineTools||'
OSX_PATH_TO_YACC= ${OSX_PATH_TO_YACC_cmd:sh}
.endif
@@ -101,7 +103,7 @@ TOOLS_PLATFORM.ls?= /bin/ls
# CLT 15.3.0.0.1.1708646388 does not provide m4. Check whether the
# /usr/bin/m4 xcode-select stub's target exists before defaulting to it.
.if !defined(OSX_PATH_TO_M4)
-OSX_PATH_TO_M4_cmd= /usr/bin/xcrun --find m4 2>/dev/null | \
+OSX_PATH_TO_M4_cmd= ${OSX_XCRUN} --find m4 2>/dev/null | \
sed -e 's|^/Library/Developer/CommandLineTools||'
OSX_PATH_TO_M4= ${OSX_PATH_TO_M4_cmd:sh}
.endif
Home |
Main Index |
Thread Index |
Old Index