Add a patch to fix a build
This commit is contained in:
parent
6d37bd947f
commit
f054bd7d17
@ -0,0 +1,77 @@
|
||||
From 43c88a074beb308fe5aba4457e6d7854e1bc3f91 Mon Sep 17 00:00:00 2001
|
||||
Date: Mon, 8 Jan 2024 09:48:50 +0100
|
||||
Subject: [PATCH] build: Don't set CFLAGS returned by pkg-config as
|
||||
CMAKE_REQUIRED_FLAGS
|
||||
|
||||
The CMAKE_REQUIRED_FLAGS expects a string but the pkg-config value
|
||||
is a list.
|
||||
|
||||
This had been addressed within https://bugzilla.gnome.org/show_bug.cgi?id=773659 ,
|
||||
but returned back afterwards.
|
||||
---
|
||||
CMakeLists.txt | 8 ++++----
|
||||
data/CMakeLists.txt | 5 ++---
|
||||
2 files changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b43cc9eb0..8fa487826 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -532,11 +532,11 @@ if(WITH_LIBDB)
|
||||
endif(("${WITH_LIBDB_CFLAGS}" STREQUAL "") AND ("${WITH_LIBDB_LIBS}" STREQUAL ""))
|
||||
endif(NOT (WITH_LIBDB OR ("${WITH_LIBDB}" STREQUAL "YES")))
|
||||
|
||||
- set(CMAKE_REQUIRED_FLAGS ${LIBDB_CFLAGS})
|
||||
+ set(CMAKE_REQUIRED_DEFINITIONS ${LIBDB_CFLAGS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${LIBDB_LIBS})
|
||||
CHECK_C_SOURCE_COMPILES("#include <db.h>
|
||||
int main(void) { db_create(NULL, NULL, 0); return 0; }" HAVE_LIBDB)
|
||||
- unset(CMAKE_REQUIRED_FLAGS)
|
||||
+ unset(CMAKE_REQUIRED_DEFINITIONS)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
if(NOT HAVE_LIBDB)
|
||||
@@ -910,13 +910,13 @@ endif(ENABLE_LARGEFILE)
|
||||
# Miscellaneous checks
|
||||
# ******************************
|
||||
|
||||
-set(CMAKE_REQUIRED_FLAGS ${GNOME_PLATFORM_CFLAGS})
|
||||
+set(CMAKE_REQUIRED_DEFINITIONS ${GNOME_PLATFORM_CFLAGS})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${GNOME_PLATFORM_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${GNOME_PLATFORM_LDFLAGS})
|
||||
CHECK_C_SOURCE_COMPILES("#include <gio/gio.h>
|
||||
int main(void) { GPowerProfileMonitor *monitor = g_power_profile_monitor_dup_default (); g_clear_object (&monitor); return 0; }" HAVE_GPOWERPROFILEMONITOR)
|
||||
CHECK_SYMBOL_EXISTS(soup_message_set_force_http1 libsoup/soup.h HAVE_SOUP_MESSAGE_SET_FORCE_HTTP1)
|
||||
-unset(CMAKE_REQUIRED_FLAGS)
|
||||
+unset(CMAKE_REQUIRED_DEFINITIONS)
|
||||
unset(CMAKE_REQUIRED_INCLUDES)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
|
||||
index b8ecd6535..fdcb2dac8 100644
|
||||
--- a/data/CMakeLists.txt
|
||||
+++ b/data/CMakeLists.txt
|
||||
@@ -27,10 +27,10 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution-alarm-notify.deskt
|
||||
|
||||
set(OAUTH2_SCHEMES "x-scheme-handler/eds-oauth2;")
|
||||
if(NOT WITH_GOOGLE_CLIENT_ID STREQUAL "")
|
||||
- set(CMAKE_REQUIRED_DEFINITIONS -DG_LOG_DOMAIN=\"oauth2-value-helper\" -DBUILDING_VALUE_HELPER=1)
|
||||
- set(CMAKE_REQUIRED_FLAGS ${DATA_SERVER_CFLAGS})
|
||||
+ set(CMAKE_REQUIRED_DEFINITIONS ${DATA_SERVER_CFLAGS})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_BINARY_DIR} ${DATA_SERVER_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${DATA_SERVER_LDFLAGS})
|
||||
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -DG_LOG_DOMAIN=\"oauth2-value-helper\" -DBUILDING_VALUE_HELPER=1)
|
||||
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/oauth2-google-client-id" _binary_dir_to_file)
|
||||
CHECK_C_SOURCE_RUNS("#define DECODE_KEY \"${WITH_GOOGLE_CLIENT_ID}\"
|
||||
#define DECODE_TO_FILE \"${_binary_dir_to_file}\"
|
||||
@@ -41,7 +41,6 @@ if(NOT WITH_GOOGLE_CLIENT_ID STREQUAL "")
|
||||
unset(_decoded)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
unset(CMAKE_REQUIRED_INCLUDES)
|
||||
- unset(CMAKE_REQUIRED_FLAGS)
|
||||
unset(CMAKE_REQUIRED_DEFINITIONS)
|
||||
|
||||
if(NOT _google_oauth2_scheme STREQUAL "")
|
||||
--
|
||||
2.41.0
|
||||
|
@ -66,6 +66,8 @@ License: LGPL-2.0-or-later
|
||||
URL: https://wiki.gnome.org/Apps/Evolution
|
||||
Source: http://download.gnome.org/sources/%{name}/3.51/%{name}-%{version}.tar.xz
|
||||
|
||||
Patch01: 0001-build-Don-t-set-CFLAGS-returned-by-pkg-config-as-CMA.patch
|
||||
|
||||
Provides: evolution-webcal = %{version}
|
||||
Obsoletes: evolution-webcal < 2.24.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user