Browse Source

Fix FTBFS on freebsd

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Slávek Banko 3 years ago
parent
commit
08122b137e

+ 1
- 1
ConfigureChecks.cmake View File

@@ -50,7 +50,7 @@ if( WITH_PAM AND (BUILD_KCHECKPASS OR BUILD_TDM) )
50 50
     check_include_file( "security/pam_appl.h" SECURITY_PAM_APPL_H )
51 51
   endif( )
52 52
   if( HAVE_PAM AND SECURITY_PAM_APPL_H )
53
-    set( PAM_LIBRARY pam;dl )
53
+    set( PAM_LIBRARY pam ${DL_LIBRARIES} )
54 54
   else( )
55 55
     tde_message_fatal( "pam are requested, but not found on your system" )
56 56
   endif( )

+ 1
- 0
FindXscreensaver.cmake View File

@@ -41,6 +41,7 @@ bin/xscreensaver-hacks hacks)
41 41
     /usr/share/xscreensaver/
42 42
     /usr/local/kde/
43 43
     /usr/local/xscreensaver/
44
+    /usr/local/share/xscreensaver/
44 45
     /usr/openwin/lib/xscreensaver/
45 46
     /etc/
46 47
   )

+ 1
- 1
kdesktop/lock/lockprocess.cc View File

@@ -81,8 +81,8 @@
81 81
 
82 82
 #ifdef __linux__
83 83
 #include <linux/stat.h>
84
-#include <pthread.h>
85 84
 #endif
85
+#include <pthread.h>
86 86
 
87 87
 #include <X11/Xlib.h>
88 88
 #include <X11/Xutil.h>

+ 1
- 0
khelpcenter/searchhandlers/CMakeLists.txt View File

@@ -16,6 +16,7 @@ if( NOT DEFINED HTDIG_SEARCH_BINARY )
16 16
     HINTS
17 17
       /srv/www/cgi-bin
18 18
       /usr/lib/cgi-bin
19
+      /usr/local/www/cgi-bin
19 20
   )
20 21
   if( HTDIG_SEARCH_BINARY )
21 22
     message( STATUS "Looking for htsearch - ${HTDIG_SEARCH_BINARY}" )

+ 1
- 1
kicker/kicker/ui/k_new_mnu.cpp View File

@@ -95,7 +95,7 @@
95 95
 #include "flipscrollview.h"
96 96
 #include "itemview.h"
97 97
 #include <dmctl.h>
98
-#ifdef __OpenBSD__
98
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
99 99
 #include <sys/statvfs.h>
100 100
 #include <sys/param.h>
101 101
 #include <sys/mount.h>

+ 2
- 0
ksysguard/ksysguardd/CMakeLists.txt View File

@@ -17,6 +17,8 @@ if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
17 17
   set( OS_SPECIFIC_DIR Linux )
18 18
 elseif( ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" )
19 19
   set( OS_SPECIFIC_DIR OpenBSD )
20
+elseif( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" )
21
+  set( OS_SPECIFIC_DIR FreeBSD )
20 22
 else()
21 23
   tde_message_fatal( "Your operating system (${CMAKE_SYSTEM_NAME}) is not supported yet." )
22 24
 endif()

+ 26
- 0
ksysguard/ksysguardd/FreeBSD/CMakeLists.txt View File

@@ -0,0 +1,26 @@
1
+#################################################
2
+#
3
+#  (C) 2015 Serghei Amelian
4
+#  slavek (DOT) banko (AT) axis.cz
5
+#
6
+#  Improvements and feedback are welcome
7
+#
8
+#  This file is released under GPL >= 2
9
+#
10
+#################################################
11
+
12
+
13
+include_directories(
14
+  ${CMAKE_BINARY_DIR}
15
+  ${CMAKE_SOURCE_DIR}/ksysguard/CContLib
16
+  ${CMAKE_SOURCE_DIR}/ksysguard/ksysguardd
17
+)
18
+
19
+
20
+##### ksysguardd (static) #######################
21
+
22
+tde_add_library( ksysguardd STATIC
23
+  SOURCES
24
+    CPU.c Memory.c ProcessList.c apm.c diskstat.c loadavg.c logfile.c netdev.c
25
+  LINK kvm
26
+)

+ 2
- 2
kxkb/CMakeLists.txt View File

@@ -40,7 +40,7 @@ tde_add_kpart( kcm_keyboard AUTOMOC
40 40
     extension.cpp x11helper.cpp rules.cpp kxkbconfig.cpp
41 41
     pixmap.cpp kcmlayout.cpp kcmlayoutwidget.ui
42 42
     kcmmisc.cpp kcmmiscwidget.ui
43
-  LINK tdeio-shared xkbfile ${XTEST_LIBRARIES}
43
+  LINK tdeio-shared ${XKBFILE_LIBRARIES} ${XTEST_LIBRARIES}
44 44
   DESTINATION ${PLUGIN_INSTALL_DIR}
45 45
 )
46 46
 
@@ -52,5 +52,5 @@ tde_add_tdeinit_executable( kxkb AUTOMOC
52 52
     extension.cpp x11helper.cpp rules.cpp kxkbconfig.cpp
53 53
     pixmap.cpp layoutmap.cpp kxkb.cpp kxkbtraywindow.cpp
54 54
     kxkb.skel
55
-  LINK tdeui-shared xkbfile
55
+  LINK tdeui-shared ${XKBFILE_LIBRARIES}
56 56
 )

+ 5
- 0
kxkb/ConfigureChecks.cmake View File

@@ -13,3 +13,8 @@ find_program( SETXKBMAP setxkbmap )
13 13
 if( SETXKBMAP-NOTFOUND )
14 14
   tde_message_fatal( "setxkbmap is required, but not found on your system" )
15 15
 endif()
16
+
17
+pkg_search_module( XKBFILE xkbfile )
18
+if( NOT XKBFILE_FOUND )
19
+  tde_message_fatal( "xkbfile is requested, but was not found on your system" )
20
+endif()

+ 1
- 1
tdeioslave/media/medianotifier/medianotifier.cpp View File

@@ -19,7 +19,7 @@
19 19
 
20 20
 #include "medianotifier.h"
21 21
 
22
-#ifdef __OpenBSD__
22
+#if defined (__OpenBSD__) || defined(__FreeBSD__)
23 23
 #include <sys/statvfs.h>
24 24
 #include <sys/param.h>
25 25
 #include <sys/mount.h>

+ 2
- 2
tdesu/tdesud/tdesud.cpp View File

@@ -45,7 +45,7 @@
45 45
 #include <pwd.h>
46 46
 #include <errno.h>
47 47
 
48
-#ifndef __OpenBSD__
48
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
49 49
 #include <sys/prctl.h>
50 50
 #endif
51 51
 #include <sys/time.h>
@@ -251,7 +251,7 @@ int create_socket()
251 251
 
252 252
 int main(int argc, char *argv[])
253 253
 {
254
-#ifndef __OpenBSD__
254
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
255 255
     prctl(PR_SET_DUMPABLE, 0);
256 256
 #endif
257 257
 

+ 1
- 1
tdm/backend/CMakeLists.txt View File

@@ -43,6 +43,6 @@ tde_add_executable( tdm
43 43
     process.c protodpy.c reset.c resource.c rpcauth.c
44 44
     server.c session.c sessreg.c socket.c streams.c
45 45
     util.c xdmauth.c xdmcp.c
46
-  LINK X11 ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY} ${PAM_LIBRARY} ${XDMCP_LIBRARIES}
46
+  LINK X11 ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY} ${PAM_LIBRARY} ${UTIL_LIBRARY} ${XDMCP_LIBRARIES}
47 47
   DESTINATION ${BIN_INSTALL_DIR}
48 48
 )

+ 4
- 4
tdm/backend/dm.h View File

@@ -106,7 +106,6 @@ typedef int waitType;
106 106
 # define Jmp_buf sigjmp_buf
107 107
 #endif
108 108
 
109
-#include <utmp.h>
110 109
 #ifdef HAVE_UTMPX
111 110
 # include <utmpx.h>
112 111
 # define STRUCTUTMP struct utmpx
@@ -119,6 +118,7 @@ typedef int waitType;
119 118
 # define ut_time ut_tv.tv_sec
120 119
 # define ll_time ll_tv.tv_sec
121 120
 #else
121
+# include <utmp.h>
122 122
 # define STRUCTUTMP struct utmp
123 123
 # define UTMPNAME utmpname
124 124
 # define SETUTENT setutent
@@ -126,9 +126,9 @@ typedef int waitType;
126 126
 # define PUTUTLINE pututline
127 127
 # define ENDUTENT endutent
128 128
 # define LASTLOG lastlog
129
-#endif
130
-#ifndef HAVE_STRUCT_UTMP_UT_USER
131
-# define ut_user ut_name
129
+# ifndef HAVE_STRUCT_UTMP_UT_USER
130
+#  define ut_user ut_name
131
+# endif
132 132
 #endif
133 133
 #ifndef WTMP_FILE
134 134
 # ifdef _PATH_WTMPX

+ 1
- 1
tdm/backend/getfd.c View File

@@ -22,7 +22,7 @@ is_a_console(int fd) {
22 22
 	char arg;
23 23
 
24 24
 	arg = 0;
25
-#ifdef __OpenBSD__
25
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
26 26
 	return arg;
27 27
 #else
28 28
 	return (ioctl(fd, KDGKBTYPE, &arg) == 0

+ 9
- 0
tdm/backend/sessreg.c View File

@@ -42,6 +42,13 @@ from The Open Group.
42 42
 #if defined(__svr4__) || defined(__Lynx__) || defined(__QNX__) || defined(__APPLE__) || defined(_SEQUENT_) /*|| defined(USE_PAM)*/
43 43
 # define NO_LASTLOG
44 44
 #endif
45
+ 
46
+#ifdef __FreeBSD__
47
+# include <sys/param.h>
48
+# if __FreeBSD_version >= 900007
49
+#  define NO_LASTLOG
50
+# endif
51
+#endif
45 52
 
46 53
 #ifndef NO_LASTLOG
47 54
 # ifdef HAVE_LASTLOG_H
@@ -254,7 +261,9 @@ sessreg( struct display *d, int pid, const char *user, int uid )
254 261
 		close( utmp );
255 262
 	}
256 263
 # else
264
+#   if !defined(__FreeBSD__)
257 265
 	UTMPNAME( UTMP_FILE );
266
+#   endif
258 267
 	SETUTENT();
259 268
 	PUTUTLINE( &ut_ent );
260 269
 	ENDUTENT();

+ 11
- 1
tdm/kfrontend/gentdmconf.c View File

@@ -44,7 +44,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
44 44
 #include <limits.h>
45 45
 #include <sys/stat.h>
46 46
 #include <sys/param.h>
47
-#ifdef BSD
47
+#if defined(BSD) && !defined(HAVE_UTMPX)
48 48
 # include <utmp.h>
49 49
 #endif
50 50
 
@@ -1537,8 +1537,13 @@ edit_startup( File *file )
1537 1537
 "fi\n") |
1538 1538
 #else
1539 1539
 # ifdef BSD
1540
+#   ifdef HAVE_UTMPX
1541
+			delstr( file, "\n"
1542
+"exec sessreg -a -l $DISPLAY -x */Xservers $USER\n" ) |
1543
+#   else
1540 1544
 			delstr( file, "\n"
1541 1545
 "exec sessreg -a -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) |
1546
+#   endif
1542 1547
 # endif
1543 1548
 #endif /* _AIX */
1544 1549
 			delstr( file, "\n"
@@ -1586,8 +1591,13 @@ edit_reset( File *file )
1586 1591
 "fi\n" ) |
1587 1592
 #else
1588 1593
 # ifdef BSD
1594
+#   ifdef HAVE_UTMPX
1595
+		delstr( file, "\n"
1596
+"exec sessreg -d -l $DISPLAY -x */Xservers $USER\n" ) |
1597
+#   else
1589 1598
 		delstr( file, "\n"
1590 1599
 "exec sessreg -d -l $DISPLAY -x */Xservers -u " _PATH_UTMP " $USER\n" ) |
1600
+#   endif
1591 1601
 # endif
1592 1602
 #endif /* _AIX */
1593 1603
 		delstr( file, "\n"

+ 3
- 2
tdm/kfrontend/kgreeter.cpp View File

@@ -70,9 +70,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
70 70
 #include <unistd.h>
71 71
 #include <fcntl.h>
72 72
 #include <sys/types.h>
73
-#include <utmp.h>
74 73
 #ifdef HAVE_UTMPX
75
-#include <utmpx.h>
74
+# include <utmpx.h>
75
+#else
76
+# include <utmp.h>
76 77
 #endif
77 78
 
78 79
 #include <stdio.h>

Loading…
Cancel
Save