[arch-commits] CVS update of arch/build/lib/cairo (2 files)

Jan de Groot jgc at archlinux.org
Mon Jun 11 22:03:16 UTC 2007


    Date: Monday, June 11, 2007 @ 18:03:16
  Author: jgc
    Path: /home/cvs-arch/arch/build/lib/cairo

   Added: cairo-scaled-font-check.patch (1.1)
Modified: PKGBUILD (1.19 -> 1.20)

upgpkg: cairo 1.4.6-2
Revert to 1.4.6, fixes openoffice crashes. Add backport to fix 0-sized fontrendering crashes


-------------------------------+
 PKGBUILD                      |   14 ++++--
 cairo-scaled-font-check.patch |   83 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+), 5 deletions(-)


Index: arch/build/lib/cairo/PKGBUILD
diff -u arch/build/lib/cairo/PKGBUILD:1.19 arch/build/lib/cairo/PKGBUILD:1.20
--- arch/build/lib/cairo/PKGBUILD:1.19	Sun Jun 10 10:48:57 2007
+++ arch/build/lib/cairo/PKGBUILD	Mon Jun 11 18:03:14 2007
@@ -1,22 +1,26 @@
-# $Id: PKGBUILD,v 1.19 2007/06/10 14:48:57 jgc Exp $
+# $Id: PKGBUILD,v 1.20 2007/06/11 22:03:14 jgc Exp $
 # Maintainer: Jan de Groot <jgc at archlinux.org>
 # Contributor: Brice Carpentier <brice at daknet.org>
 
 pkgname=cairo
-pkgver=1.4.8
-pkgrel=1
+pkgver=1.4.6
+pkgrel=2
 pkgdesc="Cairo vector graphics library"
+force=y
 arch=(i686 x86_64)
 license=('LGPL' 'MPL')
 url="http://cairographics.org/"
 depends=('libpng' 'libxrender' 'fontconfig')
 makedepends=('pkgconfig')
 options=('!libtool')
-source=(http://cairographics.org/releases/${pkgname}-${pkgver}.tar.gz)
-md5sums=('5b9db574c9fbb94ce52047600190a1ba')
+source=(http://cairographics.org/releases/${pkgname}-${pkgver}.tar.gz
+	cairo-scaled-font-check.patch)
+md5sums=('ae16e73f9dca46ac93b4ce435e93773c'
+         'bdd8d1be49e133566d005123a2768a25')
 
 build() {
   cd ${startdir}/src/${pkgname}-${pkgver}
+  patch -Np1 -R -i ${startdir}/src/cairo-scaled-font-check.patch || return 1
   ./configure --prefix=/usr
   make || return 1
   make DESTDIR=${startdir}/pkg install
Index: arch/build/lib/cairo/cairo-scaled-font-check.patch
diff -u /dev/null arch/build/lib/cairo/cairo-scaled-font-check.patch:1.1
--- /dev/null	Mon Jun 11 18:03:16 2007
+++ arch/build/lib/cairo/cairo-scaled-font-check.patch	Mon Jun 11 18:03:16 2007
@@ -0,0 +1,83 @@
+diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
+index ad560cd..3787aeb 100644
+--- a/src/cairo-gstate.c
++++ b/src/cairo-gstate.c
+@@ -1464,10 +1464,11 @@ _cairo_gstate_ensure_scaled_font (cairo_gstate_t *gstate)
+ 						    &gstate->font_matrix,
+ 						    &gstate->ctm,
+ 						    &options);
++    if (gstate->scaled_font == NULL)
++	return CAIRO_STATUS_NO_MEMORY;
+ 
+-    status = cairo_scaled_font_status (gstate->scaled_font);
+-    if (status)
+-	return status;
++    if (cairo_scaled_font_status (gstate->scaled_font))
++	return cairo_scaled_font_status (gstate->scaled_font);
+ 
+     return CAIRO_STATUS_SUCCESS;
+ }
+diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
+index 3489ee6..fa5a8b4 100644
+--- a/src/cairo-scaled-font-subsets.c
++++ b/src/cairo-scaled-font-subsets.c
+@@ -531,8 +531,6 @@ _cairo_scaled_font_subsets_map_glyph (cairo_scaled_font_subsets_t	*subsets,
+                                                       &identity,
+                                                       &identity,
+                                                       &font_options);
+-	    if (unscaled_font->status)
+-		return unscaled_font->status;
+ 
+             subset_glyph->is_scaled = FALSE;
+             type1_font = FALSE;
+diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
+index 40ff698..d6726b3 100644
+--- a/src/cairo-scaled-font.c
++++ b/src/cairo-scaled-font.c
+@@ -135,9 +135,6 @@ _cairo_scaled_font_set_error (cairo_scaled_font_t *scaled_font,
+ cairo_font_type_t
+ cairo_scaled_font_get_type (cairo_scaled_font_t *scaled_font)
+ {
+-    if (scaled_font->ref_count == CAIRO_REF_COUNT_INVALID)
+-	return CAIRO_FONT_TYPE_TOY;
+-
+     return scaled_font->backend->type;
+ }
+ 
+@@ -773,13 +770,10 @@ cairo_scaled_font_text_extents (cairo_scaled_font_t   *scaled_font,
+ 				const char            *utf8,
+ 				cairo_text_extents_t  *extents)
+ {
+-    cairo_status_t status;
++    cairo_status_t status = CAIRO_STATUS_SUCCESS;
+     cairo_glyph_t *glyphs;
+     int num_glyphs;
+ 
+-    if (scaled_font->status)
+-	return;
+-
+     status = _cairo_scaled_font_text_to_glyphs (scaled_font, 0., 0., utf8, &glyphs, &num_glyphs);
+     if (status) {
+         _cairo_scaled_font_set_error (scaled_font, status);
+@@ -813,7 +807,7 @@ cairo_scaled_font_glyph_extents (cairo_scaled_font_t   *scaled_font,
+ 				 int                    num_glyphs,
+ 				 cairo_text_extents_t  *extents)
+ {
+-    cairo_status_t status;
++    cairo_status_t status = CAIRO_STATUS_SUCCESS;
+     int i;
+     double min_x = 0.0, min_y = 0.0, max_x = 0.0, max_y = 0.0;
+     cairo_bool_t visible = FALSE;
+diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c
+index 3872777..3a0bd12 100644
+--- a/src/cairo-type1-fallback.c
++++ b/src/cairo-type1-fallback.c
+@@ -106,7 +106,7 @@ cairo_type1_font_create (cairo_scaled_font_subset_t  *scaled_font_subset,
+ 							&font_matrix,
+ 							&ctm,
+ 							&font_options);
+-    if (font->type1_scaled_font->status)
++    if (font->type1_scaled_font == NULL)
+         goto fail;
+ 
+     _cairo_array_init (&font->contents, sizeof (unsigned char));




More information about the arch-commits mailing list