Hello community, here is the log from the commit of package ki18n for openSUSE:Factory checked in at 2018-04-19 15:16:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ki18n (Old) and /work/SRC/openSUSE:Factory/.ki18n.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ki18n" Thu Apr 19 15:16:32 2018 rev:55 rq:596874 version:5.45.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ki18n/ki18n.changes 2018-03-20 21:45:37.105529755 +0100 +++ /work/SRC/openSUSE:Factory/.ki18n.new/ki18n.changes 2018-04-19 15:16:33.262394053 +0200 @@ -1,0 +2,15 @@ +Sat Apr 14 13:19:04 CEST 2018 - lbeltr...@kde.org + +- Update to 5.45.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.45.0.php +- Changes since 5.44.0: + * Also let the autotests know where they can find KF5I18NMacros + * Make sure ki18n can build its own translations. + * Don't call PythonInterp.cmake in KF5I18NMacros. + * Remove not necessary QtCore and co + * Make it possible to generate po files in parallel + * Create a constructor for KLocalizedStringPrivate + +------------------------------------------------------------------- Old: ---- ki18n-5.44.0.tar.xz New: ---- ki18n-5.45.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ki18n.spec ++++++ --- /var/tmp/diff_new_pack.08BIAH/_old 2018-04-19 15:16:34.046362866 +0200 +++ /var/tmp/diff_new_pack.08BIAH/_new 2018-04-19 15:16:34.054362547 +0200 @@ -18,13 +18,13 @@ %bcond_without lang %define lname libKF5I18n5 -%define _tar_path 5.44 +%define _tar_path 5.45 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) %{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} Name: ki18n -Version: 5.44.0 +Version: 5.45.0 Release: 0 BuildRequires: cmake >= 3.0 BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} ++++++ ki18n-5.44.0.tar.xz -> ki18n-5.45.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/CMakeLists.txt new/ki18n-5.45.0/CMakeLists.txt --- old/ki18n-5.44.0/CMakeLists.txt 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/CMakeLists.txt 2018-04-07 21:35:53.000000000 +0200 @@ -1,15 +1,15 @@ cmake_minimum_required(VERSION 3.0) -set(KF5_VERSION "5.44.0") # handled by release scripts +set(KF5_VERSION "5.45.0") # handled by release scripts project(KI18n VERSION ${KF5_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 5.44.0 NO_MODULE) +find_package(ECM 5.45.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) -set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${KI18n_SOURCE_DIR}/cmake ${KI18n_BINARY_DIR}/cmake) include(GenerateExportHeader) @@ -27,7 +27,7 @@ SOVERSION 5) # Dependencies -set(REQUIRED_QT_VERSION 5.7.0) +set(REQUIRED_QT_VERSION 5.8.0) find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core) @@ -46,10 +46,20 @@ PURPOSE "Needed for building KI18n unless glibc is the system libc implementation" ) +# KF5I18NMacros.cmake only needs to know the python executable path. +# Due to CMake caching the variables, and KF5I18NMacros being included by KF5I18nConfig, +# we have to hardcode the PYTHON_EXECUTABLE path or anything depending on KF5I18n +# would be unable to find another Python version. +find_package(PythonInterp REQUIRED) +configure_file(cmake/KF5I18NMacros.cmake.in ${KI18n_BINARY_DIR}/cmake/KF5I18NMacros.cmake @ONLY) +# Needed to build the ki18n translations and run the autotests +file(COPY ${KI18n_SOURCE_DIR}/cmake/ts-pmap-compile.py DESTINATION ${KI18n_BINARY_DIR}/cmake) +file(COPY ${KI18n_SOURCE_DIR}/cmake/kf5i18nuic.cmake DESTINATION ${KI18n_BINARY_DIR}/cmake) + # usually is called using find_package(KF5I18n), # KF5I18NMacros.cmake needs to know the scripts directory set(KF5I18n_DIR ${CMAKE_CURRENT_LIST_DIR}/cmake) -include(cmake/KF5I18NMacros.cmake) +include(${KI18n_BINARY_DIR}/cmake/KF5I18NMacros.cmake) remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) if(MSVC) @@ -96,7 +106,7 @@ DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel) install( FILES - cmake/KF5I18NMacros.cmake + ${KI18n_BINARY_DIR}/cmake/KF5I18NMacros.cmake cmake/kf5i18nuic.cmake cmake/build-pofiles.cmake cmake/build-tsfiles.cmake diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/autotests/klocalizedstringtest.cpp new/ki18n-5.45.0/autotests/klocalizedstringtest.cpp --- old/ki18n-5.44.0/autotests/klocalizedstringtest.cpp 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/autotests/klocalizedstringtest.cpp 2018-04-07 21:35:53.000000000 +0200 @@ -27,14 +27,14 @@ #include <locale.h> #include <QDebug> -#include <QtTest/QtTest> +#include <QtTest> #include <libintl.h> #include <klocalizedstring.h> -#include <QtCore/QSet> -#include <QtCore/QString> +#include <QSet> +#include <QString> void KLocalizedStringTest::initTestCase() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/autotests/klocalizedstringtest.h new/ki18n-5.45.0/autotests/klocalizedstringtest.h --- old/ki18n-5.44.0/autotests/klocalizedstringtest.h 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/autotests/klocalizedstringtest.h 2018-04-07 21:35:53.000000000 +0200 @@ -19,8 +19,8 @@ #ifndef KLOCALIZEDSTRINGTEST_H #define KLOCALIZEDSTRINGTEST_H -#include <QtCore/QObject> -#include <QtCore/QTemporaryDir> +#include <QObject> +#include <QTemporaryDir> class KLocalizedStringTest : public QObject { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/autotests/ktranscriptcleantest.cpp new/ki18n-5.45.0/autotests/ktranscriptcleantest.cpp --- old/ki18n-5.44.0/autotests/ktranscriptcleantest.cpp 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/autotests/ktranscriptcleantest.cpp 2018-04-07 21:35:53.000000000 +0200 @@ -20,7 +20,7 @@ #include <ktranscriptcleantest.h> -#include <QtTest/QtTest> +#include <QtTest> #include <QDebug> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/autotests/ktranscripttest.cpp new/ki18n-5.45.0/autotests/ktranscripttest.cpp --- old/ki18n-5.44.0/autotests/ktranscripttest.cpp 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/autotests/ktranscripttest.cpp 2018-04-07 21:35:53.000000000 +0200 @@ -23,7 +23,7 @@ #include "testhelpers.h" -#include <QtTest/QtTest> +#include <QtTest> #include <QDebug> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/autotests/testhelpers.cpp new/ki18n-5.45.0/autotests/testhelpers.cpp --- old/ki18n-5.44.0/autotests/testhelpers.cpp 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/autotests/testhelpers.cpp 2018-04-07 21:35:53.000000000 +0200 @@ -24,7 +24,7 @@ #include <QFile> #include <QFileInfo> #include <QStandardPaths> -#include <QtTest/QtTest> +#include <QtTest> static const QString targetFileName = QStringLiteral("ktranscript.ini"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/cmake/KF5I18NMacros.cmake new/ki18n-5.45.0/cmake/KF5I18NMacros.cmake --- old/ki18n-5.44.0/cmake/KF5I18NMacros.cmake 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/cmake/KF5I18NMacros.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,183 +0,0 @@ - -# Copyright (c) 2006, Alexander Neundorf, <neund...@kde.org> -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. - -find_package(Gettext REQUIRED) -find_package(PythonInterp REQUIRED) - -set(_ki18n_pmap_compile_script ${CMAKE_CURRENT_LIST_DIR}/ts-pmap-compile.py) -set(_ki18n_uic_script ${CMAKE_CURRENT_LIST_DIR}/kf5i18nuic.cmake) - -#create the implementation files from the ui files and add them to the list of sources -#usage: KI18N_WRAP_UI(foo_SRCS ${ui_files}) -macro (KI18N_WRAP_UI _sources ) - foreach (_current_FILE ${ARGN}) - - get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) - get_filename_component(_basename ${_tmp_FILE} NAME_WE) - set(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h) - - get_target_property(QT_UIC_EXECUTABLE Qt5::uic LOCATION) - # we need to run uic and replace some things in the generated file - # this is done by executing the cmake script kf5i18nuic.cmake - add_custom_command(OUTPUT ${_header} - COMMAND ${CMAKE_COMMAND} - ARGS - -DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC_EXECUTABLE} - -DKDE_UIC_FILE:FILEPATH=${_tmp_FILE} - -DKDE_UIC_H_FILE:FILEPATH=${_header} - -DKDE_UIC_BASENAME:STRING=${_basename} - -P ${_ki18n_uic_script} - MAIN_DEPENDENCY ${_tmp_FILE} - ) - set_source_files_properties(${_header} PROPERTIES SKIP_AUTOMOC ON) - list(APPEND ${_sources} ${_header}) - endforeach (_current_FILE) -endmacro (KI18N_WRAP_UI) - -# KI18N_INSTALL(podir) -# Search for .po files and scripting modules and install them to the standard -# location. -# -# This is a convenience function which relies on the following directory -# structure: -# -# <podir>/ -# <lang>/ -# scripts/ -# <domain>/ -# *.js -# *.po -# -# .po files are passed to build-pofiles.cmake -# -# .js files are installed using build-tsfiles.cmake -# -# For example, given the following directory structure: -# -# po/ -# fr/ -# scripts/ -# kfoo/ -# kfoo.js -# kfoo.po -# -# KI18N_INSTALL(po) does the following: -# - Compiles kfoo.po into kfoo.mo and installs it in -# ${LOCALE_INSTALL_DIR}/fr/LC_MESSAGES or share/locale/fr/LC_MESSAGES if -# ${LOCALE_INSTALL_DIR} is not set. -# - Installs kfoo.js in ${LOCALE_INSTALL_DIR}/fr/LC_SCRIPTS/kfoo -# -# KI18N_INSTALL_TS_FILES() is deprecated, use KI18N_INSTALL() -# -function(KI18N_INSTALL podir) - if (NOT LOCALE_INSTALL_DIR) - set(LOCALE_INSTALL_DIR share/locale) - endif() - - get_filename_component(dirname ${LOCALE_INSTALL_DIR} NAME) - get_filename_component(destname ${LOCALE_INSTALL_DIR} DIRECTORY) - - get_filename_component(absolute_podir ${podir} ABSOLUTE) - string(MD5 pathmd5 ${absolute_podir}) - - add_custom_target(pofiles-${pathmd5} ALL - COMMENT "Generating mo..." - COMMAND ${CMAKE_COMMAND} - -DGETTEXT_MSGFMT_EXECUTABLE=${GETTEXT_MSGFMT_EXECUTABLE} - -DCOPY_TO=${CMAKE_CURRENT_BINARY_DIR}/${dirname} - -DPO_DIR=${absolute_podir} - -P ${KF5I18n_DIR}/build-pofiles.cmake - ) - add_custom_target(tsfiles-${pathmd5} ALL - COMMENT "Generating ts..." - COMMAND ${CMAKE_COMMAND} - -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} - -D_ki18n_pmap_compile_script=${_ki18n_pmap_compile_script} - -DCOPY_TO=${CMAKE_CURRENT_BINARY_DIR}/${dirname} - -DPO_DIR=${absolute_podir} - -P ${KF5I18n_DIR}/build-tsfiles.cmake - ) - - if (NOT TARGET pofiles) - add_custom_target(pofiles) - endif() - if (NOT TARGET tsfiles) - add_custom_target(tsfiles) - endif() - add_dependencies(pofiles pofiles-${pathmd5}) - add_dependencies(tsfiles tsfiles-${pathmd5}) - - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dirname}) - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dirname} DESTINATION ${destname}) -endfunction() - -#install the scripts for a given language in the target folder -#usage: KI18N_INSTALL_TS_FILES("ja" ${scripts_dir}) -function(KI18N_INSTALL_TS_FILES lang scripts_dir) - file(GLOB_RECURSE ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${scripts_dir}/*) - set(pmapc_files) - foreach(ts_file ${ts_files}) - string(REGEX MATCH "\\.svn/" in_svn ${ts_file}) - if(NOT in_svn) - # If ts_file is "path/to/foo/bar.js" - # We want subpath to contain "foo" - get_filename_component(subpath ${ts_file} DIRECTORY) - get_filename_component(subpath ${subpath} NAME) - install(FILES ${ts_file} - DESTINATION ${LOCALE_INSTALL_DIR}/${lang}/LC_SCRIPTS/${subpath}) - # If current file is a pmap, also install the compiled version. - get_filename_component(ts_ext ${ts_file} EXT) - if(ts_ext STREQUAL ".pmap") - set(pmap_file ${ts_file}) - get_filename_component(pmap_basename ${ts_file} NAME) - set(pmapc_basename "${pmap_basename}c") - set(pmapc_file "${lang}-${subpath}-${pmapc_basename}") - add_custom_command(OUTPUT ${pmapc_file} - COMMAND ${PYTHON_EXECUTABLE} - ARGS - -B - ${_ki18n_pmap_compile_script} - ${CMAKE_CURRENT_SOURCE_DIR}/${pmap_file} - ${pmapc_file} - DEPENDS ${pmap_file}) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pmapc_file} - DESTINATION ${LOCALE_INSTALL_DIR}/${lang}/LC_SCRIPTS/${subpath} - RENAME ${pmapc_basename}) - list(APPEND pmapc_files ${pmapc_file}) - endif() - endif() - endforeach() - if(pmapc_files) - if(NOT TARGET pmapfiles) - add_custom_target(pmapfiles) - endif() - set(pmapc_target "pmapfiles-${lang}") - string(REPLACE "@" "_" pmapc_target ${pmapc_target}) - add_custom_target(${pmapc_target} ALL DEPENDS ${pmapc_files}) - add_dependencies(pmapfiles ${pmapc_target}) - endif() -endfunction() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/cmake/KF5I18NMacros.cmake.in new/ki18n-5.45.0/cmake/KF5I18NMacros.cmake.in --- old/ki18n-5.44.0/cmake/KF5I18NMacros.cmake.in 1970-01-01 01:00:00.000000000 +0100 +++ new/ki18n-5.45.0/cmake/KF5I18NMacros.cmake.in 2018-04-07 21:35:53.000000000 +0200 @@ -0,0 +1,184 @@ + +# Copyright (c) 2006, Alexander Neundorf, <neund...@kde.org> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +find_package(Gettext REQUIRED) + +set(KI18N_PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@") + +set(_ki18n_pmap_compile_script ${CMAKE_CURRENT_LIST_DIR}/ts-pmap-compile.py) +set(_ki18n_uic_script ${CMAKE_CURRENT_LIST_DIR}/kf5i18nuic.cmake) + +#create the implementation files from the ui files and add them to the list of sources +#usage: KI18N_WRAP_UI(foo_SRCS ${ui_files}) +macro (KI18N_WRAP_UI _sources ) + foreach (_current_FILE ${ARGN}) + + get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) + get_filename_component(_basename ${_tmp_FILE} NAME_WE) + set(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h) + + get_target_property(QT_UIC_EXECUTABLE Qt5::uic LOCATION) + # we need to run uic and replace some things in the generated file + # this is done by executing the cmake script kf5i18nuic.cmake + add_custom_command(OUTPUT ${_header} + COMMAND ${CMAKE_COMMAND} + ARGS + -DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC_EXECUTABLE} + -DKDE_UIC_FILE:FILEPATH=${_tmp_FILE} + -DKDE_UIC_H_FILE:FILEPATH=${_header} + -DKDE_UIC_BASENAME:STRING=${_basename} + -P ${_ki18n_uic_script} + MAIN_DEPENDENCY ${_tmp_FILE} + ) + set_source_files_properties(${_header} PROPERTIES SKIP_AUTOMOC ON) + list(APPEND ${_sources} ${_header}) + endforeach (_current_FILE) +endmacro (KI18N_WRAP_UI) + +# KI18N_INSTALL(podir) +# Search for .po files and scripting modules and install them to the standard +# location. +# +# This is a convenience function which relies on the following directory +# structure: +# +# <podir>/ +# <lang>/ +# scripts/ +# <domain>/ +# *.js +# *.po +# +# .po files are passed to build-pofiles.cmake +# +# .js files are installed using build-tsfiles.cmake +# +# For example, given the following directory structure: +# +# po/ +# fr/ +# scripts/ +# kfoo/ +# kfoo.js +# kfoo.po +# +# KI18N_INSTALL(po) does the following: +# - Compiles kfoo.po into kfoo.mo and installs it in +# ${LOCALE_INSTALL_DIR}/fr/LC_MESSAGES or share/locale/fr/LC_MESSAGES if +# ${LOCALE_INSTALL_DIR} is not set. +# - Installs kfoo.js in ${LOCALE_INSTALL_DIR}/fr/LC_SCRIPTS/kfoo +# +# KI18N_INSTALL_TS_FILES() is deprecated, use KI18N_INSTALL() +# +function(KI18N_INSTALL podir) + if (NOT LOCALE_INSTALL_DIR) + set(LOCALE_INSTALL_DIR share/locale) + endif() + + get_filename_component(dirname ${LOCALE_INSTALL_DIR} NAME) + get_filename_component(destname ${LOCALE_INSTALL_DIR} DIRECTORY) + + get_filename_component(absolute_podir ${podir} ABSOLUTE) + string(MD5 pathmd5 ${absolute_podir}) + + add_custom_target(pofiles-${pathmd5} ALL + COMMENT "Generating mo..." + COMMAND ${CMAKE_COMMAND} + -DGETTEXT_MSGFMT_EXECUTABLE=${GETTEXT_MSGFMT_EXECUTABLE} + -DCOPY_TO=${CMAKE_CURRENT_BINARY_DIR}/${dirname} + -DPO_DIR=${absolute_podir} + -P ${KF5I18n_DIR}/build-pofiles.cmake + ) + add_custom_target(tsfiles-${pathmd5} ALL + COMMENT "Generating ts..." + COMMAND ${CMAKE_COMMAND} + -DPYTHON_EXECUTABLE=${KI18N_PYTHON_EXECUTABLE} + -D_ki18n_pmap_compile_script=${_ki18n_pmap_compile_script} + -DCOPY_TO=${CMAKE_CURRENT_BINARY_DIR}/${dirname} + -DPO_DIR=${absolute_podir} + -P ${KF5I18n_DIR}/build-tsfiles.cmake + ) + + if (NOT TARGET pofiles) + add_custom_target(pofiles) + endif() + if (NOT TARGET tsfiles) + add_custom_target(tsfiles) + endif() + add_dependencies(pofiles pofiles-${pathmd5}) + add_dependencies(tsfiles tsfiles-${pathmd5}) + + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dirname}) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dirname} DESTINATION ${destname}) +endfunction() + +#install the scripts for a given language in the target folder +#usage: KI18N_INSTALL_TS_FILES("ja" ${scripts_dir}) +function(KI18N_INSTALL_TS_FILES lang scripts_dir) + file(GLOB_RECURSE ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${scripts_dir}/*) + set(pmapc_files) + foreach(ts_file ${ts_files}) + string(REGEX MATCH "\\.svn/" in_svn ${ts_file}) + if(NOT in_svn) + # If ts_file is "path/to/foo/bar.js" + # We want subpath to contain "foo" + get_filename_component(subpath ${ts_file} DIRECTORY) + get_filename_component(subpath ${subpath} NAME) + install(FILES ${ts_file} + DESTINATION ${LOCALE_INSTALL_DIR}/${lang}/LC_SCRIPTS/${subpath}) + # If current file is a pmap, also install the compiled version. + get_filename_component(ts_ext ${ts_file} EXT) + if(ts_ext STREQUAL ".pmap") + set(pmap_file ${ts_file}) + get_filename_component(pmap_basename ${ts_file} NAME) + set(pmapc_basename "${pmap_basename}c") + set(pmapc_file "${lang}-${subpath}-${pmapc_basename}") + add_custom_command(OUTPUT ${pmapc_file} + COMMAND ${KI18N_PYTHON_EXECUTABLE} + ARGS + -B + ${_ki18n_pmap_compile_script} + ${CMAKE_CURRENT_SOURCE_DIR}/${pmap_file} + ${pmapc_file} + DEPENDS ${pmap_file}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pmapc_file} + DESTINATION ${LOCALE_INSTALL_DIR}/${lang}/LC_SCRIPTS/${subpath} + RENAME ${pmapc_basename}) + list(APPEND pmapc_files ${pmapc_file}) + endif() + endif() + endforeach() + if(pmapc_files) + if(NOT TARGET pmapfiles) + add_custom_target(pmapfiles) + endif() + set(pmapc_target "pmapfiles-${lang}") + string(REPLACE "@" "_" pmapc_target ${pmapc_target}) + add_custom_target(${pmapc_target} ALL DEPENDS ${pmapc_files}) + add_dependencies(pmapfiles ${pmapc_target}) + endif() +endfunction() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/cmake/build-pofiles.cmake new/ki18n-5.45.0/cmake/build-pofiles.cmake --- old/ki18n-5.44.0/cmake/build-pofiles.cmake 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/cmake/build-pofiles.cmake 2018-04-07 21:35:53.000000000 +0200 @@ -27,6 +27,26 @@ file(GLOB_RECURSE pofiles RELATIVE "${PO_DIR}" "${PO_DIR}/**.po") +include(ProcessorCount) +ProcessorCount(numberOfProcesses) + +set(i 0) +set(commands) + +function(_processCommands) + if(NOT commands) + return() + endif() + + execute_process( + ${commands} + RESULT_VARIABLE code + ) + if(code) + message(FATAL_ERROR "failed generating ${PO_DIR}") + endif() +endfunction() + foreach(pofile IN LISTS pofiles) get_filename_component(name ${pofile} NAME) # Regex the basename, cmake only allows stripping the longest extension, we @@ -37,12 +57,12 @@ set(dest ${COPY_TO}/${langdir}/LC_MESSAGES) file(MAKE_DIRECTORY ${dest}) - message(STATUS "building... ${pofile} to ${name}.mo" ) - execute_process( - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${dest}/${name}.mo ${PO_DIR}/${pofile} - RESULT_VARIABLE code - ) - if(code) - message(FATAL_ERROR "failed at generating ${name}.mo") + list(APPEND commands COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${dest}/${name}.mo ${PO_DIR}/${pofile}) + math(EXPR i "${i}+1") + if(i EQUAL ${numberOfProcesses}) + _processCommands() + set(i 0) endif() endforeach() + +_processCommands() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/cmake/build-tsfiles.cmake new/ki18n-5.45.0/cmake/build-tsfiles.cmake --- old/ki18n-5.44.0/cmake/build-tsfiles.cmake 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/cmake/build-tsfiles.cmake 2018-04-07 21:35:53.000000000 +0200 @@ -37,6 +37,27 @@ file(COPY ${PO_DIR}/${ts_file} DESTINATION ${COPY_TO}/${subpath}) endforeach() + +include(ProcessorCount) +ProcessorCount(numberOfProcesses) + +set(i 0) +set(commands) + +function(_processCommands) + if(NOT commands) + return() + endif() + + execute_process( + ${commands} + RESULT_VARIABLE code + ) + if(code) + message(FATAL_ERROR "failed generating: ${PO_DIR}") + endif() +endfunction() + file(GLOB_RECURSE pmap_files RELATIVE ${PO_DIR} "${PO_DIR}/**.pmap") foreach(pmap_file ${pmap_files}) get_filename_component(pmap_basename ${pmap_file} NAME) @@ -45,15 +66,18 @@ set(pmapc_file "${COPY_TO}/${subpath}/${pmap_basename}c") message(STATUS "building... ${pmap_file} to ${pmapc_file}" ) - execute_process( + list(APPEND commands COMMAND ${PYTHON_EXECUTABLE} -B ${_ki18n_pmap_compile_script} ${PO_DIR}/${pmap_file} ${pmapc_file} - RESULT_VARIABLE code ) - if(code) - message(FATAL_ERROR "failed at creating ${pmap_file}...") + math(EXPR i "${i}+1") + if (i EQUAL ${numberOfProcesses}) + _processCommands() + set(i 0) endif() endforeach() + +_processCommands() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/po/id/ki18n5.po new/ki18n-5.45.0/po/id/ki18n5.po --- old/ki18n-5.44.0/po/id/ki18n5.po 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/po/id/ki18n5.po 2018-04-07 21:35:53.000000000 +0200 @@ -17,6 +17,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Lokalize 2.0\n" #. i18n: Decide which string is used to delimit keys in a keyboard #. shortcut (e.g. + in Ctrl+Alt+Tab) in plain text. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/po/zh_CN/ki18n5.po new/ki18n-5.45.0/po/zh_CN/ki18n5.po --- old/ki18n-5.44.0/po/zh_CN/ki18n5.po 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/po/zh_CN/ki18n5.po 2018-04-07 21:35:53.000000000 +0200 @@ -16,7 +16,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2017-12-05 03:09+0100\n" -"PO-Revision-Date: 2018-02-28 02:23-0500\n" +"PO-Revision-Date: 2018-04-05 09:22-0400\n" "Last-Translator: guoyunhebrave <guoyunhebr...@gmail.com>\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/src/kcatalog_p.h new/ki18n-5.45.0/src/kcatalog_p.h --- old/ki18n-5.44.0/src/kcatalog_p.h 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/src/kcatalog_p.h 2018-04-07 21:35:53.000000000 +0200 @@ -21,9 +21,9 @@ #ifndef KCATALOG_H #define KCATALOG_H -#include <QtCore/QSet> -#include <QtCore/QString> -#include <QtCore/QByteArray> +#include <QSet> +#include <QString> +#include <QByteArray> class KCatalogPrivate; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/src/klocalizedstring.cpp new/ki18n-5.45.0/src/klocalizedstring.cpp --- old/ki18n-5.44.0/src/klocalizedstring.cpp 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/src/klocalizedstring.cpp 2018-04-07 21:35:53.000000000 +0200 @@ -198,6 +198,14 @@ bool markupAware; bool relaxedSubs; + KLocalizedStringPrivate() + : format() + , numberSet(false) + , markupAware(false) + , relaxedSubs(false) + { + } + static void translateRaw(const QByteArray &domain, const QStringList &languages, const QByteArray &msgctxt, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/src/klocalizedstring.h new/ki18n-5.45.0/src/klocalizedstring.h --- old/ki18n-5.44.0/src/klocalizedstring.h 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/src/klocalizedstring.h 2018-04-07 21:35:53.000000000 +0200 @@ -21,11 +21,11 @@ #include <ki18n_export.h> -#include <QtCore/QChar> -#include <QtCore/QLatin1Char> -#include <QtCore/QSet> -#include <QtCore/QString> -#include <QtCore/QStringList> +#include <QChar> +#include <QLatin1Char> +#include <QSet> +#include <QString> +#include <QStringList> #include <kuitmarkup.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/src/klocalizedtranslator.h new/ki18n-5.45.0/src/klocalizedtranslator.h --- old/ki18n-5.44.0/src/klocalizedtranslator.h 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/src/klocalizedtranslator.h 2018-04-07 21:35:53.000000000 +0200 @@ -22,7 +22,7 @@ #include <ki18n_export.h> -#include <QtCore/QTranslator> +#include <QTranslator> class KLocalizedTranslatorPrivate; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ki18n-5.44.0/src/kuitmarkup.h new/ki18n-5.45.0/src/kuitmarkup.h --- old/ki18n-5.44.0/src/kuitmarkup.h 2018-03-03 11:03:57.000000000 +0100 +++ new/ki18n-5.45.0/src/kuitmarkup.h 2018-04-07 21:35:53.000000000 +0200 @@ -22,9 +22,9 @@ #include <ki18n_export.h> -#include <QtCore/QString> -#include <QtCore/QStringList> -#include <QtCore/QHash> +#include <QString> +#include <QStringList> +#include <QHash> class KuitSetup;