mbakke pushed a commit to branch staging in repository guix. commit a0c315c470d67b29d12fe7cd2e7a3c03d625b5e4 Author: Marius Bakke <mba...@fastmail.com> AuthorDate: Fri May 22 19:51:01 2020 +0200
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. --- gnu/packages/gl.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index ad8f06b..788fe7c 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"