* [PATCH] libdrm: Explicitly disable the cairo dependency
@ 2012-10-05 11:47 Richard Purdie
2012-10-05 11:54 ` Phil Blundell
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Richard Purdie @ 2012-10-05 11:47 UTC (permalink / raw)
To: openembedded-core
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 <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/recipes-graphics/drm/libdrm.inc b/meta/recipes-graphics/drm/libdrm.inc
index cc09791..2ed9c14 100644
--- a/meta/recipes-graphics/drm/libdrm.inc
+++ b/meta/recipes-graphics/drm/libdrm.inc
@@ -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.*"
diff --git a/meta/recipes-graphics/drm/libdrm/nocairo.patch b/meta/recipes-graphics/drm/libdrm/nocairo.patch
new file mode 100644
index 0000000..f9b7f3a
--- a/dev/null
+++ b/meta/recipes-graphics/drm/libdrm/nocairo.patch
@@ -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])
+
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.39.bb b/meta/recipes-graphics/drm/libdrm_2.4.39.bb
index 4e6a8d5..cb1f7f9 100644
--- a/meta/recipes-graphics/drm/libdrm_2.4.39.bb
+++ b/meta/recipes-graphics/drm/libdrm_2.4.39.bb
@@ -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"
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] libdrm: Explicitly disable the cairo dependency
2012-10-05 11:47 [PATCH] libdrm: Explicitly disable the cairo dependency Richard Purdie
@ 2012-10-05 11:54 ` Phil Blundell
2012-10-05 13:22 ` Richard Purdie
2012-10-05 13:03 ` Otavio Salvador
2012-10-07 1:10 ` Daniel Stone
2 siblings, 1 reply; 12+ messages in thread
From: Phil Blundell @ 2012-10-05 11:54 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On Fri, 2012-10-05 at 12:47 +0100, Richard Purdie wrote:
> diff --git a/meta/recipes-graphics/drm/libdrm/nocairo.patch b/meta/recipes-graphics/drm/libdrm/nocairo.patch
> new file mode 100644
> index 0000000..f9b7f3a
> --- a/dev/null
> +++ b/meta/recipes-graphics/drm/libdrm/nocairo.patch
> @@ -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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] libdrm: Explicitly disable the cairo dependency
2012-10-05 11:47 [PATCH] libdrm: Explicitly disable the cairo dependency Richard Purdie
2012-10-05 11:54 ` Phil Blundell
@ 2012-10-05 13:03 ` Otavio Salvador
2012-10-07 1:10 ` Daniel Stone
2 siblings, 0 replies; 12+ messages in thread
From: Otavio Salvador @ 2012-10-05 13:03 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On Fri, Oct 5, 2012 at 8:47 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> 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 <richard.purdie@linuxfoundation.org>
Richard,
Please use the Upstream-Status field in the patch so it is easier to
track later.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] libdrm: Explicitly disable the cairo dependency
2012-10-05 11:54 ` Phil Blundell
@ 2012-10-05 13:22 ` Richard Purdie
0 siblings, 0 replies; 12+ messages in thread
From: Richard Purdie @ 2012-10-05 13:22 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-core
On Fri, 2012-10-05 at 12:54 +0100, Phil Blundell wrote:
> On Fri, 2012-10-05 at 12:47 +0100, Richard Purdie wrote:
> > diff --git a/meta/recipes-graphics/drm/libdrm/nocairo.patch b/meta/recipes-graphics/drm/libdrm/nocairo.patch
> > new file mode 100644
> > index 0000000..f9b7f3a
> > --- a/dev/null
> > +++ b/meta/recipes-graphics/drm/libdrm/nocairo.patch
> > @@ -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.
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] libdrm: Explicitly disable the cairo dependency
2012-10-05 11:47 [PATCH] libdrm: Explicitly disable the cairo dependency Richard Purdie
2012-10-05 11:54 ` Phil Blundell
2012-10-05 13:03 ` Otavio Salvador
@ 2012-10-07 1:10 ` Daniel Stone
2012-10-08 5:44 ` Daniel Stone
2 siblings, 1 reply; 12+ messages in thread
From: Daniel Stone @ 2012-10-07 1:10 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
Hi Richard,
On 5 October 2012 21:47, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> 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 <richard.purdie@linuxfoundation.org>
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] libdrm: Explicitly disable the cairo dependency
2012-10-07 1:10 ` Daniel Stone
@ 2012-10-08 5:44 ` Daniel Stone
2012-10-08 8:01 ` Richard Purdie
0 siblings, 1 reply; 12+ messages in thread
From: Daniel Stone @ 2012-10-08 5:44 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On 7 October 2012 12:10, Daniel Stone <daniel@fooishbar.org> wrote:
> On 5 October 2012 21:47, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>> 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=96a6e8e9eb7c086be3fcbde6a38ac3b699fca008
>
> which 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] libdrm: Explicitly disable the cairo dependency
2012-10-08 5:44 ` Daniel Stone
@ 2012-10-08 8:01 ` Richard Purdie
2012-10-08 8:32 ` Daniel Stone
0 siblings, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2012-10-08 8:01 UTC (permalink / raw)
To: Daniel Stone; +Cc: openembedded-core
On Mon, 2012-10-08 at 16:44 +1100, Daniel Stone wrote:
> On 7 October 2012 12:10, Daniel Stone <daniel@fooishbar.org> wrote:
> > On 5 October 2012 21:47, Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> >> 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=96a6e8e9eb7c086be3fcbde6a38ac3b699fca008
> >
> > which 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.
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] libdrm: Explicitly disable the cairo dependency
2012-10-08 8:01 ` Richard Purdie
@ 2012-10-08 8:32 ` Daniel Stone
2012-10-08 9:19 ` Richard Purdie
0 siblings, 1 reply; 12+ messages in thread
From: Daniel Stone @ 2012-10-08 8:32 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
Hi,
On 8 October 2012 19:01, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Mon, 2012-10-08 at 16:44 +1100, Daniel Stone wrote:
>> > which 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.
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] libdrm: Explicitly disable the cairo dependency
2012-10-08 8:32 ` Daniel Stone
@ 2012-10-08 9:19 ` Richard Purdie
2012-10-08 9:22 ` [PATCH 1/3] Revert "libdrm: Explicitly disable the cairo dependency" Daniel Stone
0 siblings, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2012-10-08 9:19 UTC (permalink / raw)
To: Daniel Stone; +Cc: openembedded-core
On Mon, 2012-10-08 at 19:32 +1100, Daniel Stone wrote:
> Hi,
>
> On 8 October 2012 19:01, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Mon, 2012-10-08 at 16:44 +1100, Daniel Stone wrote:
> >> > which 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.
>
> 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.)
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/3] Revert "libdrm: Explicitly disable the cairo dependency"
2012-10-08 9:19 ` Richard Purdie
@ 2012-10-08 9:22 ` Daniel Stone
2012-10-08 9:22 ` [PATCH 2/3] DRM: Bump git recipe to latest 2.4.39+ revision Daniel Stone
2012-10-08 9:22 ` [PATCH 3/3] DRM: Add --disable-cairo-tests switch Daniel Stone
0 siblings, 2 replies; 12+ messages in thread
From: Daniel Stone @ 2012-10-08 9:22 UTC (permalink / raw)
To: openembedded-core
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
diff --git a/meta/recipes-graphics/drm/libdrm.inc b/meta/recipes-graphics/drm/libdrm.inc
index 2ed9c14..cc09791 100644
--- a/meta/recipes-graphics/drm/libdrm.inc
+++ b/meta/recipes-graphics/drm/libdrm.inc
@@ -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.*"
diff --git a/meta/recipes-graphics/drm/libdrm/nocairo.patch b/meta/recipes-graphics/drm/libdrm/nocairo.patch
deleted file mode 100644
index f9b7f3a..0000000
--- a/meta/recipes-graphics/drm/libdrm/nocairo.patch
+++ /dev/null
@@ -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])
-
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.39.bb b/meta/recipes-graphics/drm/libdrm_2.4.39.bb
index cb1f7f9..4e6a8d5 100644
--- a/meta/recipes-graphics/drm/libdrm_2.4.39.bb
+++ b/meta/recipes-graphics/drm/libdrm_2.4.39.bb
@@ -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"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] DRM: Bump git recipe to latest 2.4.39+ revision
2012-10-08 9:22 ` [PATCH 1/3] Revert "libdrm: Explicitly disable the cairo dependency" Daniel Stone
@ 2012-10-08 9:22 ` Daniel Stone
2012-10-08 9:22 ` [PATCH 3/3] DRM: Add --disable-cairo-tests switch Daniel Stone
1 sibling, 0 replies; 12+ messages in thread
From: Daniel Stone @ 2012-10-08 9:22 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
---
meta/recipes-graphics/drm/libdrm_git.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-graphics/drm/libdrm_git.bb b/meta/recipes-graphics/drm/libdrm_git.bb
index 4f4d4f7..5d7f953 100644
--- a/meta/recipes-graphics/drm/libdrm_git.bb
+++ b/meta/recipes-graphics/drm/libdrm_git.bb
@@ -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"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/3] DRM: Add --disable-cairo-tests switch
2012-10-08 9:22 ` [PATCH 1/3] Revert "libdrm: Explicitly disable the cairo dependency" Daniel Stone
2012-10-08 9:22 ` [PATCH 2/3] DRM: Bump git recipe to latest 2.4.39+ revision Daniel Stone
@ 2012-10-08 9:22 ` Daniel Stone
1 sibling, 0 replies; 12+ messages in thread
From: Daniel Stone @ 2012-10-08 9:22 UTC (permalink / raw)
To: openembedded-core
Rather than implicitly relying on Cairo being disabled through not being
present, add a configure switch to forcibly disable it.
Patch backported from upstream git.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
---
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
diff --git a/meta/recipes-graphics/drm/libdrm.inc b/meta/recipes-graphics/drm/libdrm.inc
index cc09791..a64a5df 100644
--- a/meta/recipes-graphics/drm/libdrm.inc
+++ b/meta/recipes-graphics/drm/libdrm.inc
@@ -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.*"
diff --git a/meta/recipes-graphics/drm/libdrm/disable-cairo.patch b/meta/recipes-graphics/drm/libdrm/disable-cairo.patch
new file mode 100644
index 0000000..90e79d4
--- /dev/null
+++ b/meta/recipes-graphics/drm/libdrm/disable-cairo.patch
@@ -0,0 +1,74 @@
+commit c81d1df4926072d24b4dad1b488e618e57eff1c6
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Thu Oct 4 10:26:37 2012 +1000
+
+ configure.ac: Allow forcible disabling of Cairo support
+
+ We don't want to build libdrm tests with Cairo support under Poky, since
+ they're never used and also cause a build loop from libdrm -> cairo ->
+ mesa-dri -> libdrm.
+
+ To avoid variance in build results, introduce a --disable-cairo-tests
+ switch.
+
+ Upstream-Status: Backport
+
+ Signed-off-by: Daniel Stone <daniel@fooishbar.org>
+
+diff --git a/configure.ac b/configure.ac
+index 290362c..8c28107 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -222,11 +222,23 @@ if test "x$EXYNOS" = xyes; then
+ AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support])
+ fi
+
++AC_ARG_ENABLE([cairo-tests],
++ [AS_HELP_STRING([--enable-cairo-tests],
++ [Enable support for Cairo rendering in tests (default: auto)])],
++ [CAIRO=$enableval], [CAIRO=auto])
+ 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])
++AC_MSG_CHECKING([whether to enable Cairo tests])
++if test "x$CAIRO" = xauto; then
++ CAIRO="$HAVE_CAIRO"
+ fi
+-AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes])
++if test "x$CAIRO" = xyes; then
++ if ! test "x$HAVE_CAIRO" = xyes; then
++ AC_MSG_ERROR([Cairo support required but not present])
++ fi
++ AC_DEFINE(HAVE_CAIRO, 1, [Have Cairo support])
++fi
++AC_MSG_RESULT([$CAIRO])
++AM_CONDITIONAL(HAVE_CAIRO, [test "x$CAIRO" = xyes])
+
+ # For enumerating devices in test case
+ PKG_CHECK_MODULES(LIBUDEV, libudev, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])
+diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am
+index b5ec771..065ae13 100644
+--- a/tests/modetest/Makefile.am
++++ b/tests/modetest/Makefile.am
+@@ -1,8 +1,7 @@
+ AM_CFLAGS = \
+ -I$(top_srcdir)/include/drm \
+ -I$(top_srcdir)/libkms/ \
+- -I$(top_srcdir) \
+- $(CAIRO_CFLAGS)
++ -I$(top_srcdir)
+
+ noinst_PROGRAMS = \
+ modetest
+@@ -12,5 +11,9 @@ modetest_SOURCES = \
+
+ modetest_LDADD = \
+ $(top_builddir)/libdrm.la \
+- $(top_builddir)/libkms/libkms.la \
+- $(CAIRO_LIBS)
++ $(top_builddir)/libkms/libkms.la
++
++if HAVE_CAIRO
++AM_CFLAGS += $(CAIRO_CFLAGS)
++modetest_LDADD += $(CAIRO_LIBS)
++endif
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.39.bb b/meta/recipes-graphics/drm/libdrm_2.4.39.bb
index 4e6a8d5..f3ce2b1 100644
--- a/meta/recipes-graphics/drm/libdrm_2.4.39.bb
+++ b/meta/recipes-graphics/drm/libdrm_2.4.39.bb
@@ -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"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-10-08 9:35 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05 11:47 [PATCH] libdrm: Explicitly disable the cairo dependency Richard Purdie
2012-10-05 11:54 ` Phil Blundell
2012-10-05 13:22 ` Richard Purdie
2012-10-05 13:03 ` Otavio Salvador
2012-10-07 1:10 ` Daniel Stone
2012-10-08 5:44 ` Daniel Stone
2012-10-08 8:01 ` Richard Purdie
2012-10-08 8:32 ` Daniel Stone
2012-10-08 9:19 ` Richard Purdie
2012-10-08 9:22 ` [PATCH 1/3] Revert "libdrm: Explicitly disable the cairo dependency" Daniel Stone
2012-10-08 9:22 ` [PATCH 2/3] DRM: Bump git recipe to latest 2.4.39+ revision Daniel Stone
2012-10-08 9:22 ` [PATCH 3/3] DRM: Add --disable-cairo-tests switch Daniel Stone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox