Branch: master

3adf509a 2014-10-08 14:24:13 François Andriot
Fix ucred support in openbsd
M dcop/dcopclient.cpp
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index 92fccde..40cfd41 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -717,7 +717,11 @@
 // Check whether the remote end is owned by the same user.
 static bool peerIsUs(int sockfd)
 {
+#if defined(__OpenBSD__)
+    struct sockpeercred cred;
+#else
     struct ucred cred;
+#endif
     socklen_t siz = sizeof(cred);
     if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &cred, &siz) != 0)
         return false;
aae8990d 2014-10-08 14:25:38 François Andriot
Add a cmake detection for Xext library
Remove hardcoded Xext flags in tderandr and tdestyles/keramik
Add missing link flag in tdeui
M CMakeLists.txt
M tderandr/CMakeLists.txt
M tdestyles/keramik/CMakeLists.txt
M tdeui/CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45f161b..11d3c4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -679,6 +679,12 @@
   else( WITH_XCOMPOSITE )
     tde_message_fatal( "xcomposite support was requested, but xcomposite was not found on your system" )
   endif( XCOMPOSITE_FOUND )
+
+  # xext (tderandr, tdestyles/keramik, tdeui)
+  pkg_search_module( XEXT xext )
+  if( NOT XEXT_FOUND )
+    tde_message_fatal( "xext is required for xcomposite support, but was not found on your system" )
+  endif( )
 endif( WITH_XCOMPOSITE )
 
 
diff --git a/tderandr/CMakeLists.txt b/tderandr/CMakeLists.txt
index efcd851..e52da4c 100644
--- a/tderandr/CMakeLists.txt
+++ b/tderandr/CMakeLists.txt
@@ -43,6 +43,6 @@
 tde_add_library( ${target} SHARED AUTOMOC
   SOURCES ${${target}_SRCS}
   VERSION 0.0.95
-  LINK tdeui-shared ${XRANDR_LIBRARIES} Xext
+  LINK tdeui-shared ${XRANDR_LIBRARIES} ${XEXT_LIBRARIES}
   DESTINATION ${LIB_INSTALL_DIR}
 )
diff --git a/tdestyles/keramik/CMakeLists.txt b/tdestyles/keramik/CMakeLists.txt
index 8ee7c97..ae53651 100644
--- a/tdestyles/keramik/CMakeLists.txt
+++ b/tdestyles/keramik/CMakeLists.txt
@@ -65,6 +65,6 @@
 
 tde_add_kpart( ${target} AUTOMOC
   SOURCES ${${target}_SRCS}
-  LINK tdefx-shared Xext
+  LINK tdefx-shared ${XEXT_LIBRARIES}
   DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles
 )
diff --git a/tdeui/CMakeLists.txt b/tdeui/CMakeLists.txt
index d30bee9..5816878 100644
--- a/tdeui/CMakeLists.txt
+++ b/tdeui/CMakeLists.txt
@@ -148,7 +148,7 @@
 tde_add_library( ${target} SHARED AUTOMOC
   SOURCES ${${target}_SRCS}
   VERSION 14.0.0
-  LINK tdecore-shared ${FREETYPE_LIBRARIES} ${FONTCONFIG_LIBRARIES}
+  LINK tdecore-shared ${FREETYPE_LIBRARIES} ${FONTCONFIG_LIBRARIES} ${XEXT_LIBRARIES}
   DEPENDENCIES dcopidl
   DESTINATION ${LIB_INSTALL_DIR}
 )