[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/11] gnu: Add function libiconv-if-needed.
From: |
Jan Nieuwenhuizen |
Subject: |
Re: [PATCH 03/11] gnu: Add function libiconv-if-needed. |
Date: |
Sat, 14 May 2016 22:27:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Andy Wingo writes:
>> +(define* (libiconv-if-needed #:optional (target (%current-target-system)))
>> + (if (mingw-target? target)
>> + `(("libiconv" ,libiconv))
>> + '()))
>> +
>
> Needs a docstring, please. Thanks :)
How is this?
(define* (libiconv-if-needed #:optional (target (%current-target-system)))
"Return either a libiconv package specification to include in a dependency
list for platforms that have an incomplete libc, or the empty list. If a
package needs iconv ,@(libiconv-if-needed) should be added."
;; POSIX C libraries provide iconv. Platforms with an incomplete libc
;; without iconv, such as MinGW, must return the then clause.
(if (mingw-target? target)
`(("libiconv" ,libiconv))
'()))
Greetings, Jan
>From a1ee6d5a33a9bd32828d9c8534b50f709c27b11a Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <address@hidden>
Date: Tue, 3 May 2016 18:49:33 +0200
Subject: [PATCH 03/11] gnu: Add function libiconv-if-needed.
* gnu/packages/base.scm (libiconv-if-needed): New function.
---
gnu/packages/base.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index beb689e..35e37e0 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -44,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:
;;;
@@ -964,6 +965,16 @@ 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)))
+ "Return either a libiconv package specification to include in a dependency
+list for platforms that have an incomplete libc, or the empty list. If a
+package needs iconv ,@(libiconv-if-needed) should be added."
+ ;; POSIX C libraries provide iconv. Platforms with an incomplete libc
+ ;; without iconv, such as MinGW, must return the then clause.
+ (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
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.nl
- Re: [PATCH 02/11] gnu: cross-build: i686-w64-mingw32: new cross target., (continued)
- Re: [PATCH 02/11] gnu: cross-build: i686-w64-mingw32: new cross target., Andy Wingo, 2016/05/09
- Re: [PATCH 02/11] gnu: cross-build: i686-w64-mingw32: new cross target., Jan Nieuwenhuizen, 2016/05/14
- Re: [PATCH 02/11] gnu: cross-build: i686-w64-mingw32: new cross target., Andy Wingo, 2016/05/17
- Re: [PATCH 02/11] gnu: cross-build: i686-w64-mingw32: new cross target., Jan Nieuwenhuizen, 2016/05/17
- Re: [PATCH 02/11] gnu: cross-build: i686-w64-mingw32: new cross target., Andy Wingo, 2016/05/18
- Re: [PATCH 02/11] gnu: cross-build: i686-w64-mingw32: new cross target., Jan Nieuwenhuizen, 2016/05/19
[PATCH 06/11] gnu: ncurses: support mingw., Jan Nieuwenhuizen, 2016/05/08
[PATCH 03/11] gnu: Add function libiconv-if-needed., Jan Nieuwenhuizen, 2016/05/08
[PATCH 07/11] gnu: cross-base: Add cross-libtool., Jan Nieuwenhuizen, 2016/05/08
[PATCH 10/11] gnu: readline: support mingw., Jan Nieuwenhuizen, 2016/05/08
[PATCH 09/11] gnu: ncurses: build mingw with libtool., Jan Nieuwenhuizen, 2016/05/08
[PATCH 08/11] gnu: libtool: support cross-libtool mingw., Jan Nieuwenhuizen, 2016/05/08