You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

86 lines
3.3 KiB

  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. (define-module (gnu packages icu4c)
  19. #:use-module (gnu packages)
  20. #:use-module (gnu packages patchelf)
  21. #:use-module (gnu packages perl)
  22. #:use-module (guix licenses)
  23. #:use-module (guix packages)
  24. #:use-module (guix download)
  25. #:use-module (guix build-system gnu))
  26. (define-public icu4c
  27. (package
  28. (name "icu4c")
  29. (version "50.1.1")
  30. (source (origin
  31. (method url-fetch)
  32. (uri (string-append "http://download.icu-project.org/files/icu4c/"
  33. version
  34. "/icu4c-"
  35. (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
  36. "-src.tgz"))
  37. (sha256 (base32
  38. "13yz0kk6zsgj94idnlr3vbg8iph5z4ly4b4xrd5wfja7q3ijdx56"))))
  39. (build-system gnu-build-system)
  40. (inputs
  41. `(("patchelf" ,patchelf)
  42. ("perl" ,perl)))
  43. (arguments
  44. `(#:modules ((guix build gnu-build-system)
  45. (guix build utils)
  46. (guix build rpath)
  47. (srfi srfi-26))
  48. #:imported-modules ((guix build gnu-build-system)
  49. (guix build utils)
  50. (guix build rpath))
  51. #:phases
  52. (alist-replace
  53. 'unpack
  54. (lambda* (#:key source #:allow-other-keys)
  55. (and (zero? (system* "tar" "xvf" source))
  56. (chdir "icu/source")))
  57. (alist-replace
  58. 'configure
  59. (lambda* (#:key #:allow-other-keys #:rest args)
  60. (let ((configure (assoc-ref %standard-phases 'configure)))
  61. ;; patch out two occurrences of /bin/sh from configure script
  62. ;; that might have disappeared in a release later than 50.1.1
  63. (substitute* "configure"
  64. (("`/bin/sh")
  65. (string-append "`" (which "bash"))))
  66. (apply configure args)))
  67. (alist-cons-after
  68. 'strip 'add-lib-to-runpath
  69. (lambda* (#:key outputs #:allow-other-keys)
  70. (let* ((out (assoc-ref outputs "out"))
  71. (lib (string-append out "/lib")))
  72. ;; Add LIB to the RUNPATH of all the libraries.
  73. (with-directory-excursion out
  74. (for-each (cut augment-rpath <> lib)
  75. (find-files "lib" ".*")))))
  76. %standard-phases)))))
  77. (synopsis "ICU, International Components for Unicode")
  78. (description
  79. "ICU is a set of C/C++ and Java libraries providing Unicode and
  80. globalisation support for software applications. This package contains the
  81. C/C++ part.")
  82. (license x11)
  83. (home-page "http://site.icu-project.org/")))