| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 |
|
| 26 | (define-module (gnu packages libunistring)
|
| 27 | #:use-module (guix licenses)
|
| 28 | #:use-module (guix packages)
|
| 29 | #:use-module (guix download)
|
| 30 | #:use-module (guix gexp)
|
| 31 | #:use-module (guix build-system gnu)
|
| 32 | #:use-module (guix utils)
|
| 33 | #:use-module (gnu packages)
|
| 34 | #:use-module (gnu packages base))
|
| 35 |
|
| 36 | (define-public libunistring
|
| 37 | (package
|
| 38 | (name "libunistring")
|
| 39 | (version "1.3")
|
| 40 | (source (origin
|
| 41 | (method url-fetch)
|
| 42 | (uri (string-append
|
| 43 | "mirror://gnu/libunistring/libunistring-"
|
| 44 | version ".tar.xz"))
|
| 45 | (sha256
|
| 46 | (base32
|
| 47 | "09wmas38i9fw7l3sv92xkbvy7idcl76ifhzv7l7ia98xhdn7higj"))))
|
| 48 | (propagated-inputs (libiconv-if-needed))
|
| 49 | (outputs '("out" "static"))
|
| 50 | (build-system gnu-build-system)
|
| 51 | (arguments
|
| 52 | |
| 53 | |
| 54 | |
| 55 | (list
|
| 56 | #:parallel-build? #f
|
| 57 | #:phases
|
| 58 | #~(modify-phases %standard-phases
|
| 59 | (add-after 'install 'move-static-library
|
| 60 | (lambda* (#:key outputs #:allow-other-keys)
|
| 61 | (with-directory-excursion (string-append #$output "/lib")
|
| 62 | (install-file "libunistring.a"
|
| 63 | (string-append #$output:static "/lib"))
|
| 64 | (delete-file "libunistring.a"))))
|
| 65 | #$@(if (target-mingw?)
|
| 66 | #~((add-after 'unpack 'patch-tests/nanosleep.c
|
| 67 | (lambda _
|
| 68 | (substitute* "tests/nanosleep.c"
|
| 69 | (("# define WIN32_LEAN_AND_MEAN" all)
|
| 70 | (string-append "#define nanosleep nanosleep_native\n"
|
| 71 | all))))))
|
| 72 | #~()))))
|
| 73 | (synopsis "C library for manipulating Unicode strings")
|
| 74 | (description
|
| 75 | "GNU libunistring is a library providing functions to manipulate
|
| 76 | Unicode strings and for manipulating C strings according to the Unicode
|
| 77 | standard.")
|
| 78 | (home-page "https://www.gnu.org/software/libunistring/")
|
| 79 | (license (list lgpl3+ gpl2+))))
|