aboutsummaryrefslogtreecommitdiff
path: root/multimedia/libva
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2012-10-09 22:04:23 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2012-10-09 22:04:23 +0000
commit2ebe0e0a90868450e81e1a01a05c9b993719a6f1 (patch)
tree39f28c9bcd7adf3c909c7418ec7bc47e1da63104 /multimedia/libva
parent5aa5be36712f22588796d003c5fa578c3a8ed350 (diff)
downloadports-2ebe0e0a90868450e81e1a01a05c9b993719a6f1.tar.gz
ports-2ebe0e0a90868450e81e1a01a05c9b993719a6f1.zip
Notes
Diffstat (limited to 'multimedia/libva')
-rw-r--r--multimedia/libva/Makefile33
-rw-r--r--multimedia/libva/distinfo4
-rw-r--r--multimedia/libva/files/extra-patch-va-va_trace.c13
-rw-r--r--multimedia/libva/files/patch-test-v4l_h264-encode-capture.cpp30
-rw-r--r--multimedia/libva/pkg-plist16
5 files changed, 64 insertions, 32 deletions
diff --git a/multimedia/libva/Makefile b/multimedia/libva/Makefile
index 08051adf9d05..723aa396f414 100644
--- a/multimedia/libva/Makefile
+++ b/multimedia/libva/Makefile
@@ -1,23 +1,18 @@
-# New ports collection makefile for: libva
-# Date created: 5 Jan 2011
-# Whom: Anonymous
-#
# $FreeBSD$
-#
PORTNAME= libva
-PORTVERSION= 1.0.14
+PORTVERSION= 1.1.0
CATEGORIES= multimedia
MASTER_SITES= http://cgit.freedesktop.org/${PORTNAME}/snapshot/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= madpilot@FreeBSD.org
COMMENT= VAAPI wrapper and dummy driver
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
-LIB_DEPENDS= drm.2:${PORTSDIR}/graphics/libdrm
+LIB_DEPENDS= drm:${PORTSDIR}/graphics/libdrm
USE_BZIP2= yes
USE_XORG= pciaccess xext xfixes
@@ -33,7 +28,9 @@ LDFLAGS+= -L${LOCALBASE}/lib
# prevent types conflict: videodev2.h vs. drm.h
CFLAGS+= -DHAVE_LINUX_INTEGER_TYPES
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE= DEBUG STRIP
+
+.include <bsd.port.options.mk>
# add strnlen(3) from head/lib/libc/string/strnlen.c
.if ${OSVERSION} < 800067
@@ -44,27 +41,31 @@ EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-va-va_trace.c
BROKEN= glXCreateContext fails during configure
.endif
-.if !defined(WITH_DEBUG)
-CFLAGS+= -DNDEBUG
-.else
+.if ${PORT_OPTIONS:MDEBUG}
CFLAGS+= -D_DEBUG
+.else
+CFLAGS+= -DNDEBUG
.endif
-.if defined(STRIP) && ${STRIP} != ""
+.if {PORT_OPTIONS:MSTRIP}
INSTALL_TARGET= install-strip
.endif
post-patch: .SILENT
${REINPLACE_CMD} -e 's|\($$libdir\)/dri|\1/va|' \
-e 's|$${libdir}/\(pkgconfig\)|$${prefix}/libdata/\1|' \
+ -e 's/\(LIBVA_LT_CURRENT\)=libva_lt_current/\1=1/' \
+ -e 's/\(LIBVA_LT_REV\)=libva_lt_revision/\1=3300/' \
+ -e 's/\(LIBVA_LT_AGE\)=libva_lt_age/\1=0/' \
${WRKSRC}/configure.ac
- ${REINPLACE_CMD} 's/va\(info\)/\1/' \
+ ${REINPLACE_CMD} -e 's/va\(info\)/\1/g' -e 's/info\.c/vainfo\.c/' \
${WRKSRC}/test/vainfo/Makefile.am
+ ${REINPLACE_CMD} '/^export VA_HEADER_/d' \
+ ${WRKSRC}/doc/Makefile.am
${REINPLACE_CMD} 's/-ldl//' ${WRKSRC}/va/Makefile.am
post-configure: .SILENT
${REINPLACE_CMD} 's/-lpthread/${PTHREAD_LIBS}/' \
- ${WRKSRC}/i965_drv_video/Makefile \
${WRKSRC}/test/putsurface/Makefile
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/multimedia/libva/distinfo b/multimedia/libva/distinfo
index e4c56b41ec65..1d2c849bd353 100644
--- a/multimedia/libva/distinfo
+++ b/multimedia/libva/distinfo
@@ -1,2 +1,2 @@
-SHA256 (libva-1.0.14.tar.bz2) = b15ab93b549651a07664ced831b20e559e0f7edabb57169af8049b3e761ea764
-SIZE (libva-1.0.14.tar.bz2) = 769706
+SHA256 (libva-1.1.0.tar.bz2) = 4505200f7fdf862c832448662b7c14133ff984313e7d4f2530f7184bb3821353
+SIZE (libva-1.1.0.tar.bz2) = 539195
diff --git a/multimedia/libva/files/extra-patch-va-va_trace.c b/multimedia/libva/files/extra-patch-va-va_trace.c
index 072b905167b3..5554365ea7bd 100644
--- a/multimedia/libva/files/extra-patch-va-va_trace.c
+++ b/multimedia/libva/files/extra-patch-va-va_trace.c
@@ -1,6 +1,6 @@
---- va/va_trace.c~
-+++ va/va_trace.c
-@@ -140,6 +140,17 @@ VAStatus vaUnlockSurface(VADisplay dpy,
+--- va/va_trace.c.orig 2012-10-04 15:30:51.000000000 +0200
++++ va/va_trace.c 2012-10-09 23:12:35.888197737 +0200
+@@ -137,6 +137,18 @@
VASurfaceID surface
);
@@ -15,6 +15,7 @@
+ }
+ return (len);
+}
-
- void va_TraceInit(VADisplay dpy)
- {
++
+ #define FILE_NAME_SUFFIX(env_value) \
+ do { \
+ int tmp = strnlen(env_value, sizeof(env_value)); \
diff --git a/multimedia/libva/files/patch-test-v4l_h264-encode-capture.cpp b/multimedia/libva/files/patch-test-v4l_h264-encode-capture.cpp
new file mode 100644
index 000000000000..cfea87dc01bc
--- /dev/null
+++ b/multimedia/libva/files/patch-test-v4l_h264-encode-capture.cpp
@@ -0,0 +1,30 @@
+--- test/v4l_h264/encode/capture.cpp.orig 2012-10-04 15:30:51.000000000 +0200
++++ test/v4l_h264/encode/capture.cpp 2012-10-08 22:31:01.067189237 +0200
+@@ -37,7 +37,11 @@
+ #include <fcntl.h> /* low-level i/o */
+ #include <errno.h>
+ #include <unistd.h>
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+ #include <sys/ioctl.h>
+@@ -451,10 +455,15 @@
+ }
+ for (n_buffers = 0; n_buffers < 4; ++n_buffers) {
+ buffers[n_buffers].length = buffer_size;
++#ifdef __FreeBSD__
++ if(posix_memalign(&buffers[n_buffers].start, page_size, buffer_size))
++ {
++#else
+ buffers[n_buffers].start = memalign (/* boundary */ page_size,
+ buffer_size);
+
+ if (!buffers[n_buffers].start) {
++#endif
+ std::cerr << "Out of memory\n";
+ exit (EXIT_FAILURE);
+ }
diff --git a/multimedia/libva/pkg-plist b/multimedia/libva/pkg-plist
index d4ef1a4b849f..1c1b9fdefc2c 100644
--- a/multimedia/libva/pkg-plist
+++ b/multimedia/libva/pkg-plist
@@ -1,25 +1,25 @@
bin/vaavcenc
bin/vah264encode
bin/vainfo
+bin/valoadjpeg
bin/vampeg2vldemo
bin/vaputsurface
include/va/va.h
include/va/va_backend.h
-include/va/va_backend_egl.h
include/va/va_backend_glx.h
include/va/va_backend_tpi.h
-include/va/va_dri.h
+include/va/va_dec_jpeg.h
include/va/va_dri2.h
include/va/va_dricommon.h
-include/va/va_dummy.h
-include/va/va_egl.h
+include/va/va_drm.h
+include/va/va_drmcommon.h
include/va/va_glx.h
include/va/va_tpi.h
include/va/va_version.h
include/va/va_x11.h
-lib/libva-egl.la
-lib/libva-egl.so
-lib/libva-egl.so.1
+lib/libva-drm.la
+lib/libva-drm.so
+lib/libva-drm.so.1
lib/libva-glx.la
lib/libva-glx.so
lib/libva-glx.so.1
@@ -34,7 +34,7 @@ lib/libva.so
lib/libva.so.1
lib/va/dummy_drv_video.la
lib/va/dummy_drv_video.so
-libdata/pkgconfig/libva-egl.pc
+libdata/pkgconfig/libva-drm.pc
libdata/pkgconfig/libva-glx.pc
libdata/pkgconfig/libva-tpi.pc
libdata/pkgconfig/libva-x11.pc