freebsd-ports/x11-wm/dwm/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

84 lines
2.4 KiB
Makefile

PORTNAME= dwm
DISTVERSION= 6.3
CATEGORIES= x11-wm
MASTER_SITES= http://dl.suckless.org/${PORTNAME}/
MAINTAINER= 0mp@FreeBSD.org
COMMENT= Dynamic, small, fast and simple window manager
WWW= https://dwm.suckless.org/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
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
USES= xorg
USE_XORG= x11 xft
MAKE_ARGS= CC="${CC}" \
FREETYPEINC="${LOCALBASE}/include/freetype2" \
PREFIX="${PREFIX}" \
VERSION="${PORTVERSION}" \
X11INC="${LOCALBASE}/include" \
X11LIB="${LOCALBASE}/lib"
SUB_FILES= dwm.desktop
SUB_LIST= COMMENT="${COMMENT}"
PLIST_FILES= bin/dwm \
share/man/man1/dwm.1.gz \
share/xsessions/dwm.desktop
PORTDOCS= README
OPTIONS_DEFINE= DMENUANDSTERM DOCS SUPERASMODKEY VOLUMECONTROL XINERAMA
OPTIONS_DEFAULT=DMENUANDSTERM XINERAMA
DMENUANDSTERM_DESC= Install x11/dmenu and x11/sterm as runtime dependencies
RUGAPS_DESC= Add resizeable runtime useless gaps
SUPERASMODKEY_DESC= Use Super instead of Alt for the dwm mod key
VOLUMECONTROL_DESC= Use multimedia keys to raise or lower volume
DMENUANDSTERM_RUN_DEPENDS= dmenu:x11/dmenu \
st:x11/sterm
SUPERASMODKEY_EXTRA_PATCHES= ${PATCHDIR}/superasmodkey-patch-config.def.h
VOLUMECONTROL_EXTRA_PATCHES= ${PATCHDIR}/volumecontrol-patch-config.def.h
XINERAMA_USE= XORG=xinerama
XINERAMA_MAKE_ARGS_OFF= XINERAMAFLAGS= XINERAMALIBS=
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."
.if exists(${DWM_CONF})
post-extract:
@${ECHO_MSG} "Creating symlink: config.h -> ${DWM_CONF}"
${LN} -fs "${DWM_CONF}" ${WRKSRC}/config.h
.endif
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:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dwm
@${MKDIR} ${STAGEDIR}${PREFIX}/share/xsessions
${INSTALL_DATA} ${WRKDIR}/dwm.desktop ${STAGEDIR}${PREFIX}/share/xsessions
post-install-DOCS-on:
@${MKDIR} ${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>