unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] build coqide
@ 2016-12-12 22:57 Julien Lepiller
  2016-12-13  2:19 ` Eric Bavier
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Lepiller @ 2016-12-12 22:57 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

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.

[-- Attachment #2: 0001-gnu-ocaml-findlib-Use-OCAMLPATH-to-locate-OCaml-modu.patch --]
[-- Type: text/x-patch, Size: 1011 bytes --]

From 3175122a301ad87c65102ee5aae960e91d879db3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 12 Dec 2016 22:58:28 +0100
Subject: [PATCH 1/8] gnu: ocaml-findlib: Use OCAMLPATH to locate OCaml
 modules.

* gnu/packages/ocaml.scm (ocaml-findlib): Add OCAMLPATH to native-search-path.
---
 gnu/packages/ocaml.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 61d51074e..6b9e3d283 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -683,6 +683,10 @@ to the other.")
                 "02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721"))
               (patches (search-patches "ocaml-findlib-make-install.patch"))))
     (build-system gnu-build-system)
+    (native-search-paths
+     (list (search-path-specification
+            (variable "OCAMLPATH")
+            (files (list (string-append "lib/ocaml/site-lib"))))))
     (native-inputs
      `(("camlp4" ,camlp4)
        ("m4" ,m4)
-- 
2.11.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-lablgtk-Update-to-2.18.5.patch --]
[-- Type: text/x-patch, Size: 1569 bytes --]

From 18e4e71653ecdd8c547e056890e85d52fcc123f0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 12 Dec 2016 20:22:57 +0100
Subject: [PATCH 2/8] gnu: lablgtk: Update to 2.18.5

* gnu/packages/ocaml.scm (lablgtk): Update to 2.18.5.
---
 gnu/packages/ocaml.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6b9e3d283..30c1da928 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -493,15 +494,15 @@ Knuth’s LR(1) parser construction technique.")
 (define-public lablgtk
   (package
     (name "lablgtk")
-    (version "2.18.3")
+    (version "2.18.5")
     (source
       (origin
         (method url-fetch)
           (uri (string-append "https://forge.ocamlcore.org/frs/download.php/"
-                              "1479/lablgtk-2.18.3.tar.gz"))
+                              "1627/lablgtk-2.18.5.tar.gz"))
           (sha256
             (base32
-              "1bybn3jafxf4cx25zvn8h2xj9agn1xjbn7j3ywxxqx6az7rfnnwp"))))
+              "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("camlp4" ,camlp4)
-- 
2.11.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-lablgtk-Use-ocaml-find-for-installation.patch --]
[-- Type: text/x-patch, Size: 2246 bytes --]

From 08262bc2bc7a13eb64acf1a51f9eaa7dd0c9f356 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
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


[-- Attachment #5: 0004-gnu-coq-Build-coqide.patch --]
[-- Type: text/x-patch, Size: 1708 bytes --]

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-21 16:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-12 22:57 [PATCH] build coqide Julien Lepiller
2016-12-13  2:19 ` Eric Bavier
2016-12-13 10:36   ` julien lepiller
2016-12-21 16:55     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).