Changeset View
Changeset View
Standalone View
Standalone View
x11-wm/dwm/Makefile
# Created by: Jeroen Schot <schot@a-eskwadraat.nl> | # Created by: Jeroen Schot <schot@a-eskwadraat.nl> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= dwm | PORTNAME= dwm | ||||
PORTVERSION= 6.1 | DISTVERSION= 6.2 | ||||
PORTREVISION= 3 | |||||
CATEGORIES= x11-wm | CATEGORIES= x11-wm | ||||
MASTER_SITES= http://dl.suckless.org/${PORTNAME}/ \ | MASTER_SITES= http://dl.suckless.org/${PORTNAME}/ | ||||
http://schot.a-eskwadraat.nl/files/ | |||||
MAINTAINER= 0mp@FreeBSD.org | MAINTAINER= 0mp@FreeBSD.org | ||||
COMMENT= Dynamic, small, fast and simple window manager | COMMENT= Dynamic, small, fast and simple window manager | ||||
LICENSE= MIT | LICENSE= MIT | ||||
LICENSE_FILE= ${WRKSRC}/LICENSE | LICENSE_FILE= ${WRKSRC}/LICENSE | ||||
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig | LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig | ||||
# Kyua is not used by the upstream to test. It's only used in the port's | |||||
# do-test target. | |||||
TEST_DEPENDS= ${LOCALBASE}/libexec/atf-check:devel/kyua | |||||
USE_XORG= x11 xft | USE_XORG= x11 xft | ||||
MAKE_ARGS= CC="${CC}" PREFIX="${PREFIX}" MANPREFIX="${MANPREFIX}/man" \ | MAKE_ARGS= CC="${CC}" \ | ||||
X11INC="${LOCALBASE}/include" X11LIB="${LOCALBASE}/lib" | FREETYPEINC="${LOCALBASE}/include/freetype2" \ | ||||
MANPREFIX="${MANPREFIX}/man" \ | |||||
PREFIX="${PREFIX}" \ | |||||
VERSION="${PORTVERSION}" \ | |||||
X11INC="${LOCALBASE}/include" \ | |||||
X11LIB="${LOCALBASE}/lib" | |||||
PLIST_FILES= bin/dwm \ | PLIST_FILES= bin/dwm \ | ||||
man/man1/dwm.1.gz | man/man1/dwm.1.gz | ||||
PORTDOCS= README | PORTDOCS= README | ||||
OPTIONS_DEFINE= DMENUANDSTERM DOCS SUPERASMODKEY VOLUMECONTROL XINERAMA | OPTIONS_DEFINE= DMENUANDSTERM DOCS SUPERASMODKEY VOLUMECONTROL XINERAMA | ||||
OPTIONS_DEFAULT=DMENUANDSTERM XINERAMA | OPTIONS_DEFAULT=DMENUANDSTERM XINERAMA | ||||
DMENUANDSTERM_DESC= Install x11/dmenu and x11/sterm as runtime dependencies | DMENUANDSTERM_DESC= Install x11/dmenu and x11/sterm as runtime dependencies | ||||
SUPERASMODKEY_DESC= Use Super instead of Alt for the dwm mod key | SUPERASMODKEY_DESC= Use Super instead of Alt for the dwm mod key | ||||
VOLUMECONTROL_DESC= Use keys on keyboard to raise or lower volume | VOLUMECONTROL_DESC= Use multimedia keys to raise or lower volume | ||||
DMENUANDSTERM_RUN_DEPENDS= dmenu:x11/dmenu \ | DMENUANDSTERM_RUN_DEPENDS= dmenu:x11/dmenu \ | ||||
st:x11/sterm | st:x11/sterm | ||||
SUPERASMODKEY_EXTRA_PATCHES= ${PATCHDIR}/superasmodkey-patch-config.def.h | SUPERASMODKEY_EXTRA_PATCHES= ${PATCHDIR}/superasmodkey-patch-config.def.h | ||||
VOLUMECONTROL_EXTRA_PATCHES= ${PATCHDIR}/volumecontrol-patch-config.def.h | VOLUMECONTROL_EXTRA_PATCHES= ${PATCHDIR}/volumecontrol-patch-config.def.h | ||||
XINERAMA_USE= XORG=xinerama | XINERAMA_USE= XORG=xinerama | ||||
XINERAMA_MAKE_ARGS_OFF= XINERAMAFLAGS= XINERAMALIBS= | XINERAMA_MAKE_ARGS_OFF= XINERAMAFLAGS= XINERAMALIBS= | ||||
pre-everything:: | pre-everything:: | ||||
@${ECHO_MSG} "You can build dwm with your own config.h using the DWM_CONF knob:" | @${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} "make DWM_CONF=/path/to/dwm/config.h install clean" | ||||
@${ECHO_MSG} "Note: Pre-${PORTVERSION} config.h-files may not work." | @${ECHO_MSG} "Note: Pre-${PORTVERSION} config.h-files may not work." | ||||
.if exists(${DWM_CONF}) | |||||
post-extract: | post-extract: | ||||
@if [ -e "${DWM_CONF}" ]; then \ | @${ECHO_MSG} "Creating symlink: config.h -> ${DWM_CONF}" | ||||
${ECHO_MSG} "Creating symlink: config.h -> ${DWM_CONF}"; \ | ${LN} -fs "${DWM_CONF}" ${WRKSRC}/config.h | ||||
${LN} -fs "${DWM_CONF}" ${WRKSRC}/config.h; \ | .endif | ||||
mat: Put the whole target in the .if instead of creating an empty target if it's not there. | |||||
fi | |||||
Not Done Inline ActionsThis should go after the extract target. mat: This should go after the extract target. | |||||
post-configure: | |||||
@${REINPLACE_CMD} -E \ | |||||
-e "s|(CFLAGS[[:space:]]*)= |\1+= |" \ | |||||
-e "s|(CPPFLAGS[[:space:]]*)= |\1+= |" \ | |||||
-e "s|(LDFLAGS[[:space:]]*)= |\1+= |" \ | |||||
${WRKSRC}/config.mk | |||||
post-install: | post-install: | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dwm | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dwm | ||||
post-install-DOCS-on: | post-install-DOCS-on: | ||||
@${MKDIR} ${STAGEDIR}${DOCSDIR} | @${MKDIR} ${STAGEDIR}${DOCSDIR} | ||||
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} | ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} | ||||
do-test: | |||||
${LOCALBASE}/libexec/atf-check -s exit:1 -e match:"dwm-${PORTVERSION}" \ | |||||
${STAGEDIR}${PREFIX}/bin/dwm -v | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
Put the whole target in the .if instead of creating an empty target if it's not there.