mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC] inkscape 1.0 issue
@ 2020-06-01 22:20 Antony Pavlov
  2020-06-02  7:51 ` Sascha Hauer
  0 siblings, 1 reply; 5+ messages in thread
From: Antony Pavlov @ 2020-06-01 22:20 UTC (permalink / raw)
  To: barebox

Hi All!

I can't build barebox with inkscape-1.0 anymore.
Some command line options were changed, e.g.

make V=1
...
  ( inkscape -z "-w 64" -e lib/logo/barebox-logo-w64.bblogo /home/builduser/barebox/Documentation/barebox.svg > /dev/null; )
Unable to init server: Could not connect: Connection refused
Unknown option -z

make V=1
...
  ( DISPLAY="" inkscape "-w 64" -e lib/logo/barebox-logo-w64.bblogo /home/builduser/barebox/Documentation/barebox.svg > /dev/null; )
Unable to init server: Could not connect: Connection refused
Cannot parse integer value ?-e? for -w

make V=1
...
  ( DISPLAY="" inkscape --export-width=64 -e lib/logo/barebox-logo-w64.bblogo /home/builduser/barebox/Documentation/barebox.svg > /dev/null; )
Unable to init server: Could not connect: Connection refused
Unknown option -e

I have succeded with compiling barebox with inkscape-1.0, see patch below.
Alas! My patch makes it impossible to use pre-1.0 inkscape (e.g. Inkscape 0.92.4
I used before).

Any suggestion?


diff --git a/lib/logo/Makefile b/lib/logo/Makefile
index eb7aee080e..8c81447df7 100644
--- a/lib/logo/Makefile
+++ b/lib/logo/Makefile
@@ -1,17 +1,17 @@
 
-OPTS_barebox-logo-w64.bblogo="-w 64"
+OPTS_barebox-logo-w64.bblogo = --export-width=64
 bblogo-$(CONFIG_BAREBOX_LOGO_64) += barebox-logo-w64
 
-OPTS_barebox-logo-w240.bblogo="-w 240"
+OPTS_barebox-logo-w240.bblogo = --export-width=240
 bblogo-$(CONFIG_BAREBOX_LOGO_240) += barebox-logo-w240
 
-OPTS_barebox-logo-w320.bblogo="-w 320"
+OPTS_barebox-logo-w320.bblogo = --export-width=320
 bblogo-$(CONFIG_BAREBOX_LOGO_320) += barebox-logo-w320
 
-OPTS_barebox-logo-w400.bblogo="-w 400"
+OPTS_barebox-logo-w400.bblogo = --export-width=400
 bblogo-$(CONFIG_BAREBOX_LOGO_400) += barebox-logo-w400
 
-OPTS_barebox-logo-w640.bblogo="-w 640"
+OPTS_barebox-logo-w640.bblogo = --export-width=640
 bblogo-$(CONFIG_BAREBOX_LOGO_640) += barebox-logo-w640
 
 obj-y += $(patsubst %,%.bblogo.o,$(bblogo-y))
@@ -41,7 +41,8 @@ cmd_logo_S =							\
 quiet_cmd_logo = LOGO.S   $@
 cmd_logo =							\
 (								\
-	inkscape -z $(OPTS_$(@F)) -e $@ $< > /dev/null;		\
+	DISPLAY="" inkscape $(OPTS_$(@F)) --export-type=png $< > /dev/null; \
+	mv $(patsubst %.svg,%.png,$<) $@; \
 )
 
 %.bblogo: $(srctree)/Documentation/barebox.svg FORCE


-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] inkscape 1.0 issue
  2020-06-01 22:20 [RFC] inkscape 1.0 issue Antony Pavlov
@ 2020-06-02  7:51 ` Sascha Hauer
  2020-06-02 12:48   ` Antony Pavlov
  0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2020-06-02  7:51 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

Hi Antony,

On Tue, Jun 02, 2020 at 01:20:35AM +0300, Antony Pavlov wrote:
> 
> diff --git a/lib/logo/Makefile b/lib/logo/Makefile
> index eb7aee080e..8c81447df7 100644
> --- a/lib/logo/Makefile
> +++ b/lib/logo/Makefile
> @@ -1,17 +1,17 @@
>  
> -OPTS_barebox-logo-w64.bblogo="-w 64"
> +OPTS_barebox-logo-w64.bblogo = --export-width=64
>  bblogo-$(CONFIG_BAREBOX_LOGO_64) += barebox-logo-w64

according to the man page --export-width=64 is supported by 0.92.4 as
well, so we could change this part unconditionally.

> @@ -41,7 +41,8 @@ cmd_logo_S =							\
>  quiet_cmd_logo = LOGO.S   $@
>  cmd_logo =							\
>  (								\
> -	inkscape -z $(OPTS_$(@F)) -e $@ $< > /dev/null;		\
> +	DISPLAY="" inkscape $(OPTS_$(@F)) --export-type=png $< > /dev/null; \
> +	mv $(patsubst %.svg,%.png,$<) $@; \

Inkscape-1.0 supports "-o -" and pre Inkscape-1.0 supports "-e -", we
could use this to do without the mv in both cases.

DISPLAY="" shouldn't hurt on pre Inkscape-1.0. as well.

This leaves '-z' and -e vs. --export-type=png. Something like this should work:

INKSCAPEOPTS += $(call try-run, inkscape -z,-z,)
INKSCAPEOPTS += $(call try-run, inkscape -e,-e,--export_type=png)

Regards,
 Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] inkscape 1.0 issue
  2020-06-02  7:51 ` Sascha Hauer
@ 2020-06-02 12:48   ` Antony Pavlov
  2020-06-03  6:23     ` Sascha Hauer
  0 siblings, 1 reply; 5+ messages in thread
From: Antony Pavlov @ 2020-06-02 12:48 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Tue, 2 Jun 2020 09:51:28 +0200
Sascha Hauer <s.hauer@pengutronix.de> wrote:

> Hi Antony,
> 
> On Tue, Jun 02, 2020 at 01:20:35AM +0300, Antony Pavlov wrote:
> > 
> > diff --git a/lib/logo/Makefile b/lib/logo/Makefile
> > index eb7aee080e..8c81447df7 100644
> > --- a/lib/logo/Makefile
> > +++ b/lib/logo/Makefile
> > @@ -1,17 +1,17 @@
> >  
> > -OPTS_barebox-logo-w64.bblogo="-w 64"
> > +OPTS_barebox-logo-w64.bblogo = --export-width=64
> >  bblogo-$(CONFIG_BAREBOX_LOGO_64) += barebox-logo-w64
> 
> according to the man page --export-width=64 is supported by 0.92.4 as
> well, so we could change this part unconditionally.
> 
> > @@ -41,7 +41,8 @@ cmd_logo_S =							\
> >  quiet_cmd_logo = LOGO.S   $@
> >  cmd_logo =							\
> >  (								\
> > -	inkscape -z $(OPTS_$(@F)) -e $@ $< > /dev/null;		\
> > +	DISPLAY="" inkscape $(OPTS_$(@F)) --export-type=png $< > /dev/null; \
> > +	mv $(patsubst %.svg,%.png,$<) $@; \
> 
> Inkscape-1.0 supports "-o -" and pre Inkscape-1.0 supports "-e -", we
> could use this to do without the mv in both cases.
> 
> DISPLAY="" shouldn't hurt on pre Inkscape-1.0. as well.
> 
> This leaves '-z' and -e vs. --export-type=png. Something like this should work:
> 
> INKSCAPEOPTS += $(call try-run, inkscape -z,-z,)
> INKSCAPEOPTS += $(call try-run, inkscape -e,-e,--export_type=png)
> 

Can we move all inkscape-related stuff into separate svg2bblogo.sh script
and just call script from makefile?

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] inkscape 1.0 issue
  2020-06-02 12:48   ` Antony Pavlov
@ 2020-06-03  6:23     ` Sascha Hauer
  2020-06-03 10:19       ` Daniel Glöckner
  0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2020-06-03  6:23 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Tue, Jun 02, 2020 at 03:48:58PM +0300, Antony Pavlov wrote:
> On Tue, 2 Jun 2020 09:51:28 +0200
> Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > Hi Antony,
> > 
> > On Tue, Jun 02, 2020 at 01:20:35AM +0300, Antony Pavlov wrote:
> > > 
> > > diff --git a/lib/logo/Makefile b/lib/logo/Makefile
> > > index eb7aee080e..8c81447df7 100644
> > > --- a/lib/logo/Makefile
> > > +++ b/lib/logo/Makefile
> > > @@ -1,17 +1,17 @@
> > >  
> > > -OPTS_barebox-logo-w64.bblogo="-w 64"
> > > +OPTS_barebox-logo-w64.bblogo = --export-width=64
> > >  bblogo-$(CONFIG_BAREBOX_LOGO_64) += barebox-logo-w64
> > 
> > according to the man page --export-width=64 is supported by 0.92.4 as
> > well, so we could change this part unconditionally.
> > 
> > > @@ -41,7 +41,8 @@ cmd_logo_S =							\
> > >  quiet_cmd_logo = LOGO.S   $@
> > >  cmd_logo =							\
> > >  (								\
> > > -	inkscape -z $(OPTS_$(@F)) -e $@ $< > /dev/null;		\
> > > +	DISPLAY="" inkscape $(OPTS_$(@F)) --export-type=png $< > /dev/null; \
> > > +	mv $(patsubst %.svg,%.png,$<) $@; \
> > 
> > Inkscape-1.0 supports "-o -" and pre Inkscape-1.0 supports "-e -", we
> > could use this to do without the mv in both cases.
> > 
> > DISPLAY="" shouldn't hurt on pre Inkscape-1.0. as well.
> > 
> > This leaves '-z' and -e vs. --export-type=png. Something like this should work:
> > 
> > INKSCAPEOPTS += $(call try-run, inkscape -z,-z,)
> > INKSCAPEOPTS += $(call try-run, inkscape -e,-e,--export_type=png)
> > 
> 
> Can we move all inkscape-related stuff into separate svg2bblogo.sh script
> and just call script from makefile?

We probably could, but what would be the advantage? Embedding too much
shell in Makefile makes things harder to understand, but I don't think
this case already falls into that category.

Regards,
  Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] inkscape 1.0 issue
  2020-06-03  6:23     ` Sascha Hauer
@ 2020-06-03 10:19       ` Daniel Glöckner
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Glöckner @ 2020-06-03 10:19 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Wed, Jun 03, 2020 at 08:23:36AM +0200, Sascha Hauer wrote:
> On Tue, Jun 02, 2020 at 03:48:58PM +0300, Antony Pavlov wrote:
> > Can we move all inkscape-related stuff into separate svg2bblogo.sh script
> > and just call script from makefile?
> 
> We probably could, but what would be the advantage?

We could fall back to rsvg-convert.

Best regards,

  Daniel

-- 
Dipl.-Math. Daniel Glöckner, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11,
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke
Ust-IdNr.: DE 205 198 055

emlix - your embedded linux partner

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-03 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 22:20 [RFC] inkscape 1.0 issue Antony Pavlov
2020-06-02  7:51 ` Sascha Hauer
2020-06-02 12:48   ` Antony Pavlov
2020-06-03  6:23     ` Sascha Hauer
2020-06-03 10:19       ` Daniel Glöckner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox