doc: Update htmlxref.cnf.
[guix.git] / gnu / packages / icu4c.scm
blob6e93d6aed947964337a934af1c0d8863205153c0
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>
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/>.
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))
32 (define-public icu4c
33   (package
34    (name "icu4c")
35    (version "63.1")
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             (sha256
45              (base32 "17fbk0lm2clsxbmjzvyp245ayx0n4chji3ky1f3fbz2ljjv91i05"))))
46    (build-system gnu-build-system)
47    (inputs
48     `(("perl" ,perl)))
49    (arguments
50     `(#:configure-flags
51       '("--enable-rpath"
52         ,@(if (let ((s (or (%current-target-system)
53                            (%current-system))))
54                 (or (string-prefix? "arm" s)
55                     (string-prefix? "mips" s)))
56               '("--with-data-packaging=archive")
57               '()))
58         ,@(if (string-prefix? "i686" (or (%current-target-system)
59                                          (%current-system)))
60               ;; FIXME: Some tests are failing on i686:
61               ;; <https://unicode-org.atlassian.net/browse/ICU-20080>.
62               '(#:tests? #f)
63               '())
64       #:phases
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")
73                                        "\\.inc$")
74                 (("INSTALL_CMD=.*/bin/install") "INSTALL_CMD=install"))
75               #t))))))
76    (synopsis "International Components for Unicode")
77    (description
78     "ICU is a set of C/C++ and Java libraries providing Unicode and
79 globalisation support for software applications.  This package contains the
80 C/C++ part.")
81    (license x11)
82    (home-page "http://site.icu-project.org/")))
84 (define-public java-icu4j
85   (package
86     (name "java-icu4j")
87     (version "59.1")
88     (source (origin
89               (method url-fetch)
90               (uri (string-append "http://download.icu-project.org/files/icu4j/"
91                                   version "/icu4j-"
92                                   (string-map (lambda (x)
93                                                 (if (char=? x #\.) #\_ x))
94                                               version)
95                                   "-src.jar"))
96               (sha256
97                (base32
98                 "0bgxsvgi0qcwj60pvcxrf7a3fbk7aksyxnfwpbzavyfrfzixqh0c"))))
99     (build-system ant-build-system)
100     (arguments
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")
105     (description
106      "ICU is a set of C/C++ and Java libraries providing Unicode and
107 globalisation support for software applications.  This package contains the
108 Java part.")
109     (license x11)))