From 163c2161d451baa24ca16ad6e3cec279554f0579 Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Fri, 19 Aug 2022 11:42:49 -0700 Subject: [PATCH] chroot-grep: update to 3.7. --- ...001-build-be-more-careful-about-Perl.patch | 34 ++++++ ...tests-port-to-platforms-lacking-Perl.patch | 100 ++++++++++++++++++ srcpkgs/chroot-grep/template | 7 +- 3 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/chroot-grep/patches/0001-build-be-more-careful-about-Perl.patch create mode 100644 srcpkgs/chroot-grep/patches/0001-tests-port-to-platforms-lacking-Perl.patch diff --git a/srcpkgs/chroot-grep/patches/0001-build-be-more-careful-about-Perl.patch b/srcpkgs/chroot-grep/patches/0001-build-be-more-careful-about-Perl.patch new file mode 100644 index 000000000000..5a646e05c5a4 --- /dev/null +++ b/srcpkgs/chroot-grep/patches/0001-build-be-more-careful-about-Perl.patch @@ -0,0 +1,34 @@ +From d6276889a04a5502c1f9d80ffc9f0ae5f7b628e0 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sat, 21 May 2022 16:55:53 -0700 +Subject: [PATCH] build: be more careful about Perl + +Problem reported by Serge Belyshev for Coreutils (Bug#52844). +I observed the same problem with current Grep on Fedora 35 +without Perl installed. +* configure.ac (HAVE_PERL): Rely on latest Gnulib gl_PERL, which +sets gl_cv_prog_perl. +--- + configure.ac | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c85651c..5941b88 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -68,11 +68,7 @@ gl_INIT + AC_DEFINE([GNULIB_NO_VLA], [1], [Define to 1 to disable use of VLAs]) + + # The test suite needs to know if we have a working perl. +-# FIXME: this is suboptimal. Ideally, we would be able to call gl_PERL +-# with an ACTION-IF-NOT-FOUND argument ... +-cu_have_perl=yes +-case $PERL in *"/missing "*) cu_have_perl=no;; esac +-AM_CONDITIONAL([HAVE_PERL], [test $cu_have_perl = yes]) ++AM_CONDITIONAL([HAVE_PERL], [test "$gl_cv_prog_perl" != no]) + + # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) + # ------------------------------------------------ +-- +2.37.2 + diff --git a/srcpkgs/chroot-grep/patches/0001-tests-port-to-platforms-lacking-Perl.patch b/srcpkgs/chroot-grep/patches/0001-tests-port-to-platforms-lacking-Perl.patch new file mode 100644 index 000000000000..3c5f044547a4 --- /dev/null +++ b/srcpkgs/chroot-grep/patches/0001-tests-port-to-platforms-lacking-Perl.patch @@ -0,0 +1,100 @@ +From 80bcb074aeed9b508a02940c8036c4ea5a1b9c63 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sat, 21 May 2022 18:38:26 -0700 +Subject: [PATCH] tests: port to platforms lacking Perl + +* tests/init.cfg (require_perl_): New function. +* tests/big-hole, tests/hash-collision-perf, tests/long-pattern-perf: +* tests/many-regex-performance, tests/mb-non-UTF8-performance: +Use it. +--- + tests/big-hole | 1 + + tests/hash-collision-perf | 2 ++ + tests/init.cfg | 7 +++++++ + tests/long-pattern-perf | 1 + + tests/many-regex-performance | 1 + + tests/mb-non-UTF8-performance | 1 + + 6 files changed, 13 insertions(+) + +diff --git a/tests/big-hole b/tests/big-hole +index eac077f..2899a3b 100755 +--- a/tests/big-hole ++++ b/tests/big-hole +@@ -4,6 +4,7 @@ + . "${srcdir=.}/init.sh"; path_prepend_ ../src + + expensive_ ++require_perl_ + + # Skip this test if there is no usable SEEK_HOLE support, + # as is the case with linux-3.5.0 on ext4 and tmpfs file systems. +diff --git a/tests/hash-collision-perf b/tests/hash-collision-perf +index d701140..7b8d373 100755 +--- a/tests/hash-collision-perf ++++ b/tests/hash-collision-perf +@@ -21,6 +21,8 @@ + + fail=0 + ++require_perl_ ++ + : > empty || framework_failure_ + + # Construct a test case that consumes enough CPU time that we don't +diff --git a/tests/init.cfg b/tests/init.cfg +index 72cab20..515482c 100644 +--- a/tests/init.cfg ++++ b/tests/init.cfg +@@ -138,6 +138,13 @@ require_JP_EUC_locale_() + skip_ "$locale locale not found" + } + ++# Skip the current test if we lack Perl. ++require_perl_() ++{ ++ test "$PERL" && $PERL -e 'use warnings' > /dev/null 2>&1 \ ++ || skip_ 'configure did not find a usable version of Perl' ++} ++ + expensive_() + { + if test "$RUN_EXPENSIVE_TESTS" != yes; then +diff --git a/tests/long-pattern-perf b/tests/long-pattern-perf +index 2d5e7c1..4557bbf 100755 +--- a/tests/long-pattern-perf ++++ b/tests/long-pattern-perf +@@ -24,6 +24,7 @@ fail=0 + # system load during the two test runs, so we'll mark it as + # "expensive", making it less likely to be run by regular users. + expensive_ ++require_perl_ + + echo x > in || framework_failure_ + # Note that we want 10x the byte count (not line count) in the larger file. +diff --git a/tests/many-regex-performance b/tests/many-regex-performance +index e16e032..4a5adac 100755 +--- a/tests/many-regex-performance ++++ b/tests/many-regex-performance +@@ -26,6 +26,7 @@ fail=0 + # system load during the two test runs, so we'll mark it as + # "expensive", making it less likely to be run by regular users. + expensive_ ++require_perl_ + + # Make the quick/small input large enough so that even on high-end + # systems this first invocation takes at least 10ms of user time. +diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance +index a6208d8..f3b33af 100755 +--- a/tests/mb-non-UTF8-performance ++++ b/tests/mb-non-UTF8-performance +@@ -26,6 +26,7 @@ fail=0 + # system load during the two test runs, so we'll mark it as + # "expensive", making it less likely to be run by regular users. + expensive_ ++require_perl_ + + # Make the input large enough so that even on high-end systems + # the unibyte test takes at least 10ms of user time. +-- +2.37.2 + diff --git a/srcpkgs/chroot-grep/template b/srcpkgs/chroot-grep/template index 022b01d20de2..4b4afcb90721 100644 --- a/srcpkgs/chroot-grep/template +++ b/srcpkgs/chroot-grep/template @@ -1,17 +1,18 @@ # Template file for 'chroot-grep' pkgname=chroot-grep -version=3.3 +version=3.7 revision=1 wrksrc="grep-${version}" bootstrap=yes build_style=gnu-configure configure_args="--disable-perl-regexp --disable-nls ac_cv_path_GREP=grep" -short_desc="The GNU grep utility - for use with xbps-src" +hostmakedepends="automake" +short_desc="GNU grep utility - for use with xbps-src" maintainer="Enno Boland " license="GPL-3.0-or-later" homepage="http://www.gnu.org/software/grep/" distfiles="${GNU_SITE}/grep/grep-${version}.tar.xz" -checksum=b960541c499619efd6afe1fa795402e4733c8e11ebf9fafccc0bb4bccdc5b514 +checksum=5c10da312460aec721984d5d83246d24520ec438dd48d7ab5a05dbc0d6d6823c conflicts="grep>=0" provides="grep-${version}_${revision}"