Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2015 04:59:36 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r403179 - head/x11-wm/dwm
Message-ID:  <201512070459.tB74xak1096932@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Mon Dec  7 04:59:36 2015
New Revision: 403179
URL: https://svnweb.freebsd.org/changeset/ports/403179

Log:
  x11-wm/dwm: convert to option helpers
  
  But keep DWM_CONF working if defined via Makefile.local
  
  PR:		204658
  Approved by:	portmgr blanket

Modified:
  head/x11-wm/dwm/Makefile   (contents, props changed)

Modified: head/x11-wm/dwm/Makefile
==============================================================================
--- head/x11-wm/dwm/Makefile	Mon Dec  7 04:58:49 2015	(r403178)
+++ head/x11-wm/dwm/Makefile	Mon Dec  7 04:59:36 2015	(r403179)
@@ -19,38 +19,34 @@ LIB_DEPENDS=	libfontconfig.so:${PORTSDIR
 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}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512070459.tB74xak1096932>