gnu: packages: Use 'search-patches' everywhere.
[jackhill/guix/guix.git] / gnu / packages / icu4c.scm
CommitLineData
4c9e7975
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
0d93648b 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4c9e7975
AE
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
1ffa7090 20(define-module (gnu packages icu4c)
59a43334 21 #:use-module (gnu packages)
1ffa7090 22 #:use-module (gnu packages perl)
4c9e7975
AE
23 #:use-module (guix licenses)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu))
27
28(define-public icu4c
29 (package
30 (name "icu4c")
1600544a 31 (version "55.1")
4c9e7975
AE
32 (source (origin
33 (method url-fetch)
d5df6fc7
AW
34 (uri (string-append
35 "mirror://sourceforge/icu/ICU4C/"
36 version
37 "/icu4c-"
38 (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
39 "-src.tgz"))
1319cfe9 40 (sha256
d2892f3a 41 (base32 "0ys5f5spizg45qlaa31j2lhgry0jka2gfha527n4ndfxxz5j4sz1"))
fc1adab1
AK
42 (patches (search-patches "icu4c-CVE-2014-6585.patch"
43 "icu4c-CVE-2015-1270.patch"
44 "icu4c-CVE-2015-4760.patch"))))
4c9e7975 45 (build-system gnu-build-system)
a2270ce2 46 (inputs
0d93648b 47 `(("perl" ,perl)))
4c9e7975 48 (arguments
0d93648b
MW
49 `(#:configure-flags
50 '("--enable-rpath"
51 ,@(if (string-prefix? "arm" (or (%current-target-system)
52 (%current-system)))
53 '("--with-data-packaging=archive")
54 '()))
a2270ce2 55 #:phases
d4bf49b1
EB
56 (alist-cons-after
57 'unpack 'chdir-to-source
58 (lambda _ (chdir "source"))
59 (alist-cons-before
60 'configure 'patch-configure
61 (lambda _
62 ;; patch out two occurrences of /bin/sh from configure script
8c3fc834 63 ;; that might have disappeared in a release later than 54.1
d4bf49b1
EB
64 (substitute* "configure"
65 (("`/bin/sh")
66 (string-append "`" (which "bash")))))
0d93648b 67 %standard-phases))))
35b9e423 68 (synopsis "International Components for Unicode")
4c9e7975
AE
69 (description
70 "ICU is a set of C/C++ and Java libraries providing Unicode and
35b9e423 71globalisation support for software applications. This package contains the
4c9e7975
AE
72C/C++ part.")
73 (license x11)
74 (home-page "http://site.icu-project.org/")))