Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kraft for openSUSE:Factory checked 
in at 2023-05-01 18:51:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kraft (Old)
 and      /work/SRC/openSUSE:Factory/.kraft.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kraft"

Mon May  1 18:51:35 2023 rev:19 rq:1083863 version:1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kraft/kraft.changes      2022-12-30 
12:28:40.159751233 +0100
+++ /work/SRC/openSUSE:Factory/.kraft.new.1533/kraft.changes    2023-05-01 
18:51:35.765502980 +0200
@@ -1,0 +2,15 @@
+Sat Apr 29 08:33:55 UTC 2023 - Klaas Freitag <[email protected]>
+
+- Made the patch of the cmake files a bit more clean 
+
+-------------------------------------------------------------------
+Fri Apr 28 21:25:50 UTC 2023 - Klaas Freitag <[email protected]>
+
+- Fix build requirement on AkondiContacts 
+
+-------------------------------------------------------------------
+Fri Apr 28 21:18:19 UTC 2023 - Klaas Freitag <[email protected]>
+
+- Add a patch fixakonadi.patch to adopt to latest KDE akonadi. 
+
+-------------------------------------------------------------------

New:
----
  fixakonadi.patch

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

Other differences:
------------------
++++++ kraft.spec ++++++
--- /var/tmp/diff_new_pack.ztvSNL/_old  2023-05-01 18:51:37.289512027 +0200
+++ /var/tmp/diff_new_pack.ztvSNL/_new  2023-05-01 18:51:37.293512052 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package kraft
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 # Copyright (c) 2007-2011 Klaas Freitag <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -55,8 +55,14 @@
 Patch0:         use_qpdfview.patch
 %endif
 %if %{with akonadi}
+%if 0%{?suse_version} > 1500
+BuildRequires:  cmake(KPim5AkonadiContact)
+%else
 BuildRequires:  cmake(KF5AkonadiContact)
 %endif
+%endif
+# PATCH-FIX-UPSTREAM fixakonadi.patch Use new Akonadi Prefix
+Patch1:         fixakonadi.patch
 
 %description
 Kraft is KDE software to help to create and manage office documents such as
@@ -72,10 +78,15 @@
 %if %{with qpdfview}
 %patch0 -p1
 %endif
+%patch1 -p1
 
 %build
 
+%if 0%{?suse_version} > 1500
 %cmake_kf5 -d build
+%else
+%cmake_kf5 -d build -- -DAKONADI_LEGACY_BUILD=ON
+%endif
 %cmake_build
 
 %install

++++++ fixakonadi.patch ++++++
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 07e15dd..82b4e07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,15 @@ find_package(ECM REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} 
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
 set(CMAKE_AUTOMOC TRUE)
 
+option(AKONADI_LEGACY_BUILD "Build with older versions of Akonadi (KF5 
Prefix)" OFF)
+# Akonadi Prefix: Set this to KF5 for builds with Akonadi Libs before 5.23
+set(AKO_PREFIX "KPim5")
+
+if (AKONADI_LEGACY_BUILD)
+  set(AKO_PREFIX "KF5")
+endif()
+message("Akonadi Prefix is ${AKO_PREFIX}")
+
 include(KDEInstallDirs)
 include(KDECMakeSettings)
 include(ECMInstallIcons)
@@ -47,23 +56,23 @@ set_package_properties(Grantlee5 PROPERTIES
     TYPE OPTIONAL
 )
 
-find_package(KF5Akonadi)
-set_package_properties(KF5Akonadi PROPERTIES
+find_package(${AKO_PREFIX}Akonadi)
+set_package_properties(${AKO_PREFIX}Akonadi PROPERTIES
     DESCRIPTION "Library for general Access to Akonadi"
     URL "https://www.kde.org/";
     PURPOSE "Optionally used for addressbook integration"
     TYPE OPTIONAL
 )
 
-find_package(KF5AkonadiContact)
-set_package_properties(KF5AkonadiContact PROPERTIES
+find_package(${AKO_PREFIX}AkonadiContact)
+set_package_properties(${AKO_PREFIX}AkonadiContact PROPERTIES
     DESCRIPTION "Library for Accessing Contacts stored in Akonadi"
     URL "https://www.kde.org/";
     PURPOSE "Optionally used for addressbook integration"
     TYPE OPTIONAL
 )
 
-if(KF5Akonadi_FOUND AND KF5AkonadiContact_FOUND)
+if(${AKO_PREFIX}Akonadi_FOUND AND ${AKO_PREFIX}AkonadiContact_FOUND)
    add_definitions(-DHAVE_AKONADI)
 endif()
 
@@ -80,7 +89,8 @@ set(QT_DEFINITIONS "${Qt5Core_DEFINITIONS} 
${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DE
 add_definitions(${QT_DEFINITIONS} )
 
 include_directories(${QT_INCLUDES} src)
-include_directories( /usr/include/KF5/AkonadiCore )
+include_directories( /usr/include/${AKO_PREFIX}/AkonadiCore )
+include_directories(/usr/include/${AKO_PREFIX}/)
 
 if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
         ki18n_install(po)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6eaa557..8e9b069 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,3 @@
-# include_directories(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} 
${CMAKE_CURRENT_BINARY_DIR} ${KDEPIMLIBS_INCLUDE_DIRS} external)
 
 include_directories(${QT_INCLUDES} src)
 add_subdirectory(pics)
@@ -167,13 +166,13 @@ set(KRAFT_LINK_LIBS
     ${CTEMPLATE_LIBRARIES} pthread
     Grantlee5::Templates
 )
-if(KF5Akonadi_FOUND)
+if(${AKO_PREFIX}Akonadi_FOUND)
   list(APPEND KRAFT_LINK_LIBS
-    KF5::AkonadiCore
-    KF5::AkonadiContact
-    KF5::AkonadiAgentBase
-    KF5::AkonadiWidgets
-    KF5::AkonadiXml
+    ${AKO_PREFIX}::AkonadiCore
+    ${AKO_PREFIX}::AkonadiContact
+    ${AKO_PREFIX}::AkonadiAgentBase
+    ${AKO_PREFIX}::AkonadiWidgets
+    ${AKO_PREFIX}::AkonadiXml
   )
 endif()
 
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 0c58c75..f005cfe 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -8,15 +8,15 @@ set(AUTOMOC ON)
 # For now there is only the Akonadi based address backend, and thus
 # the findcontact tool is only built if akonadi is there.
 # If there are other backends, this must be FIXED.
-if(KF5Akonadi_FOUND)
+if(${AKO_PREFIX}Akonadi_FOUND)
     add_executable(${findcontact_NAME} ${FINDCONTACT_SRC})
 
     target_link_libraries( ${findcontact_NAME}
         Qt5::Core
         Qt5::Widgets
         KF5::Contacts
-        KF5::AkonadiCore
-        KF5::AkonadiContact
+        ${AKO_PREFIX}::AkonadiCore
+        ${AKO_PREFIX}::AkonadiContact
     )
 
     ########### install files ###############

Reply via email to