Subject: pkg/22532: devel/flex fails to build on GNU/Linux systems without yacc or bison
To: None <gnats-bugs@gnats.netbsd.org>
From: None <soren@bob.blef.org>
List: netbsd-bugs
Date: 08/18/2003 12:33:34
>Number: 22532
>Category: pkg
>Synopsis: devel/flex fails to build on GNU/Linux systems without yacc or bison
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 18 19:34:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Soren Jacobsen
>Release: NetBSD 1.6.1
>Organization:
>Environment:
Debian GNU/Linux with the bison deb not installed.
pkgsrc as of 08/18/2003.
>Description:
flex needs yacc (bison -y is sufficient) to build, but blindly assumes that the
system has it.
>How-To-Repeat:
Don't install yacc or bison and try to install flex.
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/flex/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile 2003/07/21 16:43:21 1.10
+++ Makefile 2003/08/18 19:32:45
@@ -13,4 +13,11 @@
GNU_CONFIGURE= YES
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == Linux && !exists(/usr/bin/yacc)
+BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
+YACC=bison -y
+.endif
+
.include "../../mk/bsd.pkg.mk"
>Release-Note:
>Audit-Trail:
>Unformatted: