diff -Nru lxqt-build-tools-0.8.0/CHANGELOG lxqt-build-tools-0.9.0/CHANGELOG --- lxqt-build-tools-0.8.0/CHANGELOG 2020-10-30 13:17:17.000000000 +0000 +++ lxqt-build-tools-0.9.0/CHANGELOG 2021-04-05 09:30:11.000000000 +0000 @@ -1,3 +1,7 @@ +lxqt-build-tools-0.9.0 / 2021-04-15 +=================================== + * Added a CMake FindXTerm module. + lxqt-build-tools-0.8.0 / 2020-11-01 =================================== * Removed version checks for some LXQt dependencies. diff -Nru lxqt-build-tools-0.8.0/cmake/find-modules/FindXTerm.cmake lxqt-build-tools-0.9.0/cmake/find-modules/FindXTerm.cmake --- lxqt-build-tools-0.8.0/cmake/find-modules/FindXTerm.cmake 1970-01-01 00:00:00.000000000 +0000 +++ lxqt-build-tools-0.9.0/cmake/find-modules/FindXTerm.cmake 2021-04-05 09:30:11.000000000 +0000 @@ -0,0 +1,52 @@ +#============================================================================= +# Copyright 2020 Luís Pereira +# +# 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. +#============================================================================= +# FindXTerm +# +# Try to find the XTerm executable +# +# This will define the following variables: +# +# `XTerm_FOUND` +# True if XTerm executable is available. +# +# `XTerm_EXECUTABLE` +# The XTerm executable. +# + +# Find XTerm executable +find_program(XTerm_EXECUTABLE NAMES xterm) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(XTerm + FOUND_VAR + XTerm_FOUND + REQUIRED_VARS + XTerm_EXECUTABLE +) + +mark_as_advanced(XTerm_EXECUTABLE) diff -Nru lxqt-build-tools-0.8.0/cmake/modules/LXQtTranslateDesktop.cmake lxqt-build-tools-0.9.0/cmake/modules/LXQtTranslateDesktop.cmake --- lxqt-build-tools-0.8.0/cmake/modules/LXQtTranslateDesktop.cmake 2020-10-30 13:17:17.000000000 +0000 +++ lxqt-build-tools-0.9.0/cmake/modules/LXQtTranslateDesktop.cmake 2021-04-05 09:30:11.000000000 +0000 @@ -7,6 +7,7 @@ # funtion lxqt_translate_desktop(_RESULT # SOURCES # [TRANSLATION_DIR] translation_directory +# [USE_YAML] # ) # Output: # _RESULT The generated .desktop (.desktop) files @@ -20,10 +21,14 @@ # relative to the CMakeList.txt. Defaults to # "translations". # +# USE_YAML Flag if *.desktop.yaml translation should be used. #============================================================================= +find_package(Perl REQUIRED) + function(lxqt_translate_desktop _RESULT) # Parse arguments *************************************** + set(options USE_YAML) set(oneValueArgs TRANSLATION_DIR) set(multiValueArgs SOURCES) @@ -60,47 +65,36 @@ #Extract the real extension ............ get_filename_component(_fileExt ${_inFile} EXT) string(REPLACE ".in" "" _fileExt ${_fileExt}) + string(REGEX REPLACE "^\\.([^.].*)$" "\\1" _fileExt ${_fileExt}) #....................................... - set(_outFile "${CMAKE_CURRENT_BINARY_DIR}/${_fileName}${_fileExt}") - - file(GLOB _translations - ${_translationDir}/${_fileName}_*${_fileExt} - ) + set(_outFile "${CMAKE_CURRENT_BINARY_DIR}/${_fileName}.${_fileExt}") - set(_pattern "'\\[.*]\\s*='") - if (_translations) - list(SORT _translations) + if (_ARGS_USE_YAML) add_custom_command(OUTPUT ${_outFile} - COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile} - COMMAND grep -h -a ${_pattern} ${_translations} >> ${_outFile} - COMMENT "Generating ${_fileName}${_fileExt}" + COMMAND ${PERL_EXECUTABLE} ${LXQT_CMAKE_MODULES_DIR}/LXQtTranslateDesktopYaml.pl ${_inFile} ${_fileName} ${_translationDir}/${_fileName}[_.]*${_fileExt}.yaml >> ${_outFile} + VERBATIM + COMMENT "Generating ${_fileName}.${_fileExt}" + ) + else () + file(GLOB _translations + ${_translationDir}/${_fileName}[_.]*${_fileExt} ) - else() + + list(SORT _translations) add_custom_command(OUTPUT ${_outFile} - COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile} - COMMENT "Generating ${_fileName}${_fileExt}" + COMMAND grep -v -a "#TRANSLATIONS_DIR=" ${_inFile} > ${_outFile} + VERBATIM + COMMENT "Generating ${_fileName}.${_fileExt}" ) - endif() + if (_translations) + add_custom_command(OUTPUT ${_outFile} + COMMAND grep -h -a "\\[.*]\\s*=" ${_translations} >> ${_outFile} + VERBATIM APPEND + ) + endif () + endif () set(__result ${__result} ${_outFile}) - - - # TX file *********************************************** - set(_txFile "${CMAKE_BINARY_DIR}/tx/${_fileName}${_fileExt}.tx.sh") - string(REPLACE "${CMAKE_SOURCE_DIR}/" "" _tx_translationDir ${_translationDir}) - string(REPLACE "${CMAKE_SOURCE_DIR}/" "" _tx_inFile ${_inFile}) - string(REPLACE "." "" _fileType ${_fileExt}) - - file(WRITE ${_txFile} - "[ -f ${_inFile} ] || exit 0\n" - "echo '[lxqt.${_fileName}_${_fileType}]'\n" - "echo 'type = DESKTOP'\n" - "echo 'source_lang = en'\n" - "echo 'source_file = ${_tx_inFile}'\n" - "echo 'file_filter = ${_tx_translationDir}/${_fileName}_${_fileExt}'\n" - "echo ''\n" - ) - endforeach() set(${_RESULT} ${__result} PARENT_SCOPE) diff -Nru lxqt-build-tools-0.8.0/cmake/modules/LXQtTranslateDesktopYaml.pl lxqt-build-tools-0.9.0/cmake/modules/LXQtTranslateDesktopYaml.pl --- lxqt-build-tools-0.8.0/cmake/modules/LXQtTranslateDesktopYaml.pl 1970-01-01 00:00:00.000000000 +0000 +++ lxqt-build-tools-0.9.0/cmake/modules/LXQtTranslateDesktopYaml.pl 2021-04-05 09:30:11.000000000 +0000 @@ -0,0 +1,50 @@ +use strict; + +binmode(STDOUT, ":encoding(utf8)"); +binmode(STDERR, ":encoding(utf8)"); + +my $desktop_in = $ARGV[0]; +my $filename_base = $ARGV[1]; +my @translation_files = glob($ARGV[2]); + +my $section_re = qr/^\[([^\]]+)]/o; +my $lang_re = qr/^.*${filename_base}_([^.]+)\..+$/o; +my $strip_re = qr/#TRANSLATIONS_DIR=/o; + +sub flush_translations { + my ($curr_section) = @_; + if (defined $curr_section) { + my $transl_yaml_re = qr/^${curr_section}\/([^: ]+) ?: *([^ ].*)$/; + foreach my $file (@translation_files) { + my $language = ($file =~ $lang_re ? "[$1]" : ''); + open(my $trans_fh, '<:encoding(UTF-8)', $file) or next; + while (my $trans_l = <$trans_fh>) { + if ($trans_l =~ $transl_yaml_re) + { + my ($key, $value) = ($1, $2); + $value =~ s/^\s+|\s+$//; $value =~ s/^['"]//; $value =~ s/['"]$//; + if (length($value)) + { + # Don't flush empty (untranslated) strings + print(STDOUT "$key$language=$value\n"); + } + } + } + close($trans_fh); + } + } +} + + +open(my $fh, '<:encoding(UTF-8)', $desktop_in) or die "Could not open file '$desktop_in' $!"; +my $curr_section = undef; +while (my $line = <$fh>) { + if ($line =~ $section_re) { + flush_translations($curr_section); + $curr_section = $1; + } + $line =~ $strip_re or print(STDOUT $line); +} +flush_translations($curr_section); + +close($fh); diff -Nru lxqt-build-tools-0.8.0/cmake/modules/LXQtTranslateTs.cmake lxqt-build-tools-0.9.0/cmake/modules/LXQtTranslateTs.cmake --- lxqt-build-tools-0.8.0/cmake/modules/LXQtTranslateTs.cmake 2020-10-30 13:17:17.000000000 +0000 +++ lxqt-build-tools-0.9.0/cmake/modules/LXQtTranslateTs.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ -#============================================================================= -# Copyright 2014 Luís Pereira -# -# 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. -#============================================================================= -# -# funtion lxqt_translate_ts(qmFiles -# [USE_QT5 [Yes | No]] -# [UPDATE_TRANSLATIONS [Yes | No]] -# SOURCES -# [UPDATE_OPTIONS] update_options -# [TEMPLATE] translation_template -# [TRANSLATION_DIR] translation_directory -# [INSTALL_DIR] install_directory -# [COMPONENT] component -# ) -# Output: -# qmFiles The generated compiled translations (.qm) files -# -# Input: -# USE_QT5 Optional flag to choose between Qt4 and Qt5. Defaults to Qt5 -# -# UPDATE_TRANSLATIONS Optional flag. Setting it to Yes, extracts and -# compiles the translations. Setting it No, only -# compiles them. -# -# UPDATE_OPTIONS Optional options to lupdate when UPDATE_TRANSLATIONS -# is True. -# -# TEMPLATE Optional translations files base name. Defaults to -# ${PROJECT_NAME}. An .ts extensions is added. -# -# TRANSLATION_DIR Optional path to the directory with the .ts files, -# relative to the CMakeList.txt. Defaults to -# "translations". -# -# INSTALL_DIR Optional destination of the file compiled files (qmFiles). -# If not present no installation is performed -# -# COMPONENT Optional install component. Only effective if INSTALL_DIR -# present. Defaults to "Runtime". -# - -# We use our patched version to round a annoying bug. -include(Qt5PatchedLinguistToolsMacros) - -function(lxqt_translate_ts qmFiles) - set(oneValueArgs - USE_QT5 - UPDATE_TRANSLATIONS - TEMPLATE - TRANSLATION_DIR - INSTALL_DIR - COMPONENT - ) - set(multiValueArgs SOURCES UPDATE_OPTIONS) - cmake_parse_arguments(TR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if (NOT DEFINED TR_UPDATE_TRANSLATIONS) - set(TR_UPDATE_TRANSLATIONS "No") - endif() - - if (NOT DEFINED TR_UPDATE_OPTIONS) - set(TR_UPDATE_OPTIONS "") - endif() - - if (NOT DEFINED TR_USE_QT5) - set(TR_USE_QT5 "Yes") - endif() - - if(NOT DEFINED TR_TEMPLATE) - set(TR_TEMPLATE "${PROJECT_NAME}") - endif() - - if (NOT DEFINED TR_TRANSLATION_DIR) - set(TR_TRANSLATION_DIR "translations") - endif() - get_filename_component(TR_TRANSLATION_DIR "${TR_TRANSLATION_DIR}" ABSOLUTE) - - if (EXISTS "${TR_TRANSLATION_DIR}") - file(GLOB tsFiles "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}_*.ts") - set(templateFile "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}.ts") - endif () - - if(TR_USE_QT5) - # Qt5 - if (TR_UPDATE_TRANSLATIONS) - qt5_patched_create_translation(QMS - ${TR_SOURCES} - ${templateFile} - OPTIONS ${TR_UPDATE_OPTIONS} - ) - qt5_patched_create_translation(QM - ${TR_SOURCES} - ${tsFiles} - OPTIONS ${TR_UPDATE_OPTIONS} - ) - else() - qt5_patched_add_translation(QM ${tsFiles}) - endif() - else() - # Qt4 - if(TR_UPDATE_TRANSLATIONS) - qt4_create_translation(QMS - ${TR_SOURCES} - ${templateFile} - OPTIONS ${TR_UPDATE_OPTIONS} - ) - qt4_create_translation(QM - ${TR_SOURCES} - ${tsFiles} - OPTIONS ${TR_UPDATE_OPTIONS} - ) - else() - qt4_add_translation(QM ${tsFiles}) - endif() - endif() - - if(TR_UPDATE_TRANSLATIONS) - add_custom_target("update_${TR_TEMPLATE}_ts" ALL DEPENDS ${QMS}) - endif() - - if(DEFINED TR_INSTALL_DIR) - if(NOT DEFINED TR_COMPONENT) - set(TR_COMPONENT "Runtime") - endif() - - install(FILES ${QM} - DESTINATION "${TR_INSTALL_DIR}" - COMPONENT "${TR_COMPONENT}" - ) - endif() - - set(${qmFiles} ${QM} PARENT_SCOPE) -endfunction() diff -Nru lxqt-build-tools-0.8.0/cmake/modules/LXQtTranslateTs.cmake.in lxqt-build-tools-0.9.0/cmake/modules/LXQtTranslateTs.cmake.in --- lxqt-build-tools-0.8.0/cmake/modules/LXQtTranslateTs.cmake.in 1970-01-01 00:00:00.000000000 +0000 +++ lxqt-build-tools-0.9.0/cmake/modules/LXQtTranslateTs.cmake.in 2021-04-05 09:30:11.000000000 +0000 @@ -0,0 +1,155 @@ +#============================================================================= +# Copyright 2014 Luís Pereira +# +# 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. +#============================================================================= +# +# funtion lxqt_translate_ts(qmFiles +# [USE_QT5 [Yes | No]] +# [UPDATE_TRANSLATIONS [Yes | No]] +# SOURCES +# [UPDATE_OPTIONS] update_options +# [TEMPLATE] translation_template +# [TRANSLATION_DIR] translation_directory +# [INSTALL_DIR] install_directory +# [COMPONENT] component +# ) +# Output: +# qmFiles The generated compiled translations (.qm) files +# +# Input: +# USE_QT5 Optional flag to choose between Qt4 and Qt5. Defaults to Qt5 +# +# UPDATE_TRANSLATIONS Optional flag. Setting it to Yes, extracts and +# compiles the translations. Setting it No, only +# compiles them. +# +# UPDATE_OPTIONS Optional options to lupdate when UPDATE_TRANSLATIONS +# is True. +# +# TEMPLATE Optional translations files base name. Defaults to +# ${PROJECT_NAME}. An .ts extensions is added. +# +# TRANSLATION_DIR Optional path to the directory with the .ts files, +# relative to the CMakeList.txt. Defaults to +# "translations". +# +# INSTALL_DIR Optional destination of the file compiled files (qmFiles). +# If not present no installation is performed +# +# COMPONENT Optional install component. Only effective if INSTALL_DIR +# present. Defaults to "Runtime". +# + +find_package(Qt5LinguistTools "@LXQT_MIN_LINGUIST_VERSION@" REQUIRED) + +function(lxqt_translate_ts qmFiles) + set(oneValueArgs + USE_QT5 + UPDATE_TRANSLATIONS + TEMPLATE + TRANSLATION_DIR + INSTALL_DIR + COMPONENT + ) + set(multiValueArgs SOURCES UPDATE_OPTIONS) + cmake_parse_arguments(TR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if (NOT DEFINED TR_UPDATE_TRANSLATIONS) + set(TR_UPDATE_TRANSLATIONS "No") + endif() + + if (NOT DEFINED TR_UPDATE_OPTIONS) + set(TR_UPDATE_OPTIONS "") + endif() + + if (NOT DEFINED TR_USE_QT5) + set(TR_USE_QT5 "Yes") + endif() + + if(NOT DEFINED TR_TEMPLATE) + set(TR_TEMPLATE "${PROJECT_NAME}") + endif() + + if (NOT DEFINED TR_TRANSLATION_DIR) + set(TR_TRANSLATION_DIR "translations") + endif() + get_filename_component(TR_TRANSLATION_DIR "${TR_TRANSLATION_DIR}" ABSOLUTE) + + if (EXISTS "${TR_TRANSLATION_DIR}") + file(GLOB tsFiles "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}_*.ts") + set(templateFile "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}.ts") + endif () + + if(TR_USE_QT5) + # Qt5 + if (TR_UPDATE_TRANSLATIONS) + qt5_create_translation(QMS + ${TR_SOURCES} + ${templateFile} + OPTIONS ${TR_UPDATE_OPTIONS} + ) + qt5_create_translation(QM + ${TR_SOURCES} + ${tsFiles} + OPTIONS ${TR_UPDATE_OPTIONS} + ) + else() + qt5_add_translation(QM ${tsFiles}) + endif() + else() + # Qt4 + if(TR_UPDATE_TRANSLATIONS) + qt4_create_translation(QMS + ${TR_SOURCES} + ${templateFile} + OPTIONS ${TR_UPDATE_OPTIONS} + ) + qt4_create_translation(QM + ${TR_SOURCES} + ${tsFiles} + OPTIONS ${TR_UPDATE_OPTIONS} + ) + else() + qt4_add_translation(QM ${tsFiles}) + endif() + endif() + + if(TR_UPDATE_TRANSLATIONS) + add_custom_target("update_${TR_TEMPLATE}_ts" ALL DEPENDS ${QMS}) + endif() + + if(DEFINED TR_INSTALL_DIR) + if(NOT DEFINED TR_COMPONENT) + set(TR_COMPONENT "Runtime") + endif() + + install(FILES ${QM} + DESTINATION "${TR_INSTALL_DIR}" + COMPONENT "${TR_COMPONENT}" + ) + endif() + + set(${qmFiles} ${QM} PARENT_SCOPE) +endfunction() diff -Nru lxqt-build-tools-0.8.0/cmake/modules/Qt5PatchedLinguistToolsMacros.cmake lxqt-build-tools-0.9.0/cmake/modules/Qt5PatchedLinguistToolsMacros.cmake --- lxqt-build-tools-0.8.0/cmake/modules/Qt5PatchedLinguistToolsMacros.cmake 2020-10-30 13:17:17.000000000 +0000 +++ lxqt-build-tools-0.9.0/cmake/modules/Qt5PatchedLinguistToolsMacros.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -#============================================================================= -# Copyright 2005-2011 Kitware, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * 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. -# -# * Neither the name of Kitware, Inc. 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 COPYRIGHT HOLDERS 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 COPYRIGHT -# HOLDER 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. -#============================================================================= - -include(CMakeParseArguments) - -function(QT5_PATCHED_CREATE_TRANSLATION _qm_files) - set(options) - set(oneValueArgs) - set(multiValueArgs OPTIONS) - - cmake_parse_arguments(_LUPDATE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - set(_lupdate_files ${_LUPDATE_UNPARSED_ARGUMENTS}) - set(_lupdate_options ${_LUPDATE_OPTIONS}) - - set(_my_sources) - set(_my_tsfiles) - foreach(_file ${_lupdate_files}) - get_filename_component(_ext ${_file} EXT) - get_filename_component(_abs_FILE ${_file} ABSOLUTE) - if(_ext MATCHES "ts") - list(APPEND _my_tsfiles ${_abs_FILE}) - else() - list(APPEND _my_sources ${_abs_FILE}) - endif() - endforeach() - foreach(_ts_file ${_my_tsfiles}) - if(_my_sources) - # make a list file to call lupdate on, so we don't make our commands too - # long for some systems -# get_filename_component(_ts_name ${_ts_file} NAME_WE) - - get_filename_component(_name ${_ts_file} NAME) - string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _ts_name ${_name}) - - set(_ts_lst_file "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lst_file") - set(_lst_file_srcs) - foreach(_lst_file_src ${_my_sources}) - set(_lst_file_srcs "${_lst_file_src}\n${_lst_file_srcs}") - endforeach() - - get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES) - foreach(_pro_include ${_inc_DIRS}) - get_filename_component(_abs_include "${_pro_include}" ABSOLUTE) - set(_lst_file_srcs "-I${_pro_include}\n${_lst_file_srcs}") - endforeach() - - file(WRITE ${_ts_lst_file} "${_lst_file_srcs}") - endif() - add_custom_command(OUTPUT ${_ts_file} - COMMAND ${Qt5_LUPDATE_EXECUTABLE} - ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file} - DEPENDS ${_my_sources} ${_ts_lst_file} VERBATIM) - endforeach() - qt5_patched_add_translation(${_qm_files} ${_my_tsfiles}) - set(${_qm_files} ${${_qm_files}} PARENT_SCOPE) -endfunction() - - -function(QT5_PATCHED_ADD_TRANSLATION _qm_files) - foreach(_current_FILE ${ARGN}) - get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE) -# get_filename_component(qm ${_abs_FILE} NAME_WE) - - get_filename_component(_name ${_abs_FILE} NAME) - string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" qm ${_name}) - - get_source_file_property(output_location ${_abs_FILE} OUTPUT_LOCATION) - if(output_location) - file(MAKE_DIRECTORY "${output_location}") - set(qm "${output_location}/${qm}.qm") - else() - set(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm") - endif() - - add_custom_command(OUTPUT ${qm} - COMMAND ${Qt5_LRELEASE_EXECUTABLE} - ARGS ${_abs_FILE} -qm ${qm} - DEPENDS ${_abs_FILE} VERBATIM - ) - list(APPEND ${_qm_files} ${qm}) - endforeach() - set(${_qm_files} ${${_qm_files}} PARENT_SCOPE) -endfunction() diff -Nru lxqt-build-tools-0.8.0/CMakeLists.txt lxqt-build-tools-0.9.0/CMakeLists.txt --- lxqt-build-tools-0.8.0/CMakeLists.txt 2020-10-30 13:17:17.000000000 +0000 +++ lxqt-build-tools-0.9.0/CMakeLists.txt 2021-04-05 09:30:11.000000000 +0000 @@ -9,9 +9,11 @@ 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 8) +set(LXQT_BUILD_TOOLS_MINOR_VERSION 9) 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}) +# for lxqt_translate_ts we require at least Qt linguist 5.12.5 for correct file name handling +set(LXQT_MIN_LINGUIST_VERSION "5.12.5") include(CMakePackageConfigHelpers) include(GNUInstallDirs) # Standard directories for installation @@ -42,7 +44,11 @@ file(GLOB toInstallModules "${PROJECT_SOURCE_DIR}/cmake/modules/*.cmake" - "${PROJECT_SOURCE_DIR}/cmake/modules/*.in" + "${PROJECT_SOURCE_DIR}/cmake/modules/*.cpp.in" +) + +file(GLOB toInstallModulesHelpers + "${PROJECT_SOURCE_DIR}/cmake/modules/*.pl" ) @@ -59,6 +65,7 @@ file(COPY ${toInstallModules} + ${toInstallModulesHelpers} DESTINATION "${MODULES_INSTALL_DIR}" ) @@ -77,6 +84,12 @@ @ONLY ) +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/LXQtTranslateTs.cmake.in" + "${MODULES_INSTALL_DIR}/LXQtTranslateTs.cmake" + @ONLY +) + #----------------------------------------------------------------------------- # Installable mode @@ -100,6 +113,12 @@ @ONLY ) +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/LXQtTranslateTs.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/install/LXQtTranslateTs.cmake" + @ONLY +) + # The package version file is common to superbuild and installable mode configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/lxqt-build-tools-config-version.cmake.in" @@ -121,7 +140,9 @@ install( FILES ${toInstallModules} + ${toInstallModulesHelpers} "${CMAKE_CURRENT_BINARY_DIR}/install/LXQtConfigVars.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/install/LXQtTranslateTs.cmake" DESTINATION "${MODULES_INSTALL_DIR}" ) diff -Nru lxqt-build-tools-0.8.0/debian/changelog lxqt-build-tools-0.9.0/debian/changelog --- lxqt-build-tools-0.8.0/debian/changelog 2021-01-15 20:40:00.000000000 +0000 +++ lxqt-build-tools-0.9.0/debian/changelog 2021-08-06 15:09:12.000000000 +0000 @@ -1,3 +1,12 @@ +lxqt-build-tools (0.9.0-0ubuntu1) impish; urgency=medium + + * New upstream version 0.9.0 + * Update debian/copyright + * Update debian/control to use dephelper-compat (= 13) + * Run wrap-and-sort + + -- apt-ghetto Fri, 06 Aug 2021 17:09:12 +0200 + lxqt-build-tools (0.8.0-1ubuntu1) hirsute; urgency=medium * Merge from Debian unstable. No other changes. diff -Nru lxqt-build-tools-0.8.0/debian/control lxqt-build-tools-0.9.0/debian/control --- lxqt-build-tools-0.8.0/debian/control 2021-01-15 20:40:00.000000000 +0000 +++ lxqt-build-tools-0.9.0/debian/control 2021-08-06 15:09:12.000000000 +0000 @@ -6,7 +6,7 @@ Section: devel Priority: optional Build-Depends: cmake, - debhelper-compat (= 12), + debhelper-compat (= 13), libglib2.0-dev, pkg-config, qtbase5-dev @@ -25,7 +25,7 @@ pkg-config, qttools5-dev, qttools5-dev-tools, - ${misc:Depends}, + ${misc:Depends} Recommends: git, lintian Description: Build tools for the LXQt desktop environment LXQt is an advanced, easy-to-use, and fast desktop environment based on Qt diff -Nru lxqt-build-tools-0.8.0/debian/copyright lxqt-build-tools-0.9.0/debian/copyright --- lxqt-build-tools-0.8.0/debian/copyright 2021-01-15 20:40:00.000000000 +0000 +++ lxqt-build-tools-0.9.0/debian/copyright 2021-08-06 15:09:12.000000000 +0000 @@ -7,15 +7,61 @@ 2010-2012 Razor team License: BSD-3-Clause -Files: cmake/find-modules/FindXdgEmail.cmake - cmake/find-modules/FindXdgMime.cmake cmake/find-modules/FindXdgOpen.cmake - cmake/find-modules/FindXdgScreensaver.cmake - cmake/find-modules/FindXdgSettings.cmake -Copyright: 2019, Luís Pereira +Files: lxqt-transupdate +Copyright: 2018, Alf Gaida +License: BSD-3-Clause + +Files: cmake/find-modules/FindClazy.cmake + cmake/find-modules/FindXdgEmail.cmake + cmake/find-modules/FindXdgMime.cmake + cmake/find-modules/FindXdgOpen.cmake + cmake/find-modules/FindXdgScreensaver.cmake + cmake/find-modules/FindXdgSettings.cmake + cmake/find-modules/FindXdgUserDirs.cmake + cmake/find-modules/FindXKBCommon.cmake + cmake/find-modules/FindXTerm.cmake + cmake/modules/LXQtCreatePkgConfigFile.cmake + cmake/modules/LXQtCreatePortableHeaders.cmake + cmake/modules/LXQtPreventInSourceBuilds.cmake + cmake/modules/LXQtTranslate.cmake + cmake/modules/LXQtTranslateTs.cmake.in + cmake/modules/LXQtTranslationLoader.cmake + cmake/modules/Qt5TranslationLoader.cmake +Copyright: 2014-2015, 2017-2020, Luís Pereira +License: BSD-3-Clause + +Files: cmake/find-modules/FindFontconfig.cmake +Copyright: 2018, Volker Krause + 2006, 2007, Laurent Montel +License: BSD-3-Clause + +Files: cmake/find-modules/FindGLIB.cmake +Copyright: 2016, Luís Pereira + 2012, Raphael Kubo da Costa +License: BSD-3-Clause + +Files: cmake/find-modules/FindUDev.cmake +Copyright: 2016, Luís Pereira + 2010, Rafael Fernández López +License: BSD-3-Clause + +Files: cmake/find-modules/FindXCB.cmake +Copyright: 2015, Jari Vetoniemi +License: BSD-3-Clause + +Files: cmake/modules/ECMFindModuleHelpers.cmake +Copyright: 2014, Alex Merry +License: BSD-3-Clause + +Files: cmake/modules/LXQtCompilerSettings.cmake +Copyright: 2015, Luís Pereira + 2015, Palo Kisa + 2013, Hong Jen Yee (PCMan) License: BSD-3-Clause Files: debian/* -Copyright: 2015-2019 Alf Gaida +Copyright: 2021, Lubuntu Developers + 2015-2019 Alf Gaida License: BSD-3-Clause License: BSD-3-Clause diff -Nru lxqt-build-tools-0.8.0/lxqt-transupdate lxqt-build-tools-0.9.0/lxqt-transupdate --- lxqt-build-tools-0.8.0/lxqt-transupdate 2020-10-30 13:17:17.000000000 +0000 +++ lxqt-build-tools-0.9.0/lxqt-transupdate 2021-04-05 09:30:11.000000000 +0000 @@ -45,6 +45,6 @@ lupdate $SOURCEDIR -ts $i -locations absolute -no-obsolete echo echo "== Language updates ==" - echo "lupdate $SOURCEDIR -ts $TRANSDIR/*.ts -locations absolute -no-obsolete\n" + echo "lupdate $SOURCEDIR -ts $TRANSDIR/*_*.ts -locations absolute -no-obsolete\n" lupdate $SOURCEDIR -ts $TRANSDIR/*_*.ts -locations absolute -no-obsolete done