freedroidrpg: 0.16.1 -> 1.0 (#338329)

This commit is contained in:
Peder Bergebakken Sundt 2024-09-07 20:06:41 +02:00 committed by GitHub
commit 8b76e5f6f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 14 deletions

View File

@ -1,24 +1,17 @@
{ fetchurl, fetchpatch, lib, stdenv, pkg-config, gettext, python3, SDL, SDL_image, SDL_gfx, SDL_mixer, libogg, libvorbis, lua5_3, libjpeg, libpng, zlib, libiconv }: { fetchurl, lib, stdenv, pkg-config, gettext, glew, python3, SDL, SDL_image, SDL_gfx, SDL_mixer, libogg, libvorbis, lua5_3, libjpeg, libpng, zlib, libiconv }:
let let
version = "0.16.1"; version = "1.0";
in stdenv.mkDerivation { in stdenv.mkDerivation {
pname = "freedroidrpg"; pname = "freedroidrpg";
inherit version; inherit version;
src = fetchurl { src = fetchurl {
url = "ftp://ftp.osuosl.org/pub/freedroid/freedroidRPG-${lib.versions.majorMinor version}/freedroidRPG-${version}.tar.gz"; url = "ftp://ftp.osuosl.org/pub/freedroid/freedroidRPG-${lib.versions.majorMinor version}/freedroidRPG-${version}.tar.gz";
sha256 = "0n4kn38ncmcy3lrxmq8fjry6c1z50z4q1zcqfig0j4jb0dsz2va2"; hash = "sha256-eZW3C1lCSOoU0bTvWVOXpgGDAxyZFjsBwainDM7zu88=";
}; };
patches = [ patches = [
# Pull upstream fix for -fno-common tolchains.
(fetchpatch {
name = "fno-common.patch";
url = "https://gitlab.com/freedroid/freedroid-src/-/commit/e610d427374226b79da5258d979936459f30c761.patch";
sha256 = "1s7sw4dkc7b6i72j6x47driq6v0k3wss48l9ivd4fw40n3iaxjb1";
})
# Do not embed build flags in the binary to reduce closure size. # Do not embed build flags in the binary to reduce closure size.
./drop-build-deps.patch ./drop-build-deps.patch
]; ];
@ -26,9 +19,11 @@ in stdenv.mkDerivation {
nativeBuildInputs = [ pkg-config gettext python3 ]; nativeBuildInputs = [ pkg-config gettext python3 ];
buildInputs = [ buildInputs = [
SDL SDL_image SDL_gfx SDL_mixer libogg libvorbis lua5_3 libjpeg libpng zlib glew SDL SDL_image SDL_gfx SDL_mixer libogg libvorbis lua5_3 libjpeg libpng zlib
] ++ lib.optional stdenv.isDarwin libiconv; ] ++ lib.optional stdenv.isDarwin libiconv;
enableParallelBuilding = true;
meta = with lib; { meta = with lib; {
description = "Isometric 3D RPG similar to game Diablo"; description = "Isometric 3D RPG similar to game Diablo";
mainProgram = "freedroidRPG"; mainProgram = "freedroidRPG";

View File

@ -2,10 +2,10 @@ Do not embed paths to build-only depends (-I...SDL2-dev and friends)
into savefile lua comments. into savefile lua comments.
--- a/src/savestruct_internal.c --- a/src/savestruct_internal.c
+++ b/src/savestruct_internal.c +++ b/src/savestruct_internal.c
@@ -486,8 +486,8 @@ void save_game_data(struct auto_string *strout) @@ -571,8 +571,8 @@ void save_game_data(struct auto_string *strout)
autostr_append(strout, autostr_append(strout,
"SAVEGAME: %s %s %s;sizeof(tux_t)=%d;sizeof(enemy)=%d;sizeof(bullet)=%d;MAXBULLETS=%d\n", "SAVEGAME: %s %s %s;sizeof(tux_t)=%d;sizeof(enemy)=%d;sizeof(bullet)=%d\n",
SAVEGAME_VERSION, SAVEGAME_REVISION, VERSION, (int)sizeof(tux_t), (int)sizeof(enemy), (int)sizeof(bullet), (int)MAXBULLETS); SAVEGAME_VERSION, SAVEGAME_REVISION, VERSION, (int)sizeof(tux_t), (int)sizeof(enemy), (int)sizeof(bullet));
- autostr_append(strout, "BUILD_CFLAGS: %s\n", BUILD_CFLAGS); - autostr_append(strout, "BUILD_CFLAGS: %s\n", BUILD_CFLAGS);
- autostr_append(strout, "BUILD_LDFLAGS: %s\n", BUILD_LDFLAGS); - autostr_append(strout, "BUILD_LDFLAGS: %s\n", BUILD_LDFLAGS);
+ autostr_append(strout, "BUILD_CFLAGS: %s\n", "<hidden>"); + autostr_append(strout, "BUILD_CFLAGS: %s\n", "<hidden>");