gtk2/*.exe
gtkmm24/gtkmm-2.14.1.tar.bz2
gtk-vnc/gtk-vnc-0.3.7.tar.gz
+gtk-vnc/gtk-vnc-0.3.8-20081030.tar.gz
iconv/libiconv-1.12.tar.gz
inkscape/inkscape-20081027.tar.gz
jasper/jasper-1.900.1.zip
+++ /dev/null
-diff -urN gtk-vnc-0.3.7.mingw/src/socketcompat.h gtk-vnc-0.3.7.socketcompat/src/socketcompat.h
---- gtk-vnc-0.3.7.mingw/src/socketcompat.h 2008-10-09 12:19:03.000000000 +0100
-+++ gtk-vnc-0.3.7.socketcompat/src/socketcompat.h 2008-10-09 12:38:04.000000000 +0100
-@@ -52,13 +52,6 @@
- return WSAGetLastError ();
- }
-
--/* Compatibility. */
--#define EWOULDBLOCK WSAEWOULDBLOCK
--#define ECONNREFUSED WSAECONNREFUSED
--#define EINPROGRESS WSAEINPROGRESS
--#define EHOSTUNREACH WSAEHOSTUNREACH
--#define EISCONN WSAEISCONN
--
- #endif /* HAVE_WINSOCK2_H */
-
- #endif /* __WINSOCKWRAPPER_H__ */
--- /dev/null
+diff -r 47135c91cd9c src/vncdisplay.c
+--- a/src/vncdisplay.c Thu Oct 09 11:23:09 2008 -0400
++++ b/src/vncdisplay.c Wed Oct 29 14:52:28 2008 +0000
+@@ -1892,7 +1903,7 @@
+ {
+ char file[PATH_MAX];
+ char sysdir[PATH_MAX];
+-#ifndef __MINGW32__
++#ifndef WIN32
+ char userdir[PATH_MAX];
+ struct passwd *pw;
+ char *dirs[] = { sysdir, userdir };
+@@ -1903,7 +1914,7 @@
+ strncpy(sysdir, SYSCONFDIR "/pki", PATH_MAX-1);
+ sysdir[PATH_MAX-1] = '\0';
+
+-#ifndef __MINGW32__
++#ifndef WIN32
+ if (!(pw = getpwuid(getuid())))
+ return TRUE;
+
--- /dev/null
+diff -r 47135c91cd9c src/gvnc.c
+--- a/src/gvnc.c Thu Oct 09 11:23:09 2008 -0400
++++ b/src/gvnc.c Wed Oct 29 14:51:17 2008 +0000
+@@ -380,7 +380,7 @@
+ ret = -1;
+ }
+ } else
+- ret = read(fd, gvnc->read_buffer, 4096);
++ ret = recv (fd, gvnc->read_buffer, 4096, 0);
+
+ if (ret == -1) {
+ switch (errno) {
+@@ -439,9 +439,9 @@
+ ret = -1;
+ }
+ } else
+- ret = write(fd,
++ ret = send (fd,
+ gvnc->write_buffer+offset,
+- gvnc->write_offset-offset);
++ gvnc->write_offset-offset, 0);
+ if (ret == -1) {
+ switch (errno) {
+ case EWOULDBLOCK:
--- /dev/null
+diff -r 47135c91cd9c src/gvnc.c
+--- a/src/gvnc.c Thu Oct 09 11:23:09 2008 -0400
++++ b/src/gvnc.c Wed Oct 29 14:51:26 2008 +0000
+@@ -2832,13 +2832,7 @@
+
+ static gboolean gvnc_set_nonblock(int fd)
+ {
+-#ifdef __MINGW32__
+- unsigned long flags = 1;
+- if (ioctlsocket(fd, FIONBIO, &flags) < 0) {
+- GVNC_DEBUG ("Failed to set nonblocking flag\n");
+- return FALSE;
+- }
+-#else
++#ifndef WIN32
+ int flags;
+ if ((flags = fcntl(fd, F_GETFL)) < 0) {
+ GVNC_DEBUG ("Failed to fcntl()\n");
+@@ -2849,7 +2843,20 @@
+ GVNC_DEBUG ("Failed to fcntl()\n");
+ return FALSE;
+ }
+-#endif
++
++#else /* WIN32 */
++ unsigned long flag = 1;
++
++ /* This is actually Gnulib's replacement rpl_ioctl function.
++ * We can't call ioctlsocket directly in any case.
++ */
++ if (ioctl (fd, FIONBIO, (void *) &flag) == -1) {
++ GVNC_DEBUG ("Failed to set nonblocking flag, winsock error = %d",
++ WSAGetLastError ());
++ return FALSE;
++ }
++#endif /* WIN32 */
++
+ return TRUE;
+ }
+
--- /dev/null
+diff -r 47135c91cd9c src/vncdisplay.c
+--- a/src/vncdisplay.c Thu Oct 09 11:23:09 2008 -0400
++++ b/src/vncdisplay.c Wed Oct 29 14:52:36 2008 +0000
+@@ -29,6 +29,13 @@
+ #ifdef HAVE_PWD_H
+ #include <pwd.h>
+ #endif
++
++#ifdef HAVE_WINSOCK2_H
++#include <winsock2.h>
++#endif
++
++static void winsock_startup (void);
++static void winsock_cleanup (void);
+
+ #define VNC_DISPLAY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((obj), VNC_TYPE_DISPLAY, VncDisplayPrivate))
+@@ -243,6 +250,7 @@
+
+ GtkWidget *vnc_display_new(void)
+ {
++ winsock_startup ();
+ return GTK_WIDGET(g_object_new(VNC_TYPE_DISPLAY, NULL));
+ }
+
+@@ -1255,6 +1263,9 @@
+ }
+
+ g_object_unref(G_OBJECT(data));
++
++ winsock_cleanup ();
++
+ return FALSE;
+ }
+
+@@ -2188,6 +2199,49 @@
+ return group;
+ }
+
++#ifdef WIN32
++
++/* On Windows, we must call WSAStartup before using any sockets and we
++ * must call WSACleanup afterwards. And we have to balance any calls
++ * to WSAStartup with a corresponding call to WSACleanup.
++ *
++ * Note that Wine lets you do socket calls anyway, but real Windows
++ * doesn't. (http://bugs.winehq.org/show_bug.cgi?id=11965)
++ */
++
++static void
++winsock_startup (void)
++{
++ WORD winsock_version, err;
++ WSADATA winsock_data;
++
++ /* http://msdn2.microsoft.com/en-us/library/ms742213.aspx */
++ winsock_version = MAKEWORD (2, 2);
++ err = WSAStartup (winsock_version, &winsock_data);
++ if (err != 0)
++ GVNC_DEBUG ("ignored error %d from WSAStartup", err);
++}
++
++static void
++winsock_cleanup (void)
++{
++ WSACleanup ();
++}
++
++#else /* !WIN32 */
++
++static void
++winsock_startup (void)
++{
++}
++
++static void
++winsock_cleanup (void)
++{
++}
++
++#endif /* !WIN32 */
++
+ /*
+ * Local variables:
+ * c-indent-level: 8
--- /dev/null
+diff -r 47135c91cd9c .hgignore
+--- a/.hgignore Thu Oct 09 11:23:09 2008 -0400
++++ b/.hgignore Wed Oct 29 17:35:32 2008 +0000
+@@ -42,3 +42,17 @@
+ src/.*\.orig
+ .*\.spec
+ .*\.tar\.gz$
++^gnulib/lib/\.deps/
++^gnulib/lib/\.libs/
++^gnulib/tests/\.deps/
++^gnulib/lib/.*\.o$
++^gnulib/lib/.*\.lo$
++^gnulib/lib/.*\.la$
++^gnulib/lib/alloca\.h$
++^gnulib/lib/arpa/inet\.h$
++^gnulib/lib/errno\.h$
++^gnulib/lib/netinet/in\.h$
++^gnulib/lib/stdio\.h$
++^gnulib/lib/stdlib\.h$
++^gnulib/lib/sys/socket\.h$
++^gnulib/lib/unistd\.h$
--- /dev/null
+diff -r 47135c91cd9c configure.ac
+--- a/configure.ac Thu Oct 09 11:23:09 2008 -0400
++++ b/configure.ac Wed Oct 29 17:35:22 2008 +0000
+@@ -116,11 +116,14 @@
+
+ save_CFLAGS="$CFLAGS"
+ save_LDFLAGS="$LDFLAGS"
++save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+-LDFLAGS="$LDFLAGS $GTK_LIBS"
++LDFLAGS="$LDFLAGS $GTK_LDFLAGS"
++LIBS="$LIBS $GTK_LIBS"
+ AC_CHECK_FUNC([gdk_cairo_create], [WITH_GTK_CAIRO=1], [WITH_GTK_CAIRO=0])
+ CFLAGS="$save_CFLAGS"
+ LDFLAGS="$save_LDFLAGS"
++LIBS="$save_LIBS"
+
+ AC_DEFINE_UNQUOTED(WITH_GTK_CAIRO, [$WITH_GTK_CAIRO], [Whether to use cairo for GTK rendering])
+
%define __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides}
+%define _default_patch_fuzz 2
+
Name: mingw32-gtk-vnc
-Version: 0.3.7
-Release: 3%{?dist}
+Version: 0.3.8
+Release: 0.1.20081030hg%{?dist}
Summary: MinGW Windows port of VNC client GTK widget
License: LGPLv2+
Group: Development/Libraries
URL: http://gtk-vnc.sf.net/
-Source0: http://downloads.sourceforge.net/gtk-vnc/gtk-vnc-%{version}.tar.gz
+Source0: gtk-vnc-0.3.8-20081030.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Patch1: gtk-vnc-0.3.7-abs-ungrab.patch
-
-# Dan's MinGW patch version 2, fixed so it can apply to the tarball.
-Patch100: gtk-vnc-0.3.7-mingw32-dan3.patch
-
-# Extra files required by Gnulib.
-Patch101: gtk-vnc-0.3.7-mingw32-gnulib-files.patch
+# Patches submitted upstream 2008-10-28/29/30:
+Patch100: gtk-vnc-00-win32.patch
+Patch101: gtk-vnc-01-recv.patch
+Patch102: gtk-vnc-02-ioctl.patch
+Patch103: gtk-vnc-03-wsastartup.patch
+#Patch104: gtk-vnc-hgignore.patch
+Patch105: gtk-vnc-ldflags-confusion.patch
BuildArch: noarch
%prep
-%setup -q -n gtk-vnc-%{version}
-
-%patch1 -p1
+%setup -q -n gtk-vnc-0.3.7
%patch100 -p1
%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+#%patch104 -p1
+%patch105 -p1
autoreconf
%changelog
+* Thu Oct 30 2008 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.1.20081030hg
+- Upgrade to current version in Mercurial (pre-release of 0.3.8).
+- More MinGW patches.
+
* Fri Oct 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-3
- Missing BRs discovered by mock.
- Added description section.