Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322125 - x11-misc/dmenu-4.2.1 version bump (+ patches?)
Summary: x11-misc/dmenu-4.2.1 version bump (+ patches?)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Cédric Krier
URL: http://tools.suckless.org/dmenu/
Whiteboard:
Keywords:
Depends on: 344705
Blocks: 324713
  Show dependency tree
 
Reported: 2010-05-30 19:30 UTC by yannick
Modified: 2010-11-25 21:25 UTC (History)
4 users (show)

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


Attachments
dmenu-4.1.1 ebuild (patch for dmenu-4.0.ebuild) (dmenu-4.1.1.diff,1.57 KB, patch)
2010-06-08 14:59 UTC, yannick
Details | Diff
Patch against dmenu-4.0.ebuild, added the dependency to sselp (dmenu-4.0.diff,1.60 KB, patch)
2010-06-14 09:01 UTC, yannick
Details | Diff
Add sselp dependency, cpath replacement (dmenu-4.1.1-sselp-cpath-ebuild.patch,1.15 KB, patch)
2010-07-20 00:35 UTC, Jeroen Roovers (RETIRED)
Details | Diff
revision bump (dmenu-4.1.1-sselp-cpath-ebuild.patch,1.15 KB, patch)
2010-07-20 18:01 UTC, Jeroen Roovers (RETIRED)
Details | Diff
Patch for dmenu-4.1.1.ebuild, adding USE flags cpath, xft and paste (dmenu-4.1.1.diff,2.16 KB, patch)
2010-10-01 06:40 UTC, yannick
Details | Diff
dmenu-9999.ebuild, builds latest tip from the dmenu repository (dmenu-9999.ebuild,1.17 KB, text/plain)
2010-11-08 17:51 UTC, yannick
Details
builds latest tip without libdc dependency, patch for dmenu-9999.ebuild (dmenu-9999-r2.patch,1.12 KB, patch)
2010-11-12 11:09 UTC, yannick
Details | Diff
Ebuild for dmenu-4.2.1 (dmenu-4.2.1.ebuild,1.15 KB, text/plain)
2010-11-23 19:10 UTC, yannick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yannick 2010-05-30 19:30:59 UTC
dmenu 4.1.1 has been released a day ago, thus requesting a version bump :).

Might it be possible to add these patches?
See http://tools.suckless.org/dmenu/patches/
I guess it would be handy by patching them per USE-flags.

Reproducible: Always

Steps to Reproduce:
1. Always
Comment 1 yannick 2010-06-08 14:59:06 UTC
Created attachment 234535 [details, diff]
dmenu-4.1.1 ebuild (patch for dmenu-4.0.ebuild)

As I read on the suckless web page, the following patches have been applied to dmenu-4.1.1:
- cursor
- paste
- vertical

I'm not sure whether it's reasonable to apply the other patches using USE-flags. What do you think?

I created a ebuild for dmenu-4.1.1 with an additional "cpath" USE-flag (don't know whether this is a good name tho) which will pull, compile and add the dmenu_path replacement written in C (see http://tools.suckless.org/dmenu/patches/dmenu_path).
The dmenu_path rewrite is "supposedly around 2-4 times faster on cache hits and around 10-20 times faster on cache misses", as stated on the suckless website. So I thought it would be a good idea to add a USE-flag for it.

I've tested this ebuild on my amd64 machine, and it seems to work properly. Maybe you can use it somehow, at least I hope :)
Comment 2 yannick 2010-06-14 09:01:29 UTC
Created attachment 235241 [details, diff]
Patch against dmenu-4.0.ebuild, added the dependency to sselp

I've been using dmenu-4.1.1 in the last few days and I noticed that dmenu-4.1.1 depends on x11-misc/sselp, although there's no note on its dedicated website:
dmenu.c:454	if(!(fp = (FILE*)popen("sselp", "r")))

I created a new patch against dmenu-4.0.ebuild including the dependency to sselp.
I'm still not sure whether this is a good way on how to add & compile the dmenu_path C rewrite; please correct it if possible :)
Comment 3 Cédric Krier gentoo-dev 2010-06-19 17:00:52 UTC
I have created a keyword request for ssel.
I will report ssel dependency to upstream.
I don't want to add external patches because I don't know if there will be maintained or not.
Comment 4 yannick 2010-06-19 19:11:47 UTC
You're right about the patches. Also, it seems like they're already outdated, most of them are for dmenu-4.0 if they weren't included in dmenu-4.1.1 already.
But what about dmenu_path.c? It's not really a patch, it just replaces the dmenu_path shell script and thus any modification or version bumps for dmenu don't really depend on dmenu_path.c.
But you'll have to decide about that :)
Comment 5 Cédric Krier gentoo-dev 2010-06-19 23:32:13 UTC
I think it could be a new package for an alternative implementation.
Comment 6 yannick 2010-06-22 13:10:47 UTC
Wouldn't it be overkill to create a new package just because of the dmenu_path script which changes? I guess using a USE-flag would be a slightly better solution.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-20 00:22:37 UTC
Hah, I was looking at the cpath replacement as well.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-20 00:35:24 UTC
Created attachment 239477 [details, diff]
Add sselp dependency, cpath replacement

Actually 4.1.1 is in the tree since early July (my fault). This patch adds the sselp dependency (which I happen to maintain) and the "cpath" replacement. Btw, I haven't seen any problem with sselp missing (when it wasn't installed). And indeed, if sselp can't be popen'd then Mod1+p is simply ignored (and the clipboard entry isn't pasted).
Comment 9 Cédric Krier gentoo-dev 2010-07-20 06:07:06 UTC
There is a main issue to include this patch. It is that dmenu_path.c is not versioned.
Comment 10 yannick 2010-07-20 17:34:12 UTC
Indeed this is a main issue. But there must be a clean way to include this patch, omitting it isn't very nice. Maybe we should ask them to version it? I don't think it would make a big difference, but then at least there's some control over it.

As for sselp, wouldn't it be reasonable to include the dependency per USE-flag and (maybe) patch dmenu to remove the pasting feature?

But well, it's up to you guys ;)
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-20 17:52:09 UTC
It's no problem if you consider that it's 7 kilobytes, so a versioned file could easily be placed in FILESDIR. Of course that would require a slight change to my ebuild patch...
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-20 18:01:28 UTC
Created attachment 239581 [details, diff]
revision bump

Put a version dmenu_path.c in FILESDIR, mention sselp in einfo but don't RDEPEND on it.
Comment 13 Michael Weber (RETIRED) gentoo-dev 2010-08-09 23:24:21 UTC
Hi, 

have you considered using the libXft support patch from http://aur.archlinux.org/packages.php?ID=28745 ?

The patch is http://z.ip.fi/~henkka/dmenu-xft/dmenu-4.1.1-3-xft.diff

--- /usr/portage/x11-misc/dmenu/dmenu-4.1.1.ebuild      2010-07-17 13:07:39.000000000 +0200
+++ dmenu-4.1.1-r1.ebuild       2010-08-10 01:04:59.000000000 +0200
@@ -4,7 +4,7 @@

 EAPI="2"

-inherit savedconfig toolchain-funcs
+inherit eutils savedconfig toolchain-funcs

 DESCRIPTION="a generic, highly customizable, and efficient menu for the X Window System"
 HOMEPAGE="http://www.suckless.org/programs/dmenu.html"
@@ -13,13 +13,18 @@
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd"
-IUSE="xinerama"
+IUSE="xft xinerama"

 DEPEND="x11-libs/libX11
+       x11-libs/libXft
        xinerama? ( x11-libs/libXinerama )"
 RDEPEND=${DEPEND}

 src_prepare() {
+       if use xft ; then
+               epatch "${FILESDIR}"/${P}-3-xft.diff
+       fi
+
        sed -i \
                -e "s/CFLAGS = -std=c99 -pedantic -Wall -Os/CFLAGS += -std=c99 -pedantic -Wall -g/" \
                -e "s/LDFLAGS = -s/LDFLAGS += -g/" \

to be seen at http://svn.xmw.de/websvn/gentoo-overlay/x11-misc/dmenu/
Comment 14 yannick 2010-09-02 17:55:10 UTC
Adding the libXft patch is a really nice idea. However, the x11-libs/libXft
 dependency should be triggered by the USE flag:
       xft? ( x11-libs/libXft )

Btw, there's a ongoing discussing in the suckless mailing list about the libXft patch (might be interesting): http://lists.suckless.org/dev/1009/5855.html
Comment 15 yannick 2010-10-01 06:40:36 UTC
Created attachment 249130 [details, diff]
Patch for dmenu-4.1.1.ebuild, adding USE flags cpath, xft and paste

I modified some more lines in the 4.1.1 ebuild and added the USE flags paste (support for sselp) and xft. The XFT patch and dmenu_path.c file are now versioned, but I have no idea whether this is the correct/clean way to do it.
To me this seems the best way to give the user as much choices as possible. Maybe someone could review the patch?
Comment 16 Michael Weber (RETIRED) gentoo-dev 2010-10-01 09:08:09 UTC
Looks cool, 

you need to specify LDFLAGS, i've added this versions to my repo at
http://svn.xmw.de/websvn/gentoo-overlay/

+++ dmenu-4.1.1-r2.ebuild
@@ -55,7 +55,7 @@
        if use cpath; then
                rm -f dmenu_path
                $(tc-getCC) -w -o dmenu_path "${DMENU_PATH_C}" \
-                       || die "${DMENU_PATH_C} make failed"
+                       ${LDFLAGS} || die
        fi
 }
Comment 17 yannick 2010-11-08 17:51:28 UTC
Created attachment 253649 [details]
dmenu-9999.ebuild, builds latest tip from the dmenu repository

I made a dmenu ebuild which builds the latest tip from the official repository. As I noticed a lot of things have changed.

Some important changes compared to dmenu 4.1.1:
- dmenu now uses libdc (see http://bugs.gentoo.org/show_bug.cgi?id=344705)
- config.h is gone (http://hg.suckless.org/dmenu/rev/a527f3516a8d)
- the dmenu_path C rewrite now replaces the shell script (http://hg.suckless.org/dmenu/rev/69fbc9d47026)

I removed the xft patch, since it isn't compatible with the current sources, of course. The cpath USE-flag is now gone too, of course.

Enhancements for the ebuild are welcome.
Comment 18 yannick 2010-11-12 11:09:09 UTC
Created attachment 254077 [details, diff]
builds latest tip without libdc dependency, patch for dmenu-9999.ebuild

It's quite funny, because it seems like the dependency to libdc has been removed in the latest tip of dmenu (see http://www.imdb.com/title/tt0489018/). Dmenu now additionally has the files draw.c and draw.h, which basically contain the required code from libdc as far as I know ...

I created a patch for dmenu-9999.ebuild, which builds latest tip without libdc dependency. Maybe there's someone who needs it :).
Comment 19 Jeroen Roovers (RETIRED) gentoo-dev 2010-11-23 18:08:46 UTC
4.2.1 is out there, presumably including everything that was proposed as patches here.
Comment 20 yannick 2010-11-23 19:10:35 UTC
Created attachment 255211 [details]
Ebuild for dmenu-4.2.1

I made an ebuild for dmenu-4.2.1, maybe you can use it. Improvements/suggestions are welcome.

By the way, there's some discussion about a new XFT-patch (see http://lists.suckless.org/dev/1011/index.html#6449). I'd really like a patch to be included for dmenu-4.2.1 (although I wouldn't use XFT anyway). If they ever add XFT support, I hope there'll be a way to remove it during compile time.
Comment 21 Cédric Krier gentoo-dev 2010-11-23 20:25:35 UTC
Fix in CVS
Comment 22 Michael Weber (RETIRED) gentoo-dev 2010-11-25 20:10:02 UTC
I don't think that the patch discussion is RESO/FIX'ed. Any comment?
Comment 23 Cédric Krier gentoo-dev 2010-11-25 21:03:19 UTC
(In reply to comment #22)
> I don't think that the patch discussion is RESO/FIX'ed. Any comment?
> 

cpath is included in the version bump
Comment 24 Michael Weber (RETIRED) gentoo-dev 2010-11-25 21:25:19 UTC
(In reply to comment #23)
> cpath is included in the version bump

sry, my fault. i was disappointed about the not included Xft patch (I check if the old on sill applies).