diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2015-12-07 04:59:36 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2015-12-07 04:59:36 +0000 |
commit | 9153a28ad7df895a3179f86357726f0c2b8734de (patch) | |
tree | a87507fc144148c91141242e0d8f696be456cbdc /x11-wm | |
parent | x11-wm/dwm: update to 6.1 (diff) |
x11-wm/dwm: convert to option helpers
But keep DWM_CONF working if defined via Makefile.local
PR: 204658
Approved by: portmgr blanket
Notes
Notes:
svn path=/head/; revision=403179
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/dwm/Makefile | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/x11-wm/dwm/Makefile b/x11-wm/dwm/Makefile index ab8ab82e200d..996e7539e4f3 100644 --- a/x11-wm/dwm/Makefile +++ b/x11-wm/dwm/Makefile @@ -19,38 +19,34 @@ LIB_DEPENDS= libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig OPTIONS_DEFINE= XINERAMA DOCS OPTIONS_DEFAULT=XINERAMA +XINERAMA_USE= XORG=xinerama + USE_XORG= x11 xft PLIST_FILES= bin/dwm \ man/man1/dwm.1.gz PORTDOCS= README -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MXINERAMA} -USE_XORG+= xinerama -.endif - pre-everything:: @${ECHO_MSG} "You can build dwm with your own config.h using the DWM_CONF knob:" @${ECHO_MSG} "make DWM_CONF=/path/to/dwm/config.h install clean" @${ECHO_MSG} "Note: Pre-${PORTVERSION} config.h-files may not work." post-extract: -.if defined(DWM_CONF) - @${ECHO_MSG} "creating config.h from ${DWM_CONF}" - @${CP} ${DWM_CONF} ${WRKSRC}/config.h -.endif + @if [ -e "${DWM_CONF}" ]; then \ + ${ECHO_MSG} "creating config.h from ${DWM_CONF}"; \ + ${CP} "${DWM_CONF}" ${WRKSRC}/config.h; \ + fi post-patch: @${GREP} -Rl '%%[[:alpha:]]\+%%' ${WRKSRC}|${XARGS} ${REINPLACE_CMD} \ -e "s,%%PREFIX%%,${PREFIX},g" \ -e "s,%%LOCALBASE%%,${LOCALBASE},g" \ -e "s,%%MANPREFIX%%,${MANPREFIX},g" -.if empty(PORT_OPTIONS:MXINERAMA) + +post-patch-XINERAMA-off: @${REINPLACE_CMD} -e 's,$${XINERAMALIBS},,g' \ -e 's,$${XINERAMAFLAGS},,g' ${WRKSRC}/config.mk -.endif post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} |