libunistring.scm 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
  5. ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
  6. ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
  7. ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
  8. ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  9. ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
  10. ;;;
  11. ;;; This file is part of GNU Guix.
  12. ;;;
  13. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  14. ;;; under the terms of the GNU General Public License as published by
  15. ;;; the Free Software Foundation; either version 3 of the License, or (at
  16. ;;; your option) any later version.
  17. ;;;
  18. ;;; GNU Guix is distributed in the hope that it will be useful, but
  19. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. ;;; GNU General Public License for more details.
  22. ;;;
  23. ;;; You should have received a copy of the GNU General Public License
  24. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  25. (define-module (gnu packages libunistring)
  26. #:use-module (guix licenses)
  27. #:use-module (guix packages)
  28. #:use-module (guix download)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (gnu packages)
  31. #:use-module (gnu packages base))
  32. (define-public libunistring
  33. (package
  34. (name "libunistring")
  35. (version "0.9.10")
  36. (source (origin
  37. (method url-fetch)
  38. (uri (string-append
  39. "mirror://gnu/libunistring/libunistring-"
  40. version ".tar.xz"))
  41. (sha256
  42. (base32
  43. "1mq57h06622m6qc5cv347fc3qk5mj840axw3c0vd7qmnwk1v53zb"))))
  44. (propagated-inputs (libiconv-if-needed))
  45. (outputs '("out" "static"))
  46. (build-system gnu-build-system)
  47. (arguments
  48. ;; Work around parallel build issue whereby C files may be compiled before
  49. ;; config.h is built: see <http://hydra.gnu.org/build/59381/nixlog/2/raw> and
  50. ;; <http://lists.openembedded.org/pipermail/openembedded-core/2012-April/059850.html>.
  51. '(#:parallel-build? #f
  52. #:phases (modify-phases %standard-phases
  53. (add-after 'install 'move-static-library
  54. (lambda* (#:key outputs #:allow-other-keys)
  55. (let ((out (assoc-ref outputs "out"))
  56. (static (assoc-ref outputs "static")))
  57. (with-directory-excursion (string-append out "/lib")
  58. (install-file "libunistring.a"
  59. (string-append static "/lib"))
  60. (delete-file "libunistring.a")
  61. #t)))))))
  62. (synopsis "C library for manipulating Unicode strings")
  63. (description
  64. "GNU libunistring is a library providing functions to manipulate
  65. Unicode strings and for manipulating C strings according to the Unicode
  66. standard.")
  67. (home-page "https://www.gnu.org/software/libunistring/")
  68. (license (list lgpl3+ gpl2))))