gnu: ao-cad: Point 'LD_LIBRARY_PATH' to Mesa.

* gnu/packages/engineering.scm (ao)[arguments]: In
'install-guile-bindings', wrap 'ao-guile' to set 'LD_LIBRARY_PATH'.
[inputs]: Add MESA.
This commit is contained in:
Ludovic Courtès 2017-01-06 22:14:48 +01:00
parent a2bd16ff99
commit d7d5050c51
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 11 additions and 2 deletions

View File

@ -3,7 +3,7 @@
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 David Thompson <davet@gnu.org> ;;; Copyright © 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org> ;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
@ -545,7 +545,7 @@ as well as pick-place files.")
(getenv "CPLUS_INCLUDE_PATH"))) (getenv "CPLUS_INCLUDE_PATH")))
#t))) #t)))
(add-after 'install 'install-guile-bindings (add-after 'install 'install-guile-bindings
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
;; Install the Guile bindings (the build system only installs ;; Install the Guile bindings (the build system only installs
;; libao.so.) ;; libao.so.)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
@ -574,6 +574,14 @@ as well as pick-place files.")
(install-file "bin/ao-guile" (install-file "bin/ao-guile"
(string-append out "/bin")) (string-append out "/bin"))
;; Allow Ao to dlopen the relevant GL libraries. Otherwise
;; it fails with:
;; Couldn't find current GLX or EGL context.
(let ((mesa (assoc-ref inputs "mesa")))
(wrap-program (string-append out "/bin/ao-guile")
`("LD_LIBRARY_PATH" ":" prefix
(,(string-append mesa "/lib")))))
#t))))))) #t)))))))
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config))) `(("pkg-config" ,pkg-config)))
@ -583,6 +591,7 @@ as well as pick-place files.")
("libpng" ,libpng) ("libpng" ,libpng)
("glfw" ,glfw) ("glfw" ,glfw)
("libepoxy" ,libepoxy) ("libepoxy" ,libepoxy)
("mesa" ,mesa)
("eigen" ,eigen) ("eigen" ,eigen)
("glm" ,glm) ("glm" ,glm)
("guile" ,guile-2.0))) ("guile" ,guile-2.0)))