Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/patch/
Date: Sun, 30 Oct 2022 15:51:48
Message-Id: 1667145017.4f3a2f4276d716c11d39f2851d781225b777f053.sam@gentoo
1 commit: 4f3a2f4276d716c11d39f2851d781225b777f053
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 30 13:25:58 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 30 15:50:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f3a2f42
7
8 sys-devel/patch: Install as gpatch for better BSD compat.
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 sys-devel/patch/patch-2.7.6-r5.ebuild | 59 +++++++++++++++++++++++++++++++++++
14 1 file changed, 59 insertions(+)
15
16 diff --git a/sys-devel/patch/patch-2.7.6-r5.ebuild b/sys-devel/patch/patch-2.7.6-r5.ebuild
17 new file mode 100644
18 index 000000000000..09f7c0284f92
19 --- /dev/null
20 +++ b/sys-devel/patch/patch-2.7.6-r5.ebuild
21 @@ -0,0 +1,59 @@
22 +# Copyright 1999-2022 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=8
26 +
27 +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/patch.asc
28 +inherit flag-o-matic verify-sig
29 +
30 +DESCRIPTION="Utility to apply diffs to files"
31 +HOMEPAGE="https://www.gnu.org/software/patch/patch.html"
32 +SRC_URI="mirror://gnu/patch/${P}.tar.xz"
33 +SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )"
34 +
35 +LICENSE="GPL-3+"
36 +SLOT="0"
37 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
38 +IUSE="static test xattr"
39 +RESTRICT="!test? ( test )"
40 +
41 +RDEPEND="xattr? ( sys-apps/attr )"
42 +DEPEND="${RDEPEND}"
43 +BDEPEND="test? ( sys-apps/ed )
44 + verify-sig? ( sec-keys/openpgp-keys-patch )"
45 +
46 +PATCHES=(
47 + "${FILESDIR}"/${P}-fix-test-suite.patch
48 + "${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch
49 + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6951.patch
50 + "${FILESDIR}"/${PN}-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch
51 + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156.patch
52 + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6952.patch
53 + "${FILESDIR}"/${PN}-2.7.6-Do-not-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINITY.patch
54 + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix1.patch
55 + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix2.patch
56 + "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13636.patch
57 + "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13638.patch
58 + "${FILESDIR}"/${PN}-2.7.6-Avoid-invalid-memory-access-in-context-format-diffs.patch
59 +)
60 +
61 +src_configure() {
62 + use static && append-ldflags -static
63 +
64 + local myeconfargs=(
65 + $(use_enable xattr)
66 + # rename to gpatch for better BSD compatibility
67 + --program-prefix=g
68 + )
69 + # Do not let $ED mess up the search for `ed` 470210.
70 + ac_cv_path_ED=$(type -P ed) \
71 + econf "${myeconfargs[@]}"
72 +}
73 +
74 +src_install() {
75 + default
76 +
77 + # symlink to the standard name
78 + dosym gpatch /usr/bin/patch
79 + dosym gpatch.1 /usr/share/man/man1/patch.1
80 +}