From: Adam Faiz via Guix-patches via <guix-patches@gnu.org>
To: 62178@debbugs.gnu.org
Subject: [bug#62178] [PATCH v1 3/5] gnu: Add libgeramun.
Date: Thu, 16 Mar 2023 14:30:29 +0800 [thread overview]
Message-ID: <71f085a9-4ea6-a8b2-1f18-b7967f86d881@disroot.org> (raw)
In-Reply-To: <00c2af06-fa2f-81d3-e3de-444eaf232732@disroot.org>
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
next prev parent reply other threads:[~2023-03-16 6:31 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
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 ` Adam Faiz via Guix-patches via [this message]
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=71f085a9-4ea6-a8b2-1f18-b7967f86d881@disroot.org \
--to=guix-patches@gnu.org \
--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).