unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: ng0 <ngillmann@runbox.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 2/2] gnu: lispf4: Fix the searchpath for SYSATOMS.
Date: Wed, 05 Oct 2016 09:08:55 +0200	[thread overview]
Message-ID: <87vax7ff20.fsf@elephly.net> (raw)
In-Reply-To: <20161004223322.19523-3-ngillmann@runbox.com>


ng0 <ngillmann@runbox.com> writes:

> * gnu/packages/lisp.scm (lispf4)[arguments]: Fix the searchpath for SYSATOMS.
> ---
>  gnu/packages/lisp.scm | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
> index 7836d48..d66fb8b 100644
> --- a/gnu/packages/lisp.scm
> +++ b/gnu/packages/lisp.scm
> @@ -474,8 +474,20 @@ interface.")
>           #:phases
>           (modify-phases %standard-phases
>             (delete 'configure)
> +           (add-before 'build 'fix-searchpath
> +             (lambda _
> +               (substitute* "Lispf42.f"
> +                 (("NAME='SYSATOMS'")
> +                  (string-append "NAME='" (assoc-ref %outputs "out")
> +                                 "/bin/SYSATOMS'")))
> +               (substitute* "lispf42.c"
> +                 (("SYSATOMS")
> +                  (string-append (assoc-ref %outputs "out") "/bin/SYSATOMS"))
> +                 ;;(("8+1") "72+8+1"))))
> +                 (("c_b98_st") "c_b98")
> +                 (("c_b98.val") ""))))
>             (replace 'install
> -            (lambda* (#:key outputs #:allow-other-keys)
> +             (lambda* (#:key outputs #:allow-other-keys)
>                (let* ((out (assoc-ref outputs "out"))
>                       (bin (string-append out "/bin"))
>                       (doc (string-append (assoc-ref outputs "doc")


Here’s an alternative:

           (add-before 'build 'fix-reference-to-SYSATOMS
             (lambda* (#:key outputs #:allow-other-keys)
               (substitute* "lispf42.c"
                 (("#define c_b98.*")
                  (string-append "#define c_b98 \""
                                 (assoc-ref outputs "out")
                                 "/bin/SYSATOMS\"\n")))
               #t))

This won’t work, however, because during the build phase the lispf4
executable is called to run a script.  At that point SYSATOMS only
exists in the current directory.  So with the above phase the build
would fail.

A hack to solve this would be to first install “SYSATOMS” to the target
directory and then build.

BTW: I think “SYSATOMS” and the “BASIC.IMG” should not be installed to
“bin” because they are not executables.  Instead they should go to
“$out/share/lispf4”.  This would also require you to change the code
that loads “BASIC.IMG” (I think it won’t work right now for the same
reasons as why you get the error relating to “SYSATOMS”.)

You also don’t seem to be installing “LISPF4.IMG”, which seems to be
required as well.

I should also note that after looking at the code I no longer consider
“lispf42.c” to be source code.  It’s unreadable because it’s the
automatically produced output of a fortran-to-C converter, only slightly
modified :-/

~~ Ricardo

  reply	other threads:[~2016-10-05  7:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 22:33 [PATCH] gnu: lispf4 fixes ng0
2016-10-04 22:33 ` [PATCH 1/2] gnu: lispf4: Remove prebuilt binaries ng0
2016-10-04 22:33 ` [PATCH 2/2] gnu: lispf4: Fix the searchpath for SYSATOMS ng0
2016-10-05  7:08   ` Ricardo Wurmus [this message]
2016-10-05  8:54     ` ng0
2016-10-05  9:17       ` ng0
2016-10-05 11:22         ` Ricardo Wurmus
2016-10-05 12:15           ` ng0
2016-10-05  9:27 ` [PATCH] gnu: lispf4 fixes ng0
2016-10-05 10:07   ` ng0
2016-10-05 10:18     ` ng0
2016-10-05  9:31 ` [PATCH] gnu: lispf4: Fix reference to SYSATOMS ng0

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=87vax7ff20.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    --cc=ngillmann@runbox.com \
    /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).