Hello community, here is the log from the commit of package lxqt-build-tools for openSUSE:Factory checked in at 2019-02-25 17:49:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lxqt-build-tools (Old) and /work/SRC/openSUSE:Factory/.lxqt-build-tools.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lxqt-build-tools" Mon Feb 25 17:49:12 2019 rev:5 rq:670382 version:0.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/lxqt-build-tools/lxqt-build-tools.changes 2018-06-29 22:31:34.690247503 +0200 +++ /work/SRC/openSUSE:Factory/.lxqt-build-tools.new.28833/lxqt-build-tools.changes 2019-02-25 17:49:15.826811242 +0100 @@ -1,0 +2,10 @@ +Thu Jan 31 09:59:32 UTC 2019 - Michael Vetter <mvet...@suse.com> + +- Update to 0.6.0: + * Introduced lxqt-transupdate for translation updates + * Set cmake_minimum_required to 3.1.0 + * Consider QT_SELECT - some distributions use this tool + * Drop 0X and 11 support, require c++14 + * Removed obsolete FindFm module + +------------------------------------------------------------------- Old: ---- lxqt-build-tools-0.5.0.tar.xz lxqt-build-tools-0.5.0.tar.xz.asc New: ---- lxqt-build-tools-0.6.0.tar.xz lxqt-build-tools-0.6.0.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lxqt-build-tools.spec ++++++ --- /var/tmp/diff_new_pack.ySH9yc/_old 2019-02-25 17:49:16.382811015 +0100 +++ /var/tmp/diff_new_pack.ySH9yc/_new 2019-02-25 17:49:16.390811011 +0100 @@ -1,7 +1,7 @@ # # spec file for package lxqt-build-tools # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,23 +12,23 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: lxqt-build-tools -Version: 0.5.0 +Version: 0.6.0 Release: 0 Summary: Core build tools for LXQt License: BSD-3-Clause Group: Development/Libraries/C and C++ -Url: http://www.lxqt.org +URL: http://www.lxqt.org Source: https://github.com/lxde/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/lxde/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz.asc -BuildRequires: cmake >= 3.0.2 +BuildRequires: cmake >= 3.1.0 +BuildRequires: pkgconfig BuildRequires: pkgconfig(Qt5Core) >= 5.7.1 BuildRequires: pkgconfig(glib-2.0) >= 2.50 -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description @@ -56,8 +56,9 @@ %cmake_install %files devel -%defattr (-,root,root) -%doc AUTHORS BSD-3-Clause CHANGELOG README.md +%doc AUTHORS CHANGELOG README.md +%license BSD-3-Clause %{_datadir}/cmake/ +%{_bindir}/lxqt-transupdate %changelog ++++++ lxqt-build-tools-0.5.0.tar.xz -> lxqt-build-tools-0.6.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/CHANGELOG new/lxqt-build-tools-0.6.0/CHANGELOG --- old/lxqt-build-tools-0.5.0/CHANGELOG 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/CHANGELOG 2019-01-24 22:40:14.000000000 +0100 @@ -1,4 +1,22 @@ +lxqt-build-tools-0.6.0 / 2018-01-25 +=================================== + + * Bump version to 0.6.0 + * Don't use automatic string conversions + * Introduced lxqt-transupdate for translation updates + * Improved cmake scripting + - Set cmake_minimum_required to 3.1.0 + - Consider QT_SELECT - some distributions use this tool + - Drop 0X and 11 support, require c++14 + - Remvoed QUIET from any finds + - Cleaned up LXQtTranslateTs module + - Removed translation pulling and cleanup external repos + after translations moved back to their original repos + - Remove link-time optimization for gcc since it breaks + qobject_cast() in some cases. + - Removed obsolete FindFm module + lxqt-build-tools-0.5.0 / 2018-05-21 =================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/CMakeLists.txt new/lxqt-build-tools-0.6.0/CMakeLists.txt --- old/lxqt-build-tools-0.5.0/CMakeLists.txt 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/CMakeLists.txt 2019-01-24 22:40:14.000000000 +0100 @@ -1,11 +1,15 @@ +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) +# CMP0000: Call the cmake_minimum_required() command at the beginning of the top-level +# CMakeLists.txt file even before calling the project() command. +# The cmake_minimum_required(VERSION) command implicitly invokes the cmake_policy(VERSION) +# command to specify that the current project code is written for the given range of CMake +# versions. project(lxqt-build-tools) -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) - option(WITH_XDG_DIRS_FALLBACK "Use our XDG_CONFIG_DIRS fallback" ON) set(LXQT_BUILD_TOOLS_MAJOR_VERSION 0) -set(LXQT_BUILD_TOOLS_MINOR_VERSION 5) +set(LXQT_BUILD_TOOLS_MINOR_VERSION 6) set(LXQT_BUILD_TOOLS_PATCH_VERSION 0) set(LXQT_BUILD_TOOLS_VERSION ${LXQT_BUILD_TOOLS_MAJOR_VERSION}.${LXQT_BUILD_TOOLS_MINOR_VERSION}.${LXQT_BUILD_TOOLS_PATCH_VERSION}) @@ -128,3 +132,10 @@ DESTINATION "${MODULES_INSTALL_DIR}" ) + +# Tools install +install( + PROGRAMS + "lxqt-transupdate" + DESTINATION + "${CMAKE_INSTALL_BINDIR}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/README.md new/lxqt-build-tools-0.6.0/README.md --- old/lxqt-build-tools-0.5.0/README.md 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/README.md 2019-01-24 22:40:14.000000000 +0100 @@ -31,3 +31,18 @@ This package is arch-independent now. You can simply package it as `BuildArch: noarch` (rpm) or `arch: all` (deb). + +## Current Minimum Versions + +| Package | Version| +|------------------------------|--------| +| KF5_MINIMUM_VERSION | 5.36.0 | +| KF5SCREEN_MINIMUM_VERSION | 5.2.0 | +| LIBFM_QT_MINIMUM_VERSION | 0.14.0 | +| LIBFMQT_MINIMUM_VERSION | 0.14.0 | +| LIBMENUCACHE_MINIMUM_VERSION | 1.1.0 | +| LXQTBT_MINIMUM_VERSION | 0.6.0 | +| LXQT_MINIMUM_VERSION | 0.14.0 | +| QTERMWIDGET_MINIMUM_VERSION | 0.14.0 | +| QT_MINIMUM_VERSION | 5.7.1 | +| QTXDG_MINIMUM_VERSION | 3.3.0 | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/find-modules/FindExif.cmake new/lxqt-build-tools-0.6.0/cmake/find-modules/FindExif.cmake --- old/lxqt-build-tools-0.5.0/cmake/find-modules/FindExif.cmake 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/find-modules/FindExif.cmake 2019-01-24 22:40:14.000000000 +0100 @@ -21,8 +21,8 @@ # use pkg-config to get the directories and then use these values # in the find_path() and find_library() calls -find_package(PkgConfig QUIET) -pkg_check_modules(PC_EXIF QUIET libexif) +find_package(PkgConfig) +pkg_check_modules(PC_EXIF libexif) set(EXIF_DEFINITIONS ${PC_EXIF_CFLAGS_OTHER}) find_path(EXIF_INCLUDE_DIR NAMES libexif/exif-data.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/find-modules/FindFm.cmake new/lxqt-build-tools-0.6.0/cmake/find-modules/FindFm.cmake --- old/lxqt-build-tools-0.5.0/cmake/find-modules/FindFm.cmake 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/find-modules/FindFm.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,80 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# BSD-3-Clause file for details. - -#.rst: -# FindFm -# ----------- -# -# Try to find the Fm library -# -# Once done this will define -# -# :: -# -# FM_FOUND - System has the Fm library -# FM_INCLUDE_DIR - The Fm library include directory -# FM_INCLUDE_DIRS - Location of the headers needed to use the Fm library -# FM_LIBRARIES - The libraries needed to use the Fm library -# FM_DEFINITIONS - Compiler switches required for using the Fm library -# FM_VERSION_STRING - the version of the Fm library found - - -# use pkg-config to get the directories and then use these values -# in the find_path() and find_library() calls -find_package(PkgConfig QUIET) -pkg_check_modules(PC_FM QUIET libfm) -set(FM_DEFINITIONS ${PC_FM_CFLAGS_OTHER}) - -find_path(FM_INCLUDE_DIR NAMES libfm/fm.h - HINTS - ${PC_FM_INCLUDEDIR} - ${PC_FM_INCLUDE_DIRS} - PATH_SUFFIXES libfm -) - -find_library(FM_LIBRARIES NAMES fm libfm - HINTS - ${PC_FM_LIBDIR} - ${PC_FM_LIBRARY_DIRS} -) - - -# iterate over all dependencies -unset(FD_LIBRARIES) -foreach(depend ${PC_FM_LIBRARIES}) - find_library(_DEPEND_LIBRARIES - NAMES - ${depend} - HINTS - ${PC_FM_LIBDIR} - ${PC_FM_LIBRARY_DIRS} - ) - - if (_DEPEND_LIBRARIES) - list(APPEND FD_LIBRARIES ${_DEPEND_LIBRARIES}) - endif() - unset(_DEPEND_LIBRARIES CACHE) -endforeach() - -set(FM_VERSION_STRING ${PC_FM_VERSION}) -set(FM_INCLUDE_DIR ${PC_FM_INCLUDEDIR}) - -list(APPEND FM_INCLUDE_DIRS - ${FM_INCLUDE_DIR} - ${PC_FM_INCLUDE_DIRS} -) -list(REMOVE_DUPLICATES FM_INCLUDE_DIRS) - -list(APPEND FM_LIBRARIES - ${FD_LIBRARIES} -) - -list(REMOVE_DUPLICATES FM_LIBRARIES) -# handle the QUIETLY and REQUIRED arguments and set FM_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Fm - REQUIRED_VARS FM_LIBRARIES FM_INCLUDE_DIR FM_INCLUDE_DIRS - VERSION_VAR FM_VERSION_STRING) - -mark_as_advanced(FM_INCLUDE_DIR FM_LIBRARIES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/find-modules/FindGLIB.cmake new/lxqt-build-tools-0.6.0/cmake/find-modules/FindGLIB.cmake --- old/lxqt-build-tools-0.5.0/cmake/find-modules/FindGLIB.cmake 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/find-modules/FindGLIB.cmake 2019-01-24 22:40:14.000000000 +0100 @@ -43,7 +43,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. find_package(PkgConfig) -pkg_check_modules(PC_GLIB QUIET glib-2.0) +pkg_check_modules(PC_GLIB glib-2.0) find_library(GLIB_LIBRARIES NAMES glib-2.0 @@ -99,7 +99,7 @@ find_library(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR}) set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES) elseif (${_component} STREQUAL "gio-unix") - pkg_check_modules(GIO_UNIX QUIET gio-unix-2.0) + pkg_check_modules(GIO_UNIX gio-unix-2.0) find_path(GLIB_GIO_UNIX_INCLUDE_DIR NAMES gio/gunixconnection.h HINTS ${GIO_UNIX_INCLUDEDIR} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/find-modules/FindMenuCache.cmake new/lxqt-build-tools-0.6.0/cmake/find-modules/FindMenuCache.cmake --- old/lxqt-build-tools-0.5.0/cmake/find-modules/FindMenuCache.cmake 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/find-modules/FindMenuCache.cmake 2019-01-24 22:40:14.000000000 +0100 @@ -21,8 +21,8 @@ # use pkg-config to get the directories and then use these values # in the find_path() and find_library() calls -find_package(PkgConfig QUIET) -pkg_check_modules(PC_MENUCACHE QUIET libmenu-cache) +find_package(PkgConfig) +pkg_check_modules(PC_MENUCACHE libmenu-cache) set(MENUCACHE_DEFINITIONS ${PC_MENUCACHE_CFLAGS_OTHER}) find_path(MENUCACHE_INCLUDE_DIRS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/find-modules/FindUDev.cmake new/lxqt-build-tools-0.6.0/cmake/find-modules/FindUDev.cmake --- old/lxqt-build-tools-0.5.0/cmake/find-modules/FindUDev.cmake 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/find-modules/FindUDev.cmake 2019-01-24 22:40:14.000000000 +0100 @@ -33,7 +33,7 @@ # SUCH DAMAGE. find_package(PkgConfig) -pkg_check_modules(PC_UDEV QUIET libudev) +pkg_check_modules(PC_UDEV libudev) find_path(UDEV_INCLUDE_DIR libudev.h HINTS ${PC_UDEV_INCLUDEDIR} ${PC_UDEV_INCLUDE_DIRS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/find-modules/FindXCB.cmake new/lxqt-build-tools-0.6.0/cmake/find-modules/FindXCB.cmake --- old/lxqt-build-tools-0.5.0/cmake/find-modules/FindXCB.cmake 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/find-modules/FindXCB.cmake 2019-01-24 22:40:14.000000000 +0100 @@ -35,7 +35,7 @@ DESCRIPTION "X protocol C-language Binding") find_package(PkgConfig) -pkg_check_modules(PC_XCB QUIET xcb ${XCB_FIND_COMPONENTS}) +pkg_check_modules(PC_XCB xcb ${XCB_FIND_COMPONENTS}) find_library(XCB_LIBRARIES xcb HINTS ${PC_XCB_LIBRARY_DIRS}) find_path(XCB_INCLUDE_DIRS xcb/xcb.h PATH_SUFFIXES xcb HINTS ${PC_XCB_INCLUDE_DIRS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/modules/ECMFindModuleHelpers.cmake new/lxqt-build-tools-0.6.0/cmake/modules/ECMFindModuleHelpers.cmake --- old/lxqt-build-tools-0.5.0/cmake/modules/ECMFindModuleHelpers.cmake 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/modules/ECMFindModuleHelpers.cmake 2019-01-24 22:40:14.000000000 +0100 @@ -126,11 +126,11 @@ include(CMakeParseArguments) macro(ecm_find_package_version_check module_name) - if(CMAKE_VERSION VERSION_LESS 2.8.12) - message(FATAL_ERROR "CMake 2.8.12 is required by Find${module_name}.cmake") + if(CMAKE_VERSION VERSION_LESS 3.1.0) + message(FATAL_ERROR "CMake 3.1.0 is required by lxqt-build-tools!") endif() - if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12) - message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use Find${module_name}.cmake") + if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.1.0) + message(AUTHOR_WARNING "Your project should require at least CMake 3.1.0!") endif() endmacro() @@ -226,7 +226,7 @@ endif() if(NOT ECM_FPWC_SKIP_PKG_CONFIG AND ${module_name}_${ecm_fpwc_comp}_pkg_config) - pkg_check_modules(PKG_${module_name}_${ecm_fpwc_comp} QUIET + pkg_check_modules(PKG_${module_name}_${ecm_fpwc_comp} ${${module_name}_${ecm_fpwc_comp}_pkg_config}) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/modules/LXQtCompilerSettings.cmake new/lxqt-build-tools-0.6.0/cmake/modules/LXQtCompilerSettings.cmake --- old/lxqt-build-tools-0.5.0/cmake/modules/LXQtCompilerSettings.cmake 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/modules/LXQtCompilerSettings.cmake 2019-01-24 22:40:14.000000000 +0100 @@ -150,46 +150,10 @@ #----------------------------------------------------------------------------- -# Turn on more aggrassive optimizations not supported by CMake -# References: https://wiki.qt.io/Performance_Tip_Startup_Time +# CXX14 requirements - no checks, we just set it #----------------------------------------------------------------------------- -if (CMAKE_COMPILER_IS_GNUCXX OR LXQT_COMPILER_IS_CLANGCXX) - # -flto: use link-time optimizations to generate more efficient code - if (CMAKE_COMPILER_IS_GNUCXX) - set(LTO_FLAGS "-flto -fuse-linker-plugin") - # When building static libraries with LTO in gcc >= 4.9, - # "gcc-ar" and "gcc-ranlib" should be used instead of "ar" and "ranlib". - # references: - # https://gcc.gnu.org/gcc-4.9/changes.html - # https://hubicka.blogspot.tw/2014/04/linktime-optimization-in-gcc-2-firefox.html - # https://github.com/monero-project/monero/pull/1065/commits/1855213c8fb8f8727f4107716aab8e7ba826462b - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0") # gcc >= 4.9 - set(CMAKE_AR "gcc-ar") - set(CMAKE_RANLIB "gcc-ranlib") - endif() - elseif (LXQT_COMPILER_IS_CLANGCXX) - # The link-time optimization of clang++/llvm seems to be too aggrassive. - # After testing, it breaks the signal/slots of QObject sometimes. - # So disable it for now until there is a solution. - # set(LTO_FLAGS "-flto") - endif() - # apply these options to "Release" build type only - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${LTO_FLAGS}") -endif() - - -#----------------------------------------------------------------------------- -# CXX11 and CXX0X requirements -#----------------------------------------------------------------------------- -CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) -CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) -if(COMPILER_SUPPORTS_CXX11) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -elseif(COMPILER_SUPPORTS_CXX0X) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") -else() - message(FATAL "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. C++11 support is required") -endif() +set(CMAKE_CXX_STANDARD_REQUIRED True) +set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ ISO Standard") #----------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/modules/LXQtPluginTranslationLoader.cpp.in new/lxqt-build-tools-0.6.0/cmake/modules/LXQtPluginTranslationLoader.cpp.in --- old/lxqt-build-tools-0.5.0/cmake/modules/LXQtPluginTranslationLoader.cpp.in 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/modules/LXQtPluginTranslationLoader.cpp.in 2019-01-24 22:40:14.000000000 +0100 @@ -5,6 +5,8 @@ */ #include <QCoreApplication> +#include <QLatin1String> + #include <LXQt/Translator> /* Dummy helper symbol for referencing. @@ -17,7 +19,7 @@ { //XXX: we don't use the QStringLiteral here because it causes SEGFAULT in static finalization time // (the string is stored in static QHash and it's destructor can reference already deleted static QString (generated by QStringLiteral)) - LXQt::Translator::translatePlugin("@catalog_name@", "@plugin_type@"); + LXQt::Translator::translatePlugin(QLatin1String("@catalog_name@"), QLatin1String("@plugin_type@")); } Q_COREAPP_STARTUP_FUNCTION(loadPluginTranslation) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/modules/LXQtTranslateTs.cmake new/lxqt-build-tools-0.6.0/cmake/modules/LXQtTranslateTs.cmake --- old/lxqt-build-tools-0.5.0/cmake/modules/LXQtTranslateTs.cmake 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/modules/LXQtTranslateTs.cmake 2019-01-24 22:40:14.000000000 +0100 @@ -34,11 +34,6 @@ # [TRANSLATION_DIR] translation_directory # [INSTALL_DIR] install_directory # [COMPONENT] component -# [PULL_TRANSLATIONS [Yes | No]] -# [CLEAN_TRANSLATIONS [Yes | No]] -# [REPO_SUBDIR] repository_subdirectory -# [TRANSLATIONS_REPO] remote_translation_repo -# [TRANSLATIONS_REFSPEC] translations_remote_branch # ) # Output: # qmFiles The generated compiled translations (.qm) files @@ -66,33 +61,10 @@ # COMPONENT Optional install component. Only effective if INSTALL_DIR # present. Defaults to "Runtime". # -# PULL_TRANSLATIONS Optional flag. If set, the translations are pulled -# from external repository in cmake phase (not in build/make time) -# into directory "${TRANSLATION_DIR}/${REPO_SUBDIR}". -# -# CLEAN_TRANSLATIONS Optional flag. If set, the externally pulled -# translations are removed. -# -# REPO_SUBDIR Optional path in the "translations repository" to directory -# with translations. Only effective if PULL_TRANSLATIONS enabled. -# Defaults to "${TEMPLATE}". -# -# TRANSLATIONS_REPO External git repository with translations - only the ${TEMPLATE} directory -# is pulled (using the "sparse checkout"). -# Optional (defaults to "https://github.com/lxqt/lxqt-l10n.git"). -# -# TRANSLATIONS_REFSPEC Optional refspec of external repository. Used in git pull. -# Defaults to "master". - -# CMake v2.8.3 needed to use the CMakeParseArguments module -cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR) # We use our patched version to round a annoying bug. include(Qt5PatchedLinguistToolsMacros) -option(PULL_TRANSLATIONS "Pull translations" Yes) -option(CLEAN_TRANSLATIONS "Clean translations" No) - function(lxqt_translate_ts qmFiles) set(oneValueArgs USE_QT5 @@ -101,11 +73,6 @@ TRANSLATION_DIR INSTALL_DIR COMPONENT - PULL_TRANSLATIONS - CLEAN_TRANSLATIONS - REPO_SUBDIR - TRANSLATIONS_REPO - TRANSLATIONS_REFSPEC ) set(multiValueArgs SOURCES UPDATE_OPTIONS) cmake_parse_arguments(TR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -131,99 +98,7 @@ endif() get_filename_component(TR_TRANSLATION_DIR "${TR_TRANSLATION_DIR}" ABSOLUTE) - if (NOT DEFINED TR_CLEAN_TRANSLATIONS) - set(TR_CLEAN_TRANSLATIONS "No") - endif() - if (NOT DEFINED TR_PULL_TRANSLATIONS) - set(TR_PULL_TRANSLATIONS "No") - endif() - if (NOT DEFINED TR_REPO_SUBDIR) - set(TR_REPO_SUBDIR "${TR_TEMPLATE}") - endif() - - if (NOT DEFINED TR_TRANSLATIONS_REPO) - set(TR_TRANSLATIONS_REPO "https://github.com/lxqt/lxqt-l10n.git") - endif() - - if (NOT DEFINED TR_TRANSLATIONS_REFSPEC) - set(TR_TRANSLATIONS_REFSPEC "master") - endif() - - if (TR_CLEAN_TRANSLATIONS) - message(STATUS "Cleaning translations dir '${TR_TRANSLATION_DIR}' ...") - set(DIR_TO_REMOVE "${TR_TRANSLATION_DIR}/${TR_REPO_SUBDIR}") - get_filename_component(PARENT_DIR "${DIR_TO_REMOVE}" DIRECTORY) - while (NOT "${PARENT_DIR}" STREQAL "${TR_TRANSLATION_DIR}") - set(DIR_TO_REMOVE "${PARENT_DIR}") - get_filename_component(PARENT_DIR "${DIR_TO_REMOVE}" DIRECTORY) - endwhile () - #TODO: is there a way to check successfulness of file command !?! - file(REMOVE_RECURSE "${TR_TRANSLATION_DIR}/.git" "${DIR_TO_REMOVE}") - endif () - - if (TR_PULL_TRANSLATIONS) - find_package(Git REQUIRED) - if (NOT (GIT_FOUND AND GIT_VERSION_STRING VERSION_GREATER "1.7.0")) - message(FATAL_ERROR "Git > 1.7.0 is needed For pulling translations!") - endif () - if (NOT EXISTS "${TR_TRANSLATION_DIR}/${TR_REPO_SUBDIR}") - message(STATUS "Setting git repository in the translations dir '${TR_TRANSLATION_DIR}' ...") - if (EXISTS "${TR_TRANSLATION_DIR}/.git") - execute_process(COMMAND rm -Rf .git - WORKING_DIRECTORY "${TR_TRANSLATION_DIR}" - RESULT_VARIABLE ex_result - ) - - if (NOT "${ex_result}" EQUAL 0) - message(FATAL_ERROR "Initialization(cleanup) of translations dir failed!") - endif () - endif() - - # make sure the dir exist, otherwise git init will fail - file(MAKE_DIRECTORY "${TR_TRANSLATION_DIR}") - - execute_process(COMMAND "${GIT_EXECUTABLE}" init - WORKING_DIRECTORY "${TR_TRANSLATION_DIR}" - RESULT_VARIABLE ex_result - ) - if (NOT "${ex_result}" EQUAL 0) - message(FATAL_ERROR "Initialization(init) of translations dir failed!") - endif () - - execute_process(COMMAND "${GIT_EXECUTABLE}" remote add origin "${TR_TRANSLATIONS_REPO}" - WORKING_DIRECTORY "${TR_TRANSLATION_DIR}" - RESULT_VARIABLE ex_result - ) - if (NOT "${ex_result}" EQUAL 0) - message(FATAL_ERROR "Initialization(remote) of translations dir failed!") - endif () - - execute_process(COMMAND "${GIT_EXECUTABLE}" config core.sparseCheckout true - WORKING_DIRECTORY "${TR_TRANSLATION_DIR}" - RESULT_VARIABLE ex_result - ) - if (NOT "${ex_result}" EQUAL 0) - message(FATAL_ERROR "Initialization(config) of translations dir failed!") - endif () - - file(WRITE "${TR_TRANSLATION_DIR}/.git/info/sparse-checkout" "${TR_REPO_SUBDIR}") - endif () - - message(STATUS "Pulling the translations...") - execute_process(COMMAND "${GIT_EXECUTABLE}" pull origin "${TR_TRANSLATIONS_REFSPEC}" - WORKING_DIRECTORY "${TR_TRANSLATION_DIR}" - RESULT_VARIABLE ex_result - ) - if (NOT "${ex_result}" EQUAL 0) - message(FATAL_ERROR "Pulling translations failed!") - endif () - endif () - - #project/module can use it's own translations (not from external) - if (EXISTS "${TR_TRANSLATION_DIR}/${TR_REPO_SUBDIR}/") - file(GLOB tsFiles "${TR_TRANSLATION_DIR}/${TR_REPO_SUBDIR}/*_*.ts") - set(templateFile "${TR_TRANSLATION_DIR}/${TR_REPO_SUBDIR}/${TR_TEMPLATE}.ts") - else () + if (EXISTS "${TR_TRANSLATION_DIR}") file(GLOB tsFiles "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}_*.ts") set(templateFile "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}.ts") endif () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/cmake/modules/Qt5TranslationLoader.cpp.in new/lxqt-build-tools-0.6.0/cmake/modules/Qt5TranslationLoader.cpp.in --- old/lxqt-build-tools-0.5.0/cmake/modules/Qt5TranslationLoader.cpp.in 2018-05-21 19:06:51.000000000 +0200 +++ new/lxqt-build-tools-0.6.0/cmake/modules/Qt5TranslationLoader.cpp.in 2019-01-24 22:40:14.000000000 +0100 @@ -6,6 +6,7 @@ #include <QCoreApplication> #include <QLocale> +#include <QLatin1String> #include <QTranslator> #include <QLibraryInfo> @@ -14,14 +15,14 @@ QString locale = QLocale::system().name(); QTranslator *qtTranslator = new QTranslator(qApp); - if (qtTranslator->load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { + if (qtTranslator->load(QLatin1String("qt_") + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { qApp->installTranslator(qtTranslator); } else { delete qtTranslator; } QTranslator *appTranslator = new QTranslator(qApp); - if (appTranslator->load(QString("@translations_dir@/@catalog_name@_%1.qm").arg(locale))) { + if (appTranslator->load(QString::fromLocal8Bit("@translations_dir@/@catalog_name@_%1.qm").arg(locale))) { QCoreApplication::installTranslator(appTranslator); } else if (locale == QLatin1String("C") || locale.startsWith(QLatin1String("en"))) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-build-tools-0.5.0/lxqt-transupdate new/lxqt-build-tools-0.6.0/lxqt-transupdate --- old/lxqt-build-tools-0.5.0/lxqt-transupdate 1970-01-01 01:00:00.000000000 +0100 +++ new/lxqt-build-tools-0.6.0/lxqt-transupdate 2019-01-24 22:40:14.000000000 +0100 @@ -0,0 +1,50 @@ +#!/bin/sh + +#============================================================================= +# Copyright 2018 Alf Gaida <aga...@siduction.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 copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. +#============================================================================= + +# lxqt-transupdate +# Update LXQt translation files. + +# just to be sure - for distributions that user qtchooser +# Debian and derivatives, Fedora, FreeBSD, Mageia, OpenMandriva, PCLinuxOS +export QT_SELECT=5 + +TEMPLATES=$(find . -name \*.ts | grep -v '_') +for i in $TEMPLATES; do + echo "\n\n==== $i ====\n" + TRANSDIR=$(dirname $i) + SOURCEDIR=$(dirname $TRANSDIR) + # template-update + echo "== Template Update ==" + echo "lupdate $SOURCEDIR -ts $i -locations absolute -no-obsolete\n" + lupdate $SOURCEDIR -ts $i -locations absolute -no-obsolete + echo + echo "== Language updates ==" + echo "lupdate $SOURCEDIR -ts $TRANSDIR/*.ts -locations absolute -no-obsolete\n" + lupdate $SOURCEDIR -ts $TRANSDIR/*_*.ts -locations absolute -no-obsolete +done