Archived
1
0
Fork 0

gnu: utfcpp: Update to 2.3.5.

* gnu/packages/textutils.scm (utfcpp): Update to 2.3.5.
[source]: Download tarball from new location.
[build-system]: Switch to cmake-build-system.
[arguments]: Use it, with custom ‘install’ phase.
[native-inputs]: Remove unzip.
This commit is contained in:
Tobias Geerinckx-Rice 2018-01-10 02:50:54 +01:00
parent f6e2d86f8e
commit f9c84cd495
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -13,6 +13,7 @@
;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net> ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -37,7 +38,6 @@
#:use-module (guix build-system ant) #:use-module (guix build-system ant)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
#:use-module (guix build-system trivial)
#:use-module (guix build-system python) #:use-module (guix build-system python)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages autotools) #:use-module (gnu packages autotools)
@ -452,36 +452,29 @@ spreadsheets and outputs it in comma-separated-value format, and
(define-public utfcpp (define-public utfcpp
(package (package
(name "utfcpp") (name "utfcpp")
(version "2.3.4") (version "2.3.5")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (uri
(string-append (string-append "https://github.com/nemtrif/utfcpp/archive/v"
"mirror://sourceforge/utfcpp/utf8cpp_2x/Release%20" version ".tar.gz"))
version "/utf8_v" (file-name (string-append name "-" version ".tar.gz"))
(string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
".zip"))
(file-name (string-append name "-" version ".zip"))
(sha256 (sha256
(base32 (base32
"1vqhs0aipcvvdrwcs7h3jsryg6mgbmc4s34n5cm6d36q4nxwwwrk")))) "0gcqcfw19kfim8xw29xdp91l310yfjyrqdj2zsx8xx02dkpy1zzk"))))
(build-system trivial-build-system) (build-system cmake-build-system)
(arguments (arguments
`(#:modules ((guix build utils)) `(#:out-of-source? #f
#:builder #:phases
(begin (modify-phases %standard-phases
(use-modules (guix build utils)) (replace 'install ; no install target
(let ((source (assoc-ref %build-inputs "source")) (lambda* (#:key outputs #:allow-other-keys)
(out (assoc-ref %outputs "out")) (let* ((out (assoc-ref outputs "out"))
(unzip (string-append (assoc-ref %build-inputs "unzip") (include (string-append out "/include"))
"/bin/unzip"))) (doc (string-append out "/share/doc/" ,name)))
(mkdir-p out) (copy-recursively "source" include)
(with-directory-excursion out (install-file "README.md" doc)
(system* unzip source) #t))))))
(mkdir-p "share/doc")
(rename-file "doc" "share/doc/utfcpp")
(rename-file "source" "include"))))))
(native-inputs `(("unzip" ,unzip)))
(home-page "https://github.com/nemtrif/utfcpp") (home-page "https://github.com/nemtrif/utfcpp")
(synopsis "Portable C++ library for handling UTF-8") (synopsis "Portable C++ library for handling UTF-8")
(description "UTF8-CPP is a C++ library for handling UTF-8 encoded text (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text