libunistring.scm 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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, 2022 Efraim Flashner <efraim@flashner.co.il>
  5. ;;; Copyright © 2016, 2023 Janneke 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 gexp)
  30. #:use-module (guix utils)
  31. #:use-module (guix build-system gnu)
  32. #:use-module (gnu packages)
  33. #:use-module (gnu packages base))
  34. (define-public libunistring
  35. (package
  36. (name "libunistring")
  37. (version "1.0")
  38. (source (origin
  39. (method url-fetch)
  40. (uri (string-append
  41. "mirror://gnu/libunistring/libunistring-"
  42. version ".tar.xz"))
  43. (sha256
  44. (base32
  45. "0h97qx3c4970wvh25g51sjgz54xn37lrfy95dg97xmvmkys5basv"))))
  46. (propagated-inputs (libiconv-if-needed))
  47. (outputs '("out" "static"))
  48. (build-system gnu-build-system)
  49. (arguments
  50. ;; Work around parallel build issue whereby C files may be compiled before
  51. ;; config.h is built: see <http://hydra.gnu.org/build/59381/nixlog/2/raw> and
  52. ;; <http://lists.openembedded.org/pipermail/openembedded-core/2012-April/059850.html>.
  53. (list
  54. #:parallel-build? #f
  55. #:phases
  56. #~(modify-phases %standard-phases
  57. (add-after 'install 'move-static-library
  58. (lambda* (#:key outputs #:allow-other-keys)
  59. (with-directory-excursion (string-append #$output "/lib")
  60. (install-file "libunistring.a"
  61. (string-append #$output:static "/lib"))
  62. (delete-file "libunistring.a")))))
  63. #:make-flags (if (target-hurd?)
  64. #~(list "XFAIL_TESTS=test-perror2 test-strerror_r")
  65. #~'())))
  66. (synopsis "C library for manipulating Unicode strings")
  67. (description
  68. "GNU libunistring is a library providing functions to manipulate
  69. Unicode strings and for manipulating C strings according to the Unicode
  70. standard.")
  71. (home-page "https://www.gnu.org/software/libunistring/")
  72. (license (list lgpl3+ gpl2+))))