[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Please allow dwm-tools 2-2



Hi,

dmenu suffers the same utf problems as dwm did, please allow the upload
of dwm-tools 2-2 to testing, debdiff is attached.

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/
diff -u dwm-tools-2/debian/control dwm-tools-2/debian/control
--- dwm-tools-2/debian/control
+++ dwm-tools-2/debian/control
@@ -2,7 +2,7 @@
 Section: x11
 Priority: optional
 Maintainer: Daniel Baumann <daniel@debian.org>
-Build-Depends: debhelper (>= 4), libx11-dev
+Build-Depends: debhelper (>= 4), dpatch, libx11-dev
 Standards-Version: 3.7.2
 
 Package: dwm-tools
diff -u dwm-tools-2/debian/rules dwm-tools-2/debian/rules
--- dwm-tools-2/debian/rules
+++ dwm-tools-2/debian/rules
@@ -3,6 +3,8 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/dpatch/dpatch.make
+
 CFLAGS = -Wall -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -19,7 +21,7 @@
 	done
 
 build: upstream build-stamp
-build-stamp:
+build-stamp: patch-stamp
 	dh_testdir
 
 	# Building package
@@ -30,7 +32,7 @@
 
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp
diff -u dwm-tools-2/debian/changelog dwm-tools-2/debian/changelog
--- dwm-tools-2/debian/changelog
+++ dwm-tools-2/debian/changelog
@@ -1,3 +1,10 @@
+dwm-tools (2-2) testing; urgency=medium
+
+  * Applied 98-utf.patch from dmenu 1.6 to fix utf support (Closes: #402816).
+  * Applied 99-utf.patch from dmenu 1.7 to fix further utf issues.
+
+ -- Daniel Baumann <daniel@debian.org>  Sat, 16 Dec 2006 15:52:00 +0100
+
 dwm-tools (2-1) unstable; urgency=medium
 
   * slock:
only in patch2:
unchanged:
--- dwm-tools-2.orig/debian/patches/00list
+++ dwm-tools-2/debian/patches/00list
@@ -0,0 +1,2 @@
+98-dmenu-utf
+99-dmenu-utf
only in patch2:
unchanged:
--- dwm-tools-2.orig/debian/patches/99-dmenu-utf.dpatch
+++ dwm-tools-2/debian/patches/99-dmenu-utf.dpatch
@@ -0,0 +1,24 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 99-dmenu-utf.dpatch by Anselm R. Garbe <garbeam@gmail.com>
+##
+## DP: Fixes utf support (taken from dmenu 1.7).
+
+@DPATCH@
+
+diff -Naur dwm-tools-2.orig/dmenu-1.4/draw.c dwm-tools-2/dmenu-1.4/draw.c
+--- dwm-tools-2.orig/dmenu-1.4/draw.c	2006-12-16 15:03:41.000000000 +0000
++++ dwm-tools-2/dmenu-1.4/draw.c	2006-12-16 15:04:05.000000000 +0000
+@@ -107,11 +107,8 @@
+ 		if(dc.font.xfont)
+ 			XFreeFont(dpy, dc.font.xfont);
+ 		dc.font.xfont = NULL;
+-		dc.font.xfont = XLoadQueryFont(dpy, fontstr);
+-		if (!dc.font.xfont)
+-			dc.font.xfont = XLoadQueryFont(dpy, "fixed");
+-		if (!dc.font.xfont)
+-			eprint("error, cannot init 'fixed' font\n");
++		if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)))
++			eprint("error, cannot load font: '%s'\n", fontstr);
+ 		dc.font.ascent = dc.font.xfont->ascent;
+ 		dc.font.descent = dc.font.xfont->descent;
+ 	}
only in patch2:
unchanged:
--- dwm-tools-2.orig/debian/patches/98-dmenu-utf.dpatch
+++ dwm-tools-2/debian/patches/98-dmenu-utf.dpatch
@@ -0,0 +1,70 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 98-dmenu-utf.dpatch by Anselm R. Garbe <garbeam@gmail.com>
+##
+## DP: Fixes utf support (taken from dmenu 1.6).
+
+@DPATCH@
+
+diff -Naur dwm-tools-2.orig/dmenu-1.4/dmenu.h dwm-tools-2/dmenu-1.4/dmenu.h
+--- dwm-tools-2.orig/dmenu-1.4/dmenu.h	2006-10-26 10:14:04.000000000 +0000
++++ dwm-tools-2/dmenu-1.4/dmenu.h	2006-12-16 15:03:41.000000000 +0000
+@@ -3,9 +3,8 @@
+  */
+ 
+ #include <X11/Xlib.h>
+-#include <X11/Xlocale.h>
+ 
+-#define FONT			"fixed"
++#define FONT			"-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
+ #define NORMBGCOLOR		"#333366"
+ #define NORMFGCOLOR		"#cccccc"
+ #define SELBGCOLOR		"#666699"
+diff -Naur dwm-tools-2.orig/dmenu-1.4/draw.c dwm-tools-2/dmenu-1.4/draw.c
+--- dwm-tools-2.orig/dmenu-1.4/draw.c	2006-10-26 10:14:04.000000000 +0000
++++ dwm-tools-2/dmenu-1.4/draw.c	2006-12-16 15:03:41.000000000 +0000
+@@ -4,7 +4,6 @@
+ #include "dmenu.h"
+ #include <stdio.h>
+ #include <string.h>
+-#include <X11/Xlocale.h>
+ 
+ /* static */
+ 
+@@ -84,17 +83,11 @@
+ 	int i, n;
+ 
+ 	missing = NULL;
+-	setlocale(LC_ALL, "");
+ 	if(dc.font.set)
+ 		XFreeFontSet(dpy, dc.font.set);
+ 	dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def);
+-	if(missing) {
++	if(missing)
+ 		XFreeStringList(missing);
+-		if(dc.font.set) {
+-			XFreeFontSet(dpy, dc.font.set);
+-			dc.font.set = NULL;
+-		}
+-	}
+ 	if(dc.font.set) {
+ 		XFontSetExtents *font_extents;
+ 		XFontStruct **xfonts;
+diff -Naur dwm-tools-2.orig/dmenu-1.4/main.c dwm-tools-2/dmenu-1.4/main.c
+--- dwm-tools-2.orig/dmenu-1.4/main.c	2006-10-26 10:14:04.000000000 +0000
++++ dwm-tools-2/dmenu-1.4/main.c	2006-12-16 15:03:41.000000000 +0000
+@@ -5,6 +5,7 @@
+ #include "dmenu.h"
+ 
+ #include <ctype.h>
++#include <locale.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -309,6 +310,7 @@
+ 		}
+ 		else
+ 			eprint("usage: dmenu [-font <name>] [-{norm,sel}{bg,fg} <color>] [-t <seconds>] [-v]\n", stdout);
++	setlocale(LC_CTYPE, "");
+ 	dpy = XOpenDisplay(0);
+ 	if(!dpy)
+ 		eprint("dmenu: cannot open display\n");

Reply to: