svn commit: r542231 - in head/multimedia/intel-media-sdk: . files
Jan Beich
jbeich at FreeBSD.org
Tue Jul 14 18:40:43 UTC 2020
Author: jbeich
Date: Tue Jul 14 18:40:41 2020
New Revision: 542231
URL: https://svnweb.freebsd.org/changeset/ports/542231
Log:
multimedia/intel-media-sdk: enable tracer
Added:
head/multimedia/intel-media-sdk/files/patch-gettid (contents, props changed)
head/multimedia/intel-media-sdk/files/patch-rtld (contents, props changed)
Deleted:
head/multimedia/intel-media-sdk/files/patch-no-tracer
Modified:
head/multimedia/intel-media-sdk/Makefile (contents, props changed)
head/multimedia/intel-media-sdk/distinfo (contents, props changed)
head/multimedia/intel-media-sdk/pkg-plist (contents, props changed)
Modified: head/multimedia/intel-media-sdk/Makefile
==============================================================================
--- head/multimedia/intel-media-sdk/Makefile Tue Jul 14 18:25:44 2020 (r542230)
+++ head/multimedia/intel-media-sdk/Makefile Tue Jul 14 18:40:41 2020 (r542231)
@@ -3,7 +3,11 @@
PORTNAME= intel-media-sdk
DISTVERSIONPREFIX= intel-mediasdk-
DISTVERSION= 20.2.0
+PORTREVISION= 1
CATEGORIES= multimedia
+
+PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+= 51602d7a5f5e.patch:-p1 # https://github.com/Intel-Media-SDK/MediaSDK/pull/2214
MAINTAINER= jbeich at FreeBSD.org
COMMENT= Hardware video decoding/encoding/filtering on Intel GPUs
Modified: head/multimedia/intel-media-sdk/distinfo
==============================================================================
--- head/multimedia/intel-media-sdk/distinfo Tue Jul 14 18:25:44 2020 (r542230)
+++ head/multimedia/intel-media-sdk/distinfo Tue Jul 14 18:40:41 2020 (r542231)
@@ -1,3 +1,5 @@
TIMESTAMP = 1593712248
SHA256 (Intel-Media-SDK-MediaSDK-intel-mediasdk-20.2.0_GH0.tar.gz) = accfd0358fbc5d62cf1f27f88f30de4226864a9dfd5ec5fb43c78fa36e4723ac
SIZE (Intel-Media-SDK-MediaSDK-intel-mediasdk-20.2.0_GH0.tar.gz) = 10898869
+SHA256 (51602d7a5f5e.patch) = 3e2ee680440148ca0442890432fb42cfe40156437786514eb780c5759f84fb63
+SIZE (51602d7a5f5e.patch) = 2246
Added: head/multimedia/intel-media-sdk/files/patch-gettid
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/multimedia/intel-media-sdk/files/patch-gettid Tue Jul 14 18:40:41 2020 (r542231)
@@ -0,0 +1,49 @@
+In file included from tools/tracer/dumps/dump_mfxstructures.cpp:32:
+In file included from tools/tracer/dumps/../loggers/log.h:24:
+In file included from tools/tracer/dumps/../loggers/log_console.h:23:
+In file included from tools/tracer/dumps/../loggers/ilog.h:25:
+tools/tracer/dumps/../loggers/thread_info.h:38:34: error: use of undeclared identifier 'SYS_gettid'
+ return (long)syscall(SYS_gettid);
+ ^
+
+--- tools/tracer/loggers/thread_info.h.orig 2020-07-02 17:50:48 UTC
++++ tools/tracer/loggers/thread_info.h
+@@ -24,8 +24,18 @@
+ #include <windows.h>
+ #else
+ #include <unistd.h>
++#if defined(__linux__)
+ #include <sys/syscall.h>
++#elif defined(__DragonFly__) || defined(__FreeBSD__)
++#include <pthread_np.h>
++#elif defined(__NetBSD__)
++#include <lwp.h>
++#elif defined(__sun)
++#include <thread.h>
++#else
++#include <stdint.h>
+ #endif
++#endif
+
+ class ThreadInfo
+ {
+@@ -34,8 +44,18 @@ class ThreadInfo (public)
+ {
+ #if defined(_WIN32) || defined(_WIN64)
+ return (long)GetCurrentThreadId();
+- #else
++ #elif defined(__linux__)
+ return (long)syscall(SYS_gettid);
++ #elif defined(__DragonFly__) || defined(__FreeBSD__)
++ return (long)pthread_getthreadid_np();
++ #elif defined(__NetBSD__)
++ return (long)_lwp_self();
++ #elif defined(__OpenBSD__)
++ return (long)getthrid();
++ #elif defined(__sun)
++ return (long)thr_self()();
++ #else
++ return (long)(uintptr_t)pthread_self();
+ #endif
+ };
+
Added: head/multimedia/intel-media-sdk/files/patch-rtld
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/multimedia/intel-media-sdk/files/patch-rtld Tue Jul 14 18:40:41 2020 (r542231)
@@ -0,0 +1,28 @@
+RTLD_DEEPBIND isn't available on non-Linux.
+
+tools/tracer/tracer/tracer_linux.cpp:82:65: error: use of undeclared identifier 'RTLD_DEEPBIND'
+ loader->dlhandle = dlopen(g_mfxlib, RTLD_NOW|RTLD_LOCAL|RTLD_DEEPBIND);
+ ^
+tools/tracer/tracer/tracer_linux.cpp:84:76: error: use of undeclared identifier 'RTLD_DEEPBIND'
+ loader->dlhandle = dlopen(g_mfxlib_in_dir, RTLD_NOW|RTLD_LOCAL|RTLD_DEEPBIND);
+ ^
+tools/tracer/tracer/tracer_linux.cpp:188:65: error: use of undeclared identifier 'RTLD_DEEPBIND'
+ loader->dlhandle = dlopen(g_mfxlib, RTLD_NOW|RTLD_LOCAL|RTLD_DEEPBIND);
+ ^
+tools/tracer/tracer/tracer_linux.cpp:190:76: error: use of undeclared identifier 'RTLD_DEEPBIND'
+ loader->dlhandle = dlopen(g_mfxlib_in_dir, RTLD_NOW|RTLD_LOCAL|RTLD_DEEPBIND);
+ ^
+
+--- tools/tracer/tracer/tracer_linux.cpp.orig 2020-07-02 17:50:48 UTC
++++ tools/tracer/tracer/tracer_linux.cpp
+@@ -40,6 +40,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S
+ #error Unsupported architecture
+ #endif
+
++#if !defined(RTLD_DEEPBIND)
++ #define RTLD_DEEPBIND 0
++#endif
++
+ static const char* g_mfxlib;
+ static const char* g_mfxlib_in_dir;
+
Modified: head/multimedia/intel-media-sdk/pkg-plist
==============================================================================
--- head/multimedia/intel-media-sdk/pkg-plist Tue Jul 14 18:25:44 2020 (r542230)
+++ head/multimedia/intel-media-sdk/pkg-plist Tue Jul 14 18:40:41 2020 (r542231)
@@ -1,5 +1,6 @@
bin/asg-hevc
bin/hevc_fei_extractor
+bin/mfx-tracer-config
include/mfx/mfxadapter.h
include/mfx/mfxastructures.h
include/mfx/mfxaudio++.h
@@ -28,6 +29,9 @@ include/mfx/mfxvideo.h
include/mfx/mfxvp8.h
include/mfx/mfxvp9.h
include/mfx/mfxvstructures.h
+lib/libmfx-tracer.so
+lib/libmfx-tracer.so.1
+lib/libmfx-tracer.so.1.33
lib/libmfx.so
lib/libmfx.so.1
lib/libmfx.so.1.33
More information about the svn-ports-all
mailing list