gnu: packages: Use 'search-patches' everywhere.
[jackhill/guix/guix.git] / gnu / packages / pcre.scm
CommitLineData
10d1822b
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
fd19fa55 3;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
7ea3099b 4;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
10d1822b
AE
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)
b5b73a82 22 #:use-module ((guix licenses) #:prefix license:)
10d1822b
AE
23 #:use-module (gnu packages compression)
24 #:use-module (gnu packages readline)
a7681d29 25 #:use-module (gnu packages)
10d1822b
AE
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")
dae36ca5 33 (version "8.38")
a7681d29 34 (replacement pcre-fixed)
10d1822b
AE
35 (source (origin
36 (method url-fetch)
dae36ca5
MW
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")))
10d1822b
AE
43 (sha256
44 (base32
dae36ca5 45 "1pvra19ljkr5ky35y2iywjnsckrs9ch2anrf5b0dc91hw8v2vq5r"))))
10d1822b 46 (build-system gnu-build-system)
6042f40b
LC
47 (outputs '("out"
48 "doc")) ;1.8 MiB of HTML
10d1822b
AE
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"
90dcf9c8 56 "--enable-pcretest-libreadline"
16f71908
MW
57 "--enable-unicode-properties"
58 "--enable-pcre16"
59 "--enable-pcre32"
90dcf9c8 60 "--enable-jit")))
35b9e423 61 (synopsis "Perl Compatible Regular Expressions")
10d1822b
AE
62 (description
63 "The PCRE library is a set of functions that implement regular expression
35b9e423 64pattern matching using the same syntax and semantics as Perl 5. PCRE has its
10d1822b
AE
65own native API, as well as a set of wrapper functions that correspond to the
66POSIX regular expression API.")
67 (license license:bsd-3)
68 (home-page "http://www.pcre.org/")))
7ea3099b 69
a7681d29
LC
70(define pcre-fixed ;for CVE-2016-3191
71 (package
72 (inherit pcre)
73 (source (origin
74 (inherit (package-source pcre))
fc1adab1 75 (patches (search-patches "pcre-CVE-2016-3191.patch"))))))
a7681d29 76
7ea3099b
RW
77(define-public pcre2
78 (package
79 (name "pcre2")
1ccc3da8 80 (version "10.21")
7ea3099b
RW
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
1ccc3da8 88 "1q6lrj9b08l1q39vxipb0fi88x6ybvkr6439h8bjb9r8jd81fsn6"))))
7ea3099b
RW
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
105pattern matching using the same syntax and semantics as Perl 5. PCRE has its
106own native API, as well as a set of wrapper functions that correspond to the
107POSIX regular expression API.")
108 (license license:bsd-3)
109 (home-page "http://www.pcre.org/")))