From 7fb856d9b85db79c1a7cca7f7df108f5d4a9522d Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 10 Dec 2021 12:59:39 +0100 Subject: [PATCH] dbus: add patch to fix cmake tmp session search The tmp file location cannot be set explicitly. It is set incorrectly by cmake. This patch only searches for this location if it is not specified via the build system. Without this change, the cross compile value is not correct set on target in the file /usr/share/dbus-1/session.conf. Signed-off-by: Florian Eckert --- .../020-cmake-fix-tmp-session-search.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 utils/dbus/patches/020-cmake-fix-tmp-session-search.patch diff --git a/utils/dbus/patches/020-cmake-fix-tmp-session-search.patch b/utils/dbus/patches/020-cmake-fix-tmp-session-search.patch new file mode 100644 index 000000000..2847b628e --- /dev/null +++ b/utils/dbus/patches/020-cmake-fix-tmp-session-search.patch @@ -0,0 +1,27 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -471,14 +471,16 @@ endif() + + #### Find socket directories + if(UNIX) +- if(NOT $ENV{TMPDIR} STREQUAL "") +- set(DBUS_SESSION_SOCKET_DIR $ENV{TMPDIR}) +- elseif(NOT $ENV{TEMP} STREQUAL "") +- set(DBUS_SESSION_SOCKET_DIR $ENV{TEMP}) +- elseif(NOT $ENV{TMP} STREQUAL "") +- set(DBUS_SESSION_SOCKET_DIR $ENV{TMP}) +- else() +- set(DBUS_SESSION_SOCKET_DIR /tmp) ++ if(NOT DEFINED DBUS_SESSION_SOCKET_DIR) ++ if(NOT $ENV{TMPDIR} STREQUAL "") ++ set(DBUS_SESSION_SOCKET_DIR $ENV{TMPDIR}) ++ elseif(NOT $ENV{TEMP} STREQUAL "") ++ set(DBUS_SESSION_SOCKET_DIR $ENV{TEMP}) ++ elseif(NOT $ENV{TMP} STREQUAL "") ++ set(DBUS_SESSION_SOCKET_DIR $ENV{TMP}) ++ else() ++ set(DBUS_SESSION_SOCKET_DIR /tmp) ++ endif() + endif() + endif() +