diff options
author | dhn <dhn@FreeBSD.org> | 2011-03-25 21:23:32 +0800 |
---|---|---|
committer | dhn <dhn@FreeBSD.org> | 2011-03-25 21:23:32 +0800 |
commit | 02e6b903a68177d6a7b7f58a2d0eb9aeba7cb579 (patch) | |
tree | 7fe7580993abfb40d42829533e30e3413f575bf7 /x11/dmenu | |
parent | 01089aa64ba291b111d8c200d199274f1cc11e54 (diff) | |
download | freebsd-ports-gnome-02e6b903a68177d6a7b7f58a2d0eb9aeba7cb579.tar.gz freebsd-ports-gnome-02e6b903a68177d6a7b7f58a2d0eb9aeba7cb579.tar.zst freebsd-ports-gnome-02e6b903a68177d6a7b7f58a2d0eb9aeba7cb579.zip |
- 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)
Diffstat (limited to 'x11/dmenu')
-rw-r--r-- | x11/dmenu/Makefile | 22 | ||||
-rw-r--r-- | x11/dmenu/files/patch-Makefile | 48 | ||||
-rw-r--r-- | x11/dmenu/files/patch-config.mk | 20 |
3 files changed, 80 insertions, 10 deletions
diff --git a/x11/dmenu/Makefile b/x11/dmenu/Makefile index 63c0900a7536..e3d6074853da 100644 --- a/x11/dmenu/Makefile +++ b/x11/dmenu/Makefile @@ -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> diff --git a/x11/dmenu/files/patch-Makefile b/x11/dmenu/files/patch-Makefile new file mode 100644 index 000000000000..1498c47e34ad --- /dev/null +++ b/x11/dmenu/files/patch-Makefile @@ -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 --git a/x11/dmenu/files/patch-config.mk b/x11/dmenu/files/patch-config.mk index 1f937e84549a..3dceb844db41 100644 --- a/x11/dmenu/files/patch-config.mk +++ b/x11/dmenu/files/patch-config.mk @@ -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 |