From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: [PATCH] build coqide Date: Mon, 12 Dec 2016 23:57:35 +0100 Message-ID: <20161212235735.3be04892@lepiller.eu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/fPm2jIZGS7_7VG1RZiF6DNF" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGZXf-0006jV-Ci for guix-devel@gnu.org; Mon, 12 Dec 2016 17:57:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGZXa-0007gl-VJ for guix-devel@gnu.org; Mon, 12 Dec 2016 17:57:55 -0500 Received: from dau94-h03-89-91-205-84.dsl.sta.abo.bbox.fr ([89.91.205.84]:57735 helo=skaro.lepiller.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cGZXa-0007gG-Ds for guix-devel@gnu.org; Mon, 12 Dec 2016 17:57:50 -0500 Received: from localhost (localhost [127.0.0.1]) by skaro.lepiller.eu (Postfix) with ESMTP id EF5B4810C3 for ; Mon, 12 Dec 2016 23:57:46 +0100 (CET) Received: from skaro.lepiller.eu ([127.0.0.1]) by localhost (lepiller.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N2kjgPq__56I for ; Mon, 12 Dec 2016 23:57:40 +0100 (CET) Received: from localhost (128-79-116-134.hfc.dyn.abo.bbox.fr [128.79.116.134]) by skaro.lepiller.eu (Postfix) with ESMTPSA id 453CA7FCF7 for ; Mon, 12 Dec 2016 23:57:40 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --MP_/fPm2jIZGS7_7VG1RZiF6DNF Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. --MP_/fPm2jIZGS7_7VG1RZiF6DNF Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-ocaml-findlib-Use-OCAMLPATH-to-locate-OCaml-modu.patch >From 3175122a301ad87c65102ee5aae960e91d879db3 Mon Sep 17 00:00:00 2001 From: Julien Lepiller 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 --MP_/fPm2jIZGS7_7VG1RZiF6DNF Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0002-gnu-lablgtk-Update-to-2.18.5.patch =46rom 18e4e71653ecdd8c547e056890e85d52fcc123f0 Mon Sep 17 00:00:00 2001 From: Julien Lepiller 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 =C2=A9 2016 Eric Bavier ;;; Copyright =C2=A9 2016 Jan Nieuwenhuizen ;;; Copyright =C2=A9 2016 Efraim Flashner +;;; Copyright =C2=A9 2016 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; @@ -493,15 +494,15 @@ Knuth=E2=80=99s 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.ph= p/" - "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) --=20 2.11.0 --MP_/fPm2jIZGS7_7VG1RZiF6DNF Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0003-gnu-lablgtk-Use-ocaml-find-for-installation.patch =46rom 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=E2=80=99s 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=E2=80=99s LR(1) parser construction technique.") `(#:tests? #f ; no check target =20 ;; opt: also install cmxa files - #:make-flags (list "all" "opt") + #:make-flags (list "all" "opt" + (string-append "FINDLIBDIR=3D" + (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 =20 #: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") --=20 2.11.0 --MP_/fPm2jIZGS7_7VG1RZiF6DNF Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0004-gnu-coq-Build-coqide.patch >From c37d32ea82757389c29db1a276cac1225e639020 Mon Sep 17 00:00:00 2001 From: Julien Lepiller 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 --MP_/fPm2jIZGS7_7VG1RZiF6DNF--