diff options
author | Leo Famulari <leo@famulari.name> | 2016-07-22 18:57:40 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2016-07-22 18:58:31 -0400 |
commit | d227260d2f7833b6bdc55b8e3792378626ef3b69 (patch) | |
tree | 26d47d5d8ee8efb102323bca215429a8f8fe1095 /gnu/packages/scheme.scm | |
parent | d778fa5ff6f4a860919eaf13db3f84cfc68cbee8 (diff) | |
parent | 26ad4adb5568c6ff370f446431b079520fb09615 (diff) | |
download | guix-d227260d2f7833b6bdc55b8e3792378626ef3b69.tar.gz |
Merge branch 'master' into core-updates
Resolved conflicts: * gnu/packages/scheme.scm: Conflict in import of (guix licenses). On master, "#:hide (openssl)" was used. On core-updates, "#:select (some licenses)" was used. The latter won the conflict. * gnu/packages/version-control.scm (git)[arguments]: Whitespace conflict in 'install-shell-completion.
Diffstat (limited to 'gnu/packages/scheme.scm')
-rw-r--r-- | gnu/packages/scheme.scm | 137 |
1 files changed, 88 insertions, 49 deletions
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 1e00e6bb9d..373b6f37b3 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -54,6 +54,8 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages image) #:use-module (gnu packages xorg) + #:use-module (gnu packages tls) + #:use-module (gnu packages gl) #:use-module (ice-9 match)) (define (mit-scheme-source-directory system version) @@ -414,57 +416,94 @@ implementation techniques and as an expository tool.") (build-system gnu-build-system) (arguments '(#:phases - (let* ((gui-libs - (lambda (inputs) - (define (lib input) - (string-append (assoc-ref inputs input) "/lib")) - - (list (lib "glib") - (lib "cairo") - (lib "pango") - (lib "libjpeg") - (lib "gtk") - (lib "gdk-pixbuf") - (lib "fontconfig") - (lib "sqlite"))))) ;to build the doc - (alist-cons-before - 'configure 'pre-configure - (lambda* (#:key inputs #:allow-other-keys) - (chdir "src") - - ;; The GUI libs are dynamically opened through the FFI, so they - ;; must be in the loader's search path. - (setenv "LD_LIBRARY_PATH" (string-join (gui-libs inputs) ":"))) - (alist-cons-after - 'unpack 'patch-/bin/sh - (lambda _ - (substitute* "collects/racket/system.rkt" - (("/bin/sh") (which "sh")))) - (alist-cons-after - 'install 'wrap-programs - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (define (wrap prog) - (wrap-program prog - `("LD_LIBRARY_PATH" ":" prefix - ,(gui-libs inputs)))) - - (with-directory-excursion (string-append out "/bin") - (for-each wrap - (list "gracket" "drracket" "slideshow" "mred")) - #t))) - %standard-phases)))) + (alist-cons-before + 'configure 'pre-configure + (lambda* (#:key inputs #:allow-other-keys) + ;; Patch dynamically loaded libraries with their absolute paths. + (let* ((library-path (search-path-as-string->list + (getenv "LIBRARY_PATH"))) + (find-so (lambda (soname) + (search-path + library-path + (format #f "~a.so" soname)))) + (patch-ffi-libs (lambda (file libs) + (for-each + (lambda (lib) + (substitute* file + (((format #f "\"~a\"" lib)) + (format #f "\"~a\"" (find-so lib))))) + libs)))) + (substitute* "collects/db/private/sqlite3/ffi.rkt" + (("ffi-lib sqlite-so") + (format #f "ffi-lib \"~a\"" (find-so "libsqlite3")))) + (substitute* "collects/openssl/libssl.rkt" + (("ffi-lib libssl-so") + (format #f "ffi-lib \"~a\"" (find-so "libssl")))) + (substitute* "collects/openssl/libcrypto.rkt" + (("ffi-lib libcrypto-so") + (format #f "ffi-lib \"~a\"" (find-so "libcrypto")))) + (substitute* "share/pkgs/math-lib/math/private/bigfloat/gmp.rkt" + (("ffi-lib libgmp-so") + (format #f "ffi-lib \"~a\"" (find-so "libgmp")))) + (substitute* "share/pkgs/math-lib/math/private/bigfloat/mpfr.rkt" + (("ffi-lib libmpfr-so") + (format #f "ffi-lib \"~a\"" (find-so "libmpfr")))) + (for-each + (lambda (x) (apply patch-ffi-libs x)) + '(("share/pkgs/draw-lib/racket/draw/unsafe/cairo-lib.rkt" + ("libfontconfig" "libcairo")) + ("share/pkgs/draw-lib/racket/draw/unsafe/glib.rkt" + ("libglib-2.0" "libgmodule-2.0" "libgobject-2.0")) + ("share/pkgs/draw-lib/racket/draw/unsafe/jpeg.rkt" + ("libjpeg")) + ("share/pkgs/draw-lib/racket/draw/unsafe/pango.rkt" + ("libpango-1.0" "libpangocairo-1.0")) + ("share/pkgs/draw-lib/racket/draw/unsafe/png.rkt" + ("libpng")) + ("share/pkgs/db-lib/db/private/odbc/ffi.rkt" + ("libodbc")) + ("share/pkgs/gui-lib/mred/private/wx/gtk/x11.rkt" + ("libX11")) + ("share/pkgs/gui-lib/mred/private/wx/gtk/gsettings.rkt" + ("libgio-2.0")) + ("share/pkgs/gui-lib/mred/private/wx/gtk/gtk3.rkt" + ("libgdk-3" "libgtk-3")) + ("share/pkgs/gui-lib/mred/private/wx/gtk/unique.rkt" + ("libunique-1.0")) + ("share/pkgs/gui-lib/mred/private/wx/gtk/utils.rkt" + ("libgdk-x11-2.0" "libgdk_pixbuf-2.0" "libgtk-x11-2.0")) + ("share/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt" + ("libGL")) + ("share/pkgs/sgl/gl.rkt" + ("libGL" "libGLU"))))) + (chdir "src")) + (alist-cons-after + 'unpack 'patch-/bin/sh + (lambda _ + (substitute* "collects/racket/system.rkt" + (("/bin/sh") (which "sh")))) + %standard-phases)) #:tests? #f ; XXX: how to run them? )) - (inputs `(("libffi" ,libffi) - ("glib" ,glib) ; for DrRacket - ("cairo" ,cairo) - ("pango" ,pango) - ("libjpeg" ,libjpeg-8) - ("fontconfig" ,fontconfig) - ("gdk-pixbuf" ,gdk-pixbuf) - ("gtk" ,gtk+-2) - ("sqlite" ,sqlite))) ;needed to build the doc + (inputs + `(("libffi" ,libffi) + ;; Hardcode dynamically loaded libraries for better functionality. + ;; sqlite and libraries for `racket/draw' are needed to build the doc. + ("cairo" ,cairo) + ("fontconfig" ,fontconfig) + ("glib" ,glib) + ("glu" ,glu) + ("gmp" ,gmp) + ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libx11" ,libx11) + ("mesa" ,mesa) + ("mpfr" ,mpfr) + ("openssl" ,openssl) + ("pango" ,pango) + ("sqlite" ,sqlite) + ("unixodbc" ,unixodbc))) (home-page "http://racket-lang.org") (synopsis "Implementation of Scheme and related languages") (description |