From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: [PATCH 2/2] gnu: lispf4: Fix the searchpath for SYSATOMS. Date: Wed, 05 Oct 2016 08:54:11 +0000 Message-ID: <87ponf2n2k.fsf@we.make.ritual.n0.is> References: <20161004223322.19523-1-ngillmann@runbox.com> <20161004223322.19523-3-ngillmann@runbox.com> <87vax7ff20.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brhyF-00074Y-3Q for guix-devel@gnu.org; Wed, 05 Oct 2016 04:54:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brhy9-0004Jp-5B for guix-devel@gnu.org; Wed, 05 Oct 2016 04:54:34 -0400 Received: from aibo.runbox.com ([91.220.196.211]:49098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brhy8-0004JY-Qc for guix-devel@gnu.org; Wed, 05 Oct 2016 04:54:29 -0400 In-Reply-To: <87vax7ff20.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org Hi, thanks for trying to help with this. Ricardo Wurmus writes: > ng0 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)) Thanks, I'll try this in combination with the proposed move, but if I don't succeed with it today I will start working on my priority tasks and do this in november or whenever I get the chance. > 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. Right, I have seen the complains of the script pointing to that directory. > 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 think it's different.. I think I should have installed BARE.IMG, BASIC.IMG and SYSATOMS. LISP4.img is generated nowhere. If it's in the original source, the f2c running author did a strange job. > 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 :-/ A while ago I forked this with the intention to clean it up some day.. Could take a long time, if at all. I find the fortran easier to read. Is there any reason why just using the fortran source would not work for us? I might have packaged gforth, but I know little about fortran compiling, compability etc. I missed a free software licensed interlisp implementation.. this lispf4 differed from what I needed for my purposes, which would've been SIEMENS-INTERLISP, but I found no other interlisp at that time. Differed in the way that SIEMENS-INTERLISP gives you the ability to close every open parens with >, as a super-paren.. that's just one difference of many. (PLUS 2 4 (TIMES 80 9 (MINUS 2 300 > In case anyone is curious: "Christian-M. Hamann - Einführung in das Programmieren in LISP", published in Berlin 1985 also states New York so there's a chance for a translation somewhere. I'm open to suggestions other than writing my own interlisp (which would be very nice, but I'm at least 2 years busy on another front :) )... It will probably lead to writing my own interlisp. > ~~ Ricardo > > --