pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/fonts/fontconfig Apply upstream patch for https://bugs...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ee25033fecd2
branches:  trunk
changeset: 363030:ee25033fecd2
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Tue May 30 16:53:14 2017 +0000

description:
Apply upstream patch for https://bugs.freedesktop.org/show_bug.cgi?id=97546
which fixes cache generation on OSX.  Raised in joyent/pkgsrc#506.

Bump PKGREVISION.

diffstat:

 fonts/fontconfig/Makefile                    |   3 +-
 fonts/fontconfig/distinfo                    |   3 +-
 fonts/fontconfig/patches/patch-src_fccache.c |  37 ++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 2 deletions(-)

diffs (70 lines):

diff -r a48dfc7a7fa8 -r ee25033fecd2 fonts/fontconfig/Makefile
--- a/fonts/fontconfig/Makefile Tue May 30 16:15:32 2017 +0000
+++ b/fonts/fontconfig/Makefile Tue May 30 16:53:14 2017 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.97 2016/09/18 13:18:20 wiz Exp $
+# $NetBSD: Makefile,v 1.98 2017/05/30 16:53:14 jperkin Exp $
 
 DISTNAME=      fontconfig-2.12.1
+PKGREVISION=   1
 CATEGORIES=    fonts
 MASTER_SITES=  http://www.fontconfig.org/release/
 EXTRACT_SUFX=  .tar.bz2
diff -r a48dfc7a7fa8 -r ee25033fecd2 fonts/fontconfig/distinfo
--- a/fonts/fontconfig/distinfo Tue May 30 16:15:32 2017 +0000
+++ b/fonts/fontconfig/distinfo Tue May 30 16:53:14 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.55 2016/08/19 12:52:30 wiz Exp $
+$NetBSD: distinfo,v 1.56 2017/05/30 16:53:14 jperkin Exp $
 
 SHA1 (fontconfig-2.12.1.tar.bz2) = 30d832b754fb10a3b70ebac750a38a0275438ad8
 RMD160 (fontconfig-2.12.1.tar.bz2) = 66907dbb317309bcb5013ea45c53dbf5050e6376
@@ -9,6 +9,7 @@
 SHA1 (patch-af) = d351265c894738284215f0bb38d47cc1c8f28ec7
 SHA1 (patch-configure) = 4256c69b24e57d92e7b3bc9b4640d822d782ec3e
 SHA1 (patch-scandir.c) = e35f4c005f635dd0d8bb949cd32aa34f5e314200
+SHA1 (patch-src_fccache.c) = 5215a9ae314625f1f088011cb0a5f085d963ee83
 SHA1 (patch-src_fccharset.c) = f3855554b3b3cab2530b46bc1ccec6a33303de7a
 SHA1 (patch-src_fcftint.h) = d629fd7ef9713ccc56800d033ba2e09c5a9e2bff
 SHA1 (patch-src_fcint.h) = 13602cc605d7dadd2f7c30633236454bb134a50a
diff -r a48dfc7a7fa8 -r ee25033fecd2 fonts/fontconfig/patches/patch-src_fccache.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/fonts/fontconfig/patches/patch-src_fccache.c      Tue May 30 16:53:14 2017 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-src_fccache.c,v 1.1 2017/05/30 16:53:14 jperkin Exp $
+
+Apply upstream patch for https://bugs.freedesktop.org/show_bug.cgi?id=97546
+
+--- src/fccache.c.orig 2016-08-05 05:35:05.000000000 +0000
++++ src/fccache.c
+@@ -640,6 +640,7 @@ FcCacheOffsetsValid (FcCache *cache)
+             FcPattern         *font = FcFontSetFont (fs, i);
+             FcPatternElt      *e;
+             FcValueListPtr     l;
++          char                *last_offset;
+ 
+             if ((char *) font < base ||
+                 (char *) font > end - sizeof (FcFontSet) ||
+@@ -653,11 +654,17 @@ FcCacheOffsetsValid (FcCache *cache)
+             if (e->values != 0 && !FcIsEncodedOffset(e->values))
+                 return FcFalse;
+ 
+-            for (j = font->num, l = FcPatternEltValues(e); j >= 0 && l; j--, l = FcValueListNext(l))
+-                if (l->next != NULL && !FcIsEncodedOffset(l->next))
+-                    break;
+-            if (j < 0)
+-                return FcFalse;
++          for (j = 0; j < font->num; j++)
++          {
++              last_offset = (char *) font + font->elts_offset;
++              for (l = FcPatternEltValues(&e[j]); l; l = FcValueListNext(l))
++              {
++                  if ((char *) l < last_offset || (char *) l > end - sizeof (*l) ||
++                      (l->next != NULL && !FcIsEncodedOffset(l->next)))
++                      return FcFalse;
++                  last_offset = (char *) l + 1;
++              }
++          }
+         }
+     }
+ 



Home | Main Index | Thread Index | Old Index