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:   jperkin
Date:           Tue Nov 22 09:15:51 UTC 2022

Modified Files:
        pkgsrc/mk/tools: tools.SunOS.mk

Log Message:
mk/tools: Avoid print(1) when using bash on SunOS.

bash does not have a print builtin, and on SunOS there is a /usr/bin/print
which is found by the libtool configure script (which has also made its way
into lots of third-party packages) and used for printing strings.

Create a broken print wrapper so that this is not found and the printf builtin
is used instead, significantly improving performance.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 pkgsrc/mk/tools/tools.SunOS.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.SunOS.mk
diff -u pkgsrc/mk/tools/tools.SunOS.mk:1.54 pkgsrc/mk/tools/tools.SunOS.mk:1.55
--- pkgsrc/mk/tools/tools.SunOS.mk:1.54 Tue Nov 22 09:09:19 2022
+++ pkgsrc/mk/tools/tools.SunOS.mk      Tue Nov 22 09:15:51 2022
@@ -1,4 +1,4 @@
-# $NetBSD: tools.SunOS.mk,v 1.54 2022/11/22 09:09:19 jperkin Exp $
+# $NetBSD: tools.SunOS.mk,v 1.55 2022/11/22 09:15:51 jperkin Exp $
 #
 # System-supplied tools for the Solaris and illumos operating systems.
 #
@@ -229,3 +229,18 @@ TOOLS_PLATFORM.zipcloak?=  /usr/bin/zipcl
 TOOLS_PLATFORM.zipnote?=       /usr/bin/zipnote
 TOOLS_PLATFORM.zipsplit?=      /usr/bin/zipsplit
 .endif
+
+#
+# If we've bootstrapped with bash as the default shell then ensure print is a
+# broken wrapper to work around a bug in the libtool configure script that
+# assumes print, if available, is always a builtin.  bash does not have print
+# builtin and /usr/bin/print gets called instead, affecting performance.
+#
+# Also ensure we do use any bash builtins instead of separate commands.
+#
+.if ${TOOLS_PLATFORM.sh:M*bash}
+TOOLS_CREATE+=         print
+TOOLS_PATH.print=      ${FALSE}
+
+TOOLS_PLATFORM.printf= printf
+.endif



Home | Main Index | Thread Index | Old Index