Date: Sat, 18 Aug 2012 01:06:37 GMT From: Vitaly Magerya <vmagerya@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/170723: [patch] x11-wm/dwm: add optional Xft support Message-ID: <201208180106.q7I16b3J048748@red.freebsd.org> Resent-Message-ID: <201208180110.q7I1A7xT037930@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 170723 >Category: misc >Synopsis: [patch] x11-wm/dwm: add optional Xft support >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Aug 18 01:10:06 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Vitaly Magerya >Release: FreeBSD 9.1-BETA1 amd64 >Organization: >Environment: >Description: I've noticed that x11/dmenu has an option to enable the Xft patch (which is awesome), but x11-wm/dwm does not. This is regrettable as these two programs are designed to be used together. For this reason I'm attaching a patch to enable Xft support (see [1]) for dwm too (it's disabled by default to match the dmenu defaults). Additionally, this patch changes OPTIONS to the new options framework. [1] http://dwm.suckless.org/patches/xft >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN dwm.orig/Makefile dwm/Makefile --- dwm.orig/Makefile 2012-02-14 20:20:52.000000000 +0000 +++ dwm/Makefile 2012-08-18 00:45:15.000000000 +0000 @@ -10,6 +10,7 @@ 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 @@ -17,7 +18,8 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -OPTIONS= XINERAMA "Enable Xinerama support" On +OPTIONS_DEFINE= XINERAMA XFT +OPTIONS_DEFAULT=XINERAMA USE_XORG= x11 @@ -27,10 +29,15 @@ .include <bsd.port.options.mk> -.if defined(WITH_XINERAMA) +.if ${PORT_OPTIONS:MXINERAMA} USE_XORG+= xinerama .endif +.if defined(WITH_XFT) +USE_XORG+= xft +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,10 +54,14 @@ -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) diff -ruN dwm.orig/distinfo dwm/distinfo --- dwm.orig/distinfo 2012-02-14 20:20:52.000000000 +0000 +++ dwm/distinfo 2012-08-18 00:46:02.000000000 +0000 @@ -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 diff -ruN dwm.orig/files/patch-config.mk dwm/files/patch-config.mk --- dwm.orig/files/patch-config.mk 2011-09-01 18:52:52.000000000 +0000 +++ dwm/files/patch-config.mk 2012-08-18 00:38:49.000000000 +0000 @@ -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} >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208180106.q7I16b3J048748>