diff --git a/steps/SHA256SUMS.pkgs b/steps/SHA256SUMS.pkgs index 8ecabb81..114a5ad9 100644 --- a/steps/SHA256SUMS.pkgs +++ b/steps/SHA256SUMS.pkgs @@ -30,6 +30,7 @@ c934b39be7232d27e13656ff8df628590917d2131b41a409426be00ce816624b binutils-2.41_ f7437edc081071cc3ecd3384abf4c63f33183858b8cae6b4ac3105c66f88b3b6 bison-3.4.1_1.tar.bz2 8064a96c8ccfbab1245554ac30e68fcc73da24a3dd02f8450658fdb106c7f405 bison-3.4.1_2.tar.bz2 1d34d1576c5cf61c84929d212594e4187029339a5d37cbe0a69d73d6b2a29604 bison-3.4.2_0.tar.bz2 +627b1e4b5dfb9b11fcfe1426415f1596af8bd2cb98402e8a88f66caa289efc25 bison-3.6.4_0.tar.bz2 e8271c1213b6cc7c9ae2ddb018cd093cbbd5f6e842548c0747ce95b13b6b9447 bzip2-1.0.8_0.tar.bz2 fd65c11422588984bc3a440b1fd9d022307a200de182cfedfe3387a09cbece98 ca-certificates-3.99_0.tar.bz2 982a3496ce3277c562acc896ba796939fe55a37432b2c76ab16b76e051a045a2 coreutils-5.0_0.tar.bz2 diff --git a/steps/bison-3.4.2/import-gnulib.sh b/steps/bison-3.4.2/import-gnulib.sh deleted file mode 100755 index a6dcb5af..00000000 --- a/steps/bison-3.4.2/import-gnulib.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2021 Samuel Tyler -# -# SPDX-License-Identifier: GPL-3.0-or-later - -../gnulib-672663a/gnulib-tool --import --local-dir=gl \ - --lib=libbison \ - --source-base=lib \ - --m4-base=m4 \ - --po-base=gnulib-po \ - --doc-base=doc \ - --tests-base=tests \ - --aux-dir=build-aux \ - --makefile-name=gnulib.mk \ - --conditional-dependencies \ - --no-libtool \ - --macro-prefix=gl \ - --po-domain=bison \ - argmatch \ - array-list \ - assert \ - assure \ - bitsetv \ - c-strcase \ - calloc-posix \ - close \ - closeout \ - config-h \ - configmake \ - dirname \ - error \ - extensions \ - fdl \ - fopen-safer \ - fprintf-posix \ - getopt-gnu \ - gettext-h \ - git-version-gen \ - gitlog-to-changelog \ - gpl-3.0 \ - inttypes \ - isnan \ - javacomp-script \ - javaexec-script \ - ldexpl \ - libtextstyle-optional \ - mbswidth \ - non-recursive-gnulib-prefix-hack \ - obstack \ - obstack-printf \ - perror \ - printf-posix \ - progname \ - quote \ - quotearg \ - readme-release \ - realloc-posix \ - relocatable-prog \ - relocatable-script \ - rename \ - snprintf-posix \ - spawn-pipe \ - sprintf-posix \ - stdbool \ - stpcpy \ - strdup-posix \ - strerror \ - strverscmp \ - timevar \ - unistd \ - unistd-safer \ - unlink \ - unlocked-io \ - unsetenv \ - update-copyright \ - verify \ - vsnprintf-posix \ - vsprintf-posix \ - warnings \ - xalloc \ - xalloc-die \ - xconcat-filename \ - xhash \ - xlist \ - xmemdup0 \ - xstrndup - -../gnulib-672663a/build-aux/prefix-gnulib-mk \ - --lib-name=libbison \ - lib/gnulib.mk diff --git a/steps/bison-3.4.2/patches/gnulib-makefile.patch b/steps/bison-3.4.2/patches/gnulib-makefile.patch deleted file mode 100644 index b0a536a8..00000000 --- a/steps/bison-3.4.2/patches/gnulib-makefile.patch +++ /dev/null @@ -1,17 +0,0 @@ -SPDX-FileCopyrightText: 2021 Samuel Tyler - -SPDX-License-Identifier: GPL-3.0-or-later - -Again, same as bison 2.3. I cannot figure out what gnulib/bison are doing -that makes this required... - ---- bison-3.4.2/Makefile.am 2021-04-15 12:18:34.371818904 +1000 -+++ bison-3.4.2/Makefile.am 2021-04-15 12:18:39.055851647 +1000 -@@ -63,6 +63,7 @@ - check_SCRIPTS = - dist_TESTS = - noinst_LIBRARIES = -+lib_libbison_a_SOURCES = - - include build-aux/local.mk - include data/local.mk diff --git a/steps/bison-3.6.4/import-gnulib.sh b/steps/bison-3.6.4/import-gnulib.sh new file mode 100755 index 00000000..2f0a9170 --- /dev/null +++ b/steps/bison-3.6.4/import-gnulib.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2021 Samuel Tyler +# +# SPDX-License-Identifier: GPL-3.0-or-later + +../gnulib-ffbb0ce/gnulib-tool --import --local-dir=gl \ + --lib=libbison \ + --source-base=lib \ + --m4-base=m4 \ + --po-base=gnulib-po \ + --doc-base=doc \ + --tests-base=tests \ + --aux-dir=build-aux \ + --makefile-name=gnulib.mk \ + --conditional-dependencies \ + --no-libtool \ + --macro-prefix=gl \ + --po-domain=bison \ + argmatch \ + array-list \ + assert \ + assure \ + bitsetv \ + c-strcase \ + calloc-posix \ + close \ + closeout \ + config-h \ + configmake \ + dirname \ + error \ + extensions \ + fdl \ + fopen-safer \ + fprintf-posix \ + fstrcmp \ + getopt-gnu \ + gettext-h \ + git-version-gen \ + gitlog-to-changelog \ + gpl-3.0 \ + intprops \ + inttypes \ + isnan \ + javacomp-script \ + javaexec-script \ + ldexpl \ + libtextstyle-optional \ + malloc-gnu \ + mbfile \ + mbswidth \ + non-recursive-gnulib-prefix-hack \ + obstack \ + obstack-printf \ + perror \ + printf-posix \ + progname \ + quote \ + quotearg \ + readline \ + readme-release \ + realloc-posix \ + relocatable-prog \ + relocatable-script \ + rename \ + snprintf-posix \ + spawn-pipe \ + sprintf-posix \ + stdbool \ + stpcpy \ + strdup-posix \ + strerror \ + strverscmp \ + timevar \ + unistd \ + unistd-safer \ + unlink \ + unlocked-io \ + unsetenv \ + update-copyright \ + verify \ + vsnprintf-posix \ + vsprintf-posix \ + warnings \ + winsz-ioctl \ + winsz-termios \ + xalloc \ + xalloc-die \ + xconcat-filename \ + xhash \ + xlist \ + xmemdup0 \ + xstrndup + +build-aux/prefix-gnulib-mk --lib-name=libbison lib/gnulib.mk diff --git a/steps/bison-3.4.2/pass1.sh b/steps/bison-3.6.4/pass1.sh similarity index 68% rename from steps/bison-3.4.2/pass1.sh rename to steps/bison-3.6.4/pass1.sh index 26278286..8986e4da 100755 --- a/steps/bison-3.4.2/pass1.sh +++ b/steps/bison-3.6.4/pass1.sh @@ -6,6 +6,10 @@ src_prepare() { default + # GRAM_error was added after Bison 3.4, and doesn't add anything + # other than some sanity checks. + sed -i '/GRAM_error/d' src/scan-gram.l + # Remove pre-generated flex/bison files rm src/parse-gram.c src/parse-gram.h rm src/scan-code.c @@ -13,10 +17,18 @@ src_prepare() { rm src/scan-skel.c # Remove pregenerated info files - rm doc/bison.info + rm doc/bison.info* + + # Remove gettext files + rm runtime-po/*.gmo ../../import-gnulib.sh + # pregenerated gperf files + for f in lib/iconv_open-*.gperf; do + touch "$(basename "$f" .gperf).h" + done + AUTOPOINT=true AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi } diff --git a/steps/bison-3.6.4/patches/0001-Revert-diagnostics-translate-bison-s-own-tokens.patch b/steps/bison-3.6.4/patches/0001-Revert-diagnostics-translate-bison-s-own-tokens.patch new file mode 100644 index 00000000..6cfbab85 --- /dev/null +++ b/steps/bison-3.6.4/patches/0001-Revert-diagnostics-translate-bison-s-own-tokens.patch @@ -0,0 +1,118 @@ +SPDX-FileCopyrightText: 2025 Samuel Tyler + +SPDX-License-Identifier: GPL-3.0-or-later + +Revert "diagnostics: translate bison's own tokens" + +This reverts commit 2cc361387c9790b387d205f5d862f493c148e424. + +This format is not suppported by Bison 3.4. +--- + src/parse-gram.y | 71 ++++++++++++++++++++++++++---------------------- + 1 file changed, 39 insertions(+), 32 deletions(-) + +diff --git bison-3.6.4/src/parse-gram.y bison-3.6.1/src/parse-gram.y +index d09f49a7..0879ca41 100644 +--- bison-3.6.4/src/parse-gram.y ++++ bison-3.6.4/src/parse-gram.y +@@ -140,26 +140,32 @@ + boundary_set (&@$.end, grammar_file, 1, 1, 1); + } + +-%token +- STRING _("string") +- TSTRING _("translatable string") ++/* Define the tokens together with their human representation. */ ++%token GRAM_EOF 0 "end of file" ++%token STRING "string" ++ TSTRING "translatable string" ++ ++%token PERCENT_TOKEN "%token" ++%token PERCENT_NTERM "%nterm" + +- PERCENT_TOKEN "%token" +- PERCENT_NTERM "%nterm" ++%token PERCENT_TYPE "%type" ++%token PERCENT_DESTRUCTOR "%destructor" ++%token PERCENT_PRINTER "%printer" + +- PERCENT_TYPE "%type" +- PERCENT_DESTRUCTOR "%destructor" +- PERCENT_PRINTER "%printer" ++%token PERCENT_LEFT "%left" ++%token PERCENT_RIGHT "%right" ++%token PERCENT_NONASSOC "%nonassoc" ++%token PERCENT_PRECEDENCE "%precedence" + +- PERCENT_LEFT "%left" +- PERCENT_RIGHT "%right" +- PERCENT_NONASSOC "%nonassoc" +- PERCENT_PRECEDENCE "%precedence" ++%token PERCENT_PREC "%prec" ++%token PERCENT_DPREC "%dprec" ++%token PERCENT_MERGE "%merge" + +- PERCENT_PREC "%prec" +- PERCENT_DPREC "%dprec" +- PERCENT_MERGE "%merge" ++/*----------------------. ++| Global Declarations. | ++`----------------------*/ + ++%token + PERCENT_CODE "%code" + PERCENT_DEFAULT_PREC "%default-prec" + PERCENT_DEFINE "%define" +@@ -185,23 +191,24 @@ + PERCENT_TOKEN_TABLE "%token-table" + PERCENT_VERBOSE "%verbose" + PERCENT_YACC "%yacc" ++; + +- BRACED_CODE "{...}" +- BRACED_PREDICATE "%?{...}" +- BRACKETED_ID _("[identifier]") +- CHAR _("character literal") +- COLON ":" +- EPILOGUE _("epilogue") +- EQUAL "=" +- ID _("identifier") +- ID_COLON _("identifier:") +- PERCENT_PERCENT "%%" +- PIPE "|" +- PROLOGUE "%{...%}" +- SEMICOLON ";" +- TAG _("") +- TAG_ANY "<*>" +- TAG_NONE "<>" ++%token BRACED_CODE "{...}" ++%token BRACED_PREDICATE "%?{...}" ++%token BRACKETED_ID "[identifier]" ++%token CHAR "character literal" ++%token COLON ":" ++%token EPILOGUE "epilogue" ++%token EQUAL "=" ++%token ID "identifier" ++%token ID_COLON "identifier:" ++%token PERCENT_PERCENT "%%" ++%token PIPE "|" ++%token PROLOGUE "%{...%}" ++%token SEMICOLON ";" ++%token TAG "" ++%token TAG_ANY "<*>" ++%token TAG_NONE "<>" + + /* Experimental feature, don't rely on it. */ + %code pre-printer {tron (yyo);} +@@ -224,7 +231,7 @@ + %printer { fprintf (yyo, "%%%s", $$); } PERCENT_FLAG + %printer { fprintf (yyo, "<%s>", $$); } TAG tag + +-%token INT _("integer literal") ++%token INT "integer" + %printer { fprintf (yyo, "%d", $$); } + + %type id id_colon string_as_id symbol token_decl token_decl_for_prec +-- +2.52.0 + diff --git a/steps/bison-3.6.4/patches/dangling-alias.patch b/steps/bison-3.6.4/patches/dangling-alias.patch new file mode 100644 index 00000000..4ccdff76 --- /dev/null +++ b/steps/bison-3.6.4/patches/dangling-alias.patch @@ -0,0 +1,17 @@ +SPDX-FileCopyrightText: 2025 Samuel Tyler + +SPDX-License-Identifier: GPL-3.0-or-later + +Our version of bison does not have dangling-alias. + +--- bison-3.6.4/Makefile.am 2025-12-15 22:03:53.093822507 +1100 ++++ bison-3.6.4/Makefile.am 2025-12-15 22:04:07.336823714 +1100 +@@ -42,7 +42,7 @@ + BISON = $(top_builddir)/tests/bison + BISON_IN = $(top_srcdir)/tests/bison.in + YACC = $(BISON) -o y.tab.c +-AM_YFLAGS_WITH_LINES = --defines -Werror -Wall,dangling-alias --report=all ++AM_YFLAGS_WITH_LINES = --defines -Wall --report=all + AM_YFLAGS = $(AM_YFLAGS_WITH_LINES) --no-lines + + # Initialization before completion by local.mk's. diff --git a/steps/bison-3.6.4/patches/iconv-autoconf.patch b/steps/bison-3.6.4/patches/iconv-autoconf.patch new file mode 100644 index 00000000..0a9e0f77 --- /dev/null +++ b/steps/bison-3.6.4/patches/iconv-autoconf.patch @@ -0,0 +1,29 @@ +SPDX-FileCopyrightText: 2025 Samuel Tyler + +SPDX-License-Identifier: GPL-3.0-or-later + +It is unclear _why_ this is necessary. Something gets broken with +iconv detection for this version. + +--- bison-3.6.4/m4/gettext.m4 2025-12-15 23:14:05.683179597 +1100 ++++ bison-3.6.4/m4/gettext.m4 2025-12-15 23:14:18.450180679 +1100 +@@ -93,9 +93,6 @@ + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. +- ifelse(gt_included_intl, yes, , [ +- AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) +- ]) + + dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX +@@ -174,9 +171,6 @@ + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. +- ifelse(gt_included_intl, yes, , [ +- AM_ICONV_LINK +- ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL diff --git a/steps/bison-3.4.2/patches/our-bison.patch b/steps/bison-3.6.4/patches/our-bison.patch similarity index 81% rename from steps/bison-3.4.2/patches/our-bison.patch rename to steps/bison-3.6.4/patches/our-bison.patch index aa5039bc..b8ed28c9 100644 --- a/steps/bison-3.4.2/patches/our-bison.patch +++ b/steps/bison-3.6.4/patches/our-bison.patch @@ -5,8 +5,8 @@ SPDX-License-Identifier: GPL-3.0-or-later Why do they insist on using themselves to bootstrap themselves? It doesn't exist... ---- bison-3.4.2/Makefile.am 2021-04-15 21:29:36.596205032 +1000 -+++ bison-3.4.2/Makefile.am 2021-04-15 21:30:00.367365897 +1000 +--- bison-3.6.4/Makefile.am 2021-04-15 21:29:36.596205032 +1000 ++++ bison-3.6.4/Makefile.am 2021-04-15 21:30:00.367365897 +1000 @@ -39,7 +39,7 @@ ## Running the bison from this tarball. To generate our own parser, ## but also to run the tests. Of course, you ought to keep a sane diff --git a/steps/bison-3.6.4/patches/parse-error.patch b/steps/bison-3.6.4/patches/parse-error.patch new file mode 100644 index 00000000..21c1f45d --- /dev/null +++ b/steps/bison-3.6.4/patches/parse-error.patch @@ -0,0 +1,21 @@ +SPDX-FileCopyrightText: 2025 Samuel Tyler + +SPDX-License-Identifier: GPL-3.0-or-later + +These are directives that don't exist for Bison 3.4. + +diff --git bison-3.6.4/src/parse-gram.y bison-3.6.4/src/parse-gram.y +index d09f49a7..01b8dda9 100644 +--- bison-3.6.4/src/parse-gram.y ++++ bison-3.6.4/src/parse-gram.y +@@ -122,10 +122,8 @@ + %define api.header.include {"parse-gram.h"} + %define api.prefix {gram_} + %define api.pure full +-%define api.token.raw + %define api.value.type union + %define locations +-%define parse.error custom + %define parse.lac full + %define parse.trace + %defines diff --git a/steps/bison-3.4.2/patches/po-files.patch b/steps/bison-3.6.4/patches/po-files.patch similarity index 66% rename from steps/bison-3.4.2/patches/po-files.patch rename to steps/bison-3.6.4/patches/po-files.patch index 49251d8f..f3f58b17 100644 --- a/steps/bison-3.4.2/patches/po-files.patch +++ b/steps/bison-3.6.4/patches/po-files.patch @@ -1,12 +1,12 @@ -SPDX-FileCopyrightText: 2021 Samuel Tyler +SPDX-FileCopyrightText: 2025 Samuel Tyler SPDX-License-Identifier: GPL-3.0-or-later -We don't have network access at this stage to "Fetch PO files". +Can't fetch PO files, no network access. ---- gnulib-672663a/gnulib-tool 2021-04-15 21:07:04.538055553 +1000 -+++ gnulib-672663a/gnulib-tool 2021-04-15 21:07:16.424135984 +1000 -@@ -5564,16 +5564,6 @@ +--- gnulib-ffbb0ce/gnulib-tool 2025-12-15 21:17:35.808587084 +1100 ++++ gnulib-ffbb0ce/gnulib-tool 2025-12-15 21:17:55.399588744 +1100 +@@ -5598,16 +5598,6 @@ fi func_append added_files "$pobase/POTFILES.in$nl" fi diff --git a/steps/bison-3.6.4/patches/yycontext-remove.patch b/steps/bison-3.6.4/patches/yycontext-remove.patch new file mode 100644 index 00000000..8e76c6cc --- /dev/null +++ b/steps/bison-3.6.4/patches/yycontext-remove.patch @@ -0,0 +1,42 @@ +SPDX-FileCopyrightText: 2025 Samuel Tyler + +SPDX-License-Identifier: GPL-3.0-or-later + +This was added with the addition of yypcontext_t -- it's the only use, +remove it. (Bison 3.4 doesn't know about yypcontext_t.) + +diff --git bison-3.6.4/src/parse-gram.y bison-3.5.90/src/parse-gram.y +index d09f49a7..cf1a5bf4 100644 +--- bison-3.6.4/src/parse-gram.y ++++ bison-3.6.4/src/parse-gram.y +@@ -798,28 +798,9 @@ epilogue.opt: + %% + + int +-yyreport_syntax_error (const yypcontext_t *ctx) ++yyreport_syntax_error (const void *ctx) + { +- int res = 0; +- /* Arguments of format: reported tokens (one for the "unexpected", +- one per "expected"). */ +- enum { ARGS_MAX = 5 }; +- const char *argv[ARGS_MAX]; +- int argc = 0; +- yysymbol_kind_t unexpected = yypcontext_token (ctx); +- if (unexpected != YYSYMBOL_YYEMPTY) +- { +- argv[argc++] = yysymbol_name (unexpected); +- yysymbol_kind_t expected[ARGS_MAX - 1]; +- int nexpected = yypcontext_expected_tokens (ctx, expected, ARGS_MAX - 1); +- if (nexpected < 0) +- res = nexpected; +- else +- for (int i = 0; i < nexpected; ++i) +- argv[argc++] = yysymbol_name (expected[i]); +- } +- syntax_error (*yypcontext_location (ctx), argc, argv); +- return res; ++ return 0; + } + + diff --git a/steps/bison-3.6.4/sources b/steps/bison-3.6.4/sources new file mode 100644 index 00000000..2784b041 --- /dev/null +++ b/steps/bison-3.6.4/sources @@ -0,0 +1,2 @@ +f http://mirrors.kernel.org/gnu/bison/bison-3.6.4.tar.xz 8b13473b31ca7fcf65e5e8a74224368ffd5df19275602a9c9567ba393f18577d +g https://https.git.savannah.gnu.org/git/gnulib.git~ffbb0ce _ 4c14c95b301e74804dd82d3993176b03cffedc18221bf573db35d21f2f8a930e gnulib-ffbb0ce.tar.gz diff --git a/steps/manifest b/steps/manifest index 21778657..eedbfa5f 100644 --- a/steps/manifest +++ b/steps/manifest @@ -154,7 +154,6 @@ build: mpfr-4.1.0 build: mpc-1.2.1 build: flex-2.5.33 build: bison-2.3 -build: bison-3.4.2 build: zlib-1.2.13 build: dist-3.5 build: perl-Devel-Tokenizer-C-0.11 @@ -171,6 +170,9 @@ build: perl-Devel-Tokenizer-C-0.11 build: perl-5.17.4 build: perl-Devel-Tokenizer-C-0.11 build: perl-5.18.4 +build: automake-1.16.3 +build: autoconf-2.71 +build: bison-3.6.4 build: perl-Devel-Tokenizer-C-0.11 build: perl-5.22.4 build: perl-Devel-Tokenizer-C-0.11 @@ -186,8 +188,6 @@ build: libarchive-3.5.2 build: openssl-3.0.13 build: ca-certificates-3.99 build: curl-8.12.1 -build: automake-1.16.3 -build: autoconf-2.71 build: patch-2.7.6 build: gettext-0.21 build: texinfo-6.7