Subject: pkg/23013: net/libIDL needs a lex and a yacc
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 09/30/2003 08:05:42
>Number: 23013
>Category: pkg
>Synopsis: net/libIDL needs a lex and a yacc
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Sep 30 15:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD 1.6.1_STABLE
>Organization:
http://bsd.reedmedia.net/
>Environment:
System: NetBSD rainier.reedmedia.net 1.6.1_STABLE NetBSD 1.6.1_STABLE (GENERIC) #0: Tue Aug 12 02:52:57 PDT 2003 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Building libIDL failed on my Linux box. I already had bison installed,
but the YACC was set to yacc (in the mk files installed with mk-files).
Also, I saw it uses flex too. (I moved my flex out of the way,
and it failed.)
>How-To-Repeat:
>Fix:
One fix is to make sure YACC and LEX are set to the installed tools.
Please consider the following patch. A lot of packages have
BUILD_DEPENDS for these, but only if SunOS -- they should check
instead. Maybe it would be good to have a BUILD_USES_LEX and BUILD_USES_YACC.
(I am not sure if a yacc.mk or lex.mk is fine, because run-time
dependencies are different that build-time.)
This is related to PR pkg/20772.
Index: net/libIDL/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/libIDL/Makefile,v
retrieving revision 1.15
diff -b -u -r1.15 Makefile
--- net/libIDL/Makefile 2003/08/09 11:16:19 1.15
+++ net/libIDL/Makefile 2003/09/30 14:59:20
@@ -18,6 +18,15 @@
PKGCONFIG_OVERRIDE= ${WRKSRC}/libIDL-2.0.pc.in
INFO_FILES= libIDL2.info
+.if !exists(/usr/bin/lex) || !exists(/usr/bin/flex)
+BUILD_DEPENDS+= flex-[0-9]*:../../devel/flex
+LEX= ${LOCALBASE}/bin/flex
+.endif
+.if !exists(/usr/bin/yacc)
+BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
+YACC= ${LOCALBASE}/bin/bison -y
+.endif
+
.include "../../converters/libiconv/buildlink2.mk"
.include "../../devel/pkgconfig/buildlink2.mk"
.include "../../devel/glib2/buildlink2.mk"
>Release-Note:
>Audit-Trail:
>Unformatted: