Merge a few bug fixes from Debian.

This commit is contained in:
ajacoutot 2015-01-16 11:28:42 +00:00
parent 8f56eeec1e
commit 0c023d5eda
4 changed files with 83 additions and 7 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.28 2014/04/21 12:33:06 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.29 2015/01/16 11:28:42 ajacoutot Exp $
COMMENT= GTK+2 frontend to CUPS
DISTNAME= gtklp-1.3.1
EXTRACT_SUFX= .src.tar.gz
REVISION= 0
REVISION= 1
CATEGORIES= print sysutils x11
@ -17,12 +17,12 @@ PERMIT_PACKAGE_CDROM= Yes
WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
WANTLIB += Xrandr Xrender atk-1.0 avahi-client avahi-common c
WANTLIB += cairo crypto cups dbus-1 expat ffi fontconfig freetype
WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0
WANTLIB += cairo cups dbus-1 expat ffi fontconfig freetype gdk-x11-2.0
WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 gmp gnutls
WANTLIB += gobject-2.0 graphite2 gthread-2.0 gtk-x11-2.0 harfbuzz
WANTLIB += m pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre pixman-1
WANTLIB += png pthread pthread-stubs ssl xcb xcb-render xcb-shm
WANTLIB += z
WANTLIB += hogweed m nettle p11-kit pango-1.0 pangocairo-1.0 pangoft2-1.0
WANTLIB += pcre pixman-1 png pthread pthread-stubs tasn1 xcb xcb-render
WANTLIB += xcb-shm z
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gtklp/}

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-gtklp_gtklp_c,v 1.1 2015/01/16 11:28:42 ajacoutot Exp $
http://bugs.debian.org/644113
--- gtklp/gtklp.c.orig Wed Feb 26 20:31:06 2014
+++ gtklp/gtklp.c Fri Jan 16 12:03:18 2015
@@ -302,7 +302,7 @@ int main(int argc,char *argv[])
case '?':
if(calledGtkLP)
{
- g_print(str2str(_("Usage: gtklp [-P|-d printer] [-c configdir] [-S server] [-U user] [-p port] [-l] [-D] [-V] [-b] [-i] [-# n] [-C] [-H] [-E] [-J jobname] [-q priority] [-o option=value ...] [file(s)]\n")));
+ g_print("%s", str2str(_("Usage: gtklp [-P|-d printer] [-c configdir] [-S server] [-U user] [-p port] [-l] [-D] [-V] [-b] [-i] [-# n] [-C] [-H] [-E] [-J jobname] [-q priority] [-o option=value ...] [file(s)]\n")));
}
return(0);
break;

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-include_defaults_h,v 1.6 2015/01/16 11:28:42 ajacoutot Exp $
http://bugs.debian.org/422266
--- include/defaults.h.orig Wed Feb 26 20:31:06 2014
+++ include/defaults.h Fri Jan 16 12:01:50 2015
@@ -72,7 +72,7 @@
#define GTKLPRC_GLOBAL "gtklprc"
/* Constants */
-#define DEF_PRN_LEN 50
+#define DEF_PRN_LEN 256
#define MAX_BANNER 20
#ifdef PATH_MAX
# define MAXPATH PATH_MAX

View File

@ -0,0 +1,46 @@
$OpenBSD: patch-libgtklp_libgtklp_c,v 1.3 2015/01/16 11:28:42 ajacoutot Exp $
http://bugs.debian.org/644113
--- libgtklp/libgtklp.c.orig Wed Feb 26 20:31:06 2014
+++ libgtklp/libgtklp.c Fri Jan 16 12:03:18 2015
@@ -554,7 +554,7 @@ void passwin_response_ok(GtkEditable *editable, gpoint
const char *getPass (const char *prompt)
{
- GtkWidget *vbox, *hbox, *hbox1, *vbox1, *vbox2, *labell, *labelp, *yes, *no;
+ GtkWidget *vbox, *hbox, *vbox1, *vbox2, *labell, *labelp;
gint gi1;
#if GTK_MAJOR_VERSION == 1
GtkWidget *sep,*passwin;
@@ -780,9 +780,6 @@ void exitOnError(char *gerror1, char *gerror2, int exi
GtkWidget *exitErrorDialog;
GtkWidget *hbox,*label,*pixmapwid;
char tmplabel[MAXLINE+1];
- GtkStyle *style;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
#if GTK_MAJOR_VERSION == 1
GtkWidget *button,*vbox,*sep,*bbox;
#endif
@@ -826,9 +823,9 @@ void exitOnError(char *gerror1, char *gerror2, int exi
gtk_widget_show(pixmapwid);
if(strlen(gerror2) == 0)
- snprintf(tmplabel,(size_t)MAXLINE,gerror1);
+ snprintf(tmplabel,(size_t)MAXLINE,"%s",gerror1);
else
- snprintf(tmplabel,(size_t)MAXLINE,gerror1,gerror2);
+ snprintf(tmplabel,(size_t)MAXLINE,"%s\n%s",gerror1,gerror2);
label=gtk_label_new(tmplabel);
gtk_box_pack_end(GTK_BOX(hbox),label,FALSE, FALSE,FRAME_SPACING_V);
gtk_widget_show(label);
@@ -856,7 +853,7 @@ void exitOnError(char *gerror1, char *gerror2, int exi
#endif
} else {
if(strlen(gerror2) == 0)
- g_warning(gerror1);
+ g_warning("%s",gerror1);
else
g_warning(gerror1,gerror2);
}