Skip to content
Snippets Groups Projects
Commit 372cf039 authored by Taylan Ulrich Bayırlı/Kammer's avatar Taylan Ulrich Bayırlı/Kammer
Browse files

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.
parent d9c41939
No related branches found
No related tags found
No related merge requests found
...@@ -264,6 +264,27 @@ (define-public libva ...@@ -264,6 +264,27 @@ (define-public libva
("libxext" ,libxext) ("libxext" ,libxext)
("libxfixes" ,libxfixes) ("libxfixes" ,libxfixes)
("mesa" ,mesa))) ("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/") (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
(synopsis "Video acceleration library") (synopsis "Video acceleration library")
(description "The main motivation for VA-API (Video Acceleration API) is (description "The main motivation for VA-API (Video Acceleration API) is
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment