[meta-intel] [meta-intel PATCH] xf86-video-mga: upgrade and fix build

Ross Burton ross.burton at intel.com
Thu Nov 29 03:21:39 PST 2012


1.4.13 doesn't build against new X servers as XAA has been dropped, so upgrade
to 1.6.2 which makes XAA optional.

Also configure.ac is using AC_CHECK_FILE which doesn't cross-compile, so remove
those.

[ YOCTO #3495 ]

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 .../xorg-driver/xf86-video-mga/checkfile.patch     |   68 ++++++++++++++++++++
 .../xorg-driver/xf86-video-mga_1.4.13.bb           |   19 ------
 .../xorg-driver/xf86-video-mga_1.6.2.bb            |   21 ++++++
 3 files changed, 89 insertions(+), 19 deletions(-)
 create mode 100644 common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch
 delete mode 100755 common/recipes-graphics/xorg-driver/xf86-video-mga_1.4.13.bb
 create mode 100644 common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.2.bb

diff --git a/common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch b/common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch
new file mode 100644
index 0000000..ceae6df
--- /dev/null
+++ b/common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch
@@ -0,0 +1,68 @@
+Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=57606]
+Signed-off-by: Ross Burton <ross.burton at intel.com>
+
+From c9014a8f3c9b691b5aa7b1f3ec66cf7c84b8211b Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton at intel.com>
+Date: Thu, 29 Nov 2012 11:00:43 +0000
+Subject: [PATCH] build: dont use AC_CHECK_FILE when enabling DRI
+
+Automatically enabling or disabling a feature based on installed files isn't
+deterministic, and AC_CHECK_FILE returns an error when cross-compiling.
+
+Fix this by enabling DRI by default, and removing the explicit file checks as
+pkg-config is good enough.
+
+(#57606)
+
+Signed-off-by: Ross Burton <ross.burton at intel.com>
+---
+ configure.ac |   25 ++-----------------------
+ 1 file changed, 2 insertions(+), 23 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fca1a9c..d2aa2ed 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,9 +55,9 @@ AC_ARG_WITH(xorg-module-dir,
+             [moduledir="$libdir/xorg/modules"])
+ 
+ AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri],
+-                                  [Disable DRI support [[default=auto]]]),
++                                  [Disable DRI support [[default=enabled]]]),
+               [DRI="$enableval"],
+-              [DRI=auto])
++              [DRI=yes])
+ AC_ARG_ENABLE(exa,
+               AS_HELP_STRING([--disable-exa],
+                              [Disable EXA support [[default=enabled]]]),
+@@ -76,27 +76,6 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
+ 
+ # Checks for libraries.
+ 
+-if test "x$DRI" != xno; then
+-        AC_CHECK_FILE([${sdkdir}/dri.h],
+-                      [have_dri_h="yes"], [have_dri_h="no"])
+-        AC_CHECK_FILE([${sdkdir}/sarea.h],
+-                      [have_sarea_h="yes"], [have_sarea_h="no"])
+-        AC_CHECK_FILE([${sdkdir}/dristruct.h],
+-                      [have_dristruct_h="yes"], [have_dristruct_h="no"])
+-fi
+-
+-AC_MSG_CHECKING([whether to include DRI support])
+-if test "x$DRI" = xauto; then
+-        if test "x$have_dri_h" = xyes && \
+-           test "x$have_sarea_h" = xyes && \
+-           test "x$have_dristruct_h" = xyes; then
+-                DRI="yes"
+-        else
+-                DRI="no"
+-        fi
+-fi
+-AC_MSG_RESULT([$DRI])
+-
+ AM_CONDITIONAL(DRI, test "x$DRI" = xyes)
+ if test "x$DRI" = xyes; then
+         PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto])
+-- 
+1.7.10.4
+
diff --git a/common/recipes-graphics/xorg-driver/xf86-video-mga_1.4.13.bb b/common/recipes-graphics/xorg-driver/xf86-video-mga_1.4.13.bb
deleted file mode 100755
index b48e56d..0000000
--- a/common/recipes-graphics/xorg-driver/xf86-video-mga_1.4.13.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require recipes-graphics/xorg-driver/xorg-driver-video.inc
-
-SUMMARY = "X.Org X server -- Matrox MGA display driver"
-
-DESCRIPTION = "mga is an Xorg driver for Matrox video cards"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=bc1395d2cd32dfc5d6c57d2d8f83d3fc"
-
-DEPENDS += "virtual/libx11 libxvmc drm xf86driproto glproto \
-	    virtual/libgl xineramaproto libpciaccess"
-
-EXTRA_OECONF += "--enable-dri"
-
-PR = "r0"
-
-COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
-
-SRC_URI[md5sum] = "f967fb3e655f6f68aa3f495eaadcaac2"
-SRC_URI[sha256sum] = "b657bd5fec4aade6396c683886739b7c8ce57924278bee0e36f13a966eeddff6"
diff --git a/common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.2.bb b/common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.2.bb
new file mode 100644
index 0000000..d20cadf
--- /dev/null
+++ b/common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.2.bb
@@ -0,0 +1,21 @@
+require recipes-graphics/xorg-driver/xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- Matrox MGA display driver"
+
+DESCRIPTION = "mga is an Xorg driver for Matrox video cards"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=bc1395d2cd32dfc5d6c57d2d8f83d3fc"
+
+SRC_URI += "file://checkfile.patch"
+
+DEPENDS += "virtual/libx11 libxvmc drm xf86driproto glproto \
+	    virtual/libgl xineramaproto libpciaccess"
+
+EXTRA_OECONF += "--enable-dri"
+
+PR = "r0"
+
+COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
+
+SRC_URI[md5sum] = "f543877db4e260d8b43c7da3095605ed"
+SRC_URI[sha256sum] = "3f89ce250eea93f0de890954687790e06c0bab9e3e303df393e8759a187eca6c"
-- 
1.7.10




More information about the meta-intel mailing list