From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Adam Faiz <adam.faiz@disroot.org>, 62178@debbugs.gnu.org
Subject: [bug#62178] [PATCH v1 1/5] gnu: Add fgeal.
Date: Tue, 18 Apr 2023 18:50:15 +0200 [thread overview]
Message-ID: <cfb26f304877a4bc91866692a02fa1efcd9b4fce.camel@gmail.com> (raw)
In-Reply-To: <6aa63f14-d96a-3777-417a-ed49c6c65294@disroot.org>
Am Donnerstag, dem 16.03.2023 um 14:26 +0800 schrieb Adam Faiz:
> From 735f08bc3d271959685e03d761f5ac9039e5cfd3 Mon Sep 17 00:00:00
> 2001
> Message-Id:
> <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@di
> sroot.org>
> From: AwesomeAdam54321 <adam.faiz@disroot.org>
> Date: Tue, 14 Mar 2023 13:38:36 +0800
> Subject: [PATCH v1 1/5] gnu: Add fgeal.
>
> * gnu/packages/game-development.scm (fgeal): New variable.
> ---
> gnu/packages/game-development.scm | 106
> ++++++++++++++++++++++++++++++
> 1 file changed, 106 insertions(+)
>
> diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-
> development.scm
> index a384572a9d..cbededa8e4 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
> @@ -2359,6 +2359,112 @@ (define-public flatzebra
> double-buffering.")
> (license license:gpl2+)))
>
> +(define-public fgeal
> + (let ((commit "0ae72fbf31eb2e133fe83520391e7a82c0b59e67")
> + (revision "0"))
> + (package
> + (name "fgeal")
> + (version (git-version "0.8.4" revision commit))
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://gitlab.com/hydren/fgeal")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> "0lck86n8nkhb088bd0jg4imi9j5l1lwfr2pddqqr880rjrnnm8fw"))
> + (modules '((guix build utils)))
> + (snippet
> + #~(begin
> + (with-directory-excursion "project/build/linux-gcc-sdl2-
> release"
> + (rename-file "configure.sh" "configure")
> + (substitute* "configure"
> + (("-exec sed -i")
> + (string-append
> + "-exec sed -i"
> + " \"s,SDL2_CFLAGS,`pkg-config --cflags sdl2`,g\" {}
> \\;"
> + " -exec sed -i"))
Capture the existing match with a variable, then use that variable.
> + (("which") "type -p"))
> + (substitute* "makefile"
> + (("RM := rm -rf")
> + (string-append "RM := rm -rf\n"
> + "PREFIX ?= /usr/local"))
Same here.
> + (("clean:")
> + (string-append
> + "install:\n\t"
> + "install -d $(DESTDIR)$(PREFIX)/include\n\t"
> + "cp -r ../fgeal $(DESTDIR)$(PREFIX)/include\n\t"
> + "install -d $(DESTDIR)$(PREFIX)/lib\n\t"
> + "install -m 644 libfgeal.so
> $(DESTDIR)$(PREFIX)/lib\n\n"
> + "clean:")))
Simply replace the install phase instead.
> + (substitute* "extra/subdir.mk"
> + (("../extra/input_manager.cpp \\\\")
> + (string-append "../extra/input_manager.cpp \\\n"
> + "../extra/primitives.cpp \\"))
> + (("./extra/input_manager.o \\\\")
> + (string-append "./extra/input_manager.o \\\n"
> + "./extra/primitives.o \\"))
> + (("./extra/input_manager.d \\\\")
> + (string-append "./extra/input_manager.d \\\n"
> + "./extra/primitives.d \\"))))
> + (copy-recursively "project/build/linux-gcc-sdl2-release"
> + "linux-gcc-sdl2-release")
> + (substitute* (find-files "." "\\.mk")
> + (("-I\"BUILD_PATH\"") "-I\"BUILD_PATH\" SDL2_CFLAGS"))
> + (for-each
> + (lambda (file)
> + (install-file file "fgeal"))
> + '("agnostic_cached_drawable_text.hxx"
> + "agnostic_filesystem.hxx"
> + "agnostic_sound_stream.hxx"
> + "colors.hpp"
> + "core.hpp"
> + "display.hpp"
> + "event.hpp"
> + "exceptions.hpp"
> + "fgeal.hpp"
> + "filesystem.hpp"
> + "font.hpp"
> + "friend_classes.hxx"
> + "generic_graphics.hxx"
> + "geometry.hpp"
> + "graphics.hpp"
> + "image.hpp"
> + "input.hpp"
> + "sound.hpp"
> + "version.h"))
Why is it necessary to move these files? Also, could this perhaps be
expressed via find-files?
> + (for-each
> + (lambda (file)
> + (install-file file "fgeal/extra"))
> + (find-files "extra" "\\.hpp$"))))))
> + (build-system gnu-build-system)
> + (native-inputs
> + (list pkg-config))
> + (inputs
> + (list sdl2
> + sdl2-gfx
> + sdl2-image
> + sdl2-mixer
> + sdl2-ttf))
> + (arguments
> + (list #:tests? #f ; no tests
> + #:phases
> + #~(modify-phases %standard-phases
> + (add-before 'configure 'chdir
> + (lambda _
> + (chdir "linux-gcc-sdl2-release"))))
> + #:make-flags
> + #~(list (string-append "DESTDIR=" #$output)
> + "PREFIX=")))
> + (home-page "https://gitlab.com/hydren/fgeal")
> + (synopsis "Simple C++ game library wrapper")
> + (description "fgeal is a simple C++ wrapper library meant to
> provide
> +common functionalities between some game libraries through a single
> API.
> + It serves as a cross-platform abstraction layer to other low-level
> game
> +libraries, such as SDL.")
> + (license license:lgpl2.1+))))
> +
> (define-public libccd
> (package
> (name "libccd")
>
> base-commit: 5befcff66edb4d72ab8e713c81836fb8519ce3e6
Cheers
next prev parent reply other threads:[~2023-04-18 16: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
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 [this message]
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=cfb26f304877a4bc91866692a02fa1efcd9b4fce.camel@gmail.com \
--to=liliana.prikler@gmail.com \
--cc=62178@debbugs.gnu.org \
--cc=adam.faiz@disroot.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).