[Pkg-sdl-commits] [SCM] Packaging of SDL_ttf branch, master, updated. debian/2.0.9-1.1-24-gc5308a4

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Sat Mar 3 18:25:14 UTC 2012


The following commit has been merged in the master branch:
commit b940162684ac88d9ffa2be3ecfeb2222a9fc9027
Author: Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
Date:   Sat Mar 3 16:13:34 2012 +0000

    Added patch for "Lack of error reporting for glyph rendering errors" (Closes: #405378)
    
    Thanks Kevin Locke for the report and providing the the fix (accepted upstream already).

diff --git a/debian/changelog b/debian/changelog
index 436b0da..4d21135 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ sdl-ttf2.0 (2.0.11-2) unstable; urgency=low
       package-needs-versioned-debhelper-build-depends 9
   * Added patch for "TTF_RenderGlyph_Shaded is broken" (Closes: #661987), thanks
     Ying-Chun Liu (PaulLiu) for the report and pointing to the fix.
+  * Added patch for "Lack of error reporting for glyph rendering errors"
+    (Closes: #405378), thanks Kevin Locke for the report and providing the the
+    fix (accepted upstream already).
 
  -- Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>  Sat, 03 Mar 2012 15:46:34 +0000
 
diff --git a/debian/patches/fix_bug_405378_error_reporting_upstream_b09799bf8dff b/debian/patches/fix_bug_405378_error_reporting_upstream_b09799bf8dff
new file mode 100644
index 0000000..fe2f2cb
--- /dev/null
+++ b/debian/patches/fix_bug_405378_error_reporting_upstream_b09799bf8dff
@@ -0,0 +1,86 @@
+Description: Better error reporting
+ Introduced in 2.0.11-2 (Sat, 03 Mar 2012).
+ .
+ Applied Upstream: http://hg.libsdl.org/SDL_ttf/rev/b09799bf8dff
+Author: Kevin Locke <kwl7 at cornell.edu>
+Last-Update: 2012-03-03
+Bug-Debian: http://bugs.debian.org/405378
+Forwarded: http://bugzilla.libsdl.org/show_bug.cgi?id=1400
+
+# HG changeset patch
+# User Sam Lantinga <slouken at libsdl.org>
+# Date 1327764534 18000
+# Node ID b09799bf8dff36eca61ecc5272cfdcce39b6b186
+# Parent  077db903bfdf89f6cb9a32e8be1f3e5c95d429b4
+Fixed bug 1400 - Lack of error reporting for glyph rendering errors
+
+  I was just bitten by bug 374062 (any word if this will be fixed for
+  etch given that it is fixed upstream?), and found that there is no
+  error message set by sdl-ttf when it is unable to render a glyph,
+  which makes bugs like this a bit more difficult to track down.  I
+  would really appreciate it if TTF_GetError() could return a useful
+  message in such situations.  The attached patch does just that by
+  duplicating the existing error reporting for calls to Find_Glyph()
+  into the places where it is missing, although it might be nice to know
+  which glyph it was that could not be found...
+
+diff -r 077db903bfdf -r b09799bf8dff SDL_ttf.c
+--- a/SDL_ttf.c	Fri Jan 20 20:35:28 2012 -0500
++++ b/SDL_ttf.c	Sat Jan 28 10:28:54 2012 -0500
+@@ -1155,6 +1155,7 @@
+ 
+ 		error = Find_Glyph(font, c, CACHED_METRICS);
+ 		if ( error ) {
++			TTF_SetFTError("Couldn't find glyph", error);
+ 			return -1;
+ 		}
+ 		glyph = font->current;
+@@ -1364,6 +1365,7 @@
+ 
+ 		error = Find_Glyph(font, c, CACHED_METRICS|CACHED_BITMAP);
+ 		if( error ) {
++			TTF_SetFTError("Couldn't find glyph", error);
+ 			SDL_FreeSurface( textbuf );
+ 			return NULL;
+ 		}
+@@ -1438,6 +1440,7 @@
+ 	/* Get the glyph itself */
+ 	error = Find_Glyph(font, ch, CACHED_METRICS|CACHED_BITMAP);
+ 	if ( error ) {
++		TTF_SetFTError("Couldn't find glyph", error);
+ 		return(NULL);
+ 	}
+ 	glyph = font->current;
+@@ -1630,6 +1633,7 @@
+ 
+ 		error = Find_Glyph(font, c, CACHED_METRICS|CACHED_PIXMAP);
+ 		if( error ) {
++			TTF_SetFTError("Couldn't find glyph", error);
+ 			SDL_FreeSurface( textbuf );
+ 			return NULL;
+ 		}
+@@ -1711,6 +1715,7 @@
+ 	/* Get the glyph itself */
+ 	error = Find_Glyph(font, ch, CACHED_METRICS|CACHED_PIXMAP);
+ 	if( error ) {
++		TTF_SetFTError("Couldn't find glyph", error);
+ 		return NULL;
+ 	}
+ 	glyph = font->current;
+@@ -1887,6 +1892,7 @@
+ 		}
+ 		error = Find_Glyph(font, c, CACHED_METRICS|CACHED_PIXMAP);
+ 		if( error ) {
++			TTF_SetFTError("Couldn't find glyph", error);
+ 			SDL_FreeSurface( textbuf );
+ 			return NULL;
+ 		}
+@@ -1967,6 +1973,7 @@
+ 	/* Get the glyph itself */
+ 	error = Find_Glyph(font, ch, CACHED_METRICS|CACHED_PIXMAP);
+ 	if ( error ) {
++		TTF_SetFTError("Couldn't find glyph", error);
+ 		return(NULL);
+ 	}
+ 	glyph = font->current;
+
diff --git a/debian/patches/series b/debian/patches/series
index 64c0b93..565adce 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 link_libm_ftbfs_binutils-gold
 fix_bug_661987_TTF_RenderGlyph_Shaded_is_broken
+fix_bug_405378_error_reporting_upstream_b09799bf8dff

-- 
Packaging of SDL_ttf



More information about the pkg-sdl-commits mailing list