From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Feb 12 14:20:04 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B895C1065674 for ; Thu, 12 Feb 2009 14:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A62B68FC0C for ; Thu, 12 Feb 2009 14:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1CEK4PT026205 for ; Thu, 12 Feb 2009 14:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1CEK4xC026204; Thu, 12 Feb 2009 14:20:04 GMT (envelope-from gnats) Date: Thu, 12 Feb 2009 14:20:04 GMT Message-Id: <200902121420.n1CEK4xC026204@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Olaf Seibert Cc: Subject: Re: ports/128603: textproc/flex has too small capacity X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Olaf Seibert List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 14:20:05 -0000 The following reply was made to PR ports/128603; it has been noted by GNATS. From: Olaf Seibert To: Stefan Walter Cc: Olaf Seibert , GNATS 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 +# Set options (before including bsd.port.pre.mk) + +OPTIONS = MORE_NFA_STATES "Increase the number of NFA states" OFF + +.include + +.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 -Olaf. --