summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/ki18n/APKBUILD13
-rw-r--r--user/ki18n/libintl.patch116
2 files changed, 123 insertions, 6 deletions
diff --git a/user/ki18n/APKBUILD b/user/ki18n/APKBUILD
index e8c470fda..69a34a6f0 100644
--- a/user/ki18n/APKBUILD
+++ b/user/ki18n/APKBUILD
@@ -1,20 +1,20 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=ki18n
-pkgver=5.46.0
+pkgver=5.47.0
pkgrel=0
pkgdesc="Framework for creating multi-lingual software"
url="https://www.kde.org/"
arch="all"
-license="LGPL-2.1"
+license="LGPL-2.1-only"
depends=""
-depends_dev="qt5-qtbase-dev qt5-qtscript-dev gettext-dev qt5-qtdeclarative-dev"
+depends_dev="qt5-qtbase-dev qt5-qtscript-dev qt5-qtdeclarative-dev"
makedepends="$depends_dev cmake extra-cmake-modules doxygen graphviz
qt5-qttools-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
-source="http://download.kde.org/stable/frameworks/${pkgver%.*}/ki18n-$pkgver.tar.xz"
-builddir="$srcdir/ki18n-$pkgver"
+source="http://download.kde.org/stable/frameworks/${pkgver%.*}/ki18n-$pkgver.tar.xz
+ libintl.patch"
build() {
cd "$builddir"
@@ -43,4 +43,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="d4edabf5708311244ecc02541a0c6f9e90d118a4f0e784cf67d4be906fe890eb56225430ea78926e00da3c2fbf483fd0195f4929e579f1b9e21053696c2bcc17 ki18n-5.46.0.tar.xz"
+sha512sums="876f330fa911e009889980d1d73f7c685940024302fe8cad4758301c190770a101f59112f5717faf29845ce91149a16ba041004cdf34cd67d1b5345cb6b8db04 ki18n-5.47.0.tar.xz
+b2b74bf07e49e0451b880fadea5d2a1566f69bb7f7751bef97f29a4cb35e08a144bcf5c2dc5f793cb71fdd4504237140af1ab98b4372bf1a89d534f5ec9aeedd libintl.patch"
diff --git a/user/ki18n/libintl.patch b/user/ki18n/libintl.patch
new file mode 100644
index 000000000..bbe6d1e9a
--- /dev/null
+++ b/user/ki18n/libintl.patch
@@ -0,0 +1,116 @@
+From e2520914c446d8646088bc3aa061b5723aa52036 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <awilfox@adelielinux.org>
+Date: Wed, 20 Jul 2016 21:19:14 -0500
+Subject: [PATCH] Determine if _nl_msg_cat_cntr exists before use
+
+GNU gettext does not guarantee that GNU libintl will be used. This
+assumption breaks the build against the musl libc.
+
+BUG: 365917
+---
+ .gitignore | 1 +
+ CMakeLists.txt | 3 +++
+ cmake/FindLibIntl.cmake | 3 +++
+ src/config.h.in | 25 +++++++++++++++++++++++++
+ src/kcatalog.cpp | 5 +++--
+ 5 files changed, 35 insertions(+), 2 deletions(-)
+ create mode 100644 src/config.h.in
+
+diff --git a/.gitignore b/.gitignore
+index 1a6b0c4..42a96a7 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -1 +1,2 @@
+ doc-gen/
++src/config.h
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 00e4001..09dc6af 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -59,6 +59,9 @@ endif()
+ add_subdirectory(src)
+ add_subdirectory(autotests)
+
++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in"
++ "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h")
++
+ # create a Config.cmake and a ConfigVersion.cmake file and install them
+ set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5I18n")
+
+diff --git a/cmake/FindLibIntl.cmake b/cmake/FindLibIntl.cmake
+index cde5da8..a457112 100644
+--- a/cmake/FindLibIntl.cmake
++++ b/cmake/FindLibIntl.cmake
+@@ -56,3 +56,6 @@ else()
+ message(STATUS "libintl is a separate library.")
+ find_package_handle_standard_args(LibIntl REQUIRED_VARS LibIntl_INCLUDE_DIRS LibIntl_LIBRARIES)
+ endif()
++
++set(CMAKE_REQUIRED_LIBRARIES ${LibIntl_LIBRARIES})
++check_cxx_source_compiles("extern \"C\" int _nl_msg_cat_cntr; int main(void) { ++_nl_msg_cat_cntr; return 0; }" HAVE_NL_MSG_CAT_CNTR)
+diff --git a/src/config.h.in b/src/config.h.in
+new file mode 100644
+index 0000000..f445f88
+--- /dev/null
++++ b/src/config.h.in
+@@ -0,0 +1,25 @@
++/* This file is part of the KDE libraries
++ Copyright (c) 2016 A. Wilcox <awilfox@adelielinux.org>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public License
++ along with this library; see the file COPYING.LIB. If not, write to
++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ Boston, MA 02110-1301, USA.
++*/
++
++#ifndef KF5_KI18N_CONFIG_H
++#define KF5_KI18N_CONFIG_H
++
++#cmakedefine HAVE_NL_MSG_CAT_CNTR
++
++#endif
+diff --git a/src/kcatalog.cpp b/src/kcatalog.cpp
+index 6682d62..a15e661 100644
+--- a/src/kcatalog.cpp
++++ b/src/kcatalog.cpp
+@@ -21,6 +21,7 @@
+ #include <stdlib.h>
+ #include <locale.h>
+ #include "gettext.h"
++#include "config.h"
+
+ #include <qstandardpaths.h>
+ #include <QByteArray>
+@@ -41,7 +42,7 @@
+ #endif
+ #endif
+
+-#if defined(__USE_GNU_GETTEXT)
++#if defined(HAVE_NL_MSG_CAT_CNTR)
+ extern "C" int Q_DECL_IMPORT _nl_msg_cat_cntr;
+ #endif
+
+@@ -171,9 +172,9 @@ void KCatalogPrivate::setupGettextEnv()
+ //qDebug() << "bindtextdomain" << domain << localeDir;
+ bindtextdomain(domain, localeDir);
+
++#if defined(HAVE_NL_MSG_CAT_CNTR)
+ // Magic to make sure GNU Gettext doesn't use stale cached translation
+ // from previous language.
+-#if defined(__USE_GNU_GETTEXT)
+ ++_nl_msg_cat_cntr;
+ #endif
+ }
+--
+2.9.2
+