freebsd-ports/x11/polybar/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

96 lines
2.7 KiB
Makefile

PORTNAME= polybar
DISTVERSION= 3.6.3
CATEGORIES= x11
MASTER_SITES= https://github.com/polybar/polybar/releases/download/${DISTVERSION}/
MAINTAINER= rigoletto@FreeBSD.org
COMMENT= Fast and easy-to-use status bar
WWW= https://github.com/jaagr/polybar
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= xcb-proto>=1.9:x11/xcb-proto
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libinotify.so:devel/libinotify \
libuv.so:devel/libuv \
libxcb-ewmh.so:x11/xcb-util-wm \
libxcb-icccm.so:x11/xcb-util-wm \
libxcb-image.so:x11/xcb-util-image \
libxcb-util.so:x11/xcb-util \
libxcb-xrm.so:x11/xcb-util-xrm
# compiler:c++11-lang is needed for powerpc64
USES= cmake compiler:c++11-lang gnome localbase:ldflags \
pkgconfig python:3.5+,build xorg
USE_GNOME= cairo
USE_XORG= xcb
# Needs libnl to work. Disabling it completely.
CMAKE_OFF= ENABLE_NETWORK BUILD_DOC
OPTIONS_DEFINE= ALSA CURSOR DEBUG GITHUB I3 IPC MPD \
PULSEAUDIO TESTS XKEYBOARD
OPTIONS_DEFAULT= CURSOR GITHUB I3 IPC MPD PULSEAUDIO XKEYBOARD
OPTIONS_SUB= yes
ALSA_DESC= Shows volume and mute state for Alsa
CURSOR_DESC= Required for click and scroll settings
GITHUB_DESC= Shows the unread notification count
I3_DESC= Uses the i3 IPC to display information
IPC_DESC= Built-in IPC support
MPD_DESC= Support for controlling MPD
TESTS_DESC= Build testsuite
XKEYBOARD_DESC= Shows the current layout and active indicators
ALSA_CMAKE_BOOL= ENABLE_ALSA
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
CURSOR_CMAKE_BOOL= WITH_XCURSOR
CURSOR_LIB_DEPENDS= libxcb-cursor.so:x11/xcb-util-cursor
DEBUG_CMAKE_BOOL= DEBUG_LOGGER
GITHUB_CMAKE_BOOL= ENABLE_CURL
GITHUB_LIB_DEPENDS= libcurl.so:ftp/curl
I3_BUILD_DEPENDS= ${LOCALBASE}/include/i3/ipc.h:x11-wm/i3
I3_CMAKE_BOOL= ENABLE_I3
I3_LIB_DEPENDS= libjsoncpp.so:devel/jsoncpp
IPC_CMAKE_BOOL= BUILD_IPC_MSG
MPD_CMAKE_BOOL= ENABLE_MPD
MPD_LIB_DEPENDS= libmpdclient.so:audio/libmpdclient
PULSEAUDIO_CMAKE_BOOL= ENABLE_PULSEAUDIO
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
# fail while building on poudriere because it needs network access
# during the building process to download googletest on-the-fly.
TESTS_BUILD_DEPENDS= git>=0:devel/git
TESTS_CMAKE_BOOL= BUILD_TESTS
XKEYBOARD_CMAKE_BOOL= ENABLE_XKEYBOARD
XKEYBOARD_LIB_DEPENDS= libxcb-xkb.so:x11/libxcb
ETCFIX = include/utils/command.hpp \
contrib/bash/polybar \
contrib/zsh/_polybar \
doc/man/polybar.1.rst \
doc/man/polybar.5.rst \
CHANGELOG.md
post-patch:
.for f in ${ETCFIX}
@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|g' ${WRKSRC}/${f}
.endfor
do-test-TESTS-on:
cd ${TEST_WRKSRC} && ${SETENV} BUILD_TESTS=ON \
${SH} ${WRKSRC}/common/travis/tests.sh
.include <bsd.port.mk>