summary refs log tree commit diff
path: root/gnu/packages/pascal.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-12-20 11:13:15 +0100
committerRicardo Wurmus <rekado@elephly.net>2022-12-20 12:09:34 +0100
commit4651d380b4737e66ae328a44c15f3ae1c70c29cb (patch)
treeaa43b7d52bdaddbdefbb95f34e736e5fdc689371 /gnu/packages/pascal.scm
parentfd4ca4a2661cba23e7ee688628a1a4a0ee1d943f (diff)
downloadguix-4651d380b4737e66ae328a44c15f3ae1c70c29cb.tar.gz
gnu: p2c: Update to 2.02.
* gnu/packages/pascal.scm (p2c): Update to 2.02.
[arguments]: Use gexp.
[native-inputs]: Add unzip.
Diffstat (limited to 'gnu/packages/pascal.scm')
-rw-r--r--gnu/packages/pascal.scm58
1 files changed, 28 insertions, 30 deletions
diff --git a/gnu/packages/pascal.scm b/gnu/packages/pascal.scm
index 8c193830fd..f563f077dc 100644
--- a/gnu/packages/pascal.scm
+++ b/gnu/packages/pascal.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Kei Kebreau <address@hidden>
 ;;; Copyright © 2020 Eric Bavier <bavier@posteo.net>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +24,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
@@ -229,43 +231,39 @@ many useful extensions to the Pascal programming language.")
 (define-public p2c
   (package
     (name "p2c")
-    (version "2.01")
+    (version "2.02")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://alum.mit.edu/www/toms/p2c/p2c-"
-                                  version ".tar.gz"))
+              (uri (string-append "http://users.fred.net/tds/lab/p2c/p2c-"
+                                  version ".zip"))
               (sha256
                (base32
-                "03x72lv6jrvikbrpz4kfq1xp61l2jw5ki6capib71lxs65zndajn"))))
+                "17q6s0vbz298pks80bxf4r6gm8kwbrml1q3vfs6g6yj75sqj58xs"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:make-flags
-       (let ((out (assoc-ref %outputs "out")))
-         (list (string-append "CC=" ,(cc-for-target))
-               (string-append "HOMEDIR=" out "/lib/p2c")
-               (string-append "INCDIR=" out "/include/p2c")
-               (string-append "BINDIR=" out "/bin")
-               (string-append "LIBDIR=" out "/lib")
-               (string-append "MANDIR=" out "/share/man/man1")
-               "MANFILE=p2c.man.inst"))
-       #:test-target "test"
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (add-before 'build 'mkdir
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (mkdir-p (string-append out "/share/man"))
-               (mkdir-p (string-append out "/lib"))
-               (mkdir-p (string-append out "/bin"))
-               (mkdir-p (string-append out "/include")))
-             #t))
-         (add-before 'build 'chdir
-           (lambda* (#:key make-flags #:allow-other-keys)
-             (chdir "src")
-             #t)))))
+     (list
+      #:make-flags
+      #~(list (string-append "CC=" #$(cc-for-target))
+              (string-append "HOMEDIR=" #$output "/lib/p2c")
+              (string-append "INCDIR=" #$output "/include/p2c")
+              (string-append "BINDIR=" #$output "/bin")
+              (string-append "LIBDIR=" #$output "/lib")
+              (string-append "MANDIR=" #$output "/share/man/man1")
+              "MANFILE=p2c.man.inst")
+      #:test-target "test"
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (add-before 'build 'mkdir
+            (lambda _
+              (mkdir-p (string-append #$output "/share/man"))
+              (mkdir-p (string-append #$output "/lib"))
+              (mkdir-p (string-append #$output "/bin"))
+              (mkdir-p (string-append #$output "/include"))))
+          (add-before 'build 'chdir
+            (lambda _ (chdir "src"))))))
     (native-inputs
-     (list perl which))
+     (list perl unzip which))
     (synopsis "p2c converts Pascal programs to C programs")
     (description "This package provides @command{p2c}, a program to convert
 Pascal source code to C source code, and @command{p2cc}, a compiler for