[Gpg4win-commits] r110 - in trunk: . doc/manual-de include packages patches patches/glib-2.8.4 patches/glib-2.9.2-wk1 src

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Thu Jan 5 18:03:11 CET 2006


Author: werner
Date: 2006-01-05 18:03:10 +0100 (Thu, 05 Jan 2006)
New Revision: 110

Added:
   trunk/patches/glib-2.9.2-wk1/
   trunk/patches/glib-2.9.2-wk1/01-giowin32.patch
Removed:
   trunk/patches/glib-2.8.4/01-giowin32.patch
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/NEWS
   trunk/TODO
   trunk/configure.ac
   trunk/doc/manual-de/Makefile.am
   trunk/doc/manual-de/einsteiger.tex
   trunk/include/config.nsi.in
   trunk/packages/packages.current
   trunk/src/Makefile.am
   trunk/src/inst-glib.nsi
   trunk/src/inst-gnupg.nsi
   trunk/src/inst-gpa.nsi
   trunk/src/inst-sections.nsi
   trunk/src/inst-sylpheed-claws.nsi
   trunk/src/uninst-glib.nsi
   trunk/src/uninst-gnupg.nsi
   trunk/src/uninst-gpa.nsi
   trunk/src/uninst-sylpheed-claws.nsi
   trunk/src/uninst-winpt.nsi
Log:
Preparing a new release


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/ChangeLog	2006-01-05 17:03:10 UTC (rev 110)
@@ -1,3 +1,20 @@
+2006-01-05  Werner Koch  <wk at g10code.com>
+
+	* src/inst-sylpheed-claws.nsi, src/uninst-sylpheed-claws.nsi,
+	* src/inst-gpa.nsi, src/uninst-gpa.nsi: Install language files.
+
+2006-01-04  Werner Koch  <wk at g10code.com>
+
+	* src/uninst-winpt.nsi: Deinstall the mo file.
+
+	* src/uninst-gpgee.nsi: Fix Source uninstall.
+	* src/uninst-glib.nsi, src/inst-glib.nsi, include/config.nsi.in:
+	Adjusted for source build.
+
+	* patches/glib-2.9.2-wk: New.
+	
+	* packages/packages.current: Switch to glib 2.9.2-wk1.
+
 2006-01-05  Marcus Brinkmann  <marcus at g10code.de>
 
 	* configure.ac: Add libiconv and gettext as dependencies.

Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/Makefile.am	2006-01-05 17:03:10 UTC (rev 110)
@@ -27,4 +27,5 @@
 	patches/gnupg-1.4.2/01-po-subdirs.patch \
 	patches/gpgme-1.1.0/01-gpgme-def.patch \
 	patches/gpgme-1.1.0/02-libtool-dll.patch \
-        patches/pthreads-w32-2-7-0-release/01-make.patch
+        patches/pthreads-w32-2-7-0-release/01-make.patch \
+        glib-2.9.2-wk1/01-giowin32.patch 

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/NEWS	2006-01-05 17:03:10 UTC (rev 110)
@@ -1,6 +1,10 @@
-Noteworthy changes in version 0.3.2
+Noteworthy changes in version 0.5.0
 ------------------------------------------------
 
+ * Fixed GPA problems.
+
+ * Sylpheed does now actually work.
+
  * Changed the packaging of GPGee.
 
 

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/TODO	2006-01-05 17:03:10 UTC (rev 110)
@@ -11,7 +11,9 @@
 ** Some versions of strip don't work.
    Werner's GNU strip 2.15.91 20040904 is fine but
    Marcus'  GNU strip 2.15.94 20050118 does not work.
+** Mo file installation macro
 
+
 * Component related issues:
 ** Check out which locale files to install and where. !!!
 ** Check which iconv to use !!

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/configure.ac	2006-01-05 17:03:10 UTC (rev 110)
@@ -24,7 +24,7 @@
 
 # Remember to change the version number immediately *after* a release.
 # Uncomment the my_iscvs macro for non-released code.
-m4_define(my_version, [0.3.2])
+m4_define(my_version, [0.5.0])
 m4_define(my_iscvs, yes)
 AC_INIT([gpg4win], my_version[]m4_ifdef([my_iscvs], [-cvs[]m4_translit(
                   [$Revision$],[Ra-z $:])]),

Modified: trunk/doc/manual-de/Makefile.am
===================================================================
--- trunk/doc/manual-de/Makefile.am	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/doc/manual-de/Makefile.am	2006-01-05 17:03:10 UTC (rev 110)
@@ -34,9 +34,22 @@
 
 CLEANFILES = $(eps_files_bb)
 
+pkgdata_DATA = einsteiger.pdf durchblicker.pdf
+
+manual.dvi :  signatures.eps
+
+
 all-local: $(eps_files_bb)
 
 
 %.eps.bb : %.eps.gz
 	$(ZCAT) `test -f '$<' || echo '$(srcdir)/'`$< \
           | grep '^%%BoundingBox' | head -1 > $@
+
+
+%.dvi : %.tex
+	latex  `test -f '$<' || echo '$(srcdir)/'`$< 
+	latex  `test -f '$<' || echo '$(srcdir)/'`$< 
+
+%.pdf : %.dvi
+	dvipdf  $< $@

Modified: trunk/doc/manual-de/einsteiger.tex
===================================================================
--- trunk/doc/manual-de/einsteiger.tex	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/doc/manual-de/einsteiger.tex	2006-01-05 17:03:10 UTC (rev 110)
@@ -282,6 +282,8 @@
 
 Wenn Sie fertig sind, schließen Sie die Readme-Datei.
 
+% FIXME:  Wir müssen erklären wie man Word als Standard Editor in
+% Outlook ausschaltet.
 
 \clearpage
 %% Original page 14
@@ -1175,3 +1177,5 @@
 \input{fdl.tex}
 
 \end{document}
+
+

Modified: trunk/include/config.nsi.in
===================================================================
--- trunk/include/config.nsi.in	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/include/config.nsi.in	2006-01-05 17:03:10 UTC (rev 110)
@@ -119,8 +119,8 @@
 @HAVE_PKG_GLIB@
 !define gpg4win_pkg_glib @gpg4win_pkg_glib@
 !define gpg4win_pkg_glib_version @gpg4win_pkg_glib_version@
-!define gpg4win_pkg_glib_dev @gpg4win_pkg_glib_dev@
-!define gpg4win_pkg_glib_src @gpg4win_pkg_glib_src@
+#!define gpg4win_pkg_glib_dev @gpg4win_pkg_glib_dev@
+#!define gpg4win_pkg_glib_src @gpg4win_pkg_glib_src@
 
 @HAVE_PKG_ATK@
 !define gpg4win_pkg_atk @gpg4win_pkg_atk@

Modified: trunk/packages/packages.current
===================================================================
--- trunk/packages/packages.current	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/packages/packages.current	2006-01-05 17:03:10 UTC (rev 110)
@@ -70,14 +70,25 @@
 # GTK+ stuff
 # http://www.gimp.org/~tml/gimp/win32/downloads.html
 
+#server ftp://ftp.gtk.org/pub/gtk/v2.9
+#
+#file glib-2.9.1.tar.bz2
+#chk  ab84a8afc60c726c105cba3f542f1425e058b1c4  
+server ftp://ftp.g10code.com/g10code/scratch
+
+file glib-2.9.2-wk1.tar.bz2
+chk  2ba7b74ec3337126d8a56aae1b7a77705a6166d5
+
+
 server ftp://ftp.gtk.org/pub/gtk/v2.6
 
-file win32/glib-2.6.6.zip
-chk  f1cf6ff8831217aac38ecd83c07d02416e571c5d
-file win32/glib-dev-2.6.6.zip
-chk  9445676e9394cd92b1e60e0550ed74d8917414d6
-file glib-2.6.6.tar.bz2
-chk  6bb8860bd29a83964ee66ad53ae3e4950aa2677f
+# We need to build our onw glib - see above.
+#file win32/glib-2.6.6.zip
+#chk  f1cf6ff8831217aac38ecd83c07d02416e571c5d
+#file win32/glib-dev-2.6.6.zip
+#chk  9445676e9394cd92b1e60e0550ed74d8917414d6
+#file glib-2.6.6.tar.bz2
+#chk  6bb8860bd29a83964ee66ad53ae3e4950aa2677f
 
 file win32/atk-1.9.0.zip
 chk  d6f99c56b890051c3b9bc77abe8c5a705d3bc5d4
@@ -112,13 +123,10 @@
 
 # WinPT
 
-#server http://wald.intevation.org/frs/download.php
-#file 65/winpt-0.11.2.tar.bz2
-#file 66/winpt-0.11.2.tar.bz2.sig
+server http://wald.intevation.org/frs/download.php
 
-server ftp://ftp.g10code.com/g10code/scratch
-file winpt-0.11.3-cvs.tar.bz2
-chk  78c3357c1a8c59209263e1c58e7dd84916799f21
+file 84/winpt-0.11.4.tar.bz2
+chk  f880bd2103b51a8e2f6e94f58a9524c523765ccb  winpt-0.11.4.tar.bz2
 
 
 # GPGee
@@ -161,12 +169,16 @@
 
 file libgpg-error-1.2-cvs.tar.bz2
 chk  ad964f78de99c7493dc47f49b0071f34d7d5e53d
-file gpgme-1.2.0-cvs.tar.bz2
-chk  3f8bc76e006577fa7c27173c1b695fba3436c6ba
-file gpa-0.7.1-cvs.tar.bz2
-chk  e9c682982daf3434b0892d7e69ad04da5bac4ae1
-file sylpheed-claws-1.9.99cvs5-wk1.tar.bz2
-chk  0706c278dab540981c5ab40872136aa04e3255cb
+
+file gpgme-1.1.1-cvs1150.tar.bz2
+chk  1116ebddb7ba0858e7c28fdefadaa62c096c3237
+
+file gpa-0.7.1-cvs728.tar.bz2
+chk  a61f292e61e2e0ececbc892fc4174542333269bd  
+
+file sylpheed-claws-1.9.100cvs124.tar.bz2
+chk  950c7795f7348a919910d8e6bb5222565a114328  
+
 file man_novice_de-0.0.0-cvs.tar.gz
 chk  33329175b9b69724870139f383edf6e3edea7c78
 file man_advanced_de-0.0.0-cvs.tar.gz

Deleted: trunk/patches/glib-2.8.4/01-giowin32.patch
===================================================================
--- trunk/patches/glib-2.8.4/01-giowin32.patch	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/patches/glib-2.8.4/01-giowin32.patch	2006-01-05 17:03:10 UTC (rev 110)
@@ -1,353 +0,0 @@
-#! /bin/sh
-patch -p1 -f $* < $0
-exit $?
-
-Implement write support for fd I/O channels in glib on W32 targets.
-
-(no changelog yet)
-
-diff -rup glib-2.8.4-old/glib/giowin32.c glib-2.8.4/glib/giowin32.c
---- glib-2.8.4-old/glib/giowin32.c	2005-11-08 09:35:50.000000000 +0100
-+++ glib-2.8.4/glib/giowin32.c	2006-01-03 14:51:04.000000000 +0100
-@@ -90,7 +90,8 @@ struct _GIOWin32Channel {
-   gushort revents;
- 
-   /* Following fields used by fd channels for input */
--  
-+  int direction;
-+
-   /* Data is kept in a circular buffer. To be able to distinguish between
-    * empty and full buffer, we cannot fill it completely, but have to
-    * leave a one character gap.
-@@ -376,6 +377,7 @@ create_events (GIOWin32Channel *channel)
-     }
- }
- 
-+
- static unsigned __stdcall
- read_thread (void *parameter)
- {
-@@ -392,6 +394,7 @@ read_thread (void *parameter)
- 	     (guint) channel->data_avail_event,
- 	     (guint) channel->space_avail_event);
-   
-+  channel->direction = 0;
-   channel->buffer = g_malloc (BUFFER_SIZE);
-   channel->rdp = channel->wrp = 0;
-   channel->running = TRUE;
-@@ -437,7 +440,12 @@ read_thread (void *parameter)
-       UNLOCK (channel->mutex);
- 
-       nbytes = read (channel->fd, buffer, nbytes);
--      
-+      //      {
-+      //	DWORD nb;
-+      //	ReadFile (_get_osfhandle (channel->fd), buffer, nbytes, &nb, NULL);
-+      //	nbytes = nb;
-+      //      }
-+
-       LOCK (channel->mutex);
- 
-       channel->revents = G_IO_IN;
-@@ -486,6 +494,124 @@ read_thread (void *parameter)
-   return 0;
- }
- 
-+
-+static unsigned __stdcall
-+write_thread (void *parameter)
-+{
-+  GIOWin32Channel *channel = parameter;
-+  guchar *buffer;
-+  guint nbytes;
-+
-+  g_io_channel_ref ((GIOChannel *)channel);
-+
-+  if (channel->debug)
-+    g_print ("write_thread %#x: start fd:%d, data_avail:%#x space_avail:%#x\n",
-+	     channel->thread_id,
-+	     channel->fd,
-+	     (guint) channel->data_avail_event,
-+	     (guint) channel->space_avail_event);
-+  
-+  channel->direction = 1;
-+  channel->buffer = g_malloc (BUFFER_SIZE);
-+  channel->rdp = channel->wrp = 0;
-+  channel->running = TRUE;
-+
-+  SetEvent (channel->space_avail_event);
-+  
-+  LOCK (channel->mutex);
-+  while (channel->running || channel->rdp != channel->wrp)
-+    {
-+      if (channel->debug)
-+	g_print ("write_thread %#x: rdp=%d, wrp=%d\n",
-+		 channel->thread_id, channel->rdp, channel->wrp);
-+      if (channel->wrp == channel->rdp)
-+	{
-+	  /* Buffer is empty.  */
-+	  if (channel->debug)
-+	    g_print ("write_thread %#x: resetting space_avail\n",
-+		     channel->thread_id);
-+	  ResetEvent (channel->space_avail_event);
-+	  if (channel->debug)
-+	    g_print ("write_thread %#x: waiting for data\n",
-+		     channel->thread_id);
-+	  channel->revents = G_IO_OUT;
-+	  SetEvent (channel->data_avail_event);
-+	  UNLOCK (channel->mutex);
-+	  WaitForSingleObject (channel->space_avail_event, INFINITE);
-+
-+	  LOCK (channel->mutex);
-+	  if (channel->rdp == channel->wrp)
-+	    break;
-+
-+	  if (channel->debug)
-+	    g_print ("write_thread %#x: rdp=%d, wrp=%d\n",
-+		     channel->thread_id, channel->rdp, channel->wrp);
-+	}
-+      
-+      buffer = channel->buffer + channel->rdp;
-+      if (channel->rdp < channel->wrp)
-+	nbytes = channel->wrp - channel->rdp;
-+      else
-+	nbytes = BUFFER_SIZE - channel->rdp;
-+
-+      if (channel->debug)
-+	g_print ("write_thread %#x: calling write() for %d bytes\n",
-+		 channel->thread_id, nbytes);
-+
-+      UNLOCK (channel->mutex);
-+      nbytes = write (channel->fd, buffer, nbytes);
-+      //      {
-+      //	DWORD nb;
-+      //	WriteFile (_get_osfhandle (channel->fd), buffer, nbytes, &nb, NULL);
-+      //	nbytes = nb;
-+      //      }
-+
-+      LOCK (channel->mutex);
-+
-+      if (channel->debug)
-+	g_print ("write_thread %#x: write(%i) returned %d, rdp=%d, wrp=%d\n",
-+		 channel->thread_id, channel->fd, nbytes, channel->rdp, channel->wrp);
-+
-+      channel->revents = 0;
-+      if (nbytes > 0)
-+	channel->revents |= G_IO_OUT;
-+      else if (nbytes <= 0)
-+	channel->revents |= G_IO_ERR;
-+
-+      channel->rdp = (channel->rdp + nbytes) % BUFFER_SIZE;
-+
-+      if (nbytes <= 0)
-+	break;
-+
-+      if (channel->debug)
-+	g_print ("write_thread: setting data_avail for thread %#x\n",
-+		 channel->thread_id);
-+      SetEvent (channel->data_avail_event);
-+    }
-+  
-+  channel->running = FALSE;
-+  if (channel->needs_close)
-+    {
-+      if (channel->debug)
-+	g_print ("write_thread %#x: channel fd %d needs closing\n",
-+		 channel->thread_id, channel->fd);
-+      close (channel->fd);
-+      channel->fd = -1;
-+    }
-+
-+  UNLOCK (channel->mutex);
-+  
-+  g_io_channel_unref ((GIOChannel *)channel);
-+  
-+  /* No need to call _endthreadex(), the actual thread starter routine
-+   * in MSVCRT (see crt/src/threadex.c:_threadstartex) calls
-+   * _endthreadex() for us.
-+   */
-+
-+  return 0;
-+}
-+
-+
- static void
- create_thread (GIOWin32Channel     *channel,
- 	       GIOCondition         condition,
-@@ -502,6 +628,8 @@ create_thread (GIOWin32Channel     *chan
-     g_warning (G_STRLOC ": Error closing thread handle: %s\n",
- 	       g_win32_error_message (GetLastError ()));
- 
-+  SetThreadPriority (thread_handle, THREAD_PRIORITY_HIGHEST);
-+
-   WaitForSingleObject (channel->space_avail_event, INFINITE);
- }
- 
-@@ -575,6 +703,79 @@ buffer_read (GIOWin32Channel *channel,
-   return (*bytes_read > 0) ? G_IO_STATUS_NORMAL : G_IO_STATUS_EOF;
- }
- 
-+static GIOStatus
-+buffer_write (GIOWin32Channel *channel,
-+	      const guchar    *dest,
-+	      gsize            count,
-+	      gsize           *bytes_written,
-+	      GError         **err)
-+{
-+  guint nbytes;
-+  guint left = count;
-+  
-+  LOCK (channel->mutex);
-+  if (channel->debug)
-+    g_print ("buffer_write: writing to thread %#x %d bytes, rdp=%d, wrp=%d\n",
-+	     channel->thread_id, count, channel->rdp, channel->wrp);
-+  
-+  if ((channel->wrp + 1) % BUFFER_SIZE == channel->rdp)
-+    {
-+      /* Buffer is full */
-+      if (channel->debug)
-+	g_print ("buffer_write: tid %#x: resetting data_avail\n",
-+		 channel->thread_id);
-+      ResetEvent (channel->data_avail_event);
-+      if (channel->debug)
-+	g_print ("buffer_write: tid %#x: waiting for space\n",
-+		 channel->thread_id);
-+      UNLOCK (channel->mutex);
-+      WaitForSingleObject (channel->data_avail_event, INFINITE);
-+      LOCK (channel->mutex);
-+      if (channel->debug)
-+	g_print ("buffer_write: tid %#x: rdp=%d, wrp=%d\n",
-+		 channel->thread_id, channel->rdp, channel->wrp);
-+    }
-+   
-+
-+  /* Always leave at least one byte unused gap to be able to
-+     distinguish between the full and empty condition.  */
-+  nbytes = MIN ((channel->rdp + BUFFER_SIZE - channel->wrp - 1) % BUFFER_SIZE,
-+		BUFFER_SIZE - channel->wrp);
-+
-+  UNLOCK (channel->mutex);
-+  nbytes = MIN (left, nbytes);
-+  if (channel->debug)
-+    g_print ("buffer_write: tid %#x: writing %d bytes\n",
-+	     channel->thread_id, nbytes);
-+  memcpy (channel->buffer + channel->wrp, dest, nbytes);
-+  dest += nbytes;
-+  left -= nbytes;
-+  LOCK (channel->mutex);
-+
-+  channel->wrp = (channel->wrp + nbytes) % BUFFER_SIZE;
-+  if (channel->debug)
-+    g_print ("buffer_write: tid %#x: rdp=%d, wrp=%d, setting space_avail\n",
-+	     channel->thread_id, channel->rdp, channel->wrp);
-+  SetEvent (channel->space_avail_event);
-+
-+  if ((channel->wrp + 1) % BUFFER_SIZE == channel->rdp)
-+    {
-+      /* Buffer is full */
-+      if (channel->debug)
-+	g_print ("buffer_write: tid %#x: resetting data_avail\n",
-+		 channel->thread_id);
-+      ResetEvent (channel->data_avail_event);
-+    }
-+
-+  UNLOCK (channel->mutex);
-+  
-+  /* We have no way to indicate any errors form the actual
-+     write() call in the writer thread. Should we have?  */
-+  *bytes_written = count - left;
-+  return (*bytes_written > 0) ? G_IO_STATUS_NORMAL : G_IO_STATUS_EOF;
-+}
-+
-+
- static gboolean
- g_io_win32_prepare (GSource *source,
- 		    gint    *timeout)
-@@ -601,13 +802,27 @@ g_io_win32_prepare (GSource *source,
- 		 condition_to_string (channel->revents));
-       
-       LOCK (channel->mutex);
--      if (channel->running && channel->wrp == channel->rdp)
-+      if (channel->running)
- 	{
--	  if (channel->debug)
--	    g_print ("g_io_win32_prepare: for thread %#x, setting channel->revents = 0\n",
--		     channel->thread_id);
--	  channel->revents = 0;
-+	  if (channel->direction == 0 && channel->wrp == channel->rdp)
-+	    {
-+	      if (channel->debug)
-+		g_print ("g_io_win32_prepare: for thread %#x, setting channel->revents = 0\n",
-+			 channel->thread_id);
-+	      channel->revents = 0;
-+	    }
- 	}
-+      else
-+	{
-+	  if (channel->direction == 1
-+	      && (channel->wrp + 1) % BUFFER_SIZE == channel->rdp)
-+	    {
-+	      if (channel->debug)
-+		g_print ("g_io_win32_prepare: for thread %#x, setting channel->revents = %i\n",
-+			 channel->thread_id, 0);
-+	      channel->revents = 0;
-+	    }
-+	}	  
-       UNLOCK (channel->mutex);
-       break;
- 
-@@ -965,6 +1180,12 @@ g_io_win32_fd_write (GIOChannel  *channe
-   GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel;
-   gint result;
-   
-+  if (win32_channel->thread_id)
-+    {
-+      return buffer_write (win32_channel, buf, count, bytes_written, err);
-+    }
-+
-+
-   result = write (win32_channel->fd, buf, count);
-   if (win32_channel->debug)
-     g_print ("g_io_win32_fd_write: fd=%d count=%d => %d\n",
-@@ -1061,7 +1282,10 @@ g_io_win32_fd_close (GIOChannel *channel
- 		 win32_channel->thread_id, win32_channel->fd);
-       win32_channel->running = FALSE;
-       win32_channel->needs_close = TRUE;
--      SetEvent (win32_channel->data_avail_event);
-+      if (win32_channel->direction == 0)
-+	SetEvent (win32_channel->data_avail_event);
-+      else
-+	SetEvent (win32_channel->space_avail_event);
-     }
-   else
-     {
-@@ -1105,7 +1329,12 @@ g_io_win32_fd_create_watch (GIOChannel  
- 
-   LOCK (win32_channel->mutex);
-   if (win32_channel->thread_id == 0)
--    create_thread (win32_channel, condition, read_thread);
-+    {
-+      if (condition & G_IO_IN)
-+	create_thread (win32_channel, condition, read_thread);
-+      else
-+	create_thread (win32_channel, condition, write_thread);
-+    }
- 
-   g_source_add_poll (source, &watch->pollfd);
-   UNLOCK (win32_channel->mutex);
-@@ -1715,8 +1944,13 @@ g_io_channel_win32_make_pollfd (GIOChann
- 
-       fd->fd = (gint) win32_channel->data_avail_event;
- 
--      if (win32_channel->thread_id == 0 && (condition & G_IO_IN))
--	create_thread (win32_channel, condition, read_thread);
-+      if (win32_channel->thread_id == 0)
-+	{
-+	  if (condition & G_IO_IN)
-+	    create_thread (win32_channel, condition, read_thread);
-+	  else
-+	    create_thread (win32_channel, condition, write_thread);
-+	}
-       break;
- 
-     case G_IO_WIN32_SOCKET:

Added: trunk/patches/glib-2.9.2-wk1/01-giowin32.patch
===================================================================
--- trunk/patches/glib-2.9.2-wk1/01-giowin32.patch	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/patches/glib-2.9.2-wk1/01-giowin32.patch	2006-01-05 17:03:10 UTC (rev 110)
@@ -0,0 +1,353 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+Implement write support for fd I/O channels in glib on W32 targets.
+
+(no changelog yet)
+
+diff -rup glib-2.8.4-old/glib/giowin32.c glib-2.8.4/glib/giowin32.c
+--- glib-2.8.4-old/glib/giowin32.c	2005-11-08 09:35:50.000000000 +0100
++++ glib-2.8.4/glib/giowin32.c	2006-01-03 14:51:04.000000000 +0100
+@@ -90,7 +90,8 @@ struct _GIOWin32Channel {
+   gushort revents;
+ 
+   /* Following fields used by fd channels for input */
+-  
++  int direction;
++
+   /* Data is kept in a circular buffer. To be able to distinguish between
+    * empty and full buffer, we cannot fill it completely, but have to
+    * leave a one character gap.
+@@ -376,6 +377,7 @@ create_events (GIOWin32Channel *channel)
+     }
+ }
+ 
++
+ static unsigned __stdcall
+ read_thread (void *parameter)
+ {
+@@ -392,6 +394,7 @@ read_thread (void *parameter)
+ 	     (guint) channel->data_avail_event,
+ 	     (guint) channel->space_avail_event);
+   
++  channel->direction = 0;
+   channel->buffer = g_malloc (BUFFER_SIZE);
+   channel->rdp = channel->wrp = 0;
+   channel->running = TRUE;
+@@ -437,7 +440,12 @@ read_thread (void *parameter)
+       UNLOCK (channel->mutex);
+ 
+       nbytes = read (channel->fd, buffer, nbytes);
+-      
++      //      {
++      //	DWORD nb;
++      //	ReadFile (_get_osfhandle (channel->fd), buffer, nbytes, &nb, NULL);
++      //	nbytes = nb;
++      //      }
++
+       LOCK (channel->mutex);
+ 
+       channel->revents = G_IO_IN;
+@@ -486,6 +494,124 @@ read_thread (void *parameter)
+   return 0;
+ }
+ 
++
++static unsigned __stdcall
++write_thread (void *parameter)
++{
++  GIOWin32Channel *channel = parameter;
++  guchar *buffer;
++  guint nbytes;
++
++  g_io_channel_ref ((GIOChannel *)channel);
++
++  if (channel->debug)
++    g_print ("write_thread %#x: start fd:%d, data_avail:%#x space_avail:%#x\n",
++	     channel->thread_id,
++	     channel->fd,
++	     (guint) channel->data_avail_event,
++	     (guint) channel->space_avail_event);
++  
++  channel->direction = 1;
++  channel->buffer = g_malloc (BUFFER_SIZE);
++  channel->rdp = channel->wrp = 0;
++  channel->running = TRUE;
++
++  SetEvent (channel->space_avail_event);
++  
++  LOCK (channel->mutex);
++  while (channel->running || channel->rdp != channel->wrp)
++    {
++      if (channel->debug)
++	g_print ("write_thread %#x: rdp=%d, wrp=%d\n",
++		 channel->thread_id, channel->rdp, channel->wrp);
++      if (channel->wrp == channel->rdp)
++	{
++	  /* Buffer is empty.  */
++	  if (channel->debug)
++	    g_print ("write_thread %#x: resetting space_avail\n",
++		     channel->thread_id);
++	  ResetEvent (channel->space_avail_event);
++	  if (channel->debug)
++	    g_print ("write_thread %#x: waiting for data\n",
++		     channel->thread_id);
++	  channel->revents = G_IO_OUT;
++	  SetEvent (channel->data_avail_event);
++	  UNLOCK (channel->mutex);
++	  WaitForSingleObject (channel->space_avail_event, INFINITE);
++
++	  LOCK (channel->mutex);
++	  if (channel->rdp == channel->wrp)
++	    break;
++
++	  if (channel->debug)
++	    g_print ("write_thread %#x: rdp=%d, wrp=%d\n",
++		     channel->thread_id, channel->rdp, channel->wrp);
++	}
++      
++      buffer = channel->buffer + channel->rdp;
++      if (channel->rdp < channel->wrp)
++	nbytes = channel->wrp - channel->rdp;
++      else
++	nbytes = BUFFER_SIZE - channel->rdp;
++
++      if (channel->debug)
++	g_print ("write_thread %#x: calling write() for %d bytes\n",
++		 channel->thread_id, nbytes);
++
++      UNLOCK (channel->mutex);
++      nbytes = write (channel->fd, buffer, nbytes);
++      //      {
++      //	DWORD nb;
++      //	WriteFile (_get_osfhandle (channel->fd), buffer, nbytes, &nb, NULL);
++      //	nbytes = nb;
++      //      }
++
++      LOCK (channel->mutex);
++
++      if (channel->debug)
++	g_print ("write_thread %#x: write(%i) returned %d, rdp=%d, wrp=%d\n",
++		 channel->thread_id, channel->fd, nbytes, channel->rdp, channel->wrp);
++
++      channel->revents = 0;
++      if (nbytes > 0)
++	channel->revents |= G_IO_OUT;
++      else if (nbytes <= 0)
++	channel->revents |= G_IO_ERR;
++
++      channel->rdp = (channel->rdp + nbytes) % BUFFER_SIZE;
++
++      if (nbytes <= 0)
++	break;
++
++      if (channel->debug)
++	g_print ("write_thread: setting data_avail for thread %#x\n",
++		 channel->thread_id);
++      SetEvent (channel->data_avail_event);
++    }
++  
++  channel->running = FALSE;
++  if (channel->needs_close)
++    {
++      if (channel->debug)
++	g_print ("write_thread %#x: channel fd %d needs closing\n",
++		 channel->thread_id, channel->fd);
++      close (channel->fd);
++      channel->fd = -1;
++    }
++
++  UNLOCK (channel->mutex);
++  
++  g_io_channel_unref ((GIOChannel *)channel);
++  
++  /* No need to call _endthreadex(), the actual thread starter routine
++   * in MSVCRT (see crt/src/threadex.c:_threadstartex) calls
++   * _endthreadex() for us.
++   */
++
++  return 0;
++}
++
++
+ static void
+ create_thread (GIOWin32Channel     *channel,
+ 	       GIOCondition         condition,
+@@ -502,6 +628,8 @@ create_thread (GIOWin32Channel     *chan
+     g_warning (G_STRLOC ": Error closing thread handle: %s\n",
+ 	       g_win32_error_message (GetLastError ()));
+ 
++  SetThreadPriority (thread_handle, THREAD_PRIORITY_HIGHEST);
++
+   WaitForSingleObject (channel->space_avail_event, INFINITE);
+ }
+ 
+@@ -575,6 +703,79 @@ buffer_read (GIOWin32Channel *channel,
+   return (*bytes_read > 0) ? G_IO_STATUS_NORMAL : G_IO_STATUS_EOF;
+ }
+ 
++static GIOStatus
++buffer_write (GIOWin32Channel *channel,
++	      const guchar    *dest,
++	      gsize            count,
++	      gsize           *bytes_written,
++	      GError         **err)
++{
++  guint nbytes;
++  guint left = count;
++  
++  LOCK (channel->mutex);
++  if (channel->debug)
++    g_print ("buffer_write: writing to thread %#x %d bytes, rdp=%d, wrp=%d\n",
++	     channel->thread_id, count, channel->rdp, channel->wrp);
++  
++  if ((channel->wrp + 1) % BUFFER_SIZE == channel->rdp)
++    {
++      /* Buffer is full */
++      if (channel->debug)
++	g_print ("buffer_write: tid %#x: resetting data_avail\n",
++		 channel->thread_id);
++      ResetEvent (channel->data_avail_event);
++      if (channel->debug)
++	g_print ("buffer_write: tid %#x: waiting for space\n",
++		 channel->thread_id);
++      UNLOCK (channel->mutex);
++      WaitForSingleObject (channel->data_avail_event, INFINITE);
++      LOCK (channel->mutex);
++      if (channel->debug)
++	g_print ("buffer_write: tid %#x: rdp=%d, wrp=%d\n",
++		 channel->thread_id, channel->rdp, channel->wrp);
++    }
++   
++
++  /* Always leave at least one byte unused gap to be able to
++     distinguish between the full and empty condition.  */
++  nbytes = MIN ((channel->rdp + BUFFER_SIZE - channel->wrp - 1) % BUFFER_SIZE,
++		BUFFER_SIZE - channel->wrp);
++
++  UNLOCK (channel->mutex);
++  nbytes = MIN (left, nbytes);
++  if (channel->debug)
++    g_print ("buffer_write: tid %#x: writing %d bytes\n",
++	     channel->thread_id, nbytes);
++  memcpy (channel->buffer + channel->wrp, dest, nbytes);
++  dest += nbytes;
++  left -= nbytes;
++  LOCK (channel->mutex);
++
++  channel->wrp = (channel->wrp + nbytes) % BUFFER_SIZE;
++  if (channel->debug)
++    g_print ("buffer_write: tid %#x: rdp=%d, wrp=%d, setting space_avail\n",
++	     channel->thread_id, channel->rdp, channel->wrp);
++  SetEvent (channel->space_avail_event);
++
++  if ((channel->wrp + 1) % BUFFER_SIZE == channel->rdp)
++    {
++      /* Buffer is full */
++      if (channel->debug)
++	g_print ("buffer_write: tid %#x: resetting data_avail\n",
++		 channel->thread_id);
++      ResetEvent (channel->data_avail_event);
++    }
++
++  UNLOCK (channel->mutex);
++  
++  /* We have no way to indicate any errors form the actual
++     write() call in the writer thread. Should we have?  */
++  *bytes_written = count - left;
++  return (*bytes_written > 0) ? G_IO_STATUS_NORMAL : G_IO_STATUS_EOF;
++}
++
++
+ static gboolean
+ g_io_win32_prepare (GSource *source,
+ 		    gint    *timeout)
+@@ -601,13 +802,27 @@ g_io_win32_prepare (GSource *source,
+ 		 condition_to_string (channel->revents));
+       
+       LOCK (channel->mutex);
+-      if (channel->running && channel->wrp == channel->rdp)
++      if (channel->running)
+ 	{
+-	  if (channel->debug)
+-	    g_print ("g_io_win32_prepare: for thread %#x, setting channel->revents = 0\n",
+-		     channel->thread_id);
+-	  channel->revents = 0;
++	  if (channel->direction == 0 && channel->wrp == channel->rdp)
++	    {
++	      if (channel->debug)
++		g_print ("g_io_win32_prepare: for thread %#x, setting channel->revents = 0\n",
++			 channel->thread_id);
++	      channel->revents = 0;
++	    }
+ 	}
++      else
++	{
++	  if (channel->direction == 1
++	      && (channel->wrp + 1) % BUFFER_SIZE == channel->rdp)
++	    {
++	      if (channel->debug)
++		g_print ("g_io_win32_prepare: for thread %#x, setting channel->revents = %i\n",
++			 channel->thread_id, 0);
++	      channel->revents = 0;
++	    }
++	}	  
+       UNLOCK (channel->mutex);
+       break;
+ 
+@@ -965,6 +1180,12 @@ g_io_win32_fd_write (GIOChannel  *channe
+   GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel;
+   gint result;
+   
++  if (win32_channel->thread_id)
++    {
++      return buffer_write (win32_channel, buf, count, bytes_written, err);
++    }
++
++
+   result = write (win32_channel->fd, buf, count);
+   if (win32_channel->debug)
+     g_print ("g_io_win32_fd_write: fd=%d count=%d => %d\n",
+@@ -1061,7 +1282,10 @@ g_io_win32_fd_close (GIOChannel *channel
+ 		 win32_channel->thread_id, win32_channel->fd);
+       win32_channel->running = FALSE;
+       win32_channel->needs_close = TRUE;
+-      SetEvent (win32_channel->data_avail_event);
++      if (win32_channel->direction == 0)
++	SetEvent (win32_channel->data_avail_event);
++      else
++	SetEvent (win32_channel->space_avail_event);
+     }
+   else
+     {
+@@ -1105,7 +1329,12 @@ g_io_win32_fd_create_watch (GIOChannel  
+ 
+   LOCK (win32_channel->mutex);
+   if (win32_channel->thread_id == 0)
+-    create_thread (win32_channel, condition, read_thread);
++    {
++      if (condition & G_IO_IN)
++	create_thread (win32_channel, condition, read_thread);
++      else
++	create_thread (win32_channel, condition, write_thread);
++    }
+ 
+   g_source_add_poll (source, &watch->pollfd);
+   UNLOCK (win32_channel->mutex);
+@@ -1715,8 +1944,13 @@ g_io_channel_win32_make_pollfd (GIOChann
+ 
+       fd->fd = (gint) win32_channel->data_avail_event;
+ 
+-      if (win32_channel->thread_id == 0 && (condition & G_IO_IN))
+-	create_thread (win32_channel, condition, read_thread);
++      if (win32_channel->thread_id == 0)
++	{
++	  if (condition & G_IO_IN)
++	    create_thread (win32_channel, condition, read_thread);
++	  else
++	    create_thread (win32_channel, condition, write_thread);
++	}
+       break;
+ 
+     case G_IO_WIN32_SOCKET:


Property changes on: trunk/patches/glib-2.9.2-wk1/01-giowin32.patch
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/Makefile.am	2006-01-05 17:03:10 UTC (rev 110)
@@ -35,7 +35,7 @@
 gpg4win_pkg_glib_configure = \
   --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
- 
+
 # We would like to use --with-libiconv-prefix and
 # --with-libintl-prefix, but these don't work with the cheesy
 # non-"libfoo.la" versions of iconv and gettext that we are using.

Modified: trunk/src/inst-glib.nsi
===================================================================
--- trunk/src/inst-glib.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/inst-glib.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -29,7 +29,7 @@
 !endif
   SetOutPath "$INSTDIR"
 !ifdef SOURCES
-  File ${gpg4win_pkg_glib_src}
+  File ${gpg4win_pkg_glib}
 !else
   File ${prefix}/bin/gspawn-win32-helper.exe
   File ${prefix}/bin/libglib-2.0-0.dll

Modified: trunk/src/inst-gnupg.nsi
===================================================================
--- trunk/src/inst-gnupg.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/inst-gnupg.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -40,7 +40,7 @@
   # gnupg/g10/keyserver.c::keyserver_spawn() for an explanation.
   File "${prefix}/libexec/gnupg/gpgkeys_finger.exe"
   File "${prefix}/libexec/gnupg/gpgkeys_hkp.exe"
-  File "${prefix}/libexec/gnupg/gpgkeys_http.exe"
+  File "${prefix}/libexec/gnupg/gpgkeys_curl.exe"
   File "${prefix}/libexec/gnupg/gpgkeys_ldap.exe"
 
   SetOutPath "$INSTDIR\share\gnupg"

Modified: trunk/src/inst-gpa.nsi
===================================================================
--- trunk/src/inst-gpa.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/inst-gpa.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -31,11 +31,15 @@
 !else
   File ${prefix}/bin/gpa.exe
 
+  SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
+  File ${prefix}/share/locale/de/LC_MESSAGES/gpa.mo
+
   SetOutPath "$INSTDIR\share\gpa"
   File ${prefix}/share/gpa/gpa_tips.en
   File ${prefix}/share/gpa/gpa_tips.de
   File ${prefix}/share/gpa/gpa_logo.ppm
   File ${prefix}/share/gpa/gpa.png
+
 !endif
 SectionEnd
 

Modified: trunk/src/inst-sections.nsi
===================================================================
--- trunk/src/inst-sections.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/inst-sections.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -155,6 +155,8 @@
 !include "uninst-libiconv.nsi"
 !endif
 !ifdef HAVE_PKG_LIBGPG_ERROR
+# Note that the uninstaller of libgpg-error is supposed to remove the shareed
+# directories.  We might want to move this to an extra section.
 !include "uninst-libgpg-error.nsi"
 !endif
 !ifdef HAVE_PKG_GNUPG

Modified: trunk/src/inst-sylpheed-claws.nsi
===================================================================
--- trunk/src/inst-sylpheed-claws.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/inst-sylpheed-claws.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -31,14 +31,15 @@
 !else
   File ${prefix}/bin/sylpheed-claws.exe
 
-  SetOutPath "$INSTDIR\share\sylpheed-claws"
-
   SetOutPath "$INSTDIR\lib\sylpheed-claws\plugins"
   File ${prefix}/lib/sylpheed-claws/plugins/pgpcore.dll
   File ${prefix}/lib/sylpheed-claws/plugins/pgpinline.dll
   File ${prefix}/lib/sylpheed-claws/plugins/pgpinline.deps
   File ${prefix}/lib/sylpheed-claws/plugins/pgpmime.dll
   File ${prefix}/lib/sylpheed-claws/plugins/pgpmime.deps
+
+  SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
+  File ${prefix}/share/locale/de/LC_MESSAGES/sylpheed-claws.mo
 !endif
 SectionEnd
 

Modified: trunk/src/uninst-glib.nsi
===================================================================
--- trunk/src/uninst-glib.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/uninst-glib.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -26,7 +26,7 @@
 ; Uninstaller section.
 Section "-un.glib"
 !ifdef SOURCES
-  Push "${gpg4win_pkg_glib_src}"
+  Push "${gpg4win_pkg_glib}"
   Call un.SourceDelete
 !else
   Delete "$INSTDIR\gspawn-win32-helper.exe"

Modified: trunk/src/uninst-gnupg.nsi
===================================================================
--- trunk/src/uninst-gnupg.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/uninst-gnupg.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -36,7 +36,7 @@
 
   Delete "$INSTDIR\gpgkeys_finger.exe"
   Delete "$INSTDIR\gpgkeys_hkp.exe"
-  Delete "$INSTDIR\gpgkeys_http.exe"
+  Delete "$INSTDIR\gpgkeys_curl.exe"
   Delete "$INSTDIR\gpgkeys_ldap.exe"
 
   Delete "$INSTDIR\share\gnupg\options.skel"

Modified: trunk/src/uninst-gpa.nsi
===================================================================
--- trunk/src/uninst-gpa.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/uninst-gpa.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -32,6 +32,8 @@
 !else
   Delete "$INSTDIR\gpa.exe"
 
+  Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gpa.mo"
+
   Delete "$INSTDIR\share\gpa\gpa_tips.en"
   Delete "$INSTDIR\share\gpa\gpa_tips.de"
   Delete "$INSTDIR\share\gpa\gpa_logo.ppm"

Modified: trunk/src/uninst-sylpheed-claws.nsi
===================================================================
--- trunk/src/uninst-sylpheed-claws.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/uninst-sylpheed-claws.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -41,6 +41,8 @@
   RMDir "$INSTDIR\lib\sylpheed-claws"
   RMDir "$INSTDIR\lib"
 
+  Delete "$INSTDIR\share\locale\de\LC_MESSAGES\sylpheed-claws.mo"
+
   RMDir "$INSTDIR\share\sylpheed-claws"
   RMDir "$INSTDIR\share"
   RMDir "$INSTDIR"

Modified: trunk/src/uninst-winpt.nsi
===================================================================
--- trunk/src/uninst-winpt.nsi	2006-01-05 03:41:45 UTC (rev 109)
+++ trunk/src/uninst-winpt.nsi	2006-01-05 17:03:10 UTC (rev 110)
@@ -33,6 +33,9 @@
   Delete "$INSTDIR\WinPT.exe"
   Delete "$INSTDIR\PTD.dll"
 
+  Delete "$INSTDIR\share\locale\de\LC_MESSAGES\winpt.mo"
+  RMDir  "$INSTDIR\share\locale\de\LC_MESSAGES"
+
   Delete "$INSTDIR\share\winpt\keyserver.conf"
   Delete "$INSTDIR\share\winpt\NEWS-0.10.txt"
   Delete "$INSTDIR\share\winpt\README-0.10.txt"



More information about the Gpg4win-commits mailing list