diff mbox series

[bug#55182,1/3] gnu: apl: Update to 1.8-r1550.

Message ID 20220429115456.539028-1-paul@apatience.com
State Accepted
Headers show
Series [bug#55182,1/3] gnu: apl: Update to 1.8-r1550. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Paul A. Patience April 29, 2022, 11:55 a.m. UTC
This commit fixes a failing build caused by -Werror (the configure
script no longer sets the -Werror compilation flag).
It also ensures no build information is leaked (through GNU APL's
--show_src_dir and --show_all_dirs flags).

* gnu/packages/apl.scm (apl): Update to 1.8-r1550.
[arguments]: Add 'fix-configure' phase.
[license]: Prefix with 'license:'.
---
 gnu/packages/apl.scm | 76 ++++++++++++++++++++++++++++----------------
 1 file changed, 48 insertions(+), 28 deletions(-)

--
2.36.0

Comments

M April 29, 2022, 12:57 p.m. UTC | #1
Paul A. Patience schreef op vr 29-04-2022 om 11:55 [+0000]:
> +                 ;; Don't leak build information.
> +                 (("\\\\\"\\$abs_srcdir\\\\\"") "\\\"\\\"")))))))

Due to container shenanigans, recording the build directory (/tmp/guix-
build-...) does not form a reproducibility problem in Guix.  (The
builder sees /tmp/guix-build-...-0 even though it is named /tmp/guix-
build-...-N outside the builder.)

Greetings,
Maxime.
Ludovic Courtès May 2, 2022, 12:53 p.m. UTC | #2
Hi,

"Paul A. Patience" <paul@apatience.com> skribis:

>   gnu: apl: Update to 1.8-r1550.
>   gnu: apl: Remove input labels.
>   gnu: apl: Use G-expressions.

Applied, thanks!  And thanks Maxime for reviewing, as always.

Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/apl.scm b/gnu/packages/apl.scm
index badec04333..485d3aa296 100644
--- a/gnu/packages/apl.scm
+++ b/gnu/packages/apl.scm
@@ -2,6 +2,7 @@ 
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,9 +20,10 @@ 
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

 (define-module (gnu packages apl)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix git-download)
+  #:use-module (guix svn-download)
   #:use-module (guix packages)
-  #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages maths)
@@ -30,30 +32,48 @@  (define-module (gnu packages apl)
   #:use-module (gnu packages sqlite))

 (define-public apl
-  (package
-    (name "apl")
-    (version "1.8")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/apl/apl-" version ".tar.gz"))
-      (sha256
-       (base32
-        "1jxvv2h3y1am1fw6r5sn3say1n0dj8shmscbybl0qhqdia2lqkql"))))
-    (build-system gnu-build-system)
-    (home-page "https://www.gnu.org/software/apl/")
-    (inputs
-     `(("gettext" ,gettext-minimal)
-       ("lapack" ,lapack)
-       ("pcre" ,pcre2)
-       ("sqlite" ,sqlite)
-       ("readline" ,readline)))
-    (arguments
-     `(#:configure-flags (list (string-append
-                                "--with-sqlite3="
-                                (assoc-ref %build-inputs "sqlite")))))
-    (synopsis "APL interpreter")
-    (description
-     "GNU APL is a free interpreter for the programming language APL.  It is
+  (let ((revision 1550))
+    (package
+      (name "apl")
+      (version (string-append "1.8-r" (number->string revision)))
+      (source
+       (origin
+         (method svn-fetch)
+         (uri (svn-reference
+               (url "svn://svn.savannah.gnu.org/apl/trunk")
+               (revision revision)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1bgc3a09f35zrqq2irhm1hspppnxjqas0fmcw14hkc7910br9ip3"))))
+      (build-system gnu-build-system)
+      (home-page "https://www.gnu.org/software/apl/")
+      (inputs
+       `(("gettext" ,gettext-minimal)
+         ("lapack" ,lapack)
+         ("pcre" ,pcre2)
+         ("sqlite" ,sqlite)
+         ("readline" ,readline)))
+      (arguments
+       `(#:configure-flags (list (string-append
+                                  "--with-sqlite3="
+                                  (assoc-ref %build-inputs "sqlite")))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'configure 'fix-configure
+             (lambda _
+               (substitute* "buildtag.sh"
+                 ;; Don't exit on failed SVN-related calls.
+                 (("^ +return 0\n") "")
+                 ;; Manually set the SVN revision, since the directory is
+                 ;; unversioned and we know it anyway.
+                 (("^SVNINFO=.*")
+                  ,(string-append "SVNINFO=" (number->string revision) "\n"))
+                 ;; Requires running ‘svn info’ on a versioned directory.
+                 (("\\\\\"\\$ARCHIVE_SVNINFO\\\\\"") "\\\"\\\"")
+                 ;; Don't leak build information.
+                 (("\\\\\"\\$abs_srcdir\\\\\"") "\\\"\\\"")))))))
+      (synopsis "APL interpreter")
+      (description
+       "GNU APL is a free interpreter for the programming language APL.  It is
 an implementation of the ISO standard 13751.")
-    (license gpl3+)))
+      (license license:gpl3+))))