From c5cc85c519df65596eb668b3f849b0548d3baf9a Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 12 Apr 2016 15:46:58 +0200 Subject: [PATCH 06/10] gnu: Add libiconv. * gnu/packages/base.scm (libiconv): New variable. (libiconv-if-needed): New function. --- gnu/packages/base.scm | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index e662827..aaccf28 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2014 Alex Kost ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis ;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016 Jan Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,7 +25,7 @@ (define-module (gnu packages base) #:use-module ((guix licenses) - #:select (gpl3+ lgpl2.0+ public-domain)) + #:select (gpl3+ lgpl2.0+ lgpl3+ public-domain)) #:use-module (gnu packages) #:use-module (gnu packages acl) #:use-module (gnu packages bash) @@ -43,7 +44,9 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) - #:use-module (guix build-system trivial)) + #:use-module (guix build-system trivial) + #:export (glibc + libiconv-if-needed)) ;;; Commentary: ;;; @@ -940,6 +943,32 @@ reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight-saving rules.") (license public-domain))) +(define-public libiconv + (package + (name "libiconv") + (version "1.14") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://gnu/libiconv/libiconv-" + version ".tar.gz")) + (sha256 + (base32 + "04q6lgl3kglmmhw59igq1n7v3rp1rpkypl366cy1k1yn2znlvckj")))) + (build-system gnu-build-system) + (synopsis "Character set conversion library") + (description + "libiconv provides an implementation of the iconv function for systems +that lack it. iconv is used to convert between character encodings in a +program. It supports a wide variety of different encodings.") + (home-page "http://www.gnu.org/software/libiconv/") + (license lgpl3+))) + +(define* (libiconv-if-needed #:optional (target (%current-target-system))) + (if (mingw-target? target) + `(("libiconv" ,libiconv)) + '())) + (define-public (canonical-package package) ;; Avoid circular dependency by lazily resolving 'commencement'. (let* ((iface (resolve-interface '(gnu packages commencement))) -- 2.7.3