mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 22:38:07 -05:00
gnu: mesa: Fix file names passed to dlopen(3).
* gnu/packages/gl.scm (mesa): Patch source files to make file names passed to dlopen(3) absolute.
This commit is contained in:
parent
a78f535d9a
commit
e682c327b1
1 changed files with 18 additions and 4 deletions
|
@ -223,16 +223,30 @@ (define-public mesa
|
||||||
(substitute* "src/glsl/tests/lower_jumps/create_test_cases.py"
|
(substitute* "src/glsl/tests/lower_jumps/create_test_cases.py"
|
||||||
(("/usr/bin/env bash") (which "bash"))))
|
(("/usr/bin/env bash") (which "bash"))))
|
||||||
(alist-cons-before
|
(alist-cons-before
|
||||||
'build 'fix-dxtn-libname
|
'build 'fix-dlopen-libnames
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let ((s2tc (assoc-ref inputs "s2tc")))
|
(let ((s2tc (assoc-ref inputs "s2tc"))
|
||||||
|
(udev (assoc-ref inputs "udev"))
|
||||||
|
(out (assoc-ref outputs "out")))
|
||||||
;; Remain agnostic to .so.X.Y.Z versions while doing
|
;; Remain agnostic to .so.X.Y.Z versions while doing
|
||||||
;; the substitutions so we're future-safe.
|
;; the substitutions so we're future-safe.
|
||||||
(substitute*
|
(substitute*
|
||||||
'("src/gallium/auxiliary/util/u_format_s3tc.c"
|
'("src/gallium/auxiliary/util/u_format_s3tc.c"
|
||||||
"src/mesa/main/texcompress_s3tc.c")
|
"src/mesa/main/texcompress_s3tc.c")
|
||||||
(("\"libtxc_dxtn\\.so")
|
(("\"libtxc_dxtn\\.so")
|
||||||
(string-append "\"" s2tc "/lib/libtxc_dxtn.so")))))
|
(string-append "\"" s2tc "/lib/libtxc_dxtn.so")))
|
||||||
|
(substitute* "src/gallium/targets/egl-static/egl_st.c"
|
||||||
|
(("\"libglapi\"")
|
||||||
|
(string-append "\"" out "/lib/libglapi\"")))
|
||||||
|
(substitute* "src/loader/loader.c"
|
||||||
|
(("dlopen\\(\"libudev\\.so")
|
||||||
|
(string-append "dlopen(\"" udev "/lib/libudev.so")))
|
||||||
|
(substitute* "src/glx/dri_common.c"
|
||||||
|
(("dlopen\\(\"libGL\\.so")
|
||||||
|
(string-append "dlopen(\"" out "/lib/libGL.so")))
|
||||||
|
(substitute* "src/egl/drivers/dri2/egl_dri2.c"
|
||||||
|
(("\"libglapi\\.so")
|
||||||
|
(string-append "\"" out "/lib/libglapi.so")))))
|
||||||
%standard-phases)))))
|
%standard-phases)))))
|
||||||
(home-page "http://mesa3d.org/")
|
(home-page "http://mesa3d.org/")
|
||||||
(synopsis "OpenGL implementation")
|
(synopsis "OpenGL implementation")
|
||||||
|
|
Loading…
Reference in a new issue