From 08262bc2bc7a13eb64acf1a51f9eaa7dd0c9f356 Mon Sep 17 00:00:00 2001 From: Julien Lepiller
Date: Mon, 12 Dec 2016 21:40:42 +0100 Subject: [PATCH 3/8] gnu: lablgtk: Use ocaml-find for installation * gnu/packages/ocaml.scm (lablgtk): Use ocaml-find in installation. --- gnu/packages/ocaml.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 30c1da928..786dc3497 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -507,6 +507,7 @@ Knuthâs LR(1) parser construction technique.") (native-inputs `(("camlp4" ,camlp4) ("ocaml" ,ocaml) + ("findlib" ,ocaml-findlib) ("pkg-config" ,pkg-config))) ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0, ;; and gtk+-quartz-2.0 once available. @@ -521,21 +522,24 @@ Knuthâs LR(1) parser construction technique.") `(#:tests? #f ; no check target ;; opt: also install cmxa files - #:make-flags (list "all" "opt") + #:make-flags (list "all" "opt" + (string-append "FINDLIBDIR=" + (assoc-ref %outputs "out") + "/lib/ocaml/site-lib")) ;; Occasionally we would get "Error: Unbound module GtkThread" when ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially. #:parallel-build? #f #:phases (modify-phases %standard-phases - (replace 'install + (add-before 'install 'prepare-install (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (ocaml (assoc-ref inputs "ocaml"))) ;; Install into the output and not the ocaml directory. + (mkdir-p (string-append out "/lib/ocaml/site-lib")) (substitute* "config.make" ((ocaml) out)) - (system* "make" "old-install") #t)))))) (home-page "http://lablgtk.forge.ocamlcore.org/") (synopsis "GTK+ bindings for OCaml") -- 2.11.0