Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242886 - x11-misc/dmenu-3.9 additional patches (multiline, utf-8)
Summary: x11-misc/dmenu-3.9 additional patches (multiline, utf-8)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Cédric Krier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-20 14:01 UTC by Jan Pobrislo
Modified: 2009-09-10 00:32 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pobrislo 2008-10-20 14:01:06 UTC
Added use flags to dmenu-3.9 ebuild for fresch's multiline patch:
http://bbs.archlinux.org/viewtopic.php?id=54086
and for proper utf-8 support:
http://www.cgarbs.de/cgi-bin/gitweb.cgi/dwm-mitch.git?a=blob;f=02_patch_dmenu_mitch_utf8widechars.diff

Reproducible: Always

Steps to Reproduce:
Comment 1 Jan Pobrislo 2008-10-20 14:07:29 UTC
bugzilla is somehow refusing to attach the patch (internal error), so I post it inline:

--- /usr/portage/x11-misc/dmenu/dmenu-3.9.ebuild	2008-09-11 11:31:16.000000000 +0200
+++ dmenu-3.9.ebuild	2008-10-20 15:59:17.000000000 +0200
@@ -2,25 +2,32 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/x11-misc/dmenu/dmenu-3.9.ebuild,v 1.1 2008/09/11 09:31:16 cedk Exp $
 
-inherit toolchain-funcs savedconfig
+inherit eutils toolchain-funcs savedconfig
 
 DESCRIPTION="a generic, highly customizable, and efficient menu for the X Window System"
 HOMEPAGE="http://www.suckless.org/programs/dmenu.html"
-SRC_URI="http://code.suckless.org/dl/tools/${P}.tar.gz"
+SRC_URI="http://code.suckless.org/dl/tools/${P}.tar.gz
+	multiline? ( http://schiewek.net/fresch/dmenu-${PV}-fresch.diff )"
 
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
-IUSE="xinerama"
+IUSE="multiline unicode xinerama"
 
 DEPEND="x11-libs/libX11
 	xinerama? ( x11-libs/libXinerama )"
 RDEPEND=${DEPEND}
 
 src_unpack() {
-	unpack ${A}
+	unpack ${P}.tar.gz
 	cd "${S}"
 
+	use multiline &&\
+		epatch "${DISTDIR}/dmenu-3.9-fresch.diff"
+
+	use unicode &&\
+		epatch "${FILESDIR}/02_patch_dmenu_mitch_utf8widechars.diff"
+
 	sed -i \
 		-e "s/CFLAGS = -std=c99 -pedantic -Wall -Os/CFLAGS += -std=c99 -pedantic -Wall -g/" \
 		-e "s/LDFLAGS = -s/LDFLAGS += -g/" \
Comment 2 Jan Pobrislo 2008-10-20 14:09:48 UTC
02_patch_dmenu_mitch_utf8widechars.diff

diff -Narup 01_dmenu-3.9_fixemptylines/dmenu.c 02_dmenu-3.9_utf8widechars/dmenu.c
--- 01_dmenu-3.9_fixemptylines/dmenu.c	2008-09-20 23:26:42.000000000 +0200
+++ 02_dmenu-3.9_utf8widechars/dmenu.c	2008-09-20 23:26:42.000000000 +0200
@@ -279,7 +279,7 @@ drawtext(const char *text, unsigned long
 		for(i = len; i && i > len - 3; buf[--i] = '.');
 	XSetForeground(dpy, dc.gc, col[ColFG]);
 	if(dc.font.set)
-		XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
+		Xutf8DrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
 	else
 		XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
 }
@@ -727,7 +727,7 @@ textnw(const char *text, unsigned int le
 	XRectangle r;
 
 	if(dc.font.set) {
-		XmbTextExtents(dc.font.set, text, len, NULL, &r);
+		Xutf8TextExtents(dc.font.set, text, len, NULL, &r);
 		return r.width;
 	}
 	return XTextWidth(dc.font.xfont, text, len);
Comment 3 Wormo (RETIRED) gentoo-dev 2008-10-20 18:37:47 UTC
Sorry about the bugzilla problems, sometimes we get some spammer attacking with bug forms and our infrastructure devs have to stop them.

Thanks for submitting your patches, assigning them to ebuild maintainers
Comment 4 Cédric Krier gentoo-dev 2009-08-01 15:08:33 UTC
I try to follow the original idea of the suckless and keep it simple.
Comment 5 avx 2009-09-07 19:04:26 UTC
> I try to follow the original idea of the suckless and keep it simple.

Nothing against this in principle, but why not making this patches available via some USE-Flag? Patching dmenu is quite easy, but I find it annoying needing yet another entry in my personal overlay just to make some simple modifications.
Comment 6 Jan Pobrislo 2009-09-08 10:28:27 UTC
> I try to follow the original idea of the suckless and keep it simple.

 I really appreciate that, but we have different philosophy here in Gentoo:
...The goal of Gentoo is to design tools and systems that allow a user to do that work as pleasantly and efficiently as possible, as *they* see fit....This is only possible when the tool is designed to reflect and transmit the will of the user, and leave the possibilities open as to the final form of the raw materials (the source code.)...

> Patching dmenu is quite easy, but I find it annoying needing
> yet another entry in my personal overlay just to make some simple
> modifications.

Do you have these patches for current version of dmenu? The utf8 patch is obviously simple replacement, but the multiline might be more complex.
Comment 7 avx 2009-09-10 00:32:50 UTC
> Do you have these patches for current version of dmenu?

Nope, unfortunately not, that's why I'm still using 3.9 as of date, since vertical/multiline is quite essential for my usage.

I'll try to have a look at it, but can't promise anything, since I'm currently very limited concerning spare-time :/