guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#52789] [PATCH 1/3] gnu: Add libunibreak.


From: Felix Gruber
Subject: [bug#52789] [PATCH 1/3] gnu: Add libunibreak.
Date: Sat, 25 Dec 2021 13:37:04 +0000

* gnu/packages/unicode.scm (libunibreak): New variable.
---
 gnu/packages/unicode.scm | 48 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/unicode.scm b/gnu/packages/unicode.scm
index 806fe05fb6..a5216a38dd 100644
--- a/gnu/packages/unicode.scm
+++ b/gnu/packages/unicode.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,13 +19,60 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages unicode)
+  #:use-module (gnu packages autotools)
+  #:use-module (guix git-download)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
   #:use-module (guix build-system copy)
+  #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial))
 
+(define-public libunibreak
+  (package
+    (name "libunibreak")
+    (version "4.2-1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/adah1972/libunibreak";)
+                    (commit (string-append "libunibreak_"
+                              (string-replace-substring version "." "_")))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "182327vv2bqn5pr7v2ain0j4f2q97fvgimyv08vj66bqkxmhm7a3"))))
+    (build-system gnu-build-system)
+    (native-inputs
+      (list autoconf-wrapper
+            automake
+            libtool
+            ucd ; required for tests
+            ))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+           (lambda* (#:key inputs #:allow-other-keys)
+             (for-each (lambda (file)
+                         (copy-file
+                           (search-input-file inputs
+                             (string-append "/share/ucd/auxiliary/"
+                                            file))
+                           (string-append "src/" file)))
+                       '("LineBreakTest.txt"
+                         "WordBreakTest.txt"
+                         "GraphemeBreakTest.txt")))))))
+    (home-page "http://vimgadgets.sourceforge.net/libunibreak/";)
+    (synopsis "Unicode line breaking and word breaking algorithms")
+    (description
+     "Libunibreak is an implementation of the line breaking and word
+breaking algorithms as described in Unicode Standard Annex 14 and
+Unicode Standard Annex 29.  It is designed to be used in a generic text
+renderer.")
+    (license zlib)))
+
 (define-public ucd
   (package
     (name "ucd")
-- 
2.30.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]