From a392b7bac930439f95d073cccb6bcc95795c29c4 Mon Sep 17 00:00:00 2001 From: fosslinux Date: Wed, 28 Apr 2021 16:20:41 +1000 Subject: [PATCH] Add bison 3.4.2. --- SHA256SUMS.sources | 2 + parts.rst | 7 ++ sysa.py | 4 + sysa/bison-3.4.2/bison-3.4.2.sh | 32 +++++++ sysa/bison-3.4.2/checksums | 1 + sysa/bison-3.4.2/import-gnulib.sh | 91 +++++++++++++++++++ .../bison-3.4.2/patches/gnulib-makefile.patch | 17 ++++ sysa/bison-3.4.2/patches/our-bison.patch | 18 ++++ sysa/bison-3.4.2/patches/po-files.patch | 25 +++++ sysa/run2.sh | 2 + 10 files changed, 199 insertions(+) create mode 100755 sysa/bison-3.4.2/bison-3.4.2.sh create mode 100644 sysa/bison-3.4.2/checksums create mode 100755 sysa/bison-3.4.2/import-gnulib.sh create mode 100644 sysa/bison-3.4.2/patches/gnulib-makefile.patch create mode 100644 sysa/bison-3.4.2/patches/our-bison.patch create mode 100644 sysa/bison-3.4.2/patches/po-files.patch diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources index 9d163a8..65044b1 100644 --- a/SHA256SUMS.sources +++ b/SHA256SUMS.sources @@ -69,3 +69,5 @@ b10d7e9e354be72aee4e4911cf19dd27b5c527d4e7200857365b5fcdeea0dffb bison-2.3.tar. 9385f2c8c2ca8b1dc4a7c31903f1f8dc8f2ba867dc2a9e5c93012ed6b564e826 perl-5.10.1.tar.bz2 54437ae4211867de7ad55723f68b94c29cb2f08a23f431e0bbbc9f34ee384f47 dist-3.5-236.tar.gz e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7 make-4.2.1.tar.gz +27d05534699735dc69e86add5b808d6cb35900ad3fd63fa82e3eb644336abfa0 bison-3.4.2.tar.xz +8cced51f89a950472473856f86e88f5daf97a2347756125ccdc8ee907deec570 gnulib-672663a.tar.gz diff --git a/parts.rst b/parts.rst index e8c4e1b..a07a73b 100644 --- a/parts.rst +++ b/parts.rst @@ -655,6 +655,13 @@ This is an older version of bison required for the bison files in perl 5.10.1. We backwards-bootstrap this from 3.4.1, using 3.4.1 to compile the bison files in 2.3. This parser works sufficiently well for perl 5.10.5. +bison 3.4.2 +=========== + +Bison 3.4.1 is buggy and segfaults when perl 5.32.1 is built. This is probably +because it was built with a hand-written makefile. We do not build the latest +bison because perl 5.32.1 requires bison <= 3.4.2. + perl 5.10.1 =========== diff --git a/sysa.py b/sysa.py index b053e34..6f1c2c9 100755 --- a/sysa.py +++ b/sysa.py @@ -468,6 +468,10 @@ class SysA: self.get_file(["https://mirrors.kernel.org/gnu/bison/bison-2.3.tar.bz2", "https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-b28236b.tar.gz"]) + # bison 3.4.2 + self.get_file(["https://mirrors.kernel.org/gnu/bison/bison-3.4.2.tar.xz", + "https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-672663a.tar.gz"]) + # perl 5.10.5 self.get_file("https://www.cpan.org/src/5.0/perl-5.10.1.tar.bz2") diff --git a/sysa/bison-3.4.2/bison-3.4.2.sh b/sysa/bison-3.4.2/bison-3.4.2.sh new file mode 100755 index 0000000..d3299bb --- /dev/null +++ b/sysa/bison-3.4.2/bison-3.4.2.sh @@ -0,0 +1,32 @@ +# SPDX-FileCopyrightText: 2021 fosslinux +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + default + + # Remove pre-generated flex/bison files + rm src/parse-gram.c src/parse-gram.h + rm src/scan-code.c + rm src/scan-gram.c + rm src/scan-skel.c + + # Remove pregenerated info files + rm doc/bison.info + + ../../import-gnulib.sh + + AUTOPOINT=true autoreconf -fi +} + +src_configure() { + ./configure --prefix="${PREFIX}" --disable-nls +} + +src_compile() { + make MAKEINFO=true +} + +src_install() { + make MAKEINFO=true DESTDIR="${DESTDIR}" install +} diff --git a/sysa/bison-3.4.2/checksums b/sysa/bison-3.4.2/checksums new file mode 100644 index 0000000..0ec8cd6 --- /dev/null +++ b/sysa/bison-3.4.2/checksums @@ -0,0 +1 @@ +be6311f33f8dce01a5683b525b178f8d441c4ed2916ee19c64a0c43f8223e9cc /after/bin/bison diff --git a/sysa/bison-3.4.2/import-gnulib.sh b/sysa/bison-3.4.2/import-gnulib.sh new file mode 100755 index 0000000..48046f6 --- /dev/null +++ b/sysa/bison-3.4.2/import-gnulib.sh @@ -0,0 +1,91 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2021 fosslinux +# +# 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/sysa/bison-3.4.2/patches/gnulib-makefile.patch b/sysa/bison-3.4.2/patches/gnulib-makefile.patch new file mode 100644 index 0000000..e9db5aa --- /dev/null +++ b/sysa/bison-3.4.2/patches/gnulib-makefile.patch @@ -0,0 +1,17 @@ +SPDX-FileCopyrightText: 2021 fosslinux + +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... + +--- Makefile.am 2021-04-15 12:18:34.371818904 +1000 ++++ 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/sysa/bison-3.4.2/patches/our-bison.patch b/sysa/bison-3.4.2/patches/our-bison.patch new file mode 100644 index 0000000..c0bb420 --- /dev/null +++ b/sysa/bison-3.4.2/patches/our-bison.patch @@ -0,0 +1,18 @@ +SPDX-FileCopyrightText: 2021 fosslinux + +SPDX-License-Identifier: GPL-3.0-or-later + +Why do they insist on using themselves to bootstrap themselves? It dosen't +exist... + +--- Makefile.am 2021-04-15 21:29:36.596205032 +1000 ++++ 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 + ## version of Bison nearby... +-BISON = $(top_builddir)/tests/bison ++BISON = /after/bin/bison + BISON_IN = $(top_srcdir)/tests/bison.in + YACC = $(BISON) -o y.tab.c + AM_YFLAGS_WITH_LINES = --defines -Werror -Wall --report=all diff --git a/sysa/bison-3.4.2/patches/po-files.patch b/sysa/bison-3.4.2/patches/po-files.patch new file mode 100644 index 0000000..0e9f708 --- /dev/null +++ b/sysa/bison-3.4.2/patches/po-files.patch @@ -0,0 +1,25 @@ +SPDX-FileCopyrightText: 2021 fosslinux + +SPDX-License-Identifier: GPL-3.0-or-later + +We don't have network access at this stage to "Fetch PO files". + +--- ../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 @@ + fi + func_append added_files "$pobase/POTFILES.in$nl" + fi +- # Fetch PO files. +- TP_URL="https://translationproject.org/latest/" +- if $doit; then +- echo "Fetching gnulib PO files from $TP_URL" +- (cd "$destdir"/$pobase \ +- && wget --no-verbose --mirror --level=1 -nd -A.po -P . "${TP_URL}gnulib/" +- ) +- else +- echo "Fetch gnulib PO files from $TP_URL" +- fi + # Create po/LINGUAS. + if $doit; then + func_dest_tmpfilename $pobase/LINGUAS diff --git a/sysa/run2.sh b/sysa/run2.sh index edd8a86..6a3597e 100755 --- a/sysa/run2.sh +++ b/sysa/run2.sh @@ -40,6 +40,8 @@ build flex-2.5.33 build bison-2.3 +build bison-3.4.2 + build perl-5.10.1 build dist-3.5-236 '' '' '' dist-d1de81f