aboutsummaryrefslogtreecommitdiff
path: root/x11/dmenu2
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2017-03-18 15:42:22 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2017-03-18 15:42:22 +0000
commite122a29f2c0ec6a9b60e391d58266356e6ca3272 (patch)
treedea5d6881d00bef90ab68ee3f93544affd004f5a /x11/dmenu2
parent42e5f93eecf9226c709cc68d67aebc0f170425f5 (diff)
downloadports-e122a29f2c0ec6a9b60e391d58266356e6ca3272.tar.gz
ports-e122a29f2c0ec6a9b60e391d58266356e6ca3272.zip
Add `x11/dmenu2', a fork of classic dmenu with many enhancements and
additional options. While original upstream is https://bitbucket.org/melek/dmenu2, prefer more up-to-date GitHub repo which was forked from it (and because of our nice USE_GITHUB support for fetching the distfiles). PR: 209391 Submitted by: Timothy Beyer
Notes
Notes: svn path=/head/; revision=436420
Diffstat (limited to 'x11/dmenu2')
-rw-r--r--x11/dmenu2/Makefile36
-rw-r--r--x11/dmenu2/distinfo3
-rw-r--r--x11/dmenu2/files/dmenu2_path15
-rw-r--r--x11/dmenu2/files/patch-Makefile48
-rw-r--r--x11/dmenu2/files/patch-dmenu__run26
-rw-r--r--x11/dmenu2/pkg-descr5
6 files changed, 133 insertions, 0 deletions
diff --git a/x11/dmenu2/Makefile b/x11/dmenu2/Makefile
new file mode 100644
index 000000000000..01fec1eee7a6
--- /dev/null
+++ b/x11/dmenu2/Makefile
@@ -0,0 +1,36 @@
+# Created by: Timothy Beyer <beyert@cs.ucr.edu>
+# $FreeBSD$
+
+PORTNAME= dmenu2
+PORTVERSION= 0.0.20150210
+CATEGORIES= x11
+
+MAINTAINER= beyert@cs.ucr.edu
+COMMENT= Fork of dmenu with many enhancements and additional options
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libfreetype.so:print/freetype2 \
+ libfontconfig.so:x11-fonts/fontconfig
+
+USE_GITHUB= yes
+GH_ACCOUNT= mrshankly
+GH_TAGNAME= a4eb44b
+
+USE_XORG= x11 xft xrender
+
+PLIST_FILES= bin/dmenu2 bin/dmenu2_path bin/dmenu2_run bin/stest2 \
+ man/man1/dmenu2.1.gz man/man1/stest2.1.gz
+
+OPTIONS_DEFINE= XINERAMA
+OPTIONS_DEFAULT= XINERAMA
+
+XINERAMA_USE= XORG=xinerama
+XINERAMA_CFLAGS= -DXINERAMA
+XINERAMA_LIBS= -lXinerama
+
+post-extract:
+ @${LN} -sf ${FILESDIR}/dmenu2_path ${WRKSRC}
+
+.include <bsd.port.mk>
diff --git a/x11/dmenu2/distinfo b/x11/dmenu2/distinfo
new file mode 100644
index 000000000000..cea7b785f665
--- /dev/null
+++ b/x11/dmenu2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1423601564
+SHA256 (mrshankly-dmenu2-0.0.20150210-a4eb44b_GH0.tar.gz) = a7a7bbc425c5331926c193b35c8e423f2f94a4ee23d46dd201c8b6e0b194ac9d
+SIZE (mrshankly-dmenu2-0.0.20150210-a4eb44b_GH0.tar.gz) = 15533
diff --git a/x11/dmenu2/files/dmenu2_path b/x11/dmenu2/files/dmenu2_path
new file mode 100644
index 000000000000..b919cc5a4dbb
--- /dev/null
+++ b/x11/dmenu2/files/dmenu2_path
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# adapted from dmenu_path in the original dmenu distribution
+cachedir=${XDG_CACHE_HOME:-$HOME/.cache}
+if [ -d "$cachedir" ]; then
+ cache=$cachedir/dmenu2_run
+else
+ cache=$HOME/.dmenu2_cache # if no xdg dir, fall back to dotfile in ~
+fi
+IFS=:
+if stest2 -dqr -n "$cache" $PATH; then
+ stest2 -flx $PATH | sort -u | tee "$cache"
+else
+ cat "$cache"
+fi
diff --git a/x11/dmenu2/files/patch-Makefile b/x11/dmenu2/files/patch-Makefile
new file mode 100644
index 000000000000..c7a6bad1a8f2
--- /dev/null
+++ b/x11/dmenu2/files/patch-Makefile
@@ -0,0 +1,48 @@
+--- Makefile.orig 2015-02-10 20:52:44 UTC
++++ Makefile
+@@ -1,14 +1,14 @@
+-VERSION = 0.1
++VERSION = 0.2
+
+ CC ?= gcc
+-LIBS = -lX11 -lXinerama -lXft -lXrender -lfreetype -lz -lfontconfig
+-CFLAGS += -std=c99 -pedantic -Wall -Wextra -I/usr/include/freetype2
+-CFLAGS += -DXINERAMA -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\"
+-LDFLAGS +=
++LIBS += -lX11 -lXft -lXrender -lfreetype -lz -lfontconfig
++CFLAGS += -std=c99 -pedantic -Wall -Wextra -I$(LOCALBASE)/include -I$(LOCALBASE)/include/freetype2
++CFLAGS += -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\"
++LDFLAGS += -L$(LOCALBASE)/lib
+
+ PREFIX ?= /usr/local
+ BINPREFIX = $(PREFIX)/bin
+-MANPREFIX = $(PREFIX)/share/man
++MANPREFIX = $(PREFIX)/man
+
+ DM_SRC = dmenu.c draw.c
+ DM_OBJ = $(DM_SRC:.c=.o)
+@@ -16,8 +16,6 @@ DM_OBJ = $(DM_SRC:.c=.o)
+ ST_SRC = stest.c
+ ST_OBJ = $(ST_SRC:.c=.o)
+
+-all: CFLAGS += -Os
+-all: LDFLAGS += -s
+ all: dmenu stest
+
+ debug: CFLAGS += -g -O0 -DDEBUG
+@@ -34,9 +32,13 @@ stest: $(ST_OBJ)
+
+ install:
+ mkdir -p "$(DESTDIR)$(BINPREFIX)"
+- cp -p dmenu dmenu_run stest "$(DESTDIR)$(BINPREFIX)"
++ $(BSD_INSTALL_PROGRAM) dmenu "$(DESTDIR)$(BINPREFIX)/dmenu2"
++ $(BSD_INSTALL_PROGRAM) stest "$(DESTDIR)$(BINPREFIX)/stest2"
++ $(BSD_INSTALL_SCRIPT) dmenu_run "$(DESTDIR)$(BINPREFIX)/dmenu2_run"
++ $(BSD_INSTALL_SCRIPT) dmenu2_path "$(DESTDIR)$(BINPREFIX)"
+ mkdir -p "$(DESTDIR)$(MANPREFIX)"/man1
+- cp -p dmenu.1 stest.1 "$(DESTDIR)$(MANPREFIX)"/man1
++ $(BSD_INSTALL_MAN) dmenu.1 "$(DESTDIR)$(MANPREFIX)/man1/dmenu2.1"
++ $(BSD_INSTALL_MAN) stest.1 "$(DESTDIR)$(MANPREFIX)/man1/stest2.1"
+
+ uninstall:
+ rm -f "$(DESTDIR)$(BINPREFIX)"/dmenu
diff --git a/x11/dmenu2/files/patch-dmenu__run b/x11/dmenu2/files/patch-dmenu__run
new file mode 100644
index 000000000000..836eb1a91cc2
--- /dev/null
+++ b/x11/dmenu2/files/patch-dmenu__run
@@ -0,0 +1,26 @@
+--- dmenu_run.orig 2015-02-10 20:52:44 UTC
++++ dmenu_run
+@@ -1,15 +1,16 @@
+ #!/bin/sh
+-cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
++
++cachedir=${XDG_CACHE_HOME:-$HOME/.cache}
+ if [ -d "$cachedir" ]; then
+- cache=$cachedir/dmenu_run
++ cache=$cachedir/dmenu2_run
+ else
+- cache=$HOME/.dmenu_cache # if no xdg dir, fall back to dotfile in ~
++ cache=$HOME/.dmenu2_cache # if no xdg dir, fall back to dotfile in ~
+ fi
+ (
+ IFS=:
+- if stest -dqr -n "$cache" $PATH; then
+- stest -flx $PATH | sort -u | tee "$cache" | dmenu "$@"
++ if stest2 -dqr -n "$cache" $PATH; then
++ stest2 -flx $PATH | sort -u | tee "$cache" | dmenu2 "$@"
+ else
+- dmenu "$@" < "$cache"
++ dmenu2 "$@" < "$cache"
+ fi
+-) | ${SHELL:-"/bin/sh"} &
++) | ${SHELL:-/bin/sh} &
diff --git a/x11/dmenu2/pkg-descr b/x11/dmenu2/pkg-descr
new file mode 100644
index 000000000000..1939ade6ac43
--- /dev/null
+++ b/x11/dmenu2/pkg-descr
@@ -0,0 +1,5 @@
+dmenu2 is the fork of original dmenu -- an efficient dynamic menu for X11,
+patched to support features like flexible positioning, fuzzy matching,
+follow focus, tab navigation, background dimming, etc.
+
+WWW: https://github.com/mrshankly/dmenu2