sys-devel/patch: add 2.8.1

Bug: https://bugs.gentoo.org/985008
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
This commit is contained in:
Patrick McLean
2026-11-02 14:05:24 -08:00
parent d5ba77a5b1
commit 5c00a69109
2 changed files with 85 additions and 0 deletions
+2
View File
@@ -1,2 +1,4 @@
DIST patch-2.8.1.tar.xz 940364 BLAKE2B bee49679ca7b823b5d0c8c380402c8a395c64a55f30669344dc645c2566c7bc5ae98aa363e59efe580ed2f1e783bed3b54e34bbd716d70f3f41aae8c8f7c082b SHA512 344cad0f3a19a651c8f0188c89402018c65406b106adecdfec52df4359046ca5d86a70ce8d7943f8c41deed79918291b0a86bfa57dcec2c0aa2b4bbca6edc698
DIST patch-2.8.1.tar.xz.sig 833 BLAKE2B 14df3514c481ecd7c14616e2345bf80898a39ca3ea29af71e3489b51c9948a8f79ee006543307fe900a9c468dba28ede729a3f741355a7ef8efde8b3104583fb SHA512 efdb1cf725d345f89fd6685c0b418f23101f74fc040b86faee1635527eb3e29c17a4935e96b8075c7804fd32a71896b7ba30a1bfab135b19eec78c4c7b0a75c6
DIST patch-2.8.tar.xz 907208 BLAKE2B 687f566201adb2e32c3832b911adaddd9994aacb25b66886d6315bfe2752e09fd551b3856a39024b8472b2d95efebf412d4a7c085812a13620de811073a397ad SHA512 d689d696660a662753e8660792733c3be0a94c76abfe7a28b0f9f70300c3a42d6437d081553a59bfde6e1b0d5ee13ed89be48d0b00b6da2cadbfc14a15ada603
DIST patch-2.8.tar.xz.sig 833 BLAKE2B 6890bd25e2b4b5633b58073949f28f7c71c57667af9e4d92acc8f1736740c6433adf7078bf9ed3199158bd9734d080dba5b7eb46577d5714aa487d79fd938603 SHA512 8050bc11cd52ee930025e40550afe6c1a866a4a74fdc99332087c2d0fe8358b83d031322bf64480333fe682a7f52127fba7aceffa0cf6747e1ee3f239539f5f7
+83
View File
@@ -0,0 +1,83 @@
# Copyright 1999-2026 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
elif [[ ${PV} = *_p* ]] ; then
# Note: could put this in devspace, but if it's gone, we don't want
# it in tree anyway. It's just for testing.
MY_SNAPSHOT="$(ver_cut 1-3).211-86ac"
SRC_URI="https://alpha.gnu.org/gnu/patch/patch-${MY_SNAPSHOT}.tar.xz -> ${P}.tar.xz"
SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/patch/patch-${MY_SNAPSHOT}.tar.xz.sig -> ${P}.tar.xz.sig )"
S="${WORKDIR}"/${PN}-${MY_SNAPSHOT}
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 ~arm64-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-20250206 )
"
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
)
# https://savannah.gnu.org/support/?111394
# This can be removed when we patch dev-build/autoconf, though
# packages w/o eautoreconf will still need it.
[[ ${enable_year2038} == "no" ]] && myeconfargs+=( --disable-year2038 )
# Do not let $ED or $PATH (split-usr) mess up the search for `ed`:
# bug 470210 / bug 957593
ac_cv_path_ED="${EPREFIX}/bin/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
}