diff mbox

[06b/10] gnu: Add function libiconv-if-needed.

Message ID 87shxzkrla.fsf_-_@drakenvlieg.flower
State New
Headers show

Commit Message

Jan Nieuwenhuizen May 3, 2016, 4:56 p.m. UTC
Ludovic Court├Ęs writes:

And the second part
Greetings,
Jan
diff mbox

Patch

From 9c00010dede03a2b59c5c18c25749bf14e6c9c10 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 3 May 2016 18:49:33 +0200
Subject: [PATCH 6b/10] gnu: Add function libiconv-if-needed.

* gnu/packages/base.scm (libiconv-if-needed): New function.
---
 gnu/packages/base.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 3819ecc..34dac61 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -959,6 +959,11 @@  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