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

105 lines
2.5 KiB
Makefile

PORTNAME= xawtv
PORTVERSION= 3.107
CATEGORIES= multimedia
MASTER_SITES= http://linuxtv.org/downloads/xawtv/
MAINTAINER= oliver@FreeBSD.org
COMMENT= TV viewing application and a few TV utilities
WWW= https://linuxtv.org/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
ONLY_FOR_ARCHS= amd64 armv7 i386 powerpc powerpc64 powerpc64le
BUILD_DEPENDS= ${LOCALBASE}/share/fonts/misc/led-iso8859-1.pcf.gz:x11-fonts/tv-fonts
RUN_DEPENDS= ${LOCALBASE}/share/fonts/misc/led-iso8859-1.pcf.gz:x11-fonts/tv-fonts
LIB_DEPENDS= libpng.so:graphics/png
USES= cpe gmake iconv jpeg motif ncurses perl5 tar:bzip2 pkgconfig xorg
CPE_VENDOR= linuxtv
OPTIONS_DEFINE= AALIB BKTR DV QUICKTIME ZVBI
OPTIONS_DEFINE_i386= MMX
OPTIONS_DEFAULT= AALIB BKTR
.if !exists(/usr/include/dev/bktr/ioctl_bt848.h)
OPTIONS_EXCLUDE= BKTR
.endif
OPTIONS_SUB= yes
BKTR_DESC= bktr(4) support
ZVBI_DESC= Enable libzvbi support
BKTR_MAKE_ARGS= HAVE_BKTR=yes
GNU_CONFIGURE= yes
USE_XORG= x11 xaw
CPPFLAGS+= -I${WRKSRC}/common
LIBS+= -L${LOCALBASE}/lib
MAKE_ENV= verbose=yes
USE_LDCONFIG= yes
FILES_LIBJPEG= console/Subdir.mk x11/Subdir.mk libng/plugins/Subdir.mk
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MAALIB}
CONFIGURE_ARGS+=--enable-aa
LIB_DEPENDS+= libaa.so:graphics/aalib
.else
CONFIGURE_ARGS+=--disable-aa
.endif
.if ${PORT_OPTIONS:MZVBI}
LIB_DEPENDS+= libzvbi.so:devel/libzvbi
CONFIGURE_ARGS+=--enable-zvbi
.else
CONFIGURE_ARGS+=--enable-zvbi=no
.endif
.if ${PORT_OPTIONS:MDV}
LIB_DEPENDS+= libdv.so:multimedia/libdv
CONFIGURE_ARGS+=--enable-dv
.else
CONFIGURE_ARGS+=--enable-dv=no
.endif
.if ${PORT_OPTIONS:MMMX}
CONFIGURE_ARGS+=--enable-mmx
CFLAGS+= -DMMX=1
.endif
.if ${PORT_OPTIONS:MQUICKTIME}
CONFIGURE_ARGS+=--enable-quicktime
LIB_DEPENDS+= libquicktime.so:multimedia/libquicktime
.else
CONFIGURE_ARGS+=--enable-quicktime=no
.endif
PLIST_SUB+= X11PREFIX=${LOCALBASE}
post-patch:
@${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g; \
s|/usr/local|${LOCALBASE}|g; \
s|-lquicktime|-L${LOCALBASE}/lib &|g; \
s|LIBV4L="yes"|LIBV4L="no"|g; \
s|-lunicode|-liconv &|g' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|-ldl||g' \
${WRKSRC}/console/Subdir.mk \
${WRKSRC}/x11/Subdir.mk
@${REINPLACE_CMD} -e 's|linuxyesyes|bsdyesyes|g' \
${WRKSRC}/x11/Subdir.mk
@${REINPLACE_CMD} -e 's|\(@CFLAGS@.*\)\$$(LIB_FLAGS) |\$$(LIB_FLAGS) \1|g; \
s|-Llibng||g' \
${WRKSRC}/Makefile.in
.for i in ${FILES_LIBJPEG}
@${REINPLACE_CMD} -e "s|-ljpeg|-L${LOCALBASE}/lib -ljpeg|g" ${WRKSRC}/$i
.endfor
.include <bsd.port.post.mk>