guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: Fix load-extension path in packaging of guile-ncurses.


From: John Darrington
Subject: Re: [PATCH] gnu: Fix load-extension path in packaging of guile-ncurses.
Date: Tue, 20 Dec 2016 12:03:31 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Dec 20, 2016 at 02:17:42AM -0500, Mark H Weaver wrote:
     Hi John,
     
     John Darrington <address@hidden> writes:
     > * gnu/packages/guile.scm (guile-ncurses) [arguments]: Install shared 
object before
     > attempting to build the package.  Patch load-extension path before 
building instead
     > of after.
     
     The first sentence above is mistaken or misleading:
     
       "Install shared object before attempting to build the package."

How about I change it to "... attempting to build the rest of the package" ??

     > +         (add-before 'build 'fix-libguile-ncurses-file-name
     >             (lambda* (#:key outputs #:allow-other-keys)
     > - [...]
     > +             (and (zero? (system* "make" "install"
     > +                                  "-C" "src/ncurses"
     > +                                  "-j" (number->string
     > +                                        (parallel-job-count))))
     > +                  (let* ((out   (assoc-ref outputs "out"))
     > +                         (dir   "src/ncurses")
     > +                         (files (find-files dir ".scm")))
     > +                    (substitute* files
     > +                      (("\"libguile-ncurses\"")
     > +                       (format #f 
"\"~a/lib/guile/2.0/libguile-ncurses\""
     > +                               out)))
     > +                    #t)))))))
     
     By running "make install -C src/ncurses [...]", you are in fact causing
     most if not all of the package to be built and installed right here in
     the 'fix-libguile-ncurses-file-name' phase.

I didn't check to see what percentage of the package is contained in the 
src/ncurses directory, but it certainly isn't "all".

     This is no good.

Why do you think it is "no good"?  It may not be perfect, but it is better
than what we had before, and certainly fixes the problem.

     
     Can you help me understand what you're trying to do here, and why?
     
Sure (I would like to see a convention where such explanations are
put in the commit messaage, but I have previously been outvoted on
that issue):

The scheme code contains a number of procedures similar to 
(load-extension "libguile-ncurses" "func"). We need the first
string to contain the absolute path where the shared object is 
installed.   The previous version had done this by patching the 
.scm file post-installation.  However that meant that the compiled
.go file was compiled with the old, unmodified version.  
This patch ensures that the .scm files are patched first, and that
the .go files are built from the patched .scm files.

I hope this makes things clearer for you.

J'


-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

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