unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Craven <david@craven.ch>
To: guix-devel@gnu.org
Subject: [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1.
Date: Mon,  2 Jan 2017 18:38:14 +0100	[thread overview]
Message-ID: <20170102173814.6837-4-david@craven.ch> (raw)
In-Reply-To: <20170102173814.6837-1-david@craven.ch>

* gnu/packages/ocaml.scm (ocaml-findlib)[arguments]: Move
  ocaml-findlib-make-install.patch to phase and set ldconf="ignore" in
  findlib.conf.in.
* gnu/local.mk (dist_patch_DATA): Remove old patch.
---
 gnu/local.mk                                       |  1 -
 gnu/packages/ocaml.scm                             | 34 +++++++++++++++-------
 .../patches/ocaml-findlib-make-install.patch       | 20 -------------
 3 files changed, 24 insertions(+), 31 deletions(-)
 delete mode 100644 gnu/packages/patches/ocaml-findlib-make-install.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 6ab1c1c48..9e35b0d0b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -750,7 +750,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch		\
   %D%/packages/patches/nvi-db4.patch				\
   %D%/packages/patches/ocaml-CVE-2015-8869.patch		\
-  %D%/packages/patches/ocaml-findlib-make-install.patch	\
   %D%/packages/patches/ola-readdir-r.patch			\
   %D%/packages/patches/openexr-missing-samples.patch		\
   %D%/packages/patches/openjpeg-CVE-2016-5157.patch		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f962be8d4..2d064408b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -720,15 +720,14 @@ to the other.")
 (define-public ocaml-findlib
   (package
     (name "ocaml-findlib")
-    (version "1.6.1")
+    (version "1.7.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://download.camlcity.org/download/"
                                   "findlib" "-" version ".tar.gz"))
               (sha256
                (base32
-                "02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721"))
-              (patches (search-patches "ocaml-findlib-make-install.patch"))))
+                "1vsys5gpahi36nxv5yx29zhwn8b2d7sqqswza05vxy5bx5wrljsx"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("camlp4" ,camlp4)
@@ -738,18 +737,33 @@ to the other.")
      `(#:tests? #f  ; no test suite
        #:parallel-build? #f
        #:make-flags (list "all" "opt")
-       #:phases (modify-phases %standard-phases
-                  (replace
-                   'configure
-                   (lambda* (#:key inputs outputs #:allow-other-keys)
-                     (let ((out (assoc-ref outputs "out")))
-                       (system*
-                        "./configure"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-findlib.conf.in
+           (lambda _
+             (let ((port (open-file "findlib.conf.in" "w" #:encoding "utf-8")))
+               (format port "ldconf=\"ignore\"~%")
+               (close-port port))
+             #t))
+         (add-after 'unpack 'patch-findlib-make-install
+           (lambda _
+             (substitute* "src/findlib/Makefile"
+               (("^.*topfind.*OCAML_CORE_STDLIB.*$")
+                 "\ttest $(INSTALL_TOPFIND) -eq 0 || cp topfind \"$(prefix)$(OCAML_SITELIB)\"\n"))
+             #t))
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (system* "./configure"
                         "-bindir" (string-append out "/bin")
                         "-config" (string-append out "/etc/ocamfind.conf")
                         "-mandir" (string-append out "/share/man")
                         "-sitelib" (string-append out "/lib/ocaml/site-lib")
                         "-with-toolbox")))))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "OCAMLPATH")
+            (files (list (string-append "lib/ocaml/site-lib"))))))
     (home-page "http://projects.camlcity.org/projects/findlib.html")
     (synopsis "Management tool for OCaml libraries")
     (description
diff --git a/gnu/packages/patches/ocaml-findlib-make-install.patch b/gnu/packages/patches/ocaml-findlib-make-install.patch
deleted file mode 100644
index 238f9ca3c..000000000
--- a/gnu/packages/patches/ocaml-findlib-make-install.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Ocaml wants to install its "core" libraries in OCAML_CORE_STDLIB.  That
-does not work in a store-based distribution.
-
-A solution was already provided by Nix
-
-    https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/ocaml/findlib/install_topfind.patch
-
-regenerated for Guix.
-
---- findlib-1.5.3/src/findlib/Makefile	2014-09-16 13:21:46.000000000 +0200
-+++ findlib-1.5.3/src/findlib/Makefile.new	2014-10-01 14:30:54.141082521 +0200
-@@ -89,7 +89,7 @@
- install: all
- 	mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
- 	mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
--	test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)"
-+	test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_SITELIB)"
- 	files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
- 	cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
- 	f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
-- 
2.11.0

  parent reply	other threads:[~2017-01-02 17:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-02 17:38 [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) David Craven
2017-01-02 17:38 ` [PATCH 2/4] gnu: Add ocaml-zarith David Craven
2017-01-03 12:30   ` Ludovic Courtès
2017-01-02 17:38 ` [PATCH 3/4] gnu: Reorder imports in (gnu packages ocaml) David Craven
2017-01-03 12:30   ` Ludovic Courtès
2017-01-02 17:38 ` David Craven [this message]
2017-01-02 20:51   ` [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1 Julien Lepiller
2017-01-03 11:03   ` Ben Woodcroft
2017-01-03 12:29 ` [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) Ludovic Courtès
2017-01-03 15:27 ` Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170102173814.6837-4-david@craven.ch \
    --to=david@craven.ch \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).