aboutsummaryrefslogtreecommitdiff
path: root/multimedia/vdpau-video/Makefile
blob: a471b95020b403bb2e6ed70e748a8691c4762f78 (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
# New ports collection makefile for:	vdpau-video
# Date created:				5 Jan 2011
# Whom:					Anonymous
#
# $FreeBSD$
#

PORTNAME=	vdpau-video
DISTVERSION=	0.7.3
CATEGORIES=	multimedia
MASTER_SITES=	http://www.splitted-desktop.com/~gbeauchesne/${PORTNAME}/

MAINTAINER=	swell.k@gmail.com
COMMENT=	A VDPAU-based backend for VAAPI

LICENSE=	GPLv2 GPLv3
LICENSE_COMB=	dual

LIB_DEPENDS=	vdpau.1:${PORTSDIR}/multimedia/libvdpau
BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/libva.pc:${PORTSDIR}/multimedia/libva \
		${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat

LICENSE_FILE_GPLv2=	${WRKSRC}/COPYING
USE_GMAKE=	yes
USE_GL=		gl

GNU_CONFIGURE=	yes
CPPFLAGS+=	-isystem${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

.include <bsd.port.pre.mk>

VDPAU_PTHREAD_LIBS!=	${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE}


.if !defined(WITH_DEBUG)
CONFIGURE_ARGS+=	--disable-debug
.endif

.if defined(STRIP) && ${STRIP} != ""
INSTALL_TARGET=	install-strip
.endif

post-patch:	.SILENT
	${REINPLACE_CMD} -e '/LIBS/{ s/-ldl//; \
		s/-lrt//; s/-lpthread/${PTHREAD_LIBS}/; }' \
		-e 's|driverdir|& --define-variable prefix=${PREFIX}|' \
		-e '/\^vdpau_version/s|$$CC -E|& ${CPPFLAGS}|' \
		 ${WRKSRC}/configure
	${REINPLACE_CMD} 's/^vdpau.*LDFLAGS.*/& \
		-Wl,-lc ${VDPAU_PTHREAD_LIBS:S/^/-Wl,/}/' \
		${WRKSRC}/src/Makefile.in

.include <bsd.port.post.mk>