summaryrefslogtreecommitdiffstats
path: root/multimedia/xawtv/Makefile
blob: e642d36702a85c8ef66ce79364e1bdcfee293465 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Created by: George Reid <greid@ukug.uk.freebsd.org>
# $FreeBSD$

PORTNAME=	xawtv
PORTVERSION=	3.103
CATEGORIES=	multimedia
MASTER_SITES=	http://linuxtv.org/downloads/xawtv/

MAINTAINER=	oliver@FreeBSD.org
COMMENT=	TV viewing application and a few TV utilities

BUILD_DEPENDS=	${LOCALBASE}/lib/X11/fonts/misc/led-iso8859-1.pcf.gz:${PORTSDIR}/x11-fonts/tv-fonts
RUN_DEPENDS=	${LOCALBASE}/lib/X11/fonts/misc/led-iso8859-1.pcf.gz:${PORTSDIR}/x11-fonts/tv-fonts
LIB_DEPENDS=	libpng15.so:${PORTSDIR}/graphics/png \
		libjpeg.so:${PORTSDIR}/graphics/jpeg

OPTIONS_DEFINE=	AALIB DV QUICKTIME ZVBI
OPTIONS_DEFINE_i386=	MMX
OPTIONS_DEFAULT=	AALIB
ZVBI_DESC=	Enable libzvbi support

USES=		gmake iconv motif perl5 tar:bzip2
GNU_CONFIGURE=	yes
USE_XORG=	x11 xaw
CPPFLAGS+=	-I${WRKSRC}/common
LIBS+=		-L${LOCALBASE}/lib
MAKE_ENV=	verbose=yes
USE_LDCONFIG=	yes
ONLY_FOR_ARCHS=	alpha amd64 i386

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:${PORTSDIR}/graphics/aalib
PLIST_SUB+=	AA=""
.else
CONFIGURE_ARGS+=--disable-aa
PLIST_SUB+=	AA="@comment "
.endif

.if ${PORT_OPTIONS:MZVBI}
LIB_DEPENDS+=	libzvbi.so:${PORTSDIR}/devel/libzvbi
CONFIGURE_ARGS+=--enable-zvbi
PLIST_SUB+=	ZVBI="" ZVBI5=""
.else
CONFIGURE_ARGS+=--enable-zvbi=no
PLIST_SUB+=	ZVBI="@comment " ZVBI5="@comment "
.endif

.if ${PORT_OPTIONS:MDV}
LIB_DEPENDS+=	libdv.so:${PORTSDIR}/multimedia/libdv
CONFIGURE_ARGS+=--enable-dv
PLIST_SUB+=	DV=
.else
CONFIGURE_ARGS+=--enable-dv=no
PLIST_SUB+=	DV="@comment "
.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:${PORTSDIR}/multimedia/libquicktime
PLIST_SUB+=	QT=
.else
CONFIGURE_ARGS+=--enable-quicktime=no
PLIST_SUB+=	QT="@comment "
.endif

PLIST_SUB+=	X11PREFIX=${LOCALBASE}

post-patch:
	@${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g; \
		s|/usr/local|${LOCALBASE}|g; \
		s|-lpthread|${PTHREAD_LIBS}|g; \
		s|-lquicktime|-L${LOCALBASE}/lib &|g; \
		s|LIBV4L="yes"|LIBV4L="no"|g' \
		${WRKSRC}/configure

	@${REINPLACE_CMD} -e 's|-ldl||g' \
		${WRKSRC}/console/Subdir.mk \
		${WRKSRC}/x11/Subdir.mk

.for i in ${FILES_LIBJPEG}
	@${REINPLACE_CMD} -e "s|-ljpeg|-L${LOCALBASE}/lib -ljpeg|g" ${WRKSRC}/$i
.endfor

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud