summary refs log tree commit diff
path: root/gnu/packages/pcre.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/pcre.scm')
-rw-r--r--gnu/packages/pcre.scm159
1 files changed, 81 insertions, 78 deletions
diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm
index fdc86e5047..7c53a27685 100644
--- a/gnu/packages/pcre.scm
+++ b/gnu/packages/pcre.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2017, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -33,99 +33,102 @@
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu))
 
 (define-public pcre
   (package
-   (name "pcre")
-   (version "8.45")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "mirror://sourceforge/pcre/pcre/"
-                                version "/pcre-" version ".tar.bz2"))
-            (sha256
-             (base32
-              "1f7zichy6iimmkfrqdl575sdlm795cyc75szgg1vc2xvsbf6zbjd"))))
-   (build-system gnu-build-system)
-   (outputs '("out"           ;library & headers
-              "bin"           ;depends on Readline (adds 20MiB to the closure)
-              "doc"           ;1.8 MiB of HTML
-              "static"))      ;1.8 MiB static libraries
-   (inputs (list bzip2 readline zlib))
-   (arguments
-    `(#:disallowed-references ("doc")
-      #:configure-flags '("--enable-utf"
-                          "--enable-pcregrep-libz"
-                          "--enable-pcregrep-libbz2"
-                          "--enable-pcretest-libreadline"
-                          "--enable-unicode-properties"
-                          "--enable-pcre16"
-                          "--enable-pcre32"
-                          ;; pcretest fails on powerpc32.
-                          ;; riscv64-linux is an unsupported architecture.
-                          ,@(if (or (target-ppc32?)
-                                    (target-riscv64?))
-                              '()
-                              `("--enable-jit")))
-      #:phases (modify-phases %standard-phases
-                 (add-after 'install 'move-static-libs
-                   (lambda* (#:key outputs #:allow-other-keys)
-                     (let ((source (string-append (assoc-ref outputs "out") "/lib"))
-                           (static (string-append (assoc-ref outputs "static") "/lib")))
-                       (mkdir-p static)
-                       (for-each (lambda (lib)
-                                   (link lib (string-append static "/"
-                                                            (basename lib)))
-                                   (delete-file lib))
-                                 (find-files source "\\.a$"))))))))
-   (synopsis "Perl Compatible Regular Expressions")
-   (description
-    "The PCRE library is a set of functions that implement regular expression
+    (name "pcre")
+    (version "8.45")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/pcre/pcre/"
+                                  version "/pcre-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1f7zichy6iimmkfrqdl575sdlm795cyc75szgg1vc2xvsbf6zbjd"))))
+    (build-system gnu-build-system)
+    (outputs '("out"          ;library & headers
+               "bin"          ;depends on Readline (adds 20MiB to the closure)
+               "doc"          ;1.8 MiB of HTML
+               "static"))     ;1.8 MiB static libraries
+    (inputs (list bzip2 readline zlib))
+    (arguments
+     (list
+      #:disallowed-references '("doc")
+      #:configure-flags #~'("--enable-utf"
+                            "--enable-pcregrep-libz"
+                            "--enable-pcregrep-libbz2"
+                            "--enable-pcretest-libreadline"
+                            "--enable-unicode-properties"
+                            "--enable-pcre16"
+                            "--enable-pcre32"
+                            ;; pcretest fails on powerpc32.
+                            ;; riscv64-linux is an unsupported architecture.
+                            #$@(if (or (target-ppc32?) (target-riscv64?))
+                                   #~()
+                                   #~("--enable-jit")))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'move-static-libs
+            (lambda _
+              (let ((source (string-append #$output "/lib"))
+                    (static (string-append #$output:static "/lib")))
+                (mkdir-p static)
+                (for-each (lambda (lib)
+                            (link lib (string-append static "/"
+                                                     (basename lib)))
+                            (delete-file lib))
+                          (find-files source "\\.a$"))))))))
+    (synopsis "Perl Compatible Regular Expressions")
+    (description
+     "The PCRE library is a set of functions that implement regular expression
 pattern matching using the same syntax and semantics as Perl 5.  PCRE has its
 own native API, as well as a set of wrapper functions that correspond to the
 POSIX regular expression API.")
-   (license license:bsd-3)
-   (home-page "https://www.pcre.org/")))
+    (license license:bsd-3)
+    (home-page "https://www.pcre.org/")))
 
 (define-public pcre2
   (package
     (name "pcre2")
-    (version "10.37")
+    (version "10.40")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/pcre/pcre2/"
-                                  version "/pcre2-" version ".tar.bz2"))
+              (uri (string-append "https://github.com/PCRE2Project/pcre2"
+                                  "/releases/download/pcre2-" version
+                                  "/pcre2-" version ".tar.bz2"))
               (sha256
                (base32
-                "0w6jaswjmg3bc0wsw6msn5bvk66p90kf2asnnj9rhll0idpak5ad"))))
-   (build-system gnu-build-system)
-   (inputs (list bzip2 readline zlib))
-   (arguments
-    `(#:configure-flags '("--enable-unicode"
-                          "--enable-pcre2grep-libz"
-                          "--enable-pcre2grep-libbz2"
-                          "--enable-pcre2test-libreadline"
-                          "--enable-pcre2-16"
-                          "--enable-pcre2-32"
-                          ;; pcre2_jit_test fails on powerpc32.
-                          ;; riscv64-linux is an unsupported architecture.
-                          ,@(if (or (target-ppc32?)
-                                    (target-riscv64?))
-                              '()
-                              `("--enable-jit"))
-                          "--disable-static")
-      #:phases
-      (modify-phases %standard-phases
-        (add-after 'unpack 'patch-paths
-          (lambda _
-            (substitute* "RunGrepTest"
-              (("/bin/echo") (which "echo"))))))))
-   (synopsis "Perl Compatible Regular Expressions")
-   (description
-    "The PCRE library is a set of functions that implement regular expression
+                "0s4x2l6g0sb9piwkr3sxqwdswz2g6bk1hhwngv0kv4w38wybir0l"))))
+    (build-system gnu-build-system)
+    (inputs (list bzip2 readline zlib))
+    (arguments
+     (list #:configure-flags
+           #~'("--enable-unicode"
+               "--enable-pcre2grep-libz"
+               "--enable-pcre2grep-libbz2"
+               "--enable-pcre2test-libreadline"
+               "--enable-pcre2-16"
+               "--enable-pcre2-32"
+               ;; pcre2_jit_test fails on powerpc32.
+               ;; riscv64-linux is an unsupported architecture.
+               #$@(if (or (target-ppc32?) (target-riscv64?))
+                      #~()
+                      #~("--enable-jit"))
+               "--disable-static")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-paths
+                 (lambda _
+                   (substitute* "RunGrepTest"
+                     (("/bin/echo") (which "echo"))))))))
+    (synopsis "Perl Compatible Regular Expressions")
+    (description
+     "The PCRE library is a set of functions that implement regular expression
 pattern matching using the same syntax and semantics as Perl 5.  PCRE has its
 own native API, as well as a set of wrapper functions that correspond to the
 POSIX regular expression API.")
-   (license license:bsd-3)
-   (home-page "https://www.pcre.org/")))
+    (license license:bsd-3)
+    (home-page "https://www.pcre.org/")))