* [bug#62178] [PATCH 0/5] Add terrarium.
@ 2023-03-14 6:52 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
` (9 more replies)
0 siblings, 10 replies; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-14 6:52 UTC (permalink / raw)
To: 62178; +Cc: Liliana Marie Prikler, iyzsong
[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]
From 914d9ebcaffee24da73bb4d9711c0428ff36feb0 Mon Sep 17 00:00:00 2001
Message-Id: <cover.1678775193.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Tue, 14 Mar 2023 14:26:33 +0800
Subject: [PATCH 0/5] Add terrarium.
NOTES:
The game is hardcoded to look at user data under .terrarium/ in the
current directory, with the user's characters being in
.terrarium/chars/ and maps in .terrarium/maps/. These directories
have to be created beforehand.
The game also keeps game settings in .terrarium/config.properties,
and doesn't run without important variables being defined. A sample
config.properties is attached.
In terrarium's package output, it has demo worlds in its
share/resources/maps/ directory that you can copy to
.terrarium/maps/ to play, in addition to making your own characters
and maps of course.
AwesomeAdam54321 (5):
gnu: Add fgeal.
gnu: Add futil.
gnu: Add libgeramun.
gnu: Add rapidxml.
gnu: Add terrarium.
gnu/local.mk | 2 +
gnu/packages/cpp.scm | 38 +++++
gnu/packages/game-development.scm | 147 ++++++++++++++++++
gnu/packages/games.scm | 96 ++++++++++++
gnu/packages/patches/futil-Add-Makefile.patch | 91 +++++++++++
.../patches/libgeramun-Add-Makefile.patch | 79 ++++++++++
gnu/packages/xml.scm | 30 ++++
7 files changed, 483 insertions(+)
create mode 100644 gnu/packages/patches/futil-Add-Makefile.patch
create mode 100644 gnu/packages/patches/libgeramun-Add-Makefile.patch
base-commit: 5befcff66edb4d72ab8e713c81836fb8519ce3e6
--
2.39.2
[-- Attachment #2: config.properties --]
[-- Type: text/plain, Size: 6498 bytes --]
# General game configuration file.
# All configuration that is not yet classified in a specific file is "dumped" here.
# (Using this file is better than recompiling the whole program)
ingame.font.filename = /gnu/store/yas1xxl7m6lsi5g2q7jflm8c3i0zr572-font-liberation-2.1.5/share/fonts/truetype/LiberationMono-Regular.ttf
ingame.font.size = 14
ingame.inventory.color = #E28922
ingame.inventory.font.filename = /gnu/store/yas1xxl7m6lsi5g2q7jflm8c3i0zr572-font-liberation-2.1.5/share/fonts/truetype/LiberationMono-Regular.ttf
ingame.inventory.font.size = 10
ingame.inventory.font.color = 0,0,0
ingame.bg_day.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/background.jpg
ingame.bg_night.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/bg-night.jpg
ingame.hour_duration = 1
# player sprite (dimensions in pixels)
player.sprite.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/pijamaman-1.png
player.sprite.width = 56
player.sprite.height = 84
player.sprite.reference_pixel.y = -2
player.sprite.anim.stand_left.frame_count = 1
player.sprite.anim.stand_right.frame_count = 1
player.sprite.anim.walk_left.frame_count = 4
player.sprite.anim.walk_left.frame_duration = 0.25
player.sprite.anim.walk_right.frame_count = 4
player.sprite.anim.walk_right.frame_duration = 0.25
# GB
#player.sprite.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/gb-1.png
#player.sprite.width = 59
#player.sprite.height = 85
#player.sprite.reference_pixel.y = -2
#player.sprite.anim.stand_left.frame_count = 1
#player.sprite.anim.stand_right.frame_count = 1
#player.sprite.anim.walk_left.frame_count = 6
#player.sprite.anim.walk_left.frame_duration = 0.667
#player.sprite.anim.walk_right.frame_count = 6
#player.sprite.anim.walk_right.frame_duration = 0.667
# PC
#player.sprite.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/pc-1.png
#player.sprite.width = 24
#player.sprite.height = 36
#player.sprite.reference_pixel.y = -4
#player.sprite.anim.stand_left.frame_count = 1
#player.sprite.anim.stand_right.frame_count = 1
#player.sprite.anim.walk_left.frame_count = 6
#player.sprite.anim.walk_left.frame_duration = 0.667
#player.sprite.anim.walk_right.frame_count = 6
#player.sprite.anim.walk_right.frame_duration = 0.667
# tilesets
ingame.tileset1.sprite.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/tileset-dirt.png
ingame.tileset1.sprite.width = 16
ingame.tileset1.sprite.height = 16
ingame.tileset2.sprite.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/tileset-stone.png
ingame.tileset2.sprite.width = 16
ingame.tileset2.sprite.height = 16
ingame.tileset3.sprite.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/tileset-water.png
ingame.tileset3.sprite.width = 16
ingame.tileset3.sprite.height = 16
ingame.tileset3.sprite.frame_count = 3
ingame.tileset3.sprite.frame_duration = 1.0
ingame.tileset4.sprite.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/tileset-grass.png
ingame.tileset4.sprite.width = 16
ingame.tileset4.sprite.height = 16
# block types
block_type1.name = dirt
block_type1.tileset = tileset1
block_type1.passability = none
block_type1.minerable_by = pickaxe
block_type1.detatched_item_type_id = 1
block_type2.name = stone
block_type2.tileset = tileset2
block_type2.passability = none
block_type2.minerable_by = pickaxe
block_type2.detatched_item_type_id = 2
block_type3.name = water
block_type3.tileset = tileset3
block_type3.passability = full
block_type3.precipitability = liquidous
block_type4.name = grassy dirt
block_type4.tileset = tileset4
block_type4.passability = none
block_type4.minerable_by = pickaxe
block_type4.detatched_item_type_id = 1
#block_type5.name = sand
#block_type5.tileset = tileset5
#block_type5.minerable_by = shovel
#block_type5.detatched_item_type_id = ?
#block_type5.passability = none
#block_type5.precipitability = arenaceous
# item types
item_type1.name = dirt block
item_type1.description = A dirt block is a dirt block. Get over it.
item_type1.mass = 10
item_type1.stacking_limit = 999
item_type1.placeability = ground
item_type1.placed_block_type_id = 1
item_type1.icon.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/tileset-dirt.png
item_type1.icon.width = 16
item_type1.icon.height = 16
item_type1.icon.scale.x = 0.5
item_type1.icon.scale.y = 0.5
item_type2.name = stone block
item_type2.description = A stone block is a stone block. Rolling Stones!
item_type2.mass = 20
item_type2.stacking_limit = 999
item_type2.placeability = ground
item_type2.placed_block_type_id = 2
item_type2.icon.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/tileset-stone.png
item_type2.icon.width = 16
item_type2.icon.height = 16
item_type2.icon.scale.x = 0.5
item_type2.icon.scale.y = 0.5
item_type3.name = banana pickaxe
item_type3.description = A special developer-only banana pickaxe. It can mine EVERYTHING.
item_type3.mass = 50
item_type3.stacking_limit = 1
item_type3.usable_action = mining
item_type3.is_startup_item = true
item_type3.icon.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/banana_pickaxe.png
item_type3.icon.width = 24
item_type3.icon.height = 24
item_type4.name = bag
item_type4.description = A simple bag that can carry some items.
item_type4.mass = 0.5
item_type4.stacking_limit = 50
item_type4.capaciousness = 32
# dummy enemy spec
actor_type1.name = Toad blob
actor_type1.description = A toad-like hostile blob.
actor_type1.max_hp = 20
actor_type1.faction = mob
actor_type1.contact_damage_factor = 2
actor_type1.sprite.filename = /gnu/store/m8hf1n7j40mbipzr8ds6m7chffb20f73-terrarium-0.1.9-0.4a48971/share/resources/toadblob-1.png
actor_type1.sprite.width = 18
actor_type1.sprite.height = 18
actor_type1.sprite.reference_pixel.y = -2
actor_type1.sprite.anim.stand_left.frame_count = 1
actor_type1.sprite.anim.stand_right.frame_count = 1
actor_type1.sprite.anim.walk_left.frame_count = 5
actor_type1.sprite.anim.walk_left.frame_duration = 0.25
actor_type1.sprite.anim.walk_right.frame_count = 5
actor_type1.sprite.anim.walk_right.frame_duration = 0.25
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH 1/5] gnu: Add fgeal.
2023-03-14 6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
@ 2023-03-14 6:57 ` 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
` (8 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-14 6:57 UTC (permalink / raw)
To: 62178; +Cc: Liliana Marie Prikler, iyzsong
From f2dc6209535b2ad8aed999845c0992264cc7aff6 Mon Sep 17 00:00:00 2001
Message-Id: <f2dc6209535b2ad8aed999845c0992264cc7aff6.1678775193.git.adam.faiz@disroot.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 13:38:36 +0800
Subject: [PATCH 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..f86793fda0 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"))
+ (("which") "type -p"))
+ (substitute* "makefile"
+ (("RM := rm -rf")
+ (string-append "RM := rm -rf\n"
+ "PREFIX ?= /usr/local"))
+ (("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:")))
+ (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"))
+ (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")
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH 2/5] gnu: Add futil.
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 ` 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
` (7 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-14 7:02 UTC (permalink / raw)
To: 62178; +Cc: Liliana Marie Prikler, iyzsong
From ca7eeb834e5b53667d0ec945454d80794ee2a717 Mon Sep 17 00:00:00 2001
Message-Id: <ca7eeb834e5b53667d0ec945454d80794ee2a717.1678775193.git.adam.faiz@disroot.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 13:55:09 +0800
Subject: [PATCH 2/5] gnu: Add futil.
* gnu/packages/cpp.scm (futil): New variable.
* gnu/packages/patches/futil-Add-Makefile.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/cpp.scm | 38 ++++++++
gnu/packages/patches/futil-Add-Makefile.patch | 91 +++++++++++++++++++
3 files changed, 130 insertions(+)
create mode 100644 gnu/packages/patches/futil-Add-Makefile.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index c2521acf02..1bdbddce5e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1133,6 +1133,7 @@ dist_patch_DATA = \
%D%/packages/patches/freeimage-unbundle.patch \
%D%/packages/patches/fuse-glibc-2.34.patch \
%D%/packages/patches/fuse-overlapping-headers.patch \
+ %D%/packages/patches/futil-Add-Makefile.patch \
%D%/packages/patches/fxdiv-system-libraries.patch \
%D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \
%D%/packages/patches/ganeti-disable-version-symlinks.patch \
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index ed6ae69198..69cda8aacc 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1216,6 +1216,44 @@ (define-public folly
(supported-systems '("aarch64-linux" "x86_64-linux"))
(license license:asl2.0)))
+(define-public futil
+ (let ((commit "83fcf85cf7638947a44657b2f334c2d8a2d5d02d")
+ (revision "0"))
+ (package
+ (name "futil")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/hydren/futil")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "05vyx6n4aqix3w1z76hal9zxzixfxnlw0cg4b06lc1l9gnw6ja71"))
+ (patches
+ (search-patches "futil-Add-Makefile.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (for-each
+ (lambda (file)
+ (install-file file "include/futil"))
+ (find-files "." "\\.h"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ; no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure))
+ #:make-flags
+ #~(list (string-append "DESTDIR=" #$output)
+ "PREFIX=")))
+ (home-page "https://gitlab.com/hydren/futil")
+ (synopsis "C++ utility code library")
+ (description "Futil is a set of C++ utility code and library headers.")
+ (license license:zlib))))
+
(define-public poco
(package
(name "poco")
diff --git a/gnu/packages/patches/futil-Add-Makefile.patch b/gnu/packages/patches/futil-Add-Makefile.patch
new file mode 100644
index 0000000000..2c5760d31b
--- /dev/null
+++ b/gnu/packages/patches/futil-Add-Makefile.patch
@@ -0,0 +1,91 @@
+From 29c2ab3931bc0749fb72d222b14a629170cea9e6 Mon Sep 17 00:00:00 2001
+From: AwesomeAdam54321 <adam.faiz@disroot.org>
+Date: Sun, 12 Mar 2023 00:47:56 +0800
+Subject: [PATCH] futil: Add Makefile.
+
+Adapted from https://gitlab.com/hydren/terrarium/-/blob/master/build/linux-gcc-sdl2-release/src_libs/futil/subdir.mk
+---
+ Makefile | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 71 insertions(+)
+ create mode 100644 Makefile
+
+diff --git a/Makefile b/Makefile
+new file mode 100644
+index 0000000..39d2275
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,71 @@
++################################################################################
++# Automatically-generated file. Do not edit!
++################################################################################
++
++# Add inputs and outputs from these tool invocations to the build variables
++CPP_SRCS += \
++exception.cpp \
++properties.cpp \
++stox.cpp \
++string_actions.cpp \
++string_extra_operators.cpp \
++string_parse.cpp \
++string_split.cpp
++
++C_SRCS += \
++chrono.c \
++random.c \
++round.c \
++snprintf.c \
++strtox.c
++
++OBJS += \
++chrono.so \
++exception.so \
++properties.so \
++random.so \
++round.so \
++snprintf.so \
++stox.so \
++string_actions.so \
++string_extra_operators.so \
++string_parse.so \
++string_split.so \
++strtox.so
++
++SRCDIR ?= .
++INCLUDE_PATH ?= ${SRCDIR}/include
++PREFIX ?= /usr/local
++
++all: libfutil.so
++
++libfutil.so: $(OBJS) $(USER_OBJS)
++ @echo 'Building target: $@'
++ @echo 'Invoking: GCC C++ Linker'
++ g++ -shared -o "libfutil.so" $(OBJS) $(USER_OBJS) $(LIBS)
++ @echo 'Finished building target: $@'
++ @echo ' '
++
++install: all
++ install -d $(DESTDIR)$(PREFIX)
++ cp -r include $(DESTDIR)$(PREFIX)
++ install -d $(DESTDIR)$(PREFIX)/lib
++ install -m 644 libfutil.so $(DESTDIR)$(PREFIX)/lib
++
++%.so: %.c
++ @echo 'Building file: $<'
++ @echo 'Invoking: GCC C Compiler'
++ gcc -O3 -Wall -shared -fPIC -I${INCLUDE_PATH} -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
++ @echo 'Finished building: $<'
++ @echo ' '
++
++%.so: %.cpp
++ @echo 'Building file: $<'
++ @echo 'Invoking: GCC C++ Compiler'
++ g++ -I${INCLUDE_PATH} -O3 -Wall -shared -fPIC -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
++ @echo 'Finished building: $<'
++ @echo ' '
++
++clean:
++ rm $(wildcard *.so)
++
+--
+2.39.2
+
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH 3/5] gnu: Add libgeramun.
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 ` 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
` (6 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-14 7:09 UTC (permalink / raw)
To: 62178; +Cc: Liliana Marie Prikler, iyzsong
From 03a5262a846175be5ce4c8e1b9ea6d199a46b4fa Mon Sep 17 00:00:00 2001
Message-Id: <03a5262a846175be5ce4c8e1b9ea6d199a46b4fa.1678775193.git.adam.faiz@disroot.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:02:58 +0800
Subject: [PATCH 3/5] gnu: Add libgeramun.
* gnu/packages/game-development.scm (libgeramun): New variable.
* gnu/packages/patches/libgeramun-Add-Makefile.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/game-development.scm | 41 ++++++++++
.../patches/libgeramun-Add-Makefile.patch | 79 +++++++++++++++++++
3 files changed, 121 insertions(+)
create mode 100644 gnu/packages/patches/libgeramun-Add-Makefile.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 1bdbddce5e..228ec92bb1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1382,6 +1382,7 @@ dist_patch_DATA = \
%D%/packages/patches/libffi-3.3-powerpc-fixes.patch \
%D%/packages/patches/libffi-float128-powerpc64le.patch \
%D%/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch \
+ %D%/packages/patches/libgeramun-Add-Makefile.patch \
%D%/packages/patches/libobjc2-unbundle-robin-map.patch \
%D%/packages/patches/librime-fix-build-with-gcc10.patch \
%D%/packages/patches/libvirt-add-install-prefix.patch \
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index f86793fda0..57bffa9b88 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2494,6 +2494,47 @@ (define-public libccd
a.k.a. XenoCollide) as described in Game Programming Gems 7.")
(license license:expat)))
+(define-public libgeramun
+ (let ((commit "29668d33266a00fa730d8ee5a16893a86ee2d04d")
+ (revision "0"))
+ (package
+ (name "libgeramun")
+ (version (git-version "0.14" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/hydren/libgeramun")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1nfsdyp3nnz33wxy54vnbbm50kr2y5h6q40kz6g1whz12lqmi79n"))
+ (patches
+ (search-patches "libgeramun-Add-Makefile.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (for-each
+ (lambda (file)
+ (install-file file "include/libgeramun"))
+ (find-files "." "\\.h"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ; no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure))
+ #:make-flags
+ #~(list (string-append "DESTDIR=" #$output)
+ "PREFIX=")))
+ (synopsis "Procedural platformer-game map generation library")
+ (description
+ "libgeramun is a set of
+stochastic, procedural platformer-game map generation routines.
+ The routines are meant to produce maps with a Terraria-like look and feel.")
+ (home-page "https://gitlab.com/hydren/libgeramun")
+ (license license:gpl2+))))
+
(define-public ode
(package
(name "ode")
diff --git a/gnu/packages/patches/libgeramun-Add-Makefile.patch b/gnu/packages/patches/libgeramun-Add-Makefile.patch
new file mode 100644
index 0000000000..01a94d6422
--- /dev/null
+++ b/gnu/packages/patches/libgeramun-Add-Makefile.patch
@@ -0,0 +1,79 @@
+From ac239d7be2755dc28fa831ba15a0fb318848a5a6 Mon Sep 17 00:00:00 2001
+From: AwesomeAdam54321 <adam.faiz@disroot.org>
+Date: Sun, 12 Mar 2023 01:30:46 +0800
+Subject: [PATCH] libgeramun: Add Makefile.
+
+Adapted from https://gitlab.com/hydren/terrarium/-/raw/master/build/linux-gcc-sdl2-release/src_libs/libgeramun/subdir.mk
+---
+ Makefile | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 59 insertions(+)
+ create mode 100644 Makefile
+
+diff --git a/Makefile b/Makefile
+new file mode 100644
+index 0000000..8d37ce4
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,59 @@
++################################################################################
++# Automatically-generated file. Do not edit!
++################################################################################
++
++# Add inputs and outputs from these tool invocations to the build variables
++CPP_SRCS += \
++brush.cpp \
++cave.cpp \
++debug.cpp \
++generators.cpp \
++midpoint_displacement.cpp \
++miners.cpp \
++preview_callback.cpp \
++random_walk.cpp \
++spring.cpp \
++surf_replacer.cpp
++
++OBJS += \
++brush.so \
++cave.so \
++debug.so \
++generators.so \
++midpoint_displacement.so \
++miners.so \
++preview_callback.so \
++random_walk.so \
++spring.so \
++surf_replacer.so
++
++SRCDIR ?= .
++INCLUDE_PATH ?= ${SRCDIR}/include
++PREFIX ?= /usr/local
++
++all: libgeramun.so
++
++libgeramun.so: $(OBJS) $(USER_OBJS)
++ @echo 'Building target: $@'
++ @echo 'Invoking: GCC C++ Linker'
++ g++ -shared -o "libgeramun.so" $(OBJS) $(USER_OBJS) $(LIBS)
++ @echo 'Finished building target: $@'
++ @echo ' '
++
++install: all
++ install -d $(DESTDIR)$(PREFIX)
++ cp -r include $(DESTDIR)$(PREFIX)
++ install -d $(DESTDIR)$(PREFIX)/lib
++ install -m 644 libgeramun.so $(DESTDIR)$(PREFIX)/lib
++
++%.so: %.cpp
++ @echo 'Building file: $<'
++ @echo 'Invoking: GCC C++ Compiler'
++ g++ -I${INCLUDE_PATH} -O3 -Wall -shared -fPIC -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
++ @echo 'Finished building: $<'
++ @echo ' '
++
++clean:
++ rm $(wildcard *.so)
++
++
+--
+2.39.2
+
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH 4/5] gnu: Add rapidxml.
2023-03-14 6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
` (2 preceding siblings ...)
2023-03-14 7:09 ` [bug#62178] [PATCH 3/5] gnu: Add libgeramun Adam Faiz via Guix-patches via
@ 2023-03-14 7:11 ` 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
` (5 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-14 7:11 UTC (permalink / raw)
To: 62178; +Cc: Liliana Marie Prikler, iyzsong
From f103aa078174b6b2d1ae733546a73eeb1ed853c3 Mon Sep 17 00:00:00 2001
Message-Id: <f103aa078174b6b2d1ae733546a73eeb1ed853c3.1678775193.git.adam.faiz@disroot.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:07:08 +0800
Subject: [PATCH 4/5] gnu: Add rapidxml.
* gnu/packages/xml.scm (rapidxml): New variable.
---
gnu/packages/xml.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 0b26a63e85..c8dbd27772 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -76,6 +76,7 @@ (define-module (gnu packages xml)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
@@ -1983,3 +1984,32 @@ (define-public python-xmltodict
(description "This package provides a Python library to convert XML to
@code{OrderedDict}.")
(license license:expat)))
+
+(define-public rapidxml
+ (package
+ (name "rapidxml")
+ (version "1.13")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://sourceforge.net/projects/"
+ "rapidxml/files/rapidxml/rapidxml%20"
+ version "/rapidxml-" version ".zip"))
+ (sha256
+ (base32
+ "0w9mbdgshr6sh6a5jr10lkdycjyvapbj7wxwz8hbp0a96y3biw63"))))
+ (build-system copy-build-system)
+ (native-inputs
+ (list unzip))
+ (arguments
+ (list
+ #:install-plan
+ #~'(("./" "include/rapidxml" #:include-regexp ("\\.hpp$")))))
+ (synopsis "XML Parser")
+ (description
+ "RapidXml is an attempt to create the fastest XML parser possible,
+while retaining useability, portability and reasonable W3C compatibility.
+ It is an in-situ parser written in modern C++, with parsing speed approaching
+that of strlen function executed on the same data.")
+ (home-page "https://rapidxml.sourceforge.net/")
+ (license license:boost1.0)))
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH 5/5] gnu: Add terrarium.
2023-03-14 6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
` (3 preceding siblings ...)
2023-03-14 7:11 ` [bug#62178] [PATCH 4/5] gnu: Add rapidxml Adam Faiz via Guix-patches via
@ 2023-03-14 7:13 ` Adam Faiz via Guix-patches via
2023-03-14 17:50 ` Liliana Marie Prikler
2023-03-16 6:26 ` [bug#62178] [PATCH v1 1/5] gnu: Add fgeal Adam Faiz via Guix-patches via
` (4 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-14 7:13 UTC (permalink / raw)
To: 62178; +Cc: Liliana Marie Prikler, iyzsong
From 914d9ebcaffee24da73bb4d9711c0428ff36feb0 Mon Sep 17 00:00:00 2001
Message-Id: <914d9ebcaffee24da73bb4d9711c0428ff36feb0.1678775193.git.adam.faiz@disroot.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.")
+ (license license:gpl2+))))
+
(define-public tetrinet
(package
(name "tetrinet")
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH 5/5] gnu: Add terrarium.
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
0 siblings, 1 reply; 18+ messages in thread
From: Liliana Marie Prikler @ 2023-03-14 17:50 UTC (permalink / raw)
To: Adam Faiz, 62178; +Cc: iyzsong
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 :)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH 3/5] gnu: Add libgeramun.
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
0 siblings, 0 replies; 18+ messages in thread
From: Liliana Marie Prikler @ 2023-03-14 19:41 UTC (permalink / raw)
To: Adam Faiz, 62178; +Cc: iyzsong
Am Dienstag, dem 14.03.2023 um 15:09 +0800 schrieb Adam Faiz:
> From 03a5262a846175be5ce4c8e1b9ea6d199a46b4fa Mon Sep 17 00:00:00
> 2001
> Message-Id:
> <03a5262a846175be5ce4c8e1b9ea6d199a46b4fa.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:02:58 +0800
> Subject: [PATCH 3/5] gnu: Add libgeramun.
>
> * gnu/packages/game-development.scm (libgeramun): New variable.
> * gnu/packages/patches/libgeramun-Add-Makefile.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> ---
> gnu/local.mk | 1 +
> gnu/packages/game-development.scm | 41 ++++++++++
> .../patches/libgeramun-Add-Makefile.patch | 79
> +++++++++++++++++++
> 3 files changed, 121 insertions(+)
> create mode 100644 gnu/packages/patches/libgeramun-Add-
> Makefile.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 1bdbddce5e..228ec92bb1 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1382,6 +1382,7 @@ dist_patch_DATA
> = \
> %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \
> %D%/packages/patches/libffi-float128-powerpc64le.patch \
> %D%/packages/patches/libgeotiff-fix-tests-with-proj-
> 9.1.1.patch \
> + %D%/packages/patches/libgeramun-Add-Makefile.patch \
> %D%/packages/patches/libobjc2-unbundle-robin-map.patch \
> %D%/packages/patches/librime-fix-build-with-gcc10.patch \
> %D%/packages/patches/libvirt-add-install-prefix.patch \
> diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-
> development.scm
> index f86793fda0..57bffa9b88 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
> @@ -2494,6 +2494,47 @@ (define-public libccd
> a.k.a. XenoCollide) as described in Game Programming Gems 7.")
> (license license:expat)))
>
> +(define-public libgeramun
> + (let ((commit "29668d33266a00fa730d8ee5a16893a86ee2d04d")
> + (revision "0"))
> + (package
> + (name "libgeramun")
> + (version (git-version "0.14" revision commit))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://gitlab.com/hydren/libgeramun")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> +
> "1nfsdyp3nnz33wxy54vnbbm50kr2y5h6q40kz6g1whz12lqmi79n"))
> + (patches
> + (search-patches "libgeramun-Add-Makefile.patch"))
We prefer not to add too many capital letters.
> + (modules '((guix build utils)))
> + (snippet
> + #~(begin
> + (for-each
> + (lambda (file)
> + (install-file file "include/libgeramun"))
> + (find-files "." "\\.h"))))))
This only matches the .hpp files by accident. Use "\\.h(pp)?$"
instead.
> + (build-system gnu-build-system)
> + (arguments
> + (list #:tests? #f ; no tests
> + #:phases
> + #~(modify-phases %standard-phases
> + (delete 'configure))
> + #:make-flags
> + #~(list (string-append "DESTDIR=" #$output)
> + "PREFIX=")))
> + (synopsis "Procedural platformer-game map generation library")
> + (description
> + "libgeramun is a set of
> +stochastic, procedural platformer-game map generation routines.
> + The routines are meant to produce maps with a Terraria-like look
> and feel.")
Don't break lines abruptly. Also, you don't need to indent the
beginning of sentences.
> + (home-page "https://gitlab.com/hydren/libgeramun")
> + (license license:gpl2+))))
> +
> (define-public ode
> (package
> (name "ode")
> diff --git a/gnu/packages/patches/libgeramun-Add-Makefile.patch
> b/gnu/packages/patches/libgeramun-Add-Makefile.patch
> new file mode 100644
> index 0000000000..01a94d6422
> --- /dev/null
> +++ b/gnu/packages/patches/libgeramun-Add-Makefile.patch
> @@ -0,0 +1,79 @@
> +From ac239d7be2755dc28fa831ba15a0fb318848a5a6 Mon Sep 17 00:00:00
> 2001
> +From: AwesomeAdam54321 <adam.faiz@disroot.org>
> +Date: Sun, 12 Mar 2023 01:30:46 +0800
> +Subject: [PATCH] libgeramun: Add Makefile.
> +
> +Adapted from
> https://gitlab.com/hydren/terrarium/-/raw/master/build/linux-gcc-sdl2-release/src_libs/libgeramun/subdir.mk
> +---
> + Makefile | 59
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> + 1 file changed, 59 insertions(+)
> + create mode 100644 Makefile
> +
> +diff --git a/Makefile b/Makefile
> +new file mode 100644
> +index 0000000..8d37ce4
> +--- /dev/null
> ++++ b/Makefile
> +@@ -0,0 +1,59 @@
> ++###################################################################
> #############
> ++# Automatically-generated file. Do not edit!
> ++###################################################################
> #############
> ++
> ++# Add inputs and outputs from these tool invocations to the build
> variables
> ++CPP_SRCS += \
> ++brush.cpp \
> ++cave.cpp \
> ++debug.cpp \
> ++generators.cpp \
> ++midpoint_displacement.cpp \
> ++miners.cpp \
> ++preview_callback.cpp \
> ++random_walk.cpp \
> ++spring.cpp \
> ++surf_replacer.cpp
> ++
> ++OBJS += \
> ++brush.so \
> ++cave.so \
> ++debug.so \
> ++generators.so \
> ++midpoint_displacement.so \
> ++miners.so \
> ++preview_callback.so \
> ++random_walk.so \
> ++spring.so \
> ++surf_replacer.so
Is it really necessary to make all of the objects shared?
> ++SRCDIR ?= .
> ++INCLUDE_PATH ?= ${SRCDIR}/include
> ++PREFIX ?= /usr/local
> ++
> ++all: libgeramun.so
> ++
> ++libgeramun.so: $(OBJS) $(USER_OBJS)
> ++ @echo 'Building target: $@'
> ++ @echo 'Invoking: GCC C++ Linker'
> ++ g++ -shared -o "libgeramun.so" $(OBJS) $(USER_OBJS) $(LIBS)
> ++ @echo 'Finished building target: $@'
> ++ @echo ' '
> ++
> ++install: all
> ++ install -d $(DESTDIR)$(PREFIX)
> ++ cp -r include $(DESTDIR)$(PREFIX)
> ++ install -d $(DESTDIR)$(PREFIX)/lib
> ++ install -m 644 libgeramun.so $(DESTDIR)$(PREFIX)/lib
> ++
> ++%.so: %.cpp
> ++ @echo 'Building file: $<'
> ++ @echo 'Invoking: GCC C++ Compiler'
> ++ g++ -I${INCLUDE_PATH} -O3 -Wall -shared -fPIC -c -fmessage-
> length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
I think some of this ought to be abstracted into CFLAGS and similar
variables.
Also note that a Makefile isn't strictly needed.
You could just as well
(apply invoke #$(cc-for-target) "-shared" "-o" "libgeramun.so"
;; some more CFLAGS
(find-files "." "\\.cpp"))
Cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH v1 1/5] gnu: Add fgeal.
2023-03-14 6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
` (4 preceding siblings ...)
2023-03-14 7:13 ` [bug#62178] [PATCH 5/5] gnu: Add terrarium Adam Faiz via Guix-patches via
@ 2023-03-16 6:26 ` 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
` (3 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-16 6:26 UTC (permalink / raw)
To: 62178
From 735f08bc3d271959685e03d761f5ac9039e5cfd3 Mon Sep 17 00:00:00 2001
Message-Id: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.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"))
+ (("which") "type -p"))
+ (substitute* "makefile"
+ (("RM := rm -rf")
+ (string-append "RM := rm -rf\n"
+ "PREFIX ?= /usr/local"))
+ (("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:")))
+ (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"))
+ (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
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH v1 2/5] gnu: Add futil.
2023-03-14 6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
` (5 preceding siblings ...)
2023-03-16 6:26 ` [bug#62178] [PATCH v1 1/5] gnu: Add fgeal Adam Faiz via Guix-patches via
@ 2023-03-16 6:29 ` 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
` (2 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-16 6:29 UTC (permalink / raw)
To: 62178
From 53d9b1d0ab260a2b2aa4ee84dd00f97517c381db Mon Sep 17 00:00:00 2001
Message-Id: <53d9b1d0ab260a2b2aa4ee84dd00f97517c381db.1678947948.git.adam.faiz@disroot.org>
In-Reply-To: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
References: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Tue, 14 Mar 2023 13:55:09 +0800
Subject: [PATCH v1 2/5] gnu: Add futil.
* gnu/packages/cpp.scm (futil): New variable.
* gnu/packages/patches/futil-add-makefile.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/cpp.scm | 38 ++++++++
gnu/packages/patches/futil-add-makefile.patch | 92 +++++++++++++++++++
3 files changed, 131 insertions(+)
create mode 100644 gnu/packages/patches/futil-add-makefile.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index c2521acf02..76129c9d82 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1133,6 +1133,7 @@ dist_patch_DATA = \
%D%/packages/patches/freeimage-unbundle.patch \
%D%/packages/patches/fuse-glibc-2.34.patch \
%D%/packages/patches/fuse-overlapping-headers.patch \
+ %D%/packages/patches/futil-add-makefile.patch \
%D%/packages/patches/fxdiv-system-libraries.patch \
%D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \
%D%/packages/patches/ganeti-disable-version-symlinks.patch \
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index ed6ae69198..5b146b3f4a 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1216,6 +1216,44 @@ (define-public folly
(supported-systems '("aarch64-linux" "x86_64-linux"))
(license license:asl2.0)))
+(define-public futil
+ (let ((commit "83fcf85cf7638947a44657b2f334c2d8a2d5d02d")
+ (revision "0"))
+ (package
+ (name "futil")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/hydren/futil")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "05vyx6n4aqix3w1z76hal9zxzixfxnlw0cg4b06lc1l9gnw6ja71"))
+ (patches
+ (search-patches "futil-add-makefile.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (for-each
+ (lambda (file)
+ (install-file file "include/futil"))
+ (find-files "." "\\.h(pp)?$"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ; no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure))
+ #:make-flags
+ #~(list (string-append "DESTDIR=" #$output)
+ "PREFIX=")))
+ (home-page "https://gitlab.com/hydren/futil")
+ (synopsis "C++ utility code library")
+ (description "Futil is a set of C++ utility code and library headers.")
+ (license license:zlib))))
+
(define-public poco
(package
(name "poco")
diff --git a/gnu/packages/patches/futil-add-makefile.patch b/gnu/packages/patches/futil-add-makefile.patch
new file mode 100644
index 0000000000..c580128f5e
--- /dev/null
+++ b/gnu/packages/patches/futil-add-makefile.patch
@@ -0,0 +1,92 @@
+From da31e9bb1abd95d81b4d4eb18888e41c30092fb9 Mon Sep 17 00:00:00 2001
+From: AwesomeAdam54321 <adam.faiz@disroot.org>
+Date: Sun, 12 Mar 2023 00:47:56 +0800
+Subject: [PATCH] futil: add makefile.
+
+Adapted from https://gitlab.com/hydren/terrarium/-/raw/master/build/linux-gcc-sdl2-release/src_libs/futil/subdir.mk
+---
+ Makefile | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 72 insertions(+)
+ create mode 100644 Makefile
+
+diff --git a/Makefile b/Makefile
+new file mode 100644
+index 0000000..a97ea48
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,72 @@
++################################################################################
++# Automatically-generated file. Do not edit!
++################################################################################
++
++# Add inputs and outputs from these tool invocations to the build variables
++CPP_SRCS += \
++exception.cpp \
++properties.cpp \
++stox.cpp \
++string_actions.cpp \
++string_extra_operators.cpp \
++string_parse.cpp \
++string_split.cpp
++
++C_SRCS += \
++chrono.c \
++random.c \
++round.c \
++snprintf.c \
++strtox.c
++
++OBJS += \
++chrono.o \
++exception.o \
++properties.o \
++random.o \
++round.o \
++snprintf.o \
++stox.o \
++string_actions.o \
++string_extra_operators.o \
++string_parse.o \
++string_split.o \
++strtox.o
++
++SRCDIR ?= .
++INCLUDE_PATH ?= ${SRCDIR}/include
++PREFIX ?= /usr/local
++CFLAGS = -O3 -Wall -fPIC -c -fmessage-length=0 -MMD -MP
++
++all: libfutil.so
++
++libfutil.so: $(OBJS) $(USER_OBJS)
++ @echo 'Building target: $@'
++ @echo 'Invoking: GCC C++ Linker'
++ g++ -shared -o "libfutil.so" $(OBJS) $(USER_OBJS) $(LIBS)
++ @echo 'Finished building target: $@'
++ @echo ' '
++
++install: all
++ install -d $(DESTDIR)$(PREFIX)
++ cp -r include $(DESTDIR)$(PREFIX)
++ install -d $(DESTDIR)$(PREFIX)/lib
++ install -m 644 libfutil.so $(DESTDIR)$(PREFIX)/lib
++
++%.o: %.c
++ @echo 'Building file: $<'
++ @echo 'Invoking: GCC C Compiler'
++ gcc -I${INCLUDE_PATH} $(CFLAGS) -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
++ @echo 'Finished building: $<'
++ @echo ' '
++
++%.o: %.cpp
++ @echo 'Building file: $<'
++ @echo 'Invoking: GCC C++ Compiler'
++ g++ -I${INCLUDE_PATH} $(CFLAGS) -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
++ @echo 'Finished building: $<'
++ @echo ' '
++
++clean:
++ rm $(wildcard *.o) libfutil.so
++
+--
+2.39.2
+
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH v1 3/5] gnu: Add libgeramun.
2023-03-14 6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
` (6 preceding siblings ...)
2023-03-16 6:29 ` [bug#62178] [PATCH v1 2/5] gnu: Add futil Adam Faiz via Guix-patches via
@ 2023-03-16 6:30 ` 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-03-16 6:32 ` [bug#62178] [PATCH v1 5/5] gnu: Add terrarium Adam Faiz via Guix-patches via
9 siblings, 0 replies; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-16 6:30 UTC (permalink / raw)
To: 62178
From bffbe04a9c180de7e883f4c5b74c5041b7ee80f0 Mon Sep 17 00:00:00 2001
Message-Id: <bffbe04a9c180de7e883f4c5b74c5041b7ee80f0.1678947948.git.adam.faiz@disroot.org>
In-Reply-To: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
References: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Tue, 14 Mar 2023 14:02:58 +0800
Subject: [PATCH v1 3/5] gnu: Add libgeramun.
* gnu/packages/game-development.scm (libgeramun): New variable.
* gnu/packages/patches/libgeramun-add-makefile.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/game-development.scm | 41 ++++++++++
.../patches/libgeramun-add-makefile.patch | 80 +++++++++++++++++++
3 files changed, 122 insertions(+)
create mode 100644 gnu/packages/patches/libgeramun-add-makefile.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 76129c9d82..7396208a9b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1382,6 +1382,7 @@ dist_patch_DATA = \
%D%/packages/patches/libffi-3.3-powerpc-fixes.patch \
%D%/packages/patches/libffi-float128-powerpc64le.patch \
%D%/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch \
+ %D%/packages/patches/libgeramun-add-makefile.patch \
%D%/packages/patches/libobjc2-unbundle-robin-map.patch \
%D%/packages/patches/librime-fix-build-with-gcc10.patch \
%D%/packages/patches/libvirt-add-install-prefix.patch \
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index cbededa8e4..021a206326 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2494,6 +2494,47 @@ (define-public libccd
a.k.a. XenoCollide) as described in Game Programming Gems 7.")
(license license:expat)))
+(define-public libgeramun
+ (let ((commit "29668d33266a00fa730d8ee5a16893a86ee2d04d")
+ (revision "0"))
+ (package
+ (name "libgeramun")
+ (version (git-version "0.14" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/hydren/libgeramun")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1nfsdyp3nnz33wxy54vnbbm50kr2y5h6q40kz6g1whz12lqmi79n"))
+ (patches
+ (search-patches "libgeramun-add-makefile.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (for-each
+ (lambda (file)
+ (install-file file "include/libgeramun"))
+ (find-files "." "\\.h(pp)?$"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ; no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure))
+ #:make-flags
+ #~(list (string-append "DESTDIR=" #$output)
+ "PREFIX=")))
+ (synopsis "Procedural platformer-game map generation library")
+ (description
+ "libgeramun is a set of stochastic, procedural platformer-game map
+generation routines.
+The routines are meant to produce maps with a Terraria-like look and feel.")
+ (home-page "https://gitlab.com/hydren/libgeramun")
+ (license license:gpl2+))))
+
(define-public ode
(package
(name "ode")
diff --git a/gnu/packages/patches/libgeramun-add-makefile.patch b/gnu/packages/patches/libgeramun-add-makefile.patch
new file mode 100644
index 0000000000..b61e730526
--- /dev/null
+++ b/gnu/packages/patches/libgeramun-add-makefile.patch
@@ -0,0 +1,80 @@
+From 38f790a0526de3ca74480e8e3f7504ff648ba272 Mon Sep 17 00:00:00 2001
+From: AwesomeAdam54321 <adam.faiz@disroot.org>
+Date: Sun, 12 Mar 2023 01:30:46 +0800
+Subject: [PATCH] libgeramun: add makefile.
+
+Adapted from https://gitlab.com/hydren/terrarium/-/raw/master/build/linux-gcc-sdl2-release/src_libs/libgeramun/subdir.mk
+---
+ Makefile | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 60 insertions(+)
+ create mode 100644 Makefile
+
+diff --git a/Makefile b/Makefile
+new file mode 100644
+index 0000000..38608c1
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,60 @@
++################################################################################
++# Automatically-generated file. Do not edit!
++################################################################################
++
++# Add inputs and outputs from these tool invocations to the build variables
++CPP_SRCS += \
++brush.cpp \
++cave.cpp \
++debug.cpp \
++generators.cpp \
++midpoint_displacement.cpp \
++miners.cpp \
++preview_callback.cpp \
++random_walk.cpp \
++spring.cpp \
++surf_replacer.cpp
++
++OBJS += \
++brush.o \
++cave.o \
++debug.o \
++generators.o \
++midpoint_displacement.o \
++miners.o \
++preview_callback.o \
++random_walk.o \
++spring.o \
++surf_replacer.o
++
++SRCDIR ?= .
++INCLUDE_PATH ?= ${SRCDIR}/include
++PREFIX ?= /usr/local
++CFLAGS = -O3 -Wall -fPIC -c -fmessage-length=0 -MMD -MP
++
++all: libgeramun.so
++
++libgeramun.so: $(OBJS) $(USER_OBJS)
++ @echo 'Building target: $@'
++ @echo 'Invoking: GCC C++ Linker'
++ g++ -shared -o "libgeramun.so" $(OBJS) $(USER_OBJS) $(LIBS)
++ @echo 'Finished building target: $@'
++ @echo ' '
++
++install: all
++ install -d $(DESTDIR)$(PREFIX)
++ cp -r include $(DESTDIR)$(PREFIX)
++ install -d $(DESTDIR)$(PREFIX)/lib
++ install -m 644 libgeramun.so $(DESTDIR)$(PREFIX)/lib
++
++%.o: %.cpp
++ @echo 'Building file: $<'
++ @echo 'Invoking: GCC C++ Compiler'
++ g++ -I${INCLUDE_PATH} $(CFLAGS) -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
++ @echo 'Finished building: $<'
++ @echo ' '
++
++clean:
++ rm $(wildcard *.o) libgeramun.so
++
++
+--
+2.39.2
+
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH v1 4/5] gnu: Add rapidxml.
2023-03-14 6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
` (7 preceding siblings ...)
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 ` 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
9 siblings, 1 reply; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-16 6:31 UTC (permalink / raw)
To: 62178
From 470ac3c7e5cea2c08a64745037cd73af59027c26 Mon Sep 17 00:00:00 2001
Message-Id: <470ac3c7e5cea2c08a64745037cd73af59027c26.1678947948.git.adam.faiz@disroot.org>
In-Reply-To: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
References: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Tue, 14 Mar 2023 14:07:08 +0800
Subject: [PATCH v1 4/5] gnu: Add rapidxml.
* gnu/packages/xml.scm (rapidxml): New variable.
---
gnu/packages/xml.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 0b26a63e85..c8dbd27772 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -76,6 +76,7 @@ (define-module (gnu packages xml)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
@@ -1983,3 +1984,32 @@ (define-public python-xmltodict
(description "This package provides a Python library to convert XML to
@code{OrderedDict}.")
(license license:expat)))
+
+(define-public rapidxml
+ (package
+ (name "rapidxml")
+ (version "1.13")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://sourceforge.net/projects/"
+ "rapidxml/files/rapidxml/rapidxml%20"
+ version "/rapidxml-" version ".zip"))
+ (sha256
+ (base32
+ "0w9mbdgshr6sh6a5jr10lkdycjyvapbj7wxwz8hbp0a96y3biw63"))))
+ (build-system copy-build-system)
+ (native-inputs
+ (list unzip))
+ (arguments
+ (list
+ #:install-plan
+ #~'(("./" "include/rapidxml" #:include-regexp ("\\.hpp$")))))
+ (synopsis "XML Parser")
+ (description
+ "RapidXml is an attempt to create the fastest XML parser possible,
+while retaining useability, portability and reasonable W3C compatibility.
+ It is an in-situ parser written in modern C++, with parsing speed approaching
+that of strlen function executed on the same data.")
+ (home-page "https://rapidxml.sourceforge.net/")
+ (license license:boost1.0)))
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH v1 5/5] gnu: Add terrarium.
2023-03-14 6:52 [bug#62178] [PATCH 0/5] Add terrarium Adam Faiz via Guix-patches via
` (8 preceding siblings ...)
2023-03-16 6:31 ` [bug#62178] [PATCH v1 4/5] gnu: Add rapidxml Adam Faiz via Guix-patches via
@ 2023-03-16 6:32 ` Adam Faiz via Guix-patches via
2023-04-18 18:28 ` Liliana Marie Prikler
9 siblings, 1 reply; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-03-16 6:32 UTC (permalink / raw)
To: 62178
From e041b01dd31b915ac042ca0e30cbcbd0cf9c62df Mon Sep 17 00:00:00 2001
Message-Id: <e041b01dd31b915ac042ca0e30cbcbd0cf9c62df.1678947948.git.adam.faiz@disroot.org>
In-Reply-To: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
References: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Tue, 14 Mar 2023 14:19:59 +0800
Subject: [PATCH v1 5/5] gnu: Add terrarium.
* gnu/packages/games.scm (terrarium): New variable.
---
gnu/packages/games.scm | 97 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 97 insertions(+)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 2946c787af..b475be4654 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -618,6 +618,103 @@ (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 "2D block sandbox game")
+ (description "Terrarium is a 2D sandbox game centered around exploration
+and building. Players can create and destroy various types of blocks in a
+two-dimensional open world, inhabited with the occasional toad.")
+ (license license:gpl2+))))
+
(define-public tetrinet
(package
(name "tetrinet")
--
2.39.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH 5/5] gnu: Add terrarium.
2023-03-14 17:50 ` Liliana Marie Prikler
@ 2023-04-18 14:34 ` Adam Faiz via Guix-patches via
0 siblings, 0 replies; 18+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-04-18 14:34 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 62178
Hi Liliana,
Could you review my v1 revision of the patchset? I think it addresses the problems you mentioned with the first set of patches I sent.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH v1 1/5] gnu: Add fgeal.
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
0 siblings, 0 replies; 18+ messages in thread
From: Liliana Marie Prikler @ 2023-04-18 16:50 UTC (permalink / raw)
To: Adam Faiz, 62178
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH v1 2/5] gnu: Add futil.
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
0 siblings, 0 replies; 18+ messages in thread
From: Liliana Marie Prikler @ 2023-04-18 16:55 UTC (permalink / raw)
To: Adam Faiz, 62178
Am Donnerstag, dem 16.03.2023 um 14:29 +0800 schrieb Adam Faiz:
> From 53d9b1d0ab260a2b2aa4ee84dd00f97517c381db Mon Sep 17 00:00:00
> 2001
> Message-Id:
> <53d9b1d0ab260a2b2aa4ee84dd00f97517c381db.1678947948.git.adam.faiz@di
> sroot.org>
> In-Reply-To:
> <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@di
> sroot.org>
> References:
> <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@di
> sroot.org>
> From: AwesomeAdam54321 <adam.faiz@disroot.org>
> Date: Tue, 14 Mar 2023 13:55:09 +0800
> Subject: [PATCH v1 2/5] gnu: Add futil.
>
> * gnu/packages/cpp.scm (futil): New variable.
> * gnu/packages/patches/futil-add-makefile.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> ---
> gnu/local.mk | 1 +
> gnu/packages/cpp.scm | 38 ++++++++
> gnu/packages/patches/futil-add-makefile.patch | 92
> +++++++++++++++++++
> 3 files changed, 131 insertions(+)
> create mode 100644 gnu/packages/patches/futil-add-makefile.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index c2521acf02..76129c9d82 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1133,6 +1133,7 @@ dist_patch_DATA
> = \
> %D%/packages/patches/freeimage-unbundle.patch \
> %D%/packages/patches/fuse-glibc-2.34.patch \
> %D%/packages/patches/fuse-overlapping-headers.patch \
> + %D%/packages/patches/futil-add-makefile.patch \
> %D%/packages/patches/fxdiv-system-libraries.patch \
> %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \
> %D%/packages/patches/ganeti-disable-version-symlinks.patch \
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index ed6ae69198..5b146b3f4a 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -1216,6 +1216,44 @@ (define-public folly
> (supported-systems '("aarch64-linux" "x86_64-linux"))
> (license license:asl2.0)))
>
> +(define-public futil
> + (let ((commit "83fcf85cf7638947a44657b2f334c2d8a2d5d02d")
> + (revision "0"))
> + (package
> + (name "futil")
> + (version (git-version "0.0.0" revision commit))
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://gitlab.com/hydren/futil")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> "05vyx6n4aqix3w1z76hal9zxzixfxnlw0cg4b06lc1l9gnw6ja71"))
> + (patches
> + (search-patches "futil-add-makefile.patch"))
> + (modules '((guix build utils)))
> + (snippet
> + #~(begin
> + (for-each
> + (lambda (file)
> + (install-file file "include/futil"))
> + (find-files "." "\\.h(pp)?$"))))))
Is this snippet intended to go together with the patch? If so, perhaps
you can adapt the patch to emit the renames as well or use a second
patch to do so rather than a snippet.
> + (build-system gnu-build-system)
> + (arguments
> + (list #:tests? #f ; no tests
> + #:phases
> + #~(modify-phases %standard-phases
> + (delete 'configure))
> + #:make-flags
> + #~(list (string-append "DESTDIR=" #$output)
> + "PREFIX=")))
Let PREFIX be #$output instead and leave DESTDIR empty.
> + (home-page "https://gitlab.com/hydren/futil")
> + (synopsis "C++ utility code library")
> + (description "Futil is a set of C++ utility code and library
> headers.")
> + (license license:zlib))))
> [...]
Cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH v1 4/5] gnu: Add rapidxml.
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
0 siblings, 0 replies; 18+ messages in thread
From: Liliana Marie Prikler @ 2023-04-18 17:28 UTC (permalink / raw)
To: Adam Faiz, 62178
Am Donnerstag, dem 16.03.2023 um 14:31 +0800 schrieb Adam Faiz:
> From 470ac3c7e5cea2c08a64745037cd73af59027c26 Mon Sep 17 00:00:00
> 2001
> Message-Id:
> <470ac3c7e5cea2c08a64745037cd73af59027c26.1678947948.git.adam.faiz@di
> sroot.org>
> In-Reply-To:
> <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@di
> sroot.org>
> References:
> <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@di
> sroot.org>
> From: AwesomeAdam54321 <adam.faiz@disroot.org>
> Date: Tue, 14 Mar 2023 14:07:08 +0800
> Subject: [PATCH v1 4/5] gnu: Add rapidxml.
>
> * gnu/packages/xml.scm (rapidxml): New variable.
> ---
> gnu/packages/xml.scm | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
> index 0b26a63e85..c8dbd27772 100644
> --- a/gnu/packages/xml.scm
> +++ b/gnu/packages/xml.scm
> @@ -76,6 +76,7 @@ (define-module (gnu packages xml)
> #:use-module (guix download)
> #:use-module (guix git-download)
> #:use-module (guix build-system cmake)
> + #:use-module (guix build-system copy)
> #:use-module (guix build-system gnu)
> #:use-module (guix build-system meson)
> #:use-module (guix build-system perl)
> @@ -1983,3 +1984,32 @@ (define-public python-xmltodict
> (description "This package provides a Python library to convert
> XML to
> @code{OrderedDict}.")
> (license license:expat)))
> +
> +(define-public rapidxml
> + (package
> + (name "rapidxml")
> + (version "1.13")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://sourceforge.net/projects/"
> + "rapidxml/files/rapidxml/rapidxml%20"
> + version "/rapidxml-" version ".zip"))
Small nitpick, you should try to fit this as
(uri (string-append
"https://sourceforge.net/projects/rapidxml/"
"files/rapidxml/rapidxml%20" version "/"
"rapidxml-" version ".zip"))
> + (sha256
> + (base32
> +
> "0w9mbdgshr6sh6a5jr10lkdycjyvapbj7wxwz8hbp0a96y3biw63"))))
> + (build-system copy-build-system)
> + (native-inputs
> + (list unzip))
Can go on one line, but arguments should be first.
> + (arguments
> + (list
> + #:install-plan
> + #~'(("./" "include/rapidxml" #:include-regexp ("\\.hpp$")))))
> + (synopsis "XML Parser")
> + (description
> + "RapidXml is an attempt to create the fastest XML parser
> possible,
> +while retaining useability, portability and reasonable W3C
> compatibility.
> + It is an in-situ parser written in modern C++, with parsing speed
> approaching
> +that of strlen function executed on the same data.")
I think we should avoid claims like "the fastest" in particular with
benchmarks referring to GCC 4 :)
Better, "RapidXml is a fast, mostly W3C-compatible XML DOM parser. It
uses an in-situ parsing approach, that is it does not copy the input
string."
> + (home-page "https://rapidxml.sourceforge.net/")
> + (license license:boost1.0)))
Cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#62178] [PATCH v1 5/5] gnu: Add terrarium.
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
0 siblings, 0 replies; 18+ messages in thread
From: Liliana Marie Prikler @ 2023-04-18 18:28 UTC (permalink / raw)
To: Adam Faiz, 62178
Am Donnerstag, dem 16.03.2023 um 14:32 +0800 schrieb Adam Faiz:
> From e041b01dd31b915ac042ca0e30cbcbd0cf9c62df Mon Sep 17 00:00:00
> 2001
> Message-Id:
> <e041b01dd31b915ac042ca0e30cbcbd0cf9c62df.1678947948.git.adam.faiz@di
> sroot.org>
> In-Reply-To:
> <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@di
> sroot.org>
> References:
> <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@di
> sroot.org>
> From: AwesomeAdam54321 <adam.faiz@disroot.org>
> Date: Tue, 14 Mar 2023 14:19:59 +0800
> Subject: [PATCH v1 5/5] gnu: Add terrarium.
>
> * gnu/packages/games.scm (terrarium): New variable.
> ---
> gnu/packages/games.scm | 97
> ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 97 insertions(+)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 2946c787af..b475be4654 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -618,6 +618,103 @@ (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"))
I'd use @BOLD_FONT@ and @REGULAR_FONT@ and possibly allow users to
parameterize those if necessary. In any case, this type of fix is
typically made in a build phase rather than a snippet so that the
actual path can be hardcoded via search-input-file.
> + (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 "2D block sandbox game")
> + (description "Terrarium is a 2D sandbox game centered around
> exploration
> +and building. Players can create and destroy various types of
> blocks in a
> +two-dimensional open world, inhabited with the occasional toad.")
> + (license license:gpl2+))))
> +
> (define-public tetrinet
> (package
> (name "tetrinet")
Cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-04-18 18:30 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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.