Package: libgnomeprint2.2-0
Version: 2.8.2-1
Severity: important

If you select Generic Postscript, with Location as 'Custom' printing
does not work.  This is
http://bugzilla.gnome.org/show_bug.cgi?id=167325.

While this was fixed in libgnomeprint 2.10.1, 2.8.2 in sarge is still
affected.  For people who have multiple printers, but do not use cups,
this is a major problem (we use lprng here).

Attached is the patch from CVS that fixes this.  Just drop it into
debian/patches, recompile and custom printing will work again.

Jamie

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.13.4
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages libgnomeprint2.2-0 depends on:
ii  libart-2.0-2           2.3.17-1          Library of functions for 2D graphi
ii  libc6                  2.3.2.ds1-22      GNU C Library: Shared libraries an
ii  libcupsys2-gnutls10    1.1.23-10         Common UNIX Printing System(tm) - 
ii  libfontconfig1         2.3.1-2           generic font configuration library
ii  libfreetype6           2.1.7-2.4         FreeType 2 font engine, shared lib
ii  libglib2.0-0           2.6.4-1           The GLib library of C routines
ii  libgnomecups1.0-1      0.1.14-1          GNOME library for CUPS interaction
ii  libgnomeprint2.2-data  2.8.2-1           The GNOME 2.2 print architecture -
ii  libpango1.0-0          1.8.1-1           Layout and rendering of internatio
ii  libpopt0               1.7-5             lib for parsing cmdline parameters
ii  libxml2                2.6.16-7          GNOME XML library
ii  zlib1g                 1:1.2.2-4.sarge.2 compression library - runtime

-- no debconf information
diff -Naur libgnomeprint-2.8.2.orig/libgnomeprint/transports/gp-transport-custom.c libgnomeprint-2.8.2/libgnomeprint/transports/gp-transport-custom.c
--- libgnomeprint-2.8.2.orig/libgnomeprint/transports/gp-transport-custom.c	2004-12-03 13:25:09.000000000 -0500
+++ libgnomeprint-2.8.2/libgnomeprint/transports/gp-transport-custom.c	2005-10-17 19:04:41.000000000 -0400
@@ -34,6 +34,20 @@
 #include <libgnomeprint/gnome-print.h>
 #include "gp-transport-custom.h"
 
+#if !defined(HAVE_POPEN)
+#ifdef G_OS_WIN32
+#include <stdio.h>
+#define popen(f,m) _popen(f,m)
+#endif
+#endif
+
+#if !defined(HAVE_PCLOSE)
+#ifdef G_OS_WIN32
+#include <stdio.h>
+#define pclose(f) _pclose(f)
+#endif
+#endif
+
 static void gp_transport_custom_class_init (GPTransportCustomClass *klass);
 static void gp_transport_custom_init (GPTransportCustom *tcustom);
 
@@ -146,7 +160,13 @@
 		command = g_strdup ("lpr");
 	}
 
-	tcustom->pipe = popen (command, "wb");
+	tcustom->pipe = popen (command,   	 
+#ifdef G_OS_WIN32
+		"wb"
+#else
+		"w"
+#endif
+	);
 
 	if (tcustom->pipe == NULL) {
 		g_warning ("Opening '%s' for output failed", command);
diff -Naur libgnomeprint-2.8.2.orig/libgnomeprint/transports/gp-transport-lpr.c libgnomeprint-2.8.2/libgnomeprint/transports/gp-transport-lpr.c
--- libgnomeprint-2.8.2.orig/libgnomeprint/transports/gp-transport-lpr.c	2004-12-03 13:25:09.000000000 -0500
+++ libgnomeprint-2.8.2/libgnomeprint/transports/gp-transport-lpr.c	2005-10-17 19:01:29.000000000 -0400
@@ -41,7 +41,7 @@
 #endif
 #endif
 
-#if !defined(HAVE_CLOSE)
+#if !defined(HAVE_PLOSE)
 #ifdef G_OS_WIN32
 #include <stdio.h>
 #define pclose(f) _pclose(f)

Reply via email to