gnu: gawk: Fix target-system check.
[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>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
1ffa7090 19(define-module (gnu packages icu4c)
59a43334 20 #:use-module (gnu packages)
3e778ad3 21 #:use-module (gnu packages elf)
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")
8c3fc834 31 (version "54.1")
4c9e7975
AE
32 (source (origin
33 (method url-fetch)
34 (uri (string-append "http://download.icu-project.org/files/icu4c/"
35 version
36 "/icu4c-"
37 (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
38 "-src.tgz"))
1319cfe9 39 (sha256
8c3fc834 40 (base32 "1cwapgjmvrcv1n2wjspj3vahidg596gjfp4jn1gcb4baralcjayl"))))
4c9e7975 41 (build-system gnu-build-system)
a2270ce2
AE
42 (inputs
43 `(("patchelf" ,patchelf)
44 ("perl" ,perl)))
4c9e7975 45 (arguments
a2270ce2
AE
46 `(#:modules ((guix build gnu-build-system)
47 (guix build utils)
48 (guix build rpath)
49 (srfi srfi-26))
50 #:imported-modules ((guix build gnu-build-system)
51 (guix build utils)
52 (guix build rpath))
53 #:phases
d4bf49b1
EB
54 (alist-cons-after
55 'unpack 'chdir-to-source
56 (lambda _ (chdir "source"))
57 (alist-cons-before
58 'configure 'patch-configure
59 (lambda _
60 ;; patch out two occurrences of /bin/sh from configure script
8c3fc834 61 ;; that might have disappeared in a release later than 54.1
d4bf49b1
EB
62 (substitute* "configure"
63 (("`/bin/sh")
64 (string-append "`" (which "bash")))))
a2270ce2
AE
65 (alist-cons-after
66 'strip 'add-lib-to-runpath
67 (lambda* (#:key outputs #:allow-other-keys)
68 (let* ((out (assoc-ref outputs "out"))
69 (lib (string-append out "/lib")))
7d09fb34 70 ;; Add LIB to the RUNPATH of all the libraries and binaries.
a2270ce2
AE
71 (with-directory-excursion out
72 (for-each (cut augment-rpath <> lib)
7d09fb34
LC
73 (append (find-files "lib" ".*")
74 (find-files "bin" ".*")
75 (find-files "sbin" ".*"))))))
a2270ce2 76 %standard-phases)))))
35b9e423 77 (synopsis "International Components for Unicode")
4c9e7975
AE
78 (description
79 "ICU is a set of C/C++ and Java libraries providing Unicode and
35b9e423 80globalisation support for software applications. This package contains the
4c9e7975
AE
81C/C++ part.")
82 (license x11)
83 (home-page "http://site.icu-project.org/")))