summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/drm
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-10-08 20:22:15 +1100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-18 12:03:26 +0100
commitfa9ccb23e5788f331cc868ce4bad4abd1eaeee9c (patch)
treed3f145ff9dc65f1f04c2d6fcf7c83a36ddce264a /meta/recipes-graphics/drm
parent14c4c1de25b73c918a7ebb074359160290e9642f (diff)
downloadopenembedded-core-contrib-fa9ccb23e5788f331cc868ce4bad4abd1eaeee9c.tar.gz
openembedded-core-contrib-fa9ccb23e5788f331cc868ce4bad4abd1eaeee9c.tar.bz2
openembedded-core-contrib-fa9ccb23e5788f331cc868ce4bad4abd1eaeee9c.zip
libdrm: Add --disable-cairo-tests switch and update to upstream patch
Rather than implicitly relying on Cairo being disabled through not being present, add a configure switch to forcibly disable it. The updates the code to use a patch backported from upstream git instead of our custom version. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/drm')
-rw-r--r--meta/recipes-graphics/drm/libdrm.inc2
-rw-r--r--meta/recipes-graphics/drm/libdrm/disable-cairo.patch74
-rw-r--r--meta/recipes-graphics/drm/libdrm/nocairo.patch39
-rw-r--r--meta/recipes-graphics/drm/libdrm_2.4.39.bb2
4 files changed, 76 insertions, 41 deletions
diff --git a/meta/recipes-graphics/drm/libdrm.inc b/meta/recipes-graphics/drm/libdrm.inc
index 2ed9c14b1d..a64a5df0f5 100644
--- a/meta/recipes-graphics/drm/libdrm.inc
+++ b/meta/recipes-graphics/drm/libdrm.inc
@@ -18,7 +18,7 @@ DEPENDS += " libpciaccess"
inherit autotools pkgconfig
-EXTRA_OECONF += "--disable-cairo"
+EXTRA_OECONF += "--disable-cairo-tests"
PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-kms"
FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode*"
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 0000000000..90e79d4731
--- /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/nocairo.patch b/meta/recipes-graphics/drm/libdrm/nocairo.patch
deleted file mode 100644
index f9b7f3acec..0000000000
--- 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 cb1f7f99fc..f3ce2b1fb4 100644
--- a/meta/recipes-graphics/drm/libdrm_2.4.39.bb
+++ b/meta/recipes-graphics/drm/libdrm_2.4.39.bb
@@ -4,7 +4,7 @@ PR = "${INC_PR}.0"
SRC_URI += "file://installtests.patch \
file://GNU_SOURCE_definition.patch \
- file://nocairo.patch \
+ file://disable-cairo.patch \
"
SRC_URI[md5sum] = "9a299e021d81bab6c82307582c78319d"