sys-devel/patch: Sync with gentoo

It's from gentoo commit ef511d7814808591e6a273ea1598dcc1b3a798cc.
This commit is contained in:
Krzesimir Nowak 2022-03-03 16:00:52 +01:00
parent cbf3dfbafd
commit bb99042961
4 changed files with 23 additions and 47 deletions

View File

@ -1,5 +1,6 @@
http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f6bc5b14bd193859851d15a049bafb1007acd288
http://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c228c70b49db72e5
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=f6bc5b14bd193859851d15a049bafb1007acd288
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c228c70b49db72e5
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=7623b2dc0d1837ecfd58f32efc78e35834deeb38
--- a/tests/crlf-handling
+++ b/tests/crlf-handling
@ -117,4 +118,16 @@ http://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c2
while test $# -gt 0 ; do
echo "$1"
shift
--
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -113,7 +113,7 @@ cleanup() {
exit $status
}
-if eval 'test -n "${BASH_LINENO[0]}" 2>/dev/null'; then
+if ( eval 'test -n "${BASH_LINENO[0]}"' 2>/dev/null ); then
eval '
_start_test() {
printf "[${BASH_LINENO[2]}] %s -- " "$*"

View File

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:patch</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,40 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
inherit flag-o-matic
DESCRIPTION="Utility to apply diffs to files"
HOMEPAGE="https://www.gnu.org/software/patch/patch.html"
SRC_URI="mirror://gnu/patch/${P}.tar.xz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="static test xattr"
RDEPEND="xattr? ( sys-apps/attr )"
DEPEND="${RDEPEND}
test? ( sys-apps/ed )"
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
)
src_configure() {
use static && append-ldflags -static
local myeconfargs=(
$(use_enable xattr)
--program-prefix="$(use userland_BSD && echo g)"
)
# Do not let $ED mess up the search for `ed` 470210.
ac_cv_path_ED=$(type -P ed) \
econf "${myeconfargs[@]}"
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@ -11,8 +11,9 @@ SRC_URI="mirror://gnu/patch/${P}.tar.xz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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"
IUSE="static test xattr"
RESTRICT="!test? ( test )"
RDEPEND="xattr? ( sys-apps/attr )"
DEPEND="${RDEPEND}
@ -38,7 +39,6 @@ src_configure() {
local myeconfargs=(
$(use_enable xattr)
--program-prefix="$(use userland_BSD && echo g)"
)
# Do not let $ED mess up the search for `ed` 470210.
ac_cv_path_ED=$(type -P ed) \