1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
34 (uri (string-append "http://download.icu-project.org/files/icu4c/"
37 (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
40 (base32 "0a4sg9w054640zncb13lhrcjqn7yg1qilwd1mczc4w60maslz9vg"))
41 (patches (list (search-patch "icu4c-test-date-format.patch")))))
42 (build-system gnu-build-system)
44 `(("patchelf" ,patchelf)
47 `(#:modules ((guix build gnu-build-system)
51 #:imported-modules ((guix build gnu-build-system)
56 'unpack 'chdir-to-source
57 (lambda _ (chdir "source"))
59 'configure 'patch-configure
61 ;; patch out two occurrences of /bin/sh from configure script
62 ;; that might have disappeared in a release later than 52.1
63 (substitute* "configure"
65 (string-append "`" (which "bash")))))
67 'strip 'add-lib-to-runpath
68 (lambda* (#:key outputs #:allow-other-keys)
69 (let* ((out (assoc-ref outputs "out"))
70 (lib (string-append out "/lib")))
71 ;; Add LIB to the RUNPATH of all the libraries.
72 (with-directory-excursion out
73 (for-each (cut augment-rpath <> lib)
74 (find-files "lib" ".*")))))
76 (synopsis "ICU, 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/")))