rpms/fontconfig/FC-5 fontconfig-2.3.95-ppc64.patch, NONE, 1.1 fontconfig.spec, 1.73, 1.74

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Dec 13 02:05:50 UTC 2006


Author: besfahbo

Update of /cvs/dist/rpms/fontconfig/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv8322

Modified Files:
	fontconfig.spec 
Added Files:
	fontconfig-2.3.95-ppc64.patch 
Log Message:
* Tue Dec 12 2006 Behdad Esfahbod <besfahbo at redhat.com> - 2.3.94-2.fc5
- Add -ppc64 patch.  Should fix #211383.


fontconfig-2.3.95-ppc64.patch:
 fccache.c |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

--- NEW FILE fontconfig-2.3.95-ppc64.patch ---
--- fontconfig-2.3.94/src/fccache.c.ppc64	2006-12-12 20:25:49.000000000 -0500
+++ fontconfig-2.3.94/src/fccache.c	2006-12-12 20:57:24.000000000 -0500
@@ -35,6 +35,8 @@
 
 #define ENDIAN_TEST 0x12345678
 #define MACHINE_SIGNATURE_SIZE (9 + 5*20 + 1)
+#define FC_HARDCODED_PAGESIZE 8192 
+#define FC_MAX_PAGESIZE 0xfffff
 
 #ifndef O_BINARY
 #define O_BINARY 0
@@ -1428,10 +1430,28 @@
     static char buf[MACHINE_SIGNATURE_SIZE];
     int32_t magic = ENDIAN_TEST;
     char * m = (char *)&magic;
+    long page_size;
 
-    sprintf (buf, "%2x%2x%2x%2x "
+#if defined (HAVE_SYSCONF)
+    page_size = sysconf(_SC_PAGESIZE);
+#else
+    page_size = -1;
+#endif
+
+    if (page_size < 0)
+	    page_size = FC_HARDCODED_PAGESIZE;
+
+    if (page_size > FC_MAX_PAGESIZE)
+    {
+	    page_size = FC_MAX_PAGESIZE;
+	    fprintf (stderr, "system page size is bigger than expected\n");
+    }
+
+    snprintf (buf, 
+	      sizeof (buf),
+	     "%2x%2x%2x%2x "
 	     "%4x %4x %4x %4x %4x %4x %4x %4x %4x %4x %4x %4x "
-	     "%4x %4x %4x %4x %4x %4x %4x %4x\n", 
+	     "%4x %4x %4x %4x %4x %4x %4x%5x\n", 
 	     m[0], m[1], m[2], m[3],
 	     (unsigned int)sizeof (char),
 	     (unsigned int)sizeof (char *),
@@ -1452,7 +1472,7 @@
 	     (unsigned int)sizeof (FcCharLeaf),
 	     (unsigned int)sizeof (FcChar32),
 	     (unsigned int)sizeof (FcCache),
-	     (unsigned int)sysconf(_SC_PAGESIZE));
+	     (unsigned int)page_size);
 
     return buf;
 }


Index: fontconfig.spec
===================================================================
RCS file: /cvs/dist/rpms/fontconfig/FC-5/fontconfig.spec,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- fontconfig.spec	2 Jun 2006 17:08:39 -0000	1.73
+++ fontconfig.spec	13 Dec 2006 02:05:48 -0000	1.74
@@ -3,7 +3,7 @@
 Summary: Font configuration and customization library
 Name: fontconfig
 Version: 2.3.94
-Release: 1.fc5.1
+Release: 2.fc5
 License: MIT
 Group: System Environment/Libraries
 Source: http://fontconfig.org/release/fontconfig-%{version}.tar.gz
@@ -16,6 +16,7 @@
 Patch2: fontconfig-2.3.93.cvs20060211-move-user-cache.patch
 Patch3: fontconfig-2.4-cmap-parsing.patch
 Patch4: fontconfig-2.3.95-ttf-collections.patch
+Patch5: fontconfig-2.3.95-ppc64.patch
 
 BuildRequires: freetype-devel >= %{freetype_version}
 BuildRequires: expat-devel
@@ -55,6 +56,7 @@
 %patch2 -p1 -b .move-user-cache
 %patch3 -p1 -b .cmap-parsing
 %patch4 -p1 -b .ttf-collections
+%patch5 -p1 -b .ppc64
 
 %build
 %configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/OTF
@@ -139,6 +141,9 @@
 %{_mandir}/man3/*
 
 %changelog
+* Tue Dec 12 2006 Behdad Esfahbod <besfahbo at redhat.com> - 2.3.94-2.fc5
+- Add -ppc64 patch.  Should fix #211383.
+
 * Fri Jun  2 2006 Matthias Clasen <mclasen at redhat.com> - 2.3.94-1.fc5.1
 - Fix the handling of TTF font collections
 - Apply a patch by David Turner to speed up cache generation




More information about the fedora-cvs-commits mailing list