Fix build
The configure script ran into an infinite loop due to an optimization that assumes multiplication of 2 positive numbers was always positive (ignoring wrap-around). Pass "-fwrapv" to the configure script and build the package with that option. Two parsers are generated and both use the same global variables. Fix the build with -fno-common by use of pre-processor macros that rename the variables used in one of those source files. Passing -p to set a non-conflicting prefix other than "yy" does not work with implicit ".c.y" rules and was therefore not applicable.
This commit is contained in:
parent
36892eaa48
commit
fde784537a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=549724
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= oleo
|
||||
PORTVERSION= 1.99.16
|
||||
PORTREVISION= 10
|
||||
PORTREVISION= 11
|
||||
CATEGORIES= math
|
||||
MASTER_SITES= GNU
|
||||
|
||||
@ -17,6 +17,7 @@ USES= bison:alias localbase ncurses perl5
|
||||
USE_PERL5= build
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --with-x --without-xlt --without-SciPlot
|
||||
CONFIGURE_ENV= CFLAGS=-fwrapv
|
||||
MAKE_ARGS+= DESTDIR="${STAGEDIR}"
|
||||
|
||||
BINARY_ALIAS= makeinfo=false # disable detecting local makeinfo
|
||||
@ -39,7 +40,7 @@ NLS_LIBS= -lintl
|
||||
NLS_CONFIGURE_ENABLE= nls
|
||||
NLS_USES_OFF= gettext-tools
|
||||
|
||||
post-patch:
|
||||
pre-build:
|
||||
@${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
|
||||
's|malloc\.h|stdlib.h|g'
|
||||
.for pof in en fr nl
|
||||
|
@ -1,6 +1,18 @@
|
||||
--- src/posixtm.y.orig 2000-07-22 06:13:16 UTC
|
||||
+++ src/posixtm.y
|
||||
@@ -85,6 +85,7 @@ date :
|
||||
@@ -40,6 +40,11 @@ char *alloca ();
|
||||
#include <time.h>
|
||||
|
||||
#define YYDEBUG 1
|
||||
+#define yychar yychar_posixtm
|
||||
+#define yyerrflag yyerrflag_posixtm
|
||||
+#define yylval yylval_posixtm
|
||||
+#define yynerrs yynerrs_posixtm
|
||||
+#define yyval yyval_posixtm
|
||||
|
||||
/* Lexical analyzer's current scan position in the input string. */
|
||||
static char *curpos;
|
||||
@@ -85,6 +90,7 @@ date :
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user