new package: dmenu

Requested in https://github.com/termux/x11-packages/issues/74.
This commit is contained in:
Leonid Pliushch 2019-05-26 22:36:38 +03:00 committed by Yaksh Bariya
parent 93dd61013c
commit bdaf2e7abe
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://tools.suckless.org/dmenu/
TERMUX_PKG_DESCRIPTION="Generic menu for X"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
TERMUX_PKG_VERSION=4.9
TERMUX_PKG_SRCURL=https://dl.suckless.org/tools/dmenu-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=b3971f4f354476a37b2afb498693649009b201550b0c7c88e866af8132b64945
TERMUX_PKG_DEPENDS="dash, freetype, libxinerama, libxft"
TERMUX_PKG_BUILD_IN_SRC=true

View File

@ -0,0 +1,33 @@
diff -uNr dmenu-4.9/config.mk dmenu-4.9.mod/config.mk
--- dmenu-4.9/config.mk 2019-02-02 14:55:02.000000000 +0200
+++ dmenu-4.9.mod/config.mk 2019-05-26 22:34:03.870913860 +0300
@@ -2,11 +2,11 @@
VERSION = 4.9
# paths
-PREFIX = /usr/local
+PREFIX ?= /usr/local
MANPREFIX = $(PREFIX)/share/man
-X11INC = /usr/X11R6/include
-X11LIB = /usr/X11R6/lib
+X11INC = $(PREFIX)/include
+X11LIB = $(PREFIX)/lib
# Xinerama, comment if you don't want it
XINERAMALIBS = -lXinerama
@@ -14,7 +14,7 @@
# freetype
FREETYPELIBS = -lfontconfig -lXft
-FREETYPEINC = /usr/include/freetype2
+FREETYPEINC = $(PREFIX)/include/freetype2
# OpenBSD (uncomment)
#FREETYPEINC = $(X11INC)/freetype2
@@ -28,4 +28,4 @@
LDFLAGS = $(LIBS)
# compiler and linker
-CC = cc
+CC ?= cc

View File

@ -0,0 +1,17 @@
diff -uNr dmenu-4.9/dmenu_path dmenu-4.9.mod/dmenu_path
--- dmenu-4.9/dmenu_path 2019-02-02 14:55:02.000000000 +0200
+++ dmenu-4.9.mod/dmenu_path 2019-05-26 22:35:29.830530754 +0300
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@TERMUX_PREFIX@/bin/sh
cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
cache="$cachedir/dmenu_run"
diff -uNr dmenu-4.9/dmenu_run dmenu-4.9.mod/dmenu_run
--- dmenu-4.9/dmenu_run 2019-02-02 14:55:02.000000000 +0200
+++ dmenu-4.9.mod/dmenu_run 2019-05-26 22:35:06.966366935 +0300
@@ -1,2 +1,2 @@
-#!/bin/sh
-dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} &
+#!@TERMUX_PREFIX@/bin/sh
+dmenu_path | dmenu "$@" | ${SHELL:-"@TERMUX_PREFIX@/bin/sh"} &