gnu: Add elfutils.
[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)
a2270ce2 21 #:use-module (gnu packages patchelf)
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")
31 (version "50.1.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 "13yz0kk6zsgj94idnlr3vbg8iph5z4ly4b4xrd5wfja7q3ijdx56"))))
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
4c9e7975
AE
54 (alist-replace
55 'unpack
56 (lambda* (#:key source #:allow-other-keys)
57 (and (zero? (system* "tar" "xvf" source))
58 (chdir "icu/source")))
59 (alist-replace
60 'configure
61 (lambda* (#:key #:allow-other-keys #:rest args)
62 (let ((configure (assoc-ref %standard-phases 'configure)))
63 ;; patch out two occurrences of /bin/sh from configure script
64 ;; that might have disappeared in a release later than 50.1.1
65 (substitute* "configure"
66 (("`/bin/sh")
67 (string-append "`" (which "bash"))))
68 (apply configure args)))
a2270ce2
AE
69 (alist-cons-after
70 'strip 'add-lib-to-runpath
71 (lambda* (#:key outputs #:allow-other-keys)
72 (let* ((out (assoc-ref outputs "out"))
73 (lib (string-append out "/lib")))
74 ;; Add LIB to the RUNPATH of all the libraries.
75 (with-directory-excursion out
76 (for-each (cut augment-rpath <> lib)
77 (find-files "lib" ".*")))))
78 %standard-phases)))))
4c9e7975
AE
79 (synopsis "ICU, International Components for Unicode")
80 (description
81 "ICU is a set of C/C++ and Java libraries providing Unicode and
82globalisation support for software applications. This package contains the
83C/C++ part.")
84 (license x11)
85 (home-page "http://site.icu-project.org/")))