[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/10: gnu: Add function libiconv-if-needed.
From: |
Ludovic Courtès |
Subject: |
04/10: gnu: Add function libiconv-if-needed. |
Date: |
Wed, 7 Dec 2016 09:23:36 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 4dab8c590650af0e78647e6e13fb9ac772e51db7
Author: Jan Nieuwenhuizen <address@hidden>
Date: Tue May 3 18:49:33 2016 +0200
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 1c01874..8b8134c 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -46,7 +46,8 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (ice-9 match)
- #:export (glibc))
+ #:export (glibc
+ libiconv-if-needed))
;;; Commentary:
;;;
@@ -1032,6 +1033,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 (target-mingw? target)
+ `(("libiconv" ,libiconv))
+ '()))
+
(define-public (canonical-package package)
;; Avoid circular dependency by lazily resolving 'commencement'.
(let* ((iface (resolve-interface '(gnu packages commencement)))
- branch master updated (4908ae4 -> dea9110), Ludovic Courtès, 2016/12/07
- 05/10: gnu: libunistring: support mingw: propagate libiconv if needed., Ludovic Courtès, 2016/12/07
- 10/10: hydra: Add "i686-w64-mingw32" as a cross-compilation target., Ludovic Courtès, 2016/12/07
- 04/10: gnu: Add function libiconv-if-needed.,
Ludovic Courtès <=
- 01/10: doc: Correct example for 'wpa-supplicant-service-type'., Ludovic Courtès, 2016/12/07
- 06/10: gnu: gmp: build shared library for mingw., Ludovic Courtès, 2016/12/07
- 09/10: gnu: guile-2.0: support mingw., Ludovic Courtès, 2016/12/07
- 08/10: gnu: readline: support mingw., Ludovic Courtès, 2016/12/07
- 07/10: gnu: ncurses: support mingw., Ludovic Courtès, 2016/12/07
- 03/10: gnu: cross-base: Add i686-w64-mingw32 target., Ludovic Courtès, 2016/12/07
- 02/10: gnu: Add mingw-w64., Ludovic Courtès, 2016/12/07