From d8eacfd69a79e7e8655deb7e09923d4dd445cb26 Mon Sep 17 00:00:00 2001 From: Denis Revin Date: Sat, 8 Oct 2016 22:59:51 +0400 Subject: [PATCH] New package: ki18n-5.26.0 --- common/shlibs | 1 + srcpkgs/ki18n-devel | 1 + srcpkgs/ki18n/patches/musl.patch | 89 ++++++++++++++++++++++++++++++++ srcpkgs/ki18n/template | 25 +++++++++ 4 files changed, 116 insertions(+) create mode 120000 srcpkgs/ki18n-devel create mode 100644 srcpkgs/ki18n/patches/musl.patch create mode 100644 srcpkgs/ki18n/template diff --git a/common/shlibs b/common/shlibs index de5fa945207..d7f48aed200 100644 --- a/common/shlibs +++ b/common/shlibs @@ -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 diff --git a/srcpkgs/ki18n-devel b/srcpkgs/ki18n-devel new file mode 120000 index 00000000000..61b13f7e134 --- /dev/null +++ b/srcpkgs/ki18n-devel @@ -0,0 +1 @@ +ki18n \ No newline at end of file diff --git a/srcpkgs/ki18n/patches/musl.patch b/srcpkgs/ki18n/patches/musl.patch new file mode 100644 index 00000000000..e7afc696999 --- /dev/null +++ b/srcpkgs/ki18n/patches/musl.patch @@ -0,0 +1,89 @@ +From: "A. Wilcox" +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 ++ ++ 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 + #include + #include "gettext.h" ++#include "config.h" + + #include + #include +@@ -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 + } diff --git a/srcpkgs/ki18n/template b/srcpkgs/ki18n/template new file mode 100644 index 00000000000..394482b4a00 --- /dev/null +++ b/srcpkgs/ki18n/template @@ -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 " +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 + } +}