From 26fdd52c127bfef51fa62bd30a9674f2b491eab9d181daa53dad59759c9e9ff7 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Wed, 28 Jul 2021 11:18:40 +0000 Subject: [PATCH] Accepting request 908857 from home:wolfi323:branches:KDE:Extra - Add Use-plain-Marble-package-instead-of-KexiMarble.patch to fix build with marble 21.08 OBS-URL: https://build.opensuse.org/request/show/908857 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kexi?expand=0&rev=30 --- ...Marble-package-instead-of-KexiMarble.patch | 199 ++++++++++++++++++ kexi.changes | 6 + kexi.spec | 2 + 3 files changed, 207 insertions(+) create mode 100644 Use-plain-Marble-package-instead-of-KexiMarble.patch diff --git a/Use-plain-Marble-package-instead-of-KexiMarble.patch b/Use-plain-Marble-package-instead-of-KexiMarble.patch new file mode 100644 index 0000000..614666d --- /dev/null +++ b/Use-plain-Marble-package-instead-of-KexiMarble.patch @@ -0,0 +1,199 @@ +From 3280c5ec9940f329dc75b2b8d9a52285b20209f0 Mon Sep 17 00:00:00 2001 +From: Johannes Zarl-Zierl +Date: Wed, 5 May 2021 00:09:49 +0200 +Subject: [PATCH] Use plain Marble package instead of KexiMarble + +Marble has shipped with a MarbleConfig.cmake file since ~2016. Kexi +already depends on KF5 versions that are much newer than that. +--- + CMakeLists.txt | 8 +- + cmake/modules/FindKexiMarble.cmake | 115 ------------------ + src/plugins/forms/widgets/CMakeLists.txt | 2 +- + .../forms/widgets/mapbrowser/CMakeLists.txt | 3 +- + 4 files changed, 5 insertions(+), 123 deletions(-) + delete mode 100644 cmake/modules/FindKexiMarble.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 97c58fa10..548b2708f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -196,17 +196,14 @@ endif() + ## + ## Test for marble + ## +-set(MARBLE_MIN_VERSION "0.19.2") +-find_package(KexiMarble ${MARBLE_MIN_VERSION}) +-set_package_properties(KexiMarble PROPERTIES ++find_package(Marble CONFIG) ++set_package_properties(Marble PROPERTIES + DESCRIPTION "KDE World Globe Widget library" + URL "https://marble.kde.org" + TYPE RECOMMENDED + PURPOSE "Required by Kexi form map widget" + ) +-if(NOT MARBLE_FOUND) +- set(MARBLE_INCLUDE_DIR "") +-else() ++if(Marble_FOUND) + set(HAVE_MARBLE TRUE) + endif() + set_package_properties(GLIB2 PROPERTIES TYPE RECOMMENDED PURPOSE "${_REQUIRED_BY_MDB}") +diff --git a/cmake/modules/FindKexiMarble.cmake b/cmake/modules/FindKexiMarble.cmake +deleted file mode 100644 +index 4ec1c5195..000000000 +--- a/cmake/modules/FindKexiMarble.cmake ++++ /dev/null +@@ -1,115 +0,0 @@ +-# - Try to find the Marble Library +-# Once done this will define +-# +-# MARBLE_FOUND - system has Marble +-# MARBLE_INCLUDE_DIR - the Marble include directory +-# MARBLE_LIBRARIES - Libraries needed to use Marble +-# MARBLE_VERSION - This contains combined MAJOR.MINOR.PATCH version (eg. 0.19.2); +-# Can be missing if version could not be found +-# +-# Versions mapping can be found at: https://marble.kde.org/changelog.php +-# +-# Redistribution and use is allowed according to the terms of the BSD license. +-# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +-# +- +-#============================================================================= +-# Copyright 2006-2009 Kitware, Inc. +-# Copyright 2006 Alexander Neundorf +-# Copyright 2009-2011 Mathieu Malaterre +-# +-# Distributed under the OSI-approved BSD License (the "License"); +-# see accompanying file Copyright.txt 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. +-#============================================================================= +- +-function(from_hex HEX DEC) +- string(TOUPPER "${HEX}" HEX) +- set(_res 0) +- string(LENGTH "${HEX}" _strlen) +- +- while (_strlen GREATER 0) +- math(EXPR _res "${_res} * 16") +- string(SUBSTRING "${HEX}" 0 1 NIBBLE) +- string(SUBSTRING "${HEX}" 1 -1 HEX) +- if (NIBBLE STREQUAL "A") +- math(EXPR _res "${_res} + 10") +- elseif (NIBBLE STREQUAL "B") +- math(EXPR _res "${_res} + 11") +- elseif (NIBBLE STREQUAL "C") +- math(EXPR _res "${_res} + 12") +- elseif (NIBBLE STREQUAL "D") +- math(EXPR _res "${_res} + 13") +- elseif (NIBBLE STREQUAL "E") +- math(EXPR _res "${_res} + 14") +- elseif (NIBBLE STREQUAL "F") +- math(EXPR _res "${_res} + 15") +- else() +- math(EXPR _res "${_res} + ${NIBBLE}") +- endif() +- +- string(LENGTH "${HEX}" _strlen) +- endwhile() +- +- set(${DEC} ${_res} PARENT_SCOPE) +-endfunction() +- +-if ( MARBLE_INCLUDE_DIR AND MARBLE_GLOBAL_HEADER AND MARBLE_LIBRARIES ) +- # in cache already +- set( MARBLE_FIND_QUIETLY TRUE ) +-endif () +- +-find_path( MARBLE_INCLUDE_DIR NAMES marble/MarbleMap.h PATH_SUFFIXES marble) +-find_file( MARBLE_GLOBAL_HEADER NAMES marble/MarbleGlobal.h PATH_SUFFIXES marble) +-find_library( MARBLE_LIBRARIES NAMES marblewidget-qt5 ) +- +-if(MARBLE_GLOBAL_HEADER) +- file(STRINGS ${MARBLE_GLOBAL_HEADER} +- marble_version_line +- REGEX "^#define[\t ]+MARBLE_VERSION[\t ]+0x([0-9a-fA-F])+.*") +- +- string(REGEX REPLACE +- "^.*MARBLE_VERSION[\t ]+0x([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F]).*$" +- "\\1;\\2;\\3" marble_version_list "${marble_version_line}") +- +- list(GET marble_version_list 0 MARBLE_VERSION_MAJOR) +- from_hex("${MARBLE_VERSION_MAJOR}" MARBLE_VERSION_MAJOR) +- +- list(GET marble_version_list 1 MARBLE_VERSION_MINOR) +- from_hex("${MARBLE_VERSION_MINOR}" MARBLE_VERSION_MINOR) +- +- list(GET marble_version_list 2 MARBLE_VERSION_PATCH) +- from_hex("${MARBLE_VERSION_PATCH}" MARBLE_VERSION_PATCH) +- +- set(MARBLE_VERSION "${MARBLE_VERSION_MAJOR}.${MARBLE_VERSION_MINOR}.${MARBLE_VERSION_PATCH}" CACHE STRING "Found Marble version") +-endif() +- +-include( FindPackageHandleStandardArgs ) +- +-if(MARBLE_VERSION) +- if(DEFINED MARBLE_MIN_VERSION AND ${MARBLE_VERSION} VERSION_LESS ${MARBLE_MIN_VERSION}) +- set(MARBLE_FOUND FALSE) +- unset(MARBLE_INCLUDE_DIR) +- unset(MARBLE_LIBRARIES) +- else() +- find_package_handle_standard_args( Marble +- REQUIRED_VARS +- MARBLE_INCLUDE_DIR +- MARBLE_LIBRARIES +- VERSION_VAR +- MARBLE_VERSION +- FAIL_MESSAGE +- "Could not find Marble" +- ) +- endif() +-else() +- find_package_handle_standard_args( marble +- DEFAULT_MSG +- MARBLE_INCLUDE_DIR +- MARBLE_LIBRARIES ) +-endif() +- +-mark_as_advanced(MARBLE_GLOBAL_HEADER MARBLE_VERSION_MAJOR MARBLE_VERSION_MINOR MARBLE_VERSION_PATCH) +diff --git a/src/plugins/forms/widgets/CMakeLists.txt b/src/plugins/forms/widgets/CMakeLists.txt +index 107d578a8..109341fe0 100644 +--- a/src/plugins/forms/widgets/CMakeLists.txt ++++ b/src/plugins/forms/widgets/CMakeLists.txt +@@ -11,7 +11,7 @@ endmacro() + # the main widgets plugin + add_subdirectory(main) + +-if(MARBLE_FOUND) ++if(Marble_FOUND) + #TODO add_subdirectory(mapbrowser) + endif() + +diff --git a/src/plugins/forms/widgets/mapbrowser/CMakeLists.txt b/src/plugins/forms/widgets/mapbrowser/CMakeLists.txt +index 3ff7f4fc8..f5be7fd02 100644 +--- a/src/plugins/forms/widgets/mapbrowser/CMakeLists.txt ++++ b/src/plugins/forms/widgets/mapbrowser/CMakeLists.txt +@@ -1,7 +1,6 @@ + include_directories( + ${CMAKE_SOURCE_DIR}/src/formeditor + ${CMAKE_SOURCE_DIR}/src/core +- ${MARBLE_INCLUDE_DIR} + ) + + set(kexiforms_mapwidgetplugin_SRCS +@@ -20,8 +19,8 @@ target_link_libraries(kexiforms_mapwidgetplugin + kexiextendedwidgets + kexiformutils + kexidataviewcommon +- ${MARBLE_LIBRARIES} + ++ Marble + Qt5::Xml + ) + +-- +GitLab + diff --git a/kexi.changes b/kexi.changes index b49110b..795fd00 100644 --- a/kexi.changes +++ b/kexi.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 28 09:49:43 UTC 2021 - Wolfgang Bauer + +- Add Use-plain-Marble-package-instead-of-KexiMarble.patch to fix + build with marble 21.08 + ------------------------------------------------------------------- Mon Jun 28 11:39:36 UTC 2021 - Wolfgang Bauer diff --git a/kexi.spec b/kexi.spec index c3f34b1..417f5f2 100644 --- a/kexi.spec +++ b/kexi.spec @@ -30,6 +30,8 @@ Source0: https://download.kde.org/stable/%{name}/src/%{name}-%{version}.t Patch0: Fix-build-with-Qt-5_13.patch # PATCH-FIX-UPSTREAM Patch1: 0001-Include-glib.h-outside-of-the-extern-block.patch +# PATCH-FIX-UPSTREAM +Patch2: Use-plain-Marble-package-instead-of-KexiMarble.patch BuildRequires: extra-cmake-modules BuildRequires: glib2-devel BuildRequires: kdb-devel