From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: [PATCH 12/13] gnu: Add libutf. Date: Thu, 12 Jan 2017 00:39:33 +0000 Message-ID: <20170112003934.3924-13-ng0@libertad.pw> References: <20170110000346.GG17253@jasmine> <20170112003934.3924-1-ng0@libertad.pw> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRTQ5-0002r8-55 for guix-devel@gnu.org; Wed, 11 Jan 2017 19:39:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRTQ2-0002EL-18 for guix-devel@gnu.org; Wed, 11 Jan 2017 19:39:09 -0500 Received: from aibo.runbox.com ([91.220.196.211]:55767) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRTQ1-0002DZ-PZ for guix-devel@gnu.org; Wed, 11 Jan 2017 19:39:05 -0500 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1cRTPz-0002dr-H9 for guix-devel@gnu.org; Thu, 12 Jan 2017 01:39:04 +0100 In-Reply-To: <20170112003934.3924-1-ng0@libertad.pw> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/suckless.scm (libutf): New variable. --- gnu/packages/suckless.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm index 056487baf..c95119b21 100644 --- a/gnu/packages/suckless.scm +++ b/gnu/packages/suckless.scm @@ -42,7 +42,8 @@ #:use-module (gnu packages linux) #:use-module (gnu packages compression) #:use-module (gnu packages cups) - #:use-module (gnu packages ncurses)) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages gawk)) (define-public dwm (package @@ -574,3 +575,51 @@ initially intended to be used on musl based Linux distributions. strings(1) but for pictures. For a given input file it outputs a colormap to stdout.") (license license:isc))) + +;; No new releases were made at github, this repository is more active than +;; the one at http://git.suckless.org/libutf/ and it is +;; done by the same developer. +(define-public libutf + (let ((revision "1") + (commit "ff4c60635e1f455b0a0b4200f8183fbd5a88225b")) + (package + (name "libutf") + (version (string-append "0.0.0-" revision "." (string-take commit 7))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cls/libutf") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1ih5vjavilzggyr1j1z6w1z12c2fs5fg77cfnv7ami5ivsy3kg3d")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; No tests + #:make-flags (list "CC=gcc" + (string-append "PREFIX=" %output)) + #:phases + (modify-phases %standard-phases + (delete 'configure)))) ; No configure script + (inputs + `(("gawk" ,gawk))) + (home-page "https://github.com/cls/libutf") + (synopsis "Plan 9 compatible UTF-8 library") + (description + "This is a C89 UTF-8 library, with an API compatible with that of +Plan 9's libutf, but with a number of improvements: + +@itemize +@item Support for runes beyond the Basic Multilingual Plane. +@item utflen and utfnlen cannot overflow on 32- or 64-bit machines. +@item chartorune treats all invalid codepoints as though Runeerror. +@item fullrune, utfecpy, and utfnlen do not overestimate the length +of malformed runes. +@item An extra function, charntorune(p,s,n), equivalent to +fullrune(s,n) ? chartorune(p,s): 0. +@item Runeerror may be set to an alternative replacement value, such +as -1, to be used instead of U+FFFD. +@end itemize\n") + (license license:expat)))) -- 2.11.0