freebsd-ports/multimedia/openh264/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

71 lines
2.0 KiB
Makefile

PORTNAME= openh264
DISTVERSIONPREFIX=v
DISTVERSION= 2.3.0
PORTEPOCH= 2
CATEGORIES= multimedia
MAINTAINER= gecko@FreeBSD.org
COMMENT= Cisco implementation of H.264 codec
WWW= https://www.openh264.org/
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USE_GITHUB= yes
GH_ACCOUNT= cisco
USES= cpe gmake
CPE_VENDOR= cisco
USE_LDCONFIG= yes
MAKE_ARGS= PREFIX="${PREFIX}" \
OS=bsd ARCH="${ARCH:S/amd64/x86_64/}" \
CCASFLAGS='$$(CFLAGS) ${ASFLAGS}' \
CFLAGS_OPT="" CFLAGS_DEBUG=""
ALL_TARGET= all
PLIST_SUB= PORTVERSION="${PORTVERSION}"
LDFLAGS_i386= -Wl,-znotext
OPTIONS_DEFINE= DEBUG PLUGINS TEST
OPTIONS_DEFAULT=PLUGINS
OPTIONS_SUB= yes
DEBUG_BUILD_DEPENDS_OFF= ${DEBUG_BUILD_DEPENDS_OFF_${ARCH}}
DEBUG_BUILD_DEPENDS_OFF_amd64= nasm:devel/nasm
DEBUG_BUILD_DEPENDS_OFF_i386= nasm:devel/nasm
DEBUG_MAKE_ARGS=BUILDTYPE=Debug
PLUGINS_BUILD_DEPENDS=gmp-api>=34.0:multimedia/gmp-api
# gmp-api<36.0:multimedia/gmp-api
PLUGINS_CFLAGS= -I${LOCALBASE}/include/gmp-api
PLUGINS_MAKE_ARGS=HAVE_GMP_API=Yes
PLUGINS_ALL_TARGET=plugin
PLUGINS_USES= webplugin:gecko
WEBPLUGIN_NAME= gmp-gmp${PORTNAME}
WEBPLUGIN_FILES=gmp${PORTNAME}.info libgmp${PORTNAME}.so
SUB_FILES+= gmp${PORTNAME}.js
SUB_LIST+= PORTVERSION=${PORTVERSION} \
TIMESTAMP="`${AWK} '/TIMESTAMP/ { print $$$$$$$$$3 }' ${DISTINFO_FILE}`"
TEST_BUILD_DEPENDS=googletest>=1.6.0:devel/googletest
TEST_CFLAGS= -I${LOCALBASE}/include
TEST_MAKE_ARGS= HAVE_GTEST=Yes
TEST_ALL_TARGET=test
post-patch:
${REINPLACE_CMD} -e '/gtest-targets\.mk/d' \
-e '/pkgconfig/s/$$(LIBDIR_NAME)/libdata/' \
${WRKSRC}/Makefile
pre-build:
${LN} -sf ${LOCALBASE}/lib/libgtest.so ${WRKSRC}/libgtest.a
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so.*
post-install-PLUGINS-on:
${MKDIR} ${STAGEDIR}${WEBPLUGIN_DIR}
${INSTALL_DATA} ${WRKSRC}/gmp${PORTNAME}.info ${STAGEDIR}${WEBPLUGIN_DIR}
${INSTALL_LIB} ${WRKSRC}/libgmp${PORTNAME}.so ${STAGEDIR}${WEBPLUGIN_DIR}
${INSTALL_DATA} ${WRKDIR}/gmp${PORTNAME}.js ${STAGEDIR}${WEBPLUGIN_DIR}
.include <bsd.port.mk>