MFH: r543974

x11/dmenu: Get the latest bug fixes from upstream

Users are still reporting issues with the dmenu version 4.9. The patch we
have currently in the ports tree was meant to be a temporary fix as we
waited for a new dmenu release. A new release is not coming apparently,
so let's just get the latest patches from upstream.

Also, switch to a GitHub-hosted mirror of the dmenu repository
as it is painful to get artifacts from https://git.suckless.org/
without a Git client.

While here, replace REINPLACE_CMD with patches.

Reported by:	Scott Robbins
Approved by:	ports-secteam (joneum)
This commit is contained in:
Mateusz Piotrowski 2020-08-05 14:05:05 +00:00
parent ce2575c7fa
commit 07f06add8f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q3/; revision=544222
4 changed files with 23 additions and 25 deletions

View File

@ -2,11 +2,9 @@
# $FreeBSD$ # $FreeBSD$
PORTNAME= dmenu PORTNAME= dmenu
DISTVERSION= 4.9 DISTVERSION= 4.9-6
PORTREVISION= 1 DISTVERSIONSUFFIX= -g9b38fda
CATEGORIES= x11 CATEGORIES= x11
MASTER_SITES= http://dl.suckless.org/tools/ \
http://schot.a-eskwadraat.nl/files/
MAINTAINER= 0mp@FreeBSD.org MAINTAINER= 0mp@FreeBSD.org
COMMENT= X11 menu application designed for the dwm window manager COMMENT= X11 menu application designed for the dwm window manager
@ -20,6 +18,9 @@ OPTIONS_DEFINE= XINERAMA
OPTIONS_DEFAULT= XINERAMA OPTIONS_DEFAULT= XINERAMA
USES= xorg USES= xorg
USE_GITHUB= yes
GH_ACCOUNT= 0mp
GH_PROJECT= freebsd-${PORTNAME}
USE_XORG= x11 xft USE_XORG= x11 xft
MAKE_ARGS= CC="${CC}" PREFIX="${PREFIX}" MANPREFIX="${MANPREFIX}/man" \ MAKE_ARGS= CC="${CC}" PREFIX="${PREFIX}" MANPREFIX="${MANPREFIX}/man" \
X11INC="${LOCALBASE}/include" X11LIB="${LOCALBASE}/lib" \ X11INC="${LOCALBASE}/include" X11LIB="${LOCALBASE}/lib" \
@ -31,13 +32,6 @@ PLIST_FILES= bin/dmenu bin/dmenu_path bin/dmenu_run bin/stest \
XINERAMA_USE= XORG=xinerama XINERAMA_USE= XORG=xinerama
XINERAMA_MAKE_ARGS_OFF= XINERAMAFLAGS= XINERAMALIBS= XINERAMA_MAKE_ARGS_OFF= XINERAMAFLAGS= XINERAMALIBS=
post-configure:
@${REINPLACE_CMD} -E \
-e "s|(CFLAGS[[:space:]]*)= |\1+= |" \
-e "s|(CPPFLAGS[[:space:]]*)= |\1+= |" \
-e "s|(LDFLAGS[[:space:]]*)= |\1+= |" \
${WRKSRC}/config.mk
post-install: post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dmenu \ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dmenu \
${STAGEDIR}${PREFIX}/bin/stest ${STAGEDIR}${PREFIX}/bin/stest

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1551305095 TIMESTAMP = 1596384435
SHA256 (dmenu-4.9.tar.gz) = b3971f4f354476a37b2afb498693649009b201550b0c7c88e866af8132b64945 SHA256 (0mp-freebsd-dmenu-4.9-6-g9b38fda_GH0.tar.gz) = b111ecec87cdd1191e711ded09ba2d33b4b69fb2cc9ea2b90fd86d64ab87943a
SIZE (dmenu-4.9.tar.gz) = 15972 SIZE (0mp-freebsd-dmenu-4.9-6-g9b38fda_GH0.tar.gz) = 16012

View File

@ -0,0 +1,15 @@
--- config.mk.orig 2020-08-02 16:25:39 UTC
+++ config.mk
@@ -23,9 +23,9 @@ INCS = -I$(X11INC) -I$(FREETYPEINC)
LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
# flags
-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
-CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
-LDFLAGS = $(LIBS)
+CPPFLAGS += -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
+CFLAGS += -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
+LDFLAGS += $(LIBS)
# compiler and linker
CC = cc

View File

@ -1,11 +0,0 @@
--- dmenu.c.orig 2019-02-28 14:52:56 UTC
+++ dmenu.c
@@ -665,7 +665,7 @@ setup(void)
XNClientWindow, win, XNFocusWindow, win, NULL);
XMapRaised(dpy, win);
- XSetInputFocus(dpy, win, RevertToParent, CurrentTime);
+ /* XSetInputFocus(dpy, win, RevertToParent, CurrentTime); */
if (embed) {
XSelectInput(dpy, parentwin, FocusChangeMask);
if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {