unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Timotej Lazar <timotej.lazar@araneo.si>
To: 39641@debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar@araneo.si>
Subject: [bug#39641] [PATCH 2/2] gnu: Add opensurge.
Date: Mon, 17 Feb 2020 14:11:27 +0100	[thread overview]
Message-ID: <20200217131127.28120-2-timotej.lazar@araneo.si> (raw)
In-Reply-To: <20200217131127.28120-1-timotej.lazar@araneo.si>

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

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index cb21a66133..f565b3a1ca 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -856,6 +856,73 @@ and much more stand between you and the exit.  Record your moves and let your
 shadow mimic them to reach blocks you couldn't reach alone.")
     (license license:gpl3+)))
 
+(define-public opensurge
+  (package
+    (name "opensurge")
+    (version "0.5.1.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/alemart/opensurge.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0ih7hlqjnp9rv0m4lqf7c0s1ai532way5i4pk45jq1gqm8325dbv"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (let* ((out (assoc-ref %outputs "out"))
+              (share (string-append out "/share")))
+         (list (string-append "-DCMAKE_INSTALL_PREFIX=" out "/bin")
+               (string-append "-DGAME_DATADIR=" share "/" ,name)
+               (string-append "-DDESKTOP_ENTRY_PATH=" share "/applications")
+               (string-append "-DDESKTOP_ICON_PATH=" share "/pixmaps")
+               (string-append "-DDESKTOP_METAINFO_PATH=" share "/metainfo")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-xdg-open-path
+           (lambda _
+             ;; Look for xdg-open in the store.
+             (substitute* "src/core/web.c"
+               (("/usr(/bin/xdg-open)" _ bin)
+                (string-append (assoc-ref %build-inputs "xdg-utils") bin)))
+             #t))
+         (add-after 'unpack 'unbundle-fonts
+           (lambda _
+             ;; Replace bundled Roboto fonts with links to the store.
+             (with-directory-excursion "fonts"
+               (let ((roboto-dir (string-append
+                                  (assoc-ref %build-inputs "font-google-roboto")
+                                  "/share/fonts/truetype/")))
+                 (for-each (lambda (font)
+                             (delete-file font)
+                             (symlink (string-append roboto-dir font) font))
+                           '("Roboto-Black.ttf" "Roboto-Bold.ttf" "Roboto-Medium.ttf")))
+               #t))))
+       #:tests? #f)) ; There are no tests.
+    (inputs
+     `(("allegro" ,allegro)
+       ("font-google-roboto" ,font-google-roboto)
+       ("surgescript" ,surgescript)
+       ("xdg-utils" ,xdg-utils)))
+    (home-page "https://opensurge2d.org")
+    (synopsis "2D retro side-scrolling game")
+    (description "@code{Open Surge} is a 2D retro side-scrolling platformer
+inspired by the Sonic games.  The player runs at high speeds through each
+level while collecting items and avoiding obstacles.  The game includes a
+built-in level editor.")
+    (license
+     ;; Code is under GPL 3+, assets are under various licenses.
+     ;; See src/misc/credits.c for details.
+     (list license:gpl3+
+           license:cc0
+           license:cc-by3.0
+           license:cc-by-sa3.0
+           license:expat
+           license:public-domain
+           license:silofl1.1))))
+
 (define-public knights
   (package
     (name "knights")
-- 
2.25.0

  reply	other threads:[~2020-02-17 13:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 12:42 [bug#39641] [PATCH 0/2] Add opensurge Timotej Lazar
2020-02-17 13:11 ` [bug#39641] [PATCH 1/2] gnu: Add surgescript Timotej Lazar
2020-02-17 13:11   ` Timotej Lazar [this message]
2020-02-18  1:35 ` [bug#39641] [PATCH 0/2] Add opensurge Nicolas Goaziou
2020-02-18  8:24   ` Timotej Lazar
2020-02-18 15:30     ` bug#39641: " Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200217131127.28120-2-timotej.lazar@araneo.si \
    --to=timotej.lazar@araneo.si \
    --cc=39641@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).