From 5f89b61cb44c2599649d1641c621a20b43a0e344 Mon Sep 17 00:00:00 2001
From: jbu <pullmoll@t-online.de>
Date: Tue, 23 Jun 2015 00:26:23 +0200
Subject: [PATCH] kdelibs: unbreak musl

---
 .../kdelibs/patches/musl-_nl_msg_cat_cntr.patch | 17 +++++++++++++++++
 srcpkgs/kdelibs/template                        |  4 ++--
 2 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/kdelibs/patches/musl-_nl_msg_cat_cntr.patch

diff --git a/srcpkgs/kdelibs/patches/musl-_nl_msg_cat_cntr.patch b/srcpkgs/kdelibs/patches/musl-_nl_msg_cat_cntr.patch
new file mode 100644
index 00000000000..c34ec4e94a5
--- /dev/null
+++ b/srcpkgs/kdelibs/patches/musl-_nl_msg_cat_cntr.patch
@@ -0,0 +1,17 @@
+--- kdecore/localization/kcatalog.cpp
++++ kdecore/localization/kcatalog.cpp
+@@ -193,12 +193,14 @@ void KCatalogPrivate::setupGettextEnv ()
+     //kDebug() << "bindtextdomain" << name << localeDir;
+     bindtextdomain(name, localeDir);
+ 
++#if defined(__GLIBC__)
+     // Magic to make sure Gettext doesn't use stale cached translation
+     // from previous language.
+ #ifndef _MSC_VER
+     extern int _nl_msg_cat_cntr;
+ #endif
+     ++_nl_msg_cat_cntr;
++#endif
+   }
+ }
+ 
diff --git a/srcpkgs/kdelibs/template b/srcpkgs/kdelibs/template
index 0303aaffef1..d00c3f4caf6 100644
--- a/srcpkgs/kdelibs/template
+++ b/srcpkgs/kdelibs/template
@@ -1,10 +1,10 @@
 # Template file for 'kdelibs'
 pkgname=kdelibs
 version=4.14.3
-revision=1
+revision=2
 short_desc="KDE core libraries"
 maintainer="Juan RP <xtraeme@voidlinux.eu>"
-license="GPL, LGPL, FDL"
+license="GPL-2.0, LGPL-2.1, FDL"
 homepage="http://www.kde.org"
 distfiles="http://download.kde.org/stable/${version}/src/${pkgname}-${version}.tar.xz"
 checksum=f8206da1106184ef0bd031b82701c4910b8dade331c4cdaf1cd9c6c5208cfd9e