logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 134743b0ef375e450c9f62189590987040f7b91b
parent 078d6f936542719569d910f1bddcf19dc466e51c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 14 Dec 2023 18:19:58 +0100

games-arcade/srb2: new package, add 2.2.13

Diffstat:

Agames-arcade/srb2/Manifest2++
Agames-arcade/srb2/files/srb2-2.2.13-execinfo_guard.patch25+++++++++++++++++++++++++
Agames-arcade/srb2/srb2-2.2.13.ebuild52++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 79 insertions(+), 0 deletions(-)

diff --git a/games-arcade/srb2/Manifest b/games-arcade/srb2/Manifest @@ -0,0 +1,2 @@ +DIST SRB2-v2213-Full.zip 156054029 BLAKE2B c597782fd4ef2b4d33a16cbc219418de3dd74d862272e225dda366ded88066f206d1ba70e859fec41cc8452b5feae4a6323ad1a7e924d8f94d78ce0ea2318afa SHA512 0ede22cc385057f18715da445548c94473271d7ece49d3c540faab470232574bcaf9a2de32e2445c35bc3c98bcb0f06bcb891e4d953e4c1b003cd4a7e0599a5e +DIST SRB2_release_2.2.13.tar.gz 58207762 BLAKE2B e2a36baa79f1ce77bbf3b6e8214d56e2834bfdc80d141710a1d91f2cf4fc8370090427adbac0cde1655fdfaf7573c1ccab41d9cfa40f0be1b34b725022c52706 SHA512 b68dec859d2d08ec0ff8fc65a07ba5cdc80091a26bf06fadb3e7ae5e18489b6e4a9575d0d3b7fd626e6ccf0589a67e93a0df616df18df70524e5e3709979cf8a diff --git a/games-arcade/srb2/files/srb2-2.2.13-execinfo_guard.patch b/games-arcade/srb2/files/srb2-2.2.13-execinfo_guard.patch @@ -0,0 +1,25 @@ +From 2e8dba054533e4a0c7e685a934e7f220db69a331 Mon Sep 17 00:00:00 2001 +From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me> +Date: Thu, 14 Dec 2023 17:52:55 +0100 +Subject: [PATCH] src/sdl/i_system.c: Guard backtrace(3) behind glibc and *BSD + +Present in NetBSD 7.0+, OpenBSD 7.0+, FreeBSD 10.0+, DragonFlyBSD, GNU glibc 2.1+ + +Absent in POSIX and musl libc. +--- + src/sdl/i_system.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c +index 2a26f3f501..2158b60ee9 100644 +--- a/src/sdl/i_system.c ++++ b/src/sdl/i_system.c +@@ -137,7 +137,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); + #include <errno.h> + #endif + +-#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) ++#if defined(__APPLE__) || defined (__GLIBC__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) + #include <execinfo.h> + #include <time.h> + #define UNIXBACKTRACE diff --git a/games-arcade/srb2/srb2-2.2.13.ebuild b/games-arcade/srb2/srb2-2.2.13.ebuild @@ -0,0 +1,52 @@ +# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="3D Sonic fan game based off of Doom Legacy" +HOMEPAGE="https://srb2.org" +SRC_URI=" + https://github.com/STJr/SRB2/archive/refs/tags/SRB2_release_${PV}.tar.gz + https://github.com/STJr/SRB2/releases/download/SRB2_release_${PV}/SRB2-v${PV//.}-Full.zip +" +S="${WORKDIR}/SRB2-SRB2_release_${PV}/" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + media-libs/game-music-emu + media-libs/libopenmpt + media-libs/libpng:= + media-libs/libsdl2 + media-libs/sdl2-mixer + net-misc/curl + sys-libs/zlib +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/srb2-2.2.13-execinfo_guard.patch" +) + +src_prepare() { + default + + rm -r libs || die + rm "${WORKDIR}"/*.dll "${WORKDIR}"/srb2win.exe || die + + # Don't strip executable + sed -i 's;all : $(exe);all : $(dbg);' src/Makefile || die +} + +src_compile() { + emake -C src/ USE_OPENMP=1 DBGNAME=srb2 +} + +src_install() { + dobin bin/srb2 + + cd "${WORKDIR}" || die + insinto /usr/share/games/SRB2 + doins models.dat *.dta *.pk3 +}