pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/multimedia/libva libva: put a temp bandaid on the gian...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e3cfb2896868
branches: trunk
changeset: 358962:e3cfb2896868
user: maya <maya%pkgsrc.org@localhost>
date: Fri Feb 24 03:25:36 2017 +0000
description:
libva: put a temp bandaid on the giant mess I created (sorry)
a circular dependency of MesaLib - now libva will not depend on it,
this breaks stuff but unbreaks the tree ASAP
add a patch so va_trace.c should compile on freebsd, dragonflybsd, linux
and netbsd -- excluding it is a bad idea (undefined references, oops)
indirectly put openbsd as a broken platform for now
still fails at runtime with mpv.
bump PKGREVISION.
diffstat:
multimedia/libva/Makefile | 11 +-
multimedia/libva/PLIST | 10 +--
multimedia/libva/available.mk | 8 +-
multimedia/libva/distinfo | 4 +-
multimedia/libva/patches/patch-ad | 15 ----
multimedia/libva/patches/patch-va_va__trace.c | 90 +++++++++++++++++++++++++++
6 files changed, 105 insertions(+), 33 deletions(-)
diffs (220 lines):
diff -r 6ecfa86f03e1 -r e3cfb2896868 multimedia/libva/Makefile
--- a/multimedia/libva/Makefile Fri Feb 24 01:04:28 2017 +0000
+++ b/multimedia/libva/Makefile Fri Feb 24 03:25:36 2017 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.10 2017/02/24 00:10:04 maya Exp $
+# $NetBSD: Makefile,v 1.11 2017/02/24 03:25:36 maya Exp $
#
DISTNAME= libva-1.7.3
+PKGREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= http://www.freedesktop.org/software/vaapi/releases/libva/
EXTRACT_SUFX= .tar.bz2
@@ -37,10 +38,10 @@
pre-configure:
cd ${WRKSRC} && autoreconf -i
-.include "../../graphics/MesaLib/buildlink3.mk"
-.if !empty(MESALIB_SUPPORTS_EGL:Myes)
-PLIST.egl= yes
-.endif
+#.include "../../graphics/MesaLib/buildlink3.mk"
+#.if !empty(MESALIB_SUPPORTS_EGL:Myes)
+#PLIST.egl= yes
+#.endif
.include "../../x11/libXfixes/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
diff -r 6ecfa86f03e1 -r e3cfb2896868 multimedia/libva/PLIST
--- a/multimedia/libva/PLIST Fri Feb 24 01:04:28 2017 +0000
+++ b/multimedia/libva/PLIST Fri Feb 24 03:25:36 2017 +0000
@@ -1,8 +1,6 @@
-@comment $NetBSD: PLIST,v 1.5 2017/02/24 00:10:04 maya Exp $
+@comment $NetBSD: PLIST,v 1.6 2017/02/24 03:25:36 maya Exp $
include/va/va.h
include/va/va_backend.h
-${PLIST.egl}include/va/va_backend_egl.h
-include/va/va_backend_glx.h
include/va/va_backend_tpi.h
include/va/va_backend_vpp.h
include/va/va_compat.h
@@ -14,27 +12,21 @@
include/va/va_dricommon.h
include/va/va_drm.h
include/va/va_drmcommon.h
-${PLIST.egl}include/va/va_egl.h
include/va/va_enc_h264.h
include/va/va_enc_hevc.h
include/va/va_enc_jpeg.h
include/va/va_enc_mpeg2.h
include/va/va_enc_vp8.h
include/va/va_enc_vp9.h
-include/va/va_glx.h
include/va/va_tpi.h
include/va/va_version.h
include/va/va_vpp.h
include/va/va_x11.h
lib/libva-drm.la
-${PLIST.egl}lib/libva-egl.la
-lib/libva-glx.la
lib/libva-tpi.la
lib/libva-x11.la
lib/libva.la
lib/pkgconfig/libva-drm.pc
-${PLIST.egl}lib/pkgconfig/libva-egl.pc
-lib/pkgconfig/libva-glx.pc
lib/pkgconfig/libva-tpi.pc
lib/pkgconfig/libva-x11.pc
lib/pkgconfig/libva.pc
diff -r 6ecfa86f03e1 -r e3cfb2896868 multimedia/libva/available.mk
--- a/multimedia/libva/available.mk Fri Feb 24 01:04:28 2017 +0000
+++ b/multimedia/libva/available.mk Fri Feb 24 03:25:36 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: available.mk,v 1.5 2017/02/24 00:10:04 maya Exp $
+# $NetBSD: available.mk,v 1.6 2017/02/24 03:25:36 maya Exp $
.include "../../mk/bsd.prefs.mk"
@@ -7,7 +7,11 @@
# i.e. in mplayer, xine, xbmc etc. Have a look at buildlink3.mk too.
# The following should be kept up-to-date!
-.if ${OPSYS} != "Darwin"
+.if ${OPSYS} == "FreeBSD"
+VAAPI_AVAILABLE= yes
+.elif ${OPSYS} == "NetBSD"
+VAAPI_AVAILABLE= yes
+.elif ${OPSYS} == "Linux"
VAAPI_AVAILABLE= yes
.else
VAAPI_AVAILABLE= no
diff -r 6ecfa86f03e1 -r e3cfb2896868 multimedia/libva/distinfo
--- a/multimedia/libva/distinfo Fri Feb 24 01:04:28 2017 +0000
+++ b/multimedia/libva/distinfo Fri Feb 24 03:25:36 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2017/02/24 00:10:04 maya Exp $
+$NetBSD: distinfo,v 1.6 2017/02/24 03:25:36 maya Exp $
SHA1 (libva-1.7.3.tar.bz2) = 18e46f3d5a0e971eb0ec9fe14bc021e69eb13fb8
RMD160 (libva-1.7.3.tar.bz2) = d29e432f666df9df8b312c45cd7d9ec2f6ef6e3c
@@ -6,5 +6,5 @@
Size (libva-1.7.3.tar.bz2) = 824490 bytes
SHA1 (patch-aa) = 3e4966037c46fada25cc869b672a7e78dda5b04b
SHA1 (patch-ac) = 776cd2f381ec974bf25054b949912a713d832ae3
-SHA1 (patch-ad) = d19b14007a7b031a6b8d2ec2607057b2dea839c9
SHA1 (patch-va_glx_va__glx__private.h) = daf6552189295a86f1f073ef107b7449e4098251
+SHA1 (patch-va_va__trace.c) = 874c1ec2abd16368fb0df7de57ba17521d08b3c2
diff -r 6ecfa86f03e1 -r e3cfb2896868 multimedia/libva/patches/patch-ad
--- a/multimedia/libva/patches/patch-ad Fri Feb 24 01:04:28 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-ad,v 1.3 2017/02/24 00:10:05 maya Exp $
-
-Don't build va_trace.c - it requires linux-specific stuff,
-and is used for tracing (and doesn't seem necessary).
-
---- va/Makefile.am.orig 2016-11-10 00:34:35.000000000 +0000
-+++ va/Makefile.am
-@@ -33,7 +33,6 @@ libva_source_c = \
- va.c \
- va_compat.c \
- va_fool.c \
-- va_trace.c \
- $(NULL)
-
- libva_source_h = \
diff -r 6ecfa86f03e1 -r e3cfb2896868 multimedia/libva/patches/patch-va_va__trace.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/libva/patches/patch-va_va__trace.c Fri Feb 24 03:25:36 2017 +0000
@@ -0,0 +1,90 @@
+$NetBSD: patch-va_va__trace.c,v 1.1 2017/02/24 03:25:36 maya Exp $
+
+attempt to provide syscall(__NR_gettid) for most
+systems. inspired by lldb Host.cpp
+
+--- va/va_trace.c.orig 2016-11-10 00:34:35.000000000 +0000
++++ va/va_trace.c
+@@ -48,6 +48,12 @@
+ #include <sys/stat.h>
+ #include <sys/syscall.h>
+ #include <pthread.h>
++#if defined(__FreeBSD__) || defined(__DragonFly__)
++#include <pthread_np.h>
++#endif
++#if defined(__NetBSD__)
++#include <lwp.h>
++#endif
+ #include <unistd.h>
+ #include <time.h>
+ #include <errno.h>
+@@ -294,7 +300,13 @@ static void add_trace_config_info(
+ {
+ struct trace_config_info *pconfig_info;
+ int idx = 0;
++#if defined(__linux__)
+ pid_t thd_id = syscall(__NR_gettid);
++#elif defined(__NetBSD__)
++ pid_t thd_id = _lwp_self();
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++ pid_t thd_id = pthread_getthreadid_np();
++#endif
+
+ LOCK_RESOURCE(pva_trace);
+
+@@ -318,7 +330,13 @@ static void delete_trace_config_info(
+ {
+ struct trace_config_info *pconfig_info;
+ int idx = 0;
++#if defined(__linux__)
+ pid_t thd_id = syscall(__NR_gettid);
++#elif defined(__NetBSD__)
++ pid_t thd_id = _lwp_self();
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++ pid_t thd_id = pthread_getthreadid_np();
++#endif
+
+ LOCK_RESOURCE(pva_trace);
+
+@@ -665,7 +683,13 @@ static struct trace_log_file *start_trac
+ {
+ struct trace_log_files_manager *plog_files_mgr = NULL;
+ struct trace_log_file *plog_file = NULL;
++#if defined(__linux__)
+ pid_t thd_id = syscall(__NR_gettid);
++#elif defined(__NetBSD__)
++ pid_t thd_id = _lwp_self();
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++ pid_t thd_id = pthread_getthreadid_np();
++#endif
+ int i = 0;
+
+ LOCK_RESOURCE(pva_trace);
+@@ -704,7 +728,13 @@ static void refresh_log_file(
+ struct trace_context *ptra_ctx)
+ {
+ struct trace_log_file *plog_file = NULL;
++#if defined(__linux__)
+ pid_t thd_id = syscall(__NR_gettid);
++#elif defined(__NetBSD__)
++ pid_t thd_id = _lwp_self();
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++ pid_t thd_id = pthread_getthreadid_np();
++#endif
+ int i = 0;
+
+ plog_file = ptra_ctx->plog_file;
+@@ -1226,7 +1256,13 @@ static void internal_TraceUpdateContext
+ {
+ struct trace_context *trace_ctx = NULL;
+ int i = 0, delete = 1;
++#if defined(__linux__)
+ pid_t thd_id = syscall(__NR_gettid);
++#elif defined(__NetBSD__)
++ pid_t thd_id = _lwp_self();
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++ pid_t thd_id = pthread_getthreadid_np();
++#endif
+
+ if(tra_ctx_idx >= MAX_TRACE_CTX_NUM)
+ return;
Home |
Main Index |
Thread Index |
Old Index