smock: use $basearch in smock.mock.extra
[fedora-mingw.git] / dbus / mingw32-dbus-1.2.4-20081031-mingw32.patch
1 diff -ur mingw32-dbus-1.2.4.orig/trunk/bus/main.c mingw32-dbus-1.2.4.mingw/trunk/bus/main.c
2 --- mingw32-dbus-1.2.4.orig/trunk/bus/main.c    2008-10-31 10:02:18.000000000 +0000
3 +++ mingw32-dbus-1.2.4.mingw/trunk/bus/main.c   2008-10-31 14:28:45.000000000 +0000
4 @@ -52,6 +52,7 @@
5      case SIGIO: 
6        /* explicit fall-through */
7  #endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX  */
8 +#ifdef SIGUP
9      case SIGHUP:
10        _dbus_string_init_const (&str, "foo");
11        if ((reload_pipe[RELOAD_WRITE_END] > 0) && 
12 @@ -61,10 +62,13 @@
13            close_reload_pipe ();
14          }
15        break;
16 +#endif
17  
18 +#ifdef SIGTERM
19      case SIGTERM:
20        _dbus_loop_quit (bus_context_get_loop (context));
21        break;
22 +#endif
23      }
24  }
25  
26 @@ -458,8 +462,12 @@
27    
28    setup_reload_pipe (bus_context_get_loop (context));
29  
30 +#ifdef SIGHUP
31    _dbus_set_signal_handler (SIGHUP, signal_handler);
32 +#endif
33 +#ifdef SIGTERM
34    _dbus_set_signal_handler (SIGTERM, signal_handler);
35 +#endif
36  #ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX 
37    _dbus_set_signal_handler (SIGIO, signal_handler);
38  #endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */
39 diff -ur mingw32-dbus-1.2.4.orig/trunk/bus/Makefile.am mingw32-dbus-1.2.4.mingw/trunk/bus/Makefile.am
40 --- mingw32-dbus-1.2.4.orig/trunk/bus/Makefile.am       2008-10-31 10:02:18.000000000 +0000
41 +++ mingw32-dbus-1.2.4.mingw/trunk/bus/Makefile.am      2008-10-31 17:09:41.000000000 +0000
42 @@ -79,7 +79,7 @@
43  dbus_daemon_LDADD=                                     \
44         $(EFENCE)                                       \
45         $(DBUS_BUS_LIBS)                                \
46 -       $(top_builddir)/dbus/libdbus-convenience.la
47 +       $(top_builddir)/dbus/libdbus-convenience.la -lws2_32
48  
49  dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ @PIE_LDFLAGS@
50  
51 @@ -149,7 +149,8 @@
52  
53  ## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
54  ## even when not doing "make check"
55 -noinst_PROGRAMS=$(TESTS) dbus-daemon dbus-daemon-launch-helper-test dbus-daemon-launch-helper
56 +noinst_PROGRAMS=$(TESTS) dbus-daemon
57 +# dbus-daemon-launch-helper-test dbus-daemon-launch-helper
58  
59  bus_test_system_SOURCES=                       \
60         $(XML_SOURCES)                          \
61 @@ -184,21 +185,21 @@
62                 $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \
63                 chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
64         fi
65 -       $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR)
66 +       $(INSTALL_PROGRAM) dbus-daemon$(EXEEXT) $(DESTDIR)$(DBUS_DAEMONDIR)
67         $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
68         $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
69         $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
70         $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
71         $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
72         $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1
73 -       $(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir)
74 -       if test `id -u` -eq 0; then \
75 -               chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
76 -               chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
77 -       else \
78 -               echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
79 -               echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
80 -       fi
81 +#      $(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir)
82 +#      if test `id -u` -eq 0; then \
83 +#              chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
84 +#              chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
85 +#      else \
86 +#              echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
87 +#              echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
88 +#      fi
89  
90  #### Init scripts fun
91  SCRIPT_IN_FILES=messagebus.in \
92 diff -ur mingw32-dbus-1.2.4.orig/trunk/configure.in mingw32-dbus-1.2.4.mingw/trunk/configure.in
93 --- mingw32-dbus-1.2.4.orig/trunk/configure.in  2008-10-31 10:02:18.000000000 +0000
94 +++ mingw32-dbus-1.2.4.mingw/trunk/configure.in 2008-10-31 13:02:24.000000000 +0000
95 @@ -60,6 +60,8 @@
96  AC_ISC_POSIX
97  AC_HEADER_STDC
98  AC_C_INLINE
99 +
100 +AC_LIBTOOL_WIN32_DLL
101  AM_PROG_LIBTOOL
102  
103  AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
104 diff -ur mingw32-dbus-1.2.4.orig/trunk/dbus/dbus-sysdeps-win.c mingw32-dbus-1.2.4.mingw/trunk/dbus/dbus-sysdeps-win.c
105 --- mingw32-dbus-1.2.4.orig/trunk/dbus/dbus-sysdeps-win.c       2008-10-31 10:02:08.000000000 +0000
106 +++ mingw32-dbus-1.2.4.mingw/trunk/dbus/dbus-sysdeps-win.c      2008-10-31 14:23:29.000000000 +0000
107 @@ -31,7 +31,7 @@
108  #define STRSAFE_NO_DEPRECATE
109  
110  #ifndef DBUS_WINCE
111 -#define _WIN32_WINNT 0x0500
112 +#define _WIN32_WINNT 0x0501
113  #endif
114  
115  #include "dbus-internals.h"
116 @@ -46,6 +46,8 @@
117  #include "dbus-list.h"
118  #include "dbus-credentials.h"
119  
120 +#include <stdio.h>
121 +
122  #include <windows.h>
123  #include <ws2tcpip.h>
124  #include <fcntl.h>
125 @@ -55,12 +57,12 @@
126  #include <sys/types.h>
127  
128  // needed for w2k compatibility (getaddrinfo/freeaddrinfo/getnameinfo)
129 -#ifdef __GNUC__
130 -#define _inline
131 -#include "wspiapi.h"
132 -#else
133 -#include <wspiapi.h>
134 -#endif
135 +//#ifdef __GNUC__
136 +//#define _inline
137 +//#include "wspiapi.h"
138 +//#else
139 +//#include <wspiapi.h>
140 +//#endif
141  
142  #ifndef O_BINARY
143  #define O_BINARY 0
144 diff -ur mingw32-dbus-1.2.4.orig/trunk/dbus/Makefile.am mingw32-dbus-1.2.4.mingw/trunk/dbus/Makefile.am
145 --- mingw32-dbus-1.2.4.orig/trunk/dbus/Makefile.am      2008-10-31 10:02:08.000000000 +0000
146 +++ mingw32-dbus-1.2.4.mingw/trunk/dbus/Makefile.am     2008-10-31 14:25:42.000000000 +0000
147 @@ -73,8 +73,8 @@
148         dbus-server-protected.h                 \
149         dbus-server-socket.c                    \
150         dbus-server-socket.h                    \
151 -       dbus-server-unix.c                      \
152 -       dbus-server-unix.h                      \
153 +       dbus-server-win.c                       \
154 +       dbus-server-win.h                       \
155         dbus-sha.c                              \
156         dbus-sha.h                              \
157         dbus-signature.c                        \
158 @@ -87,10 +87,8 @@
159         dbus-transport-protected.h              \
160         dbus-transport-socket.c                 \
161         dbus-transport-socket.h                 \
162 -       dbus-transport-unix.c                   \
163 -       dbus-transport-unix.h                   \
164 -       dbus-uuidgen.c                          \
165 -       dbus-uuidgen.h                          \
166 +       dbus-transport-win.c                    \
167 +       dbus-transport-win.h                    \
168         dbus-watch.c                            \
169         dbus-watch.h
170  
171 @@ -120,11 +118,11 @@
172         dbus-string-private.h                   \
173         dbus-sysdeps.c                          \
174         dbus-sysdeps.h                          \
175 -       dbus-sysdeps-pthread.c                  \
176 -       dbus-sysdeps-unix.c                     \
177 -       dbus-sysdeps-unix.h                     \
178 -       dbus-userdb.c                           \
179 -       dbus-userdb.h
180 +       dbus-sysdeps-win-thread.c               \
181 +       dbus-sysdeps-win.c                      \
182 +       dbus-sysdeps-win.h                      \
183 +       dbus-sysdeps-util-win.c                 \
184 +       dbus-string-util.c
185  
186  ### source code that is generic utility functionality used
187  ### by the bus daemon or test apps, but is NOT included
188 @@ -144,14 +142,11 @@
189         dbus-message-util.c                     \
190         dbus-shell.c                            \
191         dbus-shell.h                            \
192 -       dbus-spawn.c                            \
193 +       dbus-spawn-win.c                        \
194         dbus-spawn.h                            \
195 -       dbus-string-util.c                      \
196         dbus-sysdeps-util.c                     \
197 -       dbus-sysdeps-util-unix.c                \
198         dbus-test.c                             \
199 -       dbus-test.h                             \
200 -       dbus-userdb-util.c
201 +       dbus-test.h
202  
203  libdbus_1_la_SOURCES=                          \
204         $(DBUS_LIB_SOURCES)                     \
205 @@ -170,7 +165,7 @@
206  ## and is only used for static linking within the dbus package.
207  noinst_LTLIBRARIES=libdbus-convenience.la
208  
209 -libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS)
210 +libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS) -lws2_32
211  ## don't export symbols that start with "_" (we use this 
212  ## convention for internal symbols)
213  libdbus_1_la_LDFLAGS= -export-symbols-regex "^[^_].*" -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@
214 diff -ur mingw32-dbus-1.2.4.orig/trunk/tools/Makefile.am mingw32-dbus-1.2.4.mingw/trunk/tools/Makefile.am
215 --- mingw32-dbus-1.2.4.orig/trunk/tools/Makefile.am     2008-10-31 10:02:09.000000000 +0000
216 +++ mingw32-dbus-1.2.4.mingw/trunk/tools/Makefile.am    2008-10-31 14:35:09.000000000 +0000
217 @@ -2,7 +2,8 @@
218  
219  INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\" -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\"
220  
221 -bin_PROGRAMS=dbus-send dbus-monitor dbus-launch dbus-cleanup-sockets dbus-uuidgen
222 +bin_PROGRAMS=dbus-send dbus-monitor
223 +#dbus-launch dbus-cleanup-sockets dbus-uuidgen
224  
225  dbus_send_SOURCES=                             \
226         dbus-print-message.c                    \