ports/155918: Update port: x11/dmenu
Jeroen Schot
schot at A-Eskwadraat.nl
Thu Mar 24 17:00:02 UTC 2011
>Number: 155918
>Category: ports
>Synopsis: Update port: x11/dmenu
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 24 17:00:01 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Jeroen Schot
>Release: FreeBSD 8.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD maxwell.localdomain 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011 root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Update port: x11/dmenu
Attached diff updates the port of x11/dmenu. It fixes a number of small issues:
* Fix to build with BSD make (USE_GMAKE no longer needed).
* Built option for Xinerama support.
* Remove obsolete remark about DMENU_CONF.
* Respect CFLAGS.
>How-To-Repeat:
>Fix:
diff -ruN dmenu.orig/Makefile dmenu/Makefile
--- dmenu.orig/Makefile 2011-03-09 17:55:56.000000000 +0100
+++ dmenu/Makefile 2011-03-24 17:01:49.000000000 +0100
@@ -7,27 +7,35 @@
PORTNAME= dmenu
PORTVERSION= 4.2.1
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= http://dl.suckless.org/tools/ \
http://schot.a-eskwadraat.nl/files/
MAINTAINER= schot at a-eskwadraat.nl
-COMMENT= X11 menu application (not only) for the dwm window manager
+COMMENT= X11 menu application designed for the dwm window manager
-USE_XORG= x11 xinerama
-USE_GMAKE= yes
+OPTIONS= XINERAMA "Enable Xinerama support" On
+
+USE_XORG= x11
MAN1= dmenu.1
PLIST_FILES= bin/dmenu bin/dmenu_path bin/dmenu_run
-pre-everything::
- @${ECHO_MSG} "You can build dmenu with your own config.h using the DMENU_CONF knob:"
- @${ECHO_MSG} "make DMENU_CONF=/path/to/dmenu/config.h install clean"
+.include <bsd.port.options.mk>
+
+.if defined(WITH_XINERAMA)
+USE_XORG+= xinerama
+.endif
post-patch:
@${GREP} -Rl '%%[[:alpha:]]\+%%' ${WRKSRC}|${XARGS} ${REINPLACE_CMD} \
-e "s,%%PREFIX%%,${PREFIX},g" \
-e "s,%%LOCALBASE%%,${LOCALBASE},g" \
- -e "s,%%MANPREFIX%%,${MANPREFIX}/man,g"
+ -e "s,%%MANPREFIX%%,${MANPREFIX},g"
+.if defined(WITHOUT_XINERAMA)
+ @${REINPLACE_CMD} -e 's,$${XINERAMALIBS},,g' \
+ -e 's,$${XINERAMAFLAGS},,g' ${WRKSRC}/config.mk
+.endif
.include <bsd.port.mk>
diff -ruN dmenu.orig/files/patch-Makefile dmenu/files/patch-Makefile
--- dmenu.orig/files/patch-Makefile 1970-01-01 01:00:00.000000000 +0100
+++ dmenu/files/patch-Makefile 2011-03-24 17:16:49.000000000 +0100
@@ -0,0 +1,48 @@
+--- Makefile.orig 2010-11-20 10:24:33.000000000 +0100
++++ Makefile 2011-03-24 17:16:32.000000000 +0100
+@@ -12,16 +12,17 @@
+ @echo "CC = ${CC}"
+
+ dmenu: dmenu.o draw.o
++ @echo CC -o $@
++ @${CC} -o $@ dmenu.o draw.o ${LDFLAGS}
++
+ dmenu_path: dmenu_path.o
++ @echo CC -o $@
++ @${CC} -o $@ dmenu_path.o ${LDFLAGS}
+
+ .c.o: config.mk
+ @echo CC -c $<
+ @${CC} -c $< ${CFLAGS}
+
+-dmenu dmenu_path:
+- @echo CC -o $@
+- @${CC} -o $@ $+ ${LDFLAGS}
+-
+ clean:
+ @echo cleaning
+ @rm -f dmenu dmenu.o draw.o dmenu_path dmenu_path.o dmenu-${VERSION}.tar.gz
+@@ -41,17 +42,17 @@
+ @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu
+ @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_path
+ @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_run
+- @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
+- @mkdir -p ${DESTDIR}${MANPREFIX}/man1
+- @sed "s/VERSION/${VERSION}/g" < dmenu.1 > ${DESTDIR}${MANPREFIX}/man1/dmenu.1
+- @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dmenu.1
++ @echo installing manual page to ${DESTDIR}${MANPREFIX}/man/man1
++ @mkdir -p ${DESTDIR}${MANPREFIX}/man/man1
++ @sed "s/VERSION/${VERSION}/g" < dmenu.1 > ${DESTDIR}${MANPREFIX}/man/man1/dmenu.1
++ @chmod 644 ${DESTDIR}${MANPREFIX}/man/man1/dmenu.1
+
+ uninstall:
+ @echo removing executables from ${DESTDIR}${PREFIX}/bin
+ @rm -f ${DESTDIR}${PREFIX}/bin/dmenu
+ @rm -f ${DESTDIR}${PREFIX}/bin/dmenu_path
+ @rm -f ${DESTDIR}${PREFIX}/bin/dmenu_run
+- @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
+- @rm -f ${DESTDIR}${MANPREFIX}/man1/dmenu.1
++ @echo removing manual page from ${DESTDIR}${MANPREFIX}/man/man1
++ @rm -f ${DESTDIR}${MANPREFIX}/man/man1/dmenu.1
+
+ .PHONY: all options clean dist install uninstall
diff -ruN dmenu.orig/files/patch-config.mk dmenu/files/patch-config.mk
--- dmenu.orig/files/patch-config.mk 2010-05-17 12:29:54.000000000 +0200
+++ dmenu/files/patch-config.mk 2011-03-24 17:19:58.000000000 +0100
@@ -1,5 +1,5 @@
---- ./config.mk.orig 2009-04-18 15:50:04.000000000 +0400
-+++ ./config.mk 2010-05-16 21:32:00.163080828 +0400
+--- config.mk.orig 2010-11-20 10:24:33.000000000 +0100
++++ config.mk 2011-03-24 17:19:41.000000000 +0100
@@ -4,11 +4,11 @@
# Customize below to fit your system
@@ -15,4 +15,18 @@
+X11LIB = %%LOCALBASE%%/lib
# Xinerama, comment if you don't want it
- XINERAMALIBS = -L${X11LIB} -lXinerama
+ XINERAMALIBS = -lXinerama
+@@ -19,9 +19,9 @@
+ LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS}
+
+ # flags
+-CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
+-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
+-LDFLAGS = -s ${LIBS}
++CPPFLAGS+= -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
++CFLAGS += -std=c99 ${INCS} ${CPPFLAGS}
++LDFLAGS += ${LIBS}
+
+ # compiler and linker
+-CC = cc
++CC?= cc
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list