Skip to content

Commit

Permalink
Make patches relative to where tarballs are extracted
Browse files Browse the repository at this point in the history
Ever since an old patch version, it has (for reasonable security
reasons) not supported patched with ../ in the filename.
Many of our patches have been relying on this behaviour being OK,
because we start off with an ancient patch version that didn't perform
such checks. As soon as we need this behaviour after we build a newer
patch though, we will have problems.

So, let's change the policy.
Patches are relative to where tarballs are extracted, rather than the
"working directory" - e.g. have patches for `coreutils-9.4/src/cp.c`
instead of `src/cp.c`.
Keeping this consistent has a few implications;
- patches are applied from the build/ directory in bash era now, with
  `-p0`
- when patches are manually applied in the bash era, use `-p` as
  required, usually `-p1`
- in kaem era where patches are always manually applied, `-p1` is used
  • Loading branch information
fosslinux committed Dec 23, 2024
1 parent 749b2bf commit a67db8f
Show file tree
Hide file tree
Showing 156 changed files with 1,265 additions and 1,263 deletions.
3 changes: 2 additions & 1 deletion DEVEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ libraries that are compiled and installed.
## Conventions

- **Patches:**
- all patches are `-p0`
- all patches are relative to the directory where the tarball is extracted
- thus, no patch lines for `a/file.c`, but `coreutils-9.4/file.c`
- all patches begin with a patch header
- **parts.rst:**
- all packages are explained in `parts.rst`
Expand Down
4 changes: 2 additions & 2 deletions steps/autoconf-2.53/patches/autoconf_252.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ SPDX-License-Identifier: GPL-3.0-or-later

Disable features unsupported by Autoconf 2.52

--- configure.ac Wed Mar 17 19:53:06 2021
+++ configure.ac.new Wed Mar 17 19:52:53 2021
--- autoconf-2.53/configure.ac Wed Mar 17 19:53:06 2021
+++ autoconf-2.53/configure.ac.new Wed Mar 17 19:52:53 2021
@@ -19,8 +19,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
Expand Down
4 changes: 2 additions & 2 deletions steps/automake-1.10.3/patches/aclocal_glob.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-2.0-or-later

Fixes aclocal-1.10 to work with our Perl

--- aclocal.in 2021-03-25 19:18:10.489134059 +0000
+++ aclocal.in 2021-03-25 19:18:20.159389339 +0000
--- automake-1.10.3/aclocal.in 2021-03-25 19:18:10.489134059 +0000
+++ automake-1.10.3/aclocal.in 2021-03-25 19:18:20.159389339 +0000
@@ -45,6 +45,7 @@
use Automake::FileUtils;
use File::Basename;
Expand Down
4 changes: 2 additions & 2 deletions steps/automake-1.11.2/patches/aclocal_glob.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-2.0-or-later

Fixes aclocal-1.10 to work with our Perl

--- aclocal.in 2021-03-25 19:18:10.489134059 +0000
+++ aclocal.in 2021-03-25 19:18:20.159389339 +0000
--- automake-1.11.2/aclocal.in 2021-03-25 19:18:10.489134059 +0000
+++ automake-1.11.2/aclocal.in 2021-03-25 19:18:20.159389339 +0000
@@ -44,6 +44,7 @@
use Automake::FileUtils;
use File::Basename;
Expand Down
4 changes: 2 additions & 2 deletions steps/automake-1.15.1/patches/aclocal_glob.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-2.0-or-later

Fixes aclocal to work with our Perl

--- bin/aclocal.in 2021-03-31 18:19:50.665806225 +0100
+++ bin/aclocal.in 2021-03-31 18:20:02.836132739 +0100
--- automake-1.15.1/bin/aclocal.in 2021-03-31 18:19:50.665806225 +0100
+++ automake-1.15.1/bin/aclocal.in 2021-03-31 18:20:02.836132739 +0100
@@ -42,6 +42,7 @@
use Automake::XFile;
use Automake::FileUtils;
Expand Down
4 changes: 2 additions & 2 deletions steps/automake-1.15.1/patches/bootstrap.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-2.0-or-later

Fixes dependency of bootstrapping script

--- gen-testsuite-part 2017-06-16 21:46:16.000000000 +0100
+++ gen-testsuite-part 2021-04-01 00:02:46.801098617 +0100
--- automake-1.15.1/gen-testsuite-part 2017-06-16 21:46:16.000000000 +0100
+++ automake-1.15.1/gen-testsuite-part 2021-04-01 00:02:46.801098617 +0100
@@ -64,8 +64,6 @@
$func->($fh);
close $fh
Expand Down
4 changes: 2 additions & 2 deletions steps/automake-1.15.1/patches/shellcheck-bypass.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
Fixes configure script to work with older bash


--- configure.ac.bak 2023-03-08 14:34:57.009268432 +1100
+++ configure.ac 2023-03-08 14:35:27.947964581 +1100
--- automake-1.15.1/configure.ac.bak 2023-03-08 14:34:57.009268432 +1100
+++ automake-1.15.1/configure.ac 2023-03-08 14:35:27.947964581 +1100
@@ -272,14 +272,6 @@
[], [am_score=1; break])

Expand Down
10 changes: 5 additions & 5 deletions steps/bash-2.05b/pass1.kaem
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ touch include/pipesize.h
rm y.tab.c y.tab.h

# Patch
patch -Np0 -i ../../patches/mes-libc.patch
patch -Np0 -i ../../patches/tinycc.patch
patch -Np0 -i ../../patches/missing-defines.patch
patch -Np0 -i ../../patches/locale.patch
patch -Np0 -i ../../patches/dev-tty.patch
patch -Np1 -i ../../patches/mes-libc.patch
patch -Np1 -i ../../patches/tinycc.patch
patch -Np1 -i ../../patches/missing-defines.patch
patch -Np1 -i ../../patches/locale.patch
patch -Np1 -i ../../patches/dev-tty.patch

# Compile
make mkbuiltins
Expand Down
4 changes: 2 additions & 2 deletions steps/bash-2.05b/patches/dev-tty.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ some reason, bash has a fixation on /dev/tty, even though we are not
interactive. Removing this check entirely fixes this issue.

diff --color -ru shell.c
--- shell.c 2002-07-02 01:27:11.000000000 +1000
+++ shell.c 2021-01-16 11:23:36.407287955 +1100
--- bash-2.05b/shell.c 2002-07-02 01:27:11.000000000 +1000
+++ bash-2.05b/shell.c 2021-01-16 11:23:36.407287955 +1100
@@ -342,8 +342,6 @@
# endif
#endif
Expand Down
4 changes: 2 additions & 2 deletions steps/bash-2.05b/patches/extern.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-2.0-or-later

tinycc's extern support is bad. i.e. these externs don't propagate through.

--- builtins/common.c 2021-01-15 21:32:56.938683418 +1100
+++ builtins/common.c 2021-01-15 21:34:09.102153806 +1100
--- bash-2.05b/builtins/common.c 2021-01-15 21:32:56.938683418 +1100
+++ bash-2.05b/builtins/common.c 2021-01-15 21:34:09.102153806 +1100
@@ -46,6 +46,9 @@
#include "../flags.h"
#include "../jobs.h"
Expand Down
4 changes: 2 additions & 2 deletions steps/bash-2.05b/patches/locale.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-2.0-or-later

mes libc + setting locale = not worky.

--- locale.c 2021-01-15 09:38:55.729307629 +1100
+++ locale.c 2021-01-15 11:19:01.929391346 +1100
--- bash-2.05b/locale.c 2021-01-15 09:38:55.729307629 +1100
+++ bash-2.05b/locale.c 2021-01-15 11:19:01.929391346 +1100
@@ -190,7 +190,7 @@
set_lang (var, value)
char *var, *value;
Expand Down
4 changes: 2 additions & 2 deletions steps/bash-2.05b/patches/mes-libc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ mes libc does not have locale support...

diff --git lib/sh/snprintf.c lib/sh/snprintf.c
index 7669576..747aeba 100644
--- lib/sh/snprintf.c
+++ lib/sh/snprintf.c
--- bash-2.05b/lib/sh/snprintf.c
+++ bash-2.05b/lib/sh/snprintf.c
@@ -376,7 +376,7 @@ static void xfree __P((void *));
if ((p)->flags & PF_STAR_P) \
(p)->precision = GETARG (int)
Expand Down
4 changes: 2 additions & 2 deletions steps/bash-2.05b/patches/missing-defines.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ We don't actually want any of these things, which should really be hidden
behind the ifdefs given here to disable them when they are not being
used (as we do).

--- execute_cmd.c 2021-01-15 09:38:55.730307635 +1100
+++ execute_cmd.c 2021-01-15 09:43:41.046896754 +1100
--- bash-2.05b/execute_cmd.c 2021-01-15 09:38:55.730307635 +1100
+++ bash-2.05b/execute_cmd.c 2021-01-15 09:43:41.046896754 +1100
@@ -286,12 +286,18 @@
{
if (currently_executing_command->type == cm_simple)
Expand Down
4 changes: 2 additions & 2 deletions steps/bash-2.05b/patches/size.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-2.0-or-later

We don't yet have the size command.

--- Makefile.in 2023-03-11 15:41:13.297307977 +1100
+++ Makefile.in 2023-03-11 15:43:51.677298993 +1100
--- bash-2.05b/Makefile.in 2023-03-11 15:41:13.297307977 +1100
+++ bash-2.05b/Makefile.in 2023-03-11 15:43:51.677298993 +1100
@@ -471,7 +471,6 @@
$(RM) $@
$(PURIFY) $(CC) $(BUILTINS_LDFLAGS) $(LIBRARY_LDFLAGS) $(LDFLAGS) -o $(Program) $(OBJECTS) $(LIBS)
Expand Down
4 changes: 2 additions & 2 deletions steps/bash-2.05b/patches/tinycc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ to reflect this.

diff --git lib/sh/oslib.c lib/sh/oslib.c
index 90d7be9..37fdf2a 100644
--- lib/sh/oslib.c
+++ lib/sh/oslib.c
--- bash-2.05b/lib/sh/oslib.c
+++ bash-2.05b/lib/sh/oslib.c
@@ -192,8 +192,7 @@ bzero (s, n)
# include <sys/utsname.h>
int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Add missing AC_CONFIG_MACRO_DIR.

Required by autoreconf to create aclocal.m4 correctly.

--- /libiberty/configure.ac 2022-01-22 14:14:09.000000000 +0200
+++ libiberty/configure.ac 2022-09-04 00:01:02.941738129 +0300
--- binutils-2.30//libiberty/configure.ac 2022-01-22 14:14:09.000000000 +0200
+++ binutils-2.30/libiberty/configure.ac 2022-09-04 00:01:02.941738129 +0300
@@ -2,6 +2,7 @@

AC_INIT
Expand Down
4 changes: 2 additions & 2 deletions steps/binutils-2.30/patches/new-gettext.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-3.0-or-later

In new gettext external is required for AM_GNU_GETTEXT.

--- intl/configure.ac 2023-02-07 18:57:56.350832016 +1100
+++ intl/configure.ac 2023-02-07 18:58:07.310054484 +1100
--- binutils-2.30/intl/configure.ac 2023-02-07 18:57:56.350832016 +1100
+++ binutils-2.30/intl/configure.ac 2023-02-07 18:58:07.310054484 +1100
@@ -4,7 +4,7 @@
AC_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR(../config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-3.0-or-later

Ensure i386-init.h dependencies are satisfied.

--- opcodes/Makefile.am 2022-01-22 14:14:09.000000000 +0200
+++ opcodes/Makefile.am 2022-09-13 21:09:04.353324699 +0300
--- binutils-2.30/opcodes/Makefile.am 2022-01-22 14:14:09.000000000 +0200
+++ binutils-2.30/opcodes/Makefile.am 2022-09-13 21:09:04.353324699 +0300
@@ -575,7 +575,7 @@ i386-gen.o: i386-gen.c i386-opc.h $(srcd
$(srcdir)/i386-tbl.h: $(srcdir)/i386-init.h
@echo $@
Expand Down
4 changes: 2 additions & 2 deletions steps/binutils-2.41/patches/new-gettext.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-3.0-or-later

In new gettext external is required for AM_GNU_GETTEXT.

--- intl/configure.ac 2023-02-07 18:57:56.350832016 +1100
+++ intl/configure.ac 2023-02-07 18:58:07.310054484 +1100
--- binutils-2.41/intl/configure.ac 2023-02-07 18:57:56.350832016 +1100
+++ binutils-2.41/intl/configure.ac 2023-02-07 18:58:07.310054484 +1100
@@ -4,7 +4,7 @@
AC_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR(../config)
Expand Down
4 changes: 2 additions & 2 deletions steps/binutils-2.41/patches/no-maint-functions-texi.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-3.0-or-later

Ensure functions.texi dependencies are satisfied.

--- libiberty/Makefile.in 2023-12-08 15:18:57.985791235 +1100
+++ libiberty/Makefile.in 2023-12-08 15:19:15.391252344 +1100
--- binutils-2.41/libiberty/Makefile.in 2023-12-08 15:18:57.985791235 +1100
+++ binutils-2.41/libiberty/Makefile.in 2023-12-08 15:19:15.391252344 +1100
@@ -368,12 +368,12 @@
libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
$(MAKEINFO) --no-split --html -I$(srcdir) -o $@ $<
Expand Down
4 changes: 2 additions & 2 deletions steps/binutils-2.41/patches/no-maint-opcodes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ SPDX-License-Identifier: GPL-3.0-or-later

Ensure i386-tbl.h dependencies are satisfied.

--- opcodes/Makefile.am 2023-12-08 17:13:05.669136957 +1100
+++ opcodes/Makefile.am 2023-12-08 17:13:18.410480026 +1100
--- binutils-2.41/opcodes/Makefile.am 2023-12-08 17:13:05.669136957 +1100
+++ binutils-2.41/opcodes/Makefile.am 2023-12-08 17:13:18.410480026 +1100
@@ -540,7 +540,7 @@
# i386-gen will generate all headers in one go. Use a pattern rule to properly
# express this, with the inner dash ('-') arbitrarily chosen to be the stem.
Expand Down
4 changes: 2 additions & 2 deletions steps/bison-2.3/patches/autover-mismatch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
This macro does not exist in newer versions of autoconf and is unrequired.
There is no version 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
--- bison-2.3/m4/po_gl.m4 2021-04-11 18:39:53.353069610 +1000
+++ bison-2.3/m4/po_gl.m4 2021-04-11 18:40:20.422242498 +1000
@@ -24,7 +24,6 @@
[
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
Expand Down
4 changes: 2 additions & 2 deletions steps/bison-2.3/patches/fopen-safer.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ 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
--- bison-2.3/lib/Makefile.am 2021-04-11 19:01:01.265993928 +1000
+++ bison-2.3/lib/Makefile.am 2021-04-11 19:01:40.413232722 +1000
@@ -31,7 +31,8 @@
lib_SOURCES = \
get-errno.h get-errno.c \
Expand Down
4 changes: 2 additions & 2 deletions steps/bison-2.3/patches/gnulib-fix.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ 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
--- bison-2.3/lib/Makefile.am 2021-04-11 13:49:09.414805465 +1000
+++ bison-2.3/lib/Makefile.am 2021-04-11 13:49:26.418916036 +1000
@@ -19,6 +19,7 @@

BUILT_SOURCES =
Expand Down
4 changes: 2 additions & 2 deletions steps/bison-2.3/patches/our-bison.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ 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
--- bison-2.3/src/Makefile.am 2021-04-10 21:37:11.570390316 +1000
+++ bison-2.3/src/Makefile.am 2021-04-10 21:38:01.805804332 +1000
@@ -23,10 +23,6 @@

LDADD = ../lib/libbison.a $(LIBINTL)
Expand Down
4 changes: 2 additions & 2 deletions steps/bison-3.4.1/patches/fseterr.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Date: Thu Mar 26 18:02:01 2020 +0100

diff --git lib/fseterr.c lib/fseterr.c
index 8cd68e8..0ec7e2c 100644
--- lib/fseterr.c
+++ lib/fseterr.c
--- bison-3.4.1/lib/fseterr.c
+++ bison-3.4.1/lib/fseterr.c
@@ -53,7 +53,7 @@ fseterr (FILE *fp)
#elif defined EPLAN9 /* Plan9 */
if (fp->state != 0 /* CLOSED */)
Expand Down
12 changes: 6 additions & 6 deletions steps/bison-3.4.1/patches/missing-includes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Date: Thu Mar 26 18:02:01 2020 +0100

diff --git src/scan-code.l src/scan-code.l
index 73a3b2d..f348b20 100644
--- src/scan-code.l
+++ src/scan-code.l
--- bison-3.4.1/src/scan-code.l
+++ bison-3.4.1/src/scan-code.l
@@ -21,6 +21,7 @@
%option prefix="code_" outfile="lex.yy.c"

Expand All @@ -30,8 +30,8 @@ index 73a3b2d..f348b20 100644
#include <src/flex-scanner.h>
diff --git src/scan-gram.l src/scan-gram.l
index 66a8caa..efa391a 100644
--- src/scan-gram.l
+++ src/scan-gram.l
--- bison-3.4.1/src/scan-gram.l
+++ bison-3.4.1/src/scan-gram.l
@@ -21,6 +21,7 @@
%option prefix="gram_" outfile="lex.yy.c"

Expand All @@ -50,8 +50,8 @@ index 66a8caa..efa391a 100644
#include <src/flex-scanner.h>
diff --git src/scan-skel.l src/scan-skel.l
index 487e9f5..19f4832 100644
--- src/scan-skel.l
+++ src/scan-skel.l
--- bison-3.4.1/src/scan-skel.l
+++ bison-3.4.1/src/scan-skel.l
@@ -21,6 +21,7 @@
%option prefix="skel_" outfile="lex.yy.c"

Expand Down
4 changes: 2 additions & 2 deletions steps/bison-3.4.2/patches/gnulib-makefile.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ 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
--- 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 =
Expand Down
4 changes: 2 additions & 2 deletions steps/bison-3.4.2/patches/our-bison.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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...

--- Makefile.am 2021-04-15 21:29:36.596205032 +1000
+++ Makefile.am 2021-04-15 21:30:00.367365897 +1000
--- 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
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions steps/bison-3.4.2/patches/po-files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ 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
--- 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"
Expand Down
2 changes: 1 addition & 1 deletion steps/byacc-20240109/pass1.kaem
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cd ${pkg}

# Prepare and patch
cp ../../files/Makefile .
patch -Np0 -i ../../patches/meslibc.patch
patch -Np1 -i ../../patches/meslibc.patch

# Build yacc
make CC=tcc AR=tcc\ -ar CFLAGS=-DMAXPATHLEN=100\ -DEILSEQ=84\ -DMB_LEN_MAX=100 LDFLAGS=-lgetopt\ -static RANLIB=true
Expand Down
12 changes: 6 additions & 6 deletions steps/byacc-20240109/patches/meslibc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ License note: Berkeley Yacc is in the public domain, but it's linked with
meslibc, which is GPL-3.0-or-later, so we apply that license here too.

diff -ru ../byacc-20240109.bak/main.c ./main.c
--- ../byacc-20240109.bak/main.c 2024-04-14 16:06:09.646465507 +0200
+++ ./main.c 2024-04-14 20:41:56.227083399 +0200
--- byacc-20240109/main.c 2024-04-14 16:06:09.646465507 +0200
+++ byacc-20240109/main.c 2024-04-14 20:41:56.227083399 +0200
@@ -788,7 +788,7 @@
(void)umask(save_umask);
}
Expand All @@ -21,8 +21,8 @@ diff -ru ../byacc-20240109.bak/main.c ./main.c

if (result == 0)
diff -ru ../byacc-20240109.bak/output.c ./output.c
--- ../byacc-20240109.bak/output.c 2024-04-14 16:06:09.646465507 +0200
+++ ./output.c 2024-04-14 16:06:24.636465897 +0200
--- byacc-20240109/output.c 2024-04-14 16:06:09.646465507 +0200
+++ byacc-20240109/output.c 2024-04-14 16:06:24.636465897 +0200
@@ -1289,7 +1289,7 @@
{
if (union_file != 0)
Expand Down Expand Up @@ -51,8 +51,8 @@ diff -ru ../byacc-20240109.bak/output.c ./output.c
return;

diff -ru ../byacc-20240109.bak/reader.c ./reader.c
--- ../byacc-20240109.bak/reader.c 2024-04-14 16:06:09.646465507 +0200
+++ ./reader.c 2024-04-14 20:40:58.387082748 +0200
--- byacc-20240109/reader.c 2024-04-14 16:06:09.646465507 +0200
+++ byacc-20240109/reader.c 2024-04-14 20:40:58.387082748 +0200
@@ -70,7 +70,7 @@
char *line_data; /* saved input-line */
size_t line_used; /* position within saved input-line */
Expand Down
Loading

0 comments on commit a67db8f

Please sign in to comment.