diff options
author | Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> | 2015-04-28 17:48:24 +0200 |
---|---|---|
committer | Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> | 2015-04-30 09:20:48 +0200 |
commit | 372cf03981fea2e8f95be88c8a986f996c812d14 (patch) | |
tree | fbf5d740b08fc3d22bd47c626692e22826783f0a /gnu | |
parent | d9c41939bdc616c6a5110414ad8905d01e7e7b8f (diff) | |
download | patches-372cf03981fea2e8f95be88c8a986f996c812d14.tar patches-372cf03981fea2e8f95be88c8a986f996c812d14.tar.gz |
gnu: libva: Patch a dlopen call, set drivers path.
* gnu/packages/video.scm (libva): Patch the reference to libva-x11.so (passed
to dlopen()) to use an absolute path. Add --with-drivers-path= to
#:configure-flags with a value pointing to mesa's $prefix/lib/dri.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/video.scm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 2e2460d792..c890d45d19 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -264,6 +264,27 @@ SMPTE 314M.") ("libxext" ,libxext) ("libxfixes" ,libxfixes) ("mesa" ,mesa))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before + 'build 'fix-dlopen-paths + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "va/drm/va_drm_auth_x11.c" + (("\"libva-x11\\.so\\.%d\"") + (string-append "\"" out "/lib/libva-x11.so.%d\""))))))) + ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be + ;; overridden at run-time via LIBVA_DRIVERS_PATH.) + #:configure-flags + (list (string-append "--with-drivers-path=" + (assoc-ref %build-inputs "mesa") "/lib/dri")) + ;; However, we can't write to mesa's store directory, so override the + ;; following make variable to install the dummy driver to libva's + ;; $prefix/lib/dri directory. + #:make-flags + (list (string-append "dummy_drv_video_ladir=" + (assoc-ref %outputs "out") "/lib/dri")))) (home-page "http://www.freedesktop.org/wiki/Software/vaapi/") (synopsis "Video acceleration library") (description "The main motivation for VA-API (Video Acceleration API) is |