From 6b010536d9fabe2f7db0899e27bc7a8eaebd138d Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Aug 04 2015 18:27:21 +0000 Subject: fix build with a couple of patches from upstream list (davidshea) --- diff --git a/0007-uxa-fix-compiler-warnings-initialize-width-height-xy.patch b/0007-uxa-fix-compiler-warnings-initialize-width-height-xy.patch new file mode 100644 index 0000000..c250680 --- /dev/null +++ b/0007-uxa-fix-compiler-warnings-initialize-width-height-xy.patch @@ -0,0 +1,60 @@ +From cfdd652f50ed8281da176b084a4d58f895a47586 Mon Sep 17 00:00:00 2001 +From: Uri Lublin +Date: Mon, 26 Jan 2015 12:35:39 +0200 +Subject: [PATCH] uxa: fix compiler warnings (initialize width, height, + [xy]Dst_copy) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some compiler warnings for example: +uxa-glyphs.c:1045: warning: ‘width’ may be used uninitialized in this function +uxa-glyphs.c:1045: warning: ‘height’ may be used uninitialized in this function +uxa-render.c:1090: warning: ‘xDst_copy’ may be used uninitialized in this function +uxa-render.c:1090: warning: ‘yDst_copy’ may be used uninitialized in this function + +I think these can never actually happen as the code protects use of +those uninitialized variables, but I'd not "argue" with the compiler. +--- + src/uxa/uxa-glyphs.c | 2 +- + src/uxa/uxa-render.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/uxa/uxa-glyphs.c b/src/uxa/uxa-glyphs.c +index fe3d6e8..4b25837 100644 +--- a/src/uxa/uxa-glyphs.c ++++ b/src/uxa/uxa-glyphs.c +@@ -1042,7 +1042,7 @@ uxa_glyphs(CARD8 op, + int xDst = list->xOff, yDst = list->yOff; + BoxRec extents = { 0, 0, 0, 0 }; + Bool have_extents = FALSE; +- int width, height, ret; ++ int width = 0, height = 0, ret; + PicturePtr localDst = pDst; + + if (!uxa_screen->info->prepare_composite || +diff --git a/src/uxa/uxa-render.c b/src/uxa/uxa-render.c +index 937ac2e..7d535ec 100644 +--- a/src/uxa/uxa-render.c ++++ b/src/uxa/uxa-render.c +@@ -1087,7 +1087,7 @@ uxa_try_driver_composite(CARD8 op, + RegionRec region; + BoxPtr pbox; + int nbox; +- int xDst_copy, yDst_copy; ++ int xDst_copy = 0, yDst_copy = 0; + int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y; + PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix; + PicturePtr localSrc, localMask = NULL; +@@ -1353,7 +1353,7 @@ uxa_try_magic_two_pass_composite_helper(CARD8 op, + ScreenPtr screen = pDst->pDrawable->pScreen; + uxa_screen_t *uxa_screen = uxa_get_screen(screen); + PicturePtr localDst = pDst; +- int xDst_copy, yDst_copy; ++ int xDst_copy = 0, yDst_copy = 0; + + assert(op == PictOpOver); + +-- +2.4.3 + diff --git a/query-glyph-extents.patch b/query-glyph-extents.patch new file mode 100644 index 0000000..a17aaa3 --- /dev/null +++ b/query-glyph-extents.patch @@ -0,0 +1,42 @@ +diff --git a/configure.ac b/configure.ac +index 6555a8d..7e95b01 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -61,7 +61,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto) + XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto) + + # Obtain compiler/linker options for the driver dependencies +-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto $REQUIRED_MODULES) ++PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto xfont $REQUIRED_MODULES) + + + save_CFLAGS="$CFLAGS" +diff --git a/src/uxa/uxa-damage.c b/src/uxa/uxa-damage.c +index 3e4c075..95b3f85 100644 +--- a/src/uxa/uxa-damage.c ++++ b/src/uxa/uxa-damage.c +@@ -28,6 +28,9 @@ + #include "uxa-priv.h" + + #include ++#include ++#include ++#include + #include "scrnintstr.h" + #include "windowstr.h" + #include "dixfontstr.h" +diff --git a/src/uxa/uxa-glyphs.c b/src/uxa/uxa-glyphs.c +index fe3d6e8..2400ab8 100644 +--- a/src/uxa/uxa-glyphs.c ++++ b/src/uxa/uxa-glyphs.c +@@ -64,6 +64,10 @@ + + #include + ++#include ++#include ++#include ++ + #include "uxa-priv.h" + + #include "mipict.h" diff --git a/xorg-x11-drv-qxl.spec b/xorg-x11-drv-qxl.spec index 309b1f1..d7d2e62 100644 --- a/xorg-x11-drv-qxl.spec +++ b/xorg-x11-drv-qxl.spec @@ -35,6 +35,11 @@ Patch3: no-surfaces-kms.patch Patch4: 0001-worst-hack-of-all-time-to-qxl-driver.patch Patch5: qxl-aarch64.patch +# From http://lists.freedesktop.org/archives/spice-devel/2015-January/018703.html +Patch6: 0007-uxa-fix-compiler-warnings-initialize-width-height-xy.patch +# From http://lists.freedesktop.org/archives/spice-devel/2015-August/021185.html +Patch7: query-glyph-extents.patch + License: MIT Group: User Interface/X Hardware Support @@ -51,6 +56,7 @@ BuildRequires: spice-server-devel >= 0.8.0 BuildRequires: glib2-devel BuildRequires: libtool BuildRequires: libudev-devel +BuildRequires: libXfont-devel Requires: Xorg %(xserver-sdk-abi-requires ansic) Requires: Xorg %(xserver-sdk-abi-requires videodrv) @@ -77,6 +83,8 @@ XSpice is both an X and a Spice server. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build #autoreconf -f -i @@ -122,7 +130,10 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/X11/spiceqxl.xorg.conf %changelog -* Wed Jul 29 2015 Dave Airlie - 0.1.4-4 +* Tue Aug 04 2015 Adam Williamson - 0.1.4-4 +- fix build with a couple of patches from upstream list (from davidshea) + +* Wed Jul 29 2015 Dave Airlie - 1.15 ABI rebuild * Fri Jun 19 2015 Fedora Release Engineering - 0.1.4-3