diff options
Diffstat (limited to 'sys-apps/grep')
-rw-r--r-- | sys-apps/grep/Manifest | 6 | ||||
-rw-r--r-- | sys-apps/grep/files/loong-fix-build.patch | 30 | ||||
-rw-r--r-- | sys-apps/grep/grep-3.7.ebuild | 13 | ||||
-rw-r--r-- | sys-apps/grep/grep-3.7_p20220425.ebuild | 72 |
4 files changed, 118 insertions, 3 deletions
diff --git a/sys-apps/grep/Manifest b/sys-apps/grep/Manifest index 01749c17dd08..d46ffa3cd2ce 100644 --- a/sys-apps/grep/Manifest +++ b/sys-apps/grep/Manifest @@ -1,5 +1,9 @@ +AUX loong-fix-build.patch 859 BLAKE2B 1c37ecbf8f7c0148e1634691b36c5e526e1111c851bb34059cbc03b902e45f066b976899e8c155db0d8358f9f45ef39d8bd6a87616c885d9ceafaaa24905d39c SHA512 f97ea8dcd28957c58d4b08f91b3274ebcba9bef9fb93ea91576925d8cbb516781524c172f35dcfb2be4be17cb446ec6b8366d04d485eb5ec012b126be02b9c82 AUX ppc-musl.patch 824 BLAKE2B b3476471c27a748a67f237d7f34ede06446417a310737d46686ff8103cb3f5c1c4a1cdd5e9c4adccf4511f667db473086b0ea7fa5242f36e3109f929d70728e7 SHA512 079e50b0f7d99bd7c45a33acd56a2fb000e50f7b4bc73fa18d246315b732550ceb75251ba12daf5fd2948be9252cd40804df3c2c797b47bf8b0cf173a1db4c7e +DIST grep-3.7.62-9a668.tar.xz 1687820 BLAKE2B 95f5deccb3b3b223cb429f5c515674bed5209e6ca1d295b5ddfcf09614c6c10f6c6f56df9931a3dc0926b48abced15ab1099d8e84840c74846cb89270e248473 SHA512 b24a11138e683d75e75b4f04a42f4d202526a691aa70c303af4d257e2a395a4266b4bc05afff4fff7ab0efc5564af3efe0f9108cbeddf406d4dc3f171a642f25 +DIST grep-3.7.62-9a668.tar.xz.sig 833 BLAKE2B 9be6a33b1d2e29eeaea6bfbcbeade37eb4d7c8b2fdf37ec82376b1cc158f02c6916c87c21378cd099f863787ae46e2bc7dd40df77b263fe971f50b7bbe67cced SHA512 5245b7af4202bd49ef8937eda3ad91949e6bd9e16e217c0a326e8d6abc17d8f47e068197cb5df16829298912eed0d811164da4d1d7bd3ce3ff679a87a281f33b DIST grep-3.7.tar.xz 1641196 BLAKE2B acf03b1fe8065dac48d686de070bab9ecddae65c97f3b0e2be484e8abdd06d1fbdbb396f3d73dadadf9618aad2f02cf6416094bad64d5f2f15eab6b6b3adfeda SHA512 e9e45dcd40af8367f819f2b93c5e1b4e98a251a9aa251841fa67a875380fae52cfa27c68c6dbdd6a4dde1b1017ee0f6b9833ef6dd6e419d32d71b6df5e972b82 DIST grep-3.7.tar.xz.sig 833 BLAKE2B 02a2850e22e8054dcfd02b6f08747a97d43dae9adb908516bdaed35750aa7f773832ad1b0b4c53d7b0ebc8f1fe2979e7938bbbeeb09ea00c11b4a0d5846c7b9c SHA512 9db28883b696fbbb0fad32f4ecd168954dc475d5f0a8f2b4f960ff615ef7dd8348a7caaee85a96287824472a29485ff921af121c582083ca5ad5c30960f99cf4 -EBUILD grep-3.7.ebuild 1983 BLAKE2B a72a43b9908600ea32d2645ceb8ef0d51e42ca43393fc7b6c9f223332729cd35795c69455979f6ae45219bd59eef9d141ad3de315ccb21fd92352e1cc88edd0b SHA512 5300eadef8a792b4e0b255590f8336c6989c51843d56f4e7a064a68d313371eeef8ecc6ff8fe6c5316ab4c50cb8e2020b0eb8e3984ff8d1b632a25bfc9e0f1c3 +EBUILD grep-3.7.ebuild 2274 BLAKE2B b847a17bfe835e573a6406c728e99c1af5687bc2e83bdb4c1b6103790f587210c5bd3f4121c7fb83d8c96805a6a7fc636f06050df1f8f591d95e931f2cfecbc9 SHA512 dace79b242b68187cf8d756b4c91a7873eb8c1b1a3f631b67bb07192a95c4c4af521db19e6a943ae03f1d885317c0d6f497e129c7644e36d5dc97963415396ee +EBUILD grep-3.7_p20220425.ebuild 2169 BLAKE2B 61fd2620aceeb5517493347bb2817dfa0c3ef4230b732c713f7d8e4693e0cedc92c7a78583512104022185de43f011771130900f10170790de845b0e3aa6bfb8 SHA512 822880de93aa6f7cb4eadbf24429fc79b32db36a68a87cc45dd985d63684aa0c39f3fce0927c21c6ec69535938238b9a11bd0b4a72c3124708c165d94a73235a MISC metadata.xml 335 BLAKE2B 9348d579c8858b0764c9e6edc144183686945cac2a68eead6e5ad83d364d293292ec6ef97bf87ea5c146048757d080e157bf9edf101177a8854d77305d8a9dae SHA512 3ea8b4569cfadab59ecabcf13c25941f9ad0db6c15b0625760339224aa4c82dc99b102c59c858de20d3ab9399db38f47e23d1b360ff86cfba6ede73b548ea7ff diff --git a/sys-apps/grep/files/loong-fix-build.patch b/sys-apps/grep/files/loong-fix-build.patch new file mode 100644 index 000000000000..e3b346dd92d3 --- /dev/null +++ b/sys-apps/grep/files/loong-fix-build.patch @@ -0,0 +1,30 @@ +[xen0n: this is https://github.com/sunhaiyong1978/CLFS-for-LoongArch/blob/1.0/patches/stack-direction-add-loongarch.patch with change to generated file added as well.] +From: Sun Haiyong <youbest@sina.com> +Date: Tue, 31 Aug 2021 11:11:52 +0800 +Subject: [PATCH] stack-direction: Add support for loongarch CPU + +* m4/stack-direction.m4 (SV_STACK_DIRECTION): When the CPU is loongarch, +set "sv_cv_stack_direction" to "-1" . +--- a/m4/stack-direction.m4 ++++ b/m4/stack-direction.m4 +@@ -32,6 +32,7 @@ AC_DEFUN([SV_STACK_DIRECTION], + i?86 | x86_64 | \ + i860 | \ + ia64 | \ ++ loongarch* | \ + m32r | \ + m68* | \ + m88k | \ +--- a/configure ++++ b/configure +@@ -35668,6 +35668,7 @@ else $as_nop + i?86 | x86_64 | \ + i860 | \ + ia64 | \ ++ loongarch* | \ + m32r | \ + m68* | \ + m88k | \ +-- +2.17.2 + diff --git a/sys-apps/grep/grep-3.7.ebuild b/sys-apps/grep/grep-3.7.ebuild index 4f07cae885f9..799ae9355ad6 100644 --- a/sys-apps/grep/grep-3.7.ebuild +++ b/sys-apps/grep/grep-3.7.ebuild @@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )" LICENSE="GPL-3+" SLOT="0" -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" +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" IUSE="nls pcre static" # We lack dev-libs/libsigsegv[static-libs] for now @@ -31,7 +31,10 @@ BDEPEND=" nls? ( sys-devel/gettext ) verify-sig? ( sec-keys/openpgp-keys-grep )" -PATCHES=( "${FILESDIR}/ppc-musl.patch" ) +PATCHES=( + "${FILESDIR}/ppc-musl.patch" + "${FILESDIR}/loong-fix-build.patch" +) DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) @@ -42,6 +45,12 @@ src_prepare() { src/egrep.sh || die #523898 default + + # touch generated files after patching m4, to avoid activating maintainer + # mode + # remove when loong-fix-build.patch is no longer necessary + touch ./aclocal.m4 ./config.hin ./configure || die + find . -name Makefile.in -exec touch {} + || die } src_configure() { diff --git a/sys-apps/grep/grep-3.7_p20220425.ebuild b/sys-apps/grep/grep-3.7_p20220425.ebuild new file mode 100644 index 000000000000..342f35aa3dbb --- /dev/null +++ b/sys-apps/grep/grep-3.7_p20220425.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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="62-9a668" + 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="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[@]}" +} |