Subject: [bug#67450] [PATCH] gnu: grep: Fix pcre matching in grep.

From: spacecadet <[email-masked]>
Date: Sun, 26 Nov 2023 03:12:08 +0000

Fix grep not building with -P (perl regexp) support.

* gnu/packages/base.scm: Replace grep's pcre input with pcre2.
* gnu/packages/base.scm: Add "--enable-perl-regexp" configure flag to grep.
---
  gnu/packages/base.scm | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 41aff0ca97..feb5ca5746 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -120,9 +120,11 @@ (define-public grep
              (patches (search-patches "grep-timing-sensitive-test.patch"))))
     (build-system gnu-build-system)
     (native-inputs (list perl))                   ;some of the tests require it
-   (inputs (list pcre))
+   (inputs (list pcre2))
     (arguments
-    `(#:phases
+    `(#:configure-flags
+      (list "--enable-perl-regexp")
+      #:phases
        (modify-phases %standard-phases
          (add-after 'install 'fix-egrep-and-fgrep
            ;; Patch 'egrep' and 'fgrep' to execute 'grep' via its

base-commit: 13bc0633e77c73389e530a4c45e2de5a823f106b
-- 
2.41.0