gnu: guile-opengl: Install compiled modules in the correct place.

* gnu/packages/gl.scm (guile-opengl): Install compiled modules in the same
  directory as the source modules.
This commit is contained in:
David Thompson 2015-07-18 22:59:46 -04:00
parent 82700f0fb3
commit 0e215f49fe
1 changed files with 21 additions and 16 deletions

View File

@ -409,22 +409,27 @@ extension functionality is exposed in a single header file.")
("glu" ,glu) ("glu" ,glu)
("freeglut" ,freeglut))) ("freeglut" ,freeglut)))
(arguments (arguments
'(#:phases (alist-cons-before '(#:phases (modify-phases %standard-phases
'build 'patch-dynamic-link (add-after 'configure 'patch-makefile
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda _
(define (dynamic-link-substitute file lib input) ;; Install compiled Guile files in the expected place.
(substitute* file (substitute* '("Makefile")
(("dynamic-link \"lib([a-zA-Z]+)\"" _ lib) (("^godir = .*$")
(string-append "dynamic-link \"" "godir = $(moddir)\n"))))
(assoc-ref inputs input) (add-before 'build 'patch-dynamic-link
"/lib/lib" lib "\"")))) (lambda* (#:key inputs outputs #:allow-other-keys)
;; Replace dynamic-link calls for libGL, libGLU, and (define (dynamic-link-substitute file lib input)
;; libglut with absolute paths to the store. (substitute* file
(dynamic-link-substitute "glx/runtime.scm" "GL" "mesa") (("dynamic-link \"lib([a-zA-Z]+)\"" _ lib)
(dynamic-link-substitute "glu/runtime.scm" "GLU" "glu") (string-append "dynamic-link \""
(dynamic-link-substitute "glut/runtime.scm" "glut" (assoc-ref inputs input)
"freeglut")) "/lib/lib" lib "\""))))
%standard-phases))) ;; Replace dynamic-link calls for libGL, libGLU, and
;; libglut with absolute paths to the store.
(dynamic-link-substitute "glx/runtime.scm" "GL" "mesa")
(dynamic-link-substitute "glu/runtime.scm" "GLU" "glu")
(dynamic-link-substitute "glut/runtime.scm" "glut"
"freeglut"))))))
(home-page "http://gnu.org/s/guile-opengl") (home-page "http://gnu.org/s/guile-opengl")
(synopsis "Guile binding for the OpenGL graphics API") (synopsis "Guile binding for the OpenGL graphics API")
(description (description