r3896 - in packages/trunk/hex-a-hop/debian: . patches

Jens Seidel jseidel-guest at alioth.debian.org
Mon Aug 27 22:35:30 UTC 2007


Author: jseidel-guest
Date: 2007-08-27 22:35:29 +0000 (Mon, 27 Aug 2007)
New Revision: 3896

Added:
   packages/trunk/hex-a-hop/debian/patches/bug439393.patch
Modified:
   packages/trunk/hex-a-hop/debian/changelog
   packages/trunk/hex-a-hop/debian/patches/series
Log:
* Use just another SDL Pango workaround for #439855.
  Closes: #439393


Modified: packages/trunk/hex-a-hop/debian/changelog
===================================================================
--- packages/trunk/hex-a-hop/debian/changelog	2007-08-27 20:59:29 UTC (rev 3895)
+++ packages/trunk/hex-a-hop/debian/changelog	2007-08-27 22:35:29 UTC (rev 3896)
@@ -19,6 +19,8 @@
   * Avoid segmentation fault on 64 bit systems on start by
     using a workaround for #439071. Closes: #438800
   * Old font code removed. Compare: #438857
+  * Use just another SDL Pango workaround for #439855.
+    Closes: #439393
   * Increased a few short arrays containing translated
     strings. Especially 40 bytes for optionSlotName are too
     short for Russian and Bulgarian (in UTF-8 encoding).

Added: packages/trunk/hex-a-hop/debian/patches/bug439393.patch
===================================================================
--- packages/trunk/hex-a-hop/debian/patches/bug439393.patch	                        (rev 0)
+++ packages/trunk/hex-a-hop/debian/patches/bug439393.patch	2007-08-27 22:35:29 UTC (rev 3896)
@@ -0,0 +1,31 @@
+# Copyright (C) 2007  Jens Seidel <jensseidel at users.sf.net>
+# Licensed under the GPL, see /usr/share/common-licenses/GPL
+
+Index: hex-a-hop.svn/gfx.cpp
+===================================================================
+--- hex-a-hop.svn.orig/gfx.cpp	2007-08-28 00:31:39.000000000 +0200
++++ hex-a-hop.svn/gfx.cpp	2007-08-28 00:34:48.000000000 +0200
+@@ -197,6 +197,7 @@
+ 	if (text_utf8.size() == 0 || text_utf8.size() == 1 && text_utf8[0]==127)
+ 		return;
+ 	assert(text_utf8.find("\n") == std::string::npos);
++	SDLPango_SetMinimumSize(context, SCREEN_W, 0);
+ 	SDLPango_SetText(context, text_utf8.c_str(), -1);
+ 	SDL_Surface *surface = SDLPango_CreateSurfaceDraw(context);
+ 	SDL_Rect dst = {x, y, 1, 1};
+@@ -221,8 +222,14 @@
+ 	// http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439071
+ 	if (text_utf8.size() == 0 || text_utf8.size() == 1 && text_utf8[0]==127)
+ 		return;
+-	assert(width>0);
++	if (width<=0)
++		return;
+ 	SDLPango_SetMinimumSize(context, width, 0);
++	int real_width = SDLPangoTextWidth(text_utf8);
++	// Workaround for a crash in SDL Pango, see
++	// http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439855
++	if (real_width>width)
++		SDLPango_SetMinimumSize(context, real_width, 0);
+ 
+ 	// SDLPango_SetText_GivenAlignment is not (yet?) part of the official Pango
+ 	// distribution, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=437865

Modified: packages/trunk/hex-a-hop/debian/patches/series
===================================================================
--- packages/trunk/hex-a-hop/debian/patches/series	2007-08-27 20:59:29 UTC (rev 3895)
+++ packages/trunk/hex-a-hop/debian/patches/series	2007-08-27 22:35:29 UTC (rev 3896)
@@ -10,3 +10,4 @@
 array_subscripts_warning.patch
 i18n_increase_array_sizes.patch
 mouse_cursor_without_font.patch
+bug439393.patch




More information about the Pkg-games-commits mailing list