Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2012 19:54:11 +0000 (UTC)
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r306759 - in head/x11-wm/dwm: . files
Message-ID:  <201210311954.q9VJsBmI018789@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pawel
Date: Wed Oct 31 19:54:11 2012
New Revision: 306759
URL: http://svn.freebsd.org/changeset/ports/306759

Log:
  - Add optional Xft support [1]
  - Convert to OptionsNG
  - Add missing deps
  - Fix comment
  
  PR:		ports/170723
  Submitted by:	Vitaly Magerya <vmagerya@gmail.com>
  Approved by:	maintainer timeout
  Feature safe:	yes

Modified:
  head/x11-wm/dwm/Makefile
  head/x11-wm/dwm/distinfo
  head/x11-wm/dwm/files/patch-config.mk

Modified: head/x11-wm/dwm/Makefile
==============================================================================
--- head/x11-wm/dwm/Makefile	Wed Oct 31 19:05:00 2012	(r306758)
+++ head/x11-wm/dwm/Makefile	Wed Oct 31 19:54:11 2012	(r306759)
@@ -1,25 +1,27 @@
-# New ports collection makefile for:   dwm
-# Date created:                July 24, 2006
-# Whom:                        Jeroen Schot <schot@a-eskwadraat.nl>
-#
+# Created by: Jeroen Schot <schot@a-eskwadraat.nl>
 # $FreeBSD$
-#
 
 PORTNAME=	dwm
 PORTVERSION=	6.0
+PORTREVISION=	1
 CATEGORIES=	x11-wm
 MASTER_SITES=	http://dl.suckless.org/${PORTNAME}/ \
 		http://schot.a-eskwadraat.nl/files/
+PATCH_SITES=	http://dwm.suckless.org/patches/
 
 MAINTAINER=	schot@a-eskwadraat.nl
-COMMENT=	A dynamic, small, fast and simple window manager
+COMMENT=	Dynamic, small, fast and simple window manager
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-OPTIONS=	XINERAMA	"Enable Xinerama support" On
+LIB_DEPENDS=	pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
+		xcb:${PORTSDIR}/x11/libxcb
 
-USE_XORG=	x11
+OPTIONS_DEFINE=	XINERAMA XFT DOCS
+OPTIONS_DEFAULT=XINERAMA
+
+USE_XORG=	x11 xau xdmcp xext
 
 MAN1=		dwm.1
 PLIST_FILES=	bin/dwm
@@ -27,10 +29,18 @@ PORTDOCS=	README
 
 .include <bsd.port.options.mk>
 
-.if defined(WITH_XINERAMA)
+.if ${PORT_OPTIONS:MXINERAMA}
 USE_XORG+=	xinerama
 .endif
 
+.if ${PORT_OPTIONS:MXFT}
+LIB_DEPENDS+=	freetype:${PORTSDIR}/print/freetype2 \
+		expat:${PORTSDIR}/textproc/expat2 \
+		fontconfig:${PORTSDIR}/x11-fonts/fontconfig
+USE_XORG+=	xft xrender
+PATCHFILES+=	${PORTNAME}-${PORTVERSION}-xft.diff
+.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"
@@ -47,13 +57,17 @@ post-patch:
 	         -e "s,%%PREFIX%%,${PREFIX},g" \
 	         -e "s,%%LOCALBASE%%,${LOCALBASE},g" \
 	         -e "s,%%MANPREFIX%%,${MANPREFIX},g"
-.if defined(WITHOUT_XINERAMA)
+.if empty(PORT_OPTIONS:MXINERAMA)
 	@${REINPLACE_CMD} -e 's,$${XINERAMALIBS},,g' \
 	         -e 's,$${XINERAMAFLAGS},,g' ${WRKSRC}/config.mk
 .endif
+.if empty(PORT_OPTIONS:MXFT)
+	@${REINPLACE_CMD} -e 's,$${XFTLIBS},,g' \
+	         -e 's,$${XFTINCS},,g' ${WRKSRC}/config.mk
+.endif
 
 post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@${ECHO_MSG} "installing additional documentation to ${DOCSDIR}"
 	@${MKDIR} ${DOCSDIR}
 	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}

Modified: head/x11-wm/dwm/distinfo
==============================================================================
--- head/x11-wm/dwm/distinfo	Wed Oct 31 19:05:00 2012	(r306758)
+++ head/x11-wm/dwm/distinfo	Wed Oct 31 19:54:11 2012	(r306759)
@@ -1,2 +1,4 @@
 SHA256 (dwm-6.0.tar.gz) = b2b9483de69259eeea56844899bb2385158d3e79a42d82b10c142099fc8eeb56
 SIZE (dwm-6.0.tar.gz) = 20810
+SHA256 (dwm-6.0-xft.diff) = badd329b1ec8d2d1b99816d3ca4eafa9fe784a93cfac29b96abca3821b441a4d
+SIZE (dwm-6.0-xft.diff) = 6731

Modified: head/x11-wm/dwm/files/patch-config.mk
==============================================================================
--- head/x11-wm/dwm/files/patch-config.mk	Wed Oct 31 19:05:00 2012	(r306758)
+++ head/x11-wm/dwm/files/patch-config.mk	Wed Oct 31 19:54:11 2012	(r306759)
@@ -1,6 +1,6 @@
---- config.mk.orig	2011-07-10 22:24:25.000000000 +0200
-+++ config.mk	2011-09-01 14:00:05.000000000 +0200
-@@ -4,11 +4,11 @@
+--- config.mk.orig	2011-12-19 15:02:46.000000000 +0000
++++ config.mk	2012-08-18 00:38:31.000000000 +0000
+@@ -4,30 +4,34 @@
  # Customize below to fit your system
  
  # paths
@@ -16,8 +16,17 @@
  
  # Xinerama
  XINERAMALIBS = -L${X11LIB} -lXinerama
-@@ -19,15 +19,15 @@
- LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
+ XINERAMAFLAGS = -DXINERAMA
+ 
++# Xft
++XFTINCS = -I${X11INC}/freetype2
++XFTLIBS = -L${X11LIB} -lXft
++
+ # includes and libs
+-INCS = -I. -I/usr/include -I${X11INC}
+-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
++INCS = -I. -I/usr/include -I${X11INC} ${XFTINCS}
++LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS} ${XFTLIBS}
  
  # flags
 -CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}



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