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 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages icu4c)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages perl)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu))
28
29 (define-public icu4c
30 (package
31 (name "icu4c")
32 (version "58.2")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append
36 "http://download.icu-project.org/files/icu4c/"
37 version
38 "/icu4c-"
39 (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
40 "-src.tgz"))
41 (sha256
42 (base32 "036shcb3f8bm1lynhlsb4kpjm9s9c2vdiir01vg216rs2l8482ib"))))
43 (build-system gnu-build-system)
44 (inputs
45 `(("perl" ,perl)))
46 (arguments
47 `(#:configure-flags
48 '("--enable-rpath"
49 ,@(if (let ((s (or (%current-target-system)
50 (%current-system))))
51 (or (string-prefix? "arm" s)
52 (string-prefix? "mips" s)))
53 '("--with-data-packaging=archive")
54 '()))
55 #:phases
56 (modify-phases %standard-phases
57 (add-after 'unpack 'chdir-to-source
58 (lambda _ (chdir "source") #t)))))
59 (synopsis "International Components for Unicode")
60 (description
61 "ICU is a set of C/C++ and Java libraries providing Unicode and
62 globalisation support for software applications. This package contains the
63 C/C++ part.")
64 (license x11)
65 (home-page "http://site.icu-project.org/")))