2013-09-20 22:57:48 +02:00
|
|
|
# Created by: Andrew Thompson <thompsa@FreeBSD.org>
|
2010-01-16 21:46:33 +01:00
|
|
|
# $FreeBSD$
|
2015-06-14 06:59:37 +02:00
|
|
|
# Check v4l_compat and v4l-utils slave ports
|
2010-01-16 21:46:33 +01:00
|
|
|
|
2015-06-14 06:59:37 +02:00
|
|
|
PORTNAME?= libv4l
|
|
|
|
PORTVERSION= 1.6.3
|
2016-09-13 20:10:12 +02:00
|
|
|
PORTREVISION?= 2
|
2010-01-16 21:46:33 +01:00
|
|
|
CATEGORIES= multimedia
|
2015-06-14 06:59:37 +02:00
|
|
|
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
|
2010-01-16 21:46:33 +01:00
|
|
|
|
2015-06-14 06:59:37 +02:00
|
|
|
MAINTAINER= multimedia@FreeBSD.org
|
|
|
|
COMMENT?= Video4Linux library
|
2010-01-16 21:46:33 +01:00
|
|
|
|
2015-06-14 06:59:37 +02:00
|
|
|
LICENSE= GPLv2 LGPL21
|
|
|
|
LICENSE_COMB= dual
|
2010-01-16 21:46:33 +01:00
|
|
|
|
2015-06-14 06:59:37 +02:00
|
|
|
LIBV4L_SLAVE?= no
|
|
|
|
|
|
|
|
USES= tar:bzip2
|
|
|
|
WRKSRC= ${WRKDIR}/v4l-utils-${PORTVERSION}
|
|
|
|
|
|
|
|
.if ${LIBV4L_SLAVE} != compat
|
2016-04-01 16:16:16 +02:00
|
|
|
BUILD_DEPENDS+= v4l_compat>=${PORTVERSION}:multimedia/v4l_compat
|
2015-06-14 06:59:37 +02:00
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2015-06-22 20:33:20 +02:00
|
|
|
USES+= gmake iconv jpeg libtool pathfix pkgconfig
|
2010-01-16 21:46:33 +01:00
|
|
|
USE_LDCONFIG= yes
|
2015-06-14 06:59:37 +02:00
|
|
|
CONFIGURE_ARGS= --enable-libdvbv5 \
|
|
|
|
--disable-qv4l2 \
|
|
|
|
--without-libudev
|
|
|
|
INSTALL_TARGET= install-strip
|
|
|
|
|
|
|
|
. if ${LIBV4L_SLAVE} == utils
|
2016-04-01 16:16:16 +02:00
|
|
|
BUILD_DEPENDS+= libv4l>=${PORTVERSION}:multimedia/libv4l
|
|
|
|
LIB_DEPENDS+= libargp.so:devel/argp-standalone \
|
|
|
|
libv4l2.so:multimedia/libv4l
|
2015-08-15 17:48:05 +02:00
|
|
|
# Disabling building libv4l in the utils slave is too much hackery
|
2015-06-14 06:59:37 +02:00
|
|
|
# Lets wait for subpackages
|
2015-08-15 17:48:05 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-v4l-utils
|
2015-06-14 06:59:37 +02:00
|
|
|
. else
|
|
|
|
CONFIGURE_ARGS+=--disable-v4l-utils --enable-libv4l
|
2015-08-15 17:48:05 +02:00
|
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-configure
|
2015-06-14 06:59:37 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
2010-01-16 21:46:33 +01:00
|
|
|
|
2015-06-14 06:59:37 +02:00
|
|
|
HEADER_PATCHES= extra-linux_dvb_ca.h \
|
|
|
|
extra-linux_dvb_osd.h \
|
|
|
|
patch-include_linux_dvb_frontend.h \
|
|
|
|
patch-include_linux_dvb_video.h
|
2010-11-04 21:49:04 +01:00
|
|
|
|
2010-01-16 21:46:33 +01:00
|
|
|
post-patch:
|
2015-06-14 06:59:37 +02:00
|
|
|
@${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
|
2010-01-16 21:46:33 +01:00
|
|
|
|
2014-02-03 14:57:46 +01:00
|
|
|
.include <bsd.port.mk>
|