unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: David Pflug <david@pflug.io>
To: 74441@debbugs.gnu.org
Cc: David Pflug <david@pflug.io>,
	Guillaume Le Vaillant <glv@posteo.net>,
	Katherine Cox-Buday <cox.katherine.e+guix@gmail.com>,
	Munyoki Kilyungi <me@bonfacemunyoki.com>,
	Sharlatan Hellseher <sharlatanus@gmail.com>,
	jgart <jgart@dismail.de>
Subject: [bug#74441] [PATCH] gnu: picolisp: Update to 24.9.
Date: Tue, 19 Nov 2024 16:39:15 -0500	[thread overview]
Message-ID: <b8a387b33d99dd53b14873dfdff1c37ac989f151.1732052355.git.david@pflug.io> (raw)

* gnu/packages/lisp.scm (picolisp): Update to 24.9.

Upstream has retired Java version and 32bit support.

Change-Id: I6bb3604ed9d48ef5a4b372d8dbc6dd3917295b5f
---
 gnu/packages/lisp.scm | 207 +++++++++++++-----------------------------
 1 file changed, 63 insertions(+), 144 deletions(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 6c16d8ab71..ea38fd81de 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -1028,163 +1028,82 @@ (define-public lush2
     (home-page "https://lush.sourceforge.net/")
     (license license:lgpl2.1+)))
 
-(define picolisp32
+(define-public picolisp
   (package
-    (name "picolisp32")
-    (version "19.12")
+    (name "picolisp")
+    (version "24.9")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://software-lab.de/picoLisp-" version ".tgz"))
        (sha256
-        (base32 "10np0mhihr47r3201617zccrvzpkhdl1jwvz7zimk8kxpriydq2j"))
-       (modules '((guix build utils)))
-       (snippet '(begin
-                   ;; Delete the pre-compiled jar file.
-                   (delete-file "ersatz/picolisp.jar")
-                   #t))))
+        (base32 "1bsp14vjzvlav813mxzgigcdrmsxhrrhlhdzfdvdq6havacm0cwf"))
+       (modules '((guix build utils)))))
     (build-system gnu-build-system)
-    (inputs
-     `(("libxcrypt" ,libxcrypt)
-       ("openssl" ,openssl)))
+    (inputs (list clang readline libffi openssl pkg-config))
     (arguments
-     `(#:system ,(match (%current-system)
-                   ((or "armhf-linux" "aarch64-linux")
-                    "armhf-linux")
-                   (_
-                    "i686-linux"))
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (add-after 'unpack 'fix-paths
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (shebang-line (string-append
-                                   "#!" out "/bin/picolisp "
-                                   out "/lib/picolisp/lib.l")))
-               (substitute* '("bin/pil"
-                              "bin/pilIndent"
-                              "bin/pilPretty"
-                              "bin/psh"
-                              "bin/replica"
-                              "bin/vip"
-                              "bin/watchdog"
-                              "games/xchess"
-                              "misc/bigtest"
-                              "misc/calc"
-                              "misc/chat"
-                              "misc/mailing"
-                              "src/mkVers")
-                 (("#\\!bin/picolisp lib.l")
-                  shebang-line)
-                 (("#\\!\\.\\./bin/picolisp \\.\\./lib.l")
-                  shebang-line)
-                 (("#\\!/usr/bin/picolisp /usr/lib/picolisp/lib.l")
-                  shebang-line)))
-             #t))
-         (add-after 'fix-paths 'make-build-reproducible
-           (lambda _
-             (substitute* "src64/lib/asm.l"
-               (("\\(prinl \"/\\* \" \\(datSym \\(date\\)\\) \" \\*/\\)")
-                ""))
-             #t))
-         (add-after 'make-build-reproducible 'fix-permissions
-           (lambda _
-             (for-each make-file-writable
-                       '("doc/family.tgz"
-                         "doc/family64.tgz"
-                         "lib/map"
-                         "src64/tags"))
-             #t))
-         (replace 'build
-           (lambda _
-             (invoke "make" "-C" "src" "picolisp" "tools" "gate")))
-         (add-before 'check 'set-home-for-tests
-           (lambda _
-             (setenv "HOME" "/tmp")
-             #t))
-         (replace 'check
-           (lambda _
-             (invoke "./pil" "test/lib.l" "-bye" "+")))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin"))
-                    (man (string-append out "/share/man"))
-                    (picolisp (string-append out "/lib/picolisp")))
-               (copy-recursively "man" man)
-               (copy-recursively "." picolisp)
-               (for-each (lambda (name)
-                           (let ((path (string-append picolisp "/" name)))
-                             (delete-file-recursively path)))
-                         '("CHANGES" "COPYING" "CREDITS" "cygwin"
-                           "INSTALL" "man" "pil" "README" "src" "src64"
-                           "test"))
-               (mkdir-p bin)
-               (symlink (string-append picolisp "/bin/picolisp")
-                        (string-append bin "/picolisp"))
-               (symlink (string-append picolisp "/bin/pil")
-                        (string-append bin "/pil")))
-             #t)))))
+     '(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-after 'unpack 'fix-paths
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (picolisp-shebang (string-append "#!" out
+                                                "/bin/picolisp " out
+                                                "/lib/picolisp/lib.l"))
+                             (pil-shebang (string-append "#!" out "/bin/pil")))
+                        (substitute* '("bin/pil" "bin/psh" "bin/pty" "bin/vip"
+                                       "bin/watchdog")
+                          (("#\\!bin/picolisp lib.l")
+                           picolisp-shebang)
+                          (("#\\!\\.\\./bin/picolisp \\.\\./lib.l")
+                           picolisp-shebang)
+                          (("#\\!/usr/bin/picolisp /usr/lib/picolisp/lib.l")
+                           picolisp-shebang)
+                          (("#\\!/usr/bin/pil")
+                           pil-shebang))) #t))
+                  (replace 'build
+                    (lambda _
+                      (invoke "make" "-C" "src")))
+                  (add-before 'check 'set-home-for-tests
+                    (lambda _
+                      (setenv "HOME" "/tmp") #t))
+                  (replace 'check
+                    (lambda _
+                      (invoke "./pil" "test/lib.l" "-bye" "+")))
+                  (replace 'install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (bin (string-append out "/bin"))
+                             (doc (string-append out "/share/doc"))
+                             (man (string-append out "/share/man"))
+                             (picolisp (string-append out "/lib/picolisp")))
+                        (copy-recursively "man" man)
+                        (copy-recursively "doc" doc)
+                        (copy-recursively "." picolisp)
+                        (for-each (lambda (name)
+                                    (let ((path (string-append picolisp "/"
+                                                               name)))
+                                      (delete-file-recursively path)))
+                                  '("doc" "COPYING"
+                                    "INSTALL"
+                                    "man"
+                                    "pil"
+                                    "README"
+                                    "src"
+                                    "test"))
+                        (mkdir-p bin)
+                        (for-each (lambda (name)
+                                    (symlink name
+                                             (string-append bin "/"
+                                                            (basename name))))
+                                  (find-files (string-append picolisp "/bin")))))))))
     (synopsis "Interpreter for the PicoLisp programming language")
     (description
      "PicoLisp is a programming language, or really a programming system,
 including a built-in database engine and a GUI system.")
     (home-page "https://picolisp.com/wiki/?home")
-    (license license:expat)))
-
-(define-public picolisp
-  (match (%current-system)
-    ((or "aarch64-linux" "x86_64-linux")
-     (package
-       ;; Use the 32-bit picolisp to generate the assembly files required by
-       ;; the 64-bit picolisp.
-       (inherit picolisp32)
-       (name "picolisp")
-       (native-inputs
-        (list picolisp32 which))
-       (arguments
-        (substitute-keyword-arguments (package-arguments picolisp32)
-          ((#:system _ "") (%current-system))
-          ((#:phases phases)
-           `(modify-phases ,phases
-              (delete 'fix-paths)
-              (add-before 'build 'fix-paths
-                ;; This must run after the other shebang-patching phases,
-                ;; or they will override our changes.
-                (lambda* (#:key inputs outputs #:allow-other-keys)
-                  (let* ((picolisp32 (assoc-ref inputs "picolisp32"))
-                         (out (assoc-ref outputs "out"))
-                         (shebang-line (string-append
-                                        "#!" out "/bin/picolisp "
-                                        out "/lib/picolisp/lib.l")))
-                    (substitute* '("bin/pil"
-                                   "bin/pilIndent"
-                                   "bin/pilPretty"
-                                   "bin/psh"
-                                   "bin/replica"
-                                   "bin/vip"
-                                   "bin/watchdog"
-                                   "games/xchess"
-                                   "misc/bigtest"
-                                   "misc/calc"
-                                   "misc/chat"
-                                   "misc/mailing"
-                                   "src/mkVers")
-                      (("#\\!.*picolisp32.*/bin/picolisp .*lib\\.l")
-                       shebang-line))
-                    (substitute* "src64/mkAsm"
-                      (("/usr/bin/")
-                       (string-append picolisp32 "/bin/"))))
-                  #t))
-              (replace 'build
-                (lambda _
-                  (invoke "make" "-C" "src" "tools" "gate")
-                  (invoke "make" "-C" "src64" "CC=gcc" "picolisp")))))))))
-    (_
-     (package
-       (inherit picolisp32)
-       (name "picolisp")))))
+    (license license:expat)
+    (supported-systems '("aarch64-linux" "x86_64-linux"))))
 
 (define-public roswell
   (package

base-commit: 304a6deaeb42c24488d909641aeb72ddcf2b6a02
-- 
2.46.0





             reply	other threads:[~2024-11-19 21:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19 21:39 David Pflug [this message]
2024-11-20 17:19 ` bug#74441: [PATCH] gnu: picolisp: Update to 24.9 Guillaume Le Vaillant

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=b8a387b33d99dd53b14873dfdff1c37ac989f151.1732052355.git.david@pflug.io \
    --to=david@pflug.io \
    --cc=74441@debbugs.gnu.org \
    --cc=cox.katherine.e+guix@gmail.com \
    --cc=glv@posteo.net \
    --cc=jgart@dismail.de \
    --cc=me@bonfacemunyoki.com \
    --cc=sharlatanus@gmail.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).