unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#32638] [PATCH] games.scm - add frotz packages
@ 2018-09-05  2:43 Benjamin Slade
  2018-09-06 18:20 ` Kei Kebreau
  2018-09-08  3:08 ` Benjamin Slade
  0 siblings, 2 replies; 5+ messages in thread
From: Benjamin Slade @ 2018-09-05  2:43 UTC (permalink / raw)
  To: 32638

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

gnu: Add frotz, frotz-dumb-terminal, frotz-sdl

* gnu/packages/games.scm (frotz): New variable.
* gnu/packages/games.scm (frotz-dumb-terminal): New variable.
* gnu/packages/games.scm (frotz-sdl): New variable.

[-- Attachment #2: add frotz pkgs to games.scm --]
[-- Type: text/x-patch, Size: 7604 bytes --]

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 728f76380..0ae2d0548 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2018 okapi <okapi@firemail.cc>
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2018 Madalin Ionel-Patrascu <madalinionel.patrascu@mdc-berlin.de>
+;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5553,3 +5554,153 @@ open-source FPS of its kind.")
     (license (list license:gpl2+
                    license:bsd-3 ; /source/d0_blind_id folder and others
                    (license:x11-style "" "See file rcon.pl.")))))
+
+(define-public frotz
+  (package
+    (name "frotz")
+    (version "2.44")
+    (source (origin
+              (method url-fetch)
+              (uri (list (string-append
+                          "http://www.ifarchive.org/if-archive/infocom/interpreters/"
+                          name "/" name "-" version ".tar.gz")
+                         (string-append
+                          "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
+                          name "/" name "-" version ".tar.gz")))
+              (sha256
+               (base32
+                "1v735xr3blznac8fnwa27s1vhllx4jpz7kw7qdw1bsfj6kq21v3k"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; there are no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'curses
+           (lambda _
+             (substitute* "Makefile"
+               (("lcurses") "lncurses"))))
+         (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/man6")))
+               (install-file "frotz" bin)
+               (mkdir-p man)
+               (install-file "doc/frotz.6" man)
+               #t))))))
+    (inputs `(("libmodplug" ,libmodplug)
+              ("libsamplerate" ,libsamplerate)
+              ("libsndfile" ,libsndfile)
+              ("libvorbis" ,libvorbis)
+              ("ncurses" ,ncurses)))
+    (synopsis "Portable Z-machine interpreter (ncurses version) for text adventure games")
+    (description "Frotz is an interpreter for Infocom games and
+other Z-machine games in the text adventure/interactive fiction genre. This version
+of Frotz complies with standard 1.0 of Graham Nelson's specification. It plays all
+Z-code games V1-V8, including V6, with sound support through libao, and uses ncurses
+for text display.")
+    (home-page "http://frotz.sourceforge.net")
+    (license license:gpl2)))
+
+(define-public frotz-dumb-terminal
+  (package
+    (name "frotz-dumb-terminal")
+    (version "2.44")
+    (source (origin
+              (method url-fetch)
+              (uri (list (string-append
+                          "http://www.ifarchive.org/if-archive/infocom/interpreters/"
+                          "frotz" "/" "frotz" "-" version ".tar.gz")
+                         (string-append
+                          "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
+                          "frotz" "/" "frotz" "-" version ".tar.gz")))
+              (sha256
+               (base32
+                "1v735xr3blznac8fnwa27s1vhllx4jpz7kw7qdw1bsfj6kq21v3k"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; there are no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'build
+           (lambda _
+             (invoke "make" "dumb")))
+         (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/man6")))
+               (install-file "dfrotz" bin)
+               (mkdir-p man)
+               (install-file "doc/dfrotz.6" man)
+               #t))))))
+    (synopsis "Portable Z-machine dumb interpreter for text adventure games")
+    (description "Frotz is an interpreter for Infocom games and
+other Z-machine games in the text adventure/interactive fiction genre. dfrotz is the
+dumb interface version. You get no screen control; everything is just printed to the
+terminal line by line.  The terminal handles all the scrolling. Maybe you'd like to
+experience what it's like to play Adventure on a teletype. A much cooler use for
+compiling Frotz with the dumb interface is that it can be wrapped in CGI scripting,
+PHP, and the like to allow people to play games on webpages.  It can also be made
+into a chat bot.")
+    (home-page "http://frotz.sourceforge.net")
+    (license license:gpl2)))
+
+(define-public frotz-sdl
+  (let* ((commit "4de8c34f2116fff554af6216c30ec9d41bf50b24"))
+    (package
+      (name "frotz-sdl")
+      (version "2.45pre")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://gitlab.com/DavidGriffith/frotz")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "18ms21pcrl7ipcnyqnf8janamkryzx78frsgd9kfk67jvbj0z2k8"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f                    ; there are no tests
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-before 'build 'curses
+             (lambda _
+               (substitute* "Makefile"
+                 (("lcurses") "lncurses"))))
+           (replace 'build
+             (lambda _
+               (invoke "make" "sdl")))
+           (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/man6")))
+                 (install-file "sfrotz" bin)
+                 (mkdir-p man)
+                 (install-file "doc/sfrotz.6" man)
+                 #t))))))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("which" ,which)))
+      (inputs `(("sdl2" ,sdl2)
+                ("sdl2-mixer" ,sdl2-mixer)             
+                ("libmodplug" ,libmodplug)
+                ("libsamplerate" ,libsamplerate)
+                ("libsndfile" ,libsndfile)
+                ("libvorbis" ,libvorbis)
+                ("ncurses" ,ncurses)
+                ("freetype" ,freetype)
+                ("libjpeg-turbo" ,libjpeg-turbo)))
+      (synopsis "Portable Z-machine interpreter (SDL-port) for text adventure games")
+      (description "Frotz is an interpreter for Infocom games and other Z-machine
+games in the text adventure/interactive fiction genre. This version of Frotz using
+SDL fully supports all these versions of the Z-Machine including the graphical
+version 6.  Graphics and sound are created through the use of the SDL libraries.
+AIFF sound effects and music in MOD and OGG formats are supported when packaged in
+Blorb container files or optionally from individual files.")
+      (home-page "http://frotz.sourceforge.net")
+      (license license:gpl2))))

[-- Attachment #3: Type: text/plain, Size: 247 bytes --]


-- 
Benjamin Slade - https://babbagefiles.xyz
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

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

* [bug#32638] [PATCH] games.scm - add frotz packages
  2018-09-05  2:43 [bug#32638] [PATCH] games.scm - add frotz packages Benjamin Slade
@ 2018-09-06 18:20 ` Kei Kebreau
  2018-09-06 19:25   ` Benjamin Slade
  2018-09-08  3:08 ` Benjamin Slade
  1 sibling, 1 reply; 5+ messages in thread
From: Kei Kebreau @ 2018-09-06 18:20 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: 32638

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

Hi Benjamin,

> gnu: Add frotz, frotz-dumb-terminal, frotz-sdl
>
> * gnu/packages/games.scm (frotz): New variable.
> * gnu/packages/games.scm (frotz-dumb-terminal): New variable.
> * gnu/packages/games.scm (frotz-sdl): New variable.
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 728f76380..0ae2d0548 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -34,6 +34,7 @@
>  ;;; Copyright © 2018 okapi <okapi@firemail.cc>
>  ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
>  ;;; Copyright © 2018 Madalin Ionel-Patrascu <madalinionel.patrascu@mdc-berlin.de>
> +;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -5553,3 +5554,153 @@ open-source FPS of its kind.")
>      (license (list license:gpl2+
>                     license:bsd-3 ; /source/d0_blind_id folder and others
>                     (license:x11-style "" "See file rcon.pl.")))))
> +
> +(define-public frotz
> +  (package
> +    (name "frotz")
> +    (version "2.44")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (list (string-append
> +                          "http://www.ifarchive.org/if-archive/infocom/interpreters/"
> +                          name "/" name "-" version ".tar.gz")
> +                         (string-append
> +                          "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
> +                          name "/" name "-" version ".tar.gz")))
> +              (sha256
> +               (base32
> +                "1v735xr3blznac8fnwa27s1vhllx4jpz7kw7qdw1bsfj6kq21v3k"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:tests? #f                      ; there are no tests
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (add-before 'build 'curses
> +           (lambda _
> +             (substitute* "Makefile"
> +               (("lcurses") "lncurses"))))

The "curses" phase above can be considered a replacement for the
configure phase. Also, be sure that the phase returns #t, as the
"substitute*" procedure has an unspecified return value.

> +         (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/man6")))
> +               (install-file "frotz" bin)
> +               (mkdir-p man)
> +               (install-file "doc/frotz.6" man)
> +               #t))))))
> +    (inputs `(("libmodplug" ,libmodplug)
> +              ("libsamplerate" ,libsamplerate)
> +              ("libsndfile" ,libsndfile)
> +              ("libvorbis" ,libvorbis)
> +              ("ncurses" ,ncurses)))
> +    (synopsis "Portable Z-machine interpreter (ncurses version) for text adventure games")
> +    (description "Frotz is an interpreter for Infocom games and
> +other Z-machine games in the text adventure/interactive fiction genre. This version
> +of Frotz complies with standard 1.0 of Graham Nelson's specification. It plays all
> +Z-code games V1-V8, including V6, with sound support through libao, and uses ncurses
> +for text display.")

In the description, sentences should be separated by two spaces. Running
"./pre-inst-env guix lint frotz" will check these sorts of things (and
more) automatically for you.

As an aside, if you can keep the line lengths of the description at or
under 80 characters wide, please do so.

> +    (home-page "http://frotz.sourceforge.net")
> +    (license license:gpl2)))

Licensing trivia:
The license for this software appears to be GPL2+. The COPYING file says
GPL v2, which defaults to GPL v2 or later unless specified otherwise,
and some source files are explicitly listed with the GPL v2 or later.

> +
> +(define-public frotz-dumb-terminal
> +  (package
> +    (name "frotz-dumb-terminal")
> +    (version "2.44")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (list (string-append
> +                          "http://www.ifarchive.org/if-archive/infocom/interpreters/"
> +                          "frotz" "/" "frotz" "-" version ".tar.gz")
> +                         (string-append
> +                          "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
> +                          "frotz" "/" "frotz" "-" version ".tar.gz")))
> +              (sha256
> +               (base32
> +                "1v735xr3blznac8fnwa27s1vhllx4jpz7kw7qdw1bsfj6kq21v3k"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:tests? #f                      ; there are no tests
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (replace 'build
> +           (lambda _
> +             (invoke "make" "dumb")))
> +         (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/man6")))
> +               (install-file "dfrotz" bin)
> +               (mkdir-p man)
> +               (install-file "doc/dfrotz.6" man)
> +               #t))))))
> +    (synopsis "Portable Z-machine dumb interpreter for text adventure games")
> +    (description "Frotz is an interpreter for Infocom games and
> +other Z-machine games in the text adventure/interactive fiction genre. dfrotz is the
> +dumb interface version. You get no screen control; everything is just printed to the
> +terminal line by line.  The terminal handles all the scrolling. Maybe you'd like to
> +experience what it's like to play Adventure on a teletype. A much cooler use for
> +compiling Frotz with the dumb interface is that it can be wrapped in CGI scripting,
> +PHP, and the like to allow people to play games on webpages.  It can also be made
> +into a chat bot.")
> +    (home-page "http://frotz.sourceforge.net")
> +    (license license:gpl2)))
> +

Same comments as above for the description and license.

> +(define-public frotz-sdl
> +  (let* ((commit "4de8c34f2116fff554af6216c30ec9d41bf50b24"))
> +    (package
> +      (name "frotz-sdl")
> +      (version "2.45pre")

Why the git checkout? I assume the stable version's SDL port is not working?

> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://gitlab.com/DavidGriffith/frotz")
> +                      (commit commit)))
> +                (sha256
> +                 (base32
> +                  "18ms21pcrl7ipcnyqnf8janamkryzx78frsgd9kfk67jvbj0z2k8"))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       `(#:tests? #f                    ; there are no tests
> +         #:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure)
> +           (add-before 'build 'curses
> +             (lambda _
> +               (substitute* "Makefile"
> +                 (("lcurses") "lncurses"))))
> +           (replace 'build
> +             (lambda _
> +               (invoke "make" "sdl")))
> +           (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/man6")))
> +                 (install-file "sfrotz" bin)
> +                 (mkdir-p man)
> +                 (install-file "doc/sfrotz.6" man)
> +                 #t))))))
> +      (native-inputs
> +       `(("pkg-config" ,pkg-config)
> +         ("which" ,which)))
> +      (inputs `(("sdl2" ,sdl2)
> +                ("sdl2-mixer" ,sdl2-mixer)             
> +                ("libmodplug" ,libmodplug)
> +                ("libsamplerate" ,libsamplerate)
> +                ("libsndfile" ,libsndfile)
> +                ("libvorbis" ,libvorbis)
> +                ("ncurses" ,ncurses)
> +                ("freetype" ,freetype)
> +                ("libjpeg-turbo" ,libjpeg-turbo)))
> +      (synopsis "Portable Z-machine interpreter (SDL-port) for text
> adventure games")

I don't think a hyphen is necessary in "SDL-port".

> +      (description "Frotz is an interpreter for Infocom games and other Z-machine
> +games in the text adventure/interactive fiction genre. This version of Frotz using
> +SDL fully supports all these versions of the Z-Machine including the graphical
> +version 6.  Graphics and sound are created through the use of the SDL libraries.
> +AIFF sound effects and music in MOD and OGG formats are supported when packaged in
> +Blorb container files or optionally from individual files.")
> +      (home-page "http://frotz.sourceforge.net")
> +      (license license:gpl2))))

Same comments as above for the curses/configure phases, description and license.
Also! frotz-sdl doesn't build reproducibly because of a timestamp in the
Makefile named BUILD_DATE_TIME that ends up in the final binary. Please
substitute that as well in the configure phase.

Other than the comments above, all of the packages here work fine!
Thanks for contributing!

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

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

* [bug#32638] [PATCH] games.scm - add frotz packages
  2018-09-06 18:20 ` Kei Kebreau
@ 2018-09-06 19:25   ` Benjamin Slade
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Slade @ 2018-09-06 19:25 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 32638

Many thanks, Kei, for the detailed commentary! It's very helpful (I'm
still learning the ropes for guix packaging).

 > In the description, sentences should be separated by two
 > spaces. Running "./pre-inst-env guix lint frotz" will check these
 > sorts of things (and more) automatically for you.

Is there a way to do this directly in Emacs, do you know?

 > Why the git checkout? I assume the stable version's SDL port is not working?

Yes, stable's SDL port doesn't build. (I notice that sfrotz/frotz-sdl
seems to be missing from a number of distros, presumably for this
reason).

 > Other than the comments above, all of the packages here work fine!
 > Thanks for contributing!

I'll fix things up along the lines suggested and resubmit.

thanks again,
   —Ben


--
Dr Benjamin Slade - Dept of Linguistics, Uni of Utah
   (https://slade.jnanam.net . https://babbagefiles.xyz)
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

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

* [bug#32638] [PATCH] games.scm - add frotz packages
  2018-09-05  2:43 [bug#32638] [PATCH] games.scm - add frotz packages Benjamin Slade
  2018-09-06 18:20 ` Kei Kebreau
@ 2018-09-08  3:08 ` Benjamin Slade
  2018-09-08 17:47   ` bug#32638: " Kei Kebreau
  1 sibling, 1 reply; 5+ messages in thread
From: Benjamin Slade @ 2018-09-08  3:08 UTC (permalink / raw)
  To: 32638; +Cc: Kei Kebreau

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

gnu: Add frotz, frotz-dumb-terminal, frotz-sdl

* gnu/packages/games.scm (frotz): New variable.
* gnu/packages/games.scm (frotz-dumb-terminal): New variable.
* gnu/packages/games.scm (frotz-sdl): New variable.


[-- Attachment #2: games.scm - add frotz pkgs --]
[-- Type: text/x-patch, Size: 7781 bytes --]

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 728f76380..eb8ce7e8e 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2018 okapi <okapi@firemail.cc>
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2018 Madalin Ionel-Patrascu <madalinionel.patrascu@mdc-berlin.de>
+;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5553,3 +5554,159 @@ open-source FPS of its kind.")
     (license (list license:gpl2+
                    license:bsd-3 ; /source/d0_blind_id folder and others
                    (license:x11-style "" "See file rcon.pl.")))))
+
+(define-public frotz
+  (package
+    (name "frotz")
+    (version "2.44")
+    (source (origin
+              (method url-fetch)
+              (uri (list (string-append
+                          "http://www.ifarchive.org/if-archive/infocom/interpreters/"
+                          name "/" name "-" version ".tar.gz")
+                         (string-append
+                          "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
+                          name "/" name "-" version ".tar.gz")))
+              (sha256
+               (base32
+                "1v735xr3blznac8fnwa27s1vhllx4jpz7kw7qdw1bsfj6kq21v3k"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; there are no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'curses
+           (lambda _
+             (substitute* "Makefile"
+               (("lcurses") "lncurses"))
+             #t))
+         (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/man6")))
+               (install-file "frotz" bin)
+               (mkdir-p man)
+               (install-file "doc/frotz.6" man)
+               #t))))))
+    (inputs `(("libmodplug" ,libmodplug)
+              ("libsamplerate" ,libsamplerate)
+              ("libsndfile" ,libsndfile)
+              ("libvorbis" ,libvorbis)
+              ("ncurses" ,ncurses)))
+    (synopsis "Portable Z-machine interpreter (ncurses version)
+for text adventure games")
+    (description "Frotz is an interpreter for Infocom games
+and other Z-machine games in the text adventure/interactive fiction genre.
+This version of Frotz complies with standard 1.0 of Graham Nelson's specification.
+It plays all Z-code games V1-V8, including V6, with sound support through libao,
+and uses ncurses for text display.")
+    (home-page "http://frotz.sourceforge.net")
+    (license license:gpl2+)))
+
+(define-public frotz-dumb-terminal
+  (package
+    (name "frotz-dumb-terminal")
+    (version "2.44")
+    (source (origin
+              (method url-fetch)
+              (uri (list (string-append
+                          "http://www.ifarchive.org/if-archive/infocom/interpreters/"
+                          "frotz" "/" "frotz" "-" version ".tar.gz")
+                         (string-append
+                          "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
+                          "frotz" "/" "frotz" "-" version ".tar.gz")))
+              (sha256
+               (base32
+                "1v735xr3blznac8fnwa27s1vhllx4jpz7kw7qdw1bsfj6kq21v3k"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; there are no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'build
+           (lambda _
+             (invoke "make" "dumb")))
+         (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/man6")))
+               (install-file "dfrotz" bin)
+               (mkdir-p man)
+               (install-file "doc/dfrotz.6" man)
+               #t))))))
+    (synopsis "Portable Z-machine dumb interpreter for text adventure games")
+    (description "Frotz is an interpreter for Infocom games and
+other Z-machine games in the text adventure/interactive fiction genre.
+dfrotz is the dumb interface version.  You get no screen control; everything
+is just printed to the terminal line by line.  The terminal handles all the
+scrolling.  Maybe you'd like to experience what it's like to play Adventure on
+a teletype.  A much cooler use for compiling Frotz with the dumb interface is
+that it can be wrapped in CGI scripting, PHP, and the like to allow people
+to play games on webpages.  It can also be made into a chat bot.")
+    (home-page "http://frotz.sourceforge.net")
+    (license license:gpl2+)))
+
+(define-public frotz-sdl
+  (let* ((commit "4de8c34f2116fff554af6216c30ec9d41bf50b24"))
+    (package
+      (name "frotz-sdl")
+      (version "2.45pre")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://gitlab.com/DavidGriffith/frotz")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "18ms21pcrl7ipcnyqnf8janamkryzx78frsgd9kfk67jvbj0z2k8"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f                    ; there are no tests
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-before 'build 'curses
+             (lambda _
+               (substitute* "Makefile"
+                 (("lcurses") "lncurses")
+                 (("^BUILD_DATE_TIME =.*$")
+                  "BUILD_DATE_TIME = \"2.45pre-20180907.00000\"\n"))
+               #t))
+           (replace 'build
+             (lambda _
+               (invoke "make" "sdl")))
+           (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/man6")))
+                 (install-file "sfrotz" bin)
+                 (mkdir-p man)
+                 (install-file "doc/sfrotz.6" man)
+                 #t))))))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("which" ,which)
+         ("perl" ,perl)))
+      (inputs `(("sdl2" ,sdl2)
+                ("sdl2-mixer" ,sdl2-mixer)
+                ("libmodplug" ,libmodplug)
+                ("libsamplerate" ,libsamplerate)
+                ("libsndfile" ,libsndfile)
+                ("libvorbis" ,libvorbis)
+                ("ncurses" ,ncurses)
+                ("freetype" ,freetype)
+                ("libjpeg-turbo" ,libjpeg-turbo)))
+      (synopsis "Portable Z-machine interpreter (SDL port) for text adventure games")
+      (description "Frotz is an interpreter for Infocom games and other Z-machine
+games in the text adventure/interactive fiction genre.  This version of Frotz
+using SDL fully supports all these versions of the Z-Machine including the
+graphical version 6.  Graphics and sound are created through the use of the SDL
+libraries.  AIFF sound effects and music in MOD and OGG formats are supported
+when packaged in Blorb container files or optionally from individual files.")
+      (home-page "http://frotz.sourceforge.net")
+      (license license:gpl2+))))

[-- Attachment #3: Type: text/plain, Size: 310 bytes --]



-- 
Dr Benjamin Slade - Uni of Utah, Linguistics
   ( https://slade.jnanam.net . https://babbagefiles.xyz )
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

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

* bug#32638: [PATCH] games.scm - add frotz packages
  2018-09-08  3:08 ` Benjamin Slade
@ 2018-09-08 17:47   ` Kei Kebreau
  0 siblings, 0 replies; 5+ messages in thread
From: Kei Kebreau @ 2018-09-08 17:47 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: 32638-done

Benjamin Slade <slade@jnanam.net> writes:

> gnu: Add frotz, frotz-dumb-terminal, frotz-sdl
>
> * gnu/packages/games.scm (frotz): New variable.
> * gnu/packages/games.scm (frotz-dumb-terminal): New variable.
> * gnu/packages/games.scm (frotz-sdl): New variable.
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 728f76380..eb8ce7e8e 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -34,6 +34,7 @@
>  ;;; Copyright © 2018 okapi <okapi@firemail.cc>
>  ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
>  ;;; Copyright © 2018 Madalin Ionel-Patrascu <madalinionel.patrascu@mdc-berlin.de>
> +;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -5553,3 +5554,159 @@ open-source FPS of its kind.")
>      (license (list license:gpl2+
>                     license:bsd-3 ; /source/d0_blind_id folder and others
>                     (license:x11-style "" "See file rcon.pl.")))))
> +
> +(define-public frotz
> +  (package
> +    (name "frotz")
> +    (version "2.44")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (list (string-append
> +                          "http://www.ifarchive.org/if-archive/infocom/interpreters/"
> +                          name "/" name "-" version ".tar.gz")
> +                         (string-append
> +                          "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
> +                          name "/" name "-" version ".tar.gz")))
> +              (sha256
> +               (base32
> +                "1v735xr3blznac8fnwa27s1vhllx4jpz7kw7qdw1bsfj6kq21v3k"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:tests? #f                      ; there are no tests
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (add-before 'build 'curses
> +           (lambda _
> +             (substitute* "Makefile"
> +               (("lcurses") "lncurses"))
> +             #t))
> +         (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/man6")))
> +               (install-file "frotz" bin)
> +               (mkdir-p man)
> +               (install-file "doc/frotz.6" man)
> +               #t))))))
> +    (inputs `(("libmodplug" ,libmodplug)
> +              ("libsamplerate" ,libsamplerate)
> +              ("libsndfile" ,libsndfile)
> +              ("libvorbis" ,libvorbis)
> +              ("ncurses" ,ncurses)))
> +    (synopsis "Portable Z-machine interpreter (ncurses version)
> +for text adventure games")

I don't know that we prefer line breaks in the synopsis, so I removed it.

> +    (description "Frotz is an interpreter for Infocom games
> +and other Z-machine games in the text adventure/interactive fiction genre.
> +This version of Frotz complies with standard 1.0 of Graham Nelson's specification.
> +It plays all Z-code games V1-V8, including V6, with sound support through libao,
> +and uses ncurses for text display.")

I adjusted the line breaks here to make them more consistent with the
other two frotz package descriptions.

> +    (home-page "http://frotz.sourceforge.net")
> +    (license license:gpl2+)))
> +
> +(define-public frotz-dumb-terminal
> +  (package
> +    (name "frotz-dumb-terminal")
> +    (version "2.44")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (list (string-append
> +                          "http://www.ifarchive.org/if-archive/infocom/interpreters/"
> +                          "frotz" "/" "frotz" "-" version ".tar.gz")
> +                         (string-append
> +                          "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
> +                          "frotz" "/" "frotz" "-" version ".tar.gz")))
> +              (sha256
> +               (base32
> +                "1v735xr3blznac8fnwa27s1vhllx4jpz7kw7qdw1bsfj6kq21v3k"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:tests? #f                      ; there are no tests
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (replace 'build
> +           (lambda _
> +             (invoke "make" "dumb")))
> +         (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/man6")))
> +               (install-file "dfrotz" bin)
> +               (mkdir-p man)
> +               (install-file "doc/dfrotz.6" man)
> +               #t))))))
> +    (synopsis "Portable Z-machine dumb interpreter for text adventure games")
> +    (description "Frotz is an interpreter for Infocom games and
> +other Z-machine games in the text adventure/interactive fiction genre.
> +dfrotz is the dumb interface version.  You get no screen control; everything
> +is just printed to the terminal line by line.  The terminal handles all the
> +scrolling.  Maybe you'd like to experience what it's like to play Adventure on
> +a teletype.  A much cooler use for compiling Frotz with the dumb interface is
> +that it can be wrapped in CGI scripting, PHP, and the like to allow people
> +to play games on webpages.  It can also be made into a chat bot.")
> +    (home-page "http://frotz.sourceforge.net")
> +    (license license:gpl2+)))
> +
> +(define-public frotz-sdl
> +  (let* ((commit "4de8c34f2116fff554af6216c30ec9d41bf50b24"))
> +    (package
> +      (name "frotz-sdl")
> +      (version "2.45pre")
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://gitlab.com/DavidGriffith/frotz")
> +                      (commit commit)))
> +                (sha256
> +                 (base32
> +                  "18ms21pcrl7ipcnyqnf8janamkryzx78frsgd9kfk67jvbj0z2k8"))))

I added a file-name field here because the linter complained about it. I
wonder if it complained the first time and I just missed it?

> +      (build-system gnu-build-system)
> +      (arguments
> +       `(#:tests? #f                    ; there are no tests
> +         #:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure)
> +           (add-before 'build 'curses
> +             (lambda _
> +               (substitute* "Makefile"
> +                 (("lcurses") "lncurses")
> +                 (("^BUILD_DATE_TIME =.*$")
> +                  "BUILD_DATE_TIME = \"2.45pre-20180907.00000\"\n"))
> +               #t))

I renamed this phase to "patch-makefile", as the reproducibility change
doesn't have to do with the curses change.

> +           (replace 'build
> +             (lambda _
> +               (invoke "make" "sdl")))
> +           (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/man6")))
> +                 (install-file "sfrotz" bin)
> +                 (mkdir-p man)
> +                 (install-file "doc/sfrotz.6" man)
> +                 #t))))))
> +      (native-inputs
> +       `(("pkg-config" ,pkg-config)
> +         ("which" ,which)
> +         ("perl" ,perl)))
> +      (inputs `(("sdl2" ,sdl2)
> +                ("sdl2-mixer" ,sdl2-mixer)
> +                ("libmodplug" ,libmodplug)
> +                ("libsamplerate" ,libsamplerate)
> +                ("libsndfile" ,libsndfile)
> +                ("libvorbis" ,libvorbis)
> +                ("ncurses" ,ncurses)
> +                ("freetype" ,freetype)
> +                ("libjpeg-turbo" ,libjpeg-turbo)))
> +      (synopsis "Portable Z-machine interpreter (SDL port) for text adventure games")
> +      (description "Frotz is an interpreter for Infocom games and other Z-machine
> +games in the text adventure/interactive fiction genre.  This version of Frotz
> +using SDL fully supports all these versions of the Z-Machine including the
> +graphical version 6.  Graphics and sound are created through the use of the SDL
> +libraries.  AIFF sound effects and music in MOD and OGG formats are supported
> +when packaged in Blorb container files or optionally from individual files.")
> +      (home-page "http://frotz.sourceforge.net")
> +      (license license:gpl2+))))

Thanks again! I've pushed this to master with the mentioned changes!

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

end of thread, other threads:[~2018-09-08 17:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05  2:43 [bug#32638] [PATCH] games.scm - add frotz packages Benjamin Slade
2018-09-06 18:20 ` Kei Kebreau
2018-09-06 19:25   ` Benjamin Slade
2018-09-08  3:08 ` Benjamin Slade
2018-09-08 17:47   ` bug#32638: " Kei Kebreau

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