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>
7 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
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")))
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)
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"
64 (synopsis "Perl Compatible Regular Expressions")
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/")))
79 (uri (string-append "mirror://sourceforge/pcre/pcre2/"
80 version "/pcre2-" version ".tar.bz2"))
82 (patches (search-patches "pcre2-CVE-2016-3191.patch"))
85 "1q6lrj9b08l1q39vxipb0fi88x6ybvkr6439h8bjb9r8jd81fsn6"))))
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"
99 (synopsis "Perl Compatible Regular Expressions")
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/")))