dmenu: update to 4.6.

This commit is contained in:
Duncaen 2015-11-10 16:02:35 +01:00
parent 5d8dcac5c2
commit 7cf82c6a34
3 changed files with 39 additions and 72 deletions

View File

@ -0,0 +1,17 @@
/* See LICENSE file for copyright and license details. */
/* Default settings; can be overriden by command line. */
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
/* -fn option overrides fonts[0]; default X11 font or font set */
static const char *fonts[] = {
"monospace:size=10"
};
static const char *prompt = NULL; /* -p option; prompt to the elft of input field */
static const char *normbgcolor = "#222222"; /* -nb option; normal background */
static const char *normfgcolor = "#bbbbbb"; /* -nf option; normal foreground */
static const char *selbgcolor = "#005577"; /* -sb option; selected background */
static const char *selfgcolor = "#eeeeee"; /* -sf option; selected foreground */
static const char *outbgcolor = "#00ffff";
static const char *outfgcolor = "#000000";
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
static unsigned int lines = 0;

View File

@ -1,11 +1,13 @@
--- draw.c.orig 2012-12-16 06:41:04.477405084 +0100
+++ draw.c 2012-12-16 06:41:34.027700813 +0100
@@ -95,7 +95,7 @@ DC *
initdc(void) {
DC *dc;
diff --git dmenu.c dmenu.c
index a07f8e3..98a0073 100644
--- dmenu.c
+++ dmenu.c
@@ -652,7 +652,7 @@ main(int argc, char *argv[])
else
usage();
- if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())
+ if(!setlocale(LC_CTYPE, NULL) || !XSupportsLocale())
fputs("no locale support\n", stderr);
if(!(dc = calloc(1, sizeof *dc)))
eprintf("cannot malloc %u bytes:", sizeof *dc);
- if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
+ if (!setlocale(LC_CTYPE, NULL) || !XSupportsLocale())
fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(NULL)))
die("cannot open display\n");

View File

@ -1,77 +1,25 @@
# Template file for 'dmenu'
pkgname=dmenu
version=4.5
revision=10
makedepends="libXinerama-devel $(vopt_if xft 'libXft-devel freetype-devel')"
version=4.6
revision=1
makedepends="libXinerama-devel libXft-devel freetype-devel"
short_desc="A generic menu for X"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="MIT"
homepage="http://tools.suckless.org/dmenu/"
distfiles="http://dl.suckless.org/tools/${pkgname}-${version}.tar.gz"
checksum="082cd698d82125ca0b3989006fb84ac4675c2a5585bf5bb8af0ea09cfb95a850"
build_options="xft fuzzymatch monarg mouse"
desc_option_xft="Enable Xft font support"
desc_option_fuzzymatch="Enable Fuzzymatch support"
desc_option_monarg="Enable monitor argument support"
desc_option_mouse="Enable mouse support"
if [ "$build_option_xft" ]; then
distfiles+=" http://tools.suckless.org/dmenu/patches/dmenu-${version}-xft.diff"
skip_extraction+=" ${pkgname}-${version}-xft.diff"
checksum+=" efb4095d65e5e86f9dde97294732174409c24f319bdd4824cc22fa1404972b4f"
fi
if [ "$build_option_fuzzymatch" ]; then
distfiles+=" http://tools.suckless.org/dmenu/patches/${pkgname}-${version}-fuzzymatch.diff"
skip_extraction+=" ${pkgname}-${version}-fuzzymatch.diff"
checksum+=" f037978583a16b2dab554058b147c2dbdfc758472d2bc9e1f031b2b9c686c0ff"
fi
if [ "$build_option_monarg" ]; then
distfiles+=" http://tools.suckless.org/dmenu/patches/${pkgname}-${version}-monarg.diff"
skip_extraction+=" ${pkgname}-${version}-monarg.diff"
checksum+=" c30a4acd9202712c019de72f9c2832686e6e25ca0b939757e31c20b9c110008b"
fi
if [ "$build_option_mouse" ]; then
distfiles+=" http://tools.suckless.org/dmenu/patches/${pkgname}-${version}-mouse-support.diff"
skip_extraction+=" ${pkgname}-${version}-mouse-support.diff"
checksum+=" 8ac73e77abb7c5e60080abe892e2b4232c9370bff39e5548cf9a403cffe692c4"
fi
## RIght now mouse && xft are incompatible
pre_build() {
local srcdir="${XBPS_SRCDISTDIR}/${pkgname}-${version}/"
if [ "$build_option_fuzzymatch" ]; then
msg_normal "Applying fuzzymatch patches"
patch -p2 < "$srcdir/${pkgname}-${version}-fuzzymatch.diff"
echo '#include "fuzzymatch.c"' >> dmenu.c
fi
if [ "$build_option_xft" ]; then
msg_normal "Applying xft patches"
patch -p1 < "$srcdir/${pkgname}-${version}-xft.diff"
fi
if [ "$build_option_mouse" ]; then
msg_normal "Applying mouse patches"
patch -p1 < "$srcdir/${pkgname}-${version}-mouse-support.diff"
fi
if [ "$build_option_monarg" ]; then
msg_normal "Applying monarg patches"
patch -p1 < "$srcdir/${pkgname}-${version}-monarg.diff"
fi
}
checksum=4a7a24008a621c3cd656155ad91ab8136db8f0d3b9ec56dafeec518cabda96b3
do_build() {
sed -i -e "s|^CFLAGS =|CFLAGS += |g" \
-e "s|^LDFLAGS = \-s|LDFLAGS += |g" config.mk
cp ${FILESDIR}/config.h config.h
sed -i -e "s|^FREETYPEINC|#FREETYPEINC|g" \
-e "s|^X11INC|#X11INC|g" \
-e "s|^X11LIB|#X11LIB|g" config.mk
x11inc=$XBPS_CROSS_BASE/usr/include/X11
x11lib=$XBPS_CROSS_BASE/usr/lib
xftinc=-I$XBPS_CROSS_BASE/usr/include/freetype2
make CC="$CC" ${makejobs} X11INC=$x11inc X11LIB=$x11lib \
$(vopt_if xft XFTINC=$xftinc)
freetypeinc=$XBPS_CROSS_BASE/usr/include/freetype2
make CC="$CC" ${makejobs} X11INC=$x11inc X11LIB=$x11lib FREETYPEINC=$freetypeinc
}
do_install() {