Diff patch-2.7.6-r4 with a patch-2.7.6-r5

/usr/portage/sys-devel/patch/patch-2.7.6-r5.ebuild 2024-12-25 14:59:52.795270183 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2024 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI="7"
4
EAPI=8
5 5

  
6 6
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/patch.asc
7 7
inherit flag-o-matic verify-sig
8 8

  
9 9
DESCRIPTION="Utility to apply diffs to files"
10 10
HOMEPAGE="https://www.gnu.org/software/patch/patch.html"
11
SRC_URI="mirror://gnu/patch/${P}.tar.xz"
12
SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )"
11
if [[ ${PV} == 9999 ]] ; then
12
	EGIT_REPO_URI="https://git.savannah.gnu.org/git/patch.git"
13
	inherit git-r3
14
else
15
	SRC_URI="mirror://gnu/patch/${P}.tar.xz"
16
	SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )"
17

  
18
	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"
19
fi
13 20

  
14 21
LICENSE="GPL-3+"
15 22
SLOT="0"
16
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"
17 23
IUSE="static test xattr"
18 24
RESTRICT="!test? ( test )"
19 25

  
20 26
RDEPEND="xattr? ( sys-apps/attr )"
21 27
DEPEND="${RDEPEND}"
22
BDEPEND="test? ( sys-apps/ed )
23
	verify-sig? ( sec-keys/openpgp-keys-patch )"
28
BDEPEND="
29
	test? ( sys-apps/ed )
30
	verify-sig? ( sec-keys/openpgp-keys-patch )
31
"
24 32

  
25 33
PATCHES=(
26 34
	"${FILESDIR}"/${P}-fix-test-suite.patch
......
37 45
	"${FILESDIR}"/${PN}-2.7.6-Avoid-invalid-memory-access-in-context-format-diffs.patch
38 46
)
39 47

  
48
src_unpack() {
49
	if [[ ${PV} == 9999 ]] ; then
50
		git-r3_src_unpack
51

  
52
		cd "${S}" || die
53
		./bootstrap || die
54
	elif use verify-sig ; then
55
		verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
56
	fi
57

  
58
	default
59
}
60

  
40 61
src_configure() {
41 62
	use static && append-ldflags -static
42 63

  
43 64
	local myeconfargs=(
44 65
		$(use_enable xattr)
66
		# rename to gpatch for better BSD compatibility
67
		--program-prefix=g
45 68
	)
46 69
	# Do not let $ED mess up the search for `ed` 470210.
47 70
	ac_cv_path_ED=$(type -P ed) \
48 71
		econf "${myeconfargs[@]}"
49 72
}
73

  
74
src_test() {
75
	emake check gl_public_submodule_commit=
76
}
77

  
78
src_install() {
79
	default
80

  
81
	# symlink to the standard name
82
	dosym gpatch /usr/bin/patch
83
	dosym gpatch.1 /usr/share/man/man1/patch.1
84
}
Thank you!