[gnome-continuous] Add a patch to get xf86-video-xql compiling with xfont2.pc
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] Add a patch to get xf86-video-xql compiling with xfont2.pc
- Date: Sun, 28 Aug 2016 02:16:04 +0000 (UTC)
commit d00998c1094fab5e0e00001667375a3a196c4177
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sat Aug 27 22:13:41 2016 -0400
Add a patch to get xf86-video-xql compiling with xfont2.pc
libXfont changed API/ABI and got a new .pc file, but xf86-video-qxl
needed the old .pc file and API. Add a patch to get it compiling
against the new API.
See https://bugs.freedesktop.org/show_bug.cgi?id=97514
manifest.json | 3 +-
patches/xf86-video-qxl-xfont2.patch | 65 +++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 1 deletions(-)
---
diff --git a/manifest.json b/manifest.json
index 32d3cbe..0cc8b92 100644
--- a/manifest.json
+++ b/manifest.json
@@ -445,7 +445,8 @@
"--disable-werror"]},
{"src": "fd:xorg/driver/xf86-video-qxl",
- "patches": ["xorg-autogen-merged.patch"]},
+ "patches": ["xorg-autogen-merged.patch",
+ "xf86-video-qxl-xfont2.patch"]},
{"src": "fd:xorg/driver/xf86-video-ati"},
diff --git a/patches/xf86-video-qxl-xfont2.patch b/patches/xf86-video-qxl-xfont2.patch
new file mode 100644
index 0000000..7c92838
--- /dev/null
+++ b/patches/xf86-video-qxl-xfont2.patch
@@ -0,0 +1,65 @@
+From 7a61a85f58b3aae442c3e6ac5010ce637d6f9b81 Mon Sep 17 00:00:00 2001
+From: "Owen W. Taylor" <otaylor fishsoup net>
+Date: Fri, 26 Aug 2016 11:44:55 -0400
+Subject: [PATCH] Check for either xfont.pc or xfont2.pc
+
+The API change that caused xfont to be renamed to xfont2 doesn't affect
+the usage of libXfont here, so accept either .pc file, preferring xfont2.
+---
+ configure.ac | 8 +++++++-
+ src/uxa/uxa-damage.c | 10 +++++++++-
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7e95b01..facc100 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -60,8 +60,14 @@ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+ XORG_DRIVER_CHECK_EXT(XV, videoproto)
+ XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
+
++# We can use either version 1 or version to of libXfont
++PKG_CHECK_EXISTS(xfont2,
++ [xfont_pc=xfont2
++ AC_DEFINE(HAVE_XFONT2,1,[Version 2 of the libXfont library])],
++ [xfont_pc=xfont])
++
+ # Obtain compiler/linker options for the driver dependencies
+-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto xfont $REQUIRED_MODULES)
++PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto $xfont_pc $REQUIRED_MODULES)
+
+
+ save_CFLAGS="$CFLAGS"
+diff --git a/src/uxa/uxa-damage.c b/src/uxa/uxa-damage.c
+index a6d1ee3..6afb346 100644
+--- a/src/uxa/uxa-damage.c
++++ b/src/uxa/uxa-damage.c
+@@ -35,7 +35,11 @@
+ #include <X11/X.h>
+ #include <X11/fonts/font.h>
+ #include <X11/fonts/fontstruct.h>
++#ifdef HAVE_XFONT2
++#include <X11/fonts/libxfont2.h>
++#else
+ #include <X11/fonts/fontutil.h>
++#endif
+
+ #include "uxa-damage.h"
+
+@@ -947,8 +951,12 @@ uxa_damage_chars (RegionPtr region,
+ {
+ ExtentInfoRec extents;
+ BoxRec box;
+-
++
++#ifdef HAVE_XFONT2
++ xfont2_query_glyph_extents(font, charinfo, n, &extents);
++#else
+ QueryGlyphExtents(font, charinfo, n, &extents);
++#endif
+ if (imageblt)
+ {
+ if (extents.overallWidth > extents.overallRight)
+--
+2.7.4
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]