eduke32: convert bmp -> png for gdk-pixbuf-csource

- gdk-pixbuf-csource no longer supports bmp files
- add a rule in the makefile to convert bmp -> png

annalee 8f339b27 25e9a6d0

+29
+23
pkgs/games/eduke32/convert-bmp-to-png.diff
··· 1 + diff --git a/GNUmakefile b/GNUmakefile 2 + index f83f04d..25a4fa8 100644 3 + --- a/GNUmakefile 4 + +++ b/GNUmakefile 5 + @@ -798,6 +798,9 @@ libklzw$(DLLSUFFIX): $(engine_src)/klzw.cpp 6 + $(COMPILE_STATUS) 7 + $(RECIPE_IF) $(COMPILER_C) -shared -fPIC $< -o $@ $(RECIPE_RESULT_COMPILE) 8 + 9 + +%.png: %.bmp 10 + + gm convert $< $@ 11 + + 12 + # to debug the tools link phase, make a copy of this rule explicitly replacing % with the name of a tool, such as kextract 13 + %$(EXESUFFIX): $(tools_obj)/%.$o $(foreach i,tools $(tools_deps),$(call expandobjs,$i)) 14 + $(LINK_STATUS) 15 + @@ -880,7 +883,7 @@ $$($1_obj)/%.$$o: $$($1_rsrc)/%.c | $$($1_obj) 16 + $$(call MKDIR,$$(dir $$@)) 17 + $$(RECIPE_IF) $$(COMPILER_C) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE) 18 + 19 + -$$($1_obj)/%_banner.c: $$($1_rsrc)/%.bmp | $$($1_obj) 20 + +$$($1_obj)/%_banner.c: $$($1_rsrc)/%.png | $$($1_obj) 21 + echo "#include \"gtkpixdata_shim.h\"" > $$@ 22 + gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $$^ | sed 's/load_inc//' >> $$@ 23 +
+6
pkgs/games/eduke32/default.nix
··· 37 37 hash = "sha256-dyZ4JtDBxsTDe9uQDWxJe7M74X7m+5wpEHm+i+s9hwo="; 38 38 }; 39 39 40 + patches = [ 41 + # gdk-pixbuf-csource no longer supports bmp so convert to png 42 + # patch GNUMakefile to use graphicsmagick to convert bmp -> png 43 + ./convert-bmp-to-png.diff 44 + ]; 45 + 40 46 buildInputs = [ 41 47 flac 42 48 libvorbis