On Sun, 8 Jan 2017 22:16:05 +1000
Ben Woodcroft <[email protected]> wrote:

> Hi Julien,
> 
> Thanks for all your efforts in this patch series - impressive stuff,
> and thanks to David for reviewing them.
> 
> On 04/01/17 05:10, Julien Lepiller wrote:
> [...]
> > +    (arguments `(#:phases
> > +                 (modify-phases %standard-phases
> > +                   (delete 'configure)
> > +                   (add-before 'install 'fix-install-name
> > +                     (lambda* (#:key #:allow-other-keys)
> > +                       (substitute* "Makefile"
> > +                         (("install zip") "install camlzip")))))  
> Can I ask if this substitution is necessary? I have a downstream
> OCaml package (pplacer) which is failing to compile because of it
> (though with OCaml 4.01.0).
> 
> I've attached my unpolished, convoluted patch series to get to
> pplacer, for reference.
> 
> Thanks, ben.

It was required because the dependant packages I had looked for camlzip
instead of just zip. Looking at the opam recipe though, it seems some
packages also refer to this one as zip. Could you try with that patch?
I also fixed the install directory.

>From c0f14cdae6bfbb74b1b5fbe836423747dbe17b60 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <[email protected]>
Date: Sun, 8 Jan 2017 18:37:23 +0100
Subject: [PATCH] gnu: camlzip: Install both zip and camlzip modules.

* gnu/packages/ocaml.scm (camlzip) [arguments]: Install camlzip module.
---
 gnu/packages/ocaml.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 93020f1c0..1bd90ad60 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -804,15 +804,19 @@ other XUnit testing frameworks.")
      `(#:phases
        (modify-phases %standard-phases
          (delete 'configure)
-         (add-before 'install 'fix-install-name
-           (lambda* (#:key #:allow-other-keys)
-             (substitute* "Makefile"
-               (("install zip") "install camlzip")))))
+         (add-after 'install 'install-camlzip
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
+               (mkdir-p dir)
+               (call-with-output-file (string-append dir "/META")
+                 (lambda (port)
+                   (display "directory=\"../zip\"" port)))))))
        #:install-target "install-findlib"
        #:make-flags
        (list "all" "allopt"
              (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
-                            "/lib/ocaml"))))
+                            "/lib/ocaml/site-lib"))))
     (home-page "http://forge.ocamlcore.org/projects/camlzip";)
     (synopsis "Provides easy access to compressed files")
     (description "Provides easy access to compressed files in ZIP, GZIP and
-- 
2.11.0

Reply via email to