From a68112268b45c0431deaad1435b0e4abfecf7ec1 Mon Sep 17 00:00:00 2001
From: jbu <pullmoll@t-online.de>
Date: Mon, 1 Jun 2015 03:34:53 +0200
Subject: [PATCH] evolution-data-server: make it build with musl

+ Add a common/environment/configure/autoconf_cache/musl-linux entry for iconv
+ Add a patch to define ICONV_10646 in case it is not defined
---
 .../configure/autoconf_cache/musl-linux            |  2 ++
 .../patches/iconv_10646.patch                      | 14 ++++++++++++++
 srcpkgs/evolution-data-server/template             |  2 +-
 3 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/evolution-data-server/patches/iconv_10646.patch

diff --git a/common/environment/configure/autoconf_cache/musl-linux b/common/environment/configure/autoconf_cache/musl-linux
index b5fdb4cd1d3..4ef3677b637 100644
--- a/common/environment/configure/autoconf_cache/musl-linux
+++ b/common/environment/configure/autoconf_cache/musl-linux
@@ -4,3 +4,5 @@ gt_cv_func_gnugettext1_libc=yes
 gt_cv_func_gnugettext2_libc=yes
 gt_cv_func_gnugettext3_libc=yes
 ac_cv_sys_file_offset_bits=64
+# Force detection of musl's iconv
+ac_cv_libiconv_utf8=yes
diff --git a/srcpkgs/evolution-data-server/patches/iconv_10646.patch b/srcpkgs/evolution-data-server/patches/iconv_10646.patch
new file mode 100644
index 00000000000..1f42bdf5f3d
--- /dev/null
+++ b/srcpkgs/evolution-data-server/patches/iconv_10646.patch
@@ -0,0 +1,14 @@
+Add a definition for ICONV_10646 in case it's missing
+
+--- camel/camel-iconv.h	2014-03-24 10:07:52.000000000 +0100
++++ camel/camel-iconv.h	2015-06-01 08:41:44.271620227 +0200
+@@ -28,6 +28,9 @@
+ #include <sys/types.h>
+ #include <iconv.h>
+ #include <glib.h>
++#ifndef ICONV_10646
++#define ICONV_10646 "iso-10646"
++#endif
+ 
+ G_BEGIN_DECLS
+ 
diff --git a/srcpkgs/evolution-data-server/template b/srcpkgs/evolution-data-server/template
index 018105f3e50..6b0199e5aa1 100644
--- a/srcpkgs/evolution-data-server/template
+++ b/srcpkgs/evolution-data-server/template
@@ -1,7 +1,7 @@
 # Template file for 'evolution-data-server'
 pkgname=evolution-data-server
 version=3.12.11
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-openldap --disable-uoa
  --with-krb5=/usr --with-nspr-includes=/usr/include/nspr