]> code.ossystems Code Review - openembedded-core.git/commitdiff
xserver-xorg: rewrite xorg-server.m4 patch
authorRoss Burton <ross.burton@intel.com>
Thu, 20 Sep 2018 19:19:05 +0000 (20:19 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 21 Sep 2018 15:15:19 +0000 (08:15 -0700)
Instead of having a patch that upstream won't accept, rewrite it in a
upstreamable way and <gasp> submit it upstream.

The fundamental problem is that pkg-config --variable=sdkdir will return the
value of sdkdir literally, whereas --cflags will return -I${sdkdir} *but* will
do sysroot relocation magic on the path so it is usable.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch [deleted file]
meta/recipes-graphics/xorg-xserver/xserver-xorg/pkgconfig.patch [new file with mode: 0644]
meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.1.bb

index 89318e53c56bdd886c8397a090260c478d2fede3..489a4285002c6f14ff7284733c83eba280dc5fe5 100644 (file)
@@ -17,7 +17,6 @@ INC_PR = "r8"
 
 XORG_PN = "xorg-server"
 SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2"
-SRC_URI += "file://macro_tweak.patch"
 
 S = "${WORKDIR}/${XORG_PN}-${PV}"
 
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch
deleted file mode 100644 (file)
index c36e4e7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-This is the revised version of files/macro_tweak.patch for
-xorg-server 1.8.99.904 and newer.
-
-Upstream-Status: Pending
-
-Signed-off-by: Yu Ke <ke.yu@intel.com>
-
-Index: xorg-server-1.19.6/xorg-server.m4
-===================================================================
---- xorg-server-1.19.6.orig/xorg-server.m4
-+++ xorg-server-1.19.6/xorg-server.m4
-@@ -28,10 +28,12 @@ dnl
- # Checks for the MACRO define in xorg-server.h (from the sdk).  If it
- # is defined, then add the given PROTO to $REQUIRED_MODULES.
-+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
-+
- AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
-       AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-       SAVE_CFLAGS="$CFLAGS"
--      CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
-+      CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`"
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include "xorg-server.h"
- #if !defined $1
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/pkgconfig.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/pkgconfig.patch
new file mode 100644 (file)
index 0000000..2ef9fa9
--- /dev/null
@@ -0,0 +1,34 @@
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/xorg/xserver/merge_requests/22]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 5f65a6246fe752764045dd1e38912f1dccec71e4 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Thu, 20 Sep 2018 20:12:24 +0100
+Subject: [PATCH] xorg-server.m4: just all cflags instead of just sdkdir
+
+Instead of fetching just the sdkdir variable of xorg-server using pkg-config,
+simply get all of the CFLAGS.  Aside from completeness, this helps builds in
+sysroots as pkg-config knows what to do with --cflags but doesn't remap
+arbitrary variables.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ xorg-server.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xorg-server.m4 b/xorg-server.m4
+index 18255b91a..195bda5d8 100644
+--- a/xorg-server.m4
++++ b/xorg-server.m4
+@@ -31,7 +31,7 @@ dnl
+ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+       AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+       SAVE_CFLAGS="$CFLAGS"
+-      CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
++      CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`"
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include "xorg-server.h"
+ #if !defined $1
+-- 
+2.11.0
+
index 05e909febd5b9880ad00bae343912734187a34bf..cfdaf731758c9d7bbfc1225bccc6cd01ca08ac49 100644 (file)
@@ -2,6 +2,7 @@ require xserver-xorg.inc
 
 SRC_URI += "file://musl-arm-inb-outb.patch \
             file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \
+            file://pkgconfig.patch \
             "
 SRC_URI[md5sum] = "e525846d1d0af5732ba835f2e2ec066d"
 SRC_URI[sha256sum] = "59c99fe86fe75b8164c6567bfc6e982aecc2e4a51e6fbac1b842d5d00549e918"