summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-05-22 19:51:01 +0200
committerMarius Bakke <marius@gnu.org>2020-05-26 22:36:09 +0200
commit5a746104e3c91400099377fcc4bd763b9e91fb96 (patch)
tree77b6ef5984a2f880a435abea4e3c91afb8f2eb72
parent577041e60b1d1816b1bc1fa9862ad7c7ea64c33d (diff)
downloadguix-5a746104e3c91400099377fcc4bd763b9e91fb96.tar.gz
gnu: Mesa: Fix substitutions for absolute library references.
* gnu/packages/gl.scm (mesa)[arguments]: In the 'fix-dlopen-libnames' phase,
adjust substitutions so that they patch the correct files.
-rw-r--r--gnu/packages/gl.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index ad8f06b0dc..788fe7c5c4 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -357,16 +357,16 @@ also known as DXTn or DXTC) for Mesa.")
                        (("'u_format_test',") ""))
                      #t)))
                '())
-         (add-before
-           'configure 'fix-dlopen-libnames
+         (add-before 'configure 'fix-dlopen-libnames
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
                ;; Remain agnostic to .so.X.Y.Z versions while doing
                ;; the substitutions so we're future-safe.
-               (substitute* "src/glx/dri_common.c"
-                 (("dlopen\\(\"libGL\\.so")
-                  (string-append "dlopen(\"" out "/lib/libGL.so")))
-               (substitute* "src/egl/drivers/dri2/egl_dri2.c"
+               (substitute* "src/glx/meson.build"
+                 (("-DGL_LIB_NAME=\"lib@0@\\.so\\.@1@\"")
+                  (string-append "-DGL_LIB_NAME=\"" out
+                                 "/lib/lib@0@.so.@1@\"")))
+               (substitute* "src/gbm/backends/dri/gbm_dri.c"
                  (("\"libglapi\\.so")
                   (string-append "\"" out "/lib/libglapi.so")))
                (substitute* "src/gbm/main/backend.c"