From 6e046a6220ab91c3c3d9637c129e7025d1c67fa480ce29de68d50819b74ad8a6 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 5 Jun 2009 20:35:01 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-libs?expand=0&rev=67 --- Header-cleanup-bug-4703.patch | 44 ++++++++++ libXft-2.1.7-lcd-filter-2.patch | 141 ++++++++++++++++---------------- libXxf86misc-xcb.diff | 7 +- libxkbui.diff | 8 +- libxtrap-pcfix.patch | 12 +++ p_xft_cjk.diff | 10 ++- xcb-util-0.3.5.diff | 6 +- xorg-x11-libs.changes | 9 ++ xorg-x11-libs.spec | 16 +++- 9 files changed, 170 insertions(+), 83 deletions(-) create mode 100644 Header-cleanup-bug-4703.patch create mode 100644 libxtrap-pcfix.patch diff --git a/Header-cleanup-bug-4703.patch b/Header-cleanup-bug-4703.patch new file mode 100644 index 0000000..d5eb08f --- /dev/null +++ b/Header-cleanup-bug-4703.patch @@ -0,0 +1,44 @@ +From 60bb5229f0fb16cee27077552fbc35d53c94f031 Mon Sep 17 00:00:00 2001 +From: Erik Andren +Date: Sat, 25 Oct 2008 20:34:27 +0200 +Subject: Header cleanup (bug#4703) + +Remove prototypes for nonexistent functions from Xft.h, and add missing +include in xftglyphs.c + +Signed-off-by: Julien Cristau +--- + include/X11/Xft/Xft.h | 12 ------------ + src/xftglyphs.c | 4 ++++ + 2 files changed, 4 insertions(+), 12 deletions(-) + +Index: libXft-2.1.13/include/X11/Xft/Xft.h +=================================================================== +--- libXft-2.1.13.orig/include/X11/Xft/Xft.h ++++ libXft-2.1.13/include/X11/Xft/Xft.h +@@ -127,16 +127,6 @@ XftColorFree (Display *dpy, + Colormap cmap, + XftColor *color); + +- +-/* xftcore.c */ +- +-/* xftdir.c */ +-FcBool +-XftDirScan (FcFontSet *set, _Xconst char *dir, FcBool force); +- +-FcBool +-XftDirSave (FcFontSet *set, _Xconst char *dir); +- + /* xftdpy.c */ + Bool + XftDefaultHasRender (Display *dpy); +@@ -619,8 +609,6 @@ XftTextRenderUtf16 (Display *dpy, + FcEndian endian, + int len); + +-/* xftstr.c */ +- + /* xftxlfd.c */ + FcPattern * + XftXlfdParse (_Xconst char *xlfd_orig, Bool ignore_scalable, Bool complete); diff --git a/libXft-2.1.7-lcd-filter-2.patch b/libXft-2.1.7-lcd-filter-2.patch index 671f6de..a14d0ff 100644 --- a/libXft-2.1.7-lcd-filter-2.patch +++ b/libXft-2.1.7-lcd-filter-2.patch @@ -1,7 +1,8 @@ -diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c ---- libXft-2.1.7-org/xftglyphs.c 2005-03-02 06:32:14.000000000 +0100 -+++ libXft-2.1.7-new/xftglyphs.c 2006-10-01 01:18:52.000000000 +0200 -@@ -23,23 +23,14 @@ +Index: src/xftglyphs.c +=================================================================== +--- src.orig/xftglyphs.c ++++ src/xftglyphs.c +@@ -21,23 +21,14 @@ */ #include "xftint.h" @@ -31,7 +32,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c /* * Validate the memory info for a font -@@ -67,6 +58,295 @@ +@@ -65,6 +56,295 @@ _XftFontValidateMemory (Display *dpy, Xf font->glyph_memory, glyph_memory); } @@ -327,7 +328,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c _X_EXPORT void XftFontLoadGlyphs (Display *dpy, XftFont *pub, -@@ -85,20 +365,14 @@ +@@ -83,20 +363,14 @@ XftFontLoadGlyphs (Display *dpy, unsigned char *bufBitmap = bufLocal; int bufSize = sizeof (bufLocal); int size, pitch; @@ -351,7 +352,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c if (!info) return; -@@ -108,24 +382,19 @@ +@@ -106,24 +380,19 @@ XftFontLoadGlyphs (Display *dpy, if (!face) return; @@ -380,7 +381,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c } } -@@ -146,7 +415,10 @@ +@@ -144,7 +413,10 @@ XftFontLoadGlyphs (Display *dpy, if (xftg->glyph_memory) continue; @@ -391,7 +392,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c if (error) { /* -@@ -179,7 +451,7 @@ +@@ -177,7 +449,7 @@ XftFontLoadGlyphs (Display *dpy, /* * Compute glyph metrics from FreeType information */ @@ -400,7 +401,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c { /* * calculate the true width by transforming all four corners. -@@ -258,17 +530,14 @@ +@@ -256,17 +528,14 @@ XftFontLoadGlyphs (Display *dpy, } } @@ -425,7 +426,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c if (font->info.spacing >= FC_MONO) { -@@ -308,103 +577,13 @@ +@@ -306,103 +575,13 @@ XftFontLoadGlyphs (Display *dpy, xftg->metrics.yOff = -TRUNC(ROUND(glyphslot->advance.y)); } @@ -449,7 +450,9 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c - bufSize = size; - } - memset (bufBitmap, 0, size); -- ++ // compute the size of the final bitmap ++ ftbit = &glyphslot->bitmap; + - /* - * Rasterize into the local buffer - */ @@ -467,9 +470,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c - - if (subpixel) - FT_Outline_Transform (&glyphslot->outline, &matrix); -+ // compute the size of the final bitmap -+ ftbit = &glyphslot->bitmap; - +- - FT_Outline_Translate ( &glyphslot->outline, -left*hmul, -bottom*vmul ); - - FT_Outline_Get_Bitmap( _XftFTlibrary, &glyphslot->outline, &ftbit ); @@ -534,7 +535,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c if (XftDebug() & XFT_DBG_GLYPH) { -@@ -421,153 +600,99 @@ +@@ -419,29 +598,72 @@ XftFontLoadGlyphs (Display *dpy, int x, y; unsigned char *line; @@ -571,17 +572,51 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c } } -- /* -- * Use the glyph index as the wire encoding; it -- * might be more efficient for some locales to map -- * these by first usage to smaller values, but that -- * would require persistently storing the map when -- * glyphs were freed. -- */ -- glyph = (Glyph) glyphindex; + size = _compute_xrender_bitmap_size( &local, glyphslot, mode ); + if ( size < 0 ) + continue; ++ ++ xftg->metrics.width = local.width; ++ xftg->metrics.height = local.rows; ++ xftg->metrics.x = - glyphslot->bitmap_left; ++ xftg->metrics.y = glyphslot->bitmap_top; ++ ++ /* ++ * If the glyph is relatively large (> 1% of server memory), ++ * don't send it until necessary ++ */ ++ if (!need_bitmaps && size > info->max_glyph_memory / 100) ++ continue; ++ ++ /* ++ * Make sure there's enough buffer space for the glyph ++ */ ++ if (size > bufSize) ++ { ++ if (bufBitmap != bufLocal) ++ free (bufBitmap); ++ bufBitmap = (unsigned char *) malloc (size); ++ if (!bufBitmap) ++ continue; ++ bufSize = size; ++ } ++ memset (bufBitmap, 0, size); ++ ++ local.buffer = bufBitmap; ++ ++ _fill_xrender_bitmap( &local, glyphslot, mode, ++ (font->info.rgba == FC_RGBA_BGR || ++ font->info.rgba == FC_RGBA_VBGR ) ); ++ /* ++ * Copy or convert into local buffer ++ */ ++ + /* + * Use the glyph index as the wire encoding; it + * might be more efficient for some locales to map +@@ -451,121 +673,24 @@ XftFontLoadGlyphs (Display *dpy, + */ + glyph = (Glyph) glyphindex; - if (subpixel) - { @@ -592,22 +627,14 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c - int rf, gf, bf; - int s; - int o, os; -+ xftg->metrics.width = local.width; -+ xftg->metrics.height = local.rows; -+ xftg->metrics.x = - glyphslot->bitmap_left; -+ xftg->metrics.y = glyphslot->bitmap_top; - - /* +- +- /* - * Filter the glyph to soften the color fringes -+ * If the glyph is relatively large (> 1% of server memory), -+ * don't send it until necessary - */ +- */ - widthrgba = width; - pitchrgba = (widthrgba * 4 + 3) & ~3; - sizergba = pitchrgba * height; -+ if (!need_bitmaps && size > info->max_glyph_memory / 100) -+ continue; - +- - os = 1; - switch (font->info.rgba) { - case FC_RGBA_VRGB: @@ -627,20 +654,12 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c - break; - } - if (sizergba > bufSizeRgba) -+ /* -+ * Make sure there's enough buffer space for the glyph -+ */ -+ if (size > bufSize) - { +- { - if (bufBitmapRgba != bufLocalRgba) - free (bufBitmapRgba); - bufBitmapRgba = (unsigned char *) malloc (sizergba); - if (!bufBitmapRgba) -+ if (bufBitmap != bufLocal) -+ free (bufBitmap); -+ bufBitmap = (unsigned char *) malloc (size); -+ if (!bufBitmap) - continue; +- continue; - bufSizeRgba = sizergba; - } - memset (bufBitmapRgba, 0, sizergba); @@ -668,29 +687,9 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c - blue = blue / 65536; - *out++ = (green << 24) | (red << 16) | (green << 8) | blue; - } -+ bufSize = size; - } -+ memset (bufBitmap, 0, size); -+ -+ local.buffer = bufBitmap; - +- } +- - xftg->glyph_memory = sizergba + sizeof (XftGlyph); -+ _fill_xrender_bitmap( &local, glyphslot, mode, -+ (font->info.rgba == FC_RGBA_BGR || -+ font->info.rgba == FC_RGBA_VBGR ) ); -+ /* -+ * Copy or convert into local buffer -+ */ -+ -+ /* -+ * Use the glyph index as the wire encoding; it -+ * might be more efficient for some locales to map -+ * these by first usage to smaller values, but that -+ * would require persistently storing the map when -+ * glyphs were freed. -+ */ -+ glyph = (Glyph) glyphindex; -+ + xftg->glyph_memory = size + sizeof (XftGlyph); if (font->format) { @@ -745,7 +744,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c c = ((c << 1) & 0xaa) | ((c >> 1) & 0x55); c = ((c << 2) & 0xcc) | ((c >> 2) & 0x33); c = ((c << 4) & 0xf0) | ((c >> 4) & 0x0f); -@@ -575,8 +700,12 @@ +@@ -573,8 +698,12 @@ XftFontLoadGlyphs (Display *dpy, } } } @@ -760,7 +759,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c XRenderAddGlyphs (dpy, font->glyphset, &glyph, &xftg->metrics, 1, (char *) bufBitmap, size); -@@ -592,7 +721,7 @@ +@@ -590,7 +719,7 @@ XftFontLoadGlyphs (Display *dpy, else xftg->bitmap = 0; } @@ -769,7 +768,7 @@ diff -urbN libXft-2.1.7-org/xftglyphs.c libXft-2.1.7-new/xftglyphs.c font->glyph_memory += xftg->glyph_memory; info->glyph_memory += xftg->glyph_memory; if (XftDebug() & XFT_DBG_CACHE) -@@ -603,8 +732,6 @@ +@@ -601,8 +730,6 @@ XftFontLoadGlyphs (Display *dpy, } if (bufBitmap != bufLocal) free (bufBitmap); diff --git a/libXxf86misc-xcb.diff b/libXxf86misc-xcb.diff index 8d3c8af..69596a1 100644 --- a/libXxf86misc-xcb.diff +++ b/libXxf86misc-xcb.diff @@ -1,6 +1,7 @@ -diff -p -u -r ../libXxf86misc-X11R7.1-1.0.1.orig/src/XF86Misc.c ./src/XF86Misc.c ---- ../libXxf86misc-X11R7.1-1.0.1.orig/src/XF86Misc.c 2007-03-01 21:31:06.431364114 +0100 -+++ ./src/XF86Misc.c 2007-03-01 21:39:06.546988660 +0100 +Index: src/XF86Misc.c +=================================================================== +--- src/XF86Misc.c.orig ++++ src/XF86Misc.c @@ -154,6 +154,8 @@ Bool XF86MiscGetMouseSettings(dpy, mouse if (!(mouseinfo->device = Xcalloc(rep.devnamelen + 1, 1))) { _XEatData(dpy, (rep.devnamelen+3) & ~3); diff --git a/libxkbui.diff b/libxkbui.diff index ce2bf3e..b028adc 100644 --- a/libxkbui.diff +++ b/libxkbui.diff @@ -1,6 +1,8 @@ ---- src/XKBui.c.orig 2006-11-10 14:56:45.000000000 +0100 -+++ src/XKBui.c 2006-11-10 14:57:00.000000000 +0100 -@@ -104,7 +104,7 @@ +Index: src/XKBui.c +=================================================================== +--- src/XKBui.c.orig ++++ src/XKBui.c +@@ -104,7 +104,7 @@ XkbDescPtr xkb; char buf[20]; sprintf(buf,"#%02x%02x%02x",(sdef.red>>8)&0xff, (sdef.green>>8)&0xff, diff --git a/libxtrap-pcfix.patch b/libxtrap-pcfix.patch new file mode 100644 index 0000000..6a28b7d --- /dev/null +++ b/libxtrap-pcfix.patch @@ -0,0 +1,12 @@ +Index: libXTrap-X11R7.0-1.0.0/xtrap.pc.in +=================================================================== +--- libXTrap-X11R7.0-1.0.0.orig/xtrap.pc.in ++++ libXTrap-X11R7.0-1.0.0/xtrap.pc.in +@@ -6,7 +6,6 @@ includedir=@includedir@ + Name: XTrap + Description: X Trap Library + Version: @PACKAGE_VERSION@ +-Requires: trapproto + Requires.private: x11 xext xt + Cflags: -I${includedir} + Libs: -L${libdir} -lXTrap diff --git a/p_xft_cjk.diff b/p_xft_cjk.diff index 393ed45..2715a27 100644 --- a/p_xft_cjk.diff +++ b/p_xft_cjk.diff @@ -1,6 +1,8 @@ ---- src/xftfreetype.c +Index: src/xftfreetype.c +=================================================================== +--- src.orig/xftfreetype.c +++ src/xftfreetype.c -@@ -387,6 +387,7 @@ +@@ -385,6 +385,7 @@ XftFontInfoFill (Display *dpy, _Xconst F FcChar32 hash, *hashp; FT_Face face; int nhash; @@ -8,7 +10,7 @@ if (!info) return FcFalse; -@@ -509,8 +510,22 @@ +@@ -512,8 +513,22 @@ XftFontInfoFill (Display *dpy, _Xconst F */ fi->load_flags = FT_LOAD_DEFAULT; @@ -30,3 +32,5 @@ - if (fi->antialias || fi->transform) + if ((!bitmap && fi->antialias) || fi->transform) fi->load_flags |= FT_LOAD_NO_BITMAP; + + /* disable hinting if requested */ diff --git a/xcb-util-0.3.5.diff b/xcb-util-0.3.5.diff index 6df6af3..2d8110b 100644 --- a/xcb-util-0.3.5.diff +++ b/xcb-util-0.3.5.diff @@ -1,5 +1,7 @@ ---- event/event.c.orig 2009-05-29 19:05:59.274261734 +0200 -+++ event/event.c 2009-05-29 19:06:47.128402256 +0200 +Index: event/event.c +=================================================================== +--- event/event.c.orig ++++ event/event.c @@ -28,6 +28,7 @@ #include diff --git a/xorg-x11-libs.changes b/xorg-x11-libs.changes index e963c24..e05f309 100644 --- a/xorg-x11-libs.changes +++ b/xorg-x11-libs.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jun 5 12:58:51 CEST 2009 - eich@suse.de + +- Add patches from Moblin: + * libXft: + . clean up header file. + * libXTrap: + . remove trapproto as Requires from pkgconfig file. + ------------------------------------------------------------------- Fri May 29 18:31:51 CEST 2009 - sndirsch@suse.de diff --git a/xorg-x11-libs.spec b/xorg-x11-libs.spec index 47882dd..a60dd7b 100644 --- a/xorg-x11-libs.spec +++ b/xorg-x11-libs.spec @@ -32,7 +32,7 @@ Obsoletes: xorg-x11-libs-64bit # Url: http://xorg.freedesktop.org/ Version: 7.4 -Release: 20 +Release: 21 License: GPL v2 or later; X11/MIT BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/Libraries @@ -75,6 +75,8 @@ Patch3: p_xft_cjk.diff Patch5: libxkbui.diff Patch10: libXxf86misc-xcb.diff Patch11: xcb-util-0.3.5.diff +Patch20: Header-cleanup-bug-4703.patch +Patch21: libxtrap-pcfix.patch %description This package contains the remaining X.Org libraries. @@ -234,6 +236,12 @@ popd pushd xcb-util-* %patch11 -p0 popd +pushd libXft-* +%patch20 -p1 +popd +pushd libXTrap-* +%patch21 -p1 +popd %build for dir in libXft1-* xbitmaps-* $(ls | grep -v -e libXft1 -e xbitmaps); do @@ -325,6 +333,12 @@ exit 0 /usr/%{_lib}/libpciaccess.so %changelog +* Fri Jun 05 2009 eich@suse.de +- Add patches from Moblin: + * libXft: + . clean up header file. + * libXTrap: + . remove trapproto as Requires from pkgconfig file. * Fri May 29 2009 sndirsch@suse.de - xcb-util 0.3.5 * various issues fixed