aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/pcre.scm
blob: ee48ad0e2bac2f908fb3d498ac755a963407b3b3 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages pcre)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages readline)
  #:use-module (gnu packages)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix build-system gnu))

(define-public pcre
  (package
    (name "pcre")
    (version "8.45")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/pcre/pcre/"
                                  version "/pcre-" version ".tar.bz2"))
              (sha256
               (base32
                "1f7zichy6iimmkfrqdl575sdlm795cyc75szgg1vc2xvsbf6zbjd"))))
    (build-system gnu-build-system)
    (outputs '("out"          ;library & headers
               "bin"          ;depends on Readline (adds 20MiB to the closure)
               "doc"          ;1.8 MiB of HTML
               "static"))     ;1.8 MiB static libraries
    (inputs (list bzip2 readline zlib))
    (arguments
     (list
      #:disallowed-references '("doc")
      #:configure-flags #~'("--enable-utf"
                            "--enable-pcregrep-libz"
                            "--enable-pcregrep-libbz2"
                            "--enable-pcretest-libreadline"
                            "--enable-unicode-properties"
                            "--enable-pcre16"
                            "--enable-pcre32"
                            ;; riscv64-linux is an unsupported architecture.
                            #$@(if (target-riscv64?)
                                   #~()
                                   #~("--enable-jit")))
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'install 'move-static-libs
            (lambda _
              (let ((source (string-append #$output "/lib"))
                    (static (string-append #$output:static "/lib")))
                (mkdir-p static)
                (for-each (lambda (lib)
                            (link lib (string-append static "/"
                                                     (basename lib)))
                            (delete-file lib))
                          (find-files source "\\.a$"))))))))
    (synopsis "Perl Compatible Regular Expressions")
    (description
     "The PCRE library is a set of functions that implement regular expression
pattern matching using the same syntax and semantics as Perl 5.  PCRE has its
own native API, as well as a set of wrapper functions that correspond to the
POSIX regular expression API.")
    (license license:bsd-3)
    (home-page "https://www.pcre.org/")))

(define-public pcre2
  (package
    (name "pcre2")
    (version "10.40")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/PCRE2Project/pcre2"
                                  "/releases/download/pcre2-" version
                                  "/pcre2-" version ".tar.bz2"))
              (sha256
               (base32
                "0s4x2l6g0sb9piwkr3sxqwdswz2g6bk1hhwngv0kv4w38wybir0l"))))
    (build-system gnu-build-system)
    (inputs (list bzip2 readline zlib))
    (arguments
     (list #:configure-flags
           #~'("--enable-unicode"
               "--enable-pcre2grep-libz"
               "--enable-pcre2grep-libbz2"
               "--enable-pcre2test-libreadline"
               "--enable-pcre2-16"
               "--enable-pcre2-32"
               ;; riscv64-linux is an unsupported architecture.
               #$@(if (target-riscv64?)
                      #~()
                      #~("--enable-jit"))
               "--disable-static")
           #:phases
           #~(modify-phases %standard-phases
               (add-after 'unpack 'patch-paths
                 (lambda _
                   (substitute* "RunGrepTest"
                     (("/bin/echo") (which "echo"))))))))
    (synopsis "Perl Compatible Regular Expressions")
    (description
     "The PCRE library is a set of functions that implement regular expression
pattern matching using the same syntax and semantics as Perl 5.  PCRE has its
own native API, as well as a set of wrapper functions that correspond to the
POSIX regular expression API.")
    (license license:bsd-3)
    (home-page "https://www.pcre.org/")))
we really want or do elsewhere, and interferers with mass updates like the one I'm about to make. * gnu/packages/glib.scm (perl-net-dbus-glib)[home-page]: Use canonical home page. * gnu/packages/perl-check.scm (perl-test-nowarnings, perl-test-output) (perl-test-simple, perl-test-tester)[home-page]: Likewise. * gnu/packages/perl.scm (perl-benchmark-timer, perl-clone) (perl-digest-sha1, perl-file-which, perl-getopt-tabular, perl-io-string) (perl-ipc-run3, perl-probe-perl, perl-regexp-common, perl-sys-cpu) [home-page]: Likewise. * gnu/packages/tcl.scm (perl-tk)[home-page]: Likewise. * gnu/packages/tls.scm (perl-net-ssleay)[home-page]: Likewise. * gnu/packages/web.scm (perl-www-curl)[home-page]: Likewise. * gnu/packages/xml.scm (perl-xml-dom)[home-page]: Likewise. * gnu/packages/xorg.scm (perl-x11-protocol-other)[home-page]: Likewise. Tobias Geerinckx-Rice 2018-07-16gnu: tk: Add symlink for 'wish' binary....* gnu/packages/tcl.scm (tk)[arguments]: Add custom phase to create a symlink from 'wish' to 'wish8.6'. [home-page]: Use https. Efraim Flashner 2018-03-29gnu: tcl, tk: Update to 8.6.8....* gnu/packages/tcl.scm (tcl, tk): Update to 8.6.8. Marius Bakke 2018-03-23gnu: tcl: Use invoke....* gnu/packages/tcl.scm (tcl)[arguments]: Use invoke and remove vestigial plumbing in the 'install-private-headers' phase. Mark H Weaver 2018-03-17gnu: tk: Return #t from all phases....* gnu/packages/tcl.scm (tk)[arguments]: Return #t from 'pre-configure' phase. Mark H Weaver 2018-03-18gnu: Switch from xproto to xorgproto....* gnu/packages/compton.scm (compton)[inputs]: Replace XPROTO with XORGPROTO. * gnu/packages/enlightenment.scm (efl)[inputs]: Likewise. * gnu/packages/gnome.scm (totem)[inputs]: Likewise. * gnu/packages/haskell.scm (ghc-x11-xft)[inputs]: Likewise. * gnu/packages/image-processing.scm (vtk)[inputs]: Likewise. * gnu/packages/mate.scm (mate-control-center, mate-netbook, mate-screensaver, mate-utils)[native-inputs]: Likewise. * gnu/packages/xdisorg.scm (xautomation)[native-inputs]: Likewise. * gnu/packages/xnee.scm (xnee)[inputs]: Likewise. * gnu/packages/xorg.scm (imake, lndir, libxshmfence, libfontenc, libfs, libxcomposite, libxdmcp, libxft, libxmu, libxpm, libxres, makedepend, mkfontscale, sessreg, xev, xf86-video-qxl, xkbcomp-intermediate, xkbutils, xlsfonts, xmodmap, xpr, xprop, xrandr, xset, xwd, xwininfo, xwud, xorg-rgb, libxdamage, libxrender, libxv, libice, libxau, libxfixes, libxfont, libxi, libxrandr, libxvmc, xorg-server, libxcursor, libxaw, twm, xinit, xterm)[inputs]: Likewise. (xorgproto): Move expression before all other -proto packages. (xproto)[properties]: Mark as superseded by XORGPROTO. Marius Bakke