* [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
* Re: [PATCH] build coqide
2016-12-12 22:57 [PATCH] build coqide Julien Lepiller
@ 2016-12-13 2:19 ` Eric Bavier
2016-12-13 10:36 ` julien lepiller
0 siblings, 1 reply; 4+ messages in thread
From: Eric Bavier @ 2016-12-13 2:19 UTC (permalink / raw)
To: Julien Lepiller; +Cc: guix-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] build coqide
2016-12-13 2:19 ` Eric Bavier
@ 2016-12-13 10:36 ` julien lepiller
2016-12-21 16:55 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: julien lepiller @ 2016-12-13 10:36 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]
Le 2016-12-13 03:19, Eric Bavier a écrit :
> 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.
oh ! how could I not see it... OCAMLPATH is already defined differently
by the ocaml package... I guess there was an update I didn't see since I
wrote these patches (or maybe I'm just blind). Here is a a new version
of the patches. I added ocaml-findlib to the native-inputs of coq so its
configure script can find lablgtk without the option. and lablgtk
doesn't need to be installed in site-lib anymore. Is this correct, or
should the library be installed in site-lib, and this directory added to
OCAMLPATH?
By the way, is there someone working on an ocaml-build-system?
>
> `~Eric
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-lablgtk-Update-to-2.18.5.patch --]
[-- Type: text/x-diff; name=0001-gnu-lablgtk-Update-to-2.18.5.patch, Size: 1520 bytes --]
From 2c7e43ffd0db19362756fe7fa848482c61b263d6 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Tue, 13 Dec 2016 11:21:33 +0100
Subject: [PATCH 1/3] 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 61d5107..bc9f8f8 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.7.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-lablgtk-use-ocamlfind-in-installation.patch --]
[-- Type: text/x-diff; name=0002-gnu-lablgtk-use-ocamlfind-in-installation.patch, Size: 2167 bytes --]
From ecb9fb669c8c93c35b7efd0f19b550a942234ad6 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Tue, 13 Dec 2016 11:21:51 +0100
Subject: [PATCH 2/3] gnu: lablgtk: use ocamlfind in installation
* gnu/packages/ocaml.scm (lablgtk): Use ocamlfind 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 bc9f8f8..555e3fd 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"))
;; 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"))
(substitute* "config.make"
((ocaml) out))
- (system* "make" "old-install")
#t))))))
(home-page "http://lablgtk.forge.ocamlcore.org/")
(synopsis "GTK+ bindings for OCaml")
--
2.7.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-coq-Build-coqide.patch --]
[-- Type: text/x-diff; name=0003-gnu-coq-Build-coqide.patch, Size: 1273 bytes --]
From 330fa542eebed022b4e99abe69e593b5a8f5c4f5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Tue, 13 Dec 2016 11:22:06 +0100
Subject: [PATCH 3/3] gnu: coq: Build coqide
* gnu/packages/ocaml.scm (coq): Build coqide.
---
gnu/packages/ocaml.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 555e3fd..c5784db 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -341,9 +341,11 @@ written in Objective Caml.")
(build-system gnu-build-system)
(native-inputs
`(("texlive" ,texlive)
+ ("findlib" ,ocaml-findlib)
("hevea" ,hevea)))
(inputs
`(("ocaml" ,ocaml)
+ ("lablgtk" ,lablgtk)
("camlp5" ,camlp5)))
(arguments
`(#:phases
@@ -356,7 +358,8 @@ written in Objective Caml.")
(zero? (system* "./configure"
"-prefix" out
"-mandir" mandir
- "-browser" browser)))))
+ "-browser" browser
+ "-coqide" "opt")))))
(replace 'build
(lambda _
(zero? (system* "make" "-j" (number->string
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] build coqide
2016-12-13 10:36 ` julien lepiller
@ 2016-12-21 16:55 ` Ludovic Courtès
0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2016-12-21 16:55 UTC (permalink / raw)
To: julien lepiller; +Cc: guix-devel
Hello!
julien lepiller <julien@lepiller.eu> skribis:
>> 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.
> oh ! how could I not see it... OCAMLPATH is already defined
> differently by the ocaml package... I guess there was an update I
> didn't see since I wrote these patches (or maybe I'm just blind). Here
> is a a new version of the patches. I added ocaml-findlib to the
> native-inputs of coq so its configure script can find lablgtk without
> the option. and lablgtk doesn't need to be installed in site-lib
> anymore. Is this correct, or should the library be installed in
> site-lib, and this directory added to OCAMLPATH?
>
> By the way, is there someone working on an ocaml-build-system?
Not yet, but you can help! :-)
> From 2c7e43ffd0db19362756fe7fa848482c61b263d6 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Tue, 13 Dec 2016 11:21:33 +0100
> Subject: [PATCH 1/3] gnu: lablgtk: Update to 2.18.5
>
> * gnu/packages/ocaml.scm (lablgtk): Update to 2.18.5.
[...]
> From ecb9fb669c8c93c35b7efd0f19b550a942234ad6 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Tue, 13 Dec 2016 11:21:51 +0100
> Subject: [PATCH 2/3] gnu: lablgtk: use ocamlfind in installation
>
> * gnu/packages/ocaml.scm (lablgtk): Use ocamlfind in installation.
[...]
> From 330fa542eebed022b4e99abe69e593b5a8f5c4f5 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Tue, 13 Dec 2016 11:22:06 +0100
> Subject: [PATCH 3/3] gnu: coq: Build coqide
>
> * gnu/packages/ocaml.scm (coq): Build coqide.
Pushed all 3 patches, thanks!
Ludo’.
^ permalink raw reply [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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.