diff --git a/x11-packages/dmenu/build.sh b/x11-packages/dmenu/build.sh new file mode 100644 index 000000000..cdc9eb3bd --- /dev/null +++ b/x11-packages/dmenu/build.sh @@ -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 " +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 diff --git a/x11-packages/dmenu/config.mk.patch b/x11-packages/dmenu/config.mk.patch new file mode 100644 index 000000000..02d2301f4 --- /dev/null +++ b/x11-packages/dmenu/config.mk.patch @@ -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 diff --git a/x11-packages/dmenu/fix-hardcoded-paths.patch b/x11-packages/dmenu/fix-hardcoded-paths.patch new file mode 100644 index 000000000..a41b24dde --- /dev/null +++ b/x11-packages/dmenu/fix-hardcoded-paths.patch @@ -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"} &