From 6b69c5df0996ed8992f3f972e491dcbf6ca23480 Mon Sep 17 00:00:00 2001 From: Jules Maselbas Date: Thu, 7 Oct 2021 13:52:54 +0200 Subject: logo: Makefile: Replace inkscape with convert The uses of inkscape to convert svg to png hasn't been very stable from one version to another, and required quirks from one version to another. I hope that convert from imagemagick will be a more stable solution. Signed-off-by: Jules Maselbas Link: https://lore.barebox.org/20211007115254.32270-1-jmaselbas@kalray.eu Signed-off-by: Sascha Hauer --- lib/logo/Kconfig | 6 +++--- lib/logo/Makefile | 19 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) (limited to 'lib') diff --git a/lib/logo/Kconfig b/lib/logo/Kconfig index 0718053e5c..7d55f7fa27 100644 --- a/lib/logo/Kconfig +++ b/lib/logo/Kconfig @@ -1,9 +1,9 @@ menuconfig BAREBOX_LOGO bool "include barebox logos in build" help - Say yes here to build the barebox logos. This adds inkscape to the build - dependencies. The logo can be found under /logo/barebox-logo-.png - in the running barebox. + Say yes here to build the barebox logos. This adds ImageMagick's + convert tool to the build dependencies. The logo can be found under + /logo/barebox-logo-.png in the running barebox. if BAREBOX_LOGO diff --git a/lib/logo/Makefile b/lib/logo/Makefile index 4149d4ff6c..f08beef76b 100644 --- a/lib/logo/Makefile +++ b/lib/logo/Makefile @@ -1,17 +1,17 @@ -OPTS_barebox-logo-w64.bblogo = --export-width=64 +OPTS_barebox-logo-w64.bblogo = -resize 64 bblogo-$(CONFIG_BAREBOX_LOGO_64) += barebox-logo-w64 -OPTS_barebox-logo-w240.bblogo = --export-width=240 +OPTS_barebox-logo-w240.bblogo = -resize 240 bblogo-$(CONFIG_BAREBOX_LOGO_240) += barebox-logo-w240 -OPTS_barebox-logo-w320.bblogo = --export-width=320 +OPTS_barebox-logo-w320.bblogo = -resize 320 bblogo-$(CONFIG_BAREBOX_LOGO_320) += barebox-logo-w320 -OPTS_barebox-logo-w400.bblogo = --export-width=400 +OPTS_barebox-logo-w400.bblogo = -resize 400 bblogo-$(CONFIG_BAREBOX_LOGO_400) += barebox-logo-w400 -OPTS_barebox-logo-w640.bblogo = --export-width=640 +OPTS_barebox-logo-w640.bblogo = -resize 640 bblogo-$(CONFIG_BAREBOX_LOGO_640) += barebox-logo-w640 obj-y += $(patsubst %,%.bblogo.o,$(bblogo-y)) @@ -38,15 +38,12 @@ cmd_logo_S = \ %.bblogo.S: %.bblogo FORCE $(call if_changed,logo_S) -# Inkscape 0.92.4 supports -z -e but Inkscape 1.0 uses --export-type=png -INKSCAPEOPTS += $(call try-run, inkscape -z -e -,-z -e -,--export-type=png) -# Inkscape 1.0 supports -o - -INKSCAPEOPTS += $(call try-run, inkscape -o -,-o -,) +CONVERTOPTS += -background none -quiet_cmd_logo = LOGO.S $@ +quiet_cmd_logo = PNG $@ cmd_logo = \ ( \ - inkscape $(OPTS_$(@F)) $(INKSCAPEOPTS) $< > $@; \ + convert $(OPTS_$(@F)) $(CONVERTOPTS) $< png:$@; \ ) %.bblogo: $(srctree)/Documentation/barebox.svg FORCE -- cgit v1.2.3