Add new port multimedia/libva:

The main motivation for VAAPI (Video Acceleration API) is to enable
hardware accelerated video decode/encode at various entry-points (VLD,
IDCT, Motion Compensation etc.) for the prevailing coding standards
today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).

WWW:	http://freedesktop.org/wiki/Software/vaapi

PR:		ports/153725
Submitted by:	Anonymous <swell.k at gmail.com>
Feature safe:	yes
This commit is contained in:
Max Brazhnikov 2011-01-13 11:02:02 +00:00
parent 70e7247b6e
commit 9b191dbf46
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=267737
7 changed files with 153 additions and 0 deletions

61
multimedia/libva/Makefile Normal file
View file

@ -0,0 +1,61 @@
# New ports collection makefile for: libva
# Date created: 5 Jan 2011
# Whom: Anonymous
#
# $FreeBSD$
#
PORTNAME= libva
PORTVERSION= 1.0.7
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/Makefile.am
${REINPLACE_CMD} 's/-ldl//' ${WRKSRC}/va/Makefile.am
${REINPLACE_CMD} 's/dummy.*LDFLAGS.*/& -Wl,-lc/' \
${WRKSRC}/dummy_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>

View file

@ -0,0 +1,2 @@
SHA256 (libva-1.0.7.tar.bz2) = 4c33ceb3cef3a7be542ed0f87f3cb75838b5d0c1246a39319138ca4df98c73fb
SIZE (libva-1.0.7.tar.bz2) = 462067

View file

@ -0,0 +1,13 @@
--- i965_drv_video/Makefile.am~
+++ i965_drv_video/Makefile.am
@@ -26,8 +26,8 @@ AM_CFLAGS = -Wall -I$(top_srcdir) -I$(to
i965_drv_video_la_LTLIBRARIES = i965_drv_video.la
i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@
-i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel
-i965_drv_video_la_LIBADD = ../va/libva-x11.la -lpthread
+i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel -pthread
+i965_drv_video_la_LIBADD = ../va/libva-x11.la
i965_drv_video_la_SOURCES = \
object_heap.c \

View file

@ -0,0 +1,13 @@
--- test/putsurface/Makefile.am~ 2011-01-05 02:07:32.000000000 +0300
+++ test/putsurface/Makefile.am 2011-01-05 02:07:54.000000000 +0300
@@ -23,8 +23,9 @@
bin_PROGRAMS = putsurface
AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
+AM_LDFLAGS = -pthread
-TEST_LIBS = $(top_builddir)/va/$(libvabackendlib) -lpthread
+TEST_LIBS = $(top_builddir)/va/$(libvabackendlib)
putsurface_LDADD = $(TEST_LIBS)
putsurface_SOURCES = putsurface.c

View file

@ -0,0 +1,11 @@
--- va/glx/va_glx_private.h~
+++ va/glx/va_glx_private.h
@@ -38,7 +38,7 @@ typedef void (*PFNGLXBINDTEXIMAGEEXTPROC
typedef void (*PFNGLXRELEASETEXIMAGEEXTPROC)(Display *, GLXDrawable, int);
#endif
-#if GLX_GLXEXT_VERSION < 27
+#if GLX_GLXEXT_VERSION < 21
/* XXX: this is not exactly that version but this is the only means to
make sure we have the correct <GL/glx.h> with those signatures */
typedef GLXPixmap (*PFNGLXCREATEPIXMAPPROC)(Display *, GLXFBConfig, Pixmap, const int *);

View file

@ -0,0 +1,6 @@
The main motivation for VAAPI (Video Acceleration API) is to enable
hardware accelerated video decode/encode at various entry-points (VLD,
IDCT, Motion Compensation etc.) for the prevailing coding standards
today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).
WWW: http://freedesktop.org/wiki/Software/vaapi

View file

@ -0,0 +1,47 @@
bin/vah264encode
bin/vainfo
bin/vampeg2vldemo
bin/vaputsurface
bin/vatest_01
bin/vatest_02
bin/vatest_03
bin/vatest_04
bin/vatest_05
bin/vatest_06
bin/vatest_07
bin/vatest_08
bin/vatest_09
bin/vatest_10
bin/vatest_11
include/va/va.h
include/va/va_backend.h
include/va/va_backend_glx.h
include/va/va_backend_tpi.h
include/va/va_dri.h
include/va/va_dri2.h
include/va/va_dricommon.h
include/va/va_dummy.h
include/va/va_glx.h
include/va/va_tpi.h
include/va/va_version.h
include/va/va_x11.h
lib/libva-glx.la
lib/libva-glx.so
lib/libva-glx.so.1
lib/libva-tpi.la
lib/libva-tpi.so
lib/libva-tpi.so.1
lib/libva-x11.la
lib/libva-x11.so
lib/libva-x11.so.1
lib/libva.la
lib/libva.so
lib/libva.so.1
lib/va/dummy_drv_video.la
lib/va/dummy_drv_video.so
libdata/pkgconfig/libva-glx.pc
libdata/pkgconfig/libva-tpi.pc
libdata/pkgconfig/libva-x11.pc
libdata/pkgconfig/libva.pc
@dirrm include/va
@dirrmtry lib/va