Subject: Linux users: do you have yacc, lex, patch?
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 02/17/2005 11:19:01
bootstrap/README.Linux does not say that yacc, lex and patch are required.
But mk/tools.mk assumes they are previously installed.

With packages using autoconf configure to figure out yacc versus bison -y,
this is sometimes not a problem when bison is installed. (But not always,
for example: openslp checks for bison and yacc during configure but even
if not found it continues to later build and fails: "../ylwrap: line 110:
yacc: command not found).

But packages that don't figure this out often rely on YACC which may not
be defined or may be defined wrong for Linux.

Also on Linux systems if you don't have yacc (or bison) or lex or patch
installed, then it will not install them.

I know we have talked about this before. The solution is to get it to
actually check for the files. Until then may I commit the following?

Index: mk/tools.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools.mk,v
retrieving revision 1.52
diff -b -u -r1.52 tools.mk
--- mk/tools.mk	11 Feb 2005 15:59:41 -0000	1.52
+++ mk/tools.mk	17 Feb 2005 18:14:09 -0000
@@ -136,14 +136,14 @@
 _TOOLS_OPSYS_HAS_GNU.awk+=	NetBSD-1.[0-6]*-* DragonFly-*-*
 _TOOLS_OPSYS_HAS_GNU.grep+=	Darwin-*-* FreeBSD-*-* Linux-*-*
 _TOOLS_OPSYS_HAS_GNU.grep+=	NetBSD-*-* OpenBSD-*-* DragonFly-*-*
-_TOOLS_OPSYS_HAS_GNU.lex+=	FreeBSD-*-* Linux-*-* NetBSD-*-*
+_TOOLS_OPSYS_HAS_GNU.lex+=	FreeBSD-*-* NetBSD-*-*
 _TOOLS_OPSYS_HAS_GNU.lex+=	OpenBSD-*-* DragonFly-*-*
 _TOOLS_OPSYS_HAS_GNU.m4+=	# empty
 _TOOLS_OPSYS_HAS_GNU.make+=	Darwin-*-*
-_TOOLS_OPSYS_HAS_GNU.patch+=	Darwin-*-* FreeBSD-*-* Linux-*-*
+_TOOLS_OPSYS_HAS_GNU.patch+=	Darwin-*-* FreeBSD-*-*
 _TOOLS_OPSYS_HAS_GNU.patch+=	NetBSD-*-* OpenBSD-*-* DragonFly-*-*
 _TOOLS_OPSYS_HAS_GNU.sed+=	FreeBSD-*-* Linux-*-* NetBSD-*-* DragonFly-*-*
-_TOOLS_OPSYS_HAS_GNU.yacc+=	Linux-*-*
+_TOOLS_OPSYS_HAS_GNU.yacc+=

 # These platforms have GNUish versions of the tools available in the base
 # system, which we already define as ${AWK}, ${SED}, etc. (refer to


Also another question, YACC is defined in CONFIGURE_ENV in mk/bsd.pkg.mk.
Can we also define it in MAKE_ENV?

Should both of these be defined in tools.mk and not in mk/bsd.pkg.mk?



 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links
	  	 	 http://www.bsdnewsletter.com/