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, 2017 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
6 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
8 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
39 "http://download.icu-project.org/files/icu4c/"
42 (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
45 (base32 "17fbk0lm2clsxbmjzvyp245ayx0n4chji3ky1f3fbz2ljjv91i05"))))
46 (build-system gnu-build-system)
52 ,@(if (let ((s (or (%current-target-system)
54 (or (string-prefix? "arm" s)
55 (string-prefix? "mips" s)))
56 '("--with-data-packaging=archive")
58 ,@(if (string-prefix? "i686" (or (%current-target-system)
60 ;; FIXME: Some tests are failing on i686:
61 ;; <https://unicode-org.atlassian.net/browse/ICU-20080>.
65 (modify-phases %standard-phases
66 (add-after 'unpack 'chdir-to-source
67 (lambda _ (chdir "source") #t))
68 (add-after 'install 'avoid-coreutils-reference
69 ;; Don't keep a reference to the build tools.
70 (lambda* (#:key outputs #:allow-other-keys)
71 (let ((out (assoc-ref outputs "out")))
72 (substitute* (find-files (string-append out "/lib/icu")
74 (("INSTALL_CMD=.*/bin/install") "INSTALL_CMD=install"))
76 (synopsis "International Components for Unicode")
78 "ICU is a set of C/C++ and Java libraries providing Unicode and
79 globalisation support for software applications. This package contains the
82 (home-page "http://site.icu-project.org/")))
84 (define-public java-icu4j
90 (uri (string-append "http://download.icu-project.org/files/icu4j/"
92 (string-map (lambda (x)
93 (if (char=? x #\.) #\_ x))
98 "0bgxsvgi0qcwj60pvcxrf7a3fbk7aksyxnfwpbzavyfrfzixqh0c"))))
99 (build-system ant-build-system)
101 `(#:tests? #f ; no tests included
102 #:jar-name "icu4j.jar"))
103 (home-page "http://site.icu-project.org/")
104 (synopsis "International Components for Unicode")
106 "ICU is a set of C/C++ and Java libraries providing Unicode and
107 globalisation support for software applications. This package contains the