mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
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
This commit is contained in:
parent
25e9a6d07d
commit
8f339b27dd
23
pkgs/games/eduke32/convert-bmp-to-png.diff
Normal file
23
pkgs/games/eduke32/convert-bmp-to-png.diff
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/GNUmakefile b/GNUmakefile
|
||||
index f83f04d..25a4fa8 100644
|
||||
--- a/GNUmakefile
|
||||
+++ b/GNUmakefile
|
||||
@@ -798,6 +798,9 @@ libklzw$(DLLSUFFIX): $(engine_src)/klzw.cpp
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(COMPILER_C) -shared -fPIC $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
+%.png: %.bmp
|
||||
+ gm convert $< $@
|
||||
+
|
||||
# to debug the tools link phase, make a copy of this rule explicitly replacing % with the name of a tool, such as kextract
|
||||
%$(EXESUFFIX): $(tools_obj)/%.$o $(foreach i,tools $(tools_deps),$(call expandobjs,$i))
|
||||
$(LINK_STATUS)
|
||||
@@ -880,7 +883,7 @@ $$($1_obj)/%.$$o: $$($1_rsrc)/%.c | $$($1_obj)
|
||||
$$(call MKDIR,$$(dir $$@))
|
||||
$$(RECIPE_IF) $$(COMPILER_C) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
|
||||
|
||||
-$$($1_obj)/%_banner.c: $$($1_rsrc)/%.bmp | $$($1_obj)
|
||||
+$$($1_obj)/%_banner.c: $$($1_rsrc)/%.png | $$($1_obj)
|
||||
echo "#include \"gtkpixdata_shim.h\"" > $$@
|
||||
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $$^ | sed 's/load_inc//' >> $$@
|
||||
|
@ -37,6 +37,12 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-dyZ4JtDBxsTDe9uQDWxJe7M74X7m+5wpEHm+i+s9hwo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# gdk-pixbuf-csource no longer supports bmp so convert to png
|
||||
# patch GNUMakefile to use graphicsmagick to convert bmp -> png
|
||||
./convert-bmp-to-png.diff
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
flac
|
||||
libvorbis
|
||||
|
Loading…
Reference in New Issue
Block a user