eba5e89a17c29275519ad22978841e4c7752aa5b
1 # This is free and unencumbered software released into the public
2 # domain. To the extent possible under law, the author of this file
3 # waives all copyright and related or neighboring rights to it.
12 # First: xcf2png by default calls zcat rather than gzcat. This is
13 # totally always broken; zcat forces a .Z extension on its input
14 # filename. So we can't rely on xcf2png's default behavior. But it
15 # offers -Z for a custom decompression program.
17 # BUT: Gimp produces gz files with some padding zeros because, I don't
18 # know, someone might want to save their compressed xcfs to DECtape.
19 # gzip has a -q option to not *print* the warning associated with this
20 # harmless thing, but then goes ahead and exits non-zero anyway, which
21 # makes xcf2png barf and die before writing anything even though it
22 # got perfectly good data.
24 # So: 1) use gunzip, 2) manually feed it to xcf2png, 3) hope nothing is
25 # set to die based on pipe status, 4) hope that if the xcf data is
26 # actually busted xcf2png will do something helpful.
28 gunzip
-c
$< |
$(XCF2PNG
) - > $@
32 ICONUTIL ?
= $(firstword $(shell command
-v iconutil icnsutil
) iconutil
)
34 %.icns
: %.iconset
$$(wildcard $$(@D
)/$$*.iconset
/icon_
*.png
)
35 $(ICONUTIL
) -c icns
-o
$@
$<
37 %.ico
: %.iconset
$$(wildcard $$(@D
)/$$*.iconset
/icon_
*[0-9].png
)
38 convert
-background transparent
-colors
256 $(filter-out $<,$^
) $@