gnu: mesa: Use 'modify-phases'.

* gnu/packages/gl.scm (mesa)[arguments]: Use 'modify-phases' syntax.
This commit is contained in:
Efraim Flashner 2016-08-23 21:18:39 +03:00
parent 5c6d027306
commit e8a7a180e8
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 38 additions and 37 deletions

View File

@ -252,43 +252,44 @@ also known as DXTn or DXTC) for Mesa.")
'()) '())
(_ (_
'("--with-dri-drivers=nouveau,r200,radeon,swrast")))) '("--with-dri-drivers=nouveau,r200,radeon,swrast"))))
#:phases (alist-cons-after #:phases
'unpack 'patch-create_test_cases (modify-phases %standard-phases
(lambda _ (add-after
(substitute* "src/compiler/glsl/tests/lower_jumps/create_test_cases.py" 'unpack 'patch-create_test_cases
(("/usr/bin/env bash") (which "bash"))) (lambda _
(substitute* "src/intel/genxml/gen_pack_header.py" (substitute* "src/compiler/glsl/tests/lower_jumps/create_test_cases.py"
(("/usr/bin/env python2") (which "python")))) (("/usr/bin/env bash") (which "bash")))
(alist-cons-before (substitute* "src/intel/genxml/gen_pack_header.py"
'build 'fix-dlopen-libnames (("/usr/bin/env python2") (which "python")))))
(lambda* (#:key inputs outputs #:allow-other-keys) (add-before
(let ((s2tc (assoc-ref inputs "s2tc")) 'build 'fix-dlopen-libnames
(udev (assoc-ref inputs "udev")) (lambda* (#:key inputs outputs #:allow-other-keys)
(out (assoc-ref outputs "out"))) (let ((s2tc (assoc-ref inputs "s2tc"))
;; Remain agnostic to .so.X.Y.Z versions while doing (udev (assoc-ref inputs "udev"))
;; the substitutions so we're future-safe. (out (assoc-ref outputs "out")))
(substitute* ;; Remain agnostic to .so.X.Y.Z versions while doing
'("src/gallium/auxiliary/util/u_format_s3tc.c" ;; the substitutions so we're future-safe.
"src/mesa/main/texcompress_s3tc.c") (substitute*
(("\"libtxc_dxtn\\.so") '("src/gallium/auxiliary/util/u_format_s3tc.c"
(string-append "\"" s2tc "/lib/libtxc_dxtn.so"))) "src/mesa/main/texcompress_s3tc.c")
(substitute* "src/loader/loader.c" (("\"libtxc_dxtn\\.so")
(("udev_handle = dlopen\\(name") (string-append "\"" s2tc "/lib/libtxc_dxtn.so")))
(string-append "udev_handle = dlopen(\"" (substitute* "src/loader/loader.c"
udev "/lib/libudev.so\""))) (("udev_handle = dlopen\\(name")
(substitute* "src/glx/dri_common.c" (string-append "udev_handle = dlopen(\""
(("dlopen\\(\"libGL\\.so") udev "/lib/libudev.so\"")))
(string-append "dlopen(\"" out "/lib/libGL.so"))) (substitute* "src/glx/dri_common.c"
(substitute* "src/egl/drivers/dri2/egl_dri2.c" (("dlopen\\(\"libGL\\.so")
(("\"libglapi\\.so") (string-append "dlopen(\"" out "/lib/libGL.so")))
(string-append "\"" out "/lib/libglapi.so"))) (substitute* "src/egl/drivers/dri2/egl_dri2.c"
(substitute* "src/gbm/main/backend.c" (("\"libglapi\\.so")
;; No need to patch the gbm_gallium_drm.so reference; (string-append "\"" out "/lib/libglapi.so")))
;; it's never installed since Mesa removed its (substitute* "src/gbm/main/backend.c"
;; egl_gallium support. ;; No need to patch the gbm_gallium_drm.so reference;
(("\"gbm_dri\\.so") ;; it's never installed since Mesa removed its
(string-append "\"" out "/lib/dri/gbm_dri.so"))))) ;; egl_gallium support.
%standard-phases)))) (("\"gbm_dri\\.so")
(string-append "\"" out "/lib/dri/gbm_dri.so")))))))))
(home-page "http://mesa3d.org/") (home-page "http://mesa3d.org/")
(synopsis "OpenGL implementation") (synopsis "OpenGL implementation")
(description "Mesa is a free implementation of the OpenGL specification - (description "Mesa is a free implementation of the OpenGL specification -