gnu: nss, nss-certs: Update to 3.27.2.
[jackhill/guix/guix.git] / gnu / packages / pcre.scm
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 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages pcre)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages readline)
26 #:use-module (gnu packages)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu))
30
31 (define-public pcre
32 (package
33 (name "pcre")
34 (version "8.38")
35 (source (origin
36 (method url-fetch)
37 (uri (list
38 (string-append "ftp://ftp.csx.cam.ac.uk"
39 "/pub/software/programming/pcre/"
40 "pcre-" version ".tar.bz2")
41 (string-append "mirror://sourceforge/pcre/pcre/"
42 version "/pcre-" version ".tar.bz2")))
43 (sha256
44 (base32
45 "1pvra19ljkr5ky35y2iywjnsckrs9ch2anrf5b0dc91hw8v2vq5r"))
46 (patches (list (search-patch "pcre-CVE-2016-3191.patch")))))
47 (build-system gnu-build-system)
48 (outputs '("out" ;library & headers
49 "bin" ;depends on Readline (adds 20MiB to the closure)
50 "doc")) ;1.8 MiB of HTML
51 (inputs `(("bzip2" ,bzip2)
52 ("readline" ,readline)
53 ("zlib" ,zlib)))
54 (arguments
55 '(#:disallowed-references ("doc")
56 #:configure-flags '("--enable-utf"
57 "--enable-pcregrep-libz"
58 "--enable-pcregrep-libbz2"
59 "--enable-pcretest-libreadline"
60 "--enable-unicode-properties"
61 "--enable-pcre16"
62 "--enable-pcre32"
63 "--enable-jit")))
64 (synopsis "Perl Compatible Regular Expressions")
65 (description
66 "The PCRE library is a set of functions that implement regular expression
67 pattern matching using the same syntax and semantics as Perl 5. PCRE has its
68 own native API, as well as a set of wrapper functions that correspond to the
69 POSIX regular expression API.")
70 (license license:bsd-3)
71 (home-page "http://www.pcre.org/")))
72
73 (define-public pcre2
74 (package
75 (name "pcre2")
76 (version "10.21")
77 (source (origin
78 (method url-fetch)
79 (uri (string-append "mirror://sourceforge/pcre/pcre2/"
80 version "/pcre2-" version ".tar.bz2"))
81
82 (patches (search-patches "pcre2-CVE-2016-3191.patch"))
83 (sha256
84 (base32
85 "1q6lrj9b08l1q39vxipb0fi88x6ybvkr6439h8bjb9r8jd81fsn6"))))
86 (build-system gnu-build-system)
87 (inputs `(("bzip2" ,bzip2)
88 ("readline" ,readline)
89 ("zlib" ,zlib)))
90 (arguments
91 `(#:configure-flags '("--enable-unicode"
92 "--enable-pcregrep-libz"
93 "--enable-pcregrep-libbz2"
94 "--enable-pcretest-libreadline"
95 "--enable-unicode-properties"
96 "--enable-pcre2-16"
97 "--enable-pcre2-32"
98 "--enable-jit")))
99 (synopsis "Perl Compatible Regular Expressions")
100 (description
101 "The PCRE library is a set of functions that implement regular expression
102 pattern matching using the same syntax and semantics as Perl 5. PCRE has its
103 own native API, as well as a set of wrapper functions that correspond to the
104 POSIX regular expression API.")
105 (license license:bsd-3)
106 (home-page "http://www.pcre.org/")))