1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
6 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
8 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages pcre)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages readline)
30 #:use-module (gnu packages)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix build-system gnu))
42 (string-append "ftp://ftp.csx.cam.ac.uk"
43 "/pub/software/programming/pcre/"
44 "pcre-" version ".tar.bz2")
45 (string-append "mirror://sourceforge/pcre/pcre/"
46 version "/pcre-" version ".tar.bz2")))
49 "0c5m469p5pd7jip621ipq6hbgh7128lzh7xndllfgh77ban7wb76"))))
50 (build-system gnu-build-system)
51 (outputs '("out" ;library & headers
52 "bin" ;depends on Readline (adds 20MiB to the closure)
53 "doc")) ;1.8 MiB of HTML
54 (inputs `(("bzip2" ,bzip2)
55 ("readline" ,readline)
58 '(#:disallowed-references ("doc")
59 #:configure-flags '("--enable-utf"
60 "--enable-pcregrep-libz"
61 "--enable-pcregrep-libbz2"
62 "--enable-pcretest-libreadline"
63 "--enable-unicode-properties"
67 (synopsis "Perl Compatible Regular Expressions")
69 "The PCRE library is a set of functions that implement regular expression
70 pattern matching using the same syntax and semantics as Perl 5. PCRE has its
71 own native API, as well as a set of wrapper functions that correspond to the
72 POSIX regular expression API.")
73 (license license:bsd-3)
74 (home-page "https://www.pcre.org/")))
82 (uri (string-append "mirror://sourceforge/pcre/pcre2/"
83 version "/pcre2-" version ".tar.bz2"))
87 "1b389pzw91k1hzydsh4smdsxyppwz4pv74m3nrvy8rda0j3m6zg0"))))
88 (build-system gnu-build-system)
89 (inputs `(("bzip2" ,bzip2)
90 ("readline" ,readline)
93 `(#:configure-flags '("--enable-unicode"
94 "--enable-pcre2grep-libz"
95 "--enable-pcre2grep-libbz2"
96 "--enable-pcre2test-libreadline"
101 (modify-phases %standard-phases
102 (add-after 'unpack 'patch-paths
104 (substitute* "RunGrepTest"
105 (("/bin/echo") (which "echo")))
107 (synopsis "Perl Compatible Regular Expressions")
109 "The PCRE library is a set of functions that implement regular expression
110 pattern matching using the same syntax and semantics as Perl 5. PCRE has its
111 own native API, as well as a set of wrapper functions that correspond to the
112 POSIX regular expression API.")
113 (license license:bsd-3)
114 (home-page "https://www.pcre.org/")))