Package: kbibtex
Version: 0.8~20170819git31a77b27e8e83836e-3
Severity: normal
Tags: patch

--- Please enter the report below this line. ---
Attached patch runs the scour command on upstream's SVG, and
slightly changes the order of parameters to convert, causing
the background to be drawn transparently, correctly.
commit cbc4b23781ed9124467f9202ad87bdac9d21d13b
Author: Antonio Russo <antonio.e.ru...@gmail.com>
Date:   Mon Apr 2 17:13:56 2018 -0400

    'scour' icon svg before conversion

diff --git a/debian/control b/debian/control
index 348f8065..346a8563 100644
--- a/debian/control
+++ b/debian/control
@@ -25,8 +25,9 @@ Build-Depends: debhelper (>= 10),
                libpoppler-qt5-dev,
                libxslt1-dev,
                pkg-kde-tools (>= 0.12),
-	       imagemagick,
-	       libmagickcore-6.q16-3-extra
+               imagemagick,
+               libmagickcore-6.q16-3-extra,
+               scour
 Standards-Version: 4.1.0
 Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/kbibtex.git
 Vcs-Git: https://anonscm.debian.org/cgit/collab-maint/kbibtex.git
diff --git a/debian/rules b/debian/rules
index ced6cc38..efb7c282 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,6 +20,7 @@ export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
 ICONSSIZE ?= 8x8 16x16 22x22 24x24 32x32 36x36 42x42 48x48 64x64 72x72 96x96 128x128 192x192 256x256
 CONVERT_FLAGS ?= -background none -define filter:blur=0.75 -filter Gaussian
 CONVERT ?= convert
+SCOUR ?= scour
 
 # one ring to rule them all ...
 %:
@@ -38,14 +39,15 @@ override_dh_auto_install:
 	rm -f $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.so
 	# rebuild icons
 	rm -rf debian/tmp/usr/share/icons
+	$(SCOUR) icons/kbibtex.svg > icons/kbibtex-clean.svg
 	# build icons cache (build for each arch in order to get more testing)
 	set -e; for SIZE in $(ICONSSIZE); do \
 		mkdir -p debian/tmp/usr/share/icons/hicolor/$$SIZE/apps/ ;\
 		echo "Make icons for size $$SIZE..."; \
-		$(CONVERT) icons/kbibtex.svg \
-			   $(CONVERT_FLAGS) -resize $$SIZE \
+		$(CONVERT) $(CONVERT_FLAGS) -resize $$SIZE \
 			   -gravity center -extent $$SIZE  \
 			   +set date:create +set date:modify -define png:exclude-chunk=time  \
+			   SVG:icons/kbibtex-clean.svg \
 			   debian/tmp/usr/share/icons/hicolor/$$SIZE/apps/kbibtex.png; \
 		echo "Done"; \
 	done
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to