summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2024-11-19 23:29:42 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-11-19 23:29:42 +0100
commit2f52e76ae543f555f598e2e786b434c0610584ca (patch)
treeac30b9989af6016ee3ee4bd4adce3a1e5aaf40ec /sys-devel
parentRevert "media-libs/tiff: drop 4.5.0-r2, 4.5.1" (diff)
downloadgentoo-2f52e76ae543f555f598e2e786b434c0610584ca.tar.gz
gentoo-2f52e76ae543f555f598e2e786b434c0610584ca.tar.bz2
gentoo-2f52e76ae543f555f598e2e786b434c0610584ca.zip
sys-devel/patch: revbump, fix implicit mkdir in configure
This is a bit of a hack since I'm only patching configure but not its gnulib source. However, the bug is fixed upstream... See-also: https://github.com/coreutils/gnulib/commit/3c136a2cc38d71083f123231a8b9ad4b01930789 Closes: https://bugs.gentoo.org/898598 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/patch/files/patch-2.7.6-configure-mkdir.patch14
-rw-r--r--sys-devel/patch/patch-2.7.6-r6.ebuild85
2 files changed, 99 insertions, 0 deletions
diff --git a/sys-devel/patch/files/patch-2.7.6-configure-mkdir.patch b/sys-devel/patch/files/patch-2.7.6-configure-mkdir.patch
new file mode 100644
index 000000000000..b29d7b087538
--- /dev/null
+++ b/sys-devel/patch/files/patch-2.7.6-configure-mkdir.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/898598
+https://github.com/coreutils/gnulib/commit/3c136a2cc38d71083f123231a8b9ad4b01930789
+
+diff '--color=auto' -ruN patch-2.7.6.orig/configure patch-2.7.6/configure
+--- patch-2.7.6.orig/configure 2018-02-03 14:41:50.000000000 +0100
++++ patch-2.7.6/configure 2024-11-19 23:19:08.710565121 +0100
+@@ -17130,6 +17130,7 @@
+ /* end confdefs.h. */
+ #include <unistd.h>
+ #include <fcntl.h>
++ #include <sys/stat.h>
+
+ int
+ main ()
diff --git a/sys-devel/patch/patch-2.7.6-r6.ebuild b/sys-devel/patch/patch-2.7.6-r6.ebuild
new file mode 100644
index 000000000000..25168b8c544b
--- /dev/null
+++ b/sys-devel/patch/patch-2.7.6-r6.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/patch.asc
+inherit flag-o-matic verify-sig
+
+DESCRIPTION="Utility to apply diffs to files"
+HOMEPAGE="https://www.gnu.org/software/patch/patch.html"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://git.savannah.gnu.org/git/patch.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://gnu/patch/${P}.tar.xz"
+ SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )"
+
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="static test xattr"
+RESTRICT="!test? ( test )"
+
+RDEPEND="xattr? ( sys-apps/attr )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ test? ( sys-apps/ed )
+ verify-sig? ( sec-keys/openpgp-keys-patch )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-test-suite.patch
+ "${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6951.patch
+ "${FILESDIR}"/${PN}-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6952.patch
+ "${FILESDIR}"/${PN}-2.7.6-Do-not-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINITY.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix1.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix2.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13636.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13638.patch
+ "${FILESDIR}"/${PN}-2.7.6-Avoid-invalid-memory-access-in-context-format-diffs.patch
+ "${FILESDIR}"/${PN}-2.7.6-configure-mkdir.patch
+)
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+
+ cd "${S}" || die
+ ./bootstrap || die
+ elif use verify-sig ; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
+ fi
+
+ default
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ local myeconfargs=(
+ $(use_enable xattr)
+ # rename to gpatch for better BSD compatibility
+ --program-prefix=g
+ )
+ # Do not let $ED mess up the search for `ed` 470210.
+ ac_cv_path_ED=$(type -P ed) \
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ emake check gl_public_submodule_commit=
+}
+
+src_install() {
+ default
+
+ # symlink to the standard name
+ dosym gpatch /usr/bin/patch
+ dosym gpatch.1 /usr/share/man/man1/patch.1
+}