From eb6de7ac27e795fc1eb1a670cde8d515d768340d Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sun, 9 Mar 2025 20:22:46 +0800 Subject: [PATCH] fix build with icu 76 --- ...ort-evolution-data-server-cmake-3.15.patch | 58 +++++++++++++++++++ backport-evolution-data-server-icu76.patch | 56 ++++++++++++++++++ evolution-data-server.spec | 8 ++- 3 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 backport-evolution-data-server-cmake-3.15.patch create mode 100644 backport-evolution-data-server-icu76.patch diff --git a/backport-evolution-data-server-cmake-3.15.patch b/backport-evolution-data-server-cmake-3.15.patch new file mode 100644 index 0000000..828fa46 --- /dev/null +++ b/backport-evolution-data-server-cmake-3.15.patch @@ -0,0 +1,58 @@ +From f41430411039204c47bfe8479be21a1721caf0bb Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Fri, 12 Jan 2024 15:56:08 +0100 +Subject: [PATCH] build: Bump CMake version requirement to 3.15 and change + libedataserverui4 .h files copy + +Let's depend on a newer version of CMake. The previous 3.1 compatibility code +will be gone in future CMake releases. + +The Ninja generator requires different way to copy the libedataserverui4 header +files, thus it knows where the files come from. +--- + CMakeLists.txt | 4 ++-- + src/libedataserverui/CMakeLists.txt | 14 ++++++++++---- + 2 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f75420b..dd59de6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,7 @@ + # Evolution-Data-Server build script + +-cmake_minimum_required(VERSION 3.1) +-cmake_policy(VERSION 3.1) ++cmake_minimum_required(VERSION 3.15) ++cmake_policy(VERSION 3.15) + + project(evolution-data-server + VERSION 3.46.2 +diff --git a/src/libedataserverui/CMakeLists.txt b/src/libedataserverui/CMakeLists.txt +index c2d250c..860946c 100644 +--- a/src/libedataserverui/CMakeLists.txt ++++ b/src/libedataserverui/CMakeLists.txt +@@ -271,10 +271,16 @@ install(FILES ${HEADERS} + DESTINATION ${privincludedir}/libedataserverui${UI_VERSION} + ) + +-# create libedataserverui4/... in the build dir, thus .gir can find it +-file(COPY ${HEADERS} +- DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui${UI_VERSION}/ +-) ++# create libedataserverui4/... in the build dir, thus .gir can find it; ++# do it this way, to satisfy Ninja generator (see CMP0058) ++foreach(_item IN LISTS HEADERS SOURCES) ++ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_item}") ++ file(GENERATE ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui${UI_VERSION}/${_item} ++ INPUT ${CMAKE_CURRENT_SOURCE_DIR}/${_item} ++ ) ++ endif() ++endforeach() + + set(gir_sources ${SOURCES} ${HEADERS}) + set(gir_identifies_prefixes E) +-- +GitLab + diff --git a/backport-evolution-data-server-icu76.patch b/backport-evolution-data-server-icu76.patch new file mode 100644 index 0000000..af1a066 --- /dev/null +++ b/backport-evolution-data-server-icu76.patch @@ -0,0 +1,56 @@ +From 52021a61ffa20d7a2d3b79ed5caa18805cb027cf Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Tue, 19 Nov 2024 11:15:12 +0100 +Subject: [PATCH] I#574 - Fails to build/link against icu 76.1 + +Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/574 +--- + CMakeLists.txt | 6 +++--- + src/libedataserver/CMakeLists.txt | 2 ++ + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 835a18c..f75420b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -363,13 +363,13 @@ endif(WIN32) + # ICU started shipping pkg-config files but it's not present + # on many systems, if we don't find the pkg-config + # file then let's fallback on a manual check +-pkg_check_modules(ICU icu-i18n) ++pkg_check_modules(ICU icu-i18n icu-uc) + + if(NOT ICU_FOUND) + CHECK_INCLUDE_FILE(unicode/ucol.h HAVE_UNICODE_UCOL_H) + if(NOT HAVE_UNICODE_UCOL_H) + message(FATAL_ERROR "ICU unicode/ucol.h not found; icu-i18n is required") +- endif(HAVE_UNICODE_UCOL_H) ++ endif(NOT HAVE_UNICODE_UCOL_H) + + set(CMAKE_REQUIRED_LIBRARIES "-licui18n -licuuc -licudata") + CHECK_C_SOURCE_COMPILES("#include +@@ -380,7 +380,7 @@ if(NOT ICU_FOUND) + set(ICU_CFLAGS -D_REENTRANT) + set(ICU_LIBS "-licui18n -licuuc -licudata") + else(HAVE_UCOL_OPEN) +- message(FATAL_ERROR "Failed to find icu-i18n, install its development files or build them first") ++ message(FATAL_ERROR "Failed to find icui18n, icuuc and icudata, install its development files or build them first") + endif(HAVE_UCOL_OPEN) + endif(NOT ICU_FOUND) + +diff --git a/src/libedataserver/CMakeLists.txt b/src/libedataserver/CMakeLists.txt +index 2dfc1bd..abd338b 100644 +--- a/src/libedataserver/CMakeLists.txt ++++ b/src/libedataserver/CMakeLists.txt +@@ -16,6 +16,8 @@ add_library(edataserver-private STATIC + e-transliterator-private.cpp + ) + ++set_property(TARGET edataserver-private PROPERTY CXX_STANDARD 17) ++ + target_compile_definitions(edataserver-private PRIVATE + -DG_LOG_DOMAIN=\"e-data-server\" + -DLIBEDATASERVER_COMPILATION +-- +2.47.1 + diff --git a/evolution-data-server.spec b/evolution-data-server.spec index 1a4b619..eedd162 100644 --- a/evolution-data-server.spec +++ b/evolution-data-server.spec @@ -37,7 +37,7 @@ Name: evolution-data-server Version: 3.46.2 -Release: 5 +Release: 6 Summary: Backend data server for Evolution License: LGPL-2.1-or-later URL: https://wiki.gnome.org/Apps/Evolution @@ -46,6 +46,8 @@ Patch6001: backport-evolution-data-server-use-webkitgtk-6.0-api.patch Patch6002: backport-evolution-data-server-try-harder-to-support-webkitgtk-6.0.patch Patch6003: backport-evolution-data-server-Update-for-removal-of-WebKitGTK-sandbox-API.patch Patch6004: backport-evolution-data-server-OAuth2-use-WebKitNetworkSession-to-manage-proxy.patch +Patch6005: backport-evolution-data-server-icu76.patch +Patch6006: backport-evolution-data-server-cmake-3.15.patch Provides: evolution-webcal = %{version} Obsoletes: evolution-webcal < 2.24.0 compat-evolution-data-server310-libcamel < 3.12 @@ -400,6 +402,10 @@ echo "%{_libdir}/%{name}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libexecdir}/evolution-data-server/csv2vcard %changelog +* Sun Mar 09 2025 Funda Wang - 3.46.2-6 +- build with icu 76 +- fix build with cmake 4.0 + * Sun Feb 23 2025 Funda Wang - 3.46.2-5 - use webkitgtk-6.0 api -- Gitee