diff -Nru extra-cmake-modules-5.18.0/.arcconfig extra-cmake-modules-5.44.0/.arcconfig --- extra-cmake-modules-5.18.0/.arcconfig 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/.arcconfig 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,3 @@ +{ + "phabricator.uri" : "https://phabricator.kde.org/project/view/90/" +} diff -Nru extra-cmake-modules-5.18.0/attic/modules/config-alsa.h.cmake extra-cmake-modules-5.44.0/attic/modules/config-alsa.h.cmake --- extra-cmake-modules-5.18.0/attic/modules/config-alsa.h.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/config-alsa.h.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LINUX_AWE_VOICE_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_AWE_VOICE_H 1 - -/* Define to 1 if you have the - header file. */ -#cmakedefine HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H 1 - -/* Define to 1 if you have the - header file. */ -#cmakedefine HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_AWE_VOICE_H 1 - -/* Define if you have libasound.so.2 (required for ALSA 0.9.x support) */ -#cmakedefine HAVE_LIBASOUND2 1 - -/* Define if libasound has snd_pcm_resume() */ -#cmakedefine HAVE_SND_PCM_RESUME 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ALSA_ASOUNDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_ASOUNDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_SOUNDCARD_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MACHINE_SOUNDCARD_H 1 diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindAlsa.cmake extra-cmake-modules-5.44.0/attic/modules/FindAlsa.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindAlsa.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindAlsa.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -# Alsa check, based on libkmid/configure.in.in. -# Only the support for Alsa >= 0.9.x was included; 0.5.x was dropped (but feel free to re-add it if you need it) -# It defines ... -# It offers the following macros: -# ALSA_CONFIGURE_FILE(config_header) - generate a config.h, typical usage: -# ALSA_CONFIGURE_FILE(${CMAKE_BINARY_DIR}/config-alsa.h) -# ALSA_VERSION_STRING(version_string) looks for alsa/version.h and reads the version string into -# the first argument passed to the macro - -# Copyright (c) 2006, David Faure, -# Copyright (c) 2007, Matthias Kretz -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -include(CheckIncludeFiles) -include(CheckIncludeFileCXX) -include(CheckLibraryExists) - -# Already done by toplevel -find_library(ASOUND_LIBRARY asound) -set(ASOUND_LIBRARY_DIR "") -if(ASOUND_LIBRARY) - get_filename_component(ASOUND_LIBRARY_DIR ${ASOUND_LIBRARY} PATH) -endif() - -check_library_exists(asound snd_seq_create_simple_port "${ASOUND_LIBRARY_DIR}" HAVE_LIBASOUND2) -if(HAVE_LIBASOUND2) - message(STATUS "Found ALSA: ${ASOUND_LIBRARY}") -else() - message(STATUS "ALSA not found") -endif() -set(ALSA_FOUND ${HAVE_LIBASOUND2}) - -find_path(ALSA_INCLUDES alsa/version.h) - -macro(ALSA_VERSION_STRING _result) - # check for version in alsa/version.h - if(ALSA_INCLUDES) - file(READ "${ALSA_INCLUDES}/alsa/version.h" _ALSA_VERSION_CONTENT) - string(REGEX REPLACE ".*SND_LIB_VERSION_STR.*\"(.*)\".*" "\\1" ${_result} "${_ALSA_VERSION_CONTENT}") - else() - message(STATUS "ALSA version not known. ALSA output will probably not work correctly.") - endif() -endmacro(ALSA_VERSION_STRING _result) - - -get_filename_component(_FIND_ALSA_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) -macro(ALSA_CONFIGURE_FILE _destFile) - check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H) - check_include_files(machine/soundcard.h HAVE_MACHINE_SOUNDCARD_H) - - check_include_files(linux/awe_voice.h HAVE_LINUX_AWE_VOICE_H) - check_include_files(awe_voice.h HAVE_AWE_VOICE_H) - check_include_files(/usr/src/sys/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H) - check_include_files(/usr/src/sys/gnu/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H) - - check_include_file_cxx(sys/asoundlib.h HAVE_SYS_ASOUNDLIB_H) - check_include_file_cxx(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H) - - check_library_exists(asound snd_pcm_resume "${ASOUND_LIBRARY_DIR}" ASOUND_HAS_SND_PCM_RESUME) - if(ASOUND_HAS_SND_PCM_RESUME) - set(HAVE_SND_PCM_RESUME 1) - endif() - - configure_file(${_FIND_ALSA_MODULE_DIR}/config-alsa.h.cmake ${_destFile}) -endmacro(ALSA_CONFIGURE_FILE _destFile) - -mark_as_advanced(ALSA_INCLUDES ASOUND_LIBRARY) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindEigen2.cmake extra-cmake-modules-5.44.0/attic/modules/FindEigen2.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindEigen2.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindEigen2.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -# - Try to find Eigen2 lib -# -# This module supports requiring a minimum version, e.g. you can do -# find_package(Eigen2 2.0.3) -# to require version 2.0.3 to newer of Eigen2. -# -# Once done this will define -# -# EIGEN2_FOUND - system has eigen lib with correct version -# EIGEN2_INCLUDE_DIR - the eigen include directory -# EIGEN2_VERSION - eigen version - -# Copyright (c) 2006, 2007 Montel Laurent, -# Copyright (c) 2008, 2009 Gael Guennebaud, -# Redistribution and use is allowed according to the terms of the BSD license. - -if(NOT Eigen2_FIND_VERSION) - set(Eigen2_FIND_VERSION_MAJOR 2) - set(Eigen2_FIND_VERSION_MINOR 0) - set(Eigen2_FIND_VERSION_PATCH 0) - - set(Eigen2_FIND_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}") -endif() - -macro(_eigen2_get_version) - file(READ "${EIGEN2_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header LIMIT 5000 OFFSET 1000) - - string(REGEX MATCH "define *EIGEN_WORLD_VERSION ([0-9]*)" _eigen2_world_version_match "${_eigen2_version_header}") - set(EIGEN2_WORLD_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define *EIGEN_MAJOR_VERSION ([0-9]*)" _eigen2_major_version_match "${_eigen2_version_header}") - set(EIGEN2_MAJOR_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define *EIGEN_MINOR_VERSION ([0-9]*)" _eigen2_minor_version_match "${_eigen2_version_header}") - set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}") - - set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION}) -endmacro(_eigen2_get_version) - -find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core - PATHS - ${INCLUDE_INSTALL_DIR} - ${KDE4_INCLUDE_DIR} - PATH_SUFFIXES eigen2 - ) - -if(EIGEN2_INCLUDE_DIR) - _eigen2_get_version() -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Eigen2 REQUIRED_VARS EIGEN2_INCLUDE_DIR - VERSION_VAR EIGEN2_VERSION) - -mark_as_advanced(EIGEN2_INCLUDE_DIR) - - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindEigen.cmake extra-cmake-modules-5.44.0/attic/modules/FindEigen.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindEigen.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindEigen.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -# Note that Eigen1 is deprecated in favor of Eigen2. So this file is deprecated -# in favor of FindEigen2.cmake. It is kept only for compatibility. -# -# - Try to find Eigen1 library -# Once done this will define -# -# EIGEN_FOUND - system has eigen lib -# EIGEN_INCLUDE_DIR - the eigen include directory - -# Copyright (c) 2006, 2007 Montel Laurent, -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -find_path(EIGEN_INCLUDE_DIR NAMES eigen/matrix.h - PATHS - ${INCLUDE_INSTALL_DIR} - ) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR ) - -mark_as_advanced(EIGEN_INCLUDE_DIR) - - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindGLIB2.cmake extra-cmake-modules-5.44.0/attic/modules/FindGLIB2.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindGLIB2.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindGLIB2.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -# - Try to find the GLIB2 libraries -# Once done this will define -# -# GLIB2_FOUND - system has glib2 -# GLIB2_INCLUDE_DIR - the glib2 include directory -# GLIB2_LIBRARIES - glib2 library - -# Copyright (c) 2008 Laurent Montel, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) - # Already in cache, be silent - set(GLIB2_FIND_QUIETLY TRUE) -endif() - -find_package(PkgConfig) -pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0) - -find_path(GLIB2_MAIN_INCLUDE_DIR - NAMES glib.h - HINTS ${PC_LibGLIB2_INCLUDEDIR} - PATH_SUFFIXES glib-2.0) - -find_library(GLIB2_LIBRARY - NAMES glib-2.0 - HINTS ${PC_LibGLIB2_LIBDIR} -) - -set(GLIB2_LIBRARIES ${GLIB2_LIBRARY}) - -# search the glibconfig.h include dir under the same root where the library is found -get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) - -find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h - PATH_SUFFIXES glib-2.0/include - HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}) - -set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}") - -# not sure if this include dir is optional or required -# for now it is optional -if(GLIB2_INTERNAL_INCLUDE_DIR) - set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}") -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR) - -mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindGStreamer.cmake extra-cmake-modules-5.44.0/attic/modules/FindGStreamer.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindGStreamer.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindGStreamer.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -# - Try to find GStreamer -# Once done this will define -# -# GSTREAMER_FOUND - system has GStreamer -# GSTREAMER_INCLUDE_DIR - the GStreamer include directory -# GSTREAMER_LIBRARIES - the libraries needed to use GStreamer -# GSTREAMER_DEFINITIONS - Compiler switches required for using GStreamer - -# Copyright (c) 2006, Tim Beaulen -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -# TODO: Other versions --> GSTREAMER_X_Y_FOUND (Example: GSTREAMER_0_8_FOUND and GSTREAMER_0_10_FOUND etc) - -IF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) - # in cache already - SET(GStreamer_FIND_QUIETLY TRUE) -ELSE (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) - SET(GStreamer_FIND_QUIETLY FALSE) -ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) - -IF (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - FIND_PACKAGE(PkgConfig) - PKG_CHECK_MODULES(PC_GSTREAMER QUIET gstreamer-0.10) - #MESSAGE(STATUS "DEBUG: GStreamer include directory = ${GSTREAMER_INCLUDE_DIRS}") - #MESSAGE(STATUS "DEBUG: GStreamer link directory = ${GSTREAMER_LIBRARY_DIRS}") - #MESSAGE(STATUS "DEBUG: GStreamer CFlags = ${GSTREAMER_CFLAGS_OTHER}") - SET(GSTREAMER_DEFINITIONS ${PC_GSTREAMER_CFLAGS_OTHER}) -ENDIF (NOT WIN32) - -FIND_PATH(GSTREAMER_INCLUDE_DIR gst/gst.h - PATHS - ${PC_GSTREAMER_INCLUDEDIR} - ${PC_GSTREAMER_INCLUDE_DIRS} - #PATH_SUFFIXES gst - ) - -FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-0.10 - PATHS - ${PC_GSTREAMER_LIBDIR} - ${PC_GSTREAMER_LIBRARY_DIRS} - ) - -FIND_LIBRARY(GSTREAMER_BASE_LIBRARY NAMES gstbase-0.10 - PATHS - ${PC_GSTREAMER_LIBDIR} - ${PC_GSTREAMER_LIBRARY_DIRS} - ) - -FIND_LIBRARY(GSTREAMER_INTERFACE_LIBRARY NAMES gstinterfaces-0.10 - PATHS - ${PC_GSTREAMER_LIBDIR} - ${PC_GSTREAMER_LIBRARY_DIRS} - ) - -IF (GSTREAMER_INCLUDE_DIR) - #MESSAGE(STATUS "DEBUG: Found GStreamer include dir: ${GSTREAMER_INCLUDE_DIR}") -ELSE (GSTREAMER_INCLUDE_DIR) - MESSAGE(STATUS "GStreamer: WARNING: include dir not found") -ENDIF (GSTREAMER_INCLUDE_DIR) - -IF (GSTREAMER_LIBRARIES) - #MESSAGE(STATUS "DEBUG: Found GStreamer library: ${GSTREAMER_LIBRARIES}") -ELSE (GSTREAMER_LIBRARIES) - MESSAGE(STATUS "GStreamer: WARNING: library not found") -ENDIF (GSTREAMER_LIBRARIES) - -IF (GSTREAMER_INTERFACE_LIBRARY) - #MESSAGE(STATUS "DEBUG: Found GStreamer interface library: ${GSTREAMER_INTERFACE_LIBRARY}") -ELSE (GSTREAMER_INTERFACE_LIBRARY) - MESSAGE(STATUS "GStreamer: WARNING: interface library not found") -ENDIF (GSTREAMER_INTERFACE_LIBRARY) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIR GSTREAMER_BASE_LIBRARY GSTREAMER_INTERFACE_LIBRARY) - -MARK_AS_ADVANCED(GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARIES GSTREAMER_BASE_LIBRARY GSTREAMER_INTERFACE_LIBRARY) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKdcraw.cmake extra-cmake-modules-5.44.0/attic/modules/FindKdcraw.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKdcraw.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKdcraw.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -# - Try to find the Kdcraw library -# -# If you have put a local version of libkdcraw into your source tree, -# set KDCRAW_LOCAL_DIR to the relative path to the local directory. -# -# Once done this will define -# -# KDCRAW_FOUND - system has libkdcraw -# KDCRAW_INCLUDE_DIR - the libkdcraw include directory -# KDCRAW_LIBRARIES - Link these to use libkdcraw -# KDCRAW_DEFINITIONS - Compiler switches required for using libkdcraw -# - -# Copyright (c) 2008, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS) - - message(STATUS "Found Kdcraw library in cache: ${KDCRAW_LIBRARIES}") - - # in cache already - set(KDCRAW_FOUND TRUE) - -else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS) - - message(STATUS "Check Kdcraw library in local sub-folder...") - - # Check if library is not in local sub-folder - - if (KDCRAW_LOCAL_DIR) - set (KDCRAW_LOCAL_FOUND TRUE) - else (KDCRAW_LOCAL_DIR) - find_file(KDCRAW_LOCAL_FOUND libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libkdcraw ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH) - - if (KDCRAW_LOCAL_FOUND) - # Was it found in libkdcraw/ or in libs/libkdcraw? - find_file(KDCRAW_LOCAL_FOUND_IN_LIBS libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH) - if (KDCRAW_LOCAL_FOUND_IN_LIBS) - set(KDCRAW_LOCAL_DIR libs/libkdcraw) - else (KDCRAW_LOCAL_FOUND_IN_LIBS) - set(KDCRAW_LOCAL_DIR libkdcraw) - endif (KDCRAW_LOCAL_FOUND_IN_LIBS) - endif (KDCRAW_LOCAL_FOUND) - endif (KDCRAW_LOCAL_DIR) - - if (KDCRAW_LOCAL_FOUND) - - # we need two include directories: because the version.h file is put into the build directory - # TODO KDCRAW_INCLUDE_DIR sounds like it should contain only one directory... - set(KDCRAW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}) - set(KDCRAW_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}") - set(KDCRAW_LIBRARIES kdcraw) - message(STATUS "Found Kdcraw library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}") - set(KDCRAW_FOUND TRUE) - mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS) - - else() - - message(STATUS "Check Kdcraw library using pkg-config...") - if (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - include(UsePkgConfig) - - PKGCONFIG(libkdcraw _KDCRAWIncDir _KDCRAWLinkDir _KDCRAWLinkFlags _KDCRAWCflags) - - if (_KDCRAWLinkFlags) - # query pkg-config asking for a libkdcraw >= 0.2.0 - exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkdcraw RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) - if (_return_VALUE STREQUAL "0") - message(STATUS "Found libkdcraw release >= 0.2.0") - set(KDCRAW_VERSION_GOOD_FOUND TRUE) - else (_return_VALUE STREQUAL "0") - message(STATUS "Found libkdcaw release < 0.2.0, too old") - set(KDCRAW_VERSION_GOOD_FOUND FALSE) - set(KDCRAW_FOUND FALSE) - endif (_return_VALUE STREQUAL "0") - else (_KDCRAWLinkFlags) - set(KDCRAW_VERSION_GOOD_FOUND FALSE) - set(KDCRAW_FOUND FALSE) - endif (_KDCRAWLinkFlags) - else (NOT WIN32) - set(KDCRAW_VERSION_GOOD_FOUND TRUE) - endif (NOT WIN32) - - if (KDCRAW_VERSION_GOOD_FOUND) - set(KDCRAW_DEFINITIONS "${_KDCRAWCflags}") - - find_path(KDCRAW_INCLUDE_DIR libkdcraw/version.h - ${_KDCRAWIncDir} - ) - - find_library(KDCRAW_LIBRARIES NAMES kdcraw - PATHS - ${_KDCRAWLinkDir} - ) - - if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES) - set(KDCRAW_FOUND TRUE) - endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES) - endif (KDCRAW_VERSION_GOOD_FOUND) - if (KDCRAW_FOUND) - if (NOT Kdcraw_FIND_QUIETLY) - message(STATUS "Found libkdcraw: ${KDCRAW_LIBRARIES}") - endif (NOT Kdcraw_FIND_QUIETLY) - else (KDCRAW_FOUND) - if (Kdcraw_FIND_REQUIRED) - if (NOT KDCRAW_INCLUDE_DIR) - message(FATAL_ERROR "Could NOT find libkdcraw header files") - endif (NOT KDCRAW_INCLUDE_DIR) - if (NOT KDCRAW_LIBRARIES) - message(FATAL_ERROR "Could NOT find libkdcraw library") - endif (NOT KDCRAW_LIBRARIES) - endif (Kdcraw_FIND_REQUIRED) - endif (KDCRAW_FOUND) - - mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS) - - endif() - -endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKDE4Workspace.cmake extra-cmake-modules-5.44.0/attic/modules/FindKDE4Workspace.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKDE4Workspace.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKDE4Workspace.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -# Find if we installed kdebase/workspaces. -# Once done this will define -# -# KDE4WORKSPACE_FOUND - system has KDE workspace installed -# KDE4WORKSPACE_INCLUDE_DIR - the KDE workspace include directory -# -# It also sets variables for the following libraries: -# KDE4WORKSPACE_TASKMANAGER_LIBRARY, KDE4WORKSPACE_TASKMANAGER_LIBS -# KDE4WORKSPACE_KWORKSPACE_LIBRARY, KDE4WORKSPACE_KWORKSPACE_LIBS -# KDE4WORKSPACE_SOLIDCONTROLIFACES_LIBRARY, KDE4WORKSPACE_SOLIDCONTROLIFACES_LIBS -# KDE4WORKSPACE_SOLIDCONTROL_LIBRARY, KDE4WORKSPACE_SOLIDCONTROL_LIBS -# KDE4WORKSPACE_PROCESSUI_LIBRARY, KDE4WORKSPACE_PROCESSUI_LIBS -# KDE4WORKSPACE_LSOFUI_LIBRARY, KDE4WORKSPACE_LSOFUI_LIBS -# KDE4WORKSPACE_PLASMACLOCK_LIBRARY, KDE4WORKSPACE_PLASMACLOCK_LIBS -# KDE4WORKSPACE_NEPOMUKQUERYCLIENT_LIBRARY, KDE4WORKSPACE_NEPOMUKQUERYCLIENT_LIBS -# KDE4WORKSPACE_NEPOMUKQUERY_LIBRARY, KDE4WORKSPACE_NEPOMUKQUERY_LIBS -# KDE4WORKSPACE_KSCREENSAVER_LIBRARY, KDE4WORKSPACE_KSCREENSAVER_LIBS -# KDE4WORKSPACE_WEATHERION_LIBRARY, KDE4WORKSPACE_WEATHERION_LIBS -# KDE4WORKSPACE_KWINEFFECTS_LIBRARY, KDE4WORKSPACE_KWINEFFECTS_LIBS -# KDE4WORKSPACE_KDECORATIONS_LIBRARY, KDE4WORKSPACE_KDECORATIONS_LIBS -# KDE4WORKSPACE_KSGRD_LIBRARY, KDE4WORKSPACE_KSGRD_LIBS -# KDE4WORKSPACE_KEPHAL_LIBRARY, KDE4WORKSPACE_KEPHAL_LIBS -# -# And the following locations: -# KDE4WORKSPACE_LIB_DIR -# KDE4WORKSPACE_LIBEXEC_DIR -# KDE4WORKSPACE_INCLUDE_DIR -# KDE4WORKSPACE_BIN_DIR -# KDE4WORKSPACE_SBIN_DIR -# KDE4WORKSPACE_DATA_DIR -# KDE4WORKSPACE_HTML_DIR -# KDE4WORKSPACE_CONFIG_DIR -# KDE4WORKSPACE_ICON_DIR -# KDE4WORKSPACE_KCFG_DIR -# KDE4WORKSPACE_LOCALE_DIR -# KDE4WORKSPACE_MIME_DIR -# KDE4WORKSPACE_SOUND_DIR -# KDE4WORKSPACE_TEMPLATES_DIR -# KDE4WORKSPACE_WALLPAPER_DIR -# KDE4WORKSPACE_KCONF_UPDATE_DIR -# KDE4WORKSPACE_AUTOSTART_DIR -# KDE4WORKSPACE_XDG_APPS_DIR -# KDE4WORKSPACE_XDG_DIRECTORY_DIR -# KDE4WORKSPACE_SYSCONF_DIR -# KDE4WORKSPACE_MAN_DIR -# KDE4WORKSPACE_INFO_DIR -# KDE4WORKSPACE_DBUS_INTERFACES_DIR -# KDE4WORKSPACE_DBUS_SERVICES_DIR -# KDE4WORKSPACE_SERVICES_DIR -# KDE4WORKSPACE_SERVICETYPES_DIR - -# Copyright (c) 2008, Alexander Neundorf, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -# The find_package() call below loads the file KDE4WorkspaceConfig.cmake file. -# This file is created and installed by kdebase/workspace/CMakeLists.txt -# It contains settings for all install location of kdebase/workspace, as e.g. -# KDE4WORKSPACE_INCLUDE_DIR, and also variables for all libraries. -# See kdebase/workspace/CMakeLists.txt and kdebase/workspace/KDE4WorkspaceConfig.cmake.in -# for details. Alex - - -set(_KDE4Workspace_FIND_QUIETLY ${KDE4Workspace_FIND_QUIETLY}) -find_package(KDE4Workspace QUIET NO_MODULE PATHS ${KDE4_LIB_DIR}/KDE4Workspace/cmake ) -set(KDE4Workspace_FIND_QUIETLY ${_KDE4Workspace_FIND_QUIETLY}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(KDE4Workspace DEFAULT_MSG KDE4Workspace_CONFIG ) - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKdeMultimedia.cmake extra-cmake-modules-5.44.0/attic/modules/FindKdeMultimedia.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKdeMultimedia.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKdeMultimedia.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -# Module to see if we have KDE4 kdemultimedia installed -# -# This module defines -# KDEMULTIMEDIA_INCLUDE_DIR - the include dir -# KCDDB_LIBRARY - the kcddb library -# KCOMPACTDISC_LIBRARY - the kcompactdisk library -# KDEMULTIMEDIA_LIBRARIES - all of the KDE multimedia libraries together -# KDEMULTIMEDIA_FOUND - true if the above have been found - -# KDEMULTIMEDIA_INCLUDE_DIR -# KDEMULTIMEDIA_FOUND -# Copyright (C) 2007 Laurent Montel -# Copyright (C) 2007 Gerd Fleischer -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (KDEMULTIMEDIA_INCLUDE_DIR) - # Already in cache, be silent - set(KDEMULTIMEDIA_FOUND TRUE) -endif (KDEMULTIMEDIA_INCLUDE_DIR) - - -find_path(KDEMULTIMEDIA_INCLUDE_DIR NAMES libkcddb/kcddb.h libkcompactdisc/kcompactdisc.h - PATHS - ${INCLUDE_INSTALL_DIR} -) - -find_library(KCDDB_LIBRARY NAMES kcddb - PATHS - ${LIB_INSTALL_DIR} -) - -find_library(KCOMPACTDISC_LIBRARY NAMES kcompactdisc - PATHS - ${LIB_INSTALL_DIR} -) - -# audioencoder, audiocdplugins? - -set(KDEMULTIMEDIA_LIBRARIES ${KCDDB_LIBRARY} ${KCOMPACTDISC_LIBRARY}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(KdeMultimedia DEFAULT_MSG KDEMULTIMEDIA_LIBRARIES KDEMULTIMEDIA_INCLUDE_DIR ) - -mark_as_advanced(KDEMULTIMEDIA_INCLUDE_DIR KDEMULTIMEDIA_LIBRARIES) - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKDevPlatform.cmake extra-cmake-modules-5.44.0/attic/modules/FindKDevPlatform.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKDevPlatform.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKDevPlatform.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -# -# Find the KDevelop Platform modules and sets various variables accordingly -# -# Example usage of this module: -# find_package(KDevPlatform 1.0.0 REQUIRED) -# -# The version number and REQUIRED flag are optional. You can set CMAKE_PREFIX_PATH -# variable to help it find the required files and directories - -# KDEVPLATFORM_FOUND - set to TRUE if the platform was found and the version is compatible FALSE otherwise -# -# KDEVPLATFORM_VERSION - The version number of kdevplatform -# KDEVPLATFORM_VERSION_MAJOR - The major version number of kdevplatform -# KDEVPLATFORM_VERSION_MINOR - The minor version number of kdevplatform -# KDEVPLATFORM_VERSION_PATCH - The patch version number of kdevplatform -# KDEVPLATFORM_INCLUDE_DIR - include dir of the platform, for example /usr/include/kdevplatform -# KDEVPLATFORM_INTERFACES_LIBRARIES - interfaces module library -# KDEVPLATFORM_LANGUAGE_LIBRARIES - language module library -# KDEVPLATFORM_OUTPUTVIEW_LIBRARIES - outputview module library -# KDEVPLATFORM_PROJECT_LIBRARIES - project module library -# KDEVPLATFORM_SUBLIME_LIBRARIES - sublime module library -# KDEVPLATFORM_SHELL_LIBRARIES - shell module library -# KDEVPLATFORM_TESTS_LIBRARIES - library to write tests for plugins, -# contains some useful tools and a way to replace parts of Core -# classes with custom implementations -# KDEVPLATFORM_UTIL_LIBRARIES - util module library -# KDEVPLATFORM_VCS_LIBRARIES - vcs module library -# KDEVPLATFORM_DEBUGGER_LIBRARIES - debugger module library -# -# The following macros are added (from KDevPlatformMacros.cmake): -# -# KDEVPLATFORM_ADD_APP_TEMPLATES( template1 ... templateN ) -# Use this to get packaged template archives for the given templates. -# Parameters should be the directories containing the templates. -# -# Copyright 2007 Andreas Pakulat -# Redistribution and use is allowed according to the terms of the BSD license. - -set(_KDevPlatform_FIND_QUIETLY ${KDevPlatform_FIND_QUIETLY}) -find_package( KDevPlatform ${KDevPlatform_FIND_VERSION} NO_MODULE ) -set(KDevPlatform_FIND_QUIETLY ${_KDevPlatform_FIND_QUIETLY}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(KDevPlatform DEFAULT_MSG KDevPlatform_CONFIG ) - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKexiv2.cmake extra-cmake-modules-5.44.0/attic/modules/FindKexiv2.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKexiv2.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKexiv2.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ -# - Try to find the KExiv2 library -# -# If you have put a local version of libkexiv2 into your source tree, -# set KEXIV2_LOCAL_DIR to the relative path to the local directory. -# -# Once done this will define -# -# KEXIV2_FOUND - system has libkexiv2 -# KEXIV2_INCLUDE_DIR - the libkexiv2 include directory -# KEXIV2_LIBRARIES - Link these to use libkexiv2 -# KEXIV2_DEFINITIONS - Compiler switches required for using libkexiv2 -# - -# Copyright (c) 2008, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS) - - message(STATUS "Found Kexiv2 library in cache: ${KEXIV2_LIBRARIES}") - - # in cache already - set(KEXIV2_FOUND TRUE) - -else (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS) - - message(STATUS "Check Kexiv2 library in local sub-folder...") - - # Check if library is not in local sub-folder - - if (KEXIV2_LOCAL_DIR) - set(KEXIV2_LOCAL_FOUND TRUE) - else (KEXIV2_LOCAL_DIR) - find_file(KEXIV2_LOCAL_FOUND libkexiv2/version.h.cmake ${CMAKE_SOURCE_DIR}/libkexiv2 ${CMAKE_SOURCE_DIR}/libs/libkexiv2 NO_DEFAULT_PATH) - - if (KEXIV2_LOCAL_FOUND) - # Was it found in libkexiv2/ or in libs/libkexiv2? - find_file(KEXIV2_LOCAL_FOUND_IN_LIBS libkexiv2/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libkexiv2 NO_DEFAULT_PATH) - if (KEXIV2_LOCAL_FOUND_IN_LIBS) - set(KEXIV2_LOCAL_DIR libs/libkexiv2) - else (KEXIV2_LOCAL_FOUND_IN_LIBS) - set(KEXIV2_LOCAL_DIR libkexiv2) - endif (KEXIV2_LOCAL_FOUND_IN_LIBS) - endif (KEXIV2_LOCAL_FOUND) - - endif (KEXIV2_LOCAL_DIR) - - if (KEXIV2_LOCAL_FOUND) - # we need two include directories: because the version.h file is put into the build directory - # TODO KEXIV2_INCLUDE_DIR sounds like it should contain only one directory... - set(KEXIV2_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KEXIV2_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KEXIV2_LOCAL_DIR}) - set(KEXIV2_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KEXIV2_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KEXIV2_LOCAL_DIR}") - set(KEXIV2_LIBRARIES kexiv2) - message(STATUS "Found Kexiv2 library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KEXIV2_LOCAL_DIR}") - set(KEXIV2_FOUND TRUE) - mark_as_advanced(KEXIV2_INCLUDE_DIR KEXIV2_LIBRARIES KEXIV2_DEFINITIONS) - - else() - if(NOT WIN32) - message(STATUS "Check Kexiv2 library using pkg-config...") - - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - include(UsePkgConfig) - - PKGCONFIG(libkexiv2 _KEXIV2IncDir _KEXIV2LinkDir _KEXIV2LinkFlags _KEXIV2Cflags) - - if(_KEXIV2LinkFlags) - # query pkg-config asking for a libkexiv2 >= 0.2.0 - exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) - if(_return_VALUE STREQUAL "0") - message(STATUS "Found libkexiv2 release >= 0.2.0") - set(KEXIV2_VERSION_GOOD_FOUND TRUE) - else() - message(STATUS "Found libkexiv2 release < 0.2.0, too old") - set(KEXIV2_VERSION_GOOD_FOUND FALSE) - set(KEXIV2_FOUND FALSE) - endif() - else() - set(KEXIV2_VERSION_GOOD_FOUND FALSE) - set(KEXIV2_FOUND FALSE) - endif() - else() - set(KEXIV2_VERSION_GOOD_FOUND TRUE) - endif() - - if(KEXIV2_VERSION_GOOD_FOUND) - set(KEXIV2_DEFINITIONS "${_KEXIV2Cflags}") - - find_path(KEXIV2_INCLUDE_DIR libkexiv2/version.h - ${_KEXIV2IncDir} - ) - - find_library(KEXIV2_LIBRARIES NAMES kexiv2 - PATHS - ${_KEXIV2LinkDir} - ) - - if (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES) - set(KEXIV2_FOUND TRUE) - endif (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES) - endif() - if (KEXIV2_FOUND) - if (NOT Kexiv2_FIND_QUIETLY) - message(STATUS "Found libkexiv2: ${KEXIV2_LIBRARIES}") - endif (NOT Kexiv2_FIND_QUIETLY) - else (KEXIV2_FOUND) - if (Kexiv2_FIND_REQUIRED) - if (NOT KEXIV2_INCLUDE_DIR) - message(FATAL_ERROR "Could NOT find libkexiv2 header files") - endif (NOT KEXIV2_INCLUDE_DIR) - if (NOT KEXIV2_LIBRARIES) - message(FATAL_ERROR "Could NOT find libkexiv2 library") - endif (NOT KEXIV2_LIBRARIES) - endif (Kexiv2_FIND_REQUIRED) - endif (KEXIV2_FOUND) - - mark_as_advanced(KEXIV2_INCLUDE_DIR KEXIV2_LIBRARIES KEXIV2_DEFINITIONS) - - endif() - -endif (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKipi.cmake extra-cmake-modules-5.44.0/attic/modules/FindKipi.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKipi.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKipi.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -# - Try to find the Kipi library -# -# If you have put a local version of libkipi into your source tree, -# set KIPI_LOCAL_DIR to the relative path to the local directory. -# -# Once done this will define -# -# KIPI_FOUND - system has libkipi -# KIPI_INCLUDE_DIR - the libkipi include directory -# KIPI_LIBRARIES - Link these to use libkipi -# KIPI_DEFINITIONS - Compiler switches required for using libkipi -# - -# Copyright (c) 2008, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS) - - message(STATUS "Found Kipi library in cache: ${KIPI_LIBRARIES}") - - # in cache already - set(KIPI_FOUND TRUE) - -else (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS) - - message(STATUS "Check Kipi library in local sub-folder...") - - # Check if library is not in local sub-folder - - if (KIPI_LOCAL_DIR) - set (KIPI_LOCAL_FOUND TRUE) - else (KIPI_LOCAL_DIR) - find_file(KIPI_LOCAL_FOUND libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libkipi ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH) - - if (KIPI_LOCAL_FOUND) - # Was it found in libkdcraw/ or in libs/libkdcraw? - find_file(KIPI_LOCAL_FOUND_IN_LIBS libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH) - if (KIPI_LOCAL_FOUND_IN_LIBS) - set(KIPI_LOCAL_DIR libs/libkipi) - else (KIPI_LOCAL_FOUND_IN_LIBS) - set(KIPI_LOCAL_DIR libkipi) - endif (KIPI_LOCAL_FOUND_IN_LIBS) - endif (KIPI_LOCAL_FOUND) - endif (KIPI_LOCAL_DIR) - - if (KIPI_LOCAL_FOUND) - # we need two include directories: because the version.h file is put into the build directory - # TODO KIPI_INCLUDE_DIR sounds like it should contain only one directory... - set(KIPI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}) - set(KIPI_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}") - set(KIPI_LIBRARIES kipi) - message(STATUS "Found Kipi library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}") - set(KIPI_FOUND TRUE) - mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS) - - else (KIPI_LOCAL_FOUND) - - if (NOT WIN32) - message(STATUS "Check Kipi library using pkg-config...") - - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - include(UsePkgConfig) - - PKGCONFIG(libkipi _KIPIIncDir _KIPILinkDir _KIPILinkFlags _KIPICflags) - - if (_KIPILinkFlags) - # query pkg-config asking for a libkipi >= 0.2.0 - exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkipi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) - if (_return_VALUE STREQUAL "0") - message(STATUS "Found libkipi release >= 0.2.0") - set(KIPI_VERSION_GOOD_FOUND TRUE) - else (_return_VALUE STREQUAL "0") - message(STATUS "Found libkipi release < 0.2.0, too old") - set(KIPI_VERSION_GOOD_FOUND FALSE) - set(KIPI_FOUND FALSE) - endif (_return_VALUE STREQUAL "0") - else (_KIPILinkFlags) - set(KIPI_VERSION_GOOD_FOUND FALSE) - set(KIPI_FOUND FALSE) - endif (_KIPILinkFlags) - else (NOT WIN32) - set(KIPI_VERSION_GOOD_FOUND TRUE) - endif (NOT WIN32) - if (KIPI_VERSION_GOOD_FOUND) - set(KIPI_DEFINITIONS ${_KIPICflags}) - - find_path(KIPI_INCLUDE_DIR NAMES libkipi/version.h PATHS ${KDE4_INCLUDE_DIR} ${_KIPIIncDir}) - find_library(KIPI_LIBRARIES NAMES kipi PATHS ${KDE4_LIB_DIR} ${_KIPILinkDir}) - - if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES) - set(KIPI_FOUND TRUE) - endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES) - endif (KIPI_VERSION_GOOD_FOUND) - if (KIPI_FOUND) - if (NOT Kipi_FIND_QUIETLY) - message(STATUS "Found libkipi: ${KIPI_LIBRARIES}") - endif (NOT Kipi_FIND_QUIETLY) - else (KIPI_FOUND) - if (Kipi_FIND_REQUIRED) - if (NOT KIPI_INCLUDE_DIR) - message(FATAL_ERROR "Could NOT find libkipi header files") - endif (NOT KIPI_INCLUDE_DIR) - if (NOT KIPI_LIBRARIES) - message(FATAL_ERROR "Could NOT find libkipi library") - endif (NOT KIPI_LIBRARIES) - endif (Kipi_FIND_REQUIRED) - endif (KIPI_FOUND) - - mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS) - - endif (KIPI_LOCAL_FOUND) - -endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKNepomuk.cmake extra-cmake-modules-5.44.0/attic/modules/FindKNepomuk.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKNepomuk.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKNepomuk.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -# Once done this will define -# -# KNEPOMUK_FOUND - system has the Nepomuk-KDE backbone lib KNep -# KNEPOMUK_INCLUDES - the libKNep include directory -# KNEPOMUK_LIBRARIES - Link these to use libKNep -# - -# Copyright (c) 2008, Sebastian Trueg, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if(KNEPOMUK_INCLUDES AND KNEPOMUK_LIBRARIES) - set(KNepomuk_FIND_QUIETLY TRUE) -endif() - -FIND_PATH(KNEPOMUK_INCLUDES - NAMES - knepomuk/knepomuk.h - PATHS - ${KDE4_INCLUDE_DIR} - ${INCLUDE_INSTALL_DIR} -) - -FIND_LIBRARY(KNEPOMUK_LIBRARIES - NAMES - knepomuk - PATHS - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} -) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(KNepomuk DEFAULT_MSG KNEPOMUK_INCLUDES KNEPOMUK_LIBRARIES ) - - -MARK_AS_ADVANCED(KNEPOMUK_INCLUDES KNEPOMUK_LIBRARIES) - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKonto.cmake extra-cmake-modules-5.44.0/attic/modules/FindKonto.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKonto.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKonto.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -# Once done this will define -# -# KONTO_FOUND - system has the Nepomuk-KDE backbone lib Konto -# KONTO_INCLUDES - the libKonto include directory -# KONTO_LIBRARIES - Link these to use libKonto -# - -# Copyright (c) 2008, Sebastian Trueg, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if(KONTO_INCLUDES AND KONTO_LIBRARIES) - # Already in cache, be silent - set(Konto_FIND_QUIETLY TRUE) -endif(KONTO_INCLUDES AND KONTO_LIBRARIES - - -FIND_PATH(KONTO_INCLUDES - NAMES - konto/class.h - PATHS - ${KDE4_INCLUDE_DIR} - ${INCLUDE_INSTALL_DIR} -) - -FIND_LIBRARY(KONTO_LIBRARIES - NAMES - konto - PATHS - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} -) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Kondo DEFAULT_MSG KONTO_INCLUDES KONTO_LIBRARIES) - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKopete.cmake extra-cmake-modules-5.44.0/attic/modules/FindKopete.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKopete.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKopete.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -# - Try to find the Kopete library -# Once done this will define -# -# Kopete_FOUND - system has kopete -# KOPETE_INCLUDE_DIR - the kopete include directory -# KOPETE_LIBRARIES - Link these to use kopete - -# Copyright (c) 2007 Charles Connell -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if(KOPETE_INCLUDE_DIR AND KOPETE_LIBRARIES) - - # read from cache - set(Kopete_FOUND TRUE) - -else() - - FIND_PATH(KOPETE_INCLUDE_DIR - NAMES - kopete/kopete_export.h - PATHS - ${KDE4_INCLUDE_DIR} - ${INCLUDE_INSTALL_DIR} - ) - - FIND_LIBRARY(KOPETE_LIBRARIES - NAMES - kopete - PATHS - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} - ) - if(KOPETE_INCLUDE_DIR AND KOPETE_LIBRARIES) - set(Kopete_FOUND TRUE) - endif() - - if(MSVC) - FIND_LIBRARY(KOPETE_LIBRARIES_DEBUG - NAMES - kopeted - PATHS - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} - ) - if(NOT KOPETE_LIBRARIES_DEBUG) - set(Kopete_FOUND FALSE) - endif() - - if(MSVC_IDE) - if( NOT KOPETE_LIBRARIES_DEBUG OR NOT KOPETE_LIBRARIES) - message(FATAL_ERROR "\nCould NOT find the debug AND release version of the Kopete library.\nYou need to have both to use MSVC projects.\nPlease build and install both kopete libraries first.\n") - endif() - else() - string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) - if(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - set(KOPETE_LIBRARIES ${KOPETE_LIBRARIES_DEBUG}) - else() - set(KOPETE_LIBRARIES ${KOPETE_LIBRARIES}) - endif() - endif() - endif() - - if(Kopete_FOUND) - if(NOT Kopete_FIND_QUIETLY) - message(STATUS "Found Kopete: ${KOPETE_LIBRARIES}") - endif() - else() - if(Kopete_FIND_REQUIRED) - if(NOT KOPETE_INCLUDE_DIR) - message(FATAL_ERROR "Could not find Kopete includes.") - endif() - if(NOT KOPETE_LIBRARIES) - message(FATAL_ERROR "Could not find Kopete library.") - endif() - else() - if(NOT KOPETE_INCLUDE_DIR) - message(STATUS "Could not find Kopete includes.") - endif() - if(NOT KOPETE_LIBRARIES) - message(STATUS "Could not find Kopete library.") - endif() - endif() - endif() - -endif() diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindKorundum.cmake extra-cmake-modules-5.44.0/attic/modules/FindKorundum.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindKorundum.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindKorundum.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -# - Find Korundum - the KDE Ruby bindings -# -# This module finds if Korundum is installed. -# It defines the following variables: -# KORUNDUM_PATH - the path to the korundum ruby file -# KORUNDUM_FOUND - true if it has been found - -# Copyright (c) 2006, Egon Willighagen, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -find_path(KORUNDUM_PATH Korundum.rb /usr/lib/ruby/1.8) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Korundum DEFAULT_MSG KORUNDUM_PATH) - -# just for compat.: -set(Korumdum_PATH ${KORUNDUM_PATH}) -set(Korumdum_FOUND ${KORUNDUM_FOUND}) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindLCMS.cmake extra-cmake-modules-5.44.0/attic/modules/FindLCMS.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindLCMS.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindLCMS.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -# - Find LCMS -# Find the LCMS (Little Color Management System) library and includes and -# This module defines -# LCMS_INCLUDE_DIR, where to find lcms.h -# LCMS_LIBRARIES, the libraries needed to use LCMS. -# LCMS_DOT_VERSION, The version number of the LCMS library, e.g. "1.19" -# LCMS_VERSION, Similar to LCMS_DOT_VERSION, but without the dots, e.g. "119" -# LCMS_FOUND, If false, do not try to use LCMS. -# -# The minimum required version of LCMS can be specified using the -# standard syntax, e.g. find_package(LCMS 1.10) - -# Copyright (c) 2008, Adrian Page, -# Copyright (c) 2009, Cyrille Berger, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls -if(NOT WIN32) - find_package(PkgConfig) - pkg_check_modules(PC_LCMS lcms) - set(LCMS_DEFINITIONS ${PC_LCMS_CFLAGS_OTHER}) -endif() - -find_path(LCMS_INCLUDE_DIR lcms.h - HINTS - ${PC_LCMS_INCLUDEDIR} - ${PC_LCMS_INCLUDE_DIRS} - PATH_SUFFIXES lcms liblcms1 -) - -find_library(LCMS_LIBRARIES NAMES lcms liblcms lcms-1 liblcms-1 - HINTS - ${PC_LCMS_LIBDIR} - ${PC_LCMS_LIBRARY_DIRS} - PATH_SUFFIXES lcms -) - -# Store the LCMS version number in the cache, so we don't have to search everytime again -if(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION) - file(READ ${LCMS_INCLUDE_DIR}/lcms.h LCMS_VERSION_CONTENT) - string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS_VERSION_MATCH ${LCMS_VERSION_CONTENT}) - if(LCMS_VERSION_MATCH) - string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" _LCMS_VERSION ${LCMS_VERSION_MATCH}) - string(SUBSTRING ${_LCMS_VERSION} 0 1 LCMS_MAJOR_VERSION) - string(SUBSTRING ${_LCMS_VERSION} 1 2 LCMS_MINOR_VERSION) - endif() - set(LCMS_VERSION "${LCMS_MAJOR_VERSION}${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms" FORCE) - set(LCMS_DOT_VERSION "${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms split into components" FORCE) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LCMS REQUIRED_VARS LCMS_LIBRARIES LCMS_INCLUDE_DIR - VERSION_VAR LCMS_DOT_VERSION ) - -mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARIES LCMS_VERSION) - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindLibAttica.cmake extra-cmake-modules-5.44.0/attic/modules/FindLibAttica.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindLibAttica.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindLibAttica.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -# Try to find the Attica library -# Once done this will define -# -# LIBATTICA_FOUND Indicates that Attica was found -# LIBATTICA_LIBRARIES Libraries needed to use Attica -# LIBATTICA_LIBRARY_DIRS Paths needed for linking against Attica -# LIBATTICA_INCLUDE_DIR Path needed for finding Attica include files -# -# The minimum required version of LibAttica can be specified using the -# standard syntax, e.g. find_package(LibAttica 0.20) - -# Copyright (c) 2009 Frederik Gladhorn -# -# Redistribution and use is allowed according to the terms of the BSD license. - -# Support LIBATTICA_MIN_VERSION for compatibility: -IF(NOT LibAttica_FIND_VERSION) - SET(LibAttica_FIND_VERSION "${LIBATTICA_MIN_VERSION}") -ENDIF(NOT LibAttica_FIND_VERSION) - -# the minimum version of LibAttica we require -IF(NOT LibAttica_FIND_VERSION) - SET(LibAttica_FIND_VERSION "0.1.0") -ENDIF(NOT LibAttica_FIND_VERSION) - - -IF (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - FIND_PACKAGE(PkgConfig) - PKG_CHECK_MODULES(PC_LIBATTICA QUIET libattica) - SET(LIBATTICA_DEFINITIONS ${PC_ATTICA_CFLAGS_OTHER}) -ENDIF (NOT WIN32) - -FIND_PATH(LIBATTICA_INCLUDE_DIR attica/provider.h - HINTS - ${PC_LIBATTICA_INCLUDEDIR} - ${PC_LIBATTICA_INCLUDE_DIRS} - PATH_SUFFIXES attica - ) - -# Store the version number in the cache, so we don't have to search everytime: -IF(LIBATTICA_INCLUDE_DIR AND NOT LIBATTICA_VERSION) - FILE(READ ${LIBATTICA_INCLUDE_DIR}/attica/version.h LIBATTICA_VERSION_CONTENT) - STRING (REGEX MATCH "LIBATTICA_VERSION_STRING \".*\"\n" LIBATTICA_VERSION_MATCH "${LIBATTICA_VERSION_CONTENT}") - IF(LIBATTICA_VERSION_MATCH) - STRING(REGEX REPLACE "LIBATTICA_VERSION_STRING \"(.*)\"\n" "\\1" _LIBATTICA_VERSION ${LIBATTICA_VERSION_MATCH}) - ENDIF(LIBATTICA_VERSION_MATCH) - SET(LIBATTICA_VERSION "${_LIBATTICA_VERSION}" CACHE STRING "Version number of LibAttica" FORCE) -ENDIF(LIBATTICA_INCLUDE_DIR AND NOT LIBATTICA_VERSION) - - -FIND_LIBRARY(LIBATTICA_LIBRARIES NAMES attica libattica - HINTS - ${PC_LIBATTICA_LIBDIR} - ${PC_LIBATTICA_LIBRARY_DIRS} - ) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibAttica REQUIRED_VARS LIBATTICA_LIBRARIES LIBATTICA_INCLUDE_DIR - VERSION_VAR LIBATTICA_VERSION) - -MARK_AS_ADVANCED(LIBATTICA_INCLUDE_DIR LIBATTICA_LIBRARIES) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindLibKonq.cmake extra-cmake-modules-5.44.0/attic/modules/FindLibKonq.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindLibKonq.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindLibKonq.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# - Try to find konqueror library -# Once done this will define -# -# LIBKONQ_FOUND - system has libkonq library -# LIBKONQ_INCLUDE_DIR - the LIBKONQ include directory -# LIBKONQ_LIBRARY - the libkonq library - -# Original file: FindMarbleWidget.cmake (found in digikam-0.10.0-beta2) -# copyright 2008 by Patrick Spendrin -# Copyright (c) 2009, Alexander Neundorf, -# use this file as you like -# -# Modifications to find libkonq by Joachim Eibl 2008 - -find_path(LIBKONQ_INCLUDE_DIR konq_popupmenuplugin.h ) - -find_library(LIBKONQ_LIBRARY konq) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LIBKONQ DEFAULT_MSG LIBKONQ_INCLUDE_DIR LIBKONQ_LIBRARY ) - -mark_as_advanced(LIBKONQ_INCLUDE_DIR LIBKONQ_LIBRARY) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindMusicBrainz.cmake extra-cmake-modules-5.44.0/attic/modules/FindMusicBrainz.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindMusicBrainz.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindMusicBrainz.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -# Module to find the musicbrainz library -# -# It defines -# MUSICBRAINZ_INCLUDE_DIR - the include dir -# MUSICBRAINZ_LIBRARIES - the required libraries -# MUSICBRAINZ_FOUND - true if both of the above have been found - -# Copyright (c) 2006,2007 Laurent Montel, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if(MUSICBRAINZ_INCLUDE_DIR AND MUSICBRAINZ_LIBRARIES) - set(MUSICBRAINZ_FIND_QUIETLY TRUE) -endif() - -FIND_PATH(MUSICBRAINZ_INCLUDE_DIR musicbrainz/musicbrainz.h) - -FIND_LIBRARY( MUSICBRAINZ_LIBRARIES NAMES musicbrainz) - -# We need version 2, version 3 is source-incompatible -FIND_PATH(MUSICBRAINZ3_INCLUDE_DIR musicbrainz3/musicbrainz.h) -if(MUSICBRAINZ3_INCLUDE_DIR AND NOT MUSICBRAINZ_INCLUDE_DIR) - message(STATUS "\nIncompatible version 3.x of the musicbrainz includes detected. Version 2.x is needed.\n") -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( MusicBrainz DEFAULT_MSG - MUSICBRAINZ_INCLUDE_DIR MUSICBRAINZ_LIBRARIES) - -MARK_AS_ADVANCED(MUSICBRAINZ_INCLUDE_DIR MUSICBRAINZ_LIBRARIES) - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindNepomuk.cmake extra-cmake-modules-5.44.0/attic/modules/FindNepomuk.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindNepomuk.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindNepomuk.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -# Once done this will define -# -# NEPOMUK_FOUND - system has Nepomuk -# NEPOMUK_INCLUDE_DIR - the Nepomuk include directory -# NEPOMUK_LIBRARIES - Link these to use Nepomuk -# NEPOMUK_QUERY_LIBRARIES - Link these to use Nepomuk query -# NEPOMUK_UTILS_LIBRARIES - Link these to use Nepomuk utils -# NEPOMUK_DEFINITIONS - Compiler switches required for using Nepomuk -# -# Nepomuk requires Soprano, so this module checks for Soprano too. -# - - -# Copyright (c) 2008-2009, Sebastian Trueg, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (NOT DEFINED Soprano_FOUND) - find_package(Soprano ${SOPRANO_MIN_VERSION}) - include(MacroLogFeature) - macro_log_feature(Soprano_FOUND "Soprano" "Support for the Nepomuk semantic desktop system" "http://soprano.sourceforge.net" FALSE "" "") -endif (NOT DEFINED Soprano_FOUND) - -if (NOT DEFINED SHAREDDESKTOPONTOLOGIES_FOUND) - find_package(SharedDesktopOntologies) - include(MacroLogFeature) - macro_log_feature(SHAREDDESKTOPONTOLOGIES_FOUND "Shared desktop ontologies" "Support for the Nepomuk semantic desktop system" "http://oscaf.sourceforge.net" FALSE "" "") -endif (NOT DEFINED SHAREDDESKTOPONTOLOGIES_FOUND) - -# Check for the following stuff independent from whether soprano has been found -# or not. This will give a better error message at the end. -find_path(NEPOMUK_INCLUDE_DIR - NAMES - nepomuk/resource.h - HINTS - ${KDE4_INCLUDE_DIR} - ${INCLUDE_INSTALL_DIR} - ) - -find_library(NEPOMUK_LIBRARIES - NAMES - nepomuk - HINTS - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} - ) - -find_library(NEPOMUK_QUERY_LIBRARIES - NAMES - nepomukquery - HINTS - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} - ) - -find_library(NEPOMUK_UTILS_LIBRARIES - NAMES - nepomukutils - HINTS - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} -) - -find_file(NEPOMUK_ADDONTOLOGYCLASSES_FILE NepomukAddOntologyClasses.cmake - HINTS ${KDE4_DATA_INSTALL_DIR}/cmake/modules/ - PATH_SUFFIXES share/apps/cmake/modules/ - ) - -include("${NEPOMUK_ADDONTOLOGYCLASSES_FILE}" OPTIONAL) - -mark_as_advanced(NEPOMUK_INCLUDE_DIR NEPOMUK_LIBRARIES NEPOMUK_QUERY_LIBRARIES NEPOMUK_UTILS_LIBRARIES NEPOMUK_ADDONTOLOGIES_FILE) - -include(FindPackageHandleStandardArgs) -# List all nepomuk and also all necessary soprano variables here, to make it -# easier for the user to see what was missing: -if(NOT WINCE) -find_package_handle_standard_args(Nepomuk DEFAULT_MSG - NEPOMUK_LIBRARIES NEPOMUK_INCLUDE_DIR NEPOMUK_ADDONTOLOGYCLASSES_FILE - Soprano_FOUND SOPRANO_PLUGIN_RAPTORPARSER_FOUND SOPRANO_PLUGIN_REDLANDBACKEND_FOUND - SHAREDDESKTOPONTOLOGIES_FOUND - ) -else() -#FIXME: There are no backends at this time -find_package_handle_standard_args(Nepomuk DEFAULT_MSG - NEPOMUK_LIBRARIES NEPOMUK_INCLUDE_DIR NEPOMUK_ADDONTOLOGYCLASSES_FILE - Soprano_FOUND - SHAREDDESKTOPONTOLOGIES_FOUND - ) -endif() - -#to retain backward compatibility -set (Nepomuk_FOUND ${NEPOMUK_FOUND}) - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindOpenEXR.cmake extra-cmake-modules-5.44.0/attic/modules/FindOpenEXR.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindOpenEXR.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindOpenEXR.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,104 +0,0 @@ -# Try to find the OpenEXR libraries -# This check defines: -# -# OPENEXR_FOUND - system has OpenEXR -# OPENEXR_INCLUDE_DIR - OpenEXR include directory -# OPENEXR_LIBRARIES - Libraries needed to use OpenEXR -# OPENEXR_DEFINITIONS - definitions required to use OpenEXR - -# Copyright (c) 2006, Alexander Neundorf, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (OPENEXR_INCLUDE_DIR AND OPENEXR_LIBRARIES) - # in cache already - set(OPENEXR_FOUND TRUE) - -else (OPENEXR_INCLUDE_DIR AND OPENEXR_LIBRARIES) - - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_OPENEXR QUIET OpenEXR) - - FIND_PATH(OPENEXR_INCLUDE_DIR ImfRgbaFile.h - HINTS - ${PC_OPENEXR_INCLUDEDIR} - ${PC_OPENEXR_INCLUDE_DIRS} - PATH_SUFFIXES OpenEXR - ) - - FIND_LIBRARY(OPENEXR_HALF_LIBRARY NAMES Half - HINTS - ${PC_OPENEXR_LIBDIR} - ${PC_OPENEXR_LIBRARY_DIRS} - ) - - - FIND_LIBRARY(OPENEXR_IEX_LIBRARY NAMES Iex - PATHS - ${PC_OPENEXR_LIBDIR} - ${PC_OPENEXR_LIBRARY_DIRS} - ) - - FIND_LIBRARY(OPENEXR_IMATH_LIBRARY NAMES Imath - HINTS - ${PC_OPENEXR_LIBDIR} - ${PC_OPENEXR_LIBRARY_DIRS} - NO_DEFAULT_PATH - ) - - FIND_LIBRARY(OPENEXR_ILMIMF_LIBRARY NAMES IlmImf - HINTS - ${PC_OPENEXR_LIBDIR} - ${PC_OPENEXR_LIBRARY_DIRS} - ) - - FIND_LIBRARY(OPENEXR_ILMTHREAD_LIBRARY NAMES IlmThread - HINTS - ${PC_OPENEXR_LIBDIR} - ${PC_OPENEXR_LIBRARY_DIRS} - ) - - if (OPENEXR_INCLUDE_DIR AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY) - set(OPENEXR_FOUND TRUE) - if (OPENEXR_ILMTHREAD_LIBRARY) - set(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ) - else (OPENEXR_ILMTHREAD_LIBRARY) - set(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ) - endif (OPENEXR_ILMTHREAD_LIBRARY) - - if (WIN32) - set(_OPENEXR_DEFINITIONS -DOPENEXR_DLL) - else (WIN32) - set(_OPENEXR_DEFINITIONS) - endif (WIN32) - - set(OPENEXR_DEFINITIONS ${_OPENEXR_DEFINITIONS}) - - endif (OPENEXR_INCLUDE_DIR AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY) - - - if (OPENEXR_FOUND) - if (NOT OpenEXR_FIND_QUIETLY) - message(STATUS "Found OPENEXR: ${OPENEXR_LIBRARIES}") - endif (NOT OpenEXR_FIND_QUIETLY) - else (OPENEXR_FOUND) - if (OpenEXR_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find OPENEXR") - endif (OpenEXR_FIND_REQUIRED) - endif (OPENEXR_FOUND) - - mark_as_advanced( - OPENEXR_INCLUDE_DIR - OPENEXR_LIBRARIES - OPENEXR_ILMIMF_LIBRARY - OPENEXR_ILMTHREAD_LIBRARY - OPENEXR_IMATH_LIBRARY - OPENEXR_IEX_LIBRARY - OPENEXR_HALF_LIBRARY - OPENEXR_DEFINITIONS ) - -endif (OPENEXR_INCLUDE_DIR AND OPENEXR_LIBRARIES) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindPolkitQt.cmake extra-cmake-modules-5.44.0/attic/modules/FindPolkitQt.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindPolkitQt.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindPolkitQt.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -# - Try to find Polkit-qt -# Once done this will define -# -# POLKITQT_FOUND - system has Polkit-qt -# POLKITQT_INCLUDE_DIR - the Polkit-qt include directory -# POLKITQT_LIBRARIES - Link these to use all Polkit-qt libs -# POLKITQT_CORE_LIBRARY - Link this to use the polkit-qt-core library only -# POLKITQT_GUI_LIBRARY - Link this to use GUI elements in polkit-qt (polkit-qt-gui) -# POLKITQT_DEFINITIONS - Compiler switches required for using Polkit-qt -# POLKITQT_POLICY_FILES_INSTALL_DIR - The directory where policy files should be installed to. -# -# The minimum required version of PolkitQt can be specified using the -# standard syntax, e.g. find_package(PolkitQt 1.0) -# For compatiblity, this can also be done by setting the POLKITQT_MIN_VERSION variable. - -# Copyright (c) 2009, Daniel Nicoletti, -# Copyright (c) 2009, Dario Freddi, -# Copyright (c) 2009, Michal Malek, -# Copyright (c) 2009, Alexander Neundorf, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -# Support POLKITQT_MIN_VERSION for compatibility: -if(NOT PolkitQt_FIND_VERSION) - set(PolkitQt_FIND_VERSION "${POLKITQT_MIN_VERSION}") -endif() - -# the minimum version of PolkitQt we require -if(NOT PolkitQt_FIND_VERSION) - set(PolkitQt_FIND_VERSION "0.9.3") -endif() - -if (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_POLKITQT QUIET polkit-qt) - set(POLKITQT_DEFINITIONS ${PC_POLKITQT_CFLAGS_OTHER}) -endif (NOT WIN32) - -find_path( POLKITQT_INCLUDE_DIR - NAMES polkit-qt/auth.h - PATH_SUFFIXES PolicyKit -) - -find_file( POLKITQT_VERSION_FILE - polkit-qt/polkitqtversion.h - HINTS ${POLKITQT_INCLUDE_DIR} -) - -if(POLKITQT_VERSION_FILE AND NOT POLKITQT_VERSION) - file(READ ${POLKITQT_VERSION_FILE} POLKITQT_VERSION_CONTENT) - string (REGEX MATCH "POLKITQT_VERSION_STRING \".*\"\n" POLKITQT_VERSION_MATCH "${POLKITQT_VERSION_CONTENT}") - - if(POLKITQT_VERSION_MATCH) - string(REGEX REPLACE "POLKITQT_VERSION_STRING \"(.*)\"\n" "\\1" _POLKITQT_VERSION ${POLKITQT_VERSION_MATCH}) - endif() - set(POLKITQT_VERSION "${_POLKITQT_VERSION}" CACHE STRING "Version number of PolkitQt" FORCE) -endif() - -find_library( POLKITQT_CORE_LIBRARY - NAMES polkit-qt-core - HINTS ${PC_POLKITQT_LIBDIR} -) -find_library( POLKITQT_GUI_LIBRARY - NAMES polkit-qt-gui - HINTS ${PC_POLKITQT_LIBDIR} -) -set(POLKITQT_LIBRARIES ${POLKITQT_GUI_LIBRARY} ${POLKITQT_CORE_LIBRARY}) - -include(FindPackageHandleStandardArgs) -# Use the extended (new) syntax for FPHSA(): -find_package_handle_standard_args(PolkitQt REQUIRED_VARS POLKITQT_GUI_LIBRARY POLKITQT_CORE_LIBRARY POLKITQT_INCLUDE_DIR - VERSION_VAR POLKITQT_VERSION) - -mark_as_advanced(POLKITQT_INCLUDE_DIR - POLKITQT_CORE_LIBRARY - POLKITQT_GUI_LIBRARY - POLKITQT_VERSION_FILE - ) - -set(POLKITQT_POLICY_FILES_INSTALL_DIR share/PolicyKit/policy/) - -if(POLKITQT_FOUND) - get_filename_component(_POLKITQT_INSTALL_PREFIX "${POLKITQT_CORE_LIBRARY}" PATH) - get_filename_component(_POLKITQT_INSTALL_PREFIX "${_POLKITQT_INSTALL_PREFIX}" PATH) - if ( NOT _POLKITQT_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX ) - message("WARNING: Installation prefix does not match PolicyKit install prefixes. You probably will need to move files installed " - "in ${CMAKE_INSTALL_PREFIX}/${POLKITQT_POLICY_FILES_INSTALL_DIR} and by dbus_add_activation_system_service to the ${_POLKITQT_INSTALL_PREFIX}/${POLKITQT_POLICY_FILES_INSTALL_DIR} prefix") - endif (NOT _POLKITQT_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX) -endif() - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindPopplerQt4.cmake extra-cmake-modules-5.44.0/attic/modules/FindPopplerQt4.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindPopplerQt4.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindPopplerQt4.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -# - Try to find the Qt4 binding of the Poppler library -# Once done this will define -# -# POPPLER_QT4_FOUND - system has poppler-qt4 -# POPPLER_QT4_INCLUDE_DIR - the poppler-qt4 include directory -# POPPLER_QT4_LIBRARIES - Link these to use poppler-qt4 -# POPPLER_QT4_DEFINITIONS - Compiler switches required for using poppler-qt4 -# - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls - -# Copyright (c) 2006, Wilfried Huss, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -find_package(PkgConfig) -pkg_check_modules(PC_POPPLERQT4 QUIET poppler-qt4) - -set(POPPLER_QT4_DEFINITIONS ${PC_POPPLERQT4_CFLAGS_OTHER}) - -find_path(POPPLER_QT4_INCLUDE_DIR - NAMES poppler-qt4.h - HINTS ${PC_POPPLERQT4_INCLUDEDIR} - PATH_SUFFIXES poppler/qt4 poppler -) - -find_library(POPPLER_QT4_LIBRARY - NAMES poppler-qt4 - HINTS ${PC_POPPLERQT4_LIBDIR} -) - -set(POPPLER_QT4_LIBRARIES ${POPPLER_QT4_LIBRARY}) - -if (POPPLER_QT4_INCLUDE_DIR AND POPPLER_QT4_LIBRARIES) - set(POPPLER_QT4_FOUND TRUE) -else (POPPLER_QT4_INCLUDE_DIR AND POPPLER_QT4_LIBRARIES) - set(POPPLER_QT4_FOUND FALSE) -endif (POPPLER_QT4_INCLUDE_DIR AND POPPLER_QT4_LIBRARIES) - -if (POPPLER_QT4_FOUND) - if (NOT PopplerQt4_FIND_QUIETLY) - message(STATUS "Found poppler-qt4: library: ${POPPLER_QT4_LIBRARIES}, include path: ${POPPLER_QT4_INCLUDE_DIR}") - endif (NOT PopplerQt4_FIND_QUIETLY) -else (POPPLER_QT4_FOUND) - if (PopplerQt4_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find poppler-qt4") - endif (PopplerQt4_FIND_REQUIRED) -endif (POPPLER_QT4_FOUND) - -mark_as_advanced(POPPLER_QT4_INCLUDE_DIR POPPLER_QT4_LIBRARIES) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindPulseAudio.cmake extra-cmake-modules-5.44.0/attic/modules/FindPulseAudio.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindPulseAudio.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindPulseAudio.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -# Try to find the PulseAudio library -# -# Once done this will define: -# -# PULSEAUDIO_FOUND - system has the PulseAudio library -# PULSEAUDIO_INCLUDE_DIR - the PulseAudio include directory -# PULSEAUDIO_LIBRARY - the libraries needed to use PulseAudio -# PULSEAUDIO_MAINLOOP_LIBRARY - the libraries needed to use PulsAudio Mainloop -# -# The minimum required version of PulseAudio can be specified using the -# standard syntax, e.g. find_package(PulseAudio 1.0) - -# Copyright (c) 2008, Matthias Kretz, -# Copyright (c) 2009, Marcus Hufgard, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -# Support PULSEAUDIO_MINIMUM_VERSION for compatibility: -if(NOT PulseAudio_FIND_VERSION) - set(PulseAudio_FIND_VERSION "${PULSEAUDIO_MINIMUM_VERSION}") -endif() - -# the minimum version of PulseAudio we require -if(NOT PulseAudio_FIND_VERSION) - set(PulseAudio_FIND_VERSION "0.9.9") -endif() - -if (NOT WIN32) - include(FindPkgConfig) - pkg_check_modules(PC_PULSEAUDIO QUIET libpulse>=${PulseAudio_FIND_VERSION}) - pkg_check_modules(PC_PULSEAUDIO_MAINLOOP QUIET libpulse-mainloop-glib) -endif (NOT WIN32) - -find_path(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h - HINTS - ${PC_PULSEAUDIO_INCLUDEDIR} - ${PC_PULSEAUDIO_INCLUDE_DIRS} - ) - -find_library(PULSEAUDIO_LIBRARY NAMES pulse libpulse - HINTS - ${PC_PULSEAUDIO_LIBDIR} - ${PC_PULSEAUDIO_LIBRARY_DIRS} - ) - -find_library(PULSEAUDIO_MAINLOOP_LIBRARY NAMES pulse-mainloop pulse-mainloop-glib libpulse-mainloop-glib - HINTS - ${PC_PULSEAUDIO_LIBDIR} - ${PC_PULSEAUDIO_LIBRARY_DIRS} - ) - -# Store the version number in the cache, so we don't have to search every time again: -if (PULSEAUDIO_INCLUDE_DIR AND NOT PULSEAUDIO_VERSION) - - # get PulseAudio's version from its version.h, and compare it with our minimum version - file(STRINGS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h" pulse_version_h - REGEX ".*pa_get_headers_version\\(\\).*" - ) - string(REGEX REPLACE ".*pa_get_headers_version\\(\\)\ \\(\"([0-9]+\\.[0-9]+\\.[0-9]+)[^\"]*\"\\).*" "\\1" - _PULSEAUDIO_VERSION "${pulse_version_h}") - - set(PULSEAUDIO_VERSION "${_PULSEAUDIO_VERSION}" CACHE STRING "Version number of PulseAudio" FORCE) -endif (PULSEAUDIO_INCLUDE_DIR AND NOT PULSEAUDIO_VERSION) - -# Use the new extended syntax of find_package_handle_standard_args(), which also handles version checking: -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(PulseAudio REQUIRED_VARS PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR - VERSION_VAR PULSEAUDIO_VERSION ) - -mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY) diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindSasl2.cmake extra-cmake-modules-5.44.0/attic/modules/FindSasl2.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindSasl2.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindSasl2.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -# - Try to find the sasl2 directory library -# Once done this will define -# -# SASL2_FOUND - system has SASL2 -# SASL2_INCLUDE_DIR - the SASL2 include directory -# SASL2_LIBRARIES - The libraries needed to use SASL2 - -# Copyright (c) 2006, 2007 Laurent Montel, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -find_path(SASL2_INCLUDE_DIR sasl/sasl.h -) - -# libsasl2 add for windows, because the windows package of cyrus-sasl2 -# contains a libsasl2 also for msvc which is not standard conform -find_library(SASL2_LIBRARIES NAMES sasl2 libsasl2 -) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Sasl2 DEFAULT_MSG SASL2_LIBRARIES SASL2_INCLUDE_DIR) - -mark_as_advanced(SASL2_INCLUDE_DIR SASL2_LIBRARIES) - diff -Nru extra-cmake-modules-5.18.0/attic/modules/FindSharedDesktopOntologies.cmake extra-cmake-modules-5.44.0/attic/modules/FindSharedDesktopOntologies.cmake --- extra-cmake-modules-5.18.0/attic/modules/FindSharedDesktopOntologies.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/FindSharedDesktopOntologies.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -# - Try to find shared-desktop-ontologies -# The shared-desktop-ontologies package is a direct dependancy of the Nepomuk -# semantic desktop system and provides all necessary ontology files like -# RDF, RDFS, NRL, or NIE. -# -# The package is created by the OSCAF project (http://oscaf.sourceforge.net). -# -# Once done this will define -# -# SHAREDDESKTOPONTOLOGIES_FOUND - system has shared-desktop-ontologies -# SHAREDDESKTOPONTOLOGIES_ROOT_DIR - Folder where the ontologies are stored -# SHAREDDESKTOPONTOLOGIES_VERSION_MAJOR - The major version number, i.e. '1' in '1.2' -# SHAREDDESKTOPONTOLOGIES_VERSION_MINOR - The minor version number, i.e. '2' in '1.2' -# SHAREDDESKTOPONTOLOGIES_VERSION - The complete version string, i.e. '1.2' -# - -# Copyright (c) 2009, Sebastian Trueg, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -# First try the SharedDesktopOntologiesConfig.cmake from shared-desktop-ontologies 0.2 and newer - -# This is to make it work with cmake 2.6.2, since SDO 0.2 installs its config file into -# the 2.6.3 compatible location only ( share/cmake/SDO/ instead share/SDO/[cmake/] ) -if( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.6.3") - find_path(_SDO_CONFIG_DIR SharedDesktopOntologiesConfig.cmake PATH_SUFFIXES share/cmake/SharedDesktopOntologies/ ) -endif() - -if(NOT SharedDesktopOntologies_FIND_VERSION) - set(SharedDesktopOntologies_FIND_VERSION "${SDO_MIN_VERSION}") -endif() - -find_package(SharedDesktopOntologies ${SharedDesktopOntologies_FIND_VERSION} QUIET NO_MODULE HINTS "${_SDO_CONFIG_DIR}" ) - -if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) - mark_as_advanced(SHAREDDESKTOPONTOLOGIES_ROOT_DIR) -endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SharedDesktopOntologies REQUIRED_VARS SHAREDDESKTOPONTOLOGIES_ROOT_DIR VERSION_VAR SharedDesktopOntologies_VERSION) diff -Nru extra-cmake-modules-5.18.0/attic/modules/NepomukAddOntologyClasses.cmake extra-cmake-modules-5.44.0/attic/modules/NepomukAddOntologyClasses.cmake --- extra-cmake-modules-5.18.0/attic/modules/NepomukAddOntologyClasses.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/NepomukAddOntologyClasses.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -# -# Use the Nepomuk resource class generator to generate convinient Resource subclasses -# from ontologies. -# -# Usage: -# NEPOMUK_ADD_ONTOLOGY_CLASSES( -# [FAST] -# [ONTOLOGIES] [ ...] -# [CLASSES [ ...]] -# [VISIBILITY ] -# ) -# -# If FAST is specified the rcgen parameter --fast will be used which results in resource classes -# not based on Nepomuk::Resource but on a custom class which does not perform any checks and simply -# writes the data to Nepomuk (hence the name fast). -# -# The optional CLASSES parameter allows to specify the classes to be generated (RDF URIs) in -# case one does not want all classes in the ontologies to be generated. -# -# The optional VISIBILITY parameter can only be used in non-fast mode and allows to set the gcc visibility -# to make the generated classes usable in a publically exported API. The is used to create -# the name of the export macro and the export include file. Thus, when using "VISIBILITY foobar" include -# file "foobar_export.h" needs to define FOOBAR_EXPORT. -# -# Copyright (c) 2009 Sebastian Trueg -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# -macro(NEPOMUK_ADD_ONTOLOGY_CLASSES _sources) - # extract arguments - set(_current_arg_type "onto") - foreach(_arg ${ARGN}) - if(${_arg} STREQUAL "ONTOLOGIES") - set(_current_arg_type "onto") - elseif(${_arg} STREQUAL "VISIBILITY") - set(_current_arg_type "visib") - elseif(${_arg} STREQUAL "CLASSES") - set(_current_arg_type "class") - elseif(${_arg} STREQUAL "FAST") - set(_fastmode "--fast") - else() - if(${_current_arg_type} STREQUAL "onto") - list(APPEND _ontologies ${_arg}) - get_filename_component(_filename ${_arg} NAME) - list(APPEND _ontofilenames ${_filename}) - elseif(${_current_arg_type} STREQUAL "class") - list(APPEND _classes "--class" "${_arg}") - else() - set(_visibility "--visibility" "${_arg}") - endif() - endif() - endforeach(_arg) - - # find our helper program (first in the install dir, then everywhere) - if(NOT WINCE) - find_program(RCGEN nepomuk-rcgen PATHS ${KDE4_BIN_INSTALL_DIR} ${BIN_INSTALL_DIR} NO_DEFAULT_PATH) - find_program(RCGEN nepomuk-rcgen) - else() - find_program(RCGEN nepomuk-rcgen PATHS ${HOST_BINDIR} NO_DEFAULT_PATH) - endif() - - if(NOT RCGEN) - message(SEND_ERROR "Failed to find the Nepomuk source generator" ) - else() - file(TO_NATIVE_PATH ${RCGEN} RCGEN) - - # we generate the files in the current binary dir - set(_targetdir ${CMAKE_CURRENT_BINARY_DIR}) - - # generate the list of source and header files - execute_process( - COMMAND ${RCGEN} ${_fastmode} --listheaders --prefix ${_targetdir}/ ${_classes} ${_visibility} ${_ontologies} - OUTPUT_VARIABLE _out_headers - RESULT_VARIABLE rcgen_result - ) - if(NOT ${rcgen_result} EQUAL 0) - message(SEND_ERROR "Running ${RCGEN} to generate list of headers failed with error code ${rcgen_result}") - endif() - - execute_process( - COMMAND ${RCGEN} ${_fastmode} --listsources --prefix ${_targetdir}/ ${_classes} ${_visibility} ${_ontologies} - OUTPUT_VARIABLE _out_sources - RESULT_VARIABLE rcgen_result - ) - if(NOT ${rcgen_result} EQUAL 0) - message(SEND_ERROR "Running ${RCGEN} to generate list of sources failed with error code ${rcgen_result}") - endif() - - add_custom_command(OUTPUT ${_out_headers} ${_out_sources} - COMMAND ${RCGEN} ${_fastmode} --writeall --target ${_targetdir}/ ${_classes} ${_visibility} ${_ontologies} - DEPENDS ${_ontologies} - COMMENT "Generating ontology source files from ${_ontofilenames}" - ) - - # make sure the includes are found - include_directories(${_targetdir}) - - # finally append the source files to the source list - list(APPEND ${_sources} ${_out_sources}) - endif() - - # reset variable names used - unset(_current_arg_type) - unset(_arg) - unset(_ontologies) - unset(_ontofilenames) - unset(_classes) - unset(_visibility) - unset(_fastmode) - unset(_targetdir) - unset(_out_headers) - unset(_out_sources) - unset(rcgen_result) -endmacro(NEPOMUK_ADD_ONTOLOGY_CLASSES) diff -Nru extra-cmake-modules-5.18.0/attic/modules/NepomukMacros.cmake extra-cmake-modules-5.44.0/attic/modules/NepomukMacros.cmake --- extra-cmake-modules-5.18.0/attic/modules/NepomukMacros.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules/NepomukMacros.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -# This file contains the following macros: -# -# NEPOMUK_GENERATE_FROM_ONTOLOGY -# Parameters: -# ontofile - Path to the NRL ontology defining the resources to be generated. -# targetdir - Folder to which the generated sources should be written. -# out_headers - Variable which will be filled with the names of all generated headers. -# out_sources - Variable which will be filled with the names of all generated sources. -# out_includes - Variable which will be filled with complete include statements of all -# generated resource classes. -# -# In addition to the parameters an arbitrary number of template filenames can be set as arguments -# -# In case of success NEPOMUK_RESOURCES_GENERATED is true, otherwise false - -# (C) 2007 Sebastian Trueg - - -macro(NEPOMUK_GENERATE_FROM_ONTOLOGY ontofile targetdir out_headers out_sources out_includes) - - # init - set(NEPOMUK_RESOURCES_GENERATED false) - - find_program(RCGEN nepomuk-rcgen PATHS ${KDE4_BIN_INSTALL_DIR} ${BIN_INSTALL_DIR} NO_DEFAULT_PATH) - - if(NOT RCGEN) - - message(STATUS "Failed to find the Nepomuk source generator" ) - - else() - - FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) - - execute_process( - COMMAND ${RCGEN} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} - OUTPUT_VARIABLE ${out_headers} - RESULT_VARIABLE rcgen_result - ) - - # If the first call succeeds it is very very likely that the rest will, too - if(${rcgen_result} EQUAL 0) - - execute_process( - COMMAND ${RCGEN} --listsources --prefix ${targetdir}/ --ontologies ${ontofile} - OUTPUT_VARIABLE ${out_sources} - ) - - execute_process( - COMMAND ${RCGEN} --listincludes --ontologies ${ontofile} - OUTPUT_VARIABLE ${out_includes} - ) - - execute_process( - COMMAND ${RCGEN} --writeall --templates ${ARGN} --target ${targetdir}/ --ontologies ${ontofile} - ) - - set(NEPOMUK_RESOURCES_GENERATED true) - - else() - - message(STATUS "Failed to generate Nepomuk resource classes.") - - endif() - - endif() - -endmacro(NEPOMUK_GENERATE_FROM_ONTOLOGY) diff -Nru extra-cmake-modules-5.18.0/attic/modules-tests/Blitz/CMakeLists.txt extra-cmake-modules-5.44.0/attic/modules-tests/Blitz/CMakeLists.txt --- extra-cmake-modules-5.18.0/attic/modules-tests/Blitz/CMakeLists.txt 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules-tests/Blitz/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(Blitz BLITZ INCLUDES LIBRARIES) diff -Nru extra-cmake-modules-5.18.0/attic/modules-tests/Eigen2/CMakeLists.txt extra-cmake-modules-5.44.0/attic/modules-tests/Eigen2/CMakeLists.txt --- extra-cmake-modules-5.18.0/attic/modules-tests/Eigen2/CMakeLists.txt 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules-tests/Eigen2/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(Eigen2 EIGEN2 INCLUDE_DIR ) diff -Nru extra-cmake-modules-5.18.0/attic/modules-tests/Flex/CMakeLists.txt extra-cmake-modules-5.44.0/attic/modules-tests/Flex/CMakeLists.txt --- extra-cmake-modules-5.18.0/attic/modules-tests/Flex/CMakeLists.txt 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules-tests/Flex/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(Flex FLEX VERSION EXECUTABLE) diff -Nru extra-cmake-modules-5.18.0/attic/modules-tests/GStreamer/CMakeLists.txt extra-cmake-modules-5.44.0/attic/modules-tests/GStreamer/CMakeLists.txt --- extra-cmake-modules-5.18.0/attic/modules-tests/GStreamer/CMakeLists.txt 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules-tests/GStreamer/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(GStreamer GSTREAMER INCLUDE_DIR LIBRARIES DEFINITIONS) diff -Nru extra-cmake-modules-5.18.0/attic/modules-tests/LCMS/CMakeLists.txt extra-cmake-modules-5.44.0/attic/modules-tests/LCMS/CMakeLists.txt --- extra-cmake-modules-5.18.0/attic/modules-tests/LCMS/CMakeLists.txt 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules-tests/LCMS/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(LCMS LCMS INCLUDE_DIR LIBRARIES VERSION) diff -Nru extra-cmake-modules-5.18.0/attic/modules-tests/LibXslt/CMakeLists.txt extra-cmake-modules-5.44.0/attic/modules-tests/LibXslt/CMakeLists.txt --- extra-cmake-modules-5.18.0/attic/modules-tests/LibXslt/CMakeLists.txt 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules-tests/LibXslt/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(LibXslt LIBXSLT INCLUDE_DIR LIBRARIES DEFINITIONS XSLTPROC_EXECUTABLE) diff -Nru extra-cmake-modules-5.18.0/attic/modules-tests/OpenEXR/CMakeLists.txt extra-cmake-modules-5.44.0/attic/modules-tests/OpenEXR/CMakeLists.txt --- extra-cmake-modules-5.18.0/attic/modules-tests/OpenEXR/CMakeLists.txt 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules-tests/OpenEXR/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(OpenEXR OPENEXR INCLUDE_DIR LIBRARIES DEFINITIONS) diff -Nru extra-cmake-modules-5.18.0/attic/modules-tests/RunAllModuleTests.cmake extra-cmake-modules-5.44.0/attic/modules-tests/RunAllModuleTests.cmake --- extra-cmake-modules-5.18.0/attic/modules-tests/RunAllModuleTests.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/attic/modules-tests/RunAllModuleTests.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -30,19 +30,12 @@ set(modulesToTest ${MODULE}) else() set(modulesToTest AGG - Blitz BlueZ ENCHANT - Eigen2 FFmpeg Flac - Flex GObject - GStreamer - LCMS LibArt - LibXslt - OpenEXR PCRE QCA2 QImageBlitz diff -Nru extra-cmake-modules-5.18.0/CMakeLists.txt extra-cmake-modules-5.44.0/CMakeLists.txt --- extra-cmake-modules-5.18.0/CMakeLists.txt 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/CMakeLists.txt 2018-03-03 09:48:12.000000000 +0000 @@ -2,12 +2,28 @@ # Copyright 2006-2013 Alex Neundorf # Copyright 2014-2015 Alex Merry # -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file COPYING-CMAKE-SCRIPTS for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. +# 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. #============================================================================= cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) @@ -16,7 +32,7 @@ # Preliminary setup # -set(VERSION "5.18.0") # handled by release scripts +set(VERSION "5.44.0") # handled by release scripts if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) @@ -98,10 +114,13 @@ file(GLOB installModuleFiles ${CMAKE_SOURCE_DIR}/modules/*[^~]) install(FILES ${installModuleFiles} DESTINATION ${MODULES_INSTALL_DIR}) +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/*[^~]) install(FILES ${installKdeModuleFiles} DESTINATION ${KDE_MODULES_INSTALL_DIR}) -file(GLOB installFindModuleFiles ${CMAKE_SOURCE_DIR}/find-modules/*[^~]) +file(GLOB installFindModuleFiles ${CMAKE_SOURCE_DIR}/find-modules/*.cmake ${CMAKE_SOURCE_DIR}/find-modules/*.py) install(FILES ${installFindModuleFiles} DESTINATION ${FIND_MODULES_INSTALL_DIR}) file(GLOB installToolchainModuleFiles ${CMAKE_SOURCE_DIR}/toolchain/*[^~]) diff -Nru extra-cmake-modules-5.18.0/debian/changelog extra-cmake-modules-5.44.0/debian/changelog --- extra-cmake-modules-5.18.0/debian/changelog 2016-03-07 22:17:28.000000000 +0000 +++ extra-cmake-modules-5.44.0/debian/changelog 2019-11-29 17:02:00.000000000 +0000 @@ -1,3 +1,227 @@ +extra-cmake-modules (5.44.0-0ubuntu1~16.04.sav0) xenial; urgency=medium + + * Backport to Xenial + + -- Rob Savoury Fri, 29 Nov 2019 09:02:00 -0800 + +extra-cmake-modules (5.44.0-0ubuntu1) bionic; urgency=medium + + * New upstream release (5.44.0) + + -- Rik Mills Mon, 12 Mar 2018 19:55:53 +0000 + +extra-cmake-modules (5.43.0-0ubuntu1) bionic; urgency=medium + + * Drop patch diasabling ECMToolchainAndroidTest test. Test removed + upstream + * New upstream release (5.43.0) + + -- Rik Mills Sun, 11 Feb 2018 11:13:39 +0000 + +extra-cmake-modules (5.42.0-0ubuntu2) bionic; urgency=medium + + * Disable failing ECMToolchainAndroidTest test. KDE Bug 389519 + + -- Rik Mills Sat, 27 Jan 2018 17:31:44 +0000 + +extra-cmake-modules (5.42.0-0ubuntu1) bionic; urgency=medium + + * Update build deps and metadata + * New upstream release (5.42.0) + + -- Rik Mills Fri, 26 Jan 2018 22:19:38 +0000 + +extra-cmake-modules (5.41.0-0ubuntu1) bionic; urgency=low + + * New upstream release (5.41.0) + + -- Walter Lapchynski Sun, 10 Dec 2017 22:02:35 -0600 + +extra-cmake-modules (5.40.0-0ubuntu1) bionic; urgency=medium + + * New upstream release (5.39.0) + * New upstream release (5.40.0) + + -- Rik Mills Fri, 24 Nov 2017 17:14:49 +0000 + +extra-cmake-modules (5.38.0a-0ubuntu1) artful; urgency=low + + * New upstream release (5.38.0) + + -- Rik Mills Mon, 11 Sep 2017 13:13:44 +0100 + +extra-cmake-modules (5.37.0-0ubuntu1) artful; urgency=low + + * New upstream release (5.37.0) + + -- Rik Mills Sat, 12 Aug 2017 18:49:22 +0100 + +extra-cmake-modules (5.36.0-0ubuntu1) artful; urgency=low + + * New upstream release (5.36.0) + + -- José Manuel Santamaría Lema Tue, 11 Jul 2017 23:53:59 +0100 + +extra-cmake-modules (5.35.0-0ubuntu1) artful; urgency=low + + * New upstream release (5.35.0) + + -- José Manuel Santamaría Lema Mon, 12 Jun 2017 22:59:21 +0100 + +extra-cmake-modules (5.34.0a-0ubuntu1) artful; urgency=low + + * New upstream release (5.34.0) + + -- José Manuel Santamaría Lema Mon, 15 May 2017 21:27:16 +0100 + +extra-cmake-modules (5.33.0-0ubuntu1) artful; urgency=low + + * New upstream release (5.33.0) + + -- José Manuel Santamaría Lema Sat, 29 Apr 2017 18:06:55 +0100 + +extra-cmake-modules (5.31.0-0ubuntu1) zesty; urgency=low + + * New upstream release (5.31.0) + + -- José Manuel Santamaría Lema Tue, 14 Feb 2017 22:52:09 +0000 + +extra-cmake-modules (5.30.0-0ubuntu1) zesty; urgency=low + + * New upstream release (5.30.0) + + -- Rik Mills Wed, 01 Feb 2017 18:35:57 +0000 + +extra-cmake-modules (5.28.0-0ubuntu1) zesty; urgency=low + + [ Rik Mills ] + * New upstream release (5.27.0) + + [ José Manuel Santamaría Lema ] + * Update Vcs-Git field to use https:// instead of git:// + * Merge with debian/master. + * New upstream release (5.28.0) + + -- José Manuel Santamaría Lema Mon, 05 Dec 2016 20:18:13 +0000 + +extra-cmake-modules (5.27.0-1) unstable; urgency=medium + + * New upstream release (5.27.0). + + -- Maximiliano Curia Sat, 15 Oct 2016 16:45:31 +0200 + +extra-cmake-modules (5.26.0-1) unstable; urgency=medium + + * New upstream release. + + -- Maximiliano Curia Thu, 29 Sep 2016 11:53:06 +0200 + +extra-cmake-modules (5.26.0-0ubuntu2) yakkety; urgency=medium + + * Import force_relative_paths.diff from Debian to fix autopkgtests. + + -- José Manuel Santamaría Lema Tue, 04 Oct 2016 18:43:32 +0100 + +extra-cmake-modules (5.26.0-0ubuntu1) yakkety; urgency=low + + * New upstream release (5.26.0) + + -- Rik Mills Thu, 22 Sep 2016 13:40:12 +0100 + +extra-cmake-modules (5.25.0-1) unstable; urgency=medium + + * New upstream release. + + -- Maximiliano Curia Thu, 18 Aug 2016 10:19:18 +0200 + +extra-cmake-modules (5.24.0-1) unstable; urgency=medium + + * New upstream release. + + -- Maximiliano Curia Fri, 15 Jul 2016 05:23:27 +0200 + +extra-cmake-modules (5.24.0-0ubuntu1) yakkety; urgency=medium + + * New upstream release (5.24.0) + + -- Philip Muškovac Tue, 26 Jul 2016 08:36:30 +0000 + +extra-cmake-modules (5.23.0-1) unstable; urgency=medium + + [ Automatic packaging ] + * Refresh patches + + -- Maximiliano Curia Fri, 17 Jun 2016 16:25:43 +0200 + +extra-cmake-modules (5.23.0-0ubuntu1) yakkety; urgency=medium + + * New upstream release + * New upstream release (5.23.0) + + -- Clive Johnston Mon, 11 Jul 2016 22:06:45 +0200 + +extra-cmake-modules (5.22.0-1) unstable; urgency=medium + + * Add new patch: force_relative_paths.diff + + -- Maximiliano Curia Tue, 17 May 2016 10:53:42 +0200 + +extra-cmake-modules (5.22.0-0ubuntu1) yakkety; urgency=medium + + [ Scarlett Clark ] + * New upstream release. + * Bump to latest. + * Add missing dep for qt help. + * Seems BUILD_QTHELP_DOCS is OFF by default, Turning ON + in rules, with CONFIGURE_FLAGS. This will hopefully silence + the missing deps check in CI. + * Fix the CONFIGURE_FLAGS to instead use the proper + DEB_CMAKE_CUSTOM_FLAGS configure override. + * Fix the switch to cmake proper. + * Merge to backport. + * Use qtchooser to fix an issue presented with enabling qthelp + qcollectiongenerator: could not find a Qt installation of '' + * QThelp wants sqlite. + * Try libqt5sql5-sqlite for the above problem. + * xenial backport. + * Manual merger. + * Merge in xenial backport. + + [ Philip Muškovac ] + * Update the Vcs URLs now that the repositories are hosted on + Launchpad + + [ Clive Johnston ] + * New upstream release + + -- Clive Johnston Tue, 17 May 2016 16:07:11 -0700 + +extra-cmake-modules (5.21.0-1) experimental; urgency=medium + + [ Maximiliano Curia ] + * Add upstream metadata (DEP-12) + * debian/control: Update Vcs-Browser and Vcs-Git fields + * Update acc test script + + [ Automatic packaging ] + * Bump Standards-Version to 3.9.8 + * UNRELEASED + + -- Maximiliano Curia Sat, 30 Apr 2016 15:31:50 +0200 + +extra-cmake-modules (5.19.0-1) experimental; urgency=medium + + * New upstream release (5.19.0). + + -- Maximiliano Curia Sat, 13 Feb 2016 15:16:22 +0100 + +extra-cmake-modules (5.18.0-1) experimental; urgency=medium + + * New upstream release (5.17.0). + * New upstream release (5.18.0). + + -- Maximiliano Curia Wed, 27 Jan 2016 13:34:16 +0100 + extra-cmake-modules (5.18.0-0ubuntu1) xenial; urgency=medium [ Scarlett Clark ] @@ -6,7 +230,7 @@ [ Philip Muškovac ] * New upstream release - -- Philip Muškovac Mon, 07 Mar 2016 23:17:28 +0100 + -- Philip Muškovac Wed, 06 Jan 2016 14:53:45 +0100 extra-cmake-modules (5.16.0-1) unstable; urgency=medium diff -Nru extra-cmake-modules-5.18.0/debian/control extra-cmake-modules-5.44.0/debian/control --- extra-cmake-modules-5.18.0/debian/control 2016-03-07 22:17:28.000000000 +0000 +++ extra-cmake-modules-5.44.0/debian/control 2018-03-12 19:55:53.000000000 +0000 @@ -6,16 +6,16 @@ Uploaders: Maximiliano Curia Build-Depends: cmake (>= 2.8.12~), debhelper (>= 9), - libjs-jquery, - libjs-underscore, + libqt5sql5-sqlite (>= 5.6.1~), pkg-kde-tools (>= 0.15.16~), python3-sphinx, - qttools5-dev (>= 5.4), - qttools5-dev-tools (>= 5.4) -Standards-Version: 3.9.6 + qtdeclarative5-dev (>= 5.6.1), + qttools5-dev (>= 5.6.1), + qttools5-dev-tools (>= 5.6.1) +Standards-Version: 4.1.0 Homepage: https://projects.kde.org/projects/kdesupport/extra-cmake-modules -Vcs-Browser: http://anonscm.debian.org/cgit/pkg-kde/frameworks/extra-cmake-modules.git -Vcs-Git: git://anonscm.debian.org/pkg-kde/frameworks/extra-cmake-modules.git +Vcs-Browser: https://code.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/extra-cmake-modules +Vcs-Git: https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/extra-cmake-modules Package: extra-cmake-modules Architecture: any diff -Nru extra-cmake-modules-5.18.0/debian/patches/force_relative_paths.diff extra-cmake-modules-5.44.0/debian/patches/force_relative_paths.diff --- extra-cmake-modules-5.18.0/debian/patches/force_relative_paths.diff 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/debian/patches/force_relative_paths.diff 2018-03-12 19:55:53.000000000 +0000 @@ -0,0 +1,20 @@ +From: Debian/Kubuntu Qt/KDE Maintainers +Date: Sun, 12 Jun 2016 18:37:12 +0200 +Subject: force_relative_paths + +--- + tests/KDEInstallDirsTest/relative_or_absolute/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/KDEInstallDirsTest/relative_or_absolute/CMakeLists.txt b/tests/KDEInstallDirsTest/relative_or_absolute/CMakeLists.txt +index 1a7a7e7..d05dfc3 100644 +--- a/tests/KDEInstallDirsTest/relative_or_absolute/CMakeLists.txt ++++ b/tests/KDEInstallDirsTest/relative_or_absolute/CMakeLists.txt +@@ -1,6 +1,7 @@ + project(KDEInstallDirs.relative_or_absolute) + cmake_minimum_required(VERSION 2.8.12) + ++set(KDE_INSTALL_USE_QT_SYS_PATHS FALSE) + set(ECM_KDE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../kde-modules) + set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules) + set(CMAKE_MODULE_PATH "${ECM_KDE_MODULE_DIR}") diff -Nru extra-cmake-modules-5.18.0/debian/patches/series extra-cmake-modules-5.44.0/debian/patches/series --- extra-cmake-modules-5.18.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/debian/patches/series 2018-03-12 19:55:53.000000000 +0000 @@ -0,0 +1 @@ +force_relative_paths.diff diff -Nru extra-cmake-modules-5.18.0/debian/rules extra-cmake-modules-5.44.0/debian/rules --- extra-cmake-modules-5.18.0/debian/rules 2016-03-07 22:17:28.000000000 +0000 +++ extra-cmake-modules-5.44.0/debian/rules 2018-03-12 19:55:53.000000000 +0000 @@ -2,6 +2,11 @@ # -*- makefile -*- include /usr/share/pkg-kde-tools/qt-kde-team/3/debian-qt-kde.mk +DEB_CMAKE_CUSTOM_FLAGS += -DBUILD_QTHELP_DOCS=ON +export QT_SELECT=qt5 + +override_dh_auto_configure: + dh_auto_configure -- $(DEB_CMAKE_CUSTOM_FLAGS) override_dh_install: $(overridden_command) diff -Nru extra-cmake-modules-5.18.0/debian/tests/acc extra-cmake-modules-5.44.0/debian/tests/acc --- extra-cmake-modules-5.18.0/debian/tests/acc 2016-03-07 22:17:28.000000000 +0000 +++ extra-cmake-modules-5.44.0/debian/tests/acc 2018-03-12 19:55:53.000000000 +0000 @@ -8,4 +8,11 @@ "${in_file}" > "${out_file}" done +DH_VERBOSE=1 + dh_acc +ret=$? +if [ 0 -ne $ret ]; then + cp -r logs "${ADT_ARTIFACTS}"/acc.logs +fi +exit $ret diff -Nru extra-cmake-modules-5.18.0/debian/upstream/metadata extra-cmake-modules-5.44.0/debian/upstream/metadata --- extra-cmake-modules-5.18.0/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/debian/upstream/metadata 2018-03-12 19:55:53.000000000 +0000 @@ -0,0 +1,9 @@ +Name: extra-cmake-modules +Changelog: https://cgit.kde.org/extra-cmake-modules.git/log +Contact: kde-frameworks-devel@kde.org +Donation: https://www.kde.org/community/donations/index.php +Repository: https://anongit.kde.org/extra-cmake-modules.git +Repository-Browse: https://cgit.kde.org/extra-cmake-modules.git +Security-Contact: security@kde.org +Bug-Database: https://bugs.kde.org/buglist.cgi?product=extra-cmake-modules&component=general +Bug-Submit: https://bugs.kde.org/enter_bug.cgi?product=extra-cmake-modules diff -Nru extra-cmake-modules-5.18.0/docs/CMakeLists.txt extra-cmake-modules-5.44.0/docs/CMakeLists.txt --- extra-cmake-modules-5.18.0/docs/CMakeLists.txt 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/docs/CMakeLists.txt 2018-03-03 09:48:12.000000000 +0000 @@ -2,12 +2,28 @@ # Copyright 2000-2013 Kitware, Inc. # Copyright 2014-2015 Alex Merry # -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file COPYING-CMAKE-SCRIPTS for details. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: # -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. +# 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. #============================================================================= include(CMakeDependentOption) diff -Nru extra-cmake-modules-5.18.0/docs/find-module/FindGLIB2.rst extra-cmake-modules-5.44.0/docs/find-module/FindGLIB2.rst --- extra-cmake-modules-5.18.0/docs/find-module/FindGLIB2.rst 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/docs/find-module/FindGLIB2.rst 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindGLIB2.cmake diff -Nru extra-cmake-modules-5.18.0/docs/find-module/FindPoppler.rst extra-cmake-modules-5.44.0/docs/find-module/FindPoppler.rst --- extra-cmake-modules-5.18.0/docs/find-module/FindPoppler.rst 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/docs/find-module/FindPoppler.rst 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindPoppler.cmake diff -Nru extra-cmake-modules-5.18.0/docs/find-module/FindPulseAudio.rst extra-cmake-modules-5.44.0/docs/find-module/FindPulseAudio.rst --- extra-cmake-modules-5.18.0/docs/find-module/FindPulseAudio.rst 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/docs/find-module/FindPulseAudio.rst 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindPulseAudio.cmake diff -Nru extra-cmake-modules-5.18.0/docs/find-module/FindSasl2.rst extra-cmake-modules-5.44.0/docs/find-module/FindSasl2.rst --- extra-cmake-modules-5.18.0/docs/find-module/FindSasl2.rst 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/docs/find-module/FindSasl2.rst 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindSasl2.cmake diff -Nru extra-cmake-modules-5.18.0/docs/manual/ecm-developer.7.rst extra-cmake-modules-5.44.0/docs/manual/ecm-developer.7.rst --- extra-cmake-modules-5.18.0/docs/manual/ecm-developer.7.rst 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/docs/manual/ecm-developer.7.rst 2018-03-03 09:48:12.000000000 +0000 @@ -22,15 +22,28 @@ #============================================================================= # Copyright 20XX Your Name # - # Distributed under the OSI-approved BSD License (the "License"); - # see accompanying file COPYING-CMAKE-SCRIPTS for details. + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: # - # This software is distributed WITHOUT ANY WARRANTY; without even the - # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - # See the License for more information. - #============================================================================= - # (To distribute this file outside of extra-cmake-modules, substitute the full - # License text for the above reference.) + # 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. Functions should be used instead of macros unless there is a good reason not to (and that reason should be noted in a comment), and lowercase should be used for @@ -208,7 +221,7 @@ Foo_VERSION HANDLE_COMPONENTS ) - + include(FeatureSummary) set_package_properties(Foo PROPERTIES URL "http://www.foo.example.com/" diff -Nru extra-cmake-modules-5.18.0/docs/module/ECMAddQch.rst extra-cmake-modules-5.44.0/docs/module/ECMAddQch.rst --- extra-cmake-modules-5.18.0/docs/module/ECMAddQch.rst 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/docs/module/ECMAddQch.rst 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMAddQch.cmake diff -Nru extra-cmake-modules-5.18.0/ECMConfig.cmake.in extra-cmake-modules-5.44.0/ECMConfig.cmake.in --- extra-cmake-modules-5.18.0/ECMConfig.cmake.in 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/ECMConfig.cmake.in 2018-03-03 09:48:12.000000000 +0000 @@ -8,4 +8,6 @@ set(ECM_MODULE_PATH "${ECM_MODULE_DIR}" "${ECM_FIND_MODULE_DIR}" "${ECM_KDE_MODULE_DIR}") +set(ECM_GLOBAL_FIND_VERSION "${ECM_FIND_VERSION}") + include("${ECM_MODULE_DIR}/ECMUseFindModules.cmake") diff -Nru extra-cmake-modules-5.18.0/find-modules/FindGLIB2.cmake extra-cmake-modules-5.44.0/find-modules/FindGLIB2.cmake --- extra-cmake-modules-5.18.0/find-modules/FindGLIB2.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindGLIB2.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,98 @@ +#.rst: +# FindGLIB2 +# --------- +# +# Try to locate the GLib2 library. +# If found, this will define the following variables: +# +# ``GLIB2_FOUND`` +# True if the GLib2 library is available +# ``GLIB2_INCLUDE_DIRS`` +# The GLib2 include directories +# ``GLIB2_LIBRARIES`` +# The GLib2 libraries for linking +# ``GLIB2_INCLUDE_DIR`` +# Deprecated, use ``GLIB2_INCLUDE_DIRS`` +# ``GLIB2_LIBRARY`` +# Deprecated, use ``GLIB2_LIBRARIES`` +# +# If ``GLIB2_FOUND`` is TRUE, it will also define the following +# imported target: +# +# ``GLIB2::GLIB2`` +# The GLIB2 library +# +# Since 5.41.0. + +#============================================================================= +# Copyright (c) 2008 Laurent Montel, +# +# 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. +#============================================================================= + +find_package(PkgConfig) +pkg_check_modules(PC_GLIB2 QUIET glib-2.0) + +find_path(GLIB2_INCLUDE_DIRS + NAMES glib.h + HINTS ${PC_GLIB2_INCLUDEDIR} + PATH_SUFFIXES glib-2.0) + +find_library(GLIB2_LIBRARIES + NAMES glib-2.0 + HINTS ${PC_GLIB2_LIBDIR} +) + +# search the glibconfig.h include dir under the same root where the library is found +get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) + +find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h + PATH_SUFFIXES glib-2.0/include + HINTS ${PC_GLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}) + +# not sure if this include dir is optional or required +# for now it is optional +if(GLIB2_INTERNAL_INCLUDE_DIR) + list(APPEND GLIB2_INCLUDE_DIRS "${GLIB2_INTERNAL_INCLUDE_DIR}") +endif() + +# Deprecated synonyms +set(GLIB2_INCLUDE_DIR "${GLIB2_INCLUDE_DIRS}") +set(GLIB2_LIBRARY "${GLIB2_LIBRARIES}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_INCLUDE_DIRS) + +if(GLIB2_FOUND AND NOT TARGET GLIB2::GLIB2) + add_library(GLIB2::GLIB2 UNKNOWN IMPORTED) + set_target_properties(GLIB2::GLIB2 PROPERTIES + IMPORTED_LOCATION "${GLIB2_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_INCLUDE_DIRS}") +endif() + +mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_INCLUDE_DIR + GLIB2_LIBRARIES GLIB2_LIBRARY) +set_package_properties(GLIB2 PROPERTIES + URL "https://wiki.gnome.org/Projects/GLib" + DESCRIPTION "Event loop and utility library") diff -Nru extra-cmake-modules-5.18.0/find-modules/FindGperf.cmake extra-cmake-modules-5.44.0/find-modules/FindGperf.cmake --- extra-cmake-modules-5.18.0/find-modules/FindGperf.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindGperf.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,125 @@ +#.rst: +# FindGperf +# ----------- +# +# Try to find GNU gperf. +# +# If the gperf executable is not in your PATH, you can provide +# an alternative name or full path location with the ``Gperf_EXECUTABLE`` +# variable. +# +# This will define the following variables: +# +# ``Gperf_FOUND`` +# True if gperf is available. +# +# ``Gperf_EXECUTABLE`` +# The gperf executable. +# +# If ``Gperf_FOUND`` is TRUE, it will also define the following imported +# target: +# +# ``GPerf::Gperf`` +# The gperf executable. +# +# and the following public function: +# +# ecm_gperf_generate( +# [GENERATION_FLAGS ]) +# +# Run ``gperf`` on ```` to generate ````, adding it to +# the ```` variable which contains the source for the target +# where ```` is going to be built. The optional +# ``GENERATION_FLAGS`` argument is needed to pass extra parameters to +# ``gperf`` (note you cannot override that way the output file). +# +# A simple invocation would be: +# +# ecm_gperf_generate(simple.gperf ${CMAKE_CURRENT_BINARY_DIR}/simple.h MySources) +# +# Since 5.35.0. + +#============================================================================= +# Copyright 2016-2017 Pino Toscano +# +# 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(Gperf) + +# Find gperf +find_program(Gperf_EXECUTABLE NAMES gperf) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Gperf + FOUND_VAR + Gperf_FOUND + REQUIRED_VARS + Gperf_EXECUTABLE +) + +mark_as_advanced(Gperf_EXECUTABLE) + +if (Gperf_FOUND) + if (NOT TARGET GPerf::Gperf) + add_executable(GPerf::Gperf IMPORTED) + set_target_properties(GPerf::Gperf PROPERTIES + IMPORTED_LOCATION "${Gperf_EXECUTABLE}" + ) + endif() +endif() + +include(FeatureSummary) +set_package_properties(Gperf PROPERTIES + URL "http://www.gnu.org/software/gperf/" + DESCRIPTION "Perfect hash function generator" +) + + +include(CMakeParseArguments) + +function(ecm_gperf_generate input_file output_file out_var) + # Parse arguments + set(oneValueArgs GENERATION_FLAGS) + cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) + + if(ARGS_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to ecm_gperf_generate(): \"${ARGS_UNPARSED_ARGUMENTS}\"") + endif() + + get_filename_component(_infile ${input_file} ABSOLUTE) + set(_extraopts "${ARGS_GENERATION_FLAGS}") + separate_arguments(_extraopts) + add_custom_command(OUTPUT ${output_file} + COMMAND ${Gperf_EXECUTABLE} ${_extraopts} --output-file=${output_file} ${_infile} + DEPENDS ${_infile} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + VERBATIM + ) + + list(APPEND ${out_var} "${output_file}") + set(${out_var} ${${out_var}} PARENT_SCOPE) +endfunction() diff -Nru extra-cmake-modules-5.18.0/find-modules/FindInotify.cmake extra-cmake-modules-5.44.0/find-modules/FindInotify.cmake --- extra-cmake-modules-5.18.0/find-modules/FindInotify.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindInotify.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,79 @@ +#.rest: +# FindInotify +# -------------- +# +# Try to find inotify on this system. This finds: +# - libinotiy on Unix like systems, or +# - the kernel's inotify on Linux systems. +# +# This will define the following variables: +# +# ``Inotify_FOUND`` +# True if inotify is available +# ``Inotify_LIBRARIES`` +# This has to be passed to target_link_libraries() +# ``Inotify_INCLUDE_DIRS`` +# This has to be passed to target_include_directories() +# +# On Linux, the libraries and include directories are empty, +# even though Inotify_FOUND may be set to TRUE. This is because +# no special includes or libraries are needed. On other systems +# these may be needed to use inotify. + +#============================================================================= +# Copyright 2016 Tobias C. Berner +# Copyright 2017 Adriaan de Groot +# +# 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. +# +# 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. +#============================================================================= + +find_path(Inotify_INCLUDE_DIRS sys/inotify.h) + +if(Inotify_INCLUDE_DIRS) +# On Linux there is no library to link against, on the BSDs there is. +# On the BSD's, inotify is implemented through a library, libinotify. + if( CMAKE_SYSTEM_NAME MATCHES "Linux") + set(Inotify_FOUND TRUE) + set(Inotify_LIBRARIES "") + set(Inotify_INCLUDE_DIRS "") + else() + find_library(Inotify_LIBRARIES NAMES inotify) + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Inotify + FOUND_VAR + Inotify_FOUND + REQUIRED_VARS + Inotify_LIBRARIES + Inotify_INCLUDE_DIRS + ) + mark_as_advanced(Inotify_LIBRARIES Inotify_INCLUDE_DIRS) + include(FeatureSummary) + set_package_properties(Inotify PROPERTIES + URL "https://github.com/libinotify-kqueue/" + DESCRIPTION "inotify API on the *BSD family of operating systems." + ) + endif() +else() + set(Inotify_FOUND FALSE) +endif() + +mark_as_advanced(Inotify_LIBRARIES Inotify_INCLUDE_DIRS) diff -Nru extra-cmake-modules-5.18.0/find-modules/FindPoppler.cmake extra-cmake-modules-5.44.0/find-modules/FindPoppler.cmake --- extra-cmake-modules-5.18.0/find-modules/FindPoppler.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindPoppler.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,151 @@ +#.rst: +# FindPoppler +# ----------- +# +# Try to find Poppler. +# +# This is a component-based find module, which makes use of the COMPONENTS +# and OPTIONAL_COMPONENTS arguments to find_module. The following components +# are available:: +# +# Core Cpp Qt5 Qt4 Glib +# +# If no components are specified, this module will act as though all components +# were passed to OPTIONAL_COMPONENTS. +# +# This module will define the following variables, independently of the +# components searched for or found: +# +# ``Poppler_FOUND`` +# TRUE if (the requested version of) Poppler is available +# ``Poppler_VERSION`` +# Found Poppler version +# ``Poppler_TARGETS`` +# A list of all targets imported by this module (note that there may be more +# than the components that were requested) +# ``Poppler_LIBRARIES`` +# This can be passed to target_link_libraries() instead of the imported +# targets +# ``Poppler_INCLUDE_DIRS`` +# This should be passed to target_include_directories() if the targets are +# not used for linking +# ``Poppler_DEFINITIONS`` +# This should be passed to target_compile_options() if the targets are not +# used for linking +# +# For each searched-for components, ``Poppler__FOUND`` will be set to +# TRUE if the corresponding Poppler library was found, and FALSE otherwise. If +# ``Poppler__FOUND`` is TRUE, the imported target +# ``Poppler::`` will be defined. This module will also attempt to +# determine ``Poppler_*_VERSION`` variables for each imported target, although +# ``Poppler_VERSION`` should normally be sufficient. +# +# In general we recommend using the imported targets, as they are easier to use +# and provide more control. Bear in mind, however, that if any target is in the +# link interface of an exported library, it must be made available by the +# package config file. +# +# Since 5.19 + +#============================================================================= +# Copyright 2015 Alex Richardson +# +# 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. +#============================================================================= +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(Poppler) + +set(Poppler_known_components + Cpp + Qt4 + Qt5 + Glib +) +foreach(_comp ${Poppler_known_components}) + string(TOLOWER "${_comp}" _lc_comp) + set(Poppler_${_comp}_component_deps "Core") + set(Poppler_${_comp}_pkg_config "poppler-${_lc_comp}") + set(Poppler_${_comp}_lib "poppler-${_lc_comp}") + set(Poppler_${_comp}_header_subdir "poppler/${_lc_comp}") +endforeach() +set(Poppler_known_components Core ${Poppler_known_components}) + +set(Poppler_Core_component_deps "") +set(Poppler_Core_pkg_config "poppler") +# poppler-config.h header is only installed with --enable-xpdf-headers +# fall back to using any header from a submodule with a path to make it work in that case too +set(Poppler_Core_header "poppler-config.h" "cpp/poppler-version.h" "qt5/poppler-qt5.h" "qt4/poppler-qt4.h" "glib/poppler.h") +set(Poppler_Core_header_subdir "poppler") +set(Poppler_Core_lib "poppler") + +set(Poppler_Cpp_header "poppler-version.h") +set(Poppler_Qt5_header "poppler-qt5.h") +set(Poppler_Qt4_header "poppler-qt4.h") +set(Poppler_Glib_header "poppler.h") + +ecm_find_package_parse_components(Poppler + RESULT_VAR Poppler_components + KNOWN_COMPONENTS ${Poppler_known_components} +) +ecm_find_package_handle_library_components(Poppler + COMPONENTS ${Poppler_components} +) + +# If pkg-config didn't provide us with version information, +# try to extract it from poppler-version.h or poppler-config.h +if(NOT Poppler_VERSION) + find_file(Poppler_VERSION_HEADER + NAMES "poppler-config.h" "cpp/poppler-version.h" + HINTS ${Poppler_INCLUDE_DIRS} + PATH_SUFFIXES ${Poppler_Core_header_subdir} + ) + mark_as_advanced(Poppler_VERSION_HEADER) + if(Poppler_VERSION_HEADER) + file(READ ${Poppler_VERSION_HEADER} _poppler_version_header_contents) + string(REGEX REPLACE + "^.*[ \t]+POPPLER_VERSION[ \t]+\"([0-9d.]*)\".*$" + "\\1" + Poppler_VERSION + "${_poppler_version_header_contents}" + ) + unset(_poppler_version_header_contents) + endif() +endif() + +find_package_handle_standard_args(Poppler + FOUND_VAR + Poppler_FOUND + REQUIRED_VARS + Poppler_LIBRARIES + VERSION_VAR + Poppler_VERSION + HANDLE_COMPONENTS +) + +include(FeatureSummary) +set_package_properties(Poppler PROPERTIES + DESCRIPTION "A PDF rendering library" + URL "http://poppler.freedesktop.org" +) diff -Nru extra-cmake-modules-5.18.0/find-modules/FindPulseAudio.cmake extra-cmake-modules-5.44.0/find-modules/FindPulseAudio.cmake --- extra-cmake-modules-5.18.0/find-modules/FindPulseAudio.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindPulseAudio.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,128 @@ +#.rst: +# FindPulseAudio +# -------------- +# +# Try to locate the PulseAudio library. +# If found, this will define the following variables: +# +# ``PulseAudio_FOUND`` +# True if the system has the PulseAudio library of at least +# the minimum version specified by either the version parameter +# to find_package() or the variable PulseAudio_MINIMUM_VERSION +# ``PulseAudio_INCLUDE_DIRS`` +# The PulseAudio include directory +# ``PulseAudio_LIBRARIES`` +# The PulseAudio libraries for linking +# ``PulseAudio_MAINLOOP_LIBRARY`` +# The libraries needed to use PulseAudio Mainloop +# ``PulseAudio_VERSION`` +# The version of PulseAudio that was found +# ``PulseAudio_INCLUDE_DIR`` +# Deprecated, use ``PulseAudio_INCLUDE_DIRS`` +# ``PulseAudio_LIBRARY`` +# Deprecated, use ``PulseAudio_LIBRARIES`` +# +# If ``PulseAudio_FOUND`` is TRUE, it will also define the following +# imported target: +# +# ``PulseAudio::PulseAudio`` +# The PulseAudio library +# +# Since 5.41.0. + +#============================================================================= +# Copyright (c) 2008, Matthias Kretz, +# Copyright (c) 2009, Marcus Hufgard, +# +# 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. +#============================================================================= + +# Support PulseAudio_MINIMUM_VERSION for compatibility: +if(NOT PulseAudio_FIND_VERSION) + set(PulseAudio_FIND_VERSION "${PulseAudio_MINIMUM_VERSION}") +endif() + +# the minimum version of PulseAudio we require +if(NOT PulseAudio_FIND_VERSION) + set(PulseAudio_FIND_VERSION "0.9.9") +endif() + +find_package(PkgConfig) +pkg_check_modules(PC_PulseAudio QUIET libpulse>=${PulseAudio_FIND_VERSION}) +pkg_check_modules(PC_PulseAudio_MAINLOOP QUIET libpulse-mainloop-glib) + +find_path(PulseAudio_INCLUDE_DIRS pulse/pulseaudio.h + HINTS + ${PC_PulseAudio_INCLUDEDIR} + ${PC_PulseAudio_INCLUDE_DIRS} + ) + +find_library(PulseAudio_LIBRARIES NAMES pulse libpulse + HINTS + ${PC_PulseAudio_LIBDIR} + ${PC_PulseAudio_LIBRARY_DIRS} + ) + +find_library(PulseAudio_MAINLOOP_LIBRARY NAMES pulse-mainloop pulse-mainloop-glib libpulse-mainloop-glib + HINTS + ${PC_PulseAudio_LIBDIR} + ${PC_PulseAudio_LIBRARY_DIRS} + ) + +# Store the version number in the cache, so we don't have to search every time again: +if (PulseAudio_INCLUDE_DIRS AND NOT PulseAudio_VERSION) + + # get PulseAudio's version from its version.h + file(STRINGS "${PulseAudio_INCLUDE_DIRS}/pulse/version.h" pulse_version_h + REGEX ".*pa_get_headers_version\\(\\).*") + string(REGEX REPLACE ".*pa_get_headers_version\\(\\)\ \\(\"([0-9]+\\.[0-9]+\\.[0-9]+)[^\"]*\"\\).*" "\\1" + _PulseAudio_VERSION "${pulse_version_h}") + + set(PulseAudio_VERSION "${_PulseAudio_VERSION}" CACHE STRING "Version number of PulseAudio" FORCE) +endif() + +# Use the new extended syntax of find_package_handle_standard_args(), which also handles version checking: +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(PulseAudio REQUIRED_VARS PulseAudio_LIBRARIES PulseAudio_INCLUDE_DIRS + VERSION_VAR PulseAudio_VERSION) + +# Deprecated synonyms +set(PULSEAUDIO_INCLUDE_DIR "${PulseAudio_INCLUDE_DIRS}") +set(PULSEAUDIO_LIBRARY "${PulseAudio_LIBRARIES}") +set(PULSEAUDIO_MAINLOOP_LIBRARY "${PulseAudio_MAINLOOP_LIBRARY}") +set(PULSEAUDIO_FOUND "${PulseAudio_FOUND}") + +if(PulseAudio_FOUND AND NOT TARGET PulseAudio::PulseAudio) + add_library(PulseAudio::PulseAudio UNKNOWN IMPORTED) + set_target_properties(PulseAudio::PulseAudio PROPERTIES + IMPORTED_LOCATION "${PulseAudio_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${PulseAudio_INCLUDE_DIRS}") +endif() + +mark_as_advanced(PulseAudio_INCLUDE_DIRS PULSEAUDIO_INCLUDE_DIR + PulseAudio_LIBRARIES PULSEAUDIO_LIBRARY + PulseAudio_MAINLOOP_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY) +set_package_properties(PulseAudio PROPERTIES + URL "https://www.freedesktop.org/wiki/Software/PulseAudio" + DESCRIPTION "Sound server, for sound stream routing and mixing") diff -Nru extra-cmake-modules-5.18.0/find-modules/FindPythonModuleGeneration.cmake extra-cmake-modules-5.44.0/find-modules/FindPythonModuleGeneration.cmake --- extra-cmake-modules-5.18.0/find-modules/FindPythonModuleGeneration.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindPythonModuleGeneration.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,463 @@ +#.rst: +# FindPythonModuleGeneration +# -------------------------- +# +# This module is experimental and internal. The interface will likely +# change in the coming releases. +# +# Tools and macros for generating python bindings +# +# This will define the following public function: +# +# ecm_generate_python_binding(TARGET +# PYTHONNAMESPACE +# MODULENAME +# HEADERS ) +# +# Invoking the function will create bindings for the for python 2 and 3, +# if available. The bindings will be put in the namespace in python, +# and will be available from the module . +# +# The optional rules file specifies the rules for creating the bindings +# +# A simple invokation would be: +# +# ecm_generate_python_binding(KMyTarget +# PYTHONNAMESPACE PyKF5 +# MODULENAME MyTarget +# SIP_DEPENDS QtCore/QtCoremod.sip +# HEADERS ${myTargetHeaders} +# ) +# +# which can then be used from python as +# +# import PyKF5.MyTarget +# + +#============================================================================= +# Copyright 2016 Stephen Kelly +# +# 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. +#============================================================================= + + +macro(_find_python version minor_version) + set(_CURRENT_VERSION ${version}.${minor_version}) + find_library(GPB_PYTHON${version}_LIBRARY + NAMES + python${_CURRENT_VERSION}mu + python${_CURRENT_VERSION}m + python${_CURRENT_VERSION}u + python${_CURRENT_VERSION} + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + # Avoid finding the .dll in the PATH. We want the .lib. + NO_SYSTEM_ENVIRONMENT_PATH + ) + + if(GPB_PYTHON${version}_LIBRARY) + # Use the library's install prefix as a hint + set(_Python_INCLUDE_PATH_HINT) + get_filename_component(_Python_PREFIX ${GPB_PYTHON${version}_LIBRARY} PATH) + get_filename_component(_Python_PREFIX ${_Python_PREFIX} PATH) + if(_Python_PREFIX) + set(_Python_INCLUDE_PATH_HINT ${_Python_PREFIX}/include) + endif() + unset(_Python_PREFIX) + + find_path(GPB_PYTHON${version}_INCLUDE_DIR + NAMES Python.h + HINTS + ${_Python_INCLUDE_PATH_HINT} + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include + PATH_SUFFIXES + python${_CURRENT_VERSION}mu + python${_CURRENT_VERSION}m + python${_CURRENT_VERSION}u + python${_CURRENT_VERSION} + ) + 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") + list(APPEND _pyversions ${version}) + + file(STRINGS "${GPB_PYTHON${version}_INCLUDE_DIR}/patchlevel.h" python_version_define + REGEX "^#define[ \t]+PY_MINOR_VERSION[ \t]+[0-9]+") + string(REGEX REPLACE "^#define[ \t]+PY_MINOR_VERSION[ \t]+([0-9]+)" "\\1" + min_ver "${python_version_define}") + unset(python_version_define) + + set(pyversion${version}_maj_min ${version}.${min_ver}) + + add_library(Python::Libs${version} UNKNOWN IMPORTED) + set_property(TARGET Python::Libs${version} PROPERTY IMPORTED_LOCATION ${GPB_PYTHON${version}_LIBRARY}) + set_property(TARGET Python::Libs${version} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GPB_PYTHON${version}_INCLUDE_DIR}) + endif() +endmacro() + +macro(_report_NOT_FOUND message) + if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) + set(_GPB_MESSAGE_TYPE STATUS) + if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED) + set(_GPB_MESSAGE_TYPE FATAL_ERROR) + endif() + message(${_GPB_MESSAGE_TYPE} ${message}) + endif() + set(PythonModuleGeneration_FOUND FALSE) + return() +endmacro() + +if (NOT Qt5Core_FOUND) + _report_NOT_FOUND("Qt 5 must be found before finding ${CMAKE_FIND_PACKAGE_NAME}.") +endif() + +if (NOT GPB_PYTHON3_LIBRARY) + set(_PYTHON3_MIN_VERSION 4) + set(_PYTHON3_MAX_VERSION 10) + + _find_python(3 ${_PYTHON3_MAX_VERSION}) # Canary check + + if (GPB_PYTHON3_LIBRARY) + message(FATAL_ERROR "The max python version in ${CMAKE_FIND_PACKAGE_NAME} must be updated.") + endif() + + set(_PYTHON3_FIND_VERSION ${_PYTHON3_MAX_VERSION}) + + while(NOT GPB_PYTHON3_LIBRARY + AND NOT GPB_PYTHON3_INCLUDE_DIR + AND NOT EXISTS "${GPB_PYTHON3_INCLUDE_DIR}/patchlevel.h" + AND NOT _PYTHON3_FIND_VERSION EQUAL ${_PYTHON3_MIN_VERSION}) + math(EXPR _PYTHON3_FIND_VERSION "${_PYTHON3_FIND_VERSION} - 1") + _find_python(3 ${_PYTHON3_FIND_VERSION}) + endwhile() +endif() +_create_imported_python_target(3) + +_find_python(2 7) +_create_imported_python_target(2) + +if (NOT _pyversions) + _report_NOT_FOUND("At least one python version must be available to use ${CMAKE_FIND_PACKAGE_NAME}.") +endif() + +find_program(GBP_SIP_COMMAND sip) + +if (NOT GBP_SIP_COMMAND) + _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) + + find_library(libclang_LIBRARY clang-${_LIBCLANG_MAX_MAJOR_VERSION}.0) + + if (libclang_LIBRARY) + message(FATAL_ERROR "The max libclang version in ${CMAKE_FIND_PACKAGE_NAME} must be updated.") + endif() + + set(_LIBCLANG_FIND_VERSION ${_LIBCLANG_MAX_MAJOR_VERSION}) + while(NOT libclang_LIBRARY AND NOT _LIBCLANG_FIND_VERSION EQUAL _LIBCLANG_MIN_MAJOR_VERSION) + math(EXPR _LIBCLANG_FIND_VERSION "${_LIBCLANG_FIND_VERSION} - 1") + set(_GPB_CLANG_SUFFIX ${_LIBCLANG_FIND_VERSION}.0) + find_library(libclang_LIBRARY clang-${_LIBCLANG_FIND_VERSION}.0) + endwhile() + + if (NOT libclang_LIBRARY) + find_library(libclang_LIBRARY clang-3.9) + if (NOT libclang_LIBRARY) + find_library(libclang_LIBRARY clang-3.8) + endif() + endif() +else() + string(REGEX MATCH ".*clang-([0-9]+\\.[0-9]+).*" _GPB_CLANG_SUFFIX ${libclang_LIBRARY}) + set(_GPB_CLANG_SUFFIX ${CMAKE_MATCH_1}) +endif() + +if (NOT libclang_LIBRARY) + _report_NOT_FOUND("Could not find libclang version 3.8 or greater.") +endif() + +execute_process( + COMMAND ${GPB_PYTHON2_COMMAND} ${CMAKE_CURRENT_LIST_DIR}/sip_generator.py --self-check ${libclang_LIBRARY} + RESULT_VARIABLE selfCheckErrors +) + +if (selfCheckErrors) + _report_NOT_FOUND("sip_generator failed a self-check for the ${CMAKE_FIND_PACKAGE_NAME} Module.") +endif() + +get_filename_component(libclang_file "${libclang_file}" REALPATH) + +find_file(SIP_Qt5Core_Mod_FILE + NAMES QtCoremod.sip + PATH_SUFFIXES share/sip/PyQt5/QtCore +) + +if(NOT SIP_Qt5Core_Mod_FILE) + _report_NOT_FOUND("PyQt module files not found for the ${CMAKE_FIND_PACKAGE_NAME} Module.") +endif() + +file(STRINGS "${SIP_Qt5Core_Mod_FILE}" _SIP_Qt5_VERSIONS + REGEX "^%Timeline" +) + +string(REGEX MATCHALL "Qt_5_[^ }]+" _SIP_Qt5_VERSIONS "${_SIP_Qt5_VERSIONS}") + +set(GPB_Qt5_Tag Qt_5_${Qt5Core_VERSION_MINOR}_${Qt5Core_VERSION_PATCH}) + +list(FIND _SIP_Qt5_VERSIONS ${GPB_Qt5_Tag} _SIP_Qt5_Version_Index) + +if(_SIP_Qt5_Version_Index EQUAL -1) + _report_NOT_FOUND("PyQt module \"${SIP_Qt5Core_Mod_FILE}\" does not support Qt version 5.${Qt5Core_VERSION_MINOR}.${Qt5Core_VERSION_PATCH} for the ${CMAKE_FIND_PACKAGE_NAME} Module. Found available Qt5 tags: \"${_SIP_Qt5_VERSIONS}\".") +endif() + +set(PythonModuleGeneration_FOUND TRUE) + +include(CMakeParseArguments) + +set(GPB_MODULE_DIR ${CMAKE_CURRENT_LIST_DIR}) + +function(_compute_implicit_include_dirs) + find_program(_GBP_CLANG_CXX_DRIVER_PATH NAMES clang++-${_GPB_CLANG_SUFFIX} clang++) + if (NOT _GBP_CLANG_CXX_DRIVER_PATH) + message(FATAL_ERROR "Failed to find clang driver corresponding to ${libclang_LIBRARY}") + endif() + execute_process(COMMAND ${_GBP_CLANG_CXX_DRIVER_PATH} -v -E -x c++ - + ERROR_VARIABLE _compilerOutput + OUTPUT_VARIABLE _compilerStdout + INPUT_FILE /dev/null) + + if( "${_compilerOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" ) + + # split the output into lines and then remove leading and trailing spaces from each of them: + string(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}") + foreach(nextLine ${_includeLines}) + # on OSX, gcc says things like this: "/System/Library/Frameworks (framework directory)", strip the last part + string(REGEX REPLACE "\\(framework directory\\)" "" nextLineNoFramework "${nextLine}") + # strip spaces at the beginning and the end + string(STRIP "${nextLineNoFramework}" _includePath) + list(APPEND _resultIncludeDirs "${_includePath}") + endforeach() + endif() + + set(_GPB_IMPLICIT_INCLUDE_DIRS ${_resultIncludeDirs} PARENT_SCOPE) +endfunction() + +function(ecm_generate_python_binding + target_keyword target_value + pythonnamespace_keyword pythonnamespace_value + modulename_keyword modulename_value + ) + + cmake_parse_arguments(GPB "" "RULES_FILE;INSTALL_DIR_SUFFIX" "SIP_DEPENDS;SIP_INCLUDES;HEADERS" ${ARGN}) + + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sip/${pythonnamespace_value}/${modulename_value}/${modulename_value}mod.sip" + " +%Module ${pythonnamespace_value}.${modulename_value} + +%ModuleHeaderCode +#pragma GCC visibility push(default) +%End\n\n") + + set(generator_depends "${GPB_MODULE_DIR}/sip_generator.py" + "${GPB_MODULE_DIR}/rules_engine.py" + "${GPB_MODULE_DIR}/FindPythonModuleGeneration.cmake" + ) + + if (NOT _GPB_IMPLICIT_INCLUDE_DIRS) + _compute_implicit_include_dirs() + endif() + + foreach(dep ${GPB_SIP_DEPENDS}) + if (IS_ABSOLUTE ${dep}) + list(APPEND generator_depends "${dep}") + endif() + file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/sip/${pythonnamespace_value}/${modulename_value}/${modulename_value}mod.sip" + "%Import ${dep}\n\n") + endforeach() + + set(sip_files) + set(commands) + + if (NOT GPB_RULES_FILE) + set(GPB_RULES_FILE "${GPB_MODULE_DIR}/Qt5Ruleset.py") + endif() + + if (NOT GPB_INSTALL_DIR_SUFFIX) + set(GPB_INSTALL_DIR_SUFFIX site-packages) + endif() + + list(APPEND generator_depends ${GPB_RULES_FILE}) + + foreach(hdr ${GPB_HEADERS}) + + get_filename_component(hdr_file ${hdr} ABSOLUTE) + + get_filename_component(hdr ${hdr} NAME_WE) + string(TOLOWER ${hdr}.h hdr_filename) + + if (NOT EXISTS "${hdr_file}") + message(FATAL_ERROR "File not found: ${hdr_file}") + endif() + + set(sip_file "${CMAKE_CURRENT_BINARY_DIR}/sip/${pythonnamespace_value}/${modulename_value}/${hdr}.sip") + list(APPEND sip_files ${sip_file}) + + set(inc_dirs "-I$,;-I>") + set(sys_inc_dirs) + foreach(d ${_GPB_IMPLICIT_INCLUDE_DIRS}) + list(APPEND sys_inc_dirs "-isystem" "${d}") + endforeach() + set(comp_defs "-D$,;-D>") + + # We might like to use $, but + # unfortunately CMake does not populate that property as a side-effect of evaluating + # COMPILE_FEATURES (Qt specifies feature requirements in its INTERFACE_COMPILE_FEATURES, and + # those are consumed to set the CXX_STANDARD internally in CMake, but evidently too late) + set(stdFlag "-std=gnu++14") + + set(comp_flags "$;${stdFlag},;>") + + add_custom_command(OUTPUT ${sip_file} + COMMAND ${GPB_PYTHON2_COMMAND} ${GPB_MODULE_DIR}/sip_generator.py + --flags " ${inc_dirs};${sys_inc_dirs};${comp_defs};${comp_flags}" + --include_filename "${hdr_filename}" + ${libclang_LIBRARY} + ${GPB_RULES_FILE} + "${hdr_file}" + "${sip_file}" + DEPENDS ${hdr_file} ${generator_depends} + VERBATIM + ) + + file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/sip/${pythonnamespace_value}/${modulename_value}/${modulename_value}mod.sip" + "%Include ${hdr}.sip\n") + endforeach() + + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}/module.sbf" + " +target = ${modulename_value} +sources = sip${modulename_value}cmodule.cpp +headers = sipAPI${modulename_value} +" + ) + + get_filename_component(SIP_PYQT5_DIR ${SIP_Qt5Core_Mod_FILE} PATH) + get_filename_component(SIP_PYQT5_DIR ${SIP_PYQT5_DIR} PATH) + + set(sip_includes -I "${SIP_PYQT5_DIR}") + if (GPB_SIP_INCLUDES) + list(APPEND sip_includes -I "$") + endif() + foreach(path ${CMAKE_PREFIX_PATH} ${CMAKE_INSTALL_PREFIX}) + if (EXISTS ${path}/share/sip) + list(APPEND sip_includes -I "${path}/share/sip") + endif() + endforeach() + + if (WIN32) + set(GPB_WS_Tag -t WS_WIN) + elif(APPLE) + set(GPB_WS_Tag -t WS_MACX) + else() + set(GPB_WS_Tag -t WS_X11) + endif() + + add_custom_target(generate_${modulename_value}_sip_files ALL DEPENDS ${sip_files}) + + 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} + --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}" + -b "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}/module.sbf" + -t ${GPB_Qt5_Tag} ${GPB_WS_Tag} + + -x VendorID -x Py_v3 + + -I "${CMAKE_CURRENT_BINARY_DIR}/sip/${pythonnamespace_value}/${modulename_value}" + ${sip_includes} + "${CMAKE_CURRENT_BINARY_DIR}/sip/${pythonnamespace_value}/${modulename_value}/${modulename_value}mod.sip" + DEPENDS generate_${modulename_value}_sip_files "${GPB_MODULE_DIR}/run-sip.py" ${generator_depends} + ) + + add_custom_target(sip_generated_${modulename_value}_files ALL + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}/unified${modulename_value}.cpp") + + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/sip/${pythonnamespace_value}/${modulename_value}" + "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}") + + foreach(pyversion ${_pyversions}) + + execute_process(COMMAND "${CMAKE_COMMAND}" + "-DPYTHON_UMBRELLA_MODULE_FILE=${CMAKE_BINARY_DIR}/py${pyversion}/${pythonnamespace_value}/__init__.py" + -P "${GPB_MODULE_DIR}/GeneratePythonBindingUmbrellaModule.cmake" + ) + + add_library(Py${pyversion}KF5${modulename_value} MODULE + "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}/unified${modulename_value}.cpp" + ) + add_dependencies(Py${pyversion}KF5${modulename_value} sip_generated_${modulename_value}_files) + target_link_libraries(Py${pyversion}KF5${modulename_value} PRIVATE ${target_value} Python::Libs${pyversion}) + + target_compile_options(Py${pyversion}KF5${modulename_value} PRIVATE -fstack-protector-strong -Wno-deprecated-declarations -Wno-overloaded-virtual) + target_include_directories(Py${pyversion}KF5${modulename_value} PRIVATE ${GPB_SIP_INCLUDES}) + target_link_libraries(Py${pyversion}KF5${modulename_value} PRIVATE -Wl,-Bsymbolic-functions -Wl,-z,relro) + + set_property(TARGET Py${pyversion}KF5${modulename_value} PROPERTY AUTOMOC OFF) + set_property(TARGET Py${pyversion}KF5${modulename_value} PROPERTY PREFIX "") + set_property(TARGET Py${pyversion}KF5${modulename_value} PROPERTY LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/py${pyversion}/${pythonnamespace_value}") + set_property(TARGET Py${pyversion}KF5${modulename_value} PROPERTY + OUTPUT_NAME "${modulename_value}") + + if (GPB_SIP_DEPENDS MATCHES PyKF5) + set(_kf5_python_prefix ${CMAKE_INSTALL_PREFIX}/lib/python${pyversion${pyversion}_maj_min}/${GPB_INSTALL_DIR_SUFFIX}) + else() + set(_kf5_python_prefix ${CMAKE_BINARY_DIR}/py${pyversion}) + endif() + add_test(NAME Py${pyversion}Test${modulename_value} COMMAND + ${GPB_PYTHON${pyversion}_COMMAND} "${CMAKE_SOURCE_DIR}/autotests/pythontest.py" + ${_kf5_python_prefix} + ) + + install(DIRECTORY ${CMAKE_BINARY_DIR}/py${pyversion}/${pythonnamespace_value} + DESTINATION lib/python${pyversion${pyversion}_maj_min}/${GPB_INSTALL_DIR_SUFFIX}) + install(FILES ${sip_files} "${CMAKE_CURRENT_BINARY_DIR}/sip/${pythonnamespace_value}/${modulename_value}/${modulename_value}mod.sip" + DESTINATION share/sip/${pythonnamespace_value}/${modulename_value} + ) + endforeach() +endfunction() diff -Nru extra-cmake-modules-5.18.0/find-modules/FindQHelpGenerator.cmake extra-cmake-modules-5.44.0/find-modules/FindQHelpGenerator.cmake --- extra-cmake-modules-5.18.0/find-modules/FindQHelpGenerator.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindQHelpGenerator.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,75 @@ +# WARNING: FOR ECM-INTERNAL USE ONLY, DO NOT USE IN OWN PROJECTS +# THIS FILE MIGHT DISAPPEAR IN FUTURE VERSIONS OF ECM. + +# Finds the Qt5 QHelpGenerator +# +# QHelpGenerator_FOUND - True if QHelpGenerator found. +# QHelpGenerator_EXECUTABLE - Path to executable + +#============================================================================= +# Copyright 2016 Friedrich W. H. Kossebau +# +# 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. +#============================================================================= + +find_package(Qt5Core QUIET) +if (TARGET Qt5::qhelpgenerator) + get_target_property(QHelpGenerator_EXECUTABLE Qt5::qhelpgenerator LOCATION) +else() + # assume same folder as qmake executable + if (TARGET Qt5::qmake) + get_target_property(_qmake_EXECUTABLE Qt5::qmake LOCATION) + get_filename_component(_path ${_qmake_EXECUTABLE} DIRECTORY) + else() + set(_path) + endif() + find_program(QHelpGenerator_EXECUTABLE + NAMES + qhelpgenerator-qt5 + qhelpgenerator + PATHS + ${_path} + NO_DEFAULT_PATH + ) +endif() +mark_as_advanced(QHelpGenerator_EXECUTABLE) + +if(QHelpGenerator_EXECUTABLE) + set(QHelpGenerator_FOUND TRUE) +else() + set(QHelpGenerator_FOUND FALSE) +endif() + +if(QHelpGenerator_FOUND) + if(NOT QHelpGenerator_FIND_QUIETLY ) + message( STATUS "Found QHelpGenerator executable: ${QHelpGenerator_EXECUTABLE}") + endif() +else() + if(QHelpGenerator_FIND_REQUIRED) + message( FATAL_ERROR "Could not find QHelpGenerator executable" ) + else() + message( STATUS "Optional QHelpGenerator executable was not found" ) + endif() +endif() + diff -Nru extra-cmake-modules-5.18.0/find-modules/FindQtWaylandScanner.cmake extra-cmake-modules-5.44.0/find-modules/FindQtWaylandScanner.cmake --- extra-cmake-modules-5.18.0/find-modules/FindQtWaylandScanner.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindQtWaylandScanner.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -86,11 +86,14 @@ #============================================================================= include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) +include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake") ecm_find_package_version_check(QtWaylandScanner) +query_qmake(qt_binaries_dir QT_INSTALL_BINS) + # Find qtwaylandscanner -find_program(QtWaylandScanner_EXECUTABLE NAMES qtwaylandscanner HINTS /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/bin/) +find_program(QtWaylandScanner_EXECUTABLE NAMES qtwaylandscanner HINTS ${qt_binaries_dir}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(QtWaylandScanner diff -Nru extra-cmake-modules-5.18.0/find-modules/FindSasl2.cmake extra-cmake-modules-5.44.0/find-modules/FindSasl2.cmake --- extra-cmake-modules-5.18.0/find-modules/FindSasl2.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindSasl2.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,114 @@ +#.rst: +# FindSasl2 +# --------- +# +# Try to find the SASL2 library. +# +# This will define the following variables: +# +# ``Sasl2_FOUND`` +# System has SASL2. +# +# ``Sasl2_VERSION`` +# The version of SASL2. +# +# ``Sasl2_INCLUDE_DIRS`` +# This should be passed to target_include_directories() if +# the target is not used for linking. +# +# ``Sasl2_LIBRARIES`` +# The SASL2 library. +# This can be passed to target_link_libraries() instead of +# the ``Sasl2::Sasl2`` target +# +# If ``Sasl2_FOUND`` is TRUE, the following imported target +# will be available: +# +# ``Sasl2::Sasl2`` +# The SASL2 library +# +# Since 5.41.0. +# +#============================================================================= +# Copyright 2006, 2007 Laurent Montel +# +# +# 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. +#============================================================================= + +# NOTE: libsasl2.pc doesn't export the include dir. +find_package(PkgConfig QUIET) +pkg_check_modules(PC_Sasl2 libsasl2) + +find_path(Sasl2_INCLUDE_DIRS NAMES sasl/sasl.h) + +# libsasl2 add for windows, because the windows package of cyrus-sasl2 +# contains a libsasl2 also for msvc which is not standard conform +find_library(Sasl2_LIBRARIES + NAMES sasl2 libsasl2 + HINTS ${PC_Sasl2_LIBRARY_DIRS} +) + +set(Sasl2_VERSION "${PC_Sasl2_VERSION}") + +if(NOT Sasl2_VERSION) + if(EXISTS "${Sasl2_INCLUDE_DIRS}/sasl/sasl.h") + file(READ "${Sasl2_INCLUDE_DIRS}/sasl/sasl.h" SASL2_H_CONTENT) + string(REGEX MATCH "#define SASL_VERSION_MAJOR[ ]+[0-9]+" SASL2_VERSION_MAJOR_MATCH ${SASL2_H_CONTENT}) + string(REGEX MATCH "#define SASL_VERSION_MINOR[ ]+[0-9]+" SASL2_VERSION_MINOR_MATCH ${SASL2_H_CONTENT}) + string(REGEX MATCH "#define SASL_VERSION_STEP[ ]+[0-9]+" SASL2_VERSION_STEP_MATCH ${SASL2_H_CONTENT}) + + string(REGEX REPLACE ".*_MAJOR[ ]+(.*)" "\\1" SASL2_VERSION_MAJOR ${SASL2_VERSION_MAJOR_MATCH}) + string(REGEX REPLACE ".*_MINOR[ ]+(.*)" "\\1" SASL2_VERSION_MINOR ${SASL2_VERSION_MINOR_MATCH}) + string(REGEX REPLACE ".*_STEP[ ]+(.*)" "\\1" SASL2_VERSION_STEP ${SASL2_VERSION_STEP_MATCH}) + + set(Sasl2_VERSION "${SASL2_VERSION_MAJOR}.${SASL2_VERSION_MINOR}.${SASL2_VERSION_STEP}") + else() + # Could not find the version + set(Sasl2_VERSION "0.0.0") + endif() +endif() + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(Sasl2 + FOUND_VAR Sasl2_FOUND + REQUIRED_VARS Sasl2_LIBRARIES Sasl2_INCLUDE_DIRS + VERSION_VAR Sasl2_VERSION +) +if(Sasl2_FOUND AND NOT TARGET Sasl2::Sasl2) + add_library(Sasl2::Sasl2 UNKNOWN IMPORTED) + set_target_properties(Sasl2::Sasl2 PROPERTIES + IMPORTED_LOCATION "${Sasl2_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${Sasl2_INCLUDE_DIRS}") +endif() + +mark_as_advanced(Sasl2_LIBRARIES Sasl2_INCLUDE_DIRS Sasl2_VERSION) + +include(FeatureSummary) +set_package_properties(Sasl2 PROPERTIES + URL "https://www.cyrusimap.org/sasl/" + DESCRIPTION "The Cyrus-sasl library." +) + diff -Nru extra-cmake-modules-5.18.0/find-modules/FindSeccomp.cmake extra-cmake-modules-5.44.0/find-modules/FindSeccomp.cmake --- extra-cmake-modules-5.18.0/find-modules/FindSeccomp.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindSeccomp.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,90 @@ +#.rst: +# FindSeccomp +# ----------- +# +# Try to locate the libseccomp library. +# If found, this will define the following variables: +# +# ``Seccomp_FOUND`` +# True if the seccomp library is available +# ``Seccomp_INCLUDE_DIRS`` +# The seccomp include directories +# ``Seccomp_LIBRARIES`` +# The seccomp libraries for linking +# +# If ``Seccomp_FOUND`` is TRUE, it will also define the following +# imported target: +# +# ``Seccomp::Seccomp`` +# The Seccomp library +# +# Since 5.44.0. + +#============================================================================= +# Copyright (c) 2017 Martin Flöser +# Copyright (c) 2017 David Kahles +# +# 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. +#============================================================================= + +find_package(PkgConfig QUIET) +pkg_check_modules(PKG_Libseccomp QUIET libseccomp) + +find_path(Seccomp_INCLUDE_DIRS + NAMES + seccomp.h + HINTS + ${PKG_Libseccomp_INCLUDE_DIRS} +) +find_library(Seccomp_LIBRARIES + NAMES + seccomp + HINTS + ${PKG_Libseccomp_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Seccomp + FOUND_VAR + Seccomp_FOUND + REQUIRED_VARS + Seccomp_LIBRARIES + Seccomp_INCLUDE_DIRS +) + +if (Seccomp_FOUND AND NOT TARGET Seccomp::Seccomp) + add_library(Seccomp::Seccomp UNKNOWN IMPORTED) + set_target_properties(Seccomp::Seccomp PROPERTIES + IMPORTED_LOCATION "${Seccomp_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${Seccomp_INCLUDE_DIRS}" + ) +endif() + +mark_as_advanced(Seccomp_LIBRARIES Seccomp_INCLUDE_DIRS) + +include(FeatureSummary) +set_package_properties(Seccomp PROPERTIES + URL "https://github.com/seccomp/libseccomp" + DESCRIPTION "The enhanced seccomp library." +) diff -Nru extra-cmake-modules-5.18.0/find-modules/FindWayland.cmake extra-cmake-modules-5.44.0/find-modules/FindWayland.cmake --- extra-cmake-modules-5.18.0/find-modules/FindWayland.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/FindWayland.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -17,7 +17,7 @@ # components searched for or found: # # ``Wayland_FOUND`` -# True if (the requestion version of) Wayland is available +# TRUE if (the requested version of) Wayland is available # ``Wayland_VERSION`` # Found Wayland version # ``Wayland_TARGETS`` @@ -34,8 +34,8 @@ # used for linking # # For each searched-for components, ``Wayland__FOUND`` will be set to -# true if the corresponding Wayland library was found, and false otherwise. If -# ``Wayland__FOUND`` is true, the imported target +# TRUE if the corresponding Wayland library was found, and FALSE otherwise. If +# ``Wayland__FOUND`` is TRUE, the imported target # ``Wayland::`` will be defined. This module will also attempt to # determine ``Wayland_*_VERSION`` variables for each imported target, although # ``Wayland_VERSION`` should normally be sufficient. diff -Nru extra-cmake-modules-5.18.0/find-modules/GeneratePythonBindingUmbrellaModule.cmake extra-cmake-modules-5.44.0/find-modules/GeneratePythonBindingUmbrellaModule.cmake --- extra-cmake-modules-5.18.0/find-modules/GeneratePythonBindingUmbrellaModule.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/GeneratePythonBindingUmbrellaModule.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) + +get_filename_component(PYTHON_UMBRELLA_MODULE_DIR ${PYTHON_UMBRELLA_MODULE_FILE} PATH) + +file(MAKE_DIRECTORY "${PYTHON_UMBRELLA_MODULE_DIR}") + +execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${PYTHON_UMBRELLA_MODULE_FILE}") diff -Nru extra-cmake-modules-5.18.0/find-modules/Qt5Ruleset.py extra-cmake-modules-5.44.0/find-modules/Qt5Ruleset.py --- extra-cmake-modules-5.18.0/find-modules/Qt5Ruleset.py 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/Qt5Ruleset.py 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,156 @@ +#!/usr/bin/env python +# +# Copyright 2016 Shaheed Haque +# Copyright 2016 Stephen Kelly +# +# 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. +# + +from __future__ import print_function + +import rules_engine + +def container_rules(): + return [ + # + # SIP does not seem to be able to handle these. + # + [".*", "(QMetaTypeId|QTypeInfo)<.*>", ".*", ".*", ".*", rules_engine.container_discard], + # + # SIP does not seem to be able to handle templated containers. + # + [".*", ".*<.*", ".*", ".*", ".*", rules_engine.container_discard], + ] + +def function_rules(): + return [ + # + # Discard functions emitted by QOBJECT. + # + [".*", "metaObject|qt_metacast|tr|trUtf8|qt_metacall|qt_check_for_QOBJECT_macro|qt_check_for_QGADGET_macro", ".*", ".*", ".*", rules_engine.function_discard], + # + # SIP does not support operator=. + # + [".*", "operator=", ".*", ".*", ".*", rules_engine.function_discard], + + [".*", ".*", ".*", ".*", ".*::QPrivateSignal.*", rules_engine.function_discard], + # + # TODO: Temporarily remove any functions which require templates. SIP seems to support, e.g. QPairs, + # but we have not made them work yet. + # + + [".*", ".*", ".+", ".*", ".*", rules_engine.function_discard], + [".*", ".*<.*>.*", ".*", ".*", ".*", rules_engine.function_discard], + + [".*", ".*", ".*", ".*", ".*std::function.*", rules_engine.function_discard], + [".*", ".*", ".*", ".*", ".*std::numeric_limits.*", rules_engine.function_discard], + [".*", ".*", ".*", ".*", ".*QPair.*", rules_engine.function_discard], + [".*", ".*", ".*", ".*QPair.*", ".*", rules_engine.function_discard], + + [".*", ".*", ".*", ".*", ".*QDebug.*", rules_engine.function_discard], + [".*", ".*", ".*", ".*QDebug.*", ".*", rules_engine.function_discard], + + [".*", ".*", ".*", ".*", ".*QExplicitlySharedDataPointer.*", rules_engine.function_discard], + [".*", ".*", ".*", ".*QExplicitlySharedDataPointer.*", ".*", rules_engine.function_discard], + + [".*", ".*", ".*", ".*", ".*Private.*", rules_engine.function_discard], + [".*", ".*", ".*", "mode_t", ".*", rules_engine.return_rewrite_mode_t_as_int], + [".*", "d_func", ".*", ".*", ".*", rules_engine.function_discard], + + [".*", "operator\|", ".*", ".*", ".*", rules_engine.function_discard], + ] + +def parameter_rules(): + return [ + # + # Annotate with Transfer or TransferThis when we see a parent object. + # + [".*", ".*", ".*", r"[KQ][A-Za-z_0-9]+\W*\*\W*parent", ".*", rules_engine.parameter_transfer_to_parent], + [".*", ".*", ".*", "mode_t.*", ".*", rules_engine.param_rewrite_mode_t_as_int], + [".*", ".*", ".*", ".*enum .*", ".*", rules_engine.parameter_strip_class_enum], + ] + +def variable_rules(): + return [ + # + # Discard variable emitted by QOBJECT. + # + [".*", "staticMetaObject", ".*", rules_engine.variable_discard], + # + # Discard "private" variables. + # + [".*", "d_ptr", ".*", rules_engine.variable_discard], + [".*", "d", ".*Private.*", rules_engine.variable_discard], + ] + +def typedef_rules(): + return [] + +def forward_declaration_rules(): + return [] + +class RuleSet(rules_engine.RuleSet): + """ + SIP file generator rules. This is a set of (short, non-public) functions + and regular expression-based matching rules. + """ + def __init__(self): + self._container_db = rules_engine.ContainerRuleDb(container_rules) + self._forward_declaration_db = rules_engine.ForwardDeclarationRuleDb(forward_declaration_rules) + self._fn_db = rules_engine.FunctionRuleDb(function_rules) + self._param_db = rules_engine.ParameterRuleDb(parameter_rules) + self._typedef_db = rules_engine.TypedefRuleDb(typedef_rules) + self._var_db = rules_engine.VariableRuleDb(variable_rules) + self._methodcode = rules_engine.MethodCodeDb({}) + self._modulecode = rules_engine.ModuleCodeDb({}) + + def container_rules(self): + return self._container_db + + def forward_declaration_rules(self): + return self._forward_declaration_db + + def function_rules(self): + return self._fn_db + + def parameter_rules(self): + return self._param_db + + def typedef_rules(self): + return self._typedef_db + + def variable_rules(self): + return self._var_db + + def methodcode_rules(self): + return self._methodcode + + def modulecode_rules(self): + return self._modulecode + + def methodcode(self, function, sip): + return self._methodcode.apply(function, sip) + + def modulecode(self, filename, sip): + return self._modulecode.apply(filename, sip) diff -Nru extra-cmake-modules-5.18.0/find-modules/rules_engine.py extra-cmake-modules-5.44.0/find-modules/rules_engine.py --- extra-cmake-modules-5.18.0/find-modules/rules_engine.py 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/rules_engine.py 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,996 @@ +#!/usr/bin/env python +# +# Copyright 2016 by Shaheed Haque (srhaque@theiet.org) +# Copyright 2016 Stephen Kelly +# +# 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. +# + +"""SIP file generation rules engine.""" + +from __future__ import print_function + +from abc import * +import argparse +import gettext +import inspect +import logging +import os +import re +import sys +import textwrap +import traceback +from copy import deepcopy +from clang.cindex import CursorKind + +from clang.cindex import AccessSpecifier + +class HelpFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter): + pass + + +logger = logging.getLogger(__name__) +gettext.install(__name__) +_SEPARATOR = "\x00" + +def _parents(container): + parents = [] + parent = container.semantic_parent + while parent and parent.kind != CursorKind.TRANSLATION_UNIT: + parents.append(parent.spelling) + parent = parent.semantic_parent + if parents: + parents = "::".join(reversed(parents)) + else: + parents = os.path.basename(container.translation_unit.spelling) + return parents + + +class Rule(object): + def __init__(self, db, rule_number, fn, pattern_zip): + # + # Derive a useful name for diagnostic purposes. + # + caller = os.path.basename(inspect.stack()[3][1]) + self.name = "{}:{}[{}],{}".format(caller, type(db).__name__, rule_number, fn.__name__) + self.rule_number = rule_number + self.fn = fn + self.usage = 0 + try: + groups = ["(?P<{}>{})".format(name, pattern) for pattern, name in pattern_zip] + groups = _SEPARATOR.join(groups) + # + # We'll use re.match to anchor the start of the match, and so need a $ to anchor the end. + # + self.matcher = re.compile(groups + "$") + except Exception as e: + groups = ["{} '{}'".format(name, pattern) for pattern, name in pattern_zip] + groups = ", ".join(groups) + raise RuntimeError(_("Bad {}: {}: {}").format(self, groups, e)) + + def match(self, candidate): + return self.matcher.match(candidate) + + def trace_result(self, parents, item, original, modified): + """ + Record any modification both in the log and the returned result. If a rule fired, but + caused no modification, that is logged. + + :return: Modifying rule or None. + """ + fqn = parents + "::" + original["name"] + "[" + str(item.extent.start.line) + "]" + return self._trace_result(fqn, original, modified) + + def _trace_result(self, fqn, original, modified): + """ + Record any modification both in the log and the returned result. If a rule fired, but + caused no modification, that is logged. + + :return: Modifying rule or None. + """ + if not modified["name"]: + logger.debug(_("Rule {} suppressed {}, {}").format(self, fqn, original)) + else: + delta = False + for k, v in original.iteritems(): + if v != modified[k]: + delta = True + break + if delta: + logger.debug(_("Rule {} modified {}, {}->{}").format(self, fqn, original, modified)) + else: + logger.warn(_("Rule {} did not modify {}, {}").format(self, fqn, original)) + return None + return self + + def __str__(self): + return self.name + + +class AbstractCompiledRuleDb(object): + __metaclass__ = ABCMeta + + def __init__(self, db, parameter_names): + self.db = db + self.compiled_rules = [] + for i, raw_rule in enumerate(db()): + if len(raw_rule) != len(parameter_names) + 1: + raise RuntimeError(_("Bad raw rule {}: {}: {}").format(db.__name__, raw_rule, parameter_names)) + z = zip(raw_rule[:-1], parameter_names) + self.compiled_rules.append(Rule(self, i, raw_rule[-1], z)) + self.candidate_formatter = _SEPARATOR.join(["{}"] * len(parameter_names)) + + def _match(self, *args): + candidate = self.candidate_formatter.format(*args) + for rule in self.compiled_rules: + matcher = rule.match(candidate) + if matcher: + # + # Only use the first matching rule. + # + rule.usage += 1 + return matcher, rule + return None, None + + @abstractmethod + def apply(self, *args): + raise NotImplemented(_("Missing subclass")) + + def dump_usage(self, fn): + """ Dump the usage counts.""" + for rule in self.compiled_rules: + fn(str(rule), rule.usage) + + +class ContainerRuleDb(AbstractCompiledRuleDb): + """ + THE RULES FOR CONTAINERS. + + These are used to customise the behaviour of the SIP generator by allowing + the declaration for any container (class, namespace, struct, union) to be + customised, for example to add SIP compiler annotations. + + Each entry in the raw rule database must be a list with members as follows: + + 0. A regular expression which matches the fully-qualified name of the + "container" enclosing the container. + + 1. A regular expression which matches the container name. + + 2. A regular expression which matches any template parameters. + + 3. A regular expression which matches the container declaration. + + 4. A regular expression which matches any base specifiers. + + 5. A function. + + In use, the database is walked in order from the first entry. If the regular + expressions are matched, the function is called, and no further entries are + walked. The function is called with the following contract: + + def container_xxx(container, sip, matcher): + ''' + Return a modified declaration for the given container. + + :param container: The clang.cindex.Cursor for the container. + :param sip: A dict with the following keys: + + name The name of the container. + template_parameters Any template parameters. + decl The declaration. + base_specifiers Any base specifiers. + body The body, less the outer + pair of braces. + annotations Any SIP annotations. + + :param matcher: The re.Match object. This contains named + groups corresponding to the key names above + EXCEPT body and annotations. + + :return: An updated set of sip.xxx values. Setting sip.name to the + empty string will cause the container to be suppressed. + ''' + + :return: The compiled form of the rules. + """ + def __init__(self, db): + super(ContainerRuleDb, self).__init__(db, ["parents", "container", "template_parameters", "decl", "base_specifiers"]) + + def apply(self, container, sip): + """ + Walk over the rules database for containers, applying the first matching transformation. + + :param container: The clang.cindex.Cursor for the container. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). + """ + parents = _parents(container) + matcher, rule = self._match(parents, sip["name"], + ", ".join(sip["template_parameters"]), + sip["decl"], + ", ".join(sip["base_specifiers"])) + if matcher: + before = deepcopy(sip) + rule.fn(container, sip, matcher) + return rule.trace_result(parents, container, before, sip) + return None + + +class ForwardDeclarationRuleDb(AbstractCompiledRuleDb): + """ + THE RULES FOR FORWARD DECLARATIONS. + + These are used to customise the behaviour of the SIP generator by allowing + the forward declaration for any container (class, struct, union) to be + customised, for example to add SIP compiler annotations. + + Each entry in the raw rule database must be a list with members as follows: + + 0. A regular expression which matches the fully-qualified name of the + "container" enclosing the container. + + 1. A regular expression which matches the container name. + + 2. A regular expression which matches any template parameters. + + 3. A function. + + In use, the database is walked in order from the first entry. If the regular + expressions are matched, the function is called, and no further entries are + walked. The function is called with the following contract: + + def declaration_xxx(container, sip, matcher): + ''' + Return a modified declaration for the given container. + + :param container: The clang.cindex.Cursor for the container. + :param sip: A dict with the following keys: + + name The name of the container. + template_parameters Any template parameters. + annotations Any SIP annotations. + + :param matcher: The re.Match object. This contains named + groups corresponding to the key names above + EXCEPT body and annotations. + + :return: An updated set of sip.xxx values. Setting sip.name to the + empty string will cause the container to be suppressed. + ''' + + :return: The compiled form of the rules. + """ + def __init__(self, db): + super(ForwardDeclarationRuleDb, self).__init__(db, ["parents", "container", "template_parameters"]) + + def apply(self, container, sip): + """ + Walk over the rules database for containers, applying the first matching transformation. + + :param container: The clang.cindex.Cursor for the container. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). + """ + parents = _parents(container) + matcher, rule = self._match(parents, sip["name"], + ", ".join(sip["template_parameters"])) + if matcher: + before = deepcopy(sip) + rule.fn(container, sip, matcher) + return rule.trace_result(parents, container, before, sip) + return None + + +class FunctionRuleDb(AbstractCompiledRuleDb): + """ + THE RULES FOR FUNCTIONS. + + These are used to customise the behaviour of the SIP generator by allowing + the declaration for any function to be customised, for example to add SIP + compiler annotations. + + Each entry in the raw rule database must be a list with members as follows: + + 0. A regular expression which matches the fully-qualified name of the + "container" enclosing the function. + + 1. A regular expression which matches the function name. + + 2. A regular expression which matches any template parameters. + + 3. A regular expression which matches the function result. + + 4. A regular expression which matches the function parameters (e.g. + "int a, void *b" for "int foo(int a, void *b)"). + + 5. A function. + + In use, the database is walked in order from the first entry. If the regular + expressions are matched, the function is called, and no further entries are + walked. The function is called with the following contract: + + def function_xxx(container, function, sip, matcher): + ''' + Return a modified declaration for the given function. + + :param container: The clang.cindex.Cursor for the container. + :param function: The clang.cindex.Cursor for the function. + :param sip: A dict with the following keys: + + name The name of the function. + template_parameters Any template parameters. + fn_result Result, if not a constructor. + parameters The parameters. + prefix Leading keyworks ("static"). Separated by space, + ends with a space. + suffix Trailing keywords ("const"). Separated by space, starts with + space. + annotations Any SIP annotations. + + :param matcher: The re.Match object. This contains named + groups corresponding to the key names above + EXCEPT annotations. + + :return: An updated set of sip.xxx values. Setting sip.name to the + empty string will cause the container to be suppressed. + ''' + + :return: The compiled form of the rules. + """ + def __init__(self, db): + super(FunctionRuleDb, self).__init__(db, ["container", "function", "template_parameters", "fn_result", "parameters"]) + + def apply(self, container, function, sip): + """ + Walk over the rules database for functions, applying the first matching transformation. + + :param container: The clang.cindex.Cursor for the container. + :param function: The clang.cindex.Cursor for the function. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). + """ + parents = _parents(function) + matcher, rule = self._match(parents, sip["name"], ", ".join(sip["template_parameters"]), sip["fn_result"], ", ".join(sip["parameters"])) + if matcher: + sip.setdefault("code", "") + before = deepcopy(sip) + rule.fn(container, function, sip, matcher) + return rule.trace_result(parents, function, before, sip) + return None + + +class ParameterRuleDb(AbstractCompiledRuleDb): + """ + THE RULES FOR FUNCTION PARAMETERS. + + These are used to customise the behaviour of the SIP generator by allowing + the declaration for any parameter in any function to be customised, for + example to add SIP compiler annotations. + + Each entry in the raw rule database must be a list with members as follows: + + 0. A regular expression which matches the fully-qualified name of the + "container" enclosing the function enclosing the parameter. + + 1. A regular expression which matches the function name enclosing the + parameter. + + 2. A regular expression which matches the parameter name. + + 3. A regular expression which matches the parameter declaration (e.g. + "int foo"). + + 4. A regular expression which matches the parameter initialiser (e.g. + "Xyz:MYCONST + 42"). + + 5. A function. + + In use, the database is walked in order from the first entry. If the regular + expressions are matched, the function is called, and no further entries are + walked. The function is called with the following contract: + + def parameter_xxx(container, function, parameter, sip, init, matcher): + ''' + Return a modified declaration and initialiser for the given parameter. + + :param container: The clang.cindex.Cursor for the container. + :param function: The clang.cindex.Cursor for the function. + :param parameter: The clang.cindex.Cursor for the parameter. + :param sip: A dict with the following keys: + + name The name of the function. + decl The declaration. + init Any initialiser. + annotations Any SIP annotations. + + :param matcher: The re.Match object. This contains named + groups corresponding to the key names above + EXCEPT annotations. + + :return: An updated set of sip.xxx values. + ''' + + :return: The compiled form of the rules. + """ + def __init__(self, db): + super(ParameterRuleDb, self).__init__(db, ["container", "function", "parameter", "decl", "init"]) + + def apply(self, container, function, parameter, sip): + """ + Walk over the rules database for parameters, applying the first matching transformation. + + :param container: The clang.cindex.Cursor for the container. + :param function: The clang.cindex.Cursor for the function. + :param parameter: The clang.cindex.Cursor for the parameter. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). + """ + parents = _parents(function) + matcher, rule = self._match(parents, function.spelling, sip["name"], sip["decl"], sip["init"]) + if matcher: + sip.setdefault("code", "") + before = deepcopy(sip) + rule.fn(container, function, parameter, sip, matcher) + return rule.trace_result(parents, parameter, before, sip) + return None + + +class TypedefRuleDb(AbstractCompiledRuleDb): + """ + THE RULES FOR TYPEDEFS. + + These are used to customise the behaviour of the SIP generator by allowing + the declaration for any typedef to be customised, for example to add SIP + compiler annotations. + + Each entry in the raw rule database must be a list with members as follows: + + 0. A regular expression which matches the fully-qualified name of the + "container" enclosing the typedef. + + 1. A regular expression which matches the typedef name. + + 2. A function. + + In use, the database is walked in order from the first entry. If the regular + expressions are matched, the function is called, and no further entries are + walked. The function is called with the following contract: + + def typedef_xxx(container, typedef, sip, matcher): + ''' + Return a modified declaration for the given function. + + :param container: The clang.cindex.Cursor for the container. + :param typedef: The clang.cindex.Cursor for the typedef. + :param sip: A dict with the following keys: + + name The name of the typedef. + annotations Any SIP annotations. + + :param matcher: The re.Match object. This contains named + groups corresponding to the key names above + EXCEPT annotations. + + :return: An updated set of sip.xxx values. Setting sip.name to the + empty string will cause the container to be suppressed. + ''' + + :return: The compiled form of the rules. + """ + def __init__(self, db): + super(TypedefRuleDb, self).__init__(db, ["container", "typedef"]) + + def apply(self, container, typedef, sip): + """ + Walk over the rules database for typedefs, applying the first matching transformation. + + :param container: The clang.cindex.Cursor for the container. + :param typedef: The clang.cindex.Cursor for the typedef. + :param sip: The SIP dict. + """ + parents = _parents(typedef) + matcher, rule = self._match(parents, sip["name"]) + if matcher: + before = deepcopy(sip) + rule.fn(container, typedef, sip, matcher) + return rule.trace_result(parents, typedef, before, sip) + return None + + +class VariableRuleDb(AbstractCompiledRuleDb): + """ + THE RULES FOR VARIABLES. + + These are used to customise the behaviour of the SIP generator by allowing + the declaration for any variable to be customised, for example to add SIP + compiler annotations. + + Each entry in the raw rule database must be a list with members as follows: + + 0. A regular expression which matches the fully-qualified name of the + "container" enclosing the variable. + + 1. A regular expression which matches the variable name. + + 2. A regular expression which matches the variable declaration (e.g. + "int foo"). + + 3. A function. + + In use, the database is walked in order from the first entry. If the regular + expressions are matched, the function is called, and no further entries are + walked. The function is called with the following contract: + + def variable_xxx(container, variable, sip, matcher): + ''' + Return a modified declaration for the given variable. + + :param container: The clang.cindex.Cursor for the container. + :param variable: The clang.cindex.Cursor for the variable. + :param sip: A dict with the following keys: + + name The name of the variable. + decl The declaration. + annotations Any SIP annotations. + + :param matcher: The re.Match object. This contains named + groups corresponding to the key names above + EXCEPT annotations. + + :return: An updated set of sip.xxx values. Setting sip.name to the + empty string will cause the container to be suppressed. + ''' + + :return: The compiled form of the rules. + """ + def __init__(self, db): + super(VariableRuleDb, self).__init__(db, ["container", "variable", "decl"]) + + def apply(self, container, variable, sip): + """ + Walk over the rules database for variables, applying the first matching transformation. + + :param container: The clang.cindex.Cursor for the container. + :param variable: The clang.cindex.Cursor for the variable. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). + """ + parents = _parents(variable) + matcher, rule = self._match(parents, sip["name"], sip["decl"]) + if matcher: + sip.setdefault("code", "") + before = deepcopy(sip) + rule.fn(container, variable, sip, matcher) + return rule.trace_result(parents, variable, before, sip) + return None + + +class AbstractCompiledCodeDb(object): + __metaclass__ = ABCMeta + + def __init__(self, db): + caller = os.path.basename(inspect.stack()[2][1]) + self.name = "{}:{}".format(caller, type(self).__name__) + self.db = db + + @abstractmethod + def apply(self, function, sip): + raise NotImplemented(_("Missing subclass")) + + def trace_result(self, parents, item, original, modified): + """ + Record any modification both in the log and the returned result. If a rule fired, but + caused no modification, that is logged. + + :return: Modifying rule or None. + """ + fqn = parents + "::" + original["name"] + "[" + str(item.extent.start.line) + "]" + self._trace_result(fqn, original, modified) + + def _trace_result(self, fqn, original, modified): + """ + Record any modification both in the log and the returned result. If a rule fired, but + caused no modification, that is logged. + + :return: Modifying rule or None. + """ + if not modified["name"]: + logger.debug(_("Rule {} suppressed {}, {}").format(self, fqn, original)) + else: + delta = False + for k, v in original.iteritems(): + if v != modified[k]: + delta = True + break + if delta: + logger.debug(_("Rule {} modified {}, {}->{}").format(self, fqn, original, modified)) + else: + logger.warn(_("Rule {} did not modify {}, {}").format(self, fqn, original)) + return None + return self + + @abstractmethod + def dump_usage(self, fn): + raise NotImplemented(_("Missing subclass")) + + def __str__(self): + return self.name + +class MethodCodeDb(AbstractCompiledCodeDb): + """ + THE RULES FOR INJECTING METHOD-RELATED CODE (such as %MethodCode, + %VirtualCatcherCode, %VirtualCallCode and other method-level directives). + + These are used to customise the behaviour of the SIP generator by allowing + method-level code injection. + + The raw rule database must be an outer dictionary as follows: + + 0. Each key is the fully-qualified name of a "container" enclosing + methods. + + 1. Each value is an inner dictionary, each of whose keys is the name + of a method. + + Each inner dictionary has entries which update the declaration as follows: + + "name": Optional string. If present, overrides the name of the + method. + "parameters": Optional list. If present, update the argument list. + + "fn_result": Optional string. If present, update the return type. + + "code": Required. Either a string, with the %XXXCode content, + or a callable. + + In use, the database is directly indexed by "container" and then method + name. If "code" entry is a string, then the other optional keys are + interpreted as above. If "code" is a callable, it is called with the + following contract: + + def methodcode_xxx(function, sip, entry): + ''' + Return a modified declaration for the given function. + + :param function: The clang.cindex.Cursor for the function. + :param sip: A dict with keys as for function rules and (string) + "code" keys described above. + :param entry: The inner dictionary entry. + + :return: An updated set of sip.xxx values. + ''' + + :return: The compiled form of the rules. + """ + __metaclass__ = ABCMeta + + def __init__(self, db): + super(MethodCodeDb, self).__init__(db) + + for k, v in self.db.items(): + for l in v.keys(): + v[l]["usage"] = 0 + + def _get(self, item, name): + + parents = _parents(item) + entries = self.db.get(parents, None) + if not entries: + return None + + entry = entries.get(name, None) + if not entry: + return None + entry["usage"] += 1 + return entry + + def apply(self, function, sip): + """ + Walk over the code database for functions, applying the first matching transformation. + + :param function: The clang.cindex.Cursor for the function. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). + """ + entry = self._get(function, sip["name"]) + sip.setdefault("code", "") + if entry: + before = deepcopy(sip) + if callable(entry["code"]): + fn = entry["code"] + fn_file = os.path.basename(inspect.getfile(fn)) + trace = "// Generated (by {}:{}): {}\n".format(fn_file, fn.__name__, {k:v for (k,v) in entry.items() if k != "code"}) + fn(function, sip, entry) + else: + trace = "// Inserted (by {}:{}): {}\n".format(_parents(function), function.spelling, {k:v for (k,v) in entry.items() if k != "code"}) + sip["code"] = entry["code"] + sip["parameters"] = entry.get("parameters", sip["parameters"]) + sip["fn_result"] = entry.get("fn_result", sip["fn_result"]) + # + # Fetch/format the code. + # + sip["code"] = trace + textwrap.dedent(sip["code"]).strip() + "\n" + return self.trace_result(_parents(function), function, before, sip) + return None + + def dump_usage(self, fn): + """ Dump the usage counts.""" + for k in sorted(self.db.keys()): + vk = self.db[k] + for l in sorted(vk.keys()): + vl = vk[l] + fn(str(self) + " for " + k + "," + l, vl["usage"]) + +class ModuleCodeDb(AbstractCompiledCodeDb): + """ + THE RULES FOR INJECTING MODULE-RELATED CODE (such as %ExportedHeaderCode, + %ModuleCode, %ModuleHeaderCode or other module-level directives). + + These are used to customise the behaviour of the SIP generator by allowing + module-level code injection. + + The raw rule database must be a dictionary as follows: + + 0. Each key is the basename of a header file. + + 1. Each value has entries which update the declaration as follows: + + "code": Required. Either a string, with the %XXXCode content, + or a callable. + + If "code" is a callable, it is called with the following contract: + + def module_xxx(filename, sip, entry): + ''' + Return a string to insert for the file. + + :param filename: The filename. + :param sip: A dict with the key "name" for the filename, + "decl" for the module body plus the "code" key + described above. + :param entry: The dictionary entry. + + :return: A string. + ''' + + :return: The compiled form of the rules. + """ + __metaclass__ = ABCMeta + + def __init__(self, db): + super(ModuleCodeDb, self).__init__(db) + # + # Add a usage count and other diagnostic support for each item in the database. + # + for k, v in self.db.items(): + v["usage"] = 0 + + def _get(self, filename): + # + # Lookup for an actual hit. + # + entry = self.db.get(filename, None) + if not entry: + return None + entry["usage"] += 1 + return entry + + def apply(self, filename, sip): + """ + Walk over the code database for modules, applying the first matching transformation. + + :param filename: The file for the module. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). + """ + entry = self._get(filename) + sip.setdefault("code", "") + if entry: + before = deepcopy(sip) + if callable(entry["code"]): + fn = entry["code"] + fn_file = os.path.basename(inspect.getfile(fn)) + trace = "\n// Generated (by {}:{}): {}".format(fn_file, fn.__name__, {k:v for (k,v) in entry.items() if k != "code"}) + fn(filename, sip, entry) + sip["code"] = trace + sip["code"] + else: + sip["code"] = entry["code"] + # + # Fetch/format the code. + # + sip["code"] = textwrap.dedent(sip["code"]).strip() + "\n" + fqn = filename + "::" + before["name"] + self._trace_result(fqn, before, sip) + + def dump_usage(self, fn): + """ Dump the usage counts.""" + for k in sorted(self.db.keys()): + v = self.db[k] + fn(str(self) + " for " + k, v["usage"]) + + +class RuleSet(object): + """ + To implement your own binding, create a subclass of RuleSet, also called + RuleSet in your own Python module. Your subclass will expose the raw rules + along with other ancilliary data exposed through the subclass methods. + + You then simply run the SIP generation and SIP compilation programs passing + in the name of your rules file + """ + __metaclass__ = ABCMeta + + @abstractmethod + def container_rules(self): + """ + Return a compiled list of rules for containers. + + :return: A ContainerRuleDb instance + """ + raise NotImplemented(_("Missing subclass implementation")) + + @abstractmethod + def forward_declaration_rules(self): + """ + Return a compiled list of rules for containers. + + :return: A ForwardDeclarationRuleDb instance + """ + raise NotImplemented(_("Missing subclass implementation")) + + @abstractmethod + def function_rules(self): + """ + Return a compiled list of rules for functions. + + :return: A FunctionRuleDb instance + """ + raise NotImplemented(_("Missing subclass implementation")) + + @abstractmethod + def parameter_rules(self): + """ + Return a compiled list of rules for function parameters. + + :return: A ParameterRuleDb instance + """ + raise NotImplemented(_("Missing subclass implementation")) + + @abstractmethod + def typedef_rules(self): + """ + Return a compiled list of rules for typedefs. + + :return: A TypedefRuleDb instance + """ + raise NotImplemented(_("Missing subclass implementation")) + + @abstractmethod + def variable_rules(self): + """ + Return a compiled list of rules for variables. + + :return: A VariableRuleDb instance + """ + raise NotImplemented(_("Missing subclass implementation")) + + @abstractmethod + def methodcode_rules(self): + """ + Return a compiled list of rules for method-related code. + + :return: A MethodCodeDb instance + """ + raise NotImplemented(_("Missing subclass implementation")) + + @abstractmethod + def modulecode_rules(self): + """ + Return a compiled list of rules for module-related code. + + :return: A ModuleCodeDb instance + """ + raise NotImplemented(_("Missing subclass implementation")) + + def dump_unused(self): + """Usage statistics, to identify unused rules.""" + def dumper(rule, usage): + if usage: + logger.info(_("Rule {} used {} times".format(rule, usage))) + else: + logger.warn(_("Rule {} was not used".format(rule))) + + for db in [self.container_rules(), self.forward_declaration_rules(), self.function_rules(), + self.parameter_rules(), self.typedef_rules(), + self.variable_rules(), self.methodcode_rules(), self.modulecode_rules()]: + db.dump_usage(dumper) + + @abstractmethod + def methodcode(self, container, function): + """ + Lookup %MethodCode. + """ + raise NotImplemented(_("Missing subclass implementation")) + + @abstractmethod + def modulecode(self, filename): + """ + Lookup %ModuleCode and friends. + """ + raise NotImplemented(_("Missing subclass implementation")) + + +def container_discard(container, sip, matcher): + sip["name"] = "" + +def function_discard(container, function, sip, matcher): + sip["name"] = "" + +def parameter_transfer_to_parent(container, function, parameter, sip, matcher): + if function.is_static_method(): + sip["annotations"].add("Transfer") + else: + sip["annotations"].add("TransferThis") + +def param_rewrite_mode_t_as_int(container, function, parameter, sip, matcher): + sip["decl"] = sip["decl"].replace("mode_t", "unsigned int") + +def return_rewrite_mode_t_as_int(container, function, sip, matcher): + sip["fn_result"] = "unsigned int" + +def variable_discard(container, variable, sip, matcher): + sip["name"] = "" + +def parameter_strip_class_enum(container, function, parameter, sip, matcher): + sip["decl"] = sip["decl"].replace("class ", "").replace("enum ", "") + +def function_discard_impl(container, function, sip, matcher): + if function.extent.start.column == 1: + sip["name"] = "" + +def typedef_discard(container, typedef, sip, matcher): + sip["name"] = "" + +def discard_QSharedData_base(container, sip, matcher): + sip["base_specifiers"].remove("QSharedData") + +def mark_forward_declaration_external(container, sip, matcher): + sip["annotations"].add("External") + +def container_mark_abstract(container, sip, matcher): + sip["annotations"].add("Abstract") + +def rules(project_rules): + """ + Constructor. + + :param project_rules: The rules file for the project. + """ + import imp + imp.load_source("project_rules", project_rules) + # + # Statically prepare the rule logic. This takes the rules provided by the user and turns them into code. + # + return getattr(sys.modules["project_rules"], "RuleSet")() diff -Nru extra-cmake-modules-5.18.0/find-modules/run-sip.py extra-cmake-modules-5.44.0/find-modules/run-sip.py --- extra-cmake-modules-5.18.0/find-modules/run-sip.py 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/run-sip.py 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,55 @@ +#!/usr/bin/env python + +import os, sys +import fnmatch +import subprocess + +sipArgs = sys.argv[1:] + +idx = sipArgs.index("--module-name") +modname = sipArgs[idx + 1] +del sipArgs[idx] +del sipArgs[idx] + +idx = sipArgs.index("-c") +loc = sipArgs[idx + 1] + +oldFilenames = fnmatch.filter(os.listdir(loc), "sip" + modname + "*.cpp") +try: + oldFilenames.remove("sip" + modname + "cmodule.cpp") +except: + pass +for f in oldFilenames: + try: + os.remove(os.path.join(loc, f)) + except OSError: + pass + +idx = sipArgs.index("--unify") +unified = sipArgs[idx + 1] +del sipArgs[idx] +del sipArgs[idx] + +idx = sipArgs.index("--sip") +exe = sipArgs[idx + 1] +del sipArgs[idx] +del sipArgs[idx] + +try: + print(subprocess.check_output([exe] + sipArgs)) +except subprocess.CalledProcessError: + sys.exit(1) + +newFilenames = fnmatch.filter(os.listdir(loc), "sip" + modname + "*.cpp") +unifiedString = '\n'.join(['#include "%s"' % f for f in newFilenames]) + '\n' + +for fn in newFilenames: + lines = [] + with open(os.path.join(loc, fn), "r") as f: + lines = f.readlines() + lines = [line for line in lines if not line.startswith("#line")] + with open(os.path.join(loc, fn), "w") as f: + f.write(''.join(lines)) + +with open(unified, "w") as f: + f.write(unifiedString) diff -Nru extra-cmake-modules-5.18.0/find-modules/sip_generator.py extra-cmake-modules-5.44.0/find-modules/sip_generator.py --- extra-cmake-modules-5.18.0/find-modules/sip_generator.py 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/find-modules/sip_generator.py 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,804 @@ +#!/usr/bin/env python +# +# Copyright 2016 by Shaheed Haque (srhaque@theiet.org) +# Copyright 2016 by Stephen Kelly (steveire@gmail.com) +# +# 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. +# + +"""SIP file generator for PyQt.""" + +from __future__ import print_function +import argparse +import gettext +import inspect +import logging +import os +import re +import sys +import traceback +from clang import cindex +from clang.cindex import AccessSpecifier, CursorKind, SourceRange, StorageClass, TokenKind, TypeKind, TranslationUnit + +import rules_engine + + +class HelpFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter): + pass + + +logger = logging.getLogger(__name__) +gettext.install(__name__) + +EXPR_KINDS = [ + CursorKind.UNEXPOSED_EXPR, + CursorKind.CONDITIONAL_OPERATOR, CursorKind.UNARY_OPERATOR, CursorKind.BINARY_OPERATOR, + CursorKind.INTEGER_LITERAL, CursorKind.FLOATING_LITERAL, CursorKind.STRING_LITERAL, + CursorKind.CXX_BOOL_LITERAL_EXPR, CursorKind.CXX_STATIC_CAST_EXPR, CursorKind.DECL_REF_EXPR +] +TEMPLATE_KINDS = [ + CursorKind.TYPE_REF, CursorKind.TEMPLATE_REF, CursorKind.NAMESPACE_REF + ] + EXPR_KINDS + +def clang_diagnostic_to_logging_diagnostic(lvl): + """ + + The diagnostic levels in cindex.py are + + Ignored = 0 + Note = 1 + Warning = 2 + Error = 3 + Fatal = 4 + + and the leves in the python logging module are + + NOTSET 0 + DEBUG 10 + INFO 20 + WARNING 30 + ERROR 40 + CRITICAL 50 + + """ + return (logging.NOTSET, + logging.INFO, + logging.WARNING, + logging.ERROR, + logging.CRITICAL)[lvl] + +def diagnostic_word(lvl): + return ("", "info", "warning", "error", "fatality")[lvl] + +class SipGenerator(object): + def __init__(self, project_rules, compile_flags, verbose=False, dump_includes=False, dump_privates=False): + """ + Constructor. + + :param project_rules: The rules for the file. + :param compile_flags: The compile flags for the file. + :param dump_includes: Turn on diagnostics for include files. + :param dump_privates: Turn on diagnostics for omitted private items. + """ + self.rules = project_rules + self.compile_flags = compile_flags + self.verbose = verbose + self.dump_includes = dump_includes + self.dump_privates = dump_privates + self.diagnostics = set() + self.tu = None + self.unpreprocessed_source = None + + @staticmethod + def describe(cursor, text=None): + if not text: + text = cursor.spelling + return "{} on line {} '{}'".format(cursor.kind.name, cursor.extent.start.line, text) + + def create_sip(self, h_file, include_filename): + """ + Actually convert the given source header file into its SIP equivalent. + + :param h_file: The source (header) file of interest. + :param include_filename: The (header) to generate in the sip file. + """ + + # + # Read in the original file. + # + source = h_file + self.unpreprocessed_source = [] + with open(source, "rU") as f: + for line in f: + self.unpreprocessed_source.append(line) + + index = cindex.Index.create() + self.tu = index.parse(source, ["-x", "c++"] + self.compile_flags) + for diag in self.tu.diagnostics: + # + # We expect to be run over hundreds of files. Any parsing issues are likely to be very repetitive. + # So, to avoid bothering the user, we suppress duplicates. + # + loc = diag.location + msg = "{}:{}[{}] {}".format(loc.file, loc.line, loc.column, diag.spelling) + if (diag.spelling == "#pragma once in main file"): + continue + if msg in self.diagnostics: + continue + self.diagnostics.add(msg) + logger.log(clang_diagnostic_to_logging_diagnostic(diag.severity), + "Parse {}: {}".format(diagnostic_word(diag.severity), msg)) + if self.dump_includes: + for include in sorted(set(self.tu.get_includes())): + logger.debug(_("Used includes {}").format(include.include.name)) + # + # Run through the top level children in the translation unit. + # + body = self._container_get(self.tu.cursor, -1, h_file, include_filename) + return body, self.tu.get_includes + + def skippable_attribute(self, parent, member, text, sip): + """ + We don't seem to have access to the __attribute__(())s, but at least we can look for stuff we care about. + + :param member: The attribute. + :param text: The raw source corresponding to the region of member. + """ + if member.kind != CursorKind.VISIBILITY_ATTR: + return False + if member.spelling == "hidden": + if self.dump_privates: + logger.debug("Ignoring private {}".format(SipGenerator.describe(parent))) + sip["name"] = "" + return True + return False + + def _container_get(self, container, level, h_file, include_filename): + """ + Generate the (recursive) translation for a class or namespace. + + :param container: A class or namespace. + :param h_file: Name of header file being processed. + :param level: Recursion level controls indentation. + :return: A string. + """ + + if container.kind.is_translation_unit(): + # + # Any module-related manual code (%ExportedHeaderCode, %ModuleCode, %ModuleHeaderCode or other + # module-level directives? + # + sip = { + "name": include_filename, + "decl": "" + } + self.rules.modulecode(include_filename, sip) + body = sip["code"] + else: + body = "" + + sip = { + "name": container.displayname, + "annotations": set() + } + name = container.displayname + if container.access_specifier == AccessSpecifier.PRIVATE: + if self.dump_privates: + logger.debug("Ignoring private {}".format(SipGenerator.describe(container))) + return "" + base_specifiers = [] + template_type_parameters = [] + had_copy_constructor = False + had_const_member = False + for member in container.get_children(): + # + # Only emit items in the translation unit. + # + if member.location.file.name != self.tu.spelling: + continue + decl = "" + if member.kind in [CursorKind.CXX_METHOD, CursorKind.FUNCTION_DECL, CursorKind.FUNCTION_TEMPLATE, + CursorKind.CONSTRUCTOR, CursorKind.DESTRUCTOR, CursorKind.CONVERSION_FUNCTION]: + decl = self._fn_get(container, member, level + 1) + elif member.kind == CursorKind.ENUM_DECL: + decl = self._enum_get(container, member, level + 1) + ";\n" + elif member.kind == CursorKind.CXX_ACCESS_SPEC_DECL: + decl = self._get_access_specifier(member, level + 1) + elif member.kind == CursorKind.TYPEDEF_DECL: + decl = self._typedef_get(container, member, level + 1) + elif member.kind == CursorKind.CXX_BASE_SPECIFIER: + # + # Strip off the leading "class". Except for TypeKind.UNEXPOSED... + # + base_specifiers.append(member.displayname.split(None, 2)[-1]) + elif member.kind == CursorKind.TEMPLATE_TYPE_PARAMETER: + template_type_parameters.append(member.displayname) + elif member.kind == CursorKind.TEMPLATE_NON_TYPE_PARAMETER: + template_type_parameters.append(member.type.spelling + " " + member.displayname) + elif member.kind in [CursorKind.VAR_DECL, CursorKind.FIELD_DECL]: + had_const_member = had_const_member or member.type.is_const_qualified() + decl = self._var_get(container, member, level + 1) + elif member.kind in [CursorKind.NAMESPACE, CursorKind.CLASS_DECL, + CursorKind.CLASS_TEMPLATE, CursorKind.CLASS_TEMPLATE_PARTIAL_SPECIALIZATION, + CursorKind.STRUCT_DECL, CursorKind.UNION_DECL]: + decl = self._container_get(member, level + 1, h_file, include_filename) + elif member.kind in TEMPLATE_KINDS + [CursorKind.USING_DECLARATION, CursorKind.USING_DIRECTIVE, + CursorKind.CXX_FINAL_ATTR]: + # + # Ignore: + # + # TEMPLATE_KINDS: Template type parameter. + # CursorKind.USING_DECLARATION, CursorKind.USING_DIRECTIVE: Using? Pah! + # CursorKind.CXX_FINAL_ATTR: Again, not much to be done with this. + # + pass + else: + text = self._read_source(member.extent) + if self.skippable_attribute(container, member, text, sip): + if not sip["name"]: + return "" + else: + SipGenerator._report_ignoring(container, member) + + def is_copy_constructor(member): + if member.kind != CursorKind.CONSTRUCTOR: + return False + numParams = 0 + hasSelfType = False + for child in member.get_children(): + numParams += 1 + if child.kind == CursorKind.PARM_DECL: + paramType = child.type.spelling + paramType = paramType.split("::")[-1] + paramType = paramType.replace("const", "").replace("&", "").strip() + hasSelfType = paramType == container.displayname + return numParams == 1 and hasSelfType + + def has_parameter_default(parameter): + for member in parameter.get_children(): + if member.kind.is_expression(): + return True + return False + + def is_default_constructor(member): + if member.kind != CursorKind.CONSTRUCTOR: + return False + numParams = 0 + for parameter in member.get_children(): + if (has_parameter_default(parameter)): + break + numParams += 1 + return numParams == 0 + + had_copy_constructor = had_copy_constructor or is_copy_constructor(member) + # + # Discard almost anything which is private. + # + if member.access_specifier == AccessSpecifier.PRIVATE: + if member.kind == CursorKind.CXX_ACCESS_SPEC_DECL: + # + # We need these because... + # + pass + elif is_copy_constructor(member) or is_default_constructor(member): + # + # ...we need to pass private copy contructors to the SIP compiler. + # + pass + else: + if self.dump_privates: + logger.debug("Ignoring private {}".format(SipGenerator.describe(member))) + continue + + if decl: + if self.verbose: + pad = " " * ((level + 1) * 4) + body += pad + "// {}\n".format(SipGenerator.describe(member)) + body += decl + + + if container.kind == CursorKind.TRANSLATION_UNIT: + return body + + if container.kind == CursorKind.NAMESPACE: + container_type = "namespace " + name + elif container.kind in [CursorKind.CLASS_DECL, CursorKind.CLASS_TEMPLATE, + CursorKind.CLASS_TEMPLATE_PARTIAL_SPECIALIZATION]: + container_type = "class " + name + elif container.kind == CursorKind.STRUCT_DECL: + container_type = "struct " + name + elif container.kind == CursorKind.UNION_DECL: + container_type = "union " + name + else: + raise AssertionError( + _("Unexpected container {}: {}[{}]").format(container.kind, name, container.extent.start.line)) + + sip["decl"] = container_type + sip["template_parameters"] = template_type_parameters + + pad = " " * (level * 4) + + # + # Empty containers are still useful if they provide namespaces or forward declarations. + # + if not body: + text = self._read_source(container.extent) + if not text.endswith("}"): + # + # Forward declaration. + # + modifying_rule = self.rules.forward_declaration_rules().apply(container, sip) + if sip["name"]: + if modifying_rule: + body += "// Modified {} (by {}):\n".format(SipGenerator.describe(container), modifying_rule) + if "External" in sip["annotations"]: + body += pad + sip["decl"] + body += " /External/;\n" + else: + body = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(container), "default forward declaration handling") + + else: + body = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(container), modifying_rule) + else: + # + # Generate private copy constructor for non-copyable types. + # + if had_const_member and not had_copy_constructor: + body += " private:\n {}(const {} &); // Generated\n".format(name, container.type.get_canonical().spelling) + # + # Flesh out the SIP context for the rules engine. + # + sip["base_specifiers"] = base_specifiers + sip["body"] = body + modifying_rule = self.rules.container_rules().apply(container, sip) + if sip["name"]: + decl = "" + if modifying_rule: + decl += "// Modified {} (by {}):\n".format(SipGenerator.describe(container), modifying_rule) + decl += pad + sip["decl"] + + if sip["base_specifiers"]: + decl += ": " + ", ".join(sip["base_specifiers"]) + if sip["annotations"]: + decl += " /" + ",".join(sip["annotations"]) + "/" + if sip["template_parameters"]: + decl = pad + "template <" + ", ".join(sip["template_parameters"]) + ">\n" + decl + decl += "\n" + pad + "{\n" + decl += "%TypeHeaderCode\n#include <{}>\n%End\n".format(include_filename) + body = decl + sip["body"] + pad + "};\n" + else: + body = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(container), modifying_rule) + return body + + def _get_access_specifier(self, member, level): + """ + Skip access specifiers embedded in the Q_OBJECT macro. + """ + access_specifier_text = self._read_source(member.extent) + if access_specifier_text == "Q_OBJECT": + return "" + pad = " " * ((level - 1) * 4) + access_specifier = "" + if (access_specifier_text in ("Q_SIGNALS:", "signals:", + "public Q_SLOTS:", "public slots:", + "protected Q_SLOTS:", "protected slots:")): + access_specifier = access_specifier_text + elif member.access_specifier == AccessSpecifier.PRIVATE: + access_specifier = "private:" + elif member.access_specifier == AccessSpecifier.PROTECTED: + access_specifier = "protected:" + elif member.access_specifier == AccessSpecifier.PUBLIC: + access_specifier = "public:" + + decl = pad + access_specifier + "\n" + return decl + + def _enum_get(self, container, enum, level): + pad = " " * (level * 4) + decl = pad + "enum {} {{\n".format(enum.displayname) + enumerations = [] + for enum in enum.get_children(): + # + # Skip visibility attributes and the like. + # + if enum.kind == CursorKind.ENUM_CONSTANT_DECL: + enumerations.append(pad + " {}".format(enum.displayname)) + decl += ",\n".join(enumerations) + "\n" + decl += pad + "}" + return decl + + def _fn_get(self, container, function, level): + """ + Generate the translation for a function. + + :param container: A class or namespace. + :param function: The function object. + :param level: Recursion level controls indentation. + :return: A string. + """ + if container.kind == CursorKind.TRANSLATION_UNIT and \ + (function.semantic_parent.kind == CursorKind.CLASS_DECL or + function.semantic_parent.kind == CursorKind.STRUCT_DECL) and \ + function.is_definition(): + # Skip inline methods + return + + sip = { + "name": function.spelling, + } + parameters = [] + parameter_modifying_rules = [] + template_parameters = [] + for child in function.get_children(): + if child.kind == CursorKind.PARM_DECL: + parameter = child.displayname or "__{}".format(len(parameters)) + theType = child.type.get_canonical() + typeSpelling = theType.spelling + if theType.kind == TypeKind.POINTER: + typeSpelling = theType.get_pointee().spelling + "* " + + decl = "{} {}".format(typeSpelling, parameter) + child_sip = { + "name": parameter, + "decl": decl, + "init": self._fn_get_parameter_default(function, child), + "annotations": set() + } + modifying_rule = self.rules.parameter_rules().apply(container, function, child, child_sip) + if modifying_rule: + parameter_modifying_rules.append("// Modified {} (by {}):\n".format(SipGenerator.describe(child), modifying_rule)) + decl = child_sip["decl"] + if child_sip["annotations"]: + decl += " /" + ",".join(child_sip["annotations"]) + "/" + if child_sip["init"]: + decl += " = " + child_sip["init"] + parameters.append(decl) + elif child.kind in [CursorKind.COMPOUND_STMT, CursorKind.CXX_OVERRIDE_ATTR, + CursorKind.MEMBER_REF, CursorKind.DECL_REF_EXPR, CursorKind.CALL_EXPR] + TEMPLATE_KINDS: + # + # Ignore: + # + # CursorKind.COMPOUND_STMT: Function body. + # CursorKind.CXX_OVERRIDE_ATTR: The "override" keyword. + # CursorKind.MEMBER_REF, CursorKind.DECL_REF_EXPR, CursorKind.CALL_EXPR: Constructor initialisers. + # TEMPLATE_KINDS: The result type. + # + pass + elif child.kind == CursorKind.TEMPLATE_TYPE_PARAMETER: + template_parameters.append(child.displayname) + elif child.kind == CursorKind.TEMPLATE_NON_TYPE_PARAMETER: + template_parameters.append(child.type.spelling + " " + child.displayname) + else: + text = self._read_source(child.extent) + if self.skippable_attribute(function, child, text, sip): + if not sip["name"]: + return "" + else: + SipGenerator._report_ignoring(function, child) + # + # Flesh out the SIP context for the rules engine. + # + sip["template_parameters"] = template_parameters + if function.kind in [CursorKind.CONSTRUCTOR, CursorKind.DESTRUCTOR]: + sip["fn_result"] = "" + else: + sip["fn_result"] = function.result_type.spelling + sip["parameters"] = parameters + sip["prefix"], sip["suffix"] = self._fn_get_decorators(function) + modifying_rule = self.rules.function_rules().apply(container, function, sip) + pad = " " * (level * 4) + if sip["name"]: + # + # Any method-related code (%MethodCode, %VirtualCatcherCode, VirtualCallCode + # or other method-related directives)? + # + self.rules.methodcode(function, sip) + decl = "" + if modifying_rule: + decl += "// Modified {} (by {}):\n".format(SipGenerator.describe(function), modifying_rule) + pad + decl += pad.join(parameter_modifying_rules) + if parameter_modifying_rules: + decl += pad + + decl += sip["name"] + "(" + ", ".join(sip["parameters"]) + ")" + if sip["fn_result"]: + decl = sip["fn_result"] + " " + decl + decl = pad + sip["prefix"] + decl + sip["suffix"] + if sip["template_parameters"]: + decl = pad + "template <" + ", ".join(sip["template_parameters"]) + ">\n" + decl + decl += ";\n" + decl += sip["code"] + else: + decl = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(function), modifying_rule) + return decl + + def _fn_get_decorators(self, function): + """ + The parser does not provide direct access to the complete keywords (explicit, const, static, etc) of a function + in the displayname. It would be nice to get these from the AST, but I cannot find where they are hiding. + + Now, we could resort to using the original source. That does not bode well if you have macros (QOBJECT, + xxxDEPRECATED?), inlined bodies and the like, using the rule engine could be used to patch corner cases... + + ...or we can try to guess what SIP cares about, i.e static and maybe const. Luckily (?), we have those to hand! + + :param function: The function object. + :return: prefix, suffix String containing any prefix or suffix keywords. + """ + suffix = "" + if function.is_const_method(): + suffix += " const" + prefix = "" + if function.is_static_method(): + prefix += "static " + if function.is_virtual_method(): + prefix += "virtual " + if function.is_pure_virtual_method(): + suffix += " = 0" + return prefix, suffix + + def _fn_get_parameter_default(self, function, parameter): + """ + The parser does not seem to provide access to the complete text of a parameter. + This makes it hard to find any default values, so we: + + 1. Run the lexer from "here" to the end of the file, bailing out when we see the "," + or a ")" marking the end. + 2. Watch for the assignment. + """ + def _get_param_type(parameter): + result = parameter.type.get_declaration().type + + if result.kind != TypeKind.ENUM and result.kind != TypeKind.TYPEDEF and parameter.type.kind == TypeKind.LVALUEREFERENCE: + if parameter.type.get_pointee().get_declaration().type.kind != TypeKind.INVALID: + return parameter.type.get_pointee().get_declaration().type + return parameter.type.get_pointee() + + if parameter.type.get_declaration().type.kind == TypeKind.INVALID: + return parameter.type + + if (parameter.type.get_declaration().type.kind == TypeKind.TYPEDEF): + isQFlags = False + for member in parameter.type.get_declaration().get_children(): + if member.kind == CursorKind.TEMPLATE_REF and member.spelling == "QFlags": + isQFlags = True + if isQFlags and member.kind == CursorKind.TYPE_REF: + result = member.type + break + + return result + + def _get_param_value(text, parameterType): + if text == "0" or text == "nullptr": + return text + if text == "{}": + if parameterType.kind == TypeKind.ENUM: + return "0" + if parameterType.kind == TypeKind.POINTER: + return "nullptr" + if parameterType.spelling.startswith("const "): + return parameterType.spelling[6:] + "()" + return parameterType.spelling + "()" + if not "::" in parameterType.spelling: + return text + try: + typeText, typeInit = text.split("(") + typeInit = "(" + typeInit + except: + typeText = text + typeInit = "" + + prefix = parameterType.spelling.rsplit("::", 1)[0] + if "::" in typeText: + typeText = typeText.rsplit("::", 1)[1] + return prefix + "::" + typeText + typeInit + + + for member in parameter.get_children(): + if member.kind.is_expression(): + + possible_extent = SourceRange.from_locations(parameter.extent.start, function.extent.end) + text = "" + bracket_level = 0 + found_start = False + found_end = False + for token in self.tu.get_tokens(extent=possible_extent): + if (token.spelling == "="): + found_start = True + continue + if token.spelling == "," and bracket_level == 0: + found_end = True + break + elif token.spelling == "(": + bracket_level += 1 + text += token.spelling + elif token.spelling == ")": + if bracket_level == 0: + found_end = True + break + bracket_level -= 1 + text += token.spelling + if bracket_level == 0: + found_end = True + break + elif found_start: + text += token.spelling + if not found_end and text: + RuntimeError(_("No end found for {}::{}, '{}'").format(function.spelling, parameter.spelling, text)) + + parameterType = _get_param_type(parameter) + + return _get_param_value(text, parameterType) + return "" + + def _typedef_get(self, container, typedef, level): + """ + Generate the translation for a typedef. + + :param container: A class or namespace. + :param typedef: The typedef object. + :param level: Recursion level controls indentation. + :return: A string. + """ + + sip = { + "name": typedef.displayname, + "decl": typedef.underlying_typedef_type.spelling, + "annotations": set(), + } + + self.rules.typedef_rules().apply(container, typedef, sip) + + pad = " " * (level * 4) + if sip["name"]: + decl = pad + "typedef {} {}".format(sip["decl"], sip["name"]) + decl += ";\n" + else: + decl = pad + "// Discarded {}\n".format(SipGenerator.describe(typedef)) + return decl + + def _var_get(self, container, variable, level): + """ + Generate the translation for a variable. + + :param container: A class or namespace. + :param variable: The variable object. + :param level: Recursion level controls indentation. + :return: A string. + """ + + sip = { + "name": variable.spelling + } + for child in variable.get_children(): + if child.kind in TEMPLATE_KINDS + [CursorKind.STRUCT_DECL, CursorKind.UNION_DECL]: + # + # Ignore: + # + # TEMPLATE_KINDS, CursorKind.STRUCT_DECL, CursorKind.UNION_DECL: : The variable type. + # + pass + else: + text = self._read_source(child.extent) + if self.skippable_attribute(variable, child, text, sip): + if not sip["name"]: + return "" + else: + SipGenerator._report_ignoring(variable, child) + # + # Flesh out the SIP context for the rules engine. + # + decl = "{} {}".format(variable.type.spelling, variable.spelling) + sip["decl"] = decl + modifying_rule = self.rules.variable_rules().apply(container, variable, sip) + + pad = " " * (level * 4) + if sip["name"]: + decl = sip["decl"] + # + # SIP does not support protected variables, so we ignore them. + # + if variable.access_specifier == AccessSpecifier.PROTECTED: + decl = pad + "// Discarded {}\n".format(SipGenerator.describe(variable)) + else: + decl = pad + decl + ";\n" + else: + decl = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(variable), modifying_rule) + return decl + + def _read_source(self, extent): + """ + Read the given range from the unpre-processed source. + + :param extent: The range of text required. + """ + extract = self.unpreprocessed_source[extent.start.line - 1:extent.end.line] + if extent.start.line == extent.end.line: + extract[0] = extract[0][extent.start.column - 1:extent.end.column - 1] + else: + extract[0] = extract[0][extent.start.column - 1:] + extract[-1] = extract[-1][:extent.end.column - 1] + # + # Return a single line of text. + # + return "".join(extract).replace("\n", " ") + + @staticmethod + def _report_ignoring(parent, child, text=None): + if not text: + text = child.displayname or child.spelling + logger.debug(_("Ignoring {} {} child {}").format(parent.kind.name, parent.spelling, SipGenerator.describe(child, text))) + + +def main(argv=None): + """ + Take a single C++ header file and generate the corresponding SIP file. + Beyond simple generation of the SIP file from the corresponding C++ + header file, a set of rules can be used to customise the generated + SIP file. + + Examples: + + sip_generator.py /usr/include/KF5/KItemModels/kselectionproxymodel.h + """ + if argv is None: + argv = sys.argv + parser = argparse.ArgumentParser(epilog=inspect.getdoc(main), + formatter_class=HelpFormatter) + parser.add_argument("-v", "--verbose", action="store_true", default=False, help=_("Enable verbose output")) + parser.add_argument("--flags", + help=_("Semicolon-separated C++ compile flags to use")) + parser.add_argument("--include_filename", help=_("C++ header include to compile")) + parser.add_argument("libclang", help=_("libclang library to use for parsing")) + parser.add_argument("project_rules", help=_("Project rules")) + parser.add_argument("source", help=_("C++ header to process")) + parser.add_argument("output", help=_("output filename to write")) + try: + args = parser.parse_args(argv[1:]) + if args.verbose: + logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)s %(levelname)s: %(message)s') + else: + logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s') + # + # Generate! + # + + cindex.Config.set_library_file(args.libclang) + + rules = rules_engine.rules(args.project_rules) + g = SipGenerator(rules, args.flags.lstrip().split(";"), args.verbose) + body, includes = g.create_sip(args.source, args.include_filename) + with open(args.output, "w") as outputFile: + outputFile.write(body) + except Exception as e: + tbk = traceback.format_exc() + print(tbk) + return -1 + + +if __name__ == "__main__": + if sys.argv[1] != "--self-check": + sys.exit(main()) + else: + cindex.Config.set_library_file(sys.argv[2]) diff -Nru extra-cmake-modules-5.18.0/.gitignore extra-cmake-modules-5.44.0/.gitignore --- extra-cmake-modules-5.18.0/.gitignore 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -/build diff -Nru extra-cmake-modules-5.18.0/Jenkinsfile_master_kf5-qt5_linux_gcc extra-cmake-modules-5.44.0/Jenkinsfile_master_kf5-qt5_linux_gcc --- extra-cmake-modules-5.18.0/Jenkinsfile_master_kf5-qt5_linux_gcc 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/Jenkinsfile_master_kf5-qt5_linux_gcc 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,134 @@ +#!groovy + +/* +The MIT License +Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +node(linux) { + // We want Timestamps on everything + timestamps { + // First Thing: Checkout Sources + stage('Checkout Sources') { + // Actual Application Sources + checkout changelog: true, poll: true, scm: [ + $class: 'GitSCM', + branches: [[name: ${branch}]], + browser: [$class: 'CGit', repoUrl: 'https://cgit.kde.org/extra-cmake-modules.git'], + extensions: [[$class: 'CloneOption', timeout: 120]], + userRemoteConfigs: [[url: 'https://anongit.kde.org/extra-cmake-modules.git']] + ] + + // Our CI scripts + checkout changelog: false, poll: false, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/ci-tools-experimental.git']] + ] + + // Dependency Metadata + checkout changelog: false, poll: false, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/dependencies/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-build-metadata']] + ] + + // KApiDox: For api.kde.org metadata extraction + checkout changelog: false, poll: false, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kapidox/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/kapidox']] + ] + + // kde-dev-scripts: For packager metadata extraction + checkout changelog: false, poll: false, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kde-dev-scripts/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-dev-scripts']] + ] + } + // Now Prepare to Build: Get the dependencies ready + stage('Setup Dependencies') { + // Now we can determine what our dependencies are + // Then update to the latest version of the dependencies available from the master server + // Finally extract all of those dependencies in turn into the given 'installTo' directory + sh 'python helpers/prepare-dependencies.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --installTo + "$WORKSPACE/install-prefix/" + } + // Now we can configure our build + stage('Configuring Build') { + // This is delegated through a helper script to handle minor special cases like inSourceBuilds, non-CMake build systems, etc + sh 'python helpers/configure-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux '--installTo + "$WORKSPACE/install-prefix/" + } + // Finally we can build it! (Once again, through a helper) + stage('Compiling') { + // We use a helper here so we can determine the appropriate number of CPUs (-j) to build with + sh 'python helpers/compile-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux + } + // Now ensure that it installs.... + stage('Installing') { + // The helper ensures that DESTDIR and INSTALL_ROOT are set to 'divertTo' + // This allows us to capture the install at the next stage for later reuse in the Setup Dependencies step + sh 'python helpers/install-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --divertTo + "$WORKSPACE/install-divert/" + } + // Looks like it built okay - let's capture this for later use + // We'll also take the opportunity to extract metadata from CMake used by packagers and api.kde.org + stage('Capturing Installation') { + // First we create a tar archive of the installation which was diverted + // Then we upload a copy of that to the master server and have it publish the new archive + // Finally to save bandwidth our copy of the tar archive is moved to our local cache for reuse on later builds on this node + sh 'python helpers/capture-install.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --divertedTo "$WORKSPACE/install-divert/" --installTo "$WORKSPACE/install-prefix/" + // Now we extract the CMake metadata and upload that to the appropriate hosts + sh 'python helpers/extract-cmake-metadata.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux + } + // Now we can run our tests + stage('Running Tests') { + // Run the unit tests for this project + // Tests are run in a basic environment (X, DBus) + sh 'python helpers/run-tests.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux + // Collect our results + junit allowEmptyResults: true, testResults: 'build/JUnitTestResults.xml' + } + // Final thing to do: some code quality checks + stage('Checking Code Quality') { + + // cppcheck is not supported by Pipeline at the moment, so we don't run that for now + // See https://issues.jenkins-ci.org/browse/JENKINS-35096 + + // Cobertura doesn't support Pipeline either, so no code coverage publishing... + // See https://issues.jenkins-ci.org/browse/JENKINS-30700 + + // Scan the logs and publish a warnings report + step( [$class: 'WarningsPublisher', consoleParsers: [[parserName: 'GNU Make + GNU C Compiler (gcc)'], [parserName: 'Appstreamercli']], excludePattern: '/tmp/**'] ) + } + // Send an email notification of this + emailext( + to: 'ci-builds@kde.org', + body: '${JELLY_SCRIPT,template="text"}', + subject: 'KDE CI: ${PROJECT_NAME} - Build # ${BUILD_NUMBER} - ${BUILD_STATUS}!', + attachLog: true + ) +// IRC Notifications are currently not supported by Pipeline +// See https://issues.jenkins-ci.org/browse/JENKINS-33922 +// We can probably workaround this using Pursuivant and the emails Jenkins sends out +// This would allow subscribing to build notifications for IRC channels in much the same way one subscribes for Commits and Bugzilla changes +} +} diff -Nru extra-cmake-modules-5.18.0/kde-modules/appstreamtest.cmake extra-cmake-modules-5.44.0/kde-modules/appstreamtest.cmake --- extra-cmake-modules-5.18.0/kde-modules/appstreamtest.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.44.0/kde-modules/appstreamtest.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -0,0 +1,33 @@ +file(GLOB install_done "${INSTALL_FILES}") +if (install_done) + file(READ "${INSTALL_FILES}" out) + string(REPLACE "\n" ";" out "${out}") +else() + message("Not installed yet, skipping") + set(out "") +endif() + +set(metadatafiles) +foreach(file IN LISTS out) + if(NOT (file MATCHES ".+\\.appdata.xml" OR file MATCHES ".+\\.metainfo.xml")) + continue() + endif() + + list(APPEND metadatafiles ${file}) +endforeach() + +if(metadatafiles) + set(appstreamcliout "") + execute_process(COMMAND ${APPSTREAMCLI} validate ${metadatafiles} + ERROR_VARIABLE appstreamcliout + OUTPUT_VARIABLE appstreamcliout + RESULT_VARIABLE result + ) + + if(result EQUAL 0) + set(msgType STATUS) + else() + set(msgType FATAL_ERROR) + endif() + message(${msgType} ${appstreamcliout}) +endif() diff -Nru extra-cmake-modules-5.18.0/kde-modules/KDECMakeSettings.cmake extra-cmake-modules-5.44.0/kde-modules/KDECMakeSettings.cmake --- extra-cmake-modules-5.18.0/kde-modules/KDECMakeSettings.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/kde-modules/KDECMakeSettings.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -15,10 +15,11 @@ # # The default runtime path (used on Unix systems to search for # dynamically-linked libraries) is set to include the location that libraries -# will be installed to (as set in LIB_INSTALL_DIR), and also the linker search -# path. +# will be installed to (as set in LIB_INSTALL_DIR or, if the former is not set, +# KDE_INSTALL_LIBDIR), and also the linker search path. # -# Note that ``LIB_INSTALL_DIR`` needs to be set before including this module. +# Note that ``LIB_INSTALL_DIR`` or alternatively ``KDE_INSTALL_LIBDIR`` needs +# to be set before including this module. # Typically, this is done by including the :kde-module:`KDEInstallDirs` module. # # This section can be disabled by setting ``KDE_SKIP_RPATH_SETTINGS`` to TRUE @@ -40,7 +41,14 @@ # ~~~~~~~~~~~~~~ # # Various CMake build defaults are altered, such as searching source and build -# directories for includes first and enabling automoc by default. +# directories for includes first, enabling automoc by default. +# +# When find_package(ECM 5.38) or higher is called, this also selects +# a layout for the build dir that helps running executables without installing: +# all executables are built into a toplevel "bin" dir, making it possible to find +# helper binaries, and to find uninstalled plugins (provided that you use +# kcoreaddons_add_plugin or set LIBRARY_OUTPUT_DIRECTORY as documented on +# https://community.kde.org/Guidelines_and_HOWTOs/Making_apps_run_uninstalled). # # This section can be disabled by setting ``KDE_SKIP_BUILD_SETTINGS`` to TRUE # before including this module. @@ -63,13 +71,26 @@ # warnings on Qt-related code. # # If clang is not being used, this won't have an effect. -# See https://quickgit.kde.org/?p=clazy.git&a=blob&f=README&o=plain +# See https://commits.kde.org/clazy?path=README.md # # Since 5.17.0 # # - Uninstall target functionality since 1.7.0. # - ``APPLE_FORCE_X11`` option since 5.14.0 (detecting X11 was previously the default behavior) # - ``APPLE_SUPPRESS_X11_WARNING`` option since 5.14.0 +# +# Translations +# ~~~~~~~~~~~~ +# A fetch-translations target will be set up that will download translations +# for projects using l10n.kde.org. +# +# ``KDE_L10N_BRANCH`` will be responsible for choosing which l10n branch to use +# for the translations. +# +# ``KDE_L10N_AUTO_TRANSLATIONS`` (OFF by default) will indicate whether translations +# should be downloaded when building the project. +# +# Since 5.34.0 #============================================================================= # Copyright 2014 Alex Merry @@ -79,16 +100,28 @@ # Copyright 2006-2007 Laurent Montel # Copyright 2006-2013 Alex Neundorf # -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file COPYING-CMAKE-SCRIPTS for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of extra-cmake-modules, substitute the full -# License text for the above reference.) - +# 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. ################# RPATH handling ################################## @@ -97,11 +130,17 @@ # Set the default RPATH to point to useful locations, namely where the # libraries will be installed and the linker search path + # First look for the old LIB_INSTALL_DIR, then fallback to newer KDE_INSTALL_LIBDIR if(NOT LIB_INSTALL_DIR) - message(FATAL_ERROR "LIB_INSTALL_DIR not set. This is necessary for using the RPATH settings.") + if(NOT KDE_INSTALL_LIBDIR) + message(FATAL_ERROR "Neither KDE_INSTALL_LIBDIR nor LIB_INSTALL_DIR is set. Setting one is necessary for using the RPATH settings.") + else() + set(_abs_LIB_INSTALL_DIR "${KDE_INSTALL_LIBDIR}") + endif() + else() + set(_abs_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}") endif() - set(_abs_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}") if (NOT IS_ABSOLUTE "${_abs_LIB_INSTALL_DIR}") set(_abs_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}") endif() @@ -130,6 +169,15 @@ ################ Testing setup #################################### +find_program(APPSTREAMCLI appstreamcli) +function(appstreamtest) + if(APPSTREAMCLI AND NOT appstreamtest_added) + set(appstreamtest_added TRUE PARENT_SCOPE) + add_test(NAME appstreamtest COMMAND ${CMAKE_COMMAND} -DAPPSTREAMCLI=${APPSTREAMCLI} -DINSTALL_FILES=${CMAKE_BINARY_DIR}/install_manifest.txt -P ${CMAKE_CURRENT_LIST_DIR}/appstreamtest.cmake) + else() + message(STATUS "Could not set up the appstream test. appstreamcli is missing.") + endif() +endfunction() if(NOT KDE_SKIP_TEST_SETTINGS) @@ -143,6 +191,7 @@ option(BUILD_TESTING "Build the testing tree." ON) if(BUILD_TESTING) enable_testing() + appstreamtest() endif () endif () @@ -202,28 +251,31 @@ # one common directory, and all static|import libraries and plugins # into another one. This way test executables can find their dlls # even without installation. - if(WIN32) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") - endif() - # Disable detection of X11 and related package on OS X because when using - # brew or macports, X11 can be installed and thus is detected. - option(APPLE_FORCE_X11 "Force enable X11 related detection on OS X" OFF) - option(APPLE_SUPPRESS_X11_WARNING "Suppress X11 and related technologies search disabling warning on OS X" OFF) - - if(APPLE AND NOT APPLE_FORCE_X11) - if (NOT APPLE_SUPPRESS_X11_WARNING) - message(WARNING "Searching for X11 and related technologies is disabled on Apple systems. Set APPLE_FORCE_X11 to ON to change this behaviour. Set APPLE_SUPPRESS_X11_WARNING to ON to hide this warning.") - endif() - - set(CMAKE_DISABLE_FIND_PACKAGE_X11 true) - set(CMAKE_DISABLE_FIND_PACKAGE_XCB true) - set(CMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras true) + # We do the same under Unix to make it possible to run tests and apps without installing + if (WIN32 OR NOT ("${ECM_GLOBAL_FIND_VERSION}" VERSION_LESS "5.38.0")) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") endif() - option(KDE_SKIP_UNINSTALL_TARGET "Prevent an \"uninstall\" target from being generated." OFF) + if (APPLE) + # Disable detection of X11 and related package on OS X because when using + # brew or macports, X11 can be installed and thus is detected. + option(APPLE_FORCE_X11 "Force enable X11 related detection on OS X" OFF) + option(APPLE_SUPPRESS_X11_WARNING "Suppress X11 and related technologies search disabling warning on OS X" OFF) + + if(NOT APPLE_FORCE_X11) + if (NOT APPLE_SUPPRESS_X11_WARNING) + message(WARNING "Searching for X11 and related technologies is disabled on Apple systems. Set APPLE_FORCE_X11 to ON to change this behaviour. Set APPLE_SUPPRESS_X11_WARNING to ON to hide this warning.") + endif() + set(CMAKE_DISABLE_FIND_PACKAGE_X11 true) + set(CMAKE_DISABLE_FIND_PACKAGE_XCB true) + set(CMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras true) + endif() + endif() + + option(KDE_SKIP_UNINSTALL_TARGET "Prevent an \"uninstall\" target from being generated." OFF) if(NOT KDE_SKIP_UNINSTALL_TARGET) include("${ECM_MODULE_DIR}/ECMUninstallTarget.cmake") endif() @@ -234,8 +286,68 @@ option(ENABLE_CLAZY "Enable Clazy warnings" OFF) if(ENABLE_CLAZY) - set(CMAKE_CXX_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT} -Xclang -load -Xclang ClangLazy.so -Xclang -add-plugin -Xclang clang-lazy") + set(CMAKE_CXX_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT} -Xclang -load -Xclang ClangLazy${CMAKE_SHARED_LIBRARY_SUFFIX} -Xclang -add-plugin -Xclang clang-lazy") endif() endif() ################################################################### +# Download translations + +function(_repository_name reponame dir) + execute_process(COMMAND git config --get remote.origin.url + OUTPUT_VARIABLE giturl + RESULT_VARIABLE exitCode + WORKING_DIRECTORY "${dir}") + + if(exitCode EQUAL 0) + string(REGEX MATCHALL ".+[:\\/]([-A-Za-z\\d]+)(.git)?\\s*" "" ${giturl}) + set(${reponame} ${CMAKE_MATCH_1}) + endif() + + if(NOT ${reponame}) + set(${reponame} ${CMAKE_PROJECT_NAME}) + endif() + set(${reponame} ${${reponame}} PARENT_SCOPE) +endfunction() + +if(NOT EXISTS ${CMAKE_SOURCE_DIR}/po AND NOT TARGET fetch-translations) + option(KDE_L10N_AUTO_TRANSLATIONS "Automatically 'make fetch-translations`" 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) + set(_EXTRA_ARGS "ALL") + else() + set(_EXTRA_ARGS) + endif() + + set(_reponame "") + _repository_name(_reponame "${CMAKE_SOURCE_DIR}") + + add_custom_command( + OUTPUT "${CMAKE_BINARY_DIR}/releaseme" + COMMAND git clone --depth 1 "https://anongit.kde.org/releaseme.git" + COMMENT "Fetching releaseme scripts to download translations..." + ) + + set(_l10n_po_dir "${CMAKE_BINARY_DIR}/po") + set(_l10n_poqm_dir "${CMAKE_BINARY_DIR}/poqm") + + if(CMAKE_VERSION VERSION_GREATER 3.2) + 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} + 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}" + ${extra} + DEPENDS "${CMAKE_BINARY_DIR}/releaseme" + ) +endif() diff -Nru extra-cmake-modules-5.18.0/kde-modules/KDECompilerSettings.cmake extra-cmake-modules-5.44.0/kde-modules/KDECompilerSettings.cmake --- extra-cmake-modules-5.18.0/kde-modules/KDECompilerSettings.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/kde-modules/KDECompilerSettings.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -43,15 +43,28 @@ # Copyright 2006-2007 Laurent Montel # Copyright 2006-2013 Alex Neundorf # -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file COPYING-CMAKE-SCRIPTS for details. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: # -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of extra-cmake-modules, substitute the full -# License text for the above reference.) +# 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. ############################################################ # Toolchain minimal requirements @@ -87,7 +100,7 @@ else() _kde_compiler_min_version("4.5") endif() -elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") _kde_compiler_min_version("3.1") else() message(WARNING "${CMAKE_CXX_COMPILER_ID} is not a supported C++ compiler.") @@ -176,12 +189,12 @@ # Pick sensible versions of the C and C++ standards. # Note that MSVC does not have equivalent flags; the features are either # supported or they are not. -if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") +if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") # We use the C89 standard because that is what is common to all our # compilers (in particular, MSVC 2010 does not support C99) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=iso9899:1990") endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") @@ -193,11 +206,19 @@ # See https://www.ibm.com/developerworks/community/blogs/zTPF/entry/benefits_of_the_fnocommon_compile_option_peter_lemieszewski?lang=en # Note that this only applies to C code; C++ already behaves like this. if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR - CMAKE_C_COMPILER_ID STREQUAL "Clang" OR + CMAKE_C_COMPILER_ID MATCHES "Clang" OR (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common") endif() +# Do not treat the operator name keywords and, bitand, bitor, compl, not, or and xor as synonyms as keywords. +# They're not supported under Visual Studio out of the box thus using them limits the portability of code +if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR + CMAKE_C_COMPILER_ID MATCHES "Clang" OR + (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-operator-names") +endif() + # Default to hidden visibility for symbols set(CMAKE_C_VISIBILITY_PRESET hidden) set(CMAKE_CXX_VISIBILITY_PRESET hidden) @@ -208,7 +229,7 @@ cmake_policy(SET CMP0063 NEW) endif() -if (UNIX AND NOT APPLE) +if (UNIX AND NOT APPLE AND NOT CYGWIN) # Enable adding DT_RUNPATH, which means that LD_LIBRARY_PATH takes precedence # over the built-in rPath set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_SHARED_LINKER_FLAGS}") @@ -242,7 +263,7 @@ # Turn off exceptions by default if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") -elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") @@ -264,7 +285,7 @@ endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(${VAR} "${${VAR}} -fexceptions") - elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(${VAR} "${${VAR}} -fexceptions") endif() string(STRIP "${${VAR}}" ${VAR}) @@ -293,7 +314,7 @@ target_compile_options(${target} ${mode} "$<$:-fexceptions>") endif() target_compile_options(${target} ${mode} - "$<$,$>:-fexceptions>") + "$<$,$,$>:-fexceptions>") endfunction() function(KDE_ENABLE_EXCEPTIONS) @@ -319,7 +340,7 @@ # Better diagnostics (warnings, errors) ############################################################ -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR +if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT APPLE) OR (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)) # Linker warnings should be treated as errors @@ -332,16 +353,36 @@ endif() set(_KDE_GCC_COMMON_WARNING_FLAGS "-Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef") -if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + # -Wgnu-zero-variadic-macro-arguments (part of -pedantic) is triggered by every qCDebug() call and therefore results + # in a lot of noise. This warning is only notifying us that clang is emulating the GCC behaviour + # instead of the exact standard wording so we can safely ignore it + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") +endif() +if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_KDE_GCC_COMMON_WARNING_FLAGS} -Wmissing-format-attribute -Wwrite-strings") # Make some warnings errors set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration") endif() -if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_KDE_GCC_COMMON_WARNING_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual") # Make some warnings errors set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type") endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR + (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)) + # -Wvla: use of variable-length arrays (an extension to C++) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wvla") +endif() +if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) OR + (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)) + include(CheckCXXCompilerFlag) + check_cxx_compiler_flag(-Wdate-time HAVE_DATE_TIME) + if (HAVE_DATE_TIME) + # -Wdate-time: warn if we use __DATE__ or __TIME__ (we want to be able to reproduce the exact same binary) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdate-time") + endif() +endif() # -w1 turns on warnings and errors # FIXME: someone needs to have a closer look at the Intel compiler options @@ -445,6 +486,13 @@ set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--export-all-symbols") endif() +if (CMAKE_GENERATOR STREQUAL "Ninja" AND + ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) OR + (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5))) + # Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support. + # Rationale in https://github.com/ninja-build/ninja/issues/814 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") +endif() + include("${ECM_MODULE_DIR}/ECMEnableSanitizers.cmake") include("${ECM_MODULE_DIR}/ECMCoverageOption.cmake") - diff -Nru extra-cmake-modules-5.18.0/kde-modules/KDEFrameworkCompilerSettings.cmake extra-cmake-modules-5.44.0/kde-modules/KDEFrameworkCompilerSettings.cmake --- extra-cmake-modules-5.18.0/kde-modules/KDEFrameworkCompilerSettings.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/kde-modules/KDEFrameworkCompilerSettings.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -23,15 +23,28 @@ # Copyright 2006-2007 Laurent Montel # Copyright 2006-2013 Alex Neundorf # -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file COPYING-CMAKE-SCRIPTS for details. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: # -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of extra-cmake-modules, substitute the full -# License text for the above reference.) +# 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. include(KDECompilerSettings NO_POLICY_SCOPE) @@ -48,11 +61,12 @@ add_definitions(-DQT_STRICT_ITERATORS) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") -elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # -Wgnu-zero-variadic-macro-arguments is triggered by every qCDebug() call and therefore results - # in a lot of noise. This warning is only notifying us that clang is emulating the GCC behaviour - # instead of the exact standard wording so we can safely ignore it - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-gnu-zero-variadic-macro-arguments") +endif() + +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" ) + endif() endif() diff -Nru extra-cmake-modules-5.18.0/kde-modules/KDEInstallDirs.cmake extra-cmake-modules-5.44.0/kde-modules/KDEInstallDirs.cmake --- extra-cmake-modules-5.18.0/kde-modules/KDEInstallDirs.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/kde-modules/KDEInstallDirs.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -35,13 +35,13 @@ # CMake packages, including config files (``LIBDIR/cmake``) # [``CMAKECONFIG_INSTALL_PREFIX``] # ``QTPLUGINDIR`` -# Qt plugins (``LIBDIR/plugins``) [``QT_PLUGIN_INSTALL_DIR``] +# Qt plugins (``LIBDIR/plugins`` or qmake-qt5's ``QT_INSTALL_PLUGINS``) [``QT_PLUGIN_INSTALL_DIR``] # ``PLUGINDIR`` # Plugins (``QTPLUGINDIR``) [``PLUGIN_INSTALL_DIR``] # ``QTQUICKIMPORTSDIR`` -# QtQuick1 imports (``QTPLUGINDIR/imports``) [``IMPORTS_INSTALL_DIR``] +# QtQuick1 imports (``QTPLUGINDIR/imports`` or qmake-qt5's ``QT_INSTALL_IMPORTS``) [``IMPORTS_INSTALL_DIR``] # ``QMLDIR`` -# QtQuick2 imports (``LIBDIR/qml``) [``QML_INSTALL_DIR``] +# QtQuick2 imports (``LIBDIR/qml`` or qmake-qt5's ``QT_INSTALL_QML``) [``QML_INSTALL_DIR``] # ``INCLUDEDIR`` # C and C++ header files (``include``) [``INCLUDE_INSTALL_DIR``] # ``LOCALSTATEDIR`` @@ -90,7 +90,7 @@ # desktop wallpaper images (``DATAROOTDIR/wallpapers``) # [``WALLPAPER_INSTALL_DIR``] # ``APPDIR`` -# application desktop files (``DATAROOTDIR/applications``) +# application desktop files (``DATAROOTDIR/applications``) Since 1.1.0. # [``XDG_APPS_INSTALL_DIR``] # ``DESKTOPDIR`` # desktop directories (``DATAROOTDIR/desktop-directories``) @@ -99,7 +99,11 @@ # mime description files (``DATAROOTDIR/mime/packages``) # [``XDG_MIME_INSTALL_DIR``] # ``METAINFODIR`` -# AppStream component metadata files (``DATAROOTDIR/appdata``) +# AppStream component metadata files (``DATAROOTDIR/metainfo``) +# ``QTQCHDIR`` +# documentation bundles in QCH format for Qt-extending libraries (``DATAROOTDIR/doc/qch`` or qmake-qt5's ``QT_INSTALL_DOCS``) Since 5.36.0. +# ``QCHDIR`` +# documentation bundles in QCH format (``DATAROOTDIR/doc/qch``) Since 5.36.0. # ``MANDIR`` # man documentation (``DATAROOTDIR/man``) [``MAN_INSTALL_DIR``] # ``INFODIR`` @@ -125,6 +129,16 @@ # ``AUTOSTARTDIR`` # autostart files (``CONFDIR/autostart``) [``AUTOSTART_INSTALL_DIR``] # +# If ``KDE_INSTALL_USE_QT_SYS_PATHS`` is set to TRUE before including this +# module, the default values for some variables are instead queried from +# Qt5's qmake (where mentioned in the parentheses above). +# If not set, it will default to TRUE if Qt5's qmake is found and +# it's ``QT_INSTALL_PREFIX`` is the same as ``CMAKE_INSTALL_PREFIX``, +# otherwise default to FALSE. +# This variable should NOT be set from within CMakeLists.txt files, instead +# is intended to be set manually when configuring a project which uses +# KDEInstallDirs (e.g. by packagers). +# # If ``KDE_INSTALL_DIRS_NO_DEPRECATED`` is set to TRUE before including this # module, the deprecated variables (listed in the square brackets above) are # not defined. @@ -174,8 +188,13 @@ # # Since pre-1.0.0. # -# NB: The variables starting ``KDE_INSTALL_`` are only available since 1.6.0. -# The ``APPDIR`` install variable is available since 1.1.0. +# NB: The variables starting ``KDE_INSTALL_`` are available since 1.6.0, +# unless otherwise noted with the variable. +# +# The ``KDE_INSTALL_PREFIX_SCRIPT`` option will install a ${CMAKE_INSTALL_PREFIX}/prefix.sh +# file that allows to easily incorporate the necessary environment variables +# for the prefix into a process. +# #============================================================================= # Copyright 2014-2015 Alex Merry @@ -185,15 +204,28 @@ # Copyright 2006-2007 Laurent Montel # Copyright 2006-2013 Alex Neundorf # -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file COPYING-CMAKE-SCRIPTS for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of extra-cmake-modules, substitute the full -# License text for the above reference.) +# 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. # Figure out what the default install directory for libraries should be. # This is based on the logic in GNUInstallDirs, but simplified (the @@ -424,11 +456,20 @@ "CMake packages, including config files" CMAKECONFIG_INSTALL_PREFIX) -option (KDE_INSTALL_USE_QT_SYS_PATHS "Install mkspecs files, Plugins and Imports to the Qt 5 install dir") -if(KDE_INSTALL_USE_QT_SYS_PATHS) -# Qt-specific vars - include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake") +include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake") +set(_default_KDE_INSTALL_USE_QT_SYS_PATHS OFF) +if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS) + query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX TRY) + if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") + message(STATUS "Installing in the same prefix as Qt, adopting their path scheme.") + set(_default_KDE_INSTALL_USE_QT_SYS_PATHS ON) + endif() +endif() + +option (KDE_INSTALL_USE_QT_SYS_PATHS "Install mkspecs files, QCH files for Qt-based libs, Plugins and Imports to the Qt 5 install dir" "${_default_KDE_INSTALL_USE_QT_SYS_PATHS}") +if(KDE_INSTALL_USE_QT_SYS_PATHS) + # Qt-specific vars query_qmake(qt_plugins_dir QT_INSTALL_PLUGINS) _define_absolute(QTPLUGINDIR ${qt_plugins_dir} @@ -480,10 +521,15 @@ - -_define_absolute(DATAROOTDIR "share" - "read-only architecture-independent data root" - SHARE_INSTALL_PREFIX) +if (WIN32) + _define_relative(DATAROOTDIR BINDIR "data" + "read-only architecture-independent data root" + SHARE_INSTALL_PREFIX) +else() + _define_absolute(DATAROOTDIR "share" + "read-only architecture-independent data root" + SHARE_INSTALL_PREFIX) +endif() _define_relative(DATADIR DATAROOTDIR "" "read-only architecture-independent data" @@ -493,6 +539,18 @@ set(KF5_DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR_KF5}") endif() +# Qt-specific data vars +if(KDE_INSTALL_USE_QT_SYS_PATHS) + query_qmake(qt_docs_dir QT_INSTALL_DOCS) + + _define_absolute(QTQCHDIR ${qt_docs_dir} + "documentation bundles in QCH format for Qt-extending libraries") +else() + _define_relative(QTQCHDIR DATAROOTDIR "doc/qch" + "documentation bundles in QCH format for Qt-extending libraries") +endif() + + # KDE Framework-specific things _define_relative(DOCBUNDLEDIR DATAROOTDIR "doc/HTML" "documentation bundles generated using kdoctools" @@ -543,8 +601,10 @@ _define_relative(MIMEDIR DATAROOTDIR "mime/packages" "mime description files" XDG_MIME_INSTALL_DIR) -_define_relative(METAINFODIR DATAROOTDIR "appdata" +_define_relative(METAINFODIR DATAROOTDIR "metainfo" "AppStream component metadata") +_define_relative(QCHDIR DATAROOTDIR "doc/qch" + "documentation bundles in QCH format") _define_relative(MANDIR DATAROOTDIR "man" "man documentation" MAN_INSTALL_DIR) @@ -634,3 +694,14 @@ if(NOT "${PROJECT_NAME}" STREQUAL "Project") set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "${PROJECT_NAME}") endif() + + +################################################################### +# Prefix set up + +configure_file(${CMAKE_CURRENT_LIST_DIR}/prefix.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/prefix.sh @ONLY) + +option(KDE_INSTALL_PREFIX_SCRIPT "Installs ${CMAKE_INSTALL_PREFIX}/prefix.sh that sets up the necessary environment variables" OFF) +if(KDE_INSTALL_PREFIX_SCRIPT) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/prefix.sh DESTINATION ${CMAKE_INSTALL_PREFIX} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) +endif() diff -Nru extra-cmake-modules-5.18.0/kde-modules/KDEPackageAppTemplates.cmake extra-cmake-modules-5.44.0/kde-modules/KDEPackageAppTemplates.cmake --- extra-cmake-modules-5.18.0/kde-modules/KDEPackageAppTemplates.cmake 2015-12-29 09:33:34.000000000 +0000 +++ extra-cmake-modules-5.44.0/kde-modules/KDEPackageAppTemplates.cmake 2018-03-03 09:48:12.000000000 +0000 @@ -1,6 +1,6 @@ #.rst: # KDETemplateGenerator -# ------------------- +# -------------------- # # Packages KApptemplate/KDevelop compatible application templates # @@ -11,7 +11,10 @@ # # This module provides the following function: # -# kde_package_app_templates( TEMPLATES template1 [template2] [...] INSTALL_DIR directory) +# :: +# +# kde_package_app_templates(TEMPLATES