From 94393d04ccce851b0084c650c99a2eca52f9d3bb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 5 Dec 2022 03:04:53 +0000 Subject: gentoo auto-resync : 05:12:2022 - 03:04:53 --- sys-apps/grep/Manifest | 3 +- sys-apps/grep/grep-3.8-r1.ebuild | 100 +++++++++++++++++++++++++++++++++++++++ sys-apps/grep/metadata.xml | 12 +++++ 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 sys-apps/grep/grep-3.8-r1.ebuild (limited to 'sys-apps/grep') diff --git a/sys-apps/grep/Manifest b/sys-apps/grep/Manifest index 8b0b46c0b29a..8283ea443ece 100644 --- a/sys-apps/grep/Manifest +++ b/sys-apps/grep/Manifest @@ -5,5 +5,6 @@ DIST grep-3.7.tar.xz.sig 833 BLAKE2B 02a2850e22e8054dcfd02b6f08747a97d43dae9adb9 DIST grep-3.8.tar.xz 1709536 BLAKE2B 24cf6f7aa35c85f59f508969ee9731c5be1e5c613e64e636f464bbdde917bb99ba739e4b82abf08da127ad0400d62e27d139f85142035745121d381982ec6c36 SHA512 2014519a80c6dcd799837e1bd7d9d5ebe8729ec54b0dc76981dac4755a9a8a9f200470cdcc911e2825bed8162e61da39e3dd60289f7393b48bf67314077d0c79 DIST grep-3.8.tar.xz.sig 833 BLAKE2B 40f472389705375611015ba0eb85eb32643304b1a324877a75821d086a128a20d00df3d7cd960ec45709f40f21488bbcf993c6fe667ef23663688b33296e650b SHA512 8266b58485f225c2189814e3898c72e59d251b729e0c302d31f57abdb7ac2e6e28dde2c5c8095673b6f007b2a3ebc26db1dca910a7771aba80dad4b3c6761ee4 EBUILD grep-3.7.ebuild 2274 BLAKE2B b847a17bfe835e573a6406c728e99c1af5687bc2e83bdb4c1b6103790f587210c5bd3f4121c7fb83d8c96805a6a7fc636f06050df1f8f591d95e931f2cfecbc9 SHA512 dace79b242b68187cf8d756b4c91a7873eb8c1b1a3f631b67bb07192a95c4c4af521db19e6a943ae03f1d885317c0d6f497e129c7644e36d5dc97963415396ee +EBUILD grep-3.8-r1.ebuild 2870 BLAKE2B ef19db94761e3e8fcfd6bdd03429bdd16501cf4724597f0aabff96f4f1d1712a3307ee6b87e9888e0f73de1f2d1ba31769211412aeb42687f24bd3fd8474861d SHA512 3e63dc69b45d4903241cc54ea5efbad05db1d6f7874671c803007e728932aa18472bb777be830ddba4ee5e47ef60f0f01972f2339fb89136f90960d118b39158 EBUILD grep-3.8.ebuild 2168 BLAKE2B 0b2a09225597916015eab1a036aec94af8fbbd80e61010262cb1eff62fa10ada13e22fba7f7e1192d904b80817e34ecb61b30dede0aab4d615b2bf7d8b94fc59 SHA512 c1c3228795c6cc2d3f07f75c49d5e5834b08d8340420450ef380c99ef9275cc7ee8de4ada5fee83f11cca6abe364f5a6083531d9db6fe8da9c5977cf40e4566f -MISC metadata.xml 335 BLAKE2B 9348d579c8858b0764c9e6edc144183686945cac2a68eead6e5ad83d364d293292ec6ef97bf87ea5c146048757d080e157bf9edf101177a8854d77305d8a9dae SHA512 3ea8b4569cfadab59ecabcf13c25941f9ad0db6c15b0625760339224aa4c82dc99b102c59c858de20d3ab9399db38f47e23d1b360ff86cfba6ede73b548ea7ff +MISC metadata.xml 666 BLAKE2B 0c90e38d5363234474093ece5c9e0cbb99c01731a80c52869d700b7367fd74eec23f355653174b315f91ca7b41b4c5c9f5645ffaba043b3918c3c22c2c817ea4 SHA512 8e46c5c28b55063a7c74dfc637eb59785dc35651027e144acf4aea7f0ad7a4e43a3692946252acdf0d4a66ff8bdcfa89664fdf8bae71f1db688c06014c2a6a0f diff --git a/sys-apps/grep/grep-3.8-r1.ebuild b/sys-apps/grep/grep-3.8-r1.ebuild new file mode 100644 index 000000000000..383ac1eb28d7 --- /dev/null +++ b/sys-apps/grep/grep-3.8-r1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/grep.asc +inherit flag-o-matic verify-sig + +DESCRIPTION="GNU regular expression matcher" +HOMEPAGE="https://www.gnu.org/software/grep/" + +if [[ ${PV} == *_p* ]] ; then + # Subscribe to the 'platform-testers' ML to find these. + # Useful to test on our especially more niche arches and report issues upstream. + MY_COMMIT="98-c9ac" + MY_P=${PN}-$(ver_cut 1-2).${MY_COMMIT} + SRC_URI="https://meyering.net/${PN}/${MY_P}.tar.xz" + SRC_URI+=" verify-sig? ( https://meyering.net/${PN}/${MY_P}.tar.xz.sig )" + S="${WORKDIR}"/${MY_P} +else + SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )" + 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" +fi + +LICENSE="GPL-3+" +SLOT="0" +IUSE="+egrep-fgrep nls pcre static" + +# We lack dev-libs/libsigsegv[static-libs] for now +REQUIRED_USE="static? ( !sparc )" + +LIB_DEPEND="pcre? ( >=dev-libs/libpcre2-7.8-r1[static-libs(+)] ) + sparc? ( dev-libs/libsigsegv )" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + nls? ( virtual/libintl ) + virtual/libiconv" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} )" +BDEPEND="virtual/pkgconfig + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-grep )" + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +src_prepare() { + default + + # bug #523898 + sed -i \ + -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \ + -e "s:@grep@:${EPREFIX}/bin/grep:" \ + src/egrep.sh || die +} + +src_configure() { + use static && append-ldflags -static + + # We used to turn this off unconditionally (bug #673524) but we now + # allow it for cases where libsigsegv is better for userspace handling + # of stack overflows. + # In particular, it's necessary for sparc: bug #768135 + export ac_cv_libsigsegv=$(usex sparc) + + local myeconfargs=( + --bindir="${EPREFIX}"/bin + $(use_enable nls) + $(use_enable pcre perl-regexp) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use egrep-fgrep ; then + # Delete the upstream wrapper variants which warn on egrep+fgrep use + rm "${ED}"/bin/{egrep,fgrep} || die + + into / + # Install egrep, fgrep which don't warn. + # + # We do this by default to avoid breakage in old scripts + # and such which don't expect unexpected output on stderr, + # we've had examples of builds failing because foo-config + # starts returning a warning. + # + # https://lists.gnu.org/archive/html/bug-grep/2022-10/msg00000.html + newbin - egrep <<-EOF + #!/usr/bin/env sh + exec "${EPREFIX}/bin/grep" -E "\$@" + EOF + + newbin - fgrep <<-EOF + #!/usr/bin/env sh + exec "${EPREFIX}/bin/grep" -F "\$@" + EOF + fi +} diff --git a/sys-apps/grep/metadata.xml b/sys-apps/grep/metadata.xml index 3c76c298887a..89eff5cf9f7e 100644 --- a/sys-apps/grep/metadata.xml +++ b/sys-apps/grep/metadata.xml @@ -5,6 +5,18 @@ base-system@gentoo.org Gentoo Base System + + + Install deprecated 'egrep' and 'fgrep' wrappers + for 'grep -E' and 'grep -F' respectively. + + GNU grep 3.8 onwards warns about their usage by + default, but the versions installed by this flag do not. + + No deprecation warnings are emitted when this + flag is enabled. + + cpe:/a:gnu:grep -- cgit v1.2.3