all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#40289] [PATCH] games.scm: add "neverball" and "neverputt" (bundled together)
@ 2020-03-28 17:37 Vitaliy Shatrov via Guix-patches via
  2020-03-30 12:31 ` Nicolas Goaziou
  2020-03-31 17:36 ` Vitaliy Shatrov via Guix-patches via
  0 siblings, 2 replies; 4+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-03-28 17:37 UTC (permalink / raw)
  To: 40289


[-- Attachment #1.1: Type: text/plain, Size: 192 bytes --]

gnu/packages/games.scm:
  Added:
    *  a game neverball and it's "addon", neverputt.
    *  the #:use-module "copy-build-system".

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #1.2: Type: text/html, Size: 540 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-games.scm-add-neverball-and-neverputt-bundled-togeth.patch --]
[-- Type: text/x-patch; name="0001-games.scm-add-neverball-and-neverputt-bundled-togeth.patch", Size: 5946 bytes --]

From c86a0010584bd4bb08b5b17293654a2797479b1f Mon Sep 17 00:00:00 2001
From: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Date: Sat, 28 Mar 2020 23:49:31 +0700
Subject: [PATCH] games.scm:  add "neverball" and "neverputt" (bundled
 together).

gnu/packages/games.scm:
  Added:
    *  a game neverball and it's "addon", neverputt.
    *  the #:use-module "copy-build-system".
---
 gnu/packages/games.scm | 97 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 42f2230482..8bf12feab3 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -172,6 +172,7 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages messaging)
   #:use-module (gnu packages networking)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
@@ -10352,3 +10353,99 @@ to conquer opponents by defeating them in war (with troops or machines),
 capturing their buildings with spies, or offering opponents money for their
 kingdom.")
     (license license:gpl2+)))
+
+(define-public neverball
+  ;; git-version is 6-years younger than latest release
+  (let ((commit "760a25d32a5fb0661b99426d4ddcb9ac9f3d1644")
+        (revision "1"))
+    (package
+      (name "neverball")
+      (version (git-version "1.6.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/Neverball/neverball.git")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "0bwh67df3lyf33bv710y25l3frjdd34j9b7gsjadwxviz6r1vpj5"))
+                (file-name (git-file-name name version))))
+      (build-system copy-build-system)
+      (arguments
+       `(#:install-plan
+         '(("neverball" "bin/")
+           ("neverputt" "bin/")
+           ("mapc"      "bin/")
+           ("data"   "share/games/neverball/") ;; Octocat seem to be non-free
+           ("locale" "share/")
+           ("dist/"   "share/games/neverball" #:include ("neverball_replay.png"
+                                                         "neverlogos.svg"
+                                                         "svg readme.txt"))
+           ;; https://gitlab.com/xonotic/netradiant
+           ;;("NeverballPack" "share/games/neverball/")
+           ("dist/"   "share/applications" #:include ("neverball.desktop"
+                                                      "neverputt.desktop"))
+           ("dist/" "share/man/man1" #:include ("mapc.1"))
+           ("dist/" "share/man/man6" #:include ("neverball.6"
+                                                "neverputt.6"))
+           ("doc/"      "share/doc/neverball")
+           ("README.md" "share/doc/neverball/"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'install 'build
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (sdl (assoc-ref inputs "sdl")))
+                 (invoke "make" "-j" (number->string (parallel-job-count))
+                         "--environment-overrides"
+                         "CC=gcc" "BUILD=release"
+                         (string-append "DATADIR=" out "/share/games/neverball/data")
+                         (string-append "LOCALEDIR=" out "/share/locale")
+                         (string-append "SDL_CPPFLAGS=-I" sdl "/include/SDL2/"))
+                 ;; Debian doesn't strip it, though.  i'm dummy
+                 (delete-file-recursively "data/ball/octocat"))
+               #t))
+           (add-after 'install 'fix-some-broken-fonts
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/neverball")
+                   `("LANG" = ("en_US.utf8")))
+                 (wrap-program (string-append out "/bin/neverputt")
+                   `("LANG" = ("en_US.utf8"))))
+               #t))
+           (add-after 'install 'install-icons
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out")))
+                 (with-directory-excursion "dist"
+                   (for-each
+                    (lambda (size)
+                      (let* ((icons (string-append out "/share/icons/hicolor/"
+                                                   size "x" size "/apps")))
+                        (mkdir-p icons)
+                        (for-each
+                         (lambda (file)
+                           (copy-file (string-append file "_" size ".png")
+                                      (string-append icons "/" file ".png")))
+                         '("neverball" "neverputt"))))
+                    '("16"  "24"  "32"  "48"
+                      "64" "128" "256" "512"))))
+               #t)))))
+      (inputs
+       `(("libjpeg"   ,libjpeg)
+         ("libpng"    ,libpng)
+         ("libvorbis" ,libvorbis)
+         ("physfs"    ,physfs)
+         ("sdl" ,(sdl-union (list sdl2
+                                  sdl2-ttf)))))
+      (native-inputs
+       `(("gettext" ,gettext-minimal)))   ;for msgfmt
+      (home-page "https://neverball.org/")
+      (synopsis "3D floor-tilting game")
+      (description
+       "Also included is Neverputt, which is a 3D miniature golf game.
+In the grand tradition of Marble Madness and Super Monkey Ball,
+Neverball has you guide a rolling ball through dangerous territory.
+Balance on narrow bridges, navigate mazes, ride moving platforms, and
+dodge pushers and shovers to get to the goal.  Race against the clock to
+collect coins to earn extra balls.") ;; mouse on sway cause crash
+      (license license:gpl2+))))
-- 
2.25.1


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

* [bug#40289] [PATCH] games.scm: add "neverball" and "neverputt" (bundled together)
  2020-03-28 17:37 [bug#40289] [PATCH] games.scm: add "neverball" and "neverputt" (bundled together) Vitaliy Shatrov via Guix-patches via
@ 2020-03-30 12:31 ` Nicolas Goaziou
  2020-03-31 17:36 ` Vitaliy Shatrov via Guix-patches via
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2020-03-30 12:31 UTC (permalink / raw)
  To: 40289; +Cc: D0dyBo0D0dyBo0

Hello,

Vitaliy Shatrov via Guix-patches via <guix-patches@gnu.org> writes:

> gnu/packages/games.scm:
>   Added:
>     *  a game neverball and it's "addon", neverputt.
>     *  the #:use-module "copy-build-system".

Thank you! Somme comments follow

> Subject: [PATCH] games.scm:  add "neverball" and "neverputt" (bundled
>  together).
>
> gnu/packages/games.scm:
>   Added:
>     *  a game neverball and it's "addon", neverputt.
>     *  the #:use-module "copy-build-system".

The commit message should be

    gnu: Add neverball

    * gnu/packages/games.scm (neverball): New variable.

That's it.
> +      (source (origin

Nitpick: I suggest to move `origin' on the line below `source'.

> +                 ;; Debian doesn't strip it, though.  i'm dummy
> +                 (delete-file-recursively "data/ball/octocat"))

Usually, we would delete it in a snippet so "guix build -S neverball"
returns source without the problematic part. Could you do it?

> +           (add-after 'install 'install-icons

Could this be moved within the install plan?

> +      (description
> +       "Also included is Neverputt, which is a 3D miniature golf
> game.

The first sentence should be complete.

> +In the grand tradition of Marble Madness and Super Monkey Ball,
> +Neverball has you guide a rolling ball through dangerous territory.
> +Balance on narrow bridges, navigate mazes, ride moving platforms, and
> +dodge pushers and shovers to get to the goal.  Race against the clock to
> +collect coins to earn extra balls.") ;; mouse on sway cause crash

The last comment seems out of place. This may need to be reported
upstream instead.

Also, note that end of line comments are expected to start with a single
semicolon. Double semicolon comments start at the beginning of the line
instead.

Regards,

-- 
Nicolas Goaziou

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

* [bug#40289] [PATCH] games.scm: add "neverball" and "neverputt" (bundled together)
  2020-03-28 17:37 [bug#40289] [PATCH] games.scm: add "neverball" and "neverputt" (bundled together) Vitaliy Shatrov via Guix-patches via
  2020-03-30 12:31 ` Nicolas Goaziou
@ 2020-03-31 17:36 ` Vitaliy Shatrov via Guix-patches via
  2020-03-31 18:24   ` Nicolas Goaziou
  1 sibling, 1 reply; 4+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-03-31 17:36 UTC (permalink / raw)
  To: 40289@debbugs.gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 116 bytes --]

Hi.  Seems that all is done.  If it's good enough now?

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #1.2: Type: text/html, Size: 387 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-neverball.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-neverball.patch", Size: 6387 bytes --]

From 0b46b87d49f6456ce16430c16e4c195b16586fcf Mon Sep 17 00:00:00 2001
From: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Date: Wed, 1 Apr 2020 00:31:30 +0700
Subject: [PATCH] gnu: Add neverball

* gnu/packages/games.scm (neverball): New variable.
---
 gnu/packages/games.scm | 103 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 3284459021..528aef2056 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -172,6 +172,7 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages messaging)
   #:use-module (gnu packages networking)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
@@ -10310,3 +10311,105 @@ to conquer opponents by defeating them in war (with troops or machines),
 capturing their buildings with spies, or offering opponents money for their
 kingdom.")
     (license license:gpl2+)))
+
+(define-public neverball
+  ;; git-version is 6-years younger than latest release
+  (let ((commit "760a25d32a5fb0661b99426d4ddcb9ac9f3d1644")
+        (revision "1"))
+    (package
+      (name "neverball")
+      (version (git-version "1.6.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/Neverball/neverball.git")
+               (commit commit)))
+         (sha256
+          (base32
+           "0bwh67df3lyf33bv710y25l3frjdd34j9b7gsjadwxviz6r1vpj5"))
+         (file-name (git-file-name name version))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             ;; Debian doesn't strip it, though.  i'm dummy
+             (delete-file-recursively "data/ball/octocat")
+             #t))))
+      (build-system copy-build-system)
+      (arguments
+       `(#:install-plan
+         '(("neverball" "bin/")
+           ("neverputt" "bin/")
+           ("mapc"      "bin/")
+           ("data"   "share/games/neverball/") ;; Octocat seem to be non-free
+           ("locale" "share/")
+           ("dist/"  "share/games/neverball" #:include ("neverball_replay.png"
+                                                        "neverlogos.svg"
+                                                        "svg readme.txt"))
+           ;; https://gitlab.com/xonotic/netradiant
+           ;;("NeverballPack" "share/games/neverball/")
+           ("dist/"   "share/applications" #:include ("neverball.desktop"
+                                                      "neverputt.desktop"))
+           ("dist/neverball_16.png" "/share/icons/hicolor/16x16/apps/neverball.png")
+           ("dist/neverball_24.png" "/share/icons/hicolor/24x24/apps/neverball.png")
+           ("dist/neverball_32.png" "/share/icons/hicolor/32x32/apps/neverball.png")
+           ("dist/neverball_48.png" "/share/icons/hicolor/48x48/apps/neverball.png")
+           ("dist/neverball_64.png" "/share/icons/hicolor/64x64/apps/neverball.png")
+           ("dist/neverball_128.png" "/share/icons/hicolor/128x128/apps/neverball.png")
+           ("dist/neverball_256.png" "/share/icons/hicolor/256x256/apps/neverball.png")
+           ("dist/neverball_512.png" "/share/icons/hicolor/512x512/apps/neverball.png")
+
+           ("dist/neverputt_16.png" "/share/icons/hicolor/16x16/apps/neverputt.png")
+           ("dist/neverputt_24.png" "/share/icons/hicolor/24x24/apps/neverputt.png")
+           ("dist/neverputt_32.png" "/share/icons/hicolor/32x32/apps/neverputt.png")
+           ("dist/neverputt_48.png" "/share/icons/hicolor/48x48/apps/neverputt.png")
+           ("dist/neverputt_64.png" "/share/icons/hicolor/64x64/apps/neverputt.png")
+           ("dist/neverputt_128.png" "/share/icons/hicolor/128x128/apps/neverputt.png")
+           ("dist/neverputt_256.png" "/share/icons/hicolor/256x256/apps/neverputt.png")
+           ("dist/neverputt_512.png" "/share/icons/hicolor/512x512/apps/neverputt.png")
+
+           ("dist/" "share/man/man1" #:include ("mapc.1"))
+           ("dist/" "share/man/man6" #:include ("neverball.6"
+                                                "neverputt.6"))
+           ("doc/"      "share/doc/neverball")
+           ("README.md" "share/doc/neverball/"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'install 'build
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (sdl (assoc-ref inputs "sdl")))
+                 (invoke "make" "-j" (number->string (parallel-job-count))
+                         "--environment-overrides"
+                         "CC=gcc" "BUILD=release"
+                         (string-append "DATADIR=" out "/share/games/neverball/data")
+                         (string-append "LOCALEDIR=" out "/share/locale")
+                         (string-append "SDL_CPPFLAGS=-I" sdl "/include/SDL2/")))
+               #t))
+           (add-after 'install 'fix-some-broken-fonts
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/neverball")
+                   `("LANG" = ("en_US.utf8")))
+                 (wrap-program (string-append out "/bin/neverputt")
+                   `("LANG" = ("en_US.utf8"))))
+               #t)))))
+      (native-inputs
+       `(("gettext" ,gettext-minimal)))   ;for msgfmt
+      (inputs
+       `(("libjpeg"   ,libjpeg)
+         ("libpng"    ,libpng)
+         ("libvorbis" ,libvorbis)
+         ("physfs"    ,physfs)
+         ("sdl" ,(sdl-union (list sdl2
+                                  sdl2-ttf)))))
+      (home-page "https://neverball.org/")
+      (synopsis "3D floor-tilting game")
+      (description
+       "In the grand tradition of Marble Madness and Super Monkey Ball,
+Neverball has you guide a rolling ball through dangerous territory.  Balance
+on narrow bridges, navigate mazes, ride moving platforms, and dodge pushers
+and shovers to get to the goal.  Race against the clock to collect coins to
+earn extra balls.  Also included is Neverputt, which is a 3D miniature golf
+game.") ;thanks to Debian for description
+      (license license:gpl2+))))
-- 
2.25.1


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

* [bug#40289] [PATCH] games.scm: add "neverball" and "neverputt" (bundled together)
  2020-03-31 17:36 ` Vitaliy Shatrov via Guix-patches via
@ 2020-03-31 18:24   ` Nicolas Goaziou
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2020-03-31 18:24 UTC (permalink / raw)
  To: 40289; +Cc: 40289@debbugs.gnu.org, Vitaliy Shatrov

Hello,

Vitaliy Shatrov via Guix-patches via <guix-patches@gnu.org> writes:

> Hi.  Seems that all is done.  If it's good enough now?

It looks good. Thank you!

I added a copyright line for you, removed some comments, made sure lines
were not going past column 80, and pushed it, as
3de5b4047e010340485019170e5715deb0de21c0.

Regards,

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2020-03-31 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-28 17:37 [bug#40289] [PATCH] games.scm: add "neverball" and "neverputt" (bundled together) Vitaliy Shatrov via Guix-patches via
2020-03-30 12:31 ` Nicolas Goaziou
2020-03-31 17:36 ` Vitaliy Shatrov via Guix-patches via
2020-03-31 18:24   ` Nicolas Goaziou

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.