- Bump PORTREVISION

- Fix to build with BSD make
- Add Xinerama support
- Respect CFLAGS

PR:		ports/155918
Submitted by:	Jeroen Schot <schot@A-Eskwadraat.nl> (maintainer)
This commit is contained in:
Dennis Herrmann 2011-03-25 13:23:32 +00:00
parent 0f36c5a9ac
commit 2ad3d9b5eb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=271720
3 changed files with 80 additions and 10 deletions

View file

@ -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@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>

View file

@ -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

View file

@ -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