mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
Update Bison to version 3.0.4
Required for libaacs_x86 to build properly.
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
SUMMARY="A yacc-compatible parser generator"
|
||||
DESCRIPTION="
|
||||
Bison is a general-purpose parser generator that converts an annotated \
|
||||
context-free grammar into an LALR(1) or GLR parser for that grammar. Once you \
|
||||
are proficient with Bison, you can use it to develop a wide range of language \
|
||||
parsers, from those used in simple desk calculators to complex programming \
|
||||
languages.
|
||||
Bison is upward compatible with Yacc: all properly-written Yacc grammars ought \
|
||||
to work with Bison with no change. Anyone familiar with Yacc should be able to \
|
||||
use Bison with little trouble. You need to be fluent in C or C++ programming \
|
||||
in order to use Bison."
|
||||
HOMEPAGE="http://www.gnu.org/software/bison/bison.html"
|
||||
COPYRIGHT="1992-2010 Free Software Foundation, Inc."
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="6"
|
||||
SOURCE_URI="http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gz"
|
||||
CHECKSUM_SHA256="6b17be5e63ff6667c83f6ef0423befe0ba23d4bc554c4c33b02ce5bb65179b16"
|
||||
PATCHES="bison-2.4.3.patch"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
|
||||
PROVIDES="
|
||||
bison = $portVersion compat >= 2.4
|
||||
cmd:bison = $portVersion compat >= 2.4
|
||||
cmd:yacc
|
||||
devel:liby = $portVersion compat >= 2.4
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
cmd:m4
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel
|
||||
cmd:gcc
|
||||
cmd:ld
|
||||
cmd:m4
|
||||
cmd:make
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# bison looks for m4 in an absolute path, but uses that only within
|
||||
# its own testsuite, so we let it be ...
|
||||
M4=$portPackageLinksDir/cmd~m4/bin/m4 runConfigure ./configure \
|
||||
--disable-rpath --with-gnu-ld
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
# prepare develop/lib
|
||||
prepareInstalledDevelLibs liby
|
||||
|
||||
rm $libDir/charset.alias
|
||||
rmdir $libDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
SUMMARY="A yacc-compatible parser generator"
|
||||
DESCRIPTION="Bison is a general-purpose parser generator that converts an \
|
||||
annotated context-free grammar into an LALR(1) or GLR parser for that \
|
||||
grammar. Once you are proficient with Bison, you can use it to develop a wide \
|
||||
range of language parsers, from those used in simple desk calculators to \
|
||||
complex programming languages.
|
||||
|
||||
Bison is upward compatible with Yacc: all properly-written Yacc grammars ought \
|
||||
to work with Bison with no change. Anyone familiar with Yacc should be able to \
|
||||
use Bison with little trouble. You need to be fluent in C or C++ programming \
|
||||
in order to use Bison."
|
||||
HOMEPAGE="http://www.gnu.org/software/bison/bison.html"
|
||||
COPYRIGHT="1992-2011 Free Software Foundation, Inc."
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://ftp.gnu.org/gnu/bison/bison-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="856487963d9d57eff2c5de54841d00ff36399f6a9f232711702701ce589c3afa"
|
||||
PATCHES="bison-${portVersion}.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86 x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
bison$secondaryArchSuffix = $portVersion compat >= 2.5
|
||||
cmd:bison$secondaryArchSuffix = $portVersion compat >= 2.5
|
||||
cmd:yacc$secondaryArchSuffix
|
||||
devel:liby$secondaryArchSuffix = $portVersion compat >= 2.5
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:m4
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:awk
|
||||
cmd:m4
|
||||
cmd:make
|
||||
cmd:sed
|
||||
cmd:flex
|
||||
cmd:makeinfo
|
||||
cmd:perl
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLibs liby
|
||||
|
||||
rm $libDir/charset.alias
|
||||
rmdir $libDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
diff -urN bison-2.4.3/lib/binary-io.h bison-2.4.3-haiku/lib/binary-io.h
|
||||
--- bison-2.4.3/lib/binary-io.h 2010-02-06 21:15:26.051118080 +0000
|
||||
+++ bison-2.4.3-haiku/lib/binary-io.h 2011-01-26 11:15:38.000000000 +0000
|
||||
@@ -19,24 +19,13 @@
|
||||
#define _BINARY_H
|
||||
|
||||
/* For systems that distinguish between text and binary I/O.
|
||||
- O_BINARY is usually declared in <fcntl.h>. */
|
||||
+ O_BINARY is guaranteed by the gnulib <fcntl.h>. */
|
||||
#include <fcntl.h>
|
||||
|
||||
/* The MSVC7 <stdio.h> doesn't like to be included after '#define fileno ...',
|
||||
so we include it here first. */
|
||||
#include <stdio.h>
|
||||
|
||||
-#if !defined O_BINARY && defined _O_BINARY
|
||||
- /* For MSC-compatible compilers. */
|
||||
-# define O_BINARY _O_BINARY
|
||||
-# define O_TEXT _O_TEXT
|
||||
-#endif
|
||||
-#if defined __BEOS__ || defined __HAIKU__
|
||||
- /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */
|
||||
-# undef O_BINARY
|
||||
-# undef O_TEXT
|
||||
-#endif
|
||||
-
|
||||
/* SET_BINARY (fd);
|
||||
changes the file descriptor fd to perform binary I/O. */
|
||||
#if O_BINARY
|
||||
@@ -58,8 +47,6 @@
|
||||
# endif
|
||||
#else
|
||||
/* On reasonable systems, binary I/O is the default. */
|
||||
-# undef O_BINARY
|
||||
-# define O_BINARY 0
|
||||
# define SET_BINARY(fd) /* do nothing */ ((void) 0)
|
||||
#endif
|
||||
|
||||
diff -urN bison-2.4.3/src/location.c bison-2.4.3-haiku/src/location.c
|
||||
--- bison-2.4.3/src/location.c 2010-08-06 00:37:58.001572864 +0000
|
||||
+++ bison-2.4.3-haiku/src/location.c 2011-01-26 10:23:20.032505856 +0000
|
||||
@@ -141,11 +141,11 @@
|
||||
/* Must search in reverse since the file name field may
|
||||
* contain `.' or `:'. */
|
||||
char *delim = strrchr (loc_str, '.');
|
||||
- aver (delim);
|
||||
+ aver (delim != NULL);
|
||||
*delim = '\0';
|
||||
bound->column = atoi (delim+1);
|
||||
delim = strrchr (loc_str, ':');
|
||||
- aver (delim);
|
||||
+ aver (delim != NULL);
|
||||
*delim = '\0';
|
||||
bound->line = atoi (delim+1);
|
||||
bound->file = uniqstr_new (loc_str);
|
||||
diff -urN bison-2.4.3/src/muscle_tab.c bison-2.4.3-haiku/src/muscle_tab.c
|
||||
--- bison-2.4.3/src/muscle_tab.c 2010-08-06 00:37:58.065011712 +0000
|
||||
+++ bison-2.4.3-haiku/src/muscle_tab.c 2011-01-26 10:23:20.033030144 +0000
|
||||
@@ -338,7 +338,7 @@
|
||||
{
|
||||
location loc;
|
||||
char const *value = muscle_find_const (key);
|
||||
- aver (value);
|
||||
+ aver (value != NULL);
|
||||
aver (*value == '[');
|
||||
aver (*++value == '[');
|
||||
while (*++value)
|
||||
@@ -1,100 +0,0 @@
|
||||
From 9a1dd934ea2f8fd0f05cb9bb0c647514810342c4 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 4 Aug 2014 19:41:40 +0000
|
||||
Subject: c89 patch
|
||||
|
||||
|
||||
diff --git a/src/AnnotationList.c b/src/AnnotationList.c
|
||||
index 4c1e0ae..97f35f6 100644
|
||||
--- a/src/AnnotationList.c
|
||||
+++ b/src/AnnotationList.c
|
||||
@@ -233,9 +233,10 @@ AnnotationList__computePredecessorAnnotations (AnnotationList *self, state *s,
|
||||
AnnotationList *annotation_node =
|
||||
AnnotationList__alloc_on_obstack (
|
||||
self->inadequacyNode->contributionCount, annotations_obstackp);
|
||||
- annotation_node->inadequacyNode = self->inadequacyNode;
|
||||
bool potential_contribution = false;
|
||||
bitset *lookaheads = NULL;
|
||||
+ annotation_node->inadequacyNode = self->inadequacyNode;
|
||||
+
|
||||
{
|
||||
ContributionIndex ci;
|
||||
for (ci = 0; ci < self->inadequacyNode->contributionCount; ++ci)
|
||||
diff --git a/src/getargs.c b/src/getargs.c
|
||||
index 6490569..bbf1845 100644
|
||||
--- a/src/getargs.c
|
||||
+++ b/src/getargs.c
|
||||
@@ -267,6 +267,7 @@ static void usage (int) ATTRIBUTE_NORETURN;
|
||||
static void
|
||||
usage (int status)
|
||||
{
|
||||
+ const char *lc_messages = setlocale (LC_MESSAGES, NULL);
|
||||
if (status != 0)
|
||||
fprintf (stderr, _("Try `%s --help' for more information.\n"),
|
||||
program_name);
|
||||
@@ -370,7 +371,6 @@ THINGS is a list of comma separated words that can include:\n\
|
||||
/* Don't output this redundant message for English locales.
|
||||
Note we still output for 'C' so that it gets included in the
|
||||
man page. */
|
||||
- const char *lc_messages = setlocale (LC_MESSAGES, NULL);
|
||||
if (lc_messages && strcmp (lc_messages, "en_"))
|
||||
/* TRANSLATORS: Replace LANG_CODE in this URL with your language
|
||||
code <http://translationproject.org/team/LANG_CODE.html> to
|
||||
diff --git a/src/ielr.c b/src/ielr.c
|
||||
index cde2baa..ce437e3 100644
|
||||
--- a/src/ielr.c
|
||||
+++ b/src/ielr.c
|
||||
@@ -1032,9 +1032,9 @@ ielr_split_states (bitsetv follow_kernel_items, bitsetv always_follows,
|
||||
lookahead sets. */
|
||||
if (!annotation_lists)
|
||||
{
|
||||
+ state_list *node;
|
||||
timevar_push (TV_IELR_PHASE4);
|
||||
initialize_LA ();
|
||||
- state_list *node;
|
||||
for (node = first_state; node; node = node->next)
|
||||
if (!node->state->consistent)
|
||||
{
|
||||
diff --git a/src/scan-code.l b/src/scan-code.l
|
||||
index fa593be..54f2921 100644
|
||||
--- a/src/scan-code.l
|
||||
+++ b/src/scan-code.l
|
||||
@@ -611,12 +611,12 @@ parse_ref (char *cp, symbol_list *rule, int rule_length,
|
||||
indent += SUB_INDENT;
|
||||
if (len == 0)
|
||||
{
|
||||
- location sym_loc = text_loc;
|
||||
- sym_loc.start.column += 1;
|
||||
- sym_loc.end = sym_loc.start;
|
||||
const char *format =
|
||||
_("syntax error after '%c', expecting integer, letter,"
|
||||
" '_', '[', or '$'");
|
||||
+ location sym_loc = text_loc;
|
||||
+ sym_loc.start.column += 1;
|
||||
+ sym_loc.end = sym_loc.start;
|
||||
complain_at_indent (sym_loc, &indent, format, dollar_or_at);
|
||||
}
|
||||
else if (midrule_rhs_index)
|
||||
diff --git a/src/uniqstr.c b/src/uniqstr.c
|
||||
index 62d09ca..4d5f0a7 100644
|
||||
--- a/src/uniqstr.c
|
||||
+++ b/src/uniqstr.c
|
||||
@@ -62,13 +62,14 @@ uniqstr_vsprintf (char const *format, ...)
|
||||
va_start (args, format);
|
||||
length = vsnprintf (NULL, 0, format, args);
|
||||
va_end (args);
|
||||
-
|
||||
+{
|
||||
char res[length + 1];
|
||||
va_start (args, format);
|
||||
vsprintf (res, format, args);
|
||||
va_end (args);
|
||||
return uniqstr_new (res);
|
||||
}
|
||||
+}
|
||||
|
||||
/*------------------------------.
|
||||
| Abort if S is not a uniqstr. |
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user