Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package extra-cmake-modules for 
openSUSE:Factory checked in at 2021-02-17 18:10:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/extra-cmake-modules (Old)
 and      /work/SRC/openSUSE:Factory/.extra-cmake-modules.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "extra-cmake-modules"

Wed Feb 17 18:10:06 2021 rev:86 rq:871664 version:5.79.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/extra-cmake-modules/extra-cmake-modules.changes  
2021-01-13 18:16:56.820957484 +0100
+++ 
/work/SRC/openSUSE:Factory/.extra-cmake-modules.new.28504/extra-cmake-modules.changes
       2021-02-17 18:11:22.817932764 +0100
@@ -1,0 +2,10 @@
+Mon Feb  8 08:45:55 UTC 2021 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.79.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/kde-frameworks-5.79.0
+- Too many changes since 5.78.0, only listing bugfixes:
+  * Fix permissions for scripts (kde#431768)
+
+-------------------------------------------------------------------

Old:
----
  extra-cmake-modules-5.78.0.tar.xz
  extra-cmake-modules-5.78.0.tar.xz.sig

New:
----
  extra-cmake-modules-5.79.0.tar.xz
  extra-cmake-modules-5.79.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ extra-cmake-modules.spec ++++++
--- /var/tmp/diff_new_pack.9PKGYv/_old  2021-02-17 18:11:23.497933321 +0100
+++ /var/tmp/diff_new_pack.9PKGYv/_new  2021-02-17 18:11:23.501933323 +0100
@@ -16,7 +16,7 @@
 #
 
 
-%define _tar_path 5.78
+%define _tar_path 5.79
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
@@ -29,7 +29,7 @@
 # Only needed for the package signature condition
 %bcond_without lang
 Name:           extra-cmake-modules
-Version:        5.78.0
+Version:        5.79.0
 Release:        0
 Summary:        CMake modules
 License:        BSD-3-Clause

++++++ extra-cmake-modules-5.78.0.tar.xz -> extra-cmake-modules-5.79.0.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-cmake-modules-5.78.0/CMakeLists.txt 
new/extra-cmake-modules-5.79.0/CMakeLists.txt
--- old/extra-cmake-modules-5.78.0/CMakeLists.txt       2021-01-02 
10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/CMakeLists.txt       2021-02-05 
16:18:39.000000000 +0100
@@ -11,7 +11,7 @@
 # Preliminary setup
 #
 
-set(VERSION "5.78.0") # handled by release scripts
+set(VERSION "5.79.0") # handled by release scripts
 
 if (POLICY CMP0048)
     cmake_policy(SET CMP0048 NEW)
@@ -96,8 +96,11 @@
 file(GLOB installTestModuleFiles ${CMAKE_SOURCE_DIR}/test-modules/*[^~])
 install(FILES ${installTestModuleFiles} DESTINATION 
${SHARE_INSTALL_DIR}/ECM/test-modules)
 
-file(GLOB installKdeModuleFiles ${CMAKE_SOURCE_DIR}/kde-modules/*[^~])
+file(GLOB installKdeModuleFiles LIST_DIRECTORIES FALSE 
${CMAKE_SOURCE_DIR}/kde-modules/*[^~])
 install(FILES ${installKdeModuleFiles} DESTINATION ${KDE_MODULES_INSTALL_DIR})
+# The scripts need to be executable
+file(GLOB installKDECommitHooks 
${CMAKE_SOURCE_DIR}/kde-modules/kde-git-commit-hooks/*[^~])
+install(PROGRAMS ${installKDECommitHooks} DESTINATION 
${KDE_MODULES_INSTALL_DIR}/kde-git-commit-hooks)
 
 file(GLOB installFindModuleFiles ${CMAKE_SOURCE_DIR}/find-modules/*.cmake 
${CMAKE_SOURCE_DIR}/find-modules/*.py)
 install(FILES ${installFindModuleFiles} DESTINATION 
${FIND_MODULES_INSTALL_DIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/docs/kde-module/KDEGitCommitHooks.rst 
new/extra-cmake-modules-5.79.0/docs/kde-module/KDEGitCommitHooks.rst
--- old/extra-cmake-modules-5.78.0/docs/kde-module/KDEGitCommitHooks.rst        
1970-01-01 01:00:00.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/docs/kde-module/KDEGitCommitHooks.rst        
2021-02-05 16:18:39.000000000 +0100
@@ -0,0 +1 @@
+.. ecm-module:: ../../kde-modules/KDEGitCommitHooks.cmake
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/kde-modules/KDECMakeSettings.cmake 
new/extra-cmake-modules-5.79.0/kde-modules/KDECMakeSettings.cmake
--- old/extra-cmake-modules-5.78.0/kde-modules/KDECMakeSettings.cmake   
2021-01-02 10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/kde-modules/KDECMakeSettings.cmake   
2021-02-05 16:18:39.000000000 +0100
@@ -301,7 +301,7 @@
 # Download translations
 
 function(_repository_name reponame dir)
-    execute_process(COMMAND git config --get remote.origin.url
+    execute_process(COMMAND git remote get-url --all origin
         OUTPUT_VARIABLE giturl
         RESULT_VARIABLE exitCode
         WORKING_DIRECTORY "${dir}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/kde-modules/KDEClangFormat.cmake 
new/extra-cmake-modules-5.79.0/kde-modules/KDEClangFormat.cmake
--- old/extra-cmake-modules-5.78.0/kde-modules/KDEClangFormat.cmake     
2021-01-02 10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/kde-modules/KDEClangFormat.cmake     
2021-02-05 16:18:39.000000000 +0100
@@ -14,15 +14,31 @@
 #
 # Using this function will create a clang-format target that will format all
 # ``<files>`` passed to the function with the predefined KDE clang-format 
style.
+# To format the files you have to invoke the target with ``make clang-format`` 
or ``ninja clang-format``.
+# Once the project is formatted it is recommended to enforce the formatting 
using a pre-commit hook,
+# this can be done using :kde-module:`KDEGitCommitHooks`.
+#
+# The ``.clang-format`` file from ECM will be copied to the source directory. 
This file should not be
+# added to version control. It is recommended to add it to the ``.gitignore`` 
file: ``/.clang-format``.
+#
+# Since 5.79: If the source folder already contains a .clang-format file it is 
not overwritten.
 #
 # Example usage:
 #
 # .. code-block:: cmake
 #
 #   include(KDEClangFormat)
-#   file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
+#   file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
 #   kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
 #
+# To exclude directories from the formatting add a ``.clang-format``
+# file in the directory with the following contents:
+#
+# .. code-block:: yaml
+#
+#    DisableFormat: true
+#    SortIncludes: false
+#
 # Since 5.64
 
 #=============================================================================
@@ -35,29 +51,50 @@
 
 # instantiate our clang-format file, must be in source directory for tooling 
if we have the tool
 if(KDE_CLANG_FORMAT_EXECUTABLE)
-    configure_file(${CMAKE_CURRENT_LIST_DIR}/clang-format.cmake 
${CMAKE_CURRENT_SOURCE_DIR}/.clang-format @ONLY)
+    set(CLANG_FORMAT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format)
+    if (EXISTS ${CLANG_FORMAT_FILE})
+        file(READ ${CLANG_FORMAT_FILE} CLANG_FORMAT_CONTENTS LIMIT 128)
+        string(FIND "${CLANG_FORMAT_CONTENTS}" "SPDX-FileCopyrightText: 2019 
Christoph Cullmann" matchres)
+        if(${matchres} EQUAL -1)
+            message(WARNING "The .clang-format file already exists. Please 
remove it in order to use the file provided by ECM")
+        else()
+            configure_file(${CMAKE_CURRENT_LIST_DIR}/clang-format.cmake 
${CLANG_FORMAT_FILE} @ONLY)
+        endif()
+    else()
+        configure_file(${CMAKE_CURRENT_LIST_DIR}/clang-format.cmake 
${CLANG_FORMAT_FILE} @ONLY)
+    endif()
 endif()
 
 # formatting target
 function(KDE_CLANG_FORMAT)
-    # add target only if clang-format available
+    # add target without specific commands first, we add the real calls 
file-per-file to avoid command line length issues
+    add_custom_target(clang-format COMMENT "Formatting sources in 
${CMAKE_CURRENT_SOURCE_DIR} with ${KDE_CLANG_FORMAT_EXECUTABLE}...")
+
+    # run clang-format only if available, else signal the user what is missing
     if(KDE_CLANG_FORMAT_EXECUTABLE)
-        add_custom_target(clang-format
-        COMMAND
-            ${KDE_CLANG_FORMAT_EXECUTABLE}
-            -style=file
-            -i
-            ${ARGV}
-        WORKING_DIRECTORY
-            ${CMAKE_CURRENT_SOURCE_DIR}
-        COMMENT
-            "Formatting sources in ${CMAKE_CURRENT_SOURCE_DIR} with 
${KDE_CLANG_FORMAT_EXECUTABLE}..."
-        )
+        get_filename_component(_binary_dir ${CMAKE_BINARY_DIR} REALPATH)
+        foreach(_file ${ARGV})
+            # check if the file is inside the build directory => ignore such 
files
+            get_filename_component(_full_file_path ${_file} REALPATH)
+            string(FIND ${_full_file_path} ${_binary_dir} _index)
+            if(NOT _index EQUAL 0)
+                add_custom_command(TARGET clang-format
+                    COMMAND
+                        ${KDE_CLANG_FORMAT_EXECUTABLE}
+                        -style=file
+                        -i
+                        ${_full_file_path}
+                    WORKING_DIRECTORY
+                        ${CMAKE_CURRENT_SOURCE_DIR}
+                    COMMENT
+                        "Formatting ${_full_file_path}..."
+                    )
+            endif()
+        endforeach()
     else()
-        add_custom_target(clang-format
-        COMMAND
-            ${CMAKE_COMMAND} -E echo
-            "Could not set up the clang-format target as the clang-format 
executable is missing."
-        )
+        add_custom_command(TARGET clang-format
+            COMMAND
+                ${CMAKE_COMMAND} -E echo "Could not set up the clang-format 
target as the clang-format executable is missing."
+            )
     endif()
 endfunction()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/kde-modules/KDEFrameworkCompilerSettings.cmake 
new/extra-cmake-modules-5.79.0/kde-modules/KDEFrameworkCompilerSettings.cmake
--- 
old/extra-cmake-modules-5.78.0/kde-modules/KDEFrameworkCompilerSettings.cmake   
    2021-01-02 10:03:08.000000000 +0100
+++ 
new/extra-cmake-modules-5.79.0/kde-modules/KDEFrameworkCompilerSettings.cmake   
    2021-02-05 16:18:39.000000000 +0100
@@ -31,7 +31,6 @@
                 -DQT_NO_CAST_FROM_ASCII
                 -DQT_NO_URL_CAST_FROM_STRING
                 -DQT_NO_CAST_FROM_BYTEARRAY
-                -DQT_NO_SIGNALS_SLOTS_KEYWORDS
                 -DQT_USE_QSTRINGBUILDER
                 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
                )
@@ -44,6 +43,17 @@
     add_definitions(-DQT_STRICT_ITERATORS)
 endif()
 
+# Some non-KF projects make (ab)use of KDEFrameworkCompilerSettings currently,
+# let them only hit this as well when bumping their min. ECM requirement to a 
newer version.
+if (NOT "${ECM_GLOBAL_FIND_VERSION}" VERSION_LESS "5.79.0")
+    add_definitions(
+        -DQT_NO_KEYWORDS
+        -DQT_NO_FOREACH
+    )
+else()
+    add_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS)
+endif()
+
 add_definitions(
     -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
     -DKF_DEPRECATED_WARNINGS_SINCE=0x060000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/kde-modules/KDEGitCommitHooks.cmake 
new/extra-cmake-modules-5.79.0/kde-modules/KDEGitCommitHooks.cmake
--- old/extra-cmake-modules-5.78.0/kde-modules/KDEGitCommitHooks.cmake  
1970-01-01 01:00:00.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/kde-modules/KDEGitCommitHooks.cmake  
2021-02-05 16:18:39.000000000 +0100
@@ -0,0 +1,75 @@
+#.rst:
+# KDEGitCommitHooks
+# --------------------
+#
+# This module provides a functionality to enforce formatting
+# or in the future other QS checks.
+#
+# This module provides the following function:
+#
+# ::
+#
+#   kde_configure_pre_commit_hook(
+#      CHECKS <check1> [<check2> [...]]
+#   )
+#
+# This function will create a pre-commit hook which contains all the given 
checks.
+#
+# Checks:
+#
+# - ``CLANG_FORMAT`` With this check enabled the ``git clang-format`` tool 
will be used to make sure that
+#   the changed parts are properly formatted. In case the changes are not 
properly formatted an error
+#   message with the command to preview the formatting changes and to format 
the files in place
+#   will be displayed. This tool will reuse the exsting ``.clang-format`` 
file, in case you
+#   want to use the one provided by ECM you can include 
``include(KDEClangFormat)`` which will copy
+#   the file to the source dir. It is also recommended to reformat the entire 
project before enforcing
+#   the formatting using this commit hook.
+#
+# Example usage:
+#
+# .. code-block:: cmake
+#
+#   include(KDEGitCommitHooks)
+#   kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
+#
+# Since 5.79
+
+#=============================================================================
+# SPDX-FileCopyrightText: 2020 Alexander Lohnau <[email protected]>
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
+# try to find clang-format in path
+find_program(KDE_CLANG_FORMAT_EXECUTABLE clang-format)
+include(CMakeParseArguments)
+set(PRE_COMMIT_HOOK_UNIX 
"${CMAKE_CURRENT_LIST_DIR}/kde-git-commit-hooks/pre-commit.in")
+set(CLANG_FORMAT_UNIX 
"${CMAKE_CURRENT_LIST_DIR}/kde-git-commit-hooks/clang-format.sh")
+
+function(KDE_CONFIGURE_GIT_PRE_COMMIT_HOOK)
+    set(_oneValueArgs "")
+    set(_multiValueArgs CHECKS)
+    cmake_parse_arguments(ARG "" "${_oneValueArgs}" "${_multiValueArgs}" 
${ARGN} )
+
+    if(NOT ARG_CHECKS)
+        message(FATAL_ERROR "No checks were specified")
+    endif()
+    set(GIT_DIR "${CMAKE_SOURCE_DIR}/.git")
+
+    # In case of tarballs there is no .git directory
+    if (EXISTS ${GIT_DIR})
+        # The pre-commit hook is a bash script, consequently it won't work on 
non-unix platforms
+        if (UNIX)
+            if(KDE_CLANG_FORMAT_EXECUTABLE)
+                list(FIND ARG_CHECKS "CLANG_FORMAT" _index)
+                if (${_index} GREATER -1)
+                    set(CLANG_FORMAT_SCRIPT 
"./.git/hooks/scripts/clang-format.sh")
+                    configure_file(${CLANG_FORMAT_UNIX} 
"${GIT_DIR}/hooks/scripts/clang-format.sh" @ONLY)
+                endif()
+            else()
+                message(WARNING "No clang-format executable was found, 
skipping the formatting pre-commit hook")
+            endif()
+
+            configure_file(${PRE_COMMIT_HOOK_UNIX} 
"${GIT_DIR}/hooks/pre-commit")
+        endif()
+    endif()
+endfunction()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/kde-modules/KDEPackageAppTemplates.cmake 
new/extra-cmake-modules-5.79.0/kde-modules/KDEPackageAppTemplates.cmake
--- old/extra-cmake-modules-5.78.0/kde-modules/KDEPackageAppTemplates.cmake     
2021-01-02 10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/kde-modules/KDEPackageAppTemplates.cmake     
2021-02-05 16:18:39.000000000 +0100
@@ -85,8 +85,10 @@
 
     find_program(_tar_executable NAMES gtar tar)
     if(_tar_executable)
+        # NOTE: we also pass `--sort=name` here to check if the tar exe 
supports that
+        #       this feature was only added in gnu tar v1.28
         execute_process(
-            COMMAND ${_tar_executable} --version
+            COMMAND ${_tar_executable} --sort=name --version
             TIMEOUT 3
             RESULT_VARIABLE _tar_exit
             OUTPUT_VARIABLE _tar_version
@@ -123,7 +125,7 @@
         if(GNU_TAR_FOUND)
             # Make tar archive reproducible, the arguments are only available 
with GNU tar
             add_custom_command(OUTPUT ${_template}
-                COMMAND ${_tar_executable} ARGS -c 
${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
+                COMMAND ${_tar_executable} ARGS -c
                    --exclude .kdev_ignore --exclude .svn --sort=name 
--mode=go=rX,u+rw,a-s --owner=root
                    --group=root --numeric-owner -j -v -f ${_template} .
                 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/kde-modules/clang-format.cmake 
new/extra-cmake-modules-5.79.0/kde-modules/clang-format.cmake
--- old/extra-cmake-modules-5.78.0/kde-modules/clang-format.cmake       
2021-01-02 10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/kde-modules/clang-format.cmake       
2021-02-05 16:18:39.000000000 +0100
@@ -71,3 +71,6 @@
 
 # keep lambda formatting multi-line if not empty
 AllowShortLambdasOnASingleLine: Empty
+
+# We do not want clang-format to put all arguments on a new line
+AllowAllArgumentsOnNextLine: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/kde-modules/kde-git-commit-hooks/clang-format.sh 
new/extra-cmake-modules-5.79.0/kde-modules/kde-git-commit-hooks/clang-format.sh
--- 
old/extra-cmake-modules-5.78.0/kde-modules/kde-git-commit-hooks/clang-format.sh 
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/extra-cmake-modules-5.79.0/kde-modules/kde-git-commit-hooks/clang-format.sh 
    2021-02-05 16:18:39.000000000 +0100
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+# Based on okular/hooks/pre-commit, credits go to Albert Astals Cid
+
+readonly output=$(git clang-format -v --diff)
+
+if [[ "$output" == *"no modified files to format"* ]]; then exit 0; fi
+if [[ "$output" == *"clang-format did not modify any files"* ]]; then exit 0; 
fi
+
+echo "ERROR: You have unformatted changes, please format your files. You can 
do this using the following commands:"
+echo "       git clang-format --force # format the changed parts"
+echo "       git clang-format --diff # preview the changes done by the 
formatter"
+exit 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/kde-modules/kde-git-commit-hooks/pre-commit.in 
new/extra-cmake-modules-5.79.0/kde-modules/kde-git-commit-hooks/pre-commit.in
--- 
old/extra-cmake-modules-5.78.0/kde-modules/kde-git-commit-hooks/pre-commit.in   
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/extra-cmake-modules-5.79.0/kde-modules/kde-git-commit-hooks/pre-commit.in   
    2021-02-05 16:18:39.000000000 +0100
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+${CLANG_FORMAT_SCRIPT}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-cmake-modules-5.78.0/metainfo.yaml 
new/extra-cmake-modules-5.79.0/metainfo.yaml
--- old/extra-cmake-modules-5.78.0/metainfo.yaml        2021-01-02 
10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/metainfo.yaml        2021-02-05 
16:18:39.000000000 +0100
@@ -6,7 +6,7 @@
     - name: Linux
     - name: FreeBSD
     - name: Windows
-    - name: MacOSX
+    - name: macOS
     - name: Android
 portingAid: false
 deprecated: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/modules/ECMQchDoxygen.config.in 
new/extra-cmake-modules-5.79.0/modules/ECMQchDoxygen.config.in
--- old/extra-cmake-modules-5.78.0/modules/ECMQchDoxygen.config.in      
2021-01-02 10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/modules/ECMQchDoxygen.config.in      
2021-02-05 16:18:39.000000000 +0100
@@ -116,8 +116,6 @@
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
 ALPHABETICAL_INDEX     = NO
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          = 
 #---------------------------------------------------------------------------
 # do NOT generate any formats other than qhp
 #---------------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/modules/ECMQtDeclareLoggingCategory.cmake 
new/extra-cmake-modules-5.79.0/modules/ECMQtDeclareLoggingCategory.cmake
--- old/extra-cmake-modules-5.78.0/modules/ECMQtDeclareLoggingCategory.cmake    
2021-01-02 10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/modules/ECMQtDeclareLoggingCategory.cmake    
2021-02-05 16:18:39.000000000 +0100
@@ -95,7 +95,7 @@
 # call which uses the same ``<exportid>``. This can be in the same directory, 
or
 # any subdirectory or parent directory.
 #
-# ``EXPORT`` specifies the group id of categories whose informatipn should be
+# ``EXPORT`` specifies the group id of categories whose information should be
 # stored in the file generated and installed.
 #
 # ``FILE`` specifies the name of the file generated and installed. It will 
default
@@ -329,7 +329,7 @@
         set(ARGS_FILE "${CMAKE_CURRENT_BINARY_DIR}/${ARGS_FILE}")
     endif()
 
-    file(WRITE ${ARGS_FILE}
+    set(_categories_content
 "# KDebugSettings data file
 # This file was generated by ecm_qt_install_logging_categories(). DO NOT EDIT!
 
@@ -350,15 +350,20 @@
 
         # Format:
         # logname<space>description(optional <space> DEFAULT_SEVERITY 
[DEFAULT_CATEGORY] as WARNING/DEBUG/INFO/CRITICAL) optional IDENTIFIER [...])
-        file(APPEND ${ARGS_FILE} "${_category} ${_description} 
${_default_severity}IDENTIFIER [${_identifier}]\n")
+        string(APPEND _categories_content "${_category} ${_description} 
${_default_severity}IDENTIFIER [${_identifier}]\n")
     endforeach()
 
+    file(GENERATE
+        OUTPUT ${ARGS_FILE}
+        CONTENT ${_categories_content}
+    )
+
     set(_renamed_cats_file)
     if (_renamed_categories)
         get_filename_component(_dir ${ARGS_FILE} DIRECTORY)
         get_filename_component(_base_name ${ARGS_FILE} NAME_WE)
         set(_renamed_cats_file "${_dir}/${_base_name}.renamecategories")
-        file(WRITE ${_renamed_cats_file}
+        set(_renamed_cats_content
 "# KDebugSettings data file
 # This file was generated by ecm_qt_install_logging_categories(). DO NOT EDIT!
 
@@ -373,10 +378,15 @@
             foreach(_category_name IN LISTS _category_name_history)
                 # Format:
                 # oldlogname<space>newlogname
-                file(APPEND ${_renamed_cats_file} "${_old_category_name} 
${_category_name}\n")
+                string(APPEND _renamed_cats_content "${_old_category_name} 
${_category_name}\n")
                 set(_old_category_name ${_category_name})
             endforeach()
         endforeach()
+
+        file(GENERATE
+            OUTPUT ${_renamed_cats_file}
+            CONTENT ${_renamed_cats_content}
+        )
     endif()
 
     # install files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-cmake-modules-5.78.0/tests/CMakeLists.txt 
new/extra-cmake-modules-5.79.0/tests/CMakeLists.txt
--- old/extra-cmake-modules-5.78.0/tests/CMakeLists.txt 2021-01-02 
10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/tests/CMakeLists.txt 2021-02-05 
16:18:39.000000000 +0100
@@ -150,7 +150,14 @@
                      KDEInstallDirsTest.relative_or_absolute dummy)
 endif ()
 if (Qt5Core_FOUND)
-    add_test_macro(ECMQtDeclareLoggingCategoryTest testmain)
+    set(ECMQtDeclareLoggingCategoryTest_EXTRA_OPTIONS
+        --build-target all
+        --build-options
+            
"-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/ECMQtDeclareLoggingCategoryTest/InstallDirectory"
+    )
+    add_test_macro(ECMQtDeclareLoggingCategoryTest
+        ${CMAKE_COMMAND} -P 
"${CMAKE_CURRENT_BINARY_DIR}/ECMQtDeclareLoggingCategoryTest/check.cmake"
+    )
 endif()
 
 add_test_macro(FindModules dummy)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/tests/ECMQtDeclareLoggingCategoryTest/CMakeLists.txt
 
new/extra-cmake-modules-5.79.0/tests/ECMQtDeclareLoggingCategoryTest/CMakeLists.txt
--- 
old/extra-cmake-modules-5.78.0/tests/ECMQtDeclareLoggingCategoryTest/CMakeLists.txt
 2021-01-02 10:03:08.000000000 +0100
+++ 
new/extra-cmake-modules-5.79.0/tests/ECMQtDeclareLoggingCategoryTest/CMakeLists.txt
 2021-02-05 16:18:39.000000000 +0100
@@ -7,25 +7,6 @@
 include(ECMQtDeclareLoggingCategory)
 include(CMakeParseArguments)
 
-function (check_file)
-    set(options)
-    set(oneValueArgs GENERATED EXPECTED)
-    set(multiValueArgs)
-    cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" 
"${multiValueArgs}" ${ARGN})
-
-    if (NOT EXISTS "${ARGS_GENERATED}")
-        message(FATAL_ERROR "${ARGS_GENERATED} was not generated")
-    endif()
-    file(READ "${ARGS_GENERATED}" generated_contents)
-    if (NOT EXISTS "${ARGS_EXPECTED}")
-        message(FATAL_ERROR "Original ${ARGS_EXPECTED} was not found")
-    endif()
-    file(READ "${ARGS_EXPECTED}" original_contents)
-    if (NOT "${generated_contents}" STREQUAL "${original_contents}")
-        message(FATAL_ERROR "${generated_file} contains 
'${generated_contents}' instead of '${original_contents}'")
-    endif()
-endfunction()
-
 ecm_qt_declare_logging_category(
     sources
     HEADER "log1.h"
@@ -78,15 +59,8 @@
 ecm_qt_install_logging_categories(
     EXPORT LOG
     FILE log.categories
-    DESTINATION "${CMAKE_BINARY_DIR}/dummyinstall"
-)
-
-check_file(
-    GENERATED "${CMAKE_CURRENT_BINARY_DIR}/log.categories"
-    EXPECTED "${CMAKE_CURRENT_SOURCE_DIR}/log.categories"
-)
-check_file(
-    GENERATED "${CMAKE_CURRENT_BINARY_DIR}/log.renamecategories"
-    EXPECTED "${CMAKE_CURRENT_SOURCE_DIR}/log.renamecategories"
+    DESTINATION "${CMAKE_INSTALL_PREFIX}/share/qlogging-categories5"
 )
 
+# this will be run by CTest
+configure_file(check.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check.cmake" @ONLY)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/tests/ECMQtDeclareLoggingCategoryTest/check.cmake.in
 
new/extra-cmake-modules-5.79.0/tests/ECMQtDeclareLoggingCategoryTest/check.cmake.in
--- 
old/extra-cmake-modules-5.78.0/tests/ECMQtDeclareLoggingCategoryTest/check.cmake.in
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/extra-cmake-modules-5.79.0/tests/ECMQtDeclareLoggingCategoryTest/check.cmake.in
 2021-02-05 16:18:39.000000000 +0100
@@ -0,0 +1,35 @@
+set(CMAKE_MODULE_PATH "@MODULES_DIR@/../kde-modules")
+set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
+set(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
+
+
+###########################################################
+
+function (check_file)
+    set(options)
+    set(oneValueArgs GENERATED EXPECTED)
+    set(multiValueArgs)
+    cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" 
"${multiValueArgs}" ${ARGN})
+
+    if (NOT EXISTS "${ARGS_GENERATED}")
+        message(FATAL_ERROR "${ARGS_GENERATED} was not generated")
+    endif()
+    file(READ "${ARGS_GENERATED}" generated_contents)
+    if (NOT EXISTS "${ARGS_EXPECTED}")
+        message(FATAL_ERROR "Original ${ARGS_EXPECTED} was not found")
+    endif()
+    file(READ "${ARGS_EXPECTED}" original_contents)
+    if (NOT "${generated_contents}" STREQUAL "${original_contents}")
+        message(FATAL_ERROR "${generated_file} contains 
'${generated_contents}' instead of '${original_contents}'")
+    endif()
+endfunction()
+
+
+check_file(
+    GENERATED "${CMAKE_CURRENT_BINARY_DIR}/log.categories"
+    EXPECTED "${CMAKE_CURRENT_SOURCE_DIR}/log.categories"
+)
+check_file(
+    GENERATED "${CMAKE_CURRENT_BINARY_DIR}/log.renamecategories"
+    EXPECTED "${CMAKE_CURRENT_SOURCE_DIR}/log.renamecategories"
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.78.0/toolchain/generate-fastlane-metadata.py 
new/extra-cmake-modules-5.79.0/toolchain/generate-fastlane-metadata.py
--- old/extra-cmake-modules-5.78.0/toolchain/generate-fastlane-metadata.py      
2021-01-02 10:03:08.000000000 +0100
+++ new/extra-cmake-modules-5.79.0/toolchain/generate-fastlane-metadata.py      
2021-02-05 16:18:39.000000000 +0100
@@ -120,8 +120,12 @@
     if 'source-repo' in data:
         info['SourceCode'] = data['source-repo']
 
+    if 'url-donation' in data:
+        info['Donate'] = data['url-donation'][None]
+    else:
+        info['Donate'] = 'https://kde.org/community/donations/'
+
     # static data
-    info['Donate'] = 'https://kde.org/community/donations/'
     info['Translation'] = 'https://l10n.kde.org/'
 
     # Finally, with our updates completed, we can save the updated appname.yml 
file back to disk
@@ -188,33 +192,16 @@
         archive.write(file, file)
     os.chdir(oldcwd)
 
-# Main function for extracting metadata from APK files
-def processApkFile(apkFilepath):
-    # First, determine the name of the application we have here
-    # This is needed in order to locate the metadata files within the APK that 
have the information we need
-
-    # Prepare the aapt (Android SDK command) to inspect the provided APK
-    commandToRun = "aapt dump badging %s" % (apkFilepath)
-    manifest = subprocess.check_output( commandToRun, shell=True 
).decode('utf-8')
-    # Search through the aapt output for the name of the application
-    result = re.search(' name=\'([^\']*)\'', manifest)
-    applicationName = result.group(1)
-
-    # Attempt to look within the APK provided for the metadata information we 
will need
-    with zipfile.ZipFile(apkFilepath, 'r') as contents:
-        appdataFile = contents.open("assets/share/metainfo/%s.appdata.xml" % 
applicationName)
-        desktopFileContent = None
-        try:
-            desktopFileContent = 
contents.read("assets/share/applications/%s.desktop" % applicationName)
-        except:
-            None
-        processAppstreamData(applicationName, appdataFile.read(), 
desktopFileContent)
+# Generate metadata for the given appstream and desktop files
+def processAppstreamFile(appstreamFileName, desktopFileName):
+    # appstreamFileName has the form <id>.appdata.xml or <id>.metainfo.xml, so 
we
+    # have to strip off two extensions
+    applicationName = 
os.path.splitext(os.path.splitext(os.path.basename(appstreamFileName))[0])[0]
 
-# Extract meta data from appstream/desktop file contents
-def processAppstreamData(applicationName, appstreamData, desktopData):
     data = {}
     # Within this file we look at every entry, and where possible try to 
export it's content so we can use it later
-    root = ET.fromstring(appstreamData)
+    appstreamFile = open(appstreamFileName, "rb")
+    root = ET.fromstring(appstreamFile.read())
     for child in root:
         # Make sure we start with a blank slate for this entry
         output = {}
@@ -257,15 +244,9 @@
     # Did we find any categories?
     # Sometimes we don't find any within the Fastlane information, but without 
categories the F-Droid store isn't of much use
     # In the event this happens, fallback to the *.desktop file for the 
application to see if it can provide any insight.
-    if not 'categories' in data and desktopData:
-        # The Python XDG extension/wrapper requires that it be able to read 
the file itself
-        # To ensure it is able to do this, we transfer the content of the file 
from the APK out to a temporary file to keep it happy
-        (fd, path) = tempfile.mkstemp(suffix=applicationName + ".desktop")
-        handle = open(fd, "wb")
-        handle.write(desktopData)
-        handle.close()
+    if not 'categories' in data and desktopFileName:
         # Parse the XDG format *.desktop file, and extract the categories 
within it
-        desktopFile = xdg.DesktopEntry.DesktopEntry(path)
+        desktopFile = xdg.DesktopEntry.DesktopEntry(desktopFileName)
         data['categories'] = { None: desktopFile.getCategories() }
 
     # Try to figure out the source repository
@@ -289,16 +270,6 @@
     # put the result in an archive file for easier use by Jenkins
     createMetadataArchive(applicationName)
 
-# Generate metadata for the given appstream and desktop files
-def processAppstreamFile(appstreamFileName, desktopFileName):
-    appstreamFile = open(appstreamFileName, "rb")
-    desktopData = None
-    if desktopFileName and os.path.exists(desktopFileName):
-        desktopFile = open(desktopFileName, "rb")
-        desktopData = desktopFile.read()
-    applicationName = os.path.basename(appstreamFileName)[:-12]
-    processAppstreamData(applicationName, appstreamFile.read(), desktopData)
-
 # scan source directory for manifests/metadata we can work with
 def scanSourceDir():
     files = glob.iglob(arguments.source + "/**/AndroidManifest.xml*", 
recursive=True)
@@ -320,7 +291,8 @@
             continue
 
         # now that we have the app id, look for matching appdata/desktop files
-        appdataFiles = glob.iglob(arguments.source + "/**/" + appname + 
".appdata.xml", recursive=True)
+        appdataFiles = glob.glob(arguments.source + "/**/" + appname + 
".metainfo.xml", recursive=True)
+        appdataFiles.extend(glob.glob(arguments.source + "/**/" + appname + 
".appdata.xml", recursive=True))
         appdataFile = None
         for f in appdataFiles:
             appdataFile = f
@@ -341,7 +313,6 @@
 
 # Parse the command line arguments we've been given
 parser = argparse.ArgumentParser(description='Generate fastlane metadata for 
Android apps from appstream metadata')
-parser.add_argument('--apk', type=str, required=False, help='APK file to 
extract metadata from')
 parser.add_argument('--appstream', type=str, required=False, help='Appstream 
file to extract metadata from')
 parser.add_argument('--desktop', type=str, required=False, help='Desktop file 
to extract additional metadata from')
 parser.add_argument('--source', type=str, required=False, help='Source 
directory to find metadata in')
@@ -356,12 +327,6 @@
     processAppstreamFile(arguments.appstream, arguments.desktop)
     sys.exit(0)
 
-# else, if we have an APK, try to find the appstream file in there
-# this ensures compatibility with the old metadata generation
-if arguments.apk and os.path.exists(arguments.apk):
-    processApkFile(arguments.apk)
-    sys.exit(0)
-
 # else, look in the source dir for appstream/desktop files
 # this follows roughly what get-apk-args from binary factory does
 if arguments.source and os.path.exists(arguments.source):
@@ -369,5 +334,5 @@
     sys.exit(0)
 
 # else: missing arguments
-print("Either one of --appstream, --apk or --source have to be provided!")
+print("Either one of --appstream or --source have to be provided!")
 sys.exit(1)

Reply via email to