unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#45274] [PATCH] gnu: Add shakespeare-spl.
@ 2020-12-16 18:56 Leo Prikler
  2020-12-29 13:57 ` bug#45274: " Leo Prikler
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Prikler @ 2020-12-16 18:56 UTC (permalink / raw)
  To: 45274

* gnu/packages/patches/shakespeare-spl-fix-grammar.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it here.
* gnu/packages/esolangs.scm (shakespeare-spl): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/esolangs.scm                     | 45 +++++++++++++++++++
 .../patches/shakespeare-spl-fix-grammar.patch | 16 +++++++
 3 files changed, 62 insertions(+)
 create mode 100644 gnu/packages/patches/shakespeare-spl-fix-grammar.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2f267e8aee..c54b6b4337 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1608,6 +1608,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/sdl-libx11-1.6.patch			\
   %D%/packages/patches/seed-webkit.patch			\
   %D%/packages/patches/seq24-rename-mutex.patch			\
+  %D%/packages/patches/shakespeare-spl-fix-grammar.patch		\
   %D%/packages/patches/sharutils-CVE-2018-1000097.patch		\
   %D%/packages/patches/shadow-hurd-pctrl.patch			\
   %D%/packages/patches/shishi-fix-libgcrypt-detection.patch	\
diff --git a/gnu/packages/esolangs.scm b/gnu/packages/esolangs.scm
index 3986562d57..8b4f8c5f1e 100644
--- a/gnu/packages/esolangs.scm
+++ b/gnu/packages/esolangs.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
+;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -17,8 +18,13 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages esolangs)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages ncurses)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
+  #:use-module (guix build-system gnu)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
@@ -49,3 +55,42 @@
 written in C.  It supports several @dfn{fingerprints} (opt-in language extensions
 identified by unique ID codes).")
     (license license:gpl3)))
+
+(define-public shakespeare-spl
+  (package
+    (name "shakespeare-spl")
+    (version "1.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/shakespearelang/spl-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1lxpfhv01kcwy4l4xgx7j765g8g0v74jns0cr908nfw55h5fy1hj"))
+              (patches
+               (search-patches
+                "shakespeare-spl-fix-grammar.patch"))))
+    (build-system copy-build-system)
+    (arguments
+     `(#:imported-modules (,@%gnu-build-system-modules
+                           (guix build copy-build-system))
+       #:modules ((guix build copy-build-system)
+                  ((guix build gnu-build-system) #:prefix gnu:)
+                  (guix build utils))
+       #:install-plan '(("spl/bin" "bin")
+                        ("spl/lib" "lib")
+                        ("spl/include" "include"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'build
+           (assoc-ref gnu:%standard-phases 'build)))))
+    (native-inputs
+     `(("bison" ,bison)
+       ("flex" ,flex)))
+    (home-page "http://shakespearelang.sourceforge.net/")
+    (synopsis "Write programs like Shakespearean plays")
+    (description "Shakespeare is a programming language with the design goal
+of making programs read like plays.  The characters in the play are variables.
+If you want to assign a character, let's say Hamlet, a negative value, you put
+him and another character on the stage and let that character insult Hamlet.")
+    (license license:gpl2+)))
diff --git a/gnu/packages/patches/shakespeare-spl-fix-grammar.patch b/gnu/packages/patches/shakespeare-spl-fix-grammar.patch
new file mode 100644
index 0000000000..737c0eb8c1
--- /dev/null
+++ b/gnu/packages/patches/shakespeare-spl-fix-grammar.patch
@@ -0,0 +1,16 @@
+ROMAN_HUNDREDS, ROMAN_TENS and ROMAN_ONES seem to use syntax, that is not
+recognized (any longer?) by flex, so let's expand their definitions.
+
+Index: spl-1.2.1/include/roman_numbers.metaflex
+===================================================================
+--- spl-1.2.1.orig/include/roman_numbers.metaflex
++++ spl-1.2.1/include/roman_numbers.metaflex
+@@ -1,5 +1,5 @@
+ ROMAN_THOUSANDS m+
+-ROMAN_HUNDREDS  (c(d|m)|dc{0,3}|c{1,3})
+-ROMAN_TENS      (x(l|c)|lx{0,3}|x{1,3})
+-ROMAN_ONES      (i(v|x)|vi{0,3}|i{1,3})
++ROMAN_HUNDREDS  (c(d|m|c?c?)|dc?c?c?)
++ROMAN_TENS      (x(l|c|x?x?)|lx?x?x?)
++ROMAN_ONES      (i(v|x|i?i?)|vi?i?i?)
+ ROMAN_NUMBER    {ROMAN_ONES}|{ROMAN_TENS}{ROMAN_ONES}?|{ROMAN_HUNDREDS}{ROMAN_TENS}?{ROMAN_ONES}?|{ROMAN_THOUSANDS}{ROMAN_HUNDREDS}?{ROMAN_TENS}?{ROMAN_ONES}?
-- 
2.29.2





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

* bug#45274: [PATCH] gnu: Add shakespeare-spl.
  2020-12-16 18:56 [bug#45274] [PATCH] gnu: Add shakespeare-spl Leo Prikler
@ 2020-12-29 13:57 ` Leo Prikler
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Prikler @ 2020-12-29 13:57 UTC (permalink / raw)
  To: 45274-done

Pushed with slightly more positive wording as
142f8713ab647ecb8833dcf9eb98e3bdc62cd44a.





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

end of thread, other threads:[~2020-12-29 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 18:56 [bug#45274] [PATCH] gnu: Add shakespeare-spl Leo Prikler
2020-12-29 13:57 ` bug#45274: " Leo Prikler

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).