blob: 788cb0eb036931747d28f33c5a8535af583a15ef (
plain) (
blame)
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
|
# Created by: Andrew Thompson <thompsa@FreeBSD.org>
# $FreeBSD$
# Check v4l_compat and v4l-utils slave ports
PORTNAME?= libv4l
PORTVERSION= 1.6.3
PORTREVISION?= 0
CATEGORIES= multimedia
MASTER_SITES= http://linuxtv.org/downloads/v4l-utils/:master \
LOCAL/kwm:local
DISTFILES+= v4l-utils-${PORTVERSION}.tar.bz2:master \
linux-3.16.7-dvb-headers.tar.xz:local
MAINTAINER= multimedia@FreeBSD.org
COMMENT?= Video4Linux library
LICENSE= GPLv2 LGPL21
LICENSE_COMB= dual
LIBV4L_SLAVE?= no
USES= tar:bzip2
WRKSRC= ${WRKDIR}/v4l-utils-${PORTVERSION}
.if ${LIBV4L_SLAVE} != compat
BUILD_DEPENDS+= v4l_compat>=${PORTVERSION}:${PORTSDIR}/multimedia/v4l_compat
LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg \
libargp.so:${PORTSDIR}/devel/argp-standalone
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USES+= gmake iconv libtool pathfix pkgconfig
USE_LDCONFIG= yes
CONFIGURE_ARGS= --enable-libdvbv5 \
--disable-qv4l2 \
--without-libudev
INSTALL_TARGET= install-strip
. if ${LIBV4L_SLAVE} == utils
BUILD_DEPENDS+= libv4l>=${PORTVERSION}:${PORTSDIR}/multimedia/libv4l
LIB_DEPENDS+= libv4l2.so:${PORTSDIR}/multimedia/libv4l
# Disabling building libv4l in the utils slave is too much hackery
# Lets wait for subpackages
CONFIGURE_ARGS+=--enable-v4l-utils
. else
CONFIGURE_ARGS+=--disable-v4l-utils --enable-libv4l
. endif
.endif
HEADER_PATCHES= extra-linux_dvb_ca.h \
extra-linux_dvb_osd.h \
patch-include_linux_dvb_frontend.h \
patch-include_linux_dvb_video.h
post-patch:
@${REINPLACE_CMD} -e 's|$$libdir/pkgconfig|${PREFIX}/libdata/pkgconfig|g' \
${WRKSRC}/configure
# fix weird types, except a few headers which have compat code for these types.
@${FIND} ${WRKDIR} -type f \( -iname "*.h" ! -iname "input.h" ! -iname "videodev2.h" \) | \
${XARGS} -n 10 ${REINPLACE_CMD} \
-e 's|linux/types.h|sys/types.h|g; s|__user||g; \
s|__u8|uint8_t|g; s|__s8|int8_t|g; \
s|__u16|uint16_t|g; s|__s16|int16_t|g; \
s|__u32|uint32_t|g; s|__s32|int32_t|g; \
s|__u64|uint64_t|g; s|__s64|int64_t|g'
.if ${LIBV4L_SLAVE} == compat
.for patch in ${HEADER_PATCHES}
@cd ${WRKDIR}/linux && ${PATCH} -p2 < ${FILESDIR}/${patch}
.endfor
.endif
.include <bsd.port.mk>
|