nixpkgs-suyu/pkgs/games/freedroidrpg/drop-build-deps.patch
Sergei Trofimovich 02ba9a3d60 freedroidrpg: remove build-time flags embedding into binary
Noticed extra -dev dependencies in the runtime closure.

Before the change:

    $ nix path-info -rsSh $(nix-build -A freedroidrpg) | nl | tail -n1 | unnix
    158  /<<NIX>>/freedroidrpg-0.16.1 228.2M  808.1M

After the change:

    $ nix path-info -rsSh $(nix-build -A freedroidrpg) | nl | tail -n1 | unnix
    141  /<<NIX>>/freedroidrpg-0.16.1 228.2M  450.7M
2022-09-19 18:02:42 +01:00

15 lines
822 B
Diff

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");