Christophe Giboudeaux 2020-11-23 12:55:46 +00:00 committed by Git OBS Bridge
parent cab99147f2
commit 5776f23b32
4 changed files with 79 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 35c64fc2244821297d512fb5ff15cd342d5150f7 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr>
Date: Mon, 23 Nov 2020 08:29:34 +0100
Subject: [PATCH 1/3] Revert "Fix building akonadiprivate_obj with out of
system lzma libs on macOS"
Using target_link_libraries with 'OBJECT' libraries breaks the build with older
CMake versions.
This reverts commit 2faa9de706d250be62689a4efebe8a143d6da47c.
---
src/private/CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/private/CMakeLists.txt b/src/private/CMakeLists.txt
index 14eba9da5..1e40a1d61 100644
--- a/src/private/CMakeLists.txt
+++ b/src/private/CMakeLists.txt
@@ -62,7 +62,6 @@ if (WIN32)
set(akonadiprivate_buildsources ${akonadiprivate_SRCS})
else()
add_library(akonadiprivate_obj OBJECT ${akonadiprivate_SRCS})
- target_link_libraries(akonadiprivate_obj ${akonadiprivate_LIBS})
update_include_directories(akonadiprivate_obj)
set_target_properties(akonadiprivate_obj PROPERTIES POSITION_INDEPENDENT_CODE 1)
add_dependencies(akonadiprivate_obj generate_protocol)
--
2.29.2

View File

@ -0,0 +1,39 @@
From 0586ae9d4f4fc5ef27b11e6c397f049bbd405e19 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr>
Date: Mon, 23 Nov 2020 08:40:10 +0100
Subject: [PATCH 2/3] CMake: Don't use the LZMA imported targets
LibLZMA::LibLZMA was introduced in CMake 3.14.
We need to use the old style link targets. This should also
fix a build issue on macOS when LZMA is not installed into
standard locations.
amends commit 2bf3a5c9
---
src/private/CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/private/CMakeLists.txt b/src/private/CMakeLists.txt
index 1e40a1d61..23f172e47 100644
--- a/src/private/CMakeLists.txt
+++ b/src/private/CMakeLists.txt
@@ -1,5 +1,7 @@
add_subdirectory(protocolgen)
+include_directories(${LIBLZMA_INCLUDE_DIRS})
+
if(NOT XMLLINT_EXECUTABLE)
message(STATUS "xmllint not found, skipping protocol.xml validation")
else()
@@ -34,7 +36,7 @@ PUBLIC
Qt5::Core
Qt5::DBus
PRIVATE
- LibLZMA::LibLZMA
+ ${LIBLZMA_LIBRARIES}
)
if (WIN32)
set(akonadiprivate_LIBS
--
2.29.2

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Nov 23 12:54:23 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>
- Add upstream patches to fix build with older CMake versions:
* 0001-Revert-Fix-building-akonadiprivate_obj-with-out-of-s.patch
* 0002-CMake-Don-t-use-the-LZMA-imported-targets.patch
-------------------------------------------------------------------
Sat Nov 14 00:00:13 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -30,6 +30,9 @@ Group: System/GUI/KDE
URL: https://akonadi-project.org
Source: https://download.kde.org/unstable/release-service/%{version}/src/%{rname}-%{version}.tar.xz
Source99: akonadi-server-rpmlintrc
# PATCH-FIX-UPSTREAM
Patch0: 0001-Revert-Fix-building-akonadiprivate_obj-with-out-of-s.patch
Patch1: 0002-CMake-Don-t-use-the-LZMA-imported-targets.patch
BuildRequires: extra-cmake-modules >= %{kf5_version}
BuildRequires: kf5-filesystem
BuildRequires: libQt5Sql-private-headers-devel
@ -164,7 +167,7 @@ service.
%lang_package
%prep
%setup -q -n %{rname}-%{version}
%autosetup -p1 -n %{rname}-%{version}
%build
%cmake_kf5 -d build -- -DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE -DQT_PLUGINS_DIR=%{_kf5_plugindir} -DINSTALL_APPARMOR=FALSE