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