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:
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/" \
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);
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
I try to follow the original idea of the suckless and keep it simple.
> 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.
> 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.
> 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 :/