Patchwork build coqide

login
register
mail settings
Submitter Julien Lepiller
Date Dec. 12, 2016, 10:57 p.m.
Message ID <20161212235735.3be04892@lepiller.eu>
Download mbox | patch
Permalink /patch/18418/
State New
Headers show

Comments

Julien Lepiller - Dec. 12, 2016, 10:57 p.m.
hi,

here are a few ocaml-related patches. The first one adds a
native-search-path so ocaml-findlib can find the libraries it
installs. Next, lablgtk is updated and installed using the recommended
way, with findlib. Then this new lablgtk is used to build coqide.
Eric Bavier - Dec. 13, 2016, 2:19 a.m.
On Mon, 12 Dec 2016 23:57:35 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> hi,
> 
> here are a few ocaml-related patches. The first one adds a
> native-search-path so ocaml-findlib can find the libraries it
> installs. Next, lablgtk is updated and installed using the recommended
> way, with findlib. Then this new lablgtk is used to build coqide.

> +                               "-lablgtkdir" (string-append lablgtkdir
> +                                               "/lib/ocaml/site-lib/lablgtk2/")

Is there additional benefit to the ocaml search dir OCAMLPATH?  I would
expect coq's build system to be able to find lablgtk from OCAMLPATH
without needing to pass the configure flags.

`~Eric

Patch

From c37d32ea82757389c29db1a276cac1225e639020 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 12 Dec 2016 22:21:42 +0100
Subject: [PATCH 4/8] gnu: coq: Build coqide

* gnu/packages/ocaml.scm (coq): Build coqide.
---
 gnu/packages/ocaml.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 786dc3497..8ad053184 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -344,19 +344,24 @@  written in Objective Caml.")
        ("hevea" ,hevea)))
     (inputs
      `(("ocaml" ,ocaml)
+       ("lablgtk" ,lablgtk)
        ("camlp5" ,camlp5)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key outputs inputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (mandir (string-append out "/share/man"))
+                    (lablgtkdir (assoc-ref inputs "lablgtk"))
                     (browser "icecat -remote \"OpenURL(%s,new-tab)\""))
                (zero? (system* "./configure"
                                "-prefix" out
                                "-mandir" mandir
-                               "-browser" browser)))))
+                               "-browser" browser
+                               "-lablgtkdir" (string-append lablgtkdir
+                                               "/lib/ocaml/site-lib/lablgtk2/")
+                               "-coqide" "opt")))))
          (replace 'build
            (lambda _
              (zero? (system* "make" "-j" (number->string
-- 
2.11.0