[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: gnu: ao-cad: Point 'LD_LIBRARY_PATH' to Mesa.
From: |
Ludovic Courtès |
Subject: |
01/01: gnu: ao-cad: Point 'LD_LIBRARY_PATH' to Mesa. |
Date: |
Fri, 6 Jan 2017 23:51:46 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit d7d5050c51d6b2bb1843bbcdf60c4d19dd880020
Author: Ludovic Courtès <address@hidden>
Date: Fri Jan 6 22:14:48 2017 +0100
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.
---
gnu/packages/engineering.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 831e63b..b147764 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2015 Federico Beffa <address@hidden>
;;; Copyright © 2016 Efraim Flashner <address@hidden>
;;; Copyright © 2016 David Thompson <address@hidden>
-;;; Copyright © 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2016, 2017 Ludovic Courtès <address@hidden>
;;; Copyright © 2016 Theodoros Foradis <address@hidden>
;;;
;;; This file is part of GNU Guix.
@@ -545,7 +545,7 @@ as well as pick-place files.")
(getenv "CPLUS_INCLUDE_PATH")))
#t)))
(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
;; libao.so.)
(let* ((out (assoc-ref outputs "out"))
@@ -574,6 +574,14 @@ as well as pick-place files.")
(install-file "bin/ao-guile"
(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)))))))
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -583,6 +591,7 @@ as well as pick-place files.")
("libpng" ,libpng)
("glfw" ,glfw)
("libepoxy" ,libepoxy)
+ ("mesa" ,mesa)
("eigen" ,eigen)
("glm" ,glm)
("guile" ,guile-2.0)))