Merge pull request #191810 from trofi/freedroifrpg-leaner-closure

This commit is contained in:
Sandro 2022-09-20 12:07:54 +02:00 committed by GitHub
commit d7026008c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -18,6 +18,9 @@ in stdenv.mkDerivation {
url = "https://gitlab.com/freedroid/freedroid-src/-/commit/e610d427374226b79da5258d979936459f30c761.patch";
sha256 = "1s7sw4dkc7b6i72j6x47driq6v0k3wss48l9ivd4fw40n3iaxjb1";
})
# Do not embed build flags in the binary to reduce closure size.
./drop-build-deps.patch
];
nativeBuildInputs = [ pkg-config gettext python3 ];

View File

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