New package: ki18n-5.26.0

This commit is contained in:
Denis Revin 2016-10-08 22:59:51 +04:00
parent 45c9072a7e
commit d8eacfd69a
4 changed files with 116 additions and 0 deletions

View file

@ -2172,6 +2172,7 @@ libmlt++.so.3 mlt-0.9.6_1
libunibilium.so.0 unibilium-1.1.6_1
libtermkey.so.1 libtermkey-0.17_1
libicu4lua.so.0 icu4lua-0.2B_1
libKF5I18n.so.5 ki18n-5.26.0_1
libqtelegram-ae.so.1 libqtelegram-ae-5.0_1
libtelegramqml.so.1 TelegramQML-0.8.0_1
libglog.so.0 glog-0.3.4_1

1
srcpkgs/ki18n-devel Symbolic link
View file

@ -0,0 +1 @@
ki18n

View file

@ -0,0 +1,89 @@
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
---
--- CMakeLists.txt.orig 2016-10-08 23:44:18.942470224 +0400
+++ CMakeLists.txt 2016-10-08 23:43:46.744119642 +0400
@@ -59,6 +59,9 @@
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")
--- cmake/FindLibIntl.cmake.orig 2016-10-08 23:44:36.402660334 +0400
+++ cmake/FindLibIntl.cmake 2016-10-08 23:43:46.744119642 +0400
@@ -56,3 +56,6 @@
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)
--- /dev/null 2016-10-06 19:10:07.556940908 +0400
+++ src/config.h.in 2016-10-08 23:43:46.744119642 +0400
@@ -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 CONFIG_H
+#define CONFIG_H
+
+#cmakedefine HAS_NL_MSG_CAT_CNTR
+
+#endif
--- src/kcatalog.cpp.orig 2016-10-08 23:45:07.570999701 +0400
+++ src/kcatalog.cpp 2016-10-08 23:43:46.744119642 +0400
@@ -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(HAS_NL_MSG_CAT_CNTR)
extern "C" int Q_DECL_IMPORT _nl_msg_cat_cntr;
#endif
@@ -171,9 +172,9 @@
//qDebug() << "bindtextdomain" << domain << localeDir;
bindtextdomain(domain, localeDir);
+#if defined(HAS_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
}

25
srcpkgs/ki18n/template Normal file
View file

@ -0,0 +1,25 @@
# Template file for 'ki18n'
pkgname=ki18n
version=5.26.0
revision=1
build_style=cmake
configure_args="-DBUILD_TESTING=OFF"
hostmakedepends="extra-cmake-modules"
makedepends="qt5-devel qt5-script-devel qt5-declarative-devel"
short_desc="KDE Gettext-based UI text internationalization"
maintainer="Denis Revin <denis.revin@gmail.com>"
license="LGPL-2"
homepage="https://projects.kde.org/projects/frameworks/ki18n"
distfiles="http://download.kde.org/stable/frameworks/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=878808b60a459b15402f6ddea9bdd643c3407a252f37733be829d6a9bfc8bdb8
ki18n-devel_package() {
short_desc+=" - development"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/qt5/mkspecs
vmove usr/lib/cmake
vmove usr/lib/*.so
}
}