gnu: qemu: Remove dependency on Samba.
[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 ;;;
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
19 (define-module (gnu packages icu4c)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages elf)
22 #:use-module (gnu packages perl)
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")
31 (version "52.1")
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"))
39 (sha256 (base32
40 "14l0kl17nirc34frcybzg0snknaks23abhdxkmsqg3k9sil5wk9g"))))
41 (build-system gnu-build-system)
42 (inputs
43 `(("patchelf" ,patchelf)
44 ("perl" ,perl)))
45 (arguments
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
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
61 ;; that might have disappeared in a release later than 52.1
62 (substitute* "configure"
63 (("`/bin/sh")
64 (string-append "`" (which "bash")))))
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")))
70 ;; Add LIB to the RUNPATH of all the libraries.
71 (with-directory-excursion out
72 (for-each (cut augment-rpath <> lib)
73 (find-files "lib" ".*")))))
74 %standard-phases)))))
75 (synopsis "ICU, International Components for Unicode")
76 (description
77 "ICU is a set of C/C++ and Java libraries providing Unicode and
78 globalisation support for software applications. This package contains the
79 C/C++ part.")
80 (license x11)
81 (home-page "http://site.icu-project.org/")))