aboutsummaryrefslogtreecommitdiff
path: root/multimedia/libva
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2019-01-17 23:54:42 +0000
committerJan Beich <jbeich@FreeBSD.org>2019-01-17 23:54:42 +0000
commit09384ce004cba35e5d736a6f1d890f754dc488e7 (patch)
tree9db08bc764430fdea1c0eccfb1d7c0753f4a88c9 /multimedia/libva
parent7723e7d2bf16fabcc70a47b9f3e321fea788559a (diff)
downloadports-09384ce004cba35e5d736a6f1d890f754dc488e7.tar.gz
ports-09384ce004cba35e5d736a6f1d890f754dc488e7.zip
multimedia/libva{,-intel-driver}: clean up
- Add BUILD_DEPENDS to intel driver for wl_drm_interface fix - Rewrite gettid() to make it easier to maintain - Update description from upstream - Drop unused v4l_compat dependency - Drop unused USES=alias as <alloca.h> is gone - Drop libGL dependency as intel driver uses libEGL via dlopen on Wayland - Drop --program-prefix after vainfo moved to libva-utils - Drop fmake workaround as USES=gmake is used - Drop -ldl workaround for FreeBSD < 11.2 - Drop RTLD_NODELETE workaround for FreeBSD < 8.0 - Drop GLX_GLXEXT_VERSION workaround for Mesa < 7.8.1 - Drop Created by as the port diverged a lot (even more with Meson) - Hint intel driver isn't actively developed (but still maintained) - Clarify libdrm dependency
Notes
Notes: svn path=/head/; revision=490611
Diffstat (limited to 'multimedia/libva')
-rw-r--r--multimedia/libva/Makefile16
-rw-r--r--multimedia/libva/files/patch-va_glx_va__glx__private.h11
-rw-r--r--multimedia/libva/files/patch-va_va.c11
-rw-r--r--multimedia/libva/files/patch-va_va__trace.c88
-rw-r--r--multimedia/libva/pkg-descr8
5 files changed, 60 insertions, 74 deletions
diff --git a/multimedia/libva/Makefile b/multimedia/libva/Makefile
index 8d7f0ec38b6b..5cf57391a66a 100644
--- a/multimedia/libva/Makefile
+++ b/multimedia/libva/Makefile
@@ -2,7 +2,7 @@
PORTNAME= libva
PORTVERSION= 2.3.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= multimedia
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
@@ -15,23 +15,18 @@ COMMENT= VAAPI wrapper and dummy driver
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
-RUN_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
LIB_DEPENDS= libdrm.so:graphics/libdrm
-USES= autoreconf gmake libtool localbase pkgconfig tar:bzip2
+USES= autoreconf gmake libtool pkgconfig tar:bzip2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --program-prefix=va
INSTALL_TARGET= install-strip
USE_GITHUB= yes
GH_ACCOUNT= intel
-LDFLAGS+= -lpthread
-# prevent types conflict: videodev2.h vs. drm.h
-CFLAGS+= -DHAVE_LINUX_INTEGER_TYPES
+LDFLAGS+= -lpthread # for pthread_getthreadid_np
OPTIONS_DEFINE= DEBUG WAYLAND X11
OPTIONS_DEFAULT=WAYLAND X11
@@ -51,8 +46,7 @@ post-patch: .SILENT
${REINPLACE_CMD} -e 's|$${libdir}/\(pkgconfig\)|${PREFIX}/libdata/\1|' \
-e 's/"$$USE_X11:$$enable_glx" != "yes:no"/"$$USE_X11" != "no"/' \
${WRKSRC}/configure.ac
- ${REINPLACE_CMD} '/^export VA_HEADER_/d' \
- ${WRKSRC}/doc/Makefile.am
- ${REINPLACE_CMD} 's/-ldl//' ${WRKSRC}/va/Makefile.am
+# V4L2 is unused since http://github.com/intel/libva/commit/70074679333c
+ ${REINPLACE_CMD} '/videodev2\.h/d' ${WRKSRC}/va/va_backend.h
.include <bsd.port.mk>
diff --git a/multimedia/libva/files/patch-va_glx_va__glx__private.h b/multimedia/libva/files/patch-va_glx_va__glx__private.h
deleted file mode 100644
index 19aa82a91ca7..000000000000
--- a/multimedia/libva/files/patch-va_glx_va__glx__private.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- va/glx/va_glx_private.h.orig 2017-10-21 04:49:28 UTC
-+++ va/glx/va_glx_private.h
-@@ -38,7 +38,7 @@ typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, G
- 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 *);
diff --git a/multimedia/libva/files/patch-va_va.c b/multimedia/libva/files/patch-va_va.c
deleted file mode 100644
index c93738827602..000000000000
--- a/multimedia/libva/files/patch-va_va.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- va/va.c.orig 2017-10-21 04:49:28 UTC
-+++ va/va.c
-@@ -350,7 +350,7 @@ static VAStatus va_openDriver(VADisplay dpy, char *dri
- strncat( driver_path, DRIVER_EXTENSION, strlen(DRIVER_EXTENSION) );
-
- va_infoMessage(dpy, "Trying to open %s\n", driver_path);
--#ifndef ANDROID
-+#if !defined(ANDROID) && defined(RTLD_NODELETE)
- handle = dlopen( driver_path, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE );
- #else
- handle = dlopen( driver_path, RTLD_NOW| RTLD_GLOBAL);
diff --git a/multimedia/libva/files/patch-va_va__trace.c b/multimedia/libva/files/patch-va_va__trace.c
index a2c68629524b..70920a4a7faf 100644
--- a/multimedia/libva/files/patch-va_va__trace.c
+++ b/multimedia/libva/files/patch-va_va__trace.c
@@ -1,68 +1,82 @@
+- Implement gettid() for BSDs
+
--- va/va_trace.c.orig 2018-02-12 06:32:11 UTC
+++ va/va_trace.c
-@@ -50,6 +50,9 @@
+@@ -48,12 +48,40 @@
+ #include <unistd.h>
+ #include <sys/types.h>
#include <sys/stat.h>
- #include <sys/syscall.h>
+-#include <sys/syscall.h>
#include <pthread.h>
-+#ifdef __FreeBSD__
-+#include <pthread_np.h>
-+#endif
#include <unistd.h>
#include <time.h>
#include <errno.h>
-@@ -290,7 +293,13 @@ static void add_trace_config_info(
+
++#if defined(__linux__)
++#include <sys/syscall.h>
++#elif defined(__DragonFly__)
++#include <sys/lwp.h>
++#elif defined(__FreeBSD__)
++#include <pthread_np.h>
++#elif defined(__NetBSD__)
++#include <lwp.h>
++#else // OpenBSD, Solaris
++#include <stdint.h>
++#endif
++
++#if !defined(__BIONIC__)
++static pid_t gettid()
++{
++#if defined(__linux__)
++ return syscall(__NR_gettid);
++#elif defined(__DragonFly__)
++ return lwp_gettid();
++#elif defined(__FreeBSD__)
++ return pthread_getthreadid_np();
++#elif defined(__NetBSD__)
++ return _lwp_self();
++#else // OpenBSD, Solaris
++ return (intptr_t) pthread_self();
++#endif
++}
++#endif
++
+ /*
+ * Env. to debug some issue, e.g. the decode/encode issue in a video conference scenerio:
+ * .LIBVA_TRACE=log_file: general VA parameters saved into log_file
+@@ -290,7 +318,7 @@ static void add_trace_config_info(
{
struct trace_config_info *pconfig_info;
int idx = 0;
-+#ifdef __FreeBSD__
-+ pid_t thd_id = pthread_getthreadid_np();
-+#elif defined __DragonFly__
-+ pid_t thd_id = syscall(SYS_lwp_gettid);
-+#else
- pid_t thd_id = syscall(__NR_gettid);
-+#endif
+- pid_t thd_id = syscall(__NR_gettid);
++ pid_t thd_id = gettid();
LOCK_RESOURCE(pva_trace);
-@@ -668,7 +677,13 @@ static struct trace_log_file *start_tracing2log_file(
+@@ -668,7 +696,7 @@ static struct trace_log_file *start_tracing2log_file(
{
struct trace_log_files_manager *plog_files_mgr = NULL;
struct trace_log_file *plog_file = NULL;
-+#ifdef __FreeBSD__
-+ pid_t thd_id = pthread_getthreadid_np();
-+#elif defined __DragonFly__
-+ pid_t thd_id = syscall(SYS_lwp_gettid);
-+#else
- pid_t thd_id = syscall(__NR_gettid);
-+#endif
+- pid_t thd_id = syscall(__NR_gettid);
++ pid_t thd_id = gettid();
int i = 0;
LOCK_RESOURCE(pva_trace);
-@@ -707,7 +722,13 @@ static void refresh_log_file(
+@@ -707,7 +735,7 @@ static void refresh_log_file(
struct trace_context *ptra_ctx)
{
struct trace_log_file *plog_file = NULL;
-+#ifdef __FreeBSD__
-+ pid_t thd_id = pthread_getthreadid_np();
-+#elif defined __DragonFly__
-+ pid_t thd_id = syscall(SYS_lwp_gettid);
-+#else
- pid_t thd_id = syscall(__NR_gettid);
-+#endif
+- pid_t thd_id = syscall(__NR_gettid);
++ pid_t thd_id = gettid();
int i = 0;
plog_file = ptra_ctx->plog_file;
-@@ -1230,7 +1251,13 @@ static void internal_TraceUpdateContext (
+@@ -1230,7 +1258,7 @@ static void internal_TraceUpdateContext (
{
struct trace_context *trace_ctx = NULL;
int i = 0, delete = 1;
-+#ifdef __FreeBSD__
-+ pid_t thd_id = pthread_getthreadid_np();
-+#elif defined __DragonFly__
-+ pid_t thd_id = syscall(SYS_lwp_gettid);
-+#else
- pid_t thd_id = syscall(__NR_gettid);
-+#endif
+- pid_t thd_id = syscall(__NR_gettid);
++ pid_t thd_id = gettid();
if(tra_ctx_idx >= MAX_TRACE_CTX_NUM)
return;
diff --git a/multimedia/libva/pkg-descr b/multimedia/libva/pkg-descr
index b075ef0b945c..2a510e2f0aa3 100644
--- a/multimedia/libva/pkg-descr
+++ b/multimedia/libva/pkg-descr
@@ -1,6 +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).
+VA-API is an open-source library and API specification, which provides
+access to graphics hardware acceleration capabilities for video
+processing. It consists of a main library and driver-specific
+acceleration backends for each supported hardware vendor.
WWW: https://github.com/intel/libva