unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Manolis Ragkousis <manolis837@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 06/10] gnu: Add libiconv.
Date: Sun, 01 May 2016 20:27:58 +0200	[thread overview]
Message-ID: <87h9ehy6oh.fsf@drakenvlieg.flower> (raw)
In-Reply-To: <9b320678-3af9-22c5-ead5-23126e43f57c@gmail.com> (Manolis Ragkousis's message of "Sun, 1 May 2016 20:07:56 +0300")

[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]

Manolis Ragkousis writes:

> Καλησπέρα 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 !glibc
+   (propagated-inputs `(,@(libiconv-if-needed)))

as libunistring depends on iconv.

Greetings,
Jan


[-- Attachment #2: 0006-gnu-Add-libiconv.patch --]
[-- Type: text/x-diff, Size: 2804 bytes --]

From c04fb3f9ae21c49a5925d7cc767dd558273c4082 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
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 © 2014 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; 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,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))
 
 ;;; Commentary:
 ;;;
@@ -936,6 +938,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


[-- Attachment #3: Type: text/plain, Size: 154 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

  parent reply	other threads:[~2016-05-01 18:28 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29 15:12 [PATCH 01/10] gnu: cross: Use CROSS_*_INCLUDE_PATH for system headers Jan Nieuwenhuizen
2016-04-29 15:12 ` [PATCH 02/10] gnu: bootstrap: Add i686-mingw Jan Nieuwenhuizen
2016-04-29 15:34   ` Manolis Ragkousis
2016-04-29 18:28     ` Jan Nieuwenhuizen
2016-05-01 11:02       ` Manolis Ragkousis
2016-04-29 15:12 ` [PATCH 03/10] gnu: Add mingw-w64 Jan Nieuwenhuizen
2016-04-29 15:12 ` [PATCH 04/10] gnu: cross-build: i686-w64-mingw32: new cross target Jan Nieuwenhuizen
2016-05-02  8:06   ` Andy Wingo
2016-05-02 18:34     ` Jan Nieuwenhuizen
2016-04-29 15:12 ` [PATCH 05/10] gnu: gmp: build shared library for mingw Jan Nieuwenhuizen
2016-04-29 15:12 ` [PATCH 06/10] gnu: Add libiconv Jan Nieuwenhuizen
2016-05-01 17:07   ` Manolis Ragkousis
2016-05-01 17:43     ` John Darrington
2016-05-01 18:58       ` Jan Nieuwenhuizen
2016-05-01 19:07         ` John Darrington
2016-05-03 12:19         ` Ludovic Courtès
2016-05-01 18:27     ` Jan Nieuwenhuizen [this message]
2016-05-03 12:20     ` Ludovic Courtès
2016-05-03 16:55       ` [PATCH 06a/10] " Jan Nieuwenhuizen
2016-05-05 14:56         ` Ludovic Courtès
2016-05-03 16:56       ` [PATCH 06b/10] gnu: Add function libiconv-if-needed Jan Nieuwenhuizen
2016-04-29 15:12 ` [PATCH 07/10] gnu: ncurses: support mingw Jan Nieuwenhuizen
2016-05-02  8:09   ` Andy Wingo
2016-05-02 18:41     ` Jan Nieuwenhuizen
2016-04-29 15:12 ` [PATCH 08/10] gnu: readline: " Jan Nieuwenhuizen
2016-05-02  8:12   ` Andy Wingo
2016-05-02 18:52     ` Jan Nieuwenhuizen
2016-05-02 19:25     ` Jan Nieuwenhuizen
2016-04-29 15:12 ` [PATCH 09/10] gnu: libunistring: support mingw: propagate libiconv if needed Jan Nieuwenhuizen
2016-04-29 15:12 ` [PATCH 10/10] gnu: guile-2.0: support mingw Jan Nieuwenhuizen
2016-05-02  8:04 ` [PATCH 01/10] gnu: cross: Use CROSS_*_INCLUDE_PATH for system headers Andy Wingo
2016-05-02 17:59   ` Jan Nieuwenhuizen
2016-05-03 12:06   ` Ludovic Courtès
2016-05-03 13:27     ` Andy Wingo
2016-05-03 12:16 ` Ludovic Courtès
2016-05-14  5:29 ` Mark H Weaver
2016-05-14  6:37   ` Jan Nieuwenhuizen
2016-05-14  8:25     ` FIXUP: " Jan Nieuwenhuizen
2016-05-14 20:05       ` Ludovic Courtès
2016-05-14 20:50         ` Jan Nieuwenhuizen
2016-05-16 21:02           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9ehy6oh.fsf@drakenvlieg.flower \
    --to=janneke@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=manolis837@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).