unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Adam Faiz <adam.faiz@disroot.org>, 62178@debbugs.gnu.org
Cc: iyzsong@envs.net
Subject: [bug#62178] [PATCH 5/5] gnu: Add terrarium.
Date: Tue, 14 Mar 2023 18:50:11 +0100	[thread overview]
Message-ID: <5ef390460a8c1d531a6f2228403957a17e517652.camel@gmail.com> (raw)
In-Reply-To: <7f959aa7-fbc9-d027-da03-7b6a7727274f@disroot.org>

Am Dienstag, dem 14.03.2023 um 15:13 +0800 schrieb Adam Faiz:
>  From 914d9ebcaffee24da73bb4d9711c0428ff36feb0 Mon Sep 17 00:00:00
> 2001
> Message-Id:
> <914d9ebcaffee24da73bb4d9711c0428ff36feb0.1678775193.git.adam.faiz@di
> sroot.org>
> In-Reply-To: <cover.1678775193.git.adam.faiz@disroot.org>
> References: <cover.1678775193.git.adam.faiz@disroot.org>
> From: AwesomeAdam54321 <adam.faiz@disroot.org>
> Date: Tue, 14 Mar 2023 14:19:59 +0800
> Subject: [PATCH 5/5] gnu: Add terrarium.
> 
> * gnu/packages/games.scm (terrarium): New variable.
> ---
>   gnu/packages/games.scm | 96
> ++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 96 insertions(+)
> 
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 2946c787af..adcaba1248 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -618,6 +618,102 @@ (define-public bastet
>   canyons and wait for the long I-shaped block to clear four rows at
> a time.")
>       (license license:gpl3+)))
>   
> +(define-public terrarium
> +  (let ((commit "4a489717b2fc53903b934487d7321be4682e4e2b")
> +        (revision "0"))
> +  (package
> +    (name "terrarium")
> +    (version (git-version "0.1.9" revision commit))
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://gitlab.com/hydren/terrarium")
> +             (commit commit)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32
> "0xq7kfl7dvvw222kamw1b5paq5p997z8px8ximbz12v0kj62aqjf"))
> +       (modules '((guix build utils)))
> +       (snippet
> +        #~(begin
> +            (for-each
> +             delete-file
> +             '("resources/jack.ttf" ; unlicensed font, probably
> shareware
> +               "resources/liberation.ttf")) ; bundled font
> +            (for-each
> +             (lambda (file)
> +               (copy-recursively
> +                (string-append "build/linux-gcc-sdl2-release/" file)
> +                (string-append "./" file)))
> +             '("src"
> +               "makefile"
> +               "configure.sh"
> +               "objects.mk"
> +               "sources.mk"))
> +            (rename-file "configure.sh" "configure")
> +            (substitute* "configure"
> +              (("which") "type -p"))
> +            (substitute* "makefile"
> +              (("..LIBS. `sdl2-config --cflags --libs`")
> +               "-lbox2d -lfgeal -lfutil -lgeramun")
> +              (("@echo 'Building target: .@'")
> +               (string-append
> +                "sed -i -e \"s,@DESTDIR@,$(DESTDIR),\""
> +                " -e \"s,@PREFIX@,$(PREFIX),\""
> +                " -e \"s,@FONT_DIR@,$(FONT_DIR),\""
> +                " src/loading_state.cpp src/main.cpp"
> +                " src/options_menu_state.cpp
> src/main_menu_state.cpp\n\t"
> +                "@echo 'Building target: $@'"))
> +              (("clean:")
> +               (string-append
> +                "install: terrarium\n\t"
> +                "install -d $(DESTDIR)$(PREFIX)/share\n\t"
> +                "cp -r resources $(DESTDIR)$(PREFIX)/share\n\t"
> +                "install -d $(DESTDIR)$(PREFIX)/bin\n\t"
> +                "install -m 755 terrarium
> $(DESTDIR)$(PREFIX)/bin\n\n"
> +                "clean:")))
> +            (substitute* "src/terrarium_game_logic.cpp"
> +              (("config.properties")
> ".terrarium/config.properties"))
> +            (substitute* "src/main_menu_state.cpp"
> +              (("resources/maps") ".terrarium/maps")
> +              (("resources/chars") ".terrarium/chars")
> +              (("resources/jack.ttf") "@FONT_DIR@/LiberationSans-
> Bold.ttf")
> +              (("resources/liberation.ttf")
> +               "@FONT_DIR@/LiberationMono-Regular.ttf"))
> +            (substitute* "src/options_menu_state.cpp"
> +              (("resources/jack.ttf") "@FONT_DIR@/LiberationSans-
> Bold.ttf")
> +              (("resources/liberation.ttf")
> +               "@FONT_DIR@/LiberationMono-Regular.ttf"))
> +            (substitute* '("src/loading_state.cpp"
> +                           "src/main.cpp"
> +                           "src/main_menu_state.cpp")
> +              (("\\./resources/") "resources/"))
> +            (substitute* '("src/options_menu_state.cpp"
> +                           "src/loading_state.cpp"
> +                           "src/main_menu_state.cpp"
> +                           "src/main.cpp")
> +              (("resources/")
> "@DESTDIR@@PREFIX@/share/resources/"))))))
> +    (build-system gnu-build-system)
> +    (inputs
> +     (list box2d
> +           fgeal
> +           font-liberation
> +           futil
> +           libgeramun
> +           rapidxml))
> +    (arguments
> +     (list #:tests? #f ; no tests
> +           #:make-flags
> +           #~(list (string-append "DESTDIR=" #$output)
> +                   (string-append "FONT_DIR="
> +                                  #$(this-package-input "font-
> liberation")
> +                                  "/share/fonts/truetype"))))
> +    (home-page "https://gitlab.com/hydren/terrarium")
> +    (synopsis "Terraria-clone game")
> +    (description "Terrarium is an attempt to do a Terraria clone
> game,
> +possibly with some new features.")
A more helpful synopsis and description would be nice.  See minetest as
a reference :)

  reply	other threads:[~2023-03-14 17:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14  6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
2023-03-14  6:57 ` [bug#62178] [PATCH 1/5] gnu: Add fgeal Adam Faiz via Guix-patches via
2023-03-14  7:02 ` [bug#62178] [PATCH 2/5] gnu: Add futil Adam Faiz via Guix-patches via
2023-03-14  7:09 ` [bug#62178] [PATCH 3/5] gnu: Add libgeramun Adam Faiz via Guix-patches via
2023-03-14 19:41   ` Liliana Marie Prikler
2023-03-14  7:11 ` [bug#62178] [PATCH 4/5] gnu: Add rapidxml Adam Faiz via Guix-patches via
2023-03-14  7:13 ` [bug#62178] [PATCH 5/5] gnu: Add terrarium Adam Faiz via Guix-patches via
2023-03-14 17:50   ` Liliana Marie Prikler [this message]
2023-04-18 14:34     ` Adam Faiz via Guix-patches via
2023-03-16  6:26 ` [bug#62178] [PATCH v1 1/5] gnu: Add fgeal Adam Faiz via Guix-patches via
2023-04-18 16:50   ` Liliana Marie Prikler
2023-03-16  6:29 ` [bug#62178] [PATCH v1 2/5] gnu: Add futil Adam Faiz via Guix-patches via
2023-04-18 16:55   ` Liliana Marie Prikler
2023-03-16  6:30 ` [bug#62178] [PATCH v1 3/5] gnu: Add libgeramun Adam Faiz via Guix-patches via
2023-03-16  6:31 ` [bug#62178] [PATCH v1 4/5] gnu: Add rapidxml Adam Faiz via Guix-patches via
2023-04-18 17:28   ` Liliana Marie Prikler
2023-03-16  6:32 ` [bug#62178] [PATCH v1 5/5] gnu: Add terrarium Adam Faiz via Guix-patches via
2023-04-18 18:28   ` Liliana Marie Prikler

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=5ef390460a8c1d531a6f2228403957a17e517652.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=62178@debbugs.gnu.org \
    --cc=adam.faiz@disroot.org \
    --cc=iyzsong@envs.net \
    /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).