libdrm: Explicitly disable the cairo dependency
PATCH 1/1 libdrm: Explicitly disable the cairo dependency
We don't want the cairo dependency. Unfortunately simply checking whether its present isn't good enough. If its not in DEPENDS, it can disappear half way through building. We therefore need to explicitly disable it.
---
meta/recipes-graphics/drm/libdrm.inc +2 -0
@@ -18,6 +18,8 @@ DEPENDS += " libpciaccess" inherit autotools pkgconfig +EXTRA_OECONF += "--disable-cairo" + PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-kms" FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode*" FILES_${PN}-drivers = "${libdir}/libdrm_*.so.*"
meta/recipes-graphics/drm/libdrm/nocairo.patch renamed from dev/null +39 -0
@@ -0,0 +1,39 @@ +We don't want the cairo dependency. Unfortunately simply checking whether its present +isn't good enough. If its not in DEPENDS, it can disappear half way through building. +We therefore need to explictly disable it. + +RP +2012/10/5 + +Index: libdrm-2.4.39/configure.ac +=================================================================== +--- libdrm-2.4.39.orig/configure.ac 2012-08-24 14:54:42.000000000 +0000 ++++ libdrm-2.4.39/configure.ac 2012-10-05 11:37:52.484821221 +0000 +@@ -63,6 +63,11 @@ + [Disable KMS mm abstraction library (default: auto)]), + [LIBKMS=$enableval], [LIBKMS=auto]) + ++AC_ARG_ENABLE(cairo, ++ AS_HELP_STRING([--disable-cairo], ++ [Disable cairo (default: auto)]), ++ [ENABLECAIRO=$enableval], [ENABLECAIRO=auto]) ++ + AC_ARG_ENABLE(intel, + AS_HELP_STRING([--disable-intel], + [Enable support for intel's KMS API (default: auto)]), +@@ -201,9 +206,12 @@ + AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support]) + fi + +-PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) +-if test "x$HAVE_CAIRO" = xyes; then +- AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) ++HAVE_CAIRO=no ++if test "x$ENABLECAIRO" = xyes; then ++ PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) ++ if test "x$HAVE_CAIRO" = xyes; then ++ AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) ++ fi + fi + AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes]) +
meta/recipes-graphics/drm/libdrm_2.4.39.bb +1 -0
@@ -4,6 +4,7 @@ PR = "${INC_PR}.0" SRC_URI += "file://installtests.patch \ file://GNU_SOURCE_definition.patch \ + file://nocairo.patch \ " SRC_URI[md5sum] = "9a299e021d81bab6c82307582c78319d"
Quoted 6 lines · Richard Purdie
meta/recipes-graphics/drm/libdrm/nocairo.patch renamed from dev/null +0
-0
meta/recipes-graphics/drm/libdrm/nocairo.patch line 8
Quoted 8 lines
meta/recipes-graphics/drm/libdrm/nocairo.patch renamed from dev/null +8
-0@@ -0,0 +1,39 @@ +We don't want the cairo dependency. Unfortunately simply checking whether its present +isn't good enough. If its not in DEPENDS, it can disappear half way through building. +We therefore need to explictly disable it. + +RP +2012/10/5 + +Index: libdrm-2.4.39/configure.ac
This new patch seems to be missing Upstream-Status and Signed-off-by.
p.
Quoted 17 lines · Phil Blundell
Quoted 6 lines · Richard Purdie
meta/recipes-graphics/drm/libdrm/nocairo.patch renamed from dev/null +0
-0meta/recipes-graphics/drm/libdrm/nocairo.patch line 8
Quoted 8 lines
meta/recipes-graphics/drm/libdrm/nocairo.patch renamed from dev/null +8
-0@@ -0,0 +1,39 @@ +We don't want the cairo dependency. Unfortunately simply checking whether its present +isn't good enough. If its not in DEPENDS, it can disappear half way through building. +We therefore need to explictly disable it. + +RP +2012/10/5 + +Index: libdrm-2.4.39/configure.acThis new patch seems to be missing Upstream-Status and Signed-off-by.
The rule is that it has author information which I did include. Admittedly "RP" is a little cryptic but I think people can figure it out by now and its an established convention for me by now. I've questioned the rational of Signed-off-by in this context before but it seems people find it easier and it doesn't particularly bother me...
As for the Upstream-Status, I should have included that and will add it, thanks.
Richard
Quoted 5 lines · Richard Purdie
We don't want the cairo dependency. Unfortunately simply checking whether its present isn't good enough. If its not in DEPENDS, it can disappear half way through building. We therefore need to explicitly disable it.
Signed-off-by Richard Purdie <[email protected]>
Richard,
Please use the Upstream-Status field in the patch so it is easier to track later.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
Hi Richard,
Quoted 5 lines · Richard Purdie
We don't want the cairo dependency. Unfortunately simply checking whether its present isn't good enough. If its not in DEPENDS, it can disappear half way through building. We therefore need to explicitly disable it.
Signed-off-by Richard Purdie <[email protected]>
I've done roughly the same thing in this commit:
http://cgit.collabora.com/git/user/daniels/poky.git/commit/?id=96a6e8e9eb7c086be3fcbde6a38ac3b699fca008
which has already been submitted upstream:
http://lists.freedesktop.org/archives/dri-devel/2012-October/028514.html
Cheers,
Daniel
Quoted 11 lines · Daniel Stone
Quoted 3 lines · Richard Purdie
We don't want the cairo dependency. Unfortunately simply checking whether its present isn't good enough. If its not in DEPENDS, it can disappear half way through building. We therefore need to explicitly disable it.
I've done roughly the same thing in this commit:
http://cgit.collabora.com/git/user/daniels/poky.git/commit/?id=96a6e8e9eb7c086be3fcbde6a38ac3b699fca008which has already been submitted upstream:
http://lists.freedesktop.org/archives/dri-devel/2012-October/028514.html
My patch also has the advantage of not trying to link against Cairo if it's present but disabled. Without this, if you build libdrm, build Cairo, clean libdrm and attempt to rebuild it again, the rebuild will fail, because the test still attempts to link with -lcairo, which fails as Cairo's .la file references libdrm.
Cheers,
Daniel
Quoted 7 lines · Daniel Stone
Quoted 6 lines · Daniel Stone
Quoted 3 lines · Richard Purdie
We don't want the cairo dependency. Unfortunately simply checking whether its present isn't good enough. If its not in DEPENDS, it can disappear half way through building. We therefore need to explicitly disable it.
Quoted 5 lines
Quoted 5 lines
I've done roughly the same thing in this commit:
http://cgit.collabora.com/git/user/daniels/poky.git/commit/?id=96a6e8e9eb7c086be3fcbde6a38ac3b699fca008which has already been submitted upstream:
http://lists.freedesktop.org/archives/dri-devel/2012-October/028514.html
Thanks for that, sending something upstream was on my todo list but I needed to fix the breaking builds more urgently.
Quoted 5 lines
My patch also has the advantage of not trying to link against Cairo if it's present but disabled. Without this, if you build libdrm, build Cairo, clean libdrm and attempt to rebuild it again, the rebuild will fail, because the test still attempts to link with -lcairo, which fails as Cairo's .la file references libdrm.
I'm assuming you mean libdrm's .la file references cario?
Since I pass in --disable-cairo, it never runs the pkgconfig test for cairo and never puts the include/library options into play. I did test that and just retested and it doesn't reference it.
Cheers,
Richard
Hi,
Quoted 6 lines · Richard Purdie
Quoted 2 lines · Daniel Stone
Quoted 2 lines
which has already been submitted upstream:
http://lists.freedesktop.org/archives/dri-devel/2012-October/028514.htmlThanks for that, sending something upstream was on my todo list but I needed to fix the breaking builds more urgently.
Understandable - happily the patch has already merged. There's a patchset in git://git.collabora.com/~daniels/poky which reverts your original patch, adds a new patch for 2.4.39 with the backport of the upstream patch, and bumps the git SRCREV to one with this patch already merged. Should I submit this to the Yocto list? (I'm told that submitting Poky patches to oe-core is the worst kind of error.)
Cheers,
Daniel
Quoted 11 lines · Daniel Stone
Hi,
Quoted 6 lines · Richard Purdie
Quoted 2 lines · Daniel Stone
Quoted 2 lines
which has already been submitted upstream:
http://lists.freedesktop.org/archives/dri-devel/2012-October/028514.htmlThanks for that, sending something upstream was on my todo list but I needed to fix the breaking builds more urgently.
Quoted 6 lines
Understandable - happily the patch has already merged. There's a patchset in
git://git.collabora.com/~daniels/pokywhich reverts your original patch, adds a new patch for 2.4.39 with the backport of the upstream patch, and bumps the git SRCREV to one with this patch already merged. Should I submit this to the Yocto list? (I'm told that submitting Poky patches to oe-core is the worst kind of error.)
Please do send the patch. It likely won't go into the release branch as I'm trying not to make more changes there than we have to but will make it into master, if not this instant, shortly.
Cheers,
Richard
PATCH 1/3 Revert "libdrm: Explicitly disable the cairo dependency"
A better patch has already been pushed upstream.
This reverts commit 7f4a8dd914e35c2eaaba7bd953273d10a94d85eb.
--- meta/recipes-graphics/drm/libdrm.inc | 2 -- meta/recipes-graphics/drm/libdrm/nocairo.patch | 39 ------------------------ meta/recipes-graphics/drm/libdrm_2.4.39.bb | 1 - 3 files changed, 42 deletions(-) delete mode 100644 meta/recipes-graphics/drm/libdrm/nocairo.patch
meta/recipes-graphics/drm/libdrm.inc +0 -2
@@ -18,8 +18,6 @@ DEPENDS += " libpciaccess" inherit autotools pkgconfig -EXTRA_OECONF += "--disable-cairo" - PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-kms" FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode*" FILES_${PN}-drivers = "${libdir}/libdrm_*.so.*"
meta/recipes-graphics/drm/libdrm/nocairo.patch deleted +0 -39
@@ -1,39 +0,0 @@ -We don't want the cairo dependency. Unfortunately simply checking whether its present -isn't good enough. If its not in DEPENDS, it can disappear half way through building. -We therefore need to explictly disable it. - -RP -2012/10/5 - -Index: libdrm-2.4.39/configure.ac -=================================================================== ---- libdrm-2.4.39.orig/configure.ac 2012-08-24 14:54:42.000000000 +0000 -+++ libdrm-2.4.39/configure.ac 2012-10-05 11:37:52.484821221 +0000 -@@ -63,6 +63,11 @@ - [Disable KMS mm abstraction library (default: auto)]), - [LIBKMS=$enableval], [LIBKMS=auto]) - -+AC_ARG_ENABLE(cairo, -+ AS_HELP_STRING([--disable-cairo], -+ [Disable cairo (default: auto)]), -+ [ENABLECAIRO=$enableval], [ENABLECAIRO=auto]) -+ - AC_ARG_ENABLE(intel, - AS_HELP_STRING([--disable-intel], - [Enable support for intel's KMS API (default: auto)]), -@@ -201,9 +206,12 @@ - AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support]) - fi - --PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) --if test "x$HAVE_CAIRO" = xyes; then -- AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) -+HAVE_CAIRO=no -+if test "x$ENABLECAIRO" = xyes; then -+ PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) -+ if test "x$HAVE_CAIRO" = xyes; then -+ AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) -+ fi - fi - AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes]) -
meta/recipes-graphics/drm/libdrm_2.4.39.bb +0 -1
@@ -4,7 +4,6 @@ PR = "${INC_PR}.0" SRC_URI += "file://installtests.patch \ file://GNU_SOURCE_definition.patch \ - file://nocairo.patch \ " SRC_URI[md5sum] = "9a299e021d81bab6c82307582c78319d"
Signature · 1 line
1.7.10.4
PATCH 2/3 DRM: Bump git recipe to latest 2.4.39+ revision
--- meta/recipes-graphics/drm/libdrm_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/drm/libdrm_git.bb +2 -2
@@ -6,7 +6,7 @@ S = "${WORKDIR}/git" DEFAULT_PREFERENCE = "-1" -SRCREV = "1b1a4f0a779f7ab2ba5673b9c9fe2a37047fe765" -PV = "2.4.37+git${SRCPV}" +SRCREV = "14db948127e549ea9234e02d8e112de3871f8f9f" +PV = "2.4.39+git${SRCPV}" PR = "${INC_PR}.0"
Signature · 1 line
1.7.10.4
PATCH 3/3 DRM: Add --disable-cairo-tests switch
In reply to Daniel StoneRather than implicitly relying on Cairo being disabled through not being present, add a configure switch to forcibly disable it.
Patch backported from upstream git.
--- meta/recipes-graphics/drm/libdrm.inc | 2 + .../drm/libdrm/disable-cairo.patch | 74 ++++++++++++++++++++ meta/recipes-graphics/drm/libdrm_2.4.39.bb | 1 + 3 files changed, 77 insertions(+) create mode 100644 meta/recipes-graphics/drm/libdrm/disable-cairo.patch
meta/recipes-graphics/drm/libdrm.inc +2 -0
@@ -18,6 +18,8 @@ DEPENDS += " libpciaccess" inherit autotools pkgconfig +EXTRA_OECONF += "--disable-cairo-tests" + PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-kms" FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode*" FILES_${PN}-drivers = "${libdir}/libdrm_*.so.*"
meta/recipes-graphics/drm/libdrm/disable-cairo.patch new file +74 -0
74 lines not on this page · raw message
meta/recipes-graphics/drm/libdrm_2.4.39.bb +1 -0
@@ -4,6 +4,7 @@ PR = "${INC_PR}.0" SRC_URI += "file://installtests.patch \ file://GNU_SOURCE_definition.patch \ + file://disable-cairo.patch \ " SRC_URI[md5sum] = "9a299e021d81bab6c82307582c78319d"
Signature · 1 line
1.7.10.4