unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob ca51ff7ec397b717dd0efdba2e2027f32e1784ed 6482 bytes (raw)
name: gnu/packages/pcre.scm 	 # note: path name is non-authoritative(*)

  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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
 
;;; 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 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
;;;
;;; 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 hurd)  
  #:use-module (gnu packages readline)
  #:use-module (gnu packages)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu))

(define-public pcre
  (package
   (name "pcre")
   (version "8.40")
   (replacement pcre/fixed)
   (source (origin
            (method url-fetch)
            (uri (list
                  (string-append "ftp://ftp.csx.cam.ac.uk"
                                 "/pub/software/programming/pcre/"
                                 "pcre-" version ".tar.bz2")
                  (string-append "mirror://sourceforge/pcre/pcre/"
                                 version "/pcre-" version ".tar.bz2")))
            (sha256
             (base32
              "1x7lpjn7jhk0n3sdvggxrlrhab8kkfjwl7qix0ypw9nlx8lpmqh0"))))
   (build-system gnu-build-system)
   (outputs '("out"           ;library & headers
              "bin"           ;depends on Readline (adds 20MiB to the closure)
              "doc"))         ;1.8 MiB of HTML
   (inputs `(("bzip2" ,bzip2)
             ("readline" ,readline)
             ("zlib" ,zlib)))
   (arguments
    `(#:disallowed-references ("doc")
      #:phases
      (modify-phases %standard-phases
        (replace 'configure
                 (lambda* (#:key outputs build target #:allow-other-keys)
                   (let* ((out (assoc-ref outputs "out"))
                          (bin (assoc-ref outputs "bin"))
                          (doc (assoc-ref outputs "doc")))
                     (setenv "CONFIG_SHELL" (which "bash"))
                     (zero?
                      (system* "./configure"
                               (string-append "--prefix=" out)
                               (string-append "--bindir=" bin)
                               (string-append "--docdir=" doc)
                               (string-append "--build=" build)
                               (string-append "--host=" (or target build))
                               "--enable-utf"
                               "--enable-pcregrep-libz"
                               "--enable-pcregrep-libbz2"
                               "--enable-pcretest-libreadline"
                               "--enable-unicode-properties"
                               "--enable-pcre16"
                               "--enable-pcre32"
                               "--enable-jit"
                               ;; On GNU/Hurd systems FAIL 'RunTest' with 'segmentation
                               ;; fault' in Check phase, to pass the test we can disable
                               ;; "--enable-jit" or set "--disable-stack-for-recursion"
                               ;; argument.
                               ,@(if (hurd-triplet? (or (%current-system)
                                                        ( %current-target-system)))
                                     '("--disable-stack-for-recursion")
                                     '())))))))))
   (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 "http://www.pcre.org/")))

(define pcre/fixed
  (package
    (inherit pcre)
    (replacement #f)
    (source (origin
              (inherit (package-source pcre))
              (patches (search-patches "pcre-CVE-2017-7186.patch"))))))

(define-public pcre2
  (package
    (name "pcre2")
    (version "10.23")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/pcre/pcre2/"
                                  version "/pcre2-" version ".tar.bz2"))

              (sha256
               (base32
                "0vn5g0mkkp99mmzpissa06hpyj6pk9s4mlwbjqrjvw3ihy8rpiyz"))
              (patches (search-patches "pcre2-CVE-2017-7186.patch"))))
   (build-system gnu-build-system)
   (inputs `(("bzip2" ,bzip2)
             ("readline" ,readline)
             ("zlib" ,zlib)))
   (arguments
    `(#:configure-flags '("--enable-unicode"
                          "--enable-pcregrep-libz"
                          "--enable-pcregrep-libbz2"
                          "--enable-pcretest-libreadline"
                          "--enable-unicode-properties"
                          "--enable-pcre2-16"
                          "--enable-pcre2-32"
                          "--enable-jit")
      #:phases
      (modify-phases %standard-phases
        (add-after 'unpack 'patch-paths
          (lambda _
            (substitute* "RunGrepTest"
              (("/bin/echo") (which "echo")))
            #t)))))
   (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 "http://www.pcre.org/")))

debug log:

solving ca51ff7ec ...
found ca51ff7ec in https://yhetil.org/guix-patches/2ExjL3FnTH2ActBCbOgZRN@lTC1VtRxjDOEtGzP2P9M4/
found 1946f5229 in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 1946f5229caeb5c8a7e9bd739aded1b91ade68de	gnu/packages/pcre.scm

applying [1/1] https://yhetil.org/guix-patches/2ExjL3FnTH2ActBCbOgZRN@lTC1VtRxjDOEtGzP2P9M4/
diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm
index 1946f5229..ca51ff7ec 100644

1:17: trailing whitespace.
  #:use-module (gnu packages hurd)  
Checking patch gnu/packages/pcre.scm...
Applied patch gnu/packages/pcre.scm cleanly.
warning: 1 line adds whitespace errors.

index at:
100644 ca51ff7ec397b717dd0efdba2e2027f32e1784ed	gnu/packages/pcre.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).