libvdpau: fix tracing feature (#355297)
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
--- a/trace/meson.build 2020-02-15 16:34:58.698832000 +0100
|
||||
+++ b/trace/meson.build 2020-02-15 16:39:05.359952802 +0100
|
||||
@@ -4,5 +4,5 @@
|
||||
dependencies : libdl,
|
||||
version : '1.0.0',
|
||||
install : true,
|
||||
- install_dir : moduledir,
|
||||
+ install_dir : get_option('prefix') + '/lib/libvdpau',
|
||||
)
|
||||
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
|
||||
url = "https://gitlab.freedesktop.org/vdpau/libvdpau/-/archive/${version}/${pname}-${version}.tar.bz2";
|
||||
sha256 = "sha256-pdUKQrjCiP68BxUatkOsjeBqGERpZcckH4m06BCCGRM=";
|
||||
};
|
||||
patches = [ ./installdir.patch ];
|
||||
patches = [ ./tracing.patch ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@@ -21,6 +21,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lX11";
|
||||
|
||||
# The tracing library in this package must be conditionally loaded with dlopen().
|
||||
# Therefore, we must restore the RPATH entry for the library itself that was removed by the patchelf hook.
|
||||
postFixup = lib.optionalString stdenv.hostPlatform.isElf ''
|
||||
patchelf $out/lib/libvdpau.so --add-rpath $out/lib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.freedesktop.org/wiki/Software/VDPAU/";
|
||||
description = "Library to use the Video Decode and Presentation API for Unix (VDPAU)";
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
diff --git a/src/vdpau_wrapper.c b/src/vdpau_wrapper.c
|
||||
index 79dcb94..6249af4 100644
|
||||
--- a/src/vdpau_wrapper.c
|
||||
+++ b/src/vdpau_wrapper.c
|
||||
@@ -185,8 +185,7 @@ static VdpStatus _vdp_open_driver(
|
||||
if (vdpau_trace && atoi(vdpau_trace)) {
|
||||
SetDllHandle * set_dll_handle;
|
||||
|
||||
- _vdp_trace_dll = dlopen(VDPAU_MODULEDIR "/libvdpau_trace.so.1",
|
||||
- RTLD_NOW | RTLD_GLOBAL);
|
||||
+ _vdp_trace_dll = dlopen("libvdpau_trace.so.1", RTLD_NOW | RTLD_GLOBAL);
|
||||
if (!_vdp_trace_dll) {
|
||||
fprintf(stderr, "Failed to open VDPAU trace library %s\n", dlerror());
|
||||
_VDP_ERROR_BREAKPOINT();
|
||||
diff --git a/trace/meson.build b/trace/meson.build
|
||||
index 5381b8b..4af408f 100644
|
||||
--- a/trace/meson.build
|
||||
+++ b/trace/meson.build
|
||||
@@ -4,5 +4,4 @@ trace = shared_library('vdpau_trace',
|
||||
dependencies : libdl,
|
||||
version : '1.0.0',
|
||||
install : true,
|
||||
- install_dir : moduledir,
|
||||
)
|
||||
Reference in New Issue
Block a user