Commit | Line | Data |
---|---|---|
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") | |
625bd408 | 31 | (version "52.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")) | |
39 | (sha256 (base32 | |
eb705bb3 LC |
40 | "14l0kl17nirc34frcybzg0snknaks23abhdxkmsqg3k9sil5wk9g"))) |
41 | (patches (list (search-patch "icu4c-test-date-format.patch")))) | |
4c9e7975 | 42 | (build-system gnu-build-system) |
a2270ce2 AE |
43 | (inputs |
44 | `(("patchelf" ,patchelf) | |
45 | ("perl" ,perl))) | |
4c9e7975 | 46 | (arguments |
a2270ce2 AE |
47 | `(#:modules ((guix build gnu-build-system) |
48 | (guix build utils) | |
49 | (guix build rpath) | |
50 | (srfi srfi-26)) | |
51 | #:imported-modules ((guix build gnu-build-system) | |
52 | (guix build utils) | |
53 | (guix build rpath)) | |
54 | #:phases | |
d4bf49b1 EB |
55 | (alist-cons-after |
56 | 'unpack 'chdir-to-source | |
57 | (lambda _ (chdir "source")) | |
58 | (alist-cons-before | |
59 | 'configure 'patch-configure | |
60 | (lambda _ | |
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" | |
64 | (("`/bin/sh") | |
65 | (string-append "`" (which "bash"))))) | |
a2270ce2 AE |
66 | (alist-cons-after |
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" ".*"))))) | |
75 | %standard-phases))))) | |
4c9e7975 AE |
76 | (synopsis "ICU, 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/"))) |