summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
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:13:43 +0100
commiteb8a8fe503de277eb1b5c6b4c157368b2bee116e (patch)
treee1ece9811d39c536c081903febeecaa4ef5a38c0 /meta/recipes-graphics
parent4ebe9d1ebeb1cd55989fa0faab17d3ff1d8756d2 (diff)
downloadpoky-eb8a8fe503de277eb1b5c6b4c157368b2bee116e.tar.gz
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. (From OE-Core rev: fa9ccb23e5788f331cc868ce4bad4abd1eaeee9c) Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-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"
18 18
19inherit autotools pkgconfig 19inherit autotools pkgconfig
20 20
21EXTRA_OECONF += "--disable-cairo" 21EXTRA_OECONF += "--disable-cairo-tests"
22 22
23PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-kms" 23PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-kms"
24FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode*" 24FILES_${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 @@
1commit c81d1df4926072d24b4dad1b488e618e57eff1c6
2Author: Daniel Stone <daniel@fooishbar.org>
3Date: Thu Oct 4 10:26:37 2012 +1000
4
5 configure.ac: Allow forcible disabling of Cairo support
6
7 We don't want to build libdrm tests with Cairo support under Poky, since
8 they're never used and also cause a build loop from libdrm -> cairo ->
9 mesa-dri -> libdrm.
10
11 To avoid variance in build results, introduce a --disable-cairo-tests
12 switch.
13
14 Upstream-Status: Backport
15
16 Signed-off-by: Daniel Stone <daniel@fooishbar.org>
17
18diff --git a/configure.ac b/configure.ac
19index 290362c..8c28107 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -222,11 +222,23 @@ if test "x$EXYNOS" = xyes; then
23 AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support])
24 fi
25
26+AC_ARG_ENABLE([cairo-tests],
27+ [AS_HELP_STRING([--enable-cairo-tests],
28+ [Enable support for Cairo rendering in tests (default: auto)])],
29+ [CAIRO=$enableval], [CAIRO=auto])
30 PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
31-if test "x$HAVE_CAIRO" = xyes; then
32- AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support])
33+AC_MSG_CHECKING([whether to enable Cairo tests])
34+if test "x$CAIRO" = xauto; then
35+ CAIRO="$HAVE_CAIRO"
36 fi
37-AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes])
38+if test "x$CAIRO" = xyes; then
39+ if ! test "x$HAVE_CAIRO" = xyes; then
40+ AC_MSG_ERROR([Cairo support required but not present])
41+ fi
42+ AC_DEFINE(HAVE_CAIRO, 1, [Have Cairo support])
43+fi
44+AC_MSG_RESULT([$CAIRO])
45+AM_CONDITIONAL(HAVE_CAIRO, [test "x$CAIRO" = xyes])
46
47 # For enumerating devices in test case
48 PKG_CHECK_MODULES(LIBUDEV, libudev, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])
49diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am
50index b5ec771..065ae13 100644
51--- a/tests/modetest/Makefile.am
52+++ b/tests/modetest/Makefile.am
53@@ -1,8 +1,7 @@
54 AM_CFLAGS = \
55 -I$(top_srcdir)/include/drm \
56 -I$(top_srcdir)/libkms/ \
57- -I$(top_srcdir) \
58- $(CAIRO_CFLAGS)
59+ -I$(top_srcdir)
60
61 noinst_PROGRAMS = \
62 modetest
63@@ -12,5 +11,9 @@ modetest_SOURCES = \
64
65 modetest_LDADD = \
66 $(top_builddir)/libdrm.la \
67- $(top_builddir)/libkms/libkms.la \
68- $(CAIRO_LIBS)
69+ $(top_builddir)/libkms/libkms.la
70+
71+if HAVE_CAIRO
72+AM_CFLAGS += $(CAIRO_CFLAGS)
73+modetest_LDADD += $(CAIRO_LIBS)
74+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 @@
1We don't want the cairo dependency. Unfortunately simply checking whether its present
2isn't good enough. If its not in DEPENDS, it can disappear half way through building.
3We therefore need to explictly disable it.
4
5RP
62012/10/5
7
8Index: libdrm-2.4.39/configure.ac
9===================================================================
10--- libdrm-2.4.39.orig/configure.ac 2012-08-24 14:54:42.000000000 +0000
11+++ libdrm-2.4.39/configure.ac 2012-10-05 11:37:52.484821221 +0000
12@@ -63,6 +63,11 @@
13 [Disable KMS mm abstraction library (default: auto)]),
14 [LIBKMS=$enableval], [LIBKMS=auto])
15
16+AC_ARG_ENABLE(cairo,
17+ AS_HELP_STRING([--disable-cairo],
18+ [Disable cairo (default: auto)]),
19+ [ENABLECAIRO=$enableval], [ENABLECAIRO=auto])
20+
21 AC_ARG_ENABLE(intel,
22 AS_HELP_STRING([--disable-intel],
23 [Enable support for intel's KMS API (default: auto)]),
24@@ -201,9 +206,12 @@
25 AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support])
26 fi
27
28-PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
29-if test "x$HAVE_CAIRO" = xyes; then
30- AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support])
31+HAVE_CAIRO=no
32+if test "x$ENABLECAIRO" = xyes; then
33+ PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
34+ if test "x$HAVE_CAIRO" = xyes; then
35+ AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support])
36+ fi
37 fi
38 AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes])
39
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"
4 4
5SRC_URI += "file://installtests.patch \ 5SRC_URI += "file://installtests.patch \
6 file://GNU_SOURCE_definition.patch \ 6 file://GNU_SOURCE_definition.patch \
7 file://nocairo.patch \ 7 file://disable-cairo.patch \
8 " 8 "
9 9
10SRC_URI[md5sum] = "9a299e021d81bab6c82307582c78319d" 10SRC_URI[md5sum] = "9a299e021d81bab6c82307582c78319d"