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>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages pcre)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (gnu packages compression)
26 #:use-module (gnu packages readline)
27 #:use-module (gnu packages)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu))
39 (string-append "ftp://ftp.csx.cam.ac.uk"
40 "/pub/software/programming/pcre/"
41 "pcre-" version ".tar.bz2")
42 (string-append "mirror://sourceforge/pcre/pcre/"
43 version "/pcre-" version ".tar.bz2")))
46 "1pvra19ljkr5ky35y2iywjnsckrs9ch2anrf5b0dc91hw8v2vq5r"))
47 (patches (list (search-patch "pcre-CVE-2016-3191.patch")))))
48 (build-system gnu-build-system)
49 (outputs '("out" ;library & headers
50 "bin" ;depends on Readline (adds 20MiB to the closure)
51 "doc")) ;1.8 MiB of HTML
52 (inputs `(("bzip2" ,bzip2)
53 ("readline" ,readline)
56 '(#:disallowed-references ("doc")
57 #:configure-flags '("--enable-utf"
58 "--enable-pcregrep-libz"
59 "--enable-pcregrep-libbz2"
60 "--enable-pcretest-libreadline"
61 "--enable-unicode-properties"
65 (synopsis "Perl Compatible Regular Expressions")
67 "The PCRE library is a set of functions that implement regular expression
68 pattern matching using the same syntax and semantics as Perl 5. PCRE has its
69 own native API, as well as a set of wrapper functions that correspond to the
70 POSIX regular expression API.")
71 (license license:bsd-3)
72 (home-page "http://www.pcre.org/")))
80 (uri (string-append "mirror://sourceforge/pcre/pcre2/"
81 version "/pcre2-" version ".tar.bz2"))
85 "0vn5g0mkkp99mmzpissa06hpyj6pk9s4mlwbjqrjvw3ihy8rpiyz"))))
86 (build-system gnu-build-system)
87 (inputs `(("bzip2" ,bzip2)
88 ("readline" ,readline)
91 `(#:configure-flags '("--enable-unicode"
92 "--enable-pcregrep-libz"
93 "--enable-pcregrep-libbz2"
94 "--enable-pcretest-libreadline"
95 "--enable-unicode-properties"
100 (modify-phases %standard-phases
101 (add-after 'unpack 'patch-paths
103 (substitute* "RunGrepTest"
104 (("/bin/echo") (which "echo")))
106 (synopsis "Perl Compatible Regular Expressions")
108 "The PCRE library is a set of functions that implement regular expression
109 pattern matching using the same syntax and semantics as Perl 5. PCRE has its
110 own native API, as well as a set of wrapper functions that correspond to the
111 POSIX regular expression API.")
112 (license license:bsd-3)
113 (home-page "http://www.pcre.org/")))