Date: Thu, 12 Feb 2009 14:20:04 GMT From: Olaf Seibert <olafs@cs.ru.nl> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/128603: textproc/flex has too small capacity Message-ID: <200902121420.n1CEK4xC026204@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/128603; it has been noted by GNATS. From: Olaf Seibert <olafs@cs.ru.nl> To: Stefan Walter <stefan@freebsd.org> Cc: Olaf Seibert <olafs@cs.ru.nl>, GNATS <FreeBSD-gnats-submit@FreeBSD.org> Subject: Re: ports/128603: textproc/flex has too small capacity Date: Thu, 12 Feb 2009 15:11:06 +0100 Here is a stab at an optional patch to textproc/flex. Unfortunately there doesn't seem to be a way in the OPTIONS system to ask the user for a number. Therefore I used a mixed approach, where the OPTIONS are used to turn the patch on and off, and where the user can optionally set FLEX_NUMBER_OF_NFA_STATES to the desired value (somehow). I found using /etc/port.conf useful, while putting options in between ".if ${.CURDIR:M*/textproc/flex}" and ".endif" lines. --- Makefile.orig Thu Feb 12 12:50:30 2009 +++ Makefile Thu Feb 12 15:01:34 2009 @@ -27,9 +27,24 @@ PLIST_FILES= bin/flex include/flex/FlexLexer.h lib/libfl.a lib/libfl_pic.a PLIST_DIRS= include/flex -post-patch: +post-patch:: @${REINPLACE_CMD} -e 's/install-info-recursive//g;s/info-recursive//g' \ -e 's/po //;s/tests//' ${WRKSRC}/Makefile.in @${REINPLACE_CMD} -e 's/ install-info-am//' ${WRKSRC}/doc/Makefile.in -.include <bsd.port.mk> +# Set options (before including bsd.port.pre.mk) + +OPTIONS = MORE_NFA_STATES "Increase the number of NFA states" OFF + +.include <bsd.port.pre.mk> + +.if defined(WITH_MORE_NFA_STATES) + +FLEX_NUMBER_OF_NFA_STATES ?= 99999 + +post-patch:: + ${REINPLACE_CMD} -e '/define MAXIMUM_MNS /s/[0-9][0-9]*/${FLEX_NUMBER_OF_NFA_STATES}/' ${WRKSRC}/flexdef.h + +.endif + +.include <bsd.port.post.mk> -Olaf. --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902121420.n1CEK4xC026204>