Received: by mail.netbsd.org (Postfix, from userid 605) id B8C2084E66; Tue, 22 Nov 2022 09:15:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id EA52584E60 for ; Tue, 22 Nov 2022 09:15:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id up6oE8tHfJku for ; Tue, 22 Nov 2022 09:15:51 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 6C0A184DBD for ; Tue, 22 Nov 2022 09:15:51 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 6561DFA90; Tue, 22 Nov 2022 09:15:51 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1669108551289970" MIME-Version: 1.0 Date: Tue, 22 Nov 2022 09:15:51 +0000 From: "Jonathan Perkin" Subject: CVS commit: pkgsrc/mk/tools To: pkgsrc-changes@NetBSD.org Reply-To: jperkin@netbsd.org X-Mailer: log_accum Message-Id: <20221122091551.6561DFA90@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1669108551289970 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_1669108551289970 Content-Disposition: inline Content-Length: 1166 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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 --_----------=_1669108551289970--