guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: mesa: Fix file names passed to dlopen(3).


From: Taylan Ulrich B.
Subject: 01/02: gnu: mesa: Fix file names passed to dlopen(3).
Date: Thu, 19 Mar 2015 16:21:24 +0000

taylanub pushed a commit to branch master
in repository guix.

commit e682c327b1226898192afb70a49f40a112417624
Author: Taylan Ulrich Bayırlı/Kammer <address@hidden>
Date:   Sat Mar 14 14:57:27 2015 +0100

    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.
---
 gnu/packages/gl.scm |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 55a6e64..585905c 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -223,16 +223,30 @@ also known as DXTn or DXTC) for Mesa.")
                     (substitute* 
"src/glsl/tests/lower_jumps/create_test_cases.py"
                       (("/usr/bin/env bash") (which "bash"))))
                   (alist-cons-before
-                   'build 'fix-dxtn-libname
-                   (lambda* (#:key inputs #:allow-other-keys)
-                     (let ((s2tc (assoc-ref inputs "s2tc")))
+                   'build 'fix-dlopen-libnames
+                   (lambda* (#:key inputs outputs #:allow-other-keys)
+                     (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
                        ;; the substitutions so we're future-safe.
                        (substitute*
                            '("src/gallium/auxiliary/util/u_format_s3tc.c"
                              "src/mesa/main/texcompress_s3tc.c")
                          (("\"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)))))
     (home-page "http://mesa3d.org/";)
     (synopsis "OpenGL implementation")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]