Skip to contentSkip to conversation

Fix implicit dependencies in cairo

PATCH In review Joshua Lock 3 participants 5 messages May 15, 2015

lore
Share & tools
lore
#0 lore raw

cover Fix implicit dependencies in cairo

The following changes since commit 90861b8908d254154f4d1d613471070df8013da8:

base: Avoid find race (2015-05-14 15:22:42 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib joshuagl/cairo
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=joshuagl/cairo

Joshua Lock (1):
cairo: make xlib and libxcb dependencies explicit

 meta/recipes-graphics/cairo/cairo.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.4.0
#1 lore raw

PATCH 1/1 cairo: make xlib and libxcb dependencies explicit

---
 meta/recipes-graphics/cairo/cairo.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/cairo/cairo.inc +4 -2
index 98add5a..1e45318 100644
@@ -17,9 +17,11 @@ LICENSE_${PN}-perf-utils = "GPLv3+"
 X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
            ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
-PACKAGECONFIG[x11] = "--with-x=yes,--without-x,${X11DEPENDS}"
+
+PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
+PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
 PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
 PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
 PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
Signature · 1 line
2.4.0
#2 lore raw

Re: [PATCH 1/1] cairo: make xlib and libxcb dependencies explicit

Hi Joshua,

Quoted 10 lines · Joshua Lock
---
 meta/recipes-graphics/cairo/cairo.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/cairo/cairo.inc +0 -0
index 98add5a..1e45318 100644

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+" · line 24

Quoted 10 lines
meta/recipes-graphics/cairo/cairo.inc +4 -2
@@ -17,9 +17,11 @@ LICENSE_${PN}-perf-utils = "GPLv3+"
 X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
            ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
-PACKAGECONFIG[x11] = "--with-x=yes,--without-x,${X11DEPENDS}"
+
+PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
+PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"

your patch adds a dependency on xcb by default, which you didn't mention.

Cairo has more floating dependencies. I have a similar but more complete patch which I haven't tested on master yet. See below.

Regards,
Andreas

From 1a1057b89c7c7d5ebd7087ac9a2cba98bb183ec0 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <[email protected]>
Date: Fri, 27 Mar 2015 23:23:01 +0100
Subject: [PATCH] cairo: improve packageconfig options

Fixes floating dependencies on various x11 libs and directfb.

---
 meta/recipes-graphics/cairo/cairo.inc | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
meta/recipes-graphics/cairo/cairo.inc +8 -5
index cd37559..fd217e6 100644
@@ -10,16 +10,19 @@ HOMEPAGE = "http://cairographics.org"
 BUGTRACKER = "http://bugs.freedesktop.org"
 SECTION = "libs"
 LICENSE = "MPL-1 & LGPLv2.1"
-X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xlib xlib-xrender', '', d)} \
            ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
-PACKAGECONFIG[x11] = "--with-x=yes,--without-x,${X11DEPENDS}"
-PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
-PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
+PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb"
 PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
 PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
+PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
+PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
+PACKAGECONFIG[xcb-shm] = "--enable-xcb-shm,--disable-xcb-shm,libxcb"
+PACKAGECONFIG[xlib-xcb] = "--enable-xlib-xcb,--disable-xlib-xcb,virtual/libx11"
+PACKAGECONFIG[xlib] = "--enable-xlib,--disable-xlib,virtual/libx11 libxext"
+PACKAGECONFIG[xlib-xrender] = "--enable-xlib-xrender,--disable-xlib-xrender,libxrender"
 
 #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points 
 require cairo-fpu.inc
Signature · 1 line
1.9.1
#3 lore raw

Re: [PATCH 1/1] cairo: make xlib and libxcb dependencies explicit

Quoted 3 lines · Andreas Oberritter

your patch adds a dependency on xcb by default, which you didn't mention.

Considering libx11 depends on xcb, this is in practise enabled by default.

I'll take Josh's patch, but extending Cairo's detection would be good. I'm not sure I agree with splitting the X11 packageconfigs to finely - in practise everyone using libx11 will want shm/render enabled too.

Ross

#4 lore raw

Re: [PATCH 1/1] cairo: make xlib and libxcb dependencies explicit

In reply to Andreas Oberritter

Hi Andreas,

Quoted 16 lines · Andreas Oberritter

Hi Joshua,

Quoted 13 lines · Joshua Lock
---
  meta/recipes-graphics/cairo/cairo.inc | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/cairo/cairo.inc +0 -0
index 98add5a..1e45318 100644
@@ -17,9 +17,11 @@ LICENSE_${PN}-perf-utils = "GPLv3+"
  X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
Quoted 10 lines

meta/recipes-graphics/cairo/cairo.inc HOMEPAGE = "http://cairographics.org" · line 21

Quoted 7 lines
meta/recipes-graphics/cairo/cairo.inc +4 -2
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
             ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
-PACKAGECONFIG[x11] = "--with-x=yes,--without-x,${X11DEPENDS}"
+
+PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
+PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"

your patch adds a dependency on xcb by default, which you didn't mention.

That's true, however I believe xcb is picked up in a default build of the current recipe (by virtue of it being a dependency of libx11) and thus I included it in the default PACKAGECONFIG so as to make current behaviour explicit.

Quoted 2 lines

Cairo has more floating dependencies. I have a similar but more complete patch which I haven't tested on master yet. See below.

That is indeed a more complete fix, I'd be happy to see it land instead of my proposed change.

Regards,

Joshua