From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: Re: [PATCH 06/10] gnu: Add libiconv. Date: Sun, 01 May 2016 20:27:58 +0200 Message-ID: <87h9ehy6oh.fsf@drakenvlieg.flower> References: <1461942751-23883-1-git-send-email-janneke@gnu.org> <1461942751-23883-6-git-send-email-janneke@gnu.org> <9b320678-3af9-22c5-ead5-23126e43f57c@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aww6q-0005zm-OB for guix-devel@gnu.org; Sun, 01 May 2016 14:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aww6e-0001iU-O0 for guix-devel@gnu.org; Sun, 01 May 2016 14:28:43 -0400 In-Reply-To: <9b320678-3af9-22c5-ead5-23126e43f57c@gmail.com> (Manolis Ragkousis's message of "Sun, 1 May 2016 20:07:56 +0300") 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: Manolis Ragkousis Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Manolis Ragkousis writes: > =CE=9A=CE=B1=CE=BB=CE=B7=CF=83=CF=80=CE=AD=CF=81=CE=B1 Jan, Goedeavond Manolis, >> + #:export (glibc >> + libiconv-if-needed)) > > The #:export (glibc...) part only exists in wip-hurd so we need to > remove this in order for your patch to apply on master. Ok, changed to #:export (libiconv-if-needed)) >> +(define-public libiconv > Maybe we should break this patch into two different ones, one for the > libiconv package description and one for the libiconv-if-needed. The > first will go to master and the second to core-updates. WDYT? I don't think that's necessary. This patch itself does not change any package. The only thing this patch does is add libiconv, and the convenience function: >> +(define* (libiconv-if-needed #:optional (target (%current-target-system= ))) >> + (if (mingw-target? target) >> + `(("libiconv" ,libiconv)) >> + '())) that can be used by other packages, such as libunistring. See below. As we get more platforms that have libc without iconv, they can be added to the if condition above. > I am sorry for my ignorance but why is libiconv needed when targeting > mingw? Libiconv is character-set translation functionality that's also present in glibc. MinGW is one of those platforms that has a libc without iconv. Some packages, e.g. libunistring, need iconv functionality. Have a look at the 09/10 libunistring patch, it says - (propagated-inputs '()) ; FIXME: add libiconv when !gl= ibc + (propagated-inputs `(,@(libiconv-if-needed))) as libunistring depends on iconv. Greetings, Jan --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0006-gnu-Add-libiconv.patch Content-Transfer-Encoding: quoted-printable >From c04fb3f9ae21c49a5925d7cc767dd558273c4082 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 | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 1c4ebbf..34dac61 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -6,6 +6,7 @@ ;;; Copyright =C2=A9 2014 Alex Kost ;;; Copyright =C2=A9 2014, 2015 Manolis Fragkiskos Ragkousis ;;; Copyright =C2=A9 2016 Efraim Flashner +;;; Copyright =C2=A9 2016 Jan Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,7 +25,7 @@ =20 (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,8 @@ #: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 (libiconv-if-needed)) =20 ;;; Commentary: ;;; @@ -936,6 +938,32 @@ reflect changes made by political bodies to time zone = boundaries, UTC offsets, and daylight-saving rules.") (license public-domain))) =20 +(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))) --=20 2.7.3 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-=--