vendor/tcl: use install-sh to create dirs if needed

The system install -d can fail when used concurrently, so only use
install(1) to create directories if it's our fixed version. Otherwise
use the bundled install-sh for directories but still use install(1) for
files.

See: https://trac.macports.org/ticket/72886
(cherry picked from commit 8cc73ed9ad)
This commit is contained in:
Joshua Root
2025-08-22 02:35:30 +10:00
parent 1e6704418a
commit 6dcb3d766e
3 changed files with 3 additions and 5 deletions
Vendored
-2
View File
@@ -9008,7 +9008,6 @@ printf "%s\n" "$as_me: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)"
fi
cd "$mp_popdir"
"$SED" -i "" "s|\$(SHELL) \$(UNIX_DIR)/install-sh -c|$INSTALL|" vendor/tcl/unix/Makefile
VENDOR_TCL_SUBDIR=tcl/unix
VENDOR_TCL_INSTALL="install-binaries install-headers install-libraries install-msgs install-packages"
@@ -9324,7 +9323,6 @@ printf "%s\n" "$as_me: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)"
fi
cd "$mp_popdir"
"$SED" -i "" "s|\$(SHELL) \$(srcdir)/tclconfig/install-sh -c|$INSTALL|" vendor/tclx/Makefile
VENDOR_TCLX_SUBDIR=tclx
VENDOR_TCLX_INSTALL="install-binaries install-libraries"
-2
View File
@@ -374,7 +374,6 @@ AC_SUBST(CLONEBIN_PATH)
## Tcl package
MP_CONFIG_SUBDIR([vendor/tcl/unix], [--prefix=${macports_libexec_dir} --enable-threads])
"$SED" -i "" "s|\$(SHELL) \$(UNIX_DIR)/install-sh -c|$INSTALL|" vendor/tcl/unix/Makefile
VENDOR_TCL_SUBDIR=tcl/unix
VENDOR_TCL_INSTALL="install-binaries install-headers install-libraries install-msgs install-packages"
AC_SUBST(VENDOR_TCL_SUBDIR)
@@ -387,7 +386,6 @@ AC_SUBST(VENDOR_DESTROOT)
## TclX package
# TclX is required for signal handling
MP_CONFIG_SUBDIR([vendor/tclx], [--prefix=${macports_libexec_dir}])
"$SED" -i "" "s|\$(SHELL) \$(srcdir)/tclconfig/install-sh -c|$INSTALL|" vendor/tclx/Makefile
VENDOR_TCLX_SUBDIR=tclx
VENDOR_TCLX_INSTALL="install-binaries install-libraries"
AC_SUBST(VENDOR_TCLX_SUBDIR)
Generated Vendored
+3 -1
View File
@@ -8,6 +8,7 @@ INSTALL_SUBDIR= install
DESTROOT= @abs_top_builddir@/@VENDOR_DESTROOT@
TCL_PREFIX= @TCL_PREFIX@
INSTALL= @INSTALL@
TCL_INSTALL_D_ARG= INSTALL_DATA_DIR="@abs_top_builddir@/vendor/tcl/unix/install-sh -d -m 755"
.PHONY: all clean distclean install destroot test
.PHONY: destroot-tcl destroot-critcl destroot-tclx destroot-tcllib destroot-tcllibc destroot-signify destroot-install
@@ -54,6 +55,7 @@ DESTROOT_TARGETS+= destroot-install
CLEAN_TARGETS+= clean-install
DISTCLEAN_TARGETS+= distclean-install
CODESIGN_TARGETS+= install/build/install
TCL_INSTALL_D_ARG=
all-tcl: all-install
all-tclx: all-install
destroot-signify: all-install
@@ -66,7 +68,7 @@ endif
destroot: $(DESTROOT_TARGETS)
destroot-tcl: all-tcl
@echo ===\> staging to destroot in ${DIRPRFX}@VENDOR_TCL_SUBDIR@
@umask 0022; "$(MAKE)" -C "@VENDOR_TCL_SUBDIR@" "DESTDIR=$(DESTROOT)" "INSTALL=$(INSTALL)" @VENDOR_TCL_INSTALL@
@umask 0022; "$(MAKE)" -C "@VENDOR_TCL_SUBDIR@" "DESTDIR=$(DESTROOT)" "INSTALL=$(INSTALL)" $(TCL_INSTALL_D_ARG) @VENDOR_TCL_INSTALL@
[ "@OS_PLATFORM@" != darwin ] || install_name_tool -change "$(TCL_PREFIX)/lib/libtcl@TCL_VERSION@.dylib" \
"@executable_path/../lib/libtcl@TCL_VERSION@.dylib" \
"$(DESTROOT)$(TCL_PREFIX)/bin/tclsh@TCL_VERSION@"