]> code.ossystems Code Review - openembedded-core.git/commitdiff
xserver-xorg: fix xshmfence autodetection
authorRoss Burton <ross.burton@intel.com>
Mon, 7 Jul 2014 13:40:49 +0000 (14:40 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Jul 2014 10:19:49 +0000 (11:19 +0100)
Add a PACKAGECONFIG for xshmfence.  If DRI3 is enabled, xshmfence also needs to
be enabled.

[ YOCTO #6507 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch [new file with mode: 0644]
meta/recipes-graphics/xorg-xserver/xserver-xorg_1.15.1.bb

index 48ab3471287df911af5d247dcf9a7ac2067c1b3a..8b5747e282a0bb2dc69101ce51316d08c13fcefe 100644 (file)
@@ -120,9 +120,11 @@ PACKAGECONFIG ??= "udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri d
 PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
 PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,glproto virtual/mesa xf86driproto"
 PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
-PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto libxshmfence"
+# DRI3 requires xshmfence to also be enabled
+PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
 PACKAGECONFIG[glx] = "--enable-glx --enable-glx-tls,--disable-glx,glproto virtual/libgl virtual/libx11"
 PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
 
 do_install_append () {
        # Its assumed base-files creates this for us
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch
new file mode 100644 (file)
index 0000000..55e0913
--- /dev/null
@@ -0,0 +1,55 @@
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+commit 1affe20d5c82befc3b1626e557409dab5343c47b
+Author: Ross Burton <ross.burton@intel.com>
+Date:   Mon Jul 7 12:53:35 2014 +0100
+
+    configure.ac: add option for xshmfence
+    
+    xshmfence is usable outside of DRI3, and is currently autodetected which isn't
+    good for distributions where deterministic builds are aspired to.
+    
+    Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index 2daa6be..fd1cf3f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -648,6 +648,7 @@ AC_ARG_ENABLE(kdrive-kbd,     AS_HELP_STRING([--enable-kdrive-kbd], [Build kbd d
+ AC_ARG_ENABLE(kdrive-mouse,   AS_HELP_STRING([--enable-kdrive-mouse], [Build mouse driver for kdrive (default: auto)]), [KDRIVE_MOUSE=$enableval], [KDRIVE_MOUSE=auto])
+ AC_ARG_ENABLE(kdrive-evdev,   AS_HELP_STRING([--enable-kdrive-evdev], [Build evdev driver for kdrive (default: auto)]), [KDRIVE_EVDEV=$enableval], [KDRIVE_EVDEV=auto])
+ AC_ARG_ENABLE(libunwind,      AS_HELP_STRING([--enable-libunwind], [Use libunwind for backtracing (default: auto)]), [LIBUNWIND="$enableval"], [LIBUNWIND="auto"])
++AC_ARG_ENABLE(xshmfence,      AS_HELP_STRING([--disable-xshmfence], [Disable xshmfence (default: auto)]), [WANT_XSHMFENCE="$enableval"], [WANT_XSHMFENCE="auto"])
+ dnl chown/chmod to be setuid root as part of build
+@@ -1235,18 +1236,19 @@ esac
+ AM_CONDITIONAL(BUSFAULT, test x"$BUSFAULT" = xyes)
+-PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE,
+-                [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
++HAVE_XSHMFENCE=no
++if test "x$WANT_XSHMFENCE" != "xno"; then
++      PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE,
++                        [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
++      if test "$WANT_XSHMFENCE,$HAVE_XSHMFENCE" = "yes,no"; then
++              AC_MSG_ERROR([libxshmfence requested but not found.])
++      fi
++      AC_DEFINE(HAVE_XSHMFENCE, 1, [Have X Shared Memory Fence library])
++      REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
++fi
+ AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes)
+-case x"$HAVE_XSHMFENCE" in
+-      xyes)
+-              AC_DEFINE(HAVE_XSHMFENCE, 1, [Have X Shared Memory Fence library])
+-              REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
+-              ;;
+-esac
+-
+ case "$DRI3,$HAVE_XSHMFENCE" in
+       yes,yes | auto,yes)
index 6a4168e3e6b77ef47a71574ea5a209af3e5f028c..22ac604433f0ff0577aa6c2376be60ffe370b5dc 100644 (file)
@@ -6,6 +6,7 @@ SRC_URI += "file://crosscompile.patch \
             file://mips64-compiler.patch \
             file://aarch64.patch \
             file://xorg-CVE-2013-6424.patch \
+            file://xshmfence-option.patch \
            "
 
 SRC_URI[md5sum] = "e4c70262ed89764be8f8f5d699ed9227"