[game-data-packager] 01/01: fallback: use ImageMagick when XCFTools are missing

Alexandre Detiste detiste-guest at moszumanska.debian.org
Fri Mar 17 21:58:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit 305fc88eb9b8fc1e115193a6a54825a0bd614d91
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Fri Mar 17 22:55:55 2017 +0100

    fallback: use ImageMagick when XCFTools are missing
    
    I used this as a basis:
    
    https://build.opensuse.org/package/view_file/home:susnux:branches:games:tools/game-data-packager/use-imagemagick.patch
---
 Makefile         | 13 +++++++++++--
 debian/changelog |  1 +
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 97cab14..8b61863 100644
--- a/Makefile
+++ b/Makefile
@@ -160,11 +160,20 @@ out/quake2-%.svg: out/tmp/recolour-%.svg out/CACHEDIR.TAG
 
 out/256/quake3.png: data/quake3-tango.xcf out/CACHEDIR.TAG
 	install -d out/256
-	xcf2png -o $@ $<
+	# fallback, result is similar, yet different
+	if command -v xcf2png > /dev/null ; then \
+	  xcf2png -o $@ $< ;\
+	else \
+	  convert $< -background rgba\(0,0,0,0\) -layers merge $@ ;\
+	fi
 
 out/256/quake3-team-arena.png: data/quake3-teamarena-tango.xcf out/CACHEDIR.TAG
 	install -d out/256
-	xcf2png -o $@ $<
+	if command -v xcf2png > /dev/null ; then \
+          xcf2png -o $@ $< ;\
+	else \
+          convert $< -background rgba\(0,0,0,0\) -layers merge $@ ;\
+	fi
 
 out/48/quake3.png: out/256/quake3.png out/CACHEDIR.TAG
 	install -d out/48
diff --git a/debian/changelog b/debian/changelog
index 96ec651..cec802f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,7 @@ game-data-packager (50) UNRELEASED; urgency=medium
     - Fix typo in TODO [nyav] (Closes: #857880)
     - Use locale 'C.UTF-8' instead of 'C' in Makefile,
       CPython will coerce it anyway (see PEP 538)
+    - Use ImageMagick as a fallback when XCFTools are missing [adetiste]
 
  -- Simon McVittie <smcv at debian.org>  Thu, 22 Dec 2016 16:43:05 +0000
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list