live-bootstrap/steps/python-2.0.1/patches/undefs.patch
fosslinux a67db8fcbd Make patches relative to where tarballs are extracted
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
2024-12-23 15:20:42 +11:00

18 lines
604 B
Diff

SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: Python-2.0.1
Python 2.0.1's Makefile does not support custom CFLAGS for some
reason, so we have to patch our __DATE__ __TIME__ undefs in.
--- Python-2.0.1/Makefile.in 2022-12-23 18:33:56.486325025 +1100
+++ Python-2.0.1/Makefile.in 2022-12-23 18:46:05.910387214 +1100
@@ -127,7 +127,7 @@
DIST= $(DISTFILES) $(DISTDIRS)
# Compilation flags for getbuildinfo.c only
-CFLAGS= $(OPT) -I. $(DEFS)
+CFLAGS= $(OPT) -I. $(DEFS) -U__DATE__ -U__TIME__
LIBRARY= libpython$(VERSION).a
LDLIBRARY= @LDLIBRARY@