freebsd-ports/audio/wildmidi/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

69 lines
2 KiB
Makefile

PORTNAME= wildmidi
PORTVERSION= 0.4.2
DISTVERSIONPREFIX= ${PORTNAME}-
CATEGORIES= audio
MAINTAINER= liangtai.s16@gmail.com
COMMENT= Simple software midi player and core softsynth library
WWW= https://www.mindwerks.net/projects/wildmidi/
# player: GPLv3, library: LGPL3
LICENSE= LGPL3
USES= cmake cpe
CPE_VENDOR= mindwerks
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= Mindwerks
OPTIONS_SUB= yes
OPTIONS_RADIO= BACKEND
OPTIONS_RADIO_BACKEND= ALSA OPENAL OSS
OPTIONS_DEFINE= PLAYER PLAYERSTATIC STATIC
OPTIONS_DEFAULT= ALSA PLAYER
STATIC_CMAKE_BOOL= WANT_STATIC
PLAYER_DESC= Simple player
PLAYERSTATIC_DESC= Simple player using STATIC libWildMidi
BACKEND_DESC= Sound system PLAYER and PLAYERSTATIC use
PLAYER_CMAKE_BOOL= WANT_PLAYER
PLAYERSTATIC_CMAKE_BOOL= WANT_PLAYERSTATIC
PLAYERSTATIC_IMPLIES= STATIC
ALSA_CMAKE_BOOL= WANT_ALSA
OPENAL_CMAKE_BOOL= WANT_OPENAL
OSS_CMAKE_BOOL= WANT_OSS
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPLAYER} || ${PORT_OPTIONS:MPLAYERSTATIC}
LICENSE+= GPLv3
LICENSE_COMB= multi
. if ${PORT_OPTIONS:MOPENAL}
USES+= openal:al
. elif ${PORT_OPTIONS:MALSA}
LIB_DEPENDS+= libasound.so:audio/alsa-lib
. endif
.endif
post-patch:
${REINPLACE_CMD} -e "/^dir \/usr\/share\//{" \
-e "s|/usr/share/midi/freepats|${LOCALBASE}/share/freepats|;" \
-e "h; x; s|^|# |; s|freepats|guspat|; H; s|guspat|eawpats|; H;" \
-e "s|eawpats|eawplus|; H; x;}" ${WRKSRC}/cfg/wildmidi.cfg
${REINPLACE_CMD} -e 's@/etc/wildmidi/@${DATADIR}/@' \
-e 's@/etc/@${DATADIR}/@' ${WRKSRC}/docs/man/man1/wildmidi.1 \
${WRKSRC}/docs/man/man5/wildmidi.cfg.5 \
${WRKSRC}/CMakeLists.txt
${REINPLACE_CMD} -e '/INSTALL/s@share/man@man@' \
-e '/pkgconfig/s/$${WILDMIDILIB_INSTALLDIR}/libdata/' \
${WRKSRC}/src/CMakeLists.txt
pre-install:
@${RM} ${WRKSRC}/docs/man/man1/wildmidi.1${REINPLACE_ARGS:S/-i//} \
${WRKSRC}/docs/man/man5/wildmidi.cfg.5${REINPLACE_ARGS:S/-i//}
${MKDIR} ${STAGEDIR}${DATADIR} ; \
${CP} ${WRKSRC}/cfg/wildmidi.cfg ${STAGEDIR}${DATADIR}/wildmidi.cfg.sample
.include <bsd.port.mk>