Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / icu4c.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
6 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages icu4c)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages perl)
26 #:use-module (guix licenses)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system ant)
30 #:use-module (guix build-system gnu))
31
32 (define-public icu4c
33 (package
34 (name "icu4c")
35 (version "58.2")
36 (source (origin
37 (method url-fetch)
38 (uri (string-append
39 "http://download.icu-project.org/files/icu4c/"
40 version
41 "/icu4c-"
42 (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
43 "-src.tgz"))
44 (patches
45 (search-patches "icu4c-CVE-2017-7867-CVE-2017-7868.patch"
46 "icu4c-reset-keyword-list-iterator.patch"))
47 (sha256
48 (base32 "036shcb3f8bm1lynhlsb4kpjm9s9c2vdiir01vg216rs2l8482ib"))))
49 (build-system gnu-build-system)
50 (inputs
51 `(("perl" ,perl)))
52 (arguments
53 `(#:configure-flags
54 '("--enable-rpath"
55 ,@(if (let ((s (or (%current-target-system)
56 (%current-system))))
57 (or (string-prefix? "arm" s)
58 (string-prefix? "mips" s)))
59 '("--with-data-packaging=archive")
60 '()))
61 #:phases
62 (modify-phases %standard-phases
63 (add-after 'unpack 'chdir-to-source
64 (lambda _ (chdir "source") #t)))))
65 (synopsis "International Components for Unicode")
66 (description
67 "ICU is a set of C/C++ and Java libraries providing Unicode and
68 globalisation support for software applications. This package contains the
69 C/C++ part.")
70 (license x11)
71 (home-page "http://site.icu-project.org/")))
72
73 (define-public java-icu4j
74 (package
75 (name "java-icu4j")
76 (version "59.1")
77 (source (origin
78 (method url-fetch)
79 (uri (string-append "http://download.icu-project.org/files/icu4j/"
80 version "/icu4j-"
81 (string-map (lambda (x)
82 (if (char=? x #\.) #\_ x))
83 version)
84 "-src.jar"))
85 (sha256
86 (base32
87 "0bgxsvgi0qcwj60pvcxrf7a3fbk7aksyxnfwpbzavyfrfzixqh0c"))))
88 (build-system ant-build-system)
89 (arguments
90 `(#:tests? #f ; no tests included
91 #:jar-name "icu4j.jar"))
92 (home-page "http://site.icu-project.org/")
93 (synopsis "International Components for Unicode")
94 (description
95 "ICU is a set of C/C++ and Java libraries providing Unicode and
96 globalisation support for software applications. This package contains the
97 Java part.")
98 (license x11)))