Skip to contentSkip to conversation

package/librsvg: optionally build the SVG GDK pixbuf plugin

PATCH New Thomas Lorblanchès 2 participants 3 messages Sep 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/librsvg: optionally build the SVG GDK pixbuf plugin

Enable generation of libpixbufloader-svg.so if gdk-pixbuf is enabled

---
 package/librsvg/librsvg.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/librsvg/librsvg.mk +4 -1
index 4f563ce6db..746b339bdd 100644
@@ -9,7 +9,10 @@ LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).20
 LIBRSVG_SITE = http://ftp.gnome.org/pub/gnome/sources/librsvg/$(LIBRSVG_VERSION_MAJOR)
 LIBRSVG_SOURCE = librsvg-$(LIBRSVG_VERSION).tar.xz
 LIBRSVG_INSTALL_STAGING = YES
-LIBRSVG_CONF_OPTS = --disable-pixbuf-loader --disable-tools --enable-introspection=no
+LIBRSVG_CONF_OPTS = --disable-tools --enable-introspection=no
+ifneq ($(BR2_PACKAGE_GDK_PIXBUF),y)
+LIBRSVG_CONF_OPTS += --disable-pixbuf-loader
+endif
 HOST_LIBRSVG_CONF_OPTS = --enable-introspection=no
 LIBRSVG_DEPENDENCIES = cairo host-gdk-pixbuf gdk-pixbuf libcroco libglib2 libxml2 pango \
 	$(if $(BR2_PACKAGE_LIBGTK3),libgtk3)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 package/librsvg: optionally build the SVG GDK pixbuf plugin

Thomas, All,

On 2019-09-25 19:27 +0000, Thomas Lorblanch?s spake thusly:

Quoted 1 line

Enable generation of libpixbufloader-svg.so if gdk-pixbuf is enabled

Thank you for following up with this patch after our IRC discussion. :-)

Quoted 10 lines
---
 package/librsvg/librsvg.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/librsvg/librsvg.mk +0 -0
index 4f563ce6db..746b339bdd 100644

package/librsvg/librsvg.mk LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).20 · line 15

Quoted 8 lines
package/librsvg/librsvg.mk +4 -1
@@ -9,7 +9,10 @@ LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).20
 LIBRSVG_SITE = http://ftp.gnome.org/pub/gnome/sources/librsvg/$(LIBRSVG_VERSION_MAJOR)
 LIBRSVG_SOURCE = librsvg-$(LIBRSVG_VERSION).tar.xz
 LIBRSVG_INSTALL_STAGING = YES
-LIBRSVG_CONF_OPTS = --disable-pixbuf-loader --disable-tools --enable-introspection=no
+LIBRSVG_CONF_OPTS = --disable-tools --enable-introspection=no
+ifneq ($(BR2_PACKAGE_GDK_PIXBUF),y)
+LIBRSVG_CONF_OPTS += --disable-pixbuf-loader
+endif

Usually, we prefer positive logic (when possible), and we also prefer that the disabling and enabling both be explicit. Also, you have to ensure the build order with a proper:

    ifeq ($(BR2_PACKAGE_GDK_PIXBUF),y)
    LIBRSVG_DEPENDENCIES += gdk-pixbuf
    LIBRSVG_CONF_OPTS += --enable-pixbuf-loader
    else
    LIBRSVG_CONF_OPTS += --disable-pixbuf-loader
    endif

However, in this case, gdk-pixbuf is always enabled when librsvg is, because librsvg select gdb-pixbuf:

https://git.buildroot.org/buildroot/tree/package/librsvg/Config.in#n11

So your change means that gdk-pixbuf-loader can never be disabled.

Furthermore, it seems gdk-pixbuf-loader was explicitly disabled in 7372c80cc (package/librsvg: disable gdk-pixbuf-loader) because it failed to build. Can you confirm this is now fixed?

package/librsvg/librsvg.mk LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).20 · line 17

Quoted 2 lines
package/librsvg/librsvg.mk +0 -0
 HOST_LIBRSVG_CONF_OPTS = --enable-introspection=no
 LIBRSVG_DEPENDENCIES = cairo host-gdk-pixbuf gdk-pixbuf libcroco libglib2 libxml2 pango \

Note that you would have to remove gdk-pixbuf from that line, if it is only needed for gdk-pixbuf-loader.

Regards,
Yann E. MORIN.

Quoted 7 lines
package/librsvg/librsvg.mk +0 -0
 	$(if $(BR2_PACKAGE_LIBGTK3),libgtk3)
Signature · 5 lines
2.11.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

Thanks for your remarks Yann.
I didn't notice that librsvg selects gdk-pixbuf, so I have to rework this patch (I'm a newbie here, sorry for my mistakes). I'll try to understand why librsvg selects gdk-pixbuf, because it is strange to do so if the pixbuf plugin is not even built (I think this dependency should have been dropped in 7372c80cc). Another way would be to add an explicit option to enable the build of the pixbuf plugin. According to 7372c80cc (package/librsvg: disable gdk-pixbuf-loader) the build is broken when host<>target arch, but I only tested it on host=target=x86_64, so I didn't notice the problem).

Regards
Thomas

-------- Message original --------
Objet : Re: [Buildroot] [PATCH 1/1] package/librsvg: optionally build the SVG GDK pixbuf plugin De : "Yann E. MORIN"
? : Thomas Lorblanch?s
Cc : buildroot at buildroot.org," fontaine.fabrice at gmail.com"

Thomas, All,

On 2019-09-25 19:27 +0000, Thomas Lorblanch?s spake thusly:

Quoted 1 line

Enable generation of libpixbufloader-svg.so if gdk-pixbuf is enabled

Thank you for following up with this patch after our IRC discussion. :-)

Quoted 13 lines
Signed-off-by Thomas Lorblanch?s

---
package/librsvg/librsvg.mk | 5 ++++-

1 file changed, 4 insertions(+), 1 deletion(-)
package/librsvg/librsvg.mk +0 -0
index 4f563ce6db..746b339bdd 100644
@@ -9,7 +9,10 @@ LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).20
 LIBRSVG_SITE = http://ftp.gnome.org/pub/gnome/sources/librsvg/$(LIBRSVG_VERSION_MAJOR)

LIBRSVG_SOURCE = librsvg-$(LIBRSVG_VERSION).tar.xz LIBRSVG_INSTALL_STAGING = YES

package/librsvg/librsvg.mk LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).20 · line 15

Quoted 5 lines
package/librsvg/librsvg.mk +4 -1
-LIBRSVG_CONF_OPTS = --disable-pixbuf-loader --disable-tools --enable-introspection=no
+LIBRSVG_CONF_OPTS = --disable-tools --enable-introspection=no
+ifneq ($(BR2_PACKAGE_GDK_PIXBUF),y)
+LIBRSVG_CONF_OPTS += --disable-pixbuf-loader
+endif

Usually, we prefer positive logic (when possible), and we also prefer that the disabling and enabling both be explicit. Also, you have to ensure the build order with a proper:

ifeq ($(BR2_PACKAGE_GDK_PIXBUF),y)
LIBRSVG_DEPENDENCIES += gdk-pixbuf
LIBRSVG_CONF_OPTS += --enable-pixbuf-loader
else
LIBRSVG_CONF_OPTS += --disable-pixbuf-loader
endif

However, in this case, gdk-pixbuf is always enabled when librsvg is, because librsvg select gdb-pixbuf:

https://git.buildroot.org/buildroot/tree/package/librsvg/Config.in#n11

So your change means that gdk-pixbuf-loader can never be disabled.

Furthermore, it seems gdk-pixbuf-loader was explicitly disabled in 7372c80cc (package/librsvg: disable gdk-pixbuf-loader) because it failed to build. Can you confirm this is now fixed?

Quoted 2 lines

HOST_LIBRSVG_CONF_OPTS = --enable-introspection=no
LIBRSVG_DEPENDENCIES = cairo host-gdk-pixbuf gdk-pixbuf libcroco libglib2 libxml2 pango \

Note that you would have to remove gdk-pixbuf from that line, if it is only needed for gdk-pixbuf-loader.

Regards,
Yann E. MORIN.

Quoted 7 lines

$(if $(BR2_PACKAGE_LIBGTK3),libgtk3)
--
2.11.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |

'------------------------------^-------^------------------^--------------------' -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190925/578836e3/attachment.html>