Skip to contentSkip to conversation

logo: Makefile: fix Inkscape >= v1.0 Wayland GUI opening on LOGO.S

PATCH In review Ahmad Fatoum 2 participants 2 messages Oct 11, 2020 – Oct 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 logo: Makefile: fix Inkscape >= v1.0 Wayland GUI opening on LOGO.S

DISPLAY="" only affects X11 windows. Building sandbox_defconfig under Wayland will still result in annoying Inkscape windows being opened.

This happens due to $(call try-run, inkscape -z,-z). Inkscape v1.0 deprecates -z and it's without an effect, so Inkscape will try to create a window, which failed under x11, but succeeded under Wayland.

Fix this by always testing -z and -e together. We don't need one or the other anyway, because Inkscape v1.0, which supports neither, already uses no GUI for --export-type=png.

This makes DISPLAY="" unnecessary. So just drop it.

Tested working on Inkscape 1.0.1 and 0.92.4.

---
Cc: Antony Pavlov <[email protected]>

v1 -> v2:
- --shell behavior differs between v0.* and v1.* and it resulted in broken images on v1.*

---
 lib/logo/Makefile | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
lib/logo/Makefile +3 -5
index bf700da89b03..3d0f1c24c640 100644
@@ -38,17 +38,15 @@ cmd_logo_S =							\
 %.bblogo.S: %.bblogo FORCE
 	$(call if_changed,logo_S)
 
-# Inkscape 0.92.4 supports -z but Inkscape 1.0 doesn't
-INKSCAPEOPTS += $(call try-run, inkscape -z,-z,)
-# Inkscape 0.92.4 uses -e but Inkscape 1.0 uses --export-type=png
-INKSCAPEOPTS += $(call try-run, inkscape -e -,-e -,--export-type=png)
+# 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 -,)
 
 quiet_cmd_logo = LOGO.S   $@
 cmd_logo =							\
 (								\
-	DISPLAY="" inkscape $(OPTS_$(@F)) $(INKSCAPEOPTS) $< > $@; \
+	inkscape $(OPTS_$(@F)) $(INKSCAPEOPTS) $< > $@; \
 )
 
 %.bblogo: $(srctree)/Documentation/barebox.svg FORCE
Signature · 7 lines
2.28.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 19 lines · Ahmad Fatoum

DISPLAY="" only affects X11 windows. Building sandbox_defconfig under Wayland will still result in annoying Inkscape windows being opened.

This happens due to $(call try-run, inkscape -z,-z). Inkscape v1.0 deprecates -z and it's without an effect, so Inkscape will try to create a window, which failed under x11, but succeeded under Wayland.

Fix this by always testing -z and -e together. We don't need one or the other anyway, because Inkscape v1.0, which supports neither, already uses no GUI for --export-type=png.

This makes DISPLAY="" unnecessary. So just drop it.

Tested working on Inkscape 1.0.1 and 0.92.4.

---
Cc: Antony Pavlov <[email protected]>

Quoted 6 lines

v1 -> v2:
- --shell behavior differs between v0.* and v1.* and it resulted in broken images on v1.*

---
 lib/logo/Makefile | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

And replaced with v2.

Sascha

Quoted 35 lines
lib/logo/Makefile +3 -5
index bf700da89b03..3d0f1c24c640 100644
@@ -38,17 +38,15 @@ cmd_logo_S =							\
 %.bblogo.S: %.bblogo FORCE
 	$(call if_changed,logo_S)
 
-# Inkscape 0.92.4 supports -z but Inkscape 1.0 doesn't
-INKSCAPEOPTS += $(call try-run, inkscape -z,-z,)
-# Inkscape 0.92.4 uses -e but Inkscape 1.0 uses --export-type=png
-INKSCAPEOPTS += $(call try-run, inkscape -e -,-e -,--export-type=png)
+# 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 -,)
 
 quiet_cmd_logo = LOGO.S   $@
 cmd_logo =							\
 (								\
-	DISPLAY="" inkscape $(OPTS_$(@F)) $(INKSCAPEOPTS) $< > $@; \
+	inkscape $(OPTS_$(@F)) $(INKSCAPEOPTS) $< > $@; \
 )
 
 %.bblogo: $(srctree)/Documentation/barebox.svg FORCE
Signature · 7 lines
2.28.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox