iptables: bump to version 1.6.1
[buildroot-gz.git] / package / x11r7 / xdriver_xf86-video-qxl / 0003-xfont2.patch
blobe93b746f5acb5911238db8aa87f1c0810dbead6e
1 From e13d28ee5d8724fc4b22f26bce01a7d36355f272 Mon Sep 17 00:00:00 2001
2 From: "Owen W. Taylor" <otaylor@fishsoup.net>
3 Date: Fri, 26 Aug 2016 11:44:55 -0400
4 Subject: Check for either xfont.pc or xfont2.pc
6 More recent versions of Xfont have a different API (with namespacing
7 for libXfont functions.) Check for xfont2.pc and if found, use that, and
8 use the new API. The rational for preferring libXfont2 is that as a recent
9 change the xserver module looks for and requires libXfont2, and it's better
10 not to have both versions of the library in process.
11 ---
12 Downloaded from
13 https://cgit.freedesktop.org/xorg/driver/xf86-video-qxl/commit/?id=e13d28ee5d8724fc4b22f26bce01a7d36355f272
15 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
17 diff --git a/configure.ac b/configure.ac
18 index 7e95b01..451d42a 100644
19 --- a/configure.ac
20 +++ b/configure.ac
21 @@ -60,8 +60,14 @@ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
22 XORG_DRIVER_CHECK_EXT(XV, videoproto)
23 XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
25 +# We can use either version 1 or version 2 of libXfont
26 +PKG_CHECK_EXISTS(xfont2,
27 + [xfont_pc=xfont2
28 + AC_DEFINE(HAVE_XFONT2,1,[Version 2 of the libXfont library])],
29 + [xfont_pc=xfont])
31 # Obtain compiler/linker options for the driver dependencies
32 -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto xfont $REQUIRED_MODULES)
33 +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto $xfont_pc $REQUIRED_MODULES)
36 save_CFLAGS="$CFLAGS"
37 diff --git a/src/uxa/uxa-damage.c b/src/uxa/uxa-damage.c
38 index a6d1ee3..6afb346 100644
39 --- a/src/uxa/uxa-damage.c
40 +++ b/src/uxa/uxa-damage.c
41 @@ -35,7 +35,11 @@
42 #include <X11/X.h>
43 #include <X11/fonts/font.h>
44 #include <X11/fonts/fontstruct.h>
45 +#ifdef HAVE_XFONT2
46 +#include <X11/fonts/libxfont2.h>
47 +#else
48 #include <X11/fonts/fontutil.h>
49 +#endif
51 #include "uxa-damage.h"
53 @@ -947,8 +951,12 @@ uxa_damage_chars (RegionPtr region,
55 ExtentInfoRec extents;
56 BoxRec box;
59 +#ifdef HAVE_XFONT2
60 + xfont2_query_glyph_extents(font, charinfo, n, &extents);
61 +#else
62 QueryGlyphExtents(font, charinfo, n, &extents);
63 +#endif
64 if (imageblt)
66 if (extents.overallWidth > extents.overallRight)
67 --
68 cgit v0.10.2