summary refs log tree commit diff
path: root/gnu/packages/textutils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-05-23 14:55:44 +0200
committerLudovic Courtès <ludo@gnu.org>2016-05-23 15:02:26 +0200
commitbc73a84398fa54b0a11a80c749bf78eb0a58dbe6 (patch)
tree3e7b6670989ceb4f31464bad632c0332121d96a0 /gnu/packages/textutils.scm
parent12b6f6527e49c8c4191929a72b1692dbd9eb2440 (diff)
parent624d4e2e6ba402c374a340869306eec65a808a20 (diff)
downloadguix-bc73a84398fa54b0a11a80c749bf78eb0a58dbe6.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/textutils.scm')
-rw-r--r--gnu/packages/textutils.scm44
1 files changed, 43 insertions, 1 deletions
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index f6735a43e0..080c95ba1c 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2015 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
+;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,8 +28,10 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages autotools)
-  #:use-module (gnu packages python))
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages zip))
 
 (define-public recode
   (package
@@ -328,3 +331,42 @@ name comes from: \"The antidote against people who send Microsoft Word files
 to everybody, because they believe that everybody runs Windows and therefore
 runs Word\".")
     (license license:gpl2+)))
+
+(define-public utfcpp
+  (package
+    (name "utfcpp")
+    (version "2.3.4")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "mirror://sourceforge/project/utfcpp/utf8cpp_2x/Release%20"
+                version "/utf8_v"
+                (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
+                ".zip"))
+              (file-name (string-append name "-" version ".zip"))
+              (sha256
+               (base32
+                "1vqhs0aipcvvdrwcs7h3jsryg6mgbmc4s34n5cm6d36q4nxwwwrk"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((source (assoc-ref %build-inputs "source"))
+               (out    (assoc-ref %outputs "out"))
+               (unzip  (string-append (assoc-ref %build-inputs "unzip")
+                                      "/bin/unzip")))
+           (mkdir-p out)
+           (with-directory-excursion out
+             (system* unzip source)
+             (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")
+    (synopsis "Portable C++ library for handling UTF-8")
+    (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
+in a portable way.")
+    (license license:boost1.0)))