Subject: Solaris lex not sufficient for mail/fetchmail
To: None <tech-pkg@netbsd.org>
From: Klaus Heinz <k.heinz.jan.drei@onlinehome.de>
List: tech-pkg
Date: 01/21/2003 05:00:40
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

if I try to compile mail/fetchmail on Solaris8/sparc, /usr/ccs/bin/lex
refuses to work:

  lex  ./rcfile_l.l
  "./rcfile_l.l":line 28: Error: missing translation value
  0/1000 nodes(%e), 0/3000 positions(%p), 1/500 (%n), 0 transitions,
  0/10000 packed char classes(%k),  0/4000 packed transitions(%a),  0/7000
  output slots(%o)
  *** Error code 1

Not having the time and knowledge (my only encounter with lex was a
long time ago...) I worked around this with the attached patch to use
devel/flex.

I would appreciate if someone could verify that this works (and is
necessary) with Solaris 9.

Increasing PKGREVISION is probably not necessary because the Makefile
should work for other platforms the same as before.

ciao
     Klaus

--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="solaris.diff"

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/fetchmail/Makefile,v
retrieving revision 1.124
diff -u -r1.124 Makefile
--- Makefile	2002/12/13 14:38:52	1.124
+++ Makefile	2003/01/21 12:37:06
@@ -10,6 +10,14 @@
 HOMEPAGE=	http://www.tuxedo.org/~esr/fetchmail/
 COMMENT=	batch mail retrieval/forwarding utility for pop2, pop3, apop, imap
 
+.include "../../mk/bsd.prefs.mk"
+
+# Solaris lex cannot handle rcfile_l.l
+.if ${OPSYS} == "SunOS"
+BUILD_DEPENDS+=		flex-[0-9]*:../../devel/flex
+.endif
+
+
 BUILD_USES_MSGFMT=	YES
 
 USE_BUILDLINK2=		YES
@@ -21,8 +29,6 @@
 
 BUILD_DEFS+=		USE_INET6
 LDFLAGS+=		${CFLAGS}
-
-.include "../../mk/bsd.prefs.mk"
 
 FETCHMAIL_USE_SSL?=	YES
 

--ikeVEW9yuYc//A+q--