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:           Tue Mar 26 16:27:13 UTC 2024

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

Log Message:
tools: as flex invokes GNU m4, make flex imply gm4.

Before this change, on macOS at least with the current troubled Command
Line Tools, package builds that declare "flex" or "flex:*" but not "gm4"
in USE_TOOLS will fail, because invocations of flex exit nonzero.
/usr/bin/flex tries to exec /usr/bin/gm4, the problems with which are
documented in tools.Darwin.mk.

With this change, by letting pkgsrc control which gm4 gets found, flex
works as before and these packages build as well as they did before.

NFCI on other platforms. Tested on netbsd-10 and Ubuntu 23. Some
packages I tested with: gobject-introspection, MesaLib, netpbm,
gstreamer1.


To generate a diff of this commit:
cvs rdiff -u -r1.301 -r1.302 pkgsrc/mk/tools/replace.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/replace.mk
diff -u pkgsrc/mk/tools/replace.mk:1.301 pkgsrc/mk/tools/replace.mk:1.302
--- pkgsrc/mk/tools/replace.mk:1.301    Fri Mar 22 18:59:04 2024
+++ pkgsrc/mk/tools/replace.mk  Tue Mar 26 16:27:13 2024
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.301 2024/03/22 18:59:04 schmonz Exp $
+# $NetBSD: replace.mk,v 1.302 2024/03/26 16:27:13 schmonz Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -78,6 +78,13 @@
 USE_TOOLS+=    bison-yacc
 .endif
 
+# flex needs gm4
+.if !empty(USE_TOOLS:Mflex) || !empty(USE_TOOLS:Mflex\:*)
+# flex:run is used in a few packages, none of which actually build
+# binaries that exec flex. No other flex:* modifiers are being used.
+USE_TOOLS+=    gm4
+.endif
+
 ######################################################################
 
 # Create _USE_TOOLS, a sanitized version of USE_TOOLS that removes the



Home | Main Index | Thread Index | Old Index