commit extra-cmake-modules for openSUSE:Factory
Hello community, here is the log from the commit of package extra-cmake-modules for openSUSE:Factory checked in at 2018-10-01 08:03:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/extra-cmake-modules (Old) and /work/SRC/openSUSE:Factory/.extra-cmake-modules.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "extra-cmake-modules" Mon Oct 1 08:03:28 2018 rev:57 rq:635970 version:5.50.0 Changes: -------- --- /work/SRC/openSUSE:Factory/extra-cmake-modules/extra-cmake-modules.changes 2018-08-24 16:51:48.921199500 +0200 +++ /work/SRC/openSUSE:Factory/.extra-cmake-modules.new/extra-cmake-modules.changes 2018-10-01 08:04:53.262401874 +0200 @@ -1,0 +2,19 @@ +Thu Sep 13 21:58:44 UTC 2018 - lbeltrame@kde.org + +- Update to 5.50.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.50.0.php +- Changes since 5.49.0: + * Revert "Add _XOPEN_SOURCE to C definitions" + * Bindings: Check if bindings can be generated for a specific python version + * Bindings: Use python version matching the found clang python module + * Bindings: Make generator forward compatible with Python 3 + * Disable alteration of QT_PLUGIN_PATH by ECM when running tests. + * Add _XOPEN_SOURCE to C definitions (kde#373175) + * Change documentation to reflect the real toolchain CMake name + * Bindings: Add support for scoped enums (kde#397154) + * Bindings: Check for libclang without version suffix also + * Make it possible for ECM to detect po files at configure time + +------------------------------------------------------------------- Old: ---- extra-cmake-modules-5.49.0.tar.xz New: ---- extra-cmake-modules-5.50.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ extra-cmake-modules.spec ++++++ --- /var/tmp/diff_new_pack.fok2Y9/_old 2018-10-01 08:04:53.646401668 +0200 +++ /var/tmp/diff_new_pack.fok2Y9/_new 2018-10-01 08:04:53.650401667 +0200 @@ -16,7 +16,7 @@ # -%define _tar_path 5.49 +%define _tar_path 5.50 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) @@ -27,7 +27,7 @@ %bcond_with doc %endif Name: extra-cmake-modules -Version: 5.49.0 +Version: 5.50.0 Release: 0 Summary: CMake modules License: BSD-3-Clause ++++++ extra-cmake-modules-5.49.0.tar.xz -> extra-cmake-modules-5.50.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.49.0/CMakeLists.txt new/extra-cmake-modules-5.50.0/CMakeLists.txt --- old/extra-cmake-modules-5.49.0/CMakeLists.txt 2018-08-04 10:36:56.000000000 +0200 +++ new/extra-cmake-modules-5.50.0/CMakeLists.txt 2018-09-01 11:20:25.000000000 +0200 @@ -32,7 +32,7 @@ # Preliminary setup # -set(VERSION "5.49.0") # handled by release scripts +set(VERSION "5.50.0") # handled by release scripts if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.49.0/find-modules/FindPythonModuleGeneration.cmake new/extra-cmake-modules-5.50.0/find-modules/FindPythonModuleGeneration.cmake --- old/extra-cmake-modules-5.49.0/find-modules/FindPythonModuleGeneration.cmake 2018-08-04 10:36:56.000000000 +0200 +++ new/extra-cmake-modules-5.50.0/find-modules/FindPythonModuleGeneration.cmake 2018-09-01 11:20:25.000000000 +0200 @@ -100,13 +100,22 @@ python${_CURRENT_VERSION}u python${_CURRENT_VERSION} ) + # sip.h is version agnostic, it may be located in the version specific path + # or one of the default locations + find_path(GPB_PYTHON${version}_SIP_DIR + NAMES sip.h + PATHS + ${GPB_PYTHON${version}_INCLUDE_DIR} + ) endif() find_program(GPB_PYTHON${version}_COMMAND python${version}) endmacro() macro(_create_imported_python_target version) - if(GPB_PYTHON${version}_LIBRARY AND GPB_PYTHON${version}_INCLUDE_DIR AND EXISTS "${GPB_PYTHON${version}_INCLUDE_DIR}/patchlevel.h") + if(GPB_PYTHON${version}_LIBRARY AND GPB_PYTHON${version}_INCLUDE_DIR AND + EXISTS "${GPB_PYTHON${version}_INCLUDE_DIR}/patchlevel.h" AND + EXISTS "${GPB_PYTHON${version}_SIP_DIR}/sip.h") list(APPEND _pyversions ${version}) file(STRINGS "${GPB_PYTHON${version}_INCLUDE_DIR}/patchlevel.h" python_version_define @@ -174,13 +183,9 @@ _report_NOT_FOUND("The sip executable must be available to use ${CMAKE_FIND_PACKAGE_NAME}.") endif() -if (NOT GPB_PYTHON2_COMMAND) - _report_NOT_FOUND("The python2 executable is required by clang-python for the ${CMAKE_FIND_PACKAGE_NAME} Module.") -endif() - if (NOT libclang_LIBRARY) set(_LIBCLANG_MAX_MAJOR_VERSION 7) - set(_LIBCLANG_MIN_MAJOR_VERSION 4) + set(_LIBCLANG_MIN_MAJOR_VERSION 5) find_library(libclang_LIBRARY clang-${_LIBCLANG_MAX_MAJOR_VERSION}.0) @@ -196,10 +201,7 @@ endwhile() if (NOT libclang_LIBRARY) - find_library(libclang_LIBRARY clang-3.9) - if (NOT libclang_LIBRARY) - find_library(libclang_LIBRARY clang-3.8) - endif() + find_library(libclang_LIBRARY clang) endif() else() string(REGEX MATCH ".*clang-([0-9]+\\.[0-9]+).*" _GPB_CLANG_SUFFIX ${libclang_LIBRARY}) @@ -207,16 +209,35 @@ endif() if (NOT libclang_LIBRARY) - _report_NOT_FOUND("Could not find libclang version 3.8 or greater.") + _report_NOT_FOUND("Could not find libclang version 5.0 or greater.") +else() + message(STATUS "Found ${libclang_LIBRARY}") endif() -execute_process( - COMMAND ${GPB_PYTHON2_COMMAND} ${CMAKE_CURRENT_LIST_DIR}/sip_generator.py --self-check ${libclang_LIBRARY} - RESULT_VARIABLE selfCheckErrors -) +foreach (pyversion "2" "3") + set(GPB_PYTHON_COMMAND ${GPB_PYTHON${pyversion}_COMMAND}) + if (NOT GPB_PYTHON_COMMAND) + continue() + endif() + message(STATUS "Testing if ${GPB_PYTHON_COMMAND} can be used to run sip_generator") + + execute_process( + COMMAND ${GPB_PYTHON_COMMAND} ${CMAKE_CURRENT_LIST_DIR}/sip_generator.py --self-check ${libclang_LIBRARY} + RESULT_VARIABLE selfCheckErrors + ERROR_QUIET + ) + + if (selfCheckErrors) + message(STATUS "sip_generator self-check for ${GPB_PYTHON_COMMAND} failed") + unset(GPB_PYTHON_COMMAND) + else() + message(STATUS "Self-check passed, Using ${GPB_PYTHON_COMMAND} to generate bindings") + break() + endif() +endforeach() -if (selfCheckErrors) - _report_NOT_FOUND("sip_generator failed a self-check for the ${CMAKE_FIND_PACKAGE_NAME} Module.") +if (NOT GPB_PYTHON_COMMAND) + _report_NOT_FOUND("No usable python version found to run sip_generator for the ${CMAKE_FIND_PACKAGE_NAME} Module.") endif() get_filename_component(libclang_file "${libclang_file}" REALPATH) @@ -352,7 +373,7 @@ set(comp_flags "$<JOIN:$<TARGET_PROPERTY:${target_value},INTERFACE_COMPILE_OPTIONS>;${stdFlag},;>") add_custom_command(OUTPUT ${sip_file} - COMMAND ${GPB_PYTHON2_COMMAND} ${GPB_MODULE_DIR}/sip_generator.py + COMMAND ${GPB_PYTHON_COMMAND} ${GPB_MODULE_DIR}/sip_generator.py --flags " ${inc_dirs};${sys_inc_dirs};${comp_defs};${comp_flags}" --include_filename "${hdr_filename}" ${libclang_LIBRARY} @@ -400,7 +421,7 @@ add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}/unified${modulename_value}.cpp" - COMMAND ${GPB_PYTHON2_COMMAND} "${GPB_MODULE_DIR}/run-sip.py" --sip ${GBP_SIP_COMMAND} + COMMAND ${GPB_PYTHON_COMMAND} "${GPB_MODULE_DIR}/run-sip.py" --sip ${GBP_SIP_COMMAND} --unify "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}/unified${modulename_value}.cpp" --module-name "${modulename_value}" -c "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}" @@ -422,6 +443,7 @@ "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}") foreach(pyversion ${_pyversions}) + message(STATUS "Found dependencies for python${pyversion}, generating bindings") execute_process(COMMAND "${CMAKE_COMMAND}" "-DPYTHON_UMBRELLA_MODULE_FILE=${CMAKE_BINARY_DIR}/py${pyversion}/${pythonnamespace_value}/__init__.py" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.49.0/find-modules/rules_engine.py new/extra-cmake-modules-5.50.0/find-modules/rules_engine.py --- old/extra-cmake-modules-5.49.0/find-modules/rules_engine.py 2018-08-04 10:36:56.000000000 +0200 +++ new/extra-cmake-modules-5.50.0/find-modules/rules_engine.py 2018-09-01 11:20:25.000000000 +0200 @@ -113,7 +113,7 @@ logger.debug(_("Rule {} suppressed {}, {}").format(self, fqn, original)) else: delta = False - for k, v in original.iteritems(): + for k, v in original.items(): if v != modified[k]: delta = True break @@ -620,7 +620,7 @@ logger.debug(_("Rule {} suppressed {}, {}").format(self, fqn, original)) else: delta = False - for k, v in original.iteritems(): + for k, v in original.items(): if v != modified[k]: delta = True break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.49.0/find-modules/sip_generator.py new/extra-cmake-modules-5.50.0/find-modules/sip_generator.py --- old/extra-cmake-modules-5.49.0/find-modules/sip_generator.py 2018-08-04 10:36:56.000000000 +0200 +++ new/extra-cmake-modules-5.50.0/find-modules/sip_generator.py 2018-09-01 11:20:25.000000000 +0200 @@ -416,7 +416,10 @@ def _enum_get(self, container, enum, level): pad = " " * (level * 4) - decl = pad + "enum {} {{\n".format(enum.displayname) + scoped = "" + if enum.is_scoped_enum(): + scoped = "class " + decl = pad + "enum {}{} {{\n".format(scoped, enum.displayname) enumerations = [] for enum in enum.get_children(): # @@ -609,7 +612,10 @@ typeText = text typeInit = "" - prefix = parameterType.spelling.rsplit("::", 1)[0] + if parameterType.kind == TypeKind.ENUM and parameterType.get_declaration().is_scoped_enum(): + prefix = parameterType.spelling + else: + prefix = parameterType.spelling.rsplit("::", 1)[0] if "::" in typeText: typeText = typeText.rsplit("::", 1)[1] return prefix + "::" + typeText + typeInit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.49.0/kde-modules/KDECMakeSettings.cmake new/extra-cmake-modules-5.50.0/kde-modules/KDECMakeSettings.cmake --- old/extra-cmake-modules-5.49.0/kde-modules/KDECMakeSettings.cmake 2018-08-04 10:36:56.000000000 +0200 +++ new/extra-cmake-modules-5.50.0/kde-modules/KDECMakeSettings.cmake 2018-09-01 11:20:25.000000000 +0200 @@ -91,6 +91,13 @@ # should be downloaded when building the project. # # Since 5.34.0 +# +# ``KDE_L10N_SYNC_TRANSLATIONS`` (OFF by default) will download the translations at configuration +# time instead of build time. +# +# Since 5.50.0 +# +# #============================================================================= # Copyright 2014 Alex Merry <alex.merry@kde.org> @@ -312,9 +319,10 @@ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/po AND NOT TARGET fetch-translations) option(KDE_L10N_AUTO_TRANSLATIONS "Automatically 'make fetch-translations`" OFF) + option(KDE_L10N_SYNC_TRANSLATIONS "Fetch translations when KDECMakeSettings.cmake is processed." OFF) set(KDE_L10N_BRANCH "trunk" CACHE STRING "Branch from l10n.kde.org to fetch from: trunk | stable | lts | trunk_kde4 | stable_kde4") - if(KDE_L10N_AUTO_TRANSLATIONS) + if(KDE_L10N_AUTO_TRANSLATIONS AND NOT KDE_L10N_SYNC_TRANSLATIONS) set(_EXTRA_ARGS "ALL") else() set(_EXTRA_ARGS) @@ -323,9 +331,12 @@ set(_reponame "") _repository_name(_reponame "${CMAKE_SOURCE_DIR}") + set(releaseme_clone_commands + COMMAND git clone --depth 1 https://anongit.kde.org/releaseme.git + ) add_custom_command( OUTPUT "${CMAKE_BINARY_DIR}/releaseme" - COMMAND git clone --depth 1 "https://anongit.kde.org/releaseme.git" + ${releaseme_clone_commands} COMMENT "Fetching releaseme scripts to download translations..." ) @@ -336,18 +347,27 @@ set(extra BYPRODUCTS ${_l10n_po_dir} ${_l10n_poqm_dir}) endif() - add_custom_target(fetch-translations ${_EXTRA_ARGS} - COMMENT "Downloading translations for ${_reponame} branch ${KDE_L10N_BRANCH}..." - COMMAND git -C "${CMAKE_BINARY_DIR}/releaseme" pull - COMMAND cmake -E remove_directory ${_l10n_po_dir} - COMMAND cmake -E remove_directory ${_l10n_poqm_dir} + set(fetch_commands COMMAND ruby "${CMAKE_BINARY_DIR}/releaseme/fetchpo.rb" --origin ${KDE_L10N_BRANCH} --project "${_reponame}" --output-dir "${_l10n_po_dir}" --output-poqm-dir "${_l10n_poqm_dir}" "${CMAKE_CURRENT_SOURCE_DIR}" + ) + + add_custom_target(fetch-translations ${_EXTRA_ARGS} + COMMENT "Downloading translations for ${_reponame} branch ${KDE_L10N_BRANCH}..." + COMMAND git -C "${CMAKE_BINARY_DIR}/releaseme" pull + COMMAND cmake -E remove_directory ${_l10n_po_dir} + COMMAND cmake -E remove_directory ${_l10n_poqm_dir} + ${fetch_commands} ${extra} DEPENDS "${CMAKE_BINARY_DIR}/releaseme" ) + + if (KDE_L10N_SYNC_TRANSLATIONS AND (NOT EXISTS ${_l10n_po_dir} OR NOT EXISTS ${_l10n_poqm_dir})) + execute_process(${releaseme_clone_commands}) + execute_process(${fetch_commands}) + endif() endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.49.0/modules/ECMAddTests.cmake new/extra-cmake-modules-5.50.0/modules/ECMAddTests.cmake --- old/extra-cmake-modules-5.49.0/modules/ECMAddTests.cmake 2018-08-04 10:36:56.000000000 +0200 +++ new/extra-cmake-modules-5.50.0/modules/ECMAddTests.cmake 2018-09-01 11:20:25.000000000 +0200 @@ -114,15 +114,15 @@ add_test(NAME ${_testname} COMMAND ${_targetname}) target_link_libraries(${_targetname} ${ARG_LINK_LIBRARIES}) ecm_mark_as_test(${_targetname}) - if (CMAKE_LIBRARY_OUTPUT_DIRECTORY) - if(CMAKE_HOST_SYSTEM MATCHES "Windows") - set(PATHSEP "\\;") - else() # e.g. Linux - set(PATHSEP ":") - endif() - set(_plugin_path $ENV{QT_PLUGIN_PATH}) - set_property(TEST ${_testname} PROPERTY ENVIRONMENT QT_PLUGIN_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${PATHSEP}${_plugin_path}) - endif() + #if (CMAKE_LIBRARY_OUTPUT_DIRECTORY) + # if(CMAKE_HOST_SYSTEM MATCHES "Windows") + # set(PATHSEP "\\;") + # else() # e.g. Linux + # set(PATHSEP ":") + # endif() + # set(_plugin_path $ENV{QT_PLUGIN_PATH}) + # set_property(TEST ${_testname} PROPERTY ENVIRONMENT QT_PLUGIN_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${PATHSEP}${_plugin_path}) + #endif() if (ARG_TARGET_NAME_VAR) set(${ARG_TARGET_NAME_VAR} "${_targetname}" PARENT_SCOPE) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.49.0/modules/ECMPoQmTools.cmake new/extra-cmake-modules-5.50.0/modules/ECMPoQmTools.cmake --- old/extra-cmake-modules-5.49.0/modules/ECMPoQmTools.cmake 2018-08-04 10:36:56.000000000 +0200 +++ new/extra-cmake-modules-5.50.0/modules/ECMPoQmTools.cmake 2018-09-01 11:20:25.000000000 +0200 @@ -213,6 +213,20 @@ set(install_destination share/locale) endif() + get_filename_component(absolute_podir ${podir} ABSOLUTE) + + # we try to find the po directory in the binary directory, in case it was downloaded + # using ECM + if (NOT (EXISTS "${absolute_podir}" AND IS_DIRECTORY "${absolute_podir}")) + get_filename_component(absolute_podir ${CMAKE_BINARY_DIR}/${podir} ABSOLUTE) + endif() + + if (NOT (EXISTS "${absolute_podir}" AND IS_DIRECTORY "${absolute_podir}")) + # Nothing to do if there's no podir and it would create an empty + # LOCALE_INSTALL_DIR in that case. + return() + endif() + file(GLOB po_files "${podir}/*/*.po") foreach(po_file ${po_files}) get_filename_component(po_dir ${po_file} DIRECTORY) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.49.0/toolchain/Android.cmake new/extra-cmake-modules-5.50.0/toolchain/Android.cmake --- old/extra-cmake-modules-5.49.0/toolchain/Android.cmake 2018-08-04 10:36:56.000000000 +0200 +++ new/extra-cmake-modules-5.50.0/toolchain/Android.cmake 2018-09-01 11:20:25.000000000 +0200 @@ -27,9 +27,9 @@ # ===== # # To use this file, you need to set the ``CMAKE_TOOLCHAIN_FILE`` to point to -# ``AndroidToolchain.cmake`` on the command line:: +# ``Android.cmake`` on the command line:: # -# cmake -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/AndroidToolchain.cmake +# cmake -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake # # You will also need to provide the locations of the Android NDK and SDK. This # can be done on the commandline or with environment variables; in either case @@ -66,7 +66,7 @@ # the prefix ``/opt/android/foo``, you would use:: # # cmake \ -# -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/AndroidToolchain.cmake \ +# -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \ # -DECM_ADDITIONAL_FIND_ROOT_PATH="/opt/android/Qt5/5.7/android_armv7;/opt/android/foo" # # If your project uses ``find_package()`` to locate build tools on the host @@ -90,7 +90,7 @@ # For example, you could do:: # # cmake \ -# -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/AndroidToolchain.cmake \ +# -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \ # -DQTANDROID_EXPORTED_TARGET=myapp \ # -DANDROID_APK_DIR=myapp-apk # make
participants (1)
-
root