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 <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2021-12-10 12:59:39 +01:00
parent 0c912c82a8
commit 7fb856d9b8
1 changed files with 27 additions and 0 deletions

View File

@ -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()