diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-09-23 13:34:56 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-09-23 13:34:56 +0000 |
commit | fde784537ab9a4f09946bbf0203efed97351d144 (patch) | |
tree | dfe50c84d8064c346ba263b9c9ef124375da9d62 /math/oleo | |
parent | 36892eaa48ff6db64fa663c0adac5b3de7fed1dc (diff) | |
download | ports-fde784537ab9a4f09946bbf0203efed97351d144.tar.gz ports-fde784537ab9a4f09946bbf0203efed97351d144.zip |
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.
Notes
Notes:
svn path=/head/; revision=549724
Diffstat (limited to 'math/oleo')
-rw-r--r-- | math/oleo/Makefile | 5 | ||||
-rw-r--r-- | math/oleo/files/patch-src_posixtm.y | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/math/oleo/Makefile b/math/oleo/Makefile index 5febc8f9f030..fe1e4b71243c 100644 --- a/math/oleo/Makefile +++ b/math/oleo/Makefile @@ -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 diff --git a/math/oleo/files/patch-src_posixtm.y b/math/oleo/files/patch-src_posixtm.y index 30d8c75a2c53..80db8eaf0827 100644 --- a/math/oleo/files/patch-src_posixtm.y +++ b/math/oleo/files/patch-src_posixtm.y @@ -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; } } |