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