guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1.


From: Julien Lepiller
Subject: Re: [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1.
Date: Mon, 02 Jan 2017 21:51:34 +0100


On January 2, 2017 6:38:14 PM GMT+01:00, David Craven <address@hidden> wrote:
>* 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"))))))
You should add this to the ocaml definition, or move the definition from the 
compiler. If I'm not mistaken, this overrides the current definition and 
ocamlfind will not be able to find core modules in lib/ocaml such as 'bytes'.

>     (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)"; }; \

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]