Add bison 2.3

This is required for perl 5.10.1.
This commit is contained in:
fosslinux 2021-04-13 18:05:34 +10:00
parent 8d57161613
commit d943b37962
11 changed files with 178 additions and 0 deletions

32
sysa/bison-2.3/bison-2.3.sh Executable file
View file

@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
../../import-gnulib.sh
AUTOPOINT=true autoreconf-2.65 -fi
# Remove pregenerated files
rm src/parse-gram.c src/parse-gram.h src/scan-skel.c src/scan-gram.c
# Remove pregenerated .info
rm doc/bison.info
}
src_configure() {
LEX=flex-2.5.33 ./configure \
--prefix="${PREFIX}" \
--program-suffix=-2.3 \
--datarootdir="${PREFIX}/share/bison-2.3"
}
src_compile() {
make MAKEINFO=true
}
src_install() {
make MAKEINFO=true DESTDIR="${DESTDIR}" install
}

1
sysa/bison-2.3/checksums Normal file
View file

@ -0,0 +1 @@
1064ce45a402e6dcadf2a01e4aa55743ee45a7124ce4ba580d80e75f49af1ff8 /after/bin/bison-2.3

55
sysa/bison-2.3/import-gnulib.sh Executable file
View file

@ -0,0 +1,55 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -e
gnulib_modules='
argmatch
dirname
error
exitfail
extensions
getopt
gettext
hard-locale
hash
malloc
mbswidth
obstack
quote
quotearg
stdbool
stdio-safer
strerror
strtoul
strverscmp
unistd-safer
unlocked-io
verify
xalloc
xalloc-die
xstrndup
'
# Copy over needed files
for i in ${gnulib_modules}; do
for f in $(../gnulib-b28236b/gnulib-tool --extract-filelist "${i}") \
lib/wcwidth.h; do
cp -pf "../gnulib-b28236b/${f}" "./${f}"
done
done
# Generate the things
(echo '# This file is generated automatically by "bootstrap".' &&
echo 'AC_DEFUN([GNULIB_AUTOCONF_SNIPPET],[' &&
../gnulib-b28236b/gnulib-tool --extract-autoconf-snippet $gnulib_modules &&
echo '])'
) > m4/gnulib.m4
(echo '# This file is generated automatically by "bootstrap".' &&
../gnulib-b28236b/gnulib-tool --extract-automake-snippet $gnulib_modules |
sed 's/^[ ]*AM_CPPFLAGS[ ]*+=/# (commented out by bootstrap) &/'
) > lib/gnulib.mk

View file

@ -0,0 +1,17 @@
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-2.0-or-later
This macro does not exist in newer versions of autoconf and is unrequired.
There is no verion of autoconf supporting this project + gnulib + this macro.
--- m4/po_gl.m4 2021-04-11 18:39:53.353069610 +1000
+++ m4/po_gl.m4 2021-04-11 18:40:20.422242498 +1000
@@ -24,7 +24,6 @@
[
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_MKINSTALLDIRS])dnl
AC_REQUIRE([AM_NLS])dnl
dnl Perform the following tests also if --disable-nls has been given,

View file

@ -0,0 +1,18 @@
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-2.0-or-later
fopen-safer.c for whatever reason does not exist when added by gnulib.
--- lib/Makefile.am 2021-04-11 19:01:01.265993928 +1000
+++ lib/Makefile.am 2021-04-11 19:01:40.413232722 +1000
@@ -32,7 +32,8 @@
lib_SOURCES = \
get-errno.h get-errno.c \
subpipe.h subpipe.c \
- $(bitsets_sources) $(additional_bitsets_sources) $(timevars_sources)
+ $(bitsets_sources) $(additional_bitsets_sources) $(timevars_sources) \
+ fopen-safer.c
# Implementation of bitsets
bitsets_sources = \

View file

@ -0,0 +1,17 @@
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-2.0-or-later
This should be declared for gnulib, but for some reason is not, most likely
use of a different version (but CVS history no longer exists).
--- lib/Makefile.am 2021-04-11 13:49:09.414805465 +1000
+++ lib/Makefile.am 2021-04-11 13:49:26.418916036 +1000
@@ -19,6 +19,7 @@
BUILT_SOURCES =
EXTRA_DIST =
+EXTRA_lib_SOURCES =
MOSTLYCLEANFILES =
lib_LIBRARIES = $(YACC_LIBRARY)

View file

@ -0,0 +1,20 @@
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-2.0-or-later
This doesn't actually make sense, you can't use the built bison to bootstrap
itself. Make it use our bison instead.
--- src/Makefile.am 2021-04-10 21:37:11.570390316 +1000
+++ src/Makefile.am 2021-04-10 21:38:01.805804332 +1000
@@ -23,10 +23,6 @@
LDADD = ../lib/libbison.a $(LIBINTL)
-# Use our own Bison to build the parser. Of course, you ought to
-# keep a sane version of Bison nearby...
-YACC = ../tests/bison -y
-
bin_PROGRAMS = bison
bin_SCRIPTS = $(YACC_SCRIPT)
EXTRA_SCRIPTS = yacc

View file

@ -36,6 +36,8 @@ build mpc-1.2.1
build flex-2.5.33
build bison-2.3
if [ "$FORCE_TIMESTAMPS" = True ] ; then
echo 'Forcing all files timestamps to be 0 unix time.'
canonicalise_all_files_timestamp