aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/libva/Makefile
blob: 9a997fb41c1d58e75a95558f08fa1fe8b810c03b (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
# New ports collection makefile for:    libva
# Date created:             5 Jan 2011
# Whom:                 Anonymous
#
# $FreeBSD$
#

PORTNAME=   libva
PORTVERSION=    1.0.10
CATEGORIES= multimedia
MASTER_SITES=   http://cgit.freedesktop.org/${PORTNAME}/snapshot/

MAINTAINER= swell.k@gmail.com
COMMENT=    VAAPI wrapper and dummy driver

BUILD_DEPENDS=  ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
LIB_DEPENDS=    drm.2:${PORTSDIR}/graphics/libdrm

LICENSE=    MIT
LICENSE_FILE=   ${WRKSRC}/COPYING

USE_BZIP2=  yes
USE_XORG=   xext xfixes
USE_GL=     gl
USE_AUTOTOOLS=  aclocal autoheader automake autoconf libtoolize
ACLOCAL_ARGS=   -I.
AUTOMAKE_ARGS=  --add-missing
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --program-prefix=va
USE_LDCONFIG=   yes

CPPFLAGS+=  -isystem${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
# prevent types conflict: videodev2.h vs. drm.h
CFLAGS+=    -DHAVE_LINUX_INTEGER_TYPES

.include <bsd.port.pre.mk>

.if !defined(WITH_DEBUG)
CFLAGS+=    -DNDEBUG
.else
CFLAGS+=    -D_DEBUG
.endif

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

post-patch: .SILENT
    ${REINPLACE_CMD} -e 's|\($$libdir\)/dri|\1/va|' \
        -e 's|$${libdir}/\(pkgconfig\)|$${prefix}/libdata/\1|' \
        ${WRKSRC}/configure.ac
    ${REINPLACE_CMD} 's/va\(info\)/\1/' \
        ${WRKSRC}/test/vainfo/Makefile.am
    ${REINPLACE_CMD} 's/-ldl//' ${WRKSRC}/va/Makefile.am
    ${REINPLACE_CMD} 's/LDFLAGS.*/& -Wl,-lc/' \
        ${WRKSRC}/dummy_drv_video/Makefile.am \
        ${WRKSRC}/i965_drv_video/Makefile.am
    ${REINPLACE_CMD} 's/-pthread/${PTHREAD_LIBS}/' \
        ${WRKSRC}/i965_drv_video/Makefile.am \
        ${WRKSRC}/test/putsurface/Makefile.am

.include <bsd.port.post.mk>