all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#72001] [PATCH 1/2] gnu: Add icon.
@ 2024-07-08 23:04 Antero Mejr
  2024-07-08 23:07 ` [bug#72001] [PATCH 2/2] mailmap: Add alias for Antero Mejr Antero Mejr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Antero Mejr @ 2024-07-08 23:04 UTC (permalink / raw)
  To: 72001; +Cc: iyzsong, liliana.prikler, adam.faiz


* gnu/packages/esolangs.scm (icon): New variable.

Change-Id: Ibd61e5431a2a57b89b94391be87a9ca36a40c58b
---
 gnu/packages/esolangs.scm | 60 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/esolangs.scm b/gnu/packages/esolangs.scm
index 0651dda1b0..59790812f0 100644
--- a/gnu/packages/esolangs.scm
+++ b/gnu/packages/esolangs.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
 ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
 ;;; Copyright © 2022 jgart <jgart@dismail.de>
+;;; Copyright © 2024 Antero Mejr <mail@antr.me>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,16 +23,19 @@
 
 (define-module (gnu packages esolangs)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages))
@@ -156,3 +160,59 @@ (define-public shakespeare-spl
 If you want to assign a character, let's say Juliet, a positive value, you put
 her and another character on the stage and let that character praise Juliet.")
     (license license:gpl2+)))
+
+(define-public icon
+  (package
+    (name "icon")
+    (version "9.5.24a")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/gtownsend/icon")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0im1ikjyg14qvn4d31lpkhynaspws25m6whhb5xqwscq7xh4dy4p"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:parallel-build? #f ;non-deterministic errors
+           #:phases #~(modify-phases %standard-phases
+                        (add-before 'configure 'patch
+                          (lambda _
+                            (substitute* "Makefile"
+                              (("mkdir \\$D$") ""))
+                            (substitute* "tests/general/Test-opts"
+                              (("/usr/bin/env icon")
+                               "../../bin/icon"))
+                            (for-each
+                             (lambda (x)
+                               (substitute* x
+                                 (("/bin/sh")
+                                  (string-append
+                                   #$(this-package-input "bash-minimal")
+                                   "/bin/bash"))))
+                             '("ipl/progs/shar.icn"
+                               "ipl/progs/ipatch.icn"
+                               "src/icont/link.c"))))
+                        (replace 'configure
+                          (lambda _
+                            (invoke "make" "X-Configure" "name=linux")))
+                        (replace 'install
+                          (lambda _
+                            (invoke "make" "Install"
+                                    (string-append "dest=" #$output))))
+                        (replace 'check
+                          (lambda* (#:key tests? #:allow-other-keys)
+                            (when tests?
+                              (invoke "make" "Test")))))))
+    (inputs (list bash-minimal libx11 libxpm libxt libxaw))
+    (home-page "https://www2.cs.arizona.edu/icon/")
+    (synopsis "String-processing programming language")
+    (description
+     "Icon is a high-level programming language with facilities for processing
+strings and structures, expressions that may produce sequences of results,
+goal-directed evaluation that automatically searches for a successful result,
+and string scanning that allows operations on strings to be formulated at a
+conceptual level.  Icon also provides high-level graphics facilities.")
+    (license license:public-domain)))

base-commit: 13f0f52314244f08eb9fdd626d907c0c3976e06a
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#72001] [PATCH 2/2] mailmap: Add alias for Antero Mejr.
  2024-07-08 23:04 [bug#72001] [PATCH 1/2] gnu: Add icon Antero Mejr
@ 2024-07-08 23:07 ` Antero Mejr
  2024-07-09  9:02 ` [bug#72001] [PATCH 1/2] gnu: Add icon Sharlatan Hellseher
  2024-07-09 14:33 ` [bug#72001] [PATCH v2] " Antero Mejr
  2 siblings, 0 replies; 4+ messages in thread
From: Antero Mejr @ 2024-07-08 23:07 UTC (permalink / raw)
  To: 72001


* .mailmap: Map old emails for Antero Mejr to current address.

Change-Id: Ifb4a3b9ad2e08b9d6ddbab7508586e8ece75fda8
---
 .mailmap | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index 39b01335ee..833976fe79 100644
--- a/.mailmap
+++ b/.mailmap
@@ -11,6 +11,8 @@ Amirouche Boubekki <amirouche@hypermove.net>
 Andreas Enge <andreas@enge.fr> <andreas.enge@inria.fr>
 Andreas Enge <andreas@enge.fr> <privat@xobs-novena>
 Andy Wingo <wingo@igalia.com> <wingo@pobox.com>
+Antero Mejr <mail@antr.me> <antero@kodmin.com>
+Antero Mejr <mail@antr.me> <antero@mailbox.org>
 Ben Woodcroft <donttrustben@gmail.com>
 Ben Woodcroft <donttrustben@gmail.com> <b.woodcroft@uq.edu.au>
 Ben Woodcroft <donttrustben@gmail.com> <donttrustben near gmail.com>
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#72001] [PATCH 1/2] gnu: Add icon.
  2024-07-08 23:04 [bug#72001] [PATCH 1/2] gnu: Add icon Antero Mejr
  2024-07-08 23:07 ` [bug#72001] [PATCH 2/2] mailmap: Add alias for Antero Mejr Antero Mejr
@ 2024-07-09  9:02 ` Sharlatan Hellseher
  2024-07-09 14:33 ` [bug#72001] [PATCH v2] " Antero Mejr
  2 siblings, 0 replies; 4+ messages in thread
From: Sharlatan Hellseher @ 2024-07-09  9:02 UTC (permalink / raw)
  To: 72001

[-- Attachment #1: Type: text/plain, Size: 2383 bytes --]


Hi,

Thank you for the patches.

QA looks happy on most systems. There are some adjustment which may be
applied:

--8<---------------cut here---------------start------------->8---
+                            (for-each
+                             (lambda (x)
+                               (substitute* x
+                                 (("/bin/sh")
+                                  (string-append
+                                   #$(this-package-input "bash-minimal")
+                                   "/bin/bash"))))
+                             '("ipl/progs/shar.icn"
+                               "ipl/progs/ipatch.icn"
+                               "src/icont/link.c"))))
--8<---------------cut here---------------end--------------->8---

SUBSTITUTE* supports a list of files and this part may be simplified e.g.

--8<---------------cut here---------------start------------->8---
(substitute* '("ipl/progs/shar.icn"
               "ipl/progs/ipatch.icn"
               "src/icont/link.c")
  (("/bin/sh")
   (string-append #$(this-package-input "bash-minimal") "/bin/bash")))
--8<---------------cut here---------------end--------------->8---

It looks like upstream prefers esoteric approach in Makefile as well,
IMHO the standard phases may be preserved with patching Makefile targets
while providing <#:configure-flags> or <#:make-flags>:

--8<---------------cut here---------------start------------->8---
+                        (replace 'configure
+                          (lambda _
+                            (invoke "make" "X-Configure" "name=linux")))
+                        (replace 'install
+                          (lambda _
+                            (invoke "make" "Install"
+                                    (string-append "dest=" #$output))))
+                        (replace 'check
+                          (lambda* (#:key tests? #:allow-other-keys)
+                            (when tests?
+                              (invoke "make" "Test")))))))
--8<---------------cut here---------------end--------------->8---

Is Bash required during runtime as well? If not we may place it in
NATIVE-INPUTS:

--8<---------------cut here---------------start------------->8---
+    (inputs (list bash-minimal libx11 libxpm libxt libxaw))
--8<---------------cut here---------------end--------------->8---

Looking forward for v2!

--
Oleg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#72001] [PATCH v2] gnu: Add icon.
  2024-07-08 23:04 [bug#72001] [PATCH 1/2] gnu: Add icon Antero Mejr
  2024-07-08 23:07 ` [bug#72001] [PATCH 2/2] mailmap: Add alias for Antero Mejr Antero Mejr
  2024-07-09  9:02 ` [bug#72001] [PATCH 1/2] gnu: Add icon Sharlatan Hellseher
@ 2024-07-09 14:33 ` Antero Mejr
  2 siblings, 0 replies; 4+ messages in thread
From: Antero Mejr @ 2024-07-09 14:33 UTC (permalink / raw)
  To: 72001; +Cc: sharlatanus


* gnu/packages/esolangs.scm (icon): New variable.

Change-Id: Ibd61e5431a2a57b89b94391be87a9ca36a40c58b
---
Changes in v2:
- use #:test-target instead of replacing test phase.
- patch Makefile more to avoid phase modifications.
- use #:make-flags argument.
- organize output directory hierachy correctly.

Oleg: bash-minimal is required at runtime because icon does an unusual
thing where it embeds code into a shell script.

Also please merge the mailmap patch sent earlier along with this one.
Thanks.

 gnu/packages/esolangs.scm | 57 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/esolangs.scm b/gnu/packages/esolangs.scm
index 0651dda1b0..f89bc875b9 100644
--- a/gnu/packages/esolangs.scm
+++ b/gnu/packages/esolangs.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
 ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
 ;;; Copyright © 2022 jgart <jgart@dismail.de>
+;;; Copyright © 2024 Antero Mejr <mail@antr.me>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,16 +23,19 @@
 
 (define-module (gnu packages esolangs)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages))
@@ -156,3 +160,56 @@ (define-public shakespeare-spl
 If you want to assign a character, let's say Juliet, a positive value, you put
 her and another character on the stage and let that character praise Juliet.")
     (license license:gpl2+)))
+
+(define-public icon
+  (package
+    (name "icon")
+    (version "9.5.24a")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/gtownsend/icon")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0im1ikjyg14qvn4d31lpkhynaspws25m6whhb5xqwscq7xh4dy4p"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:make-flags #~(list "name=linux" (string-append "dest=" #$output))
+           #:parallel-build? #f ;non-deterministic errors
+           #:test-target "Test"
+           #:phases #~(modify-phases %standard-phases
+                        (add-before 'configure 'patch
+                          (lambda _
+                            (substitute* "Makefile"
+                              (("Install:") "install:")
+                              (("mkdir \\$D$") "")
+                              (("mkdir \\$D/bin") "mkdir -p $D/bin")
+                              (("\\$D/doc") "$D/share/doc/icon")
+                              (("cp README \\$D")
+                               "cp README $D/share/doc/icon"))
+                            (substitute* "tests/general/Test-opts"
+                              (("/usr/bin/env icon")
+                               "../../bin/icon"))
+                            (substitute* '("ipl/progs/shar.icn"
+                                           "ipl/progs/ipatch.icn"
+                                           "src/icont/link.c")
+                              (("/bin/sh")
+                               (string-append
+                                #$(this-package-input "bash-minimal")
+                                "/bin/bash")))))
+                        (replace 'configure
+                          (lambda* (#:key make-flags #:allow-other-keys)
+                            (apply invoke "make" "X-Configure"
+                                   make-flags))))))
+    (inputs (list bash-minimal libx11 libxpm libxt libxaw))
+    (home-page "https://www2.cs.arizona.edu/icon/")
+    (synopsis "String-processing programming language")
+    (description
+     "Icon is a high-level programming language with facilities for processing
+strings and structures, expressions that may produce sequences of results,
+goal-directed evaluation that automatically searches for a successful result,
+and string scanning that allows operations on strings to be formulated at a
+conceptual level.  Icon also provides high-level graphics facilities.")
+    (license license:public-domain)))

base-commit: 13f0f52314244f08eb9fdd626d907c0c3976e06a
prerequisite-patch-id: f51bc060af7f806eb590f28f45d1f06c26b02812
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-09 14:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-08 23:04 [bug#72001] [PATCH 1/2] gnu: Add icon Antero Mejr
2024-07-08 23:07 ` [bug#72001] [PATCH 2/2] mailmap: Add alias for Antero Mejr Antero Mejr
2024-07-09  9:02 ` [bug#72001] [PATCH 1/2] gnu: Add icon Sharlatan Hellseher
2024-07-09 14:33 ` [bug#72001] [PATCH v2] " Antero Mejr

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.