r6980 - in packages/branches/chromium/chromium-ftgl/debian: . patches

Samuel Hocevar sho at alioth.debian.org
Mon May 12 15:04:40 UTC 2008


Author: sho
Date: 2008-05-12 15:04:40 +0000 (Mon, 12 May 2008)
New Revision: 6980

Added:
   packages/branches/chromium/chromium-ftgl/debian/patches/70_ftgl.diff
Modified:
   packages/branches/chromium/chromium-ftgl/debian/changelog
   packages/branches/chromium/chromium-ftgl/debian/control
   packages/branches/chromium/chromium-ftgl/debian/patches/series
Log:
chromium (0.9.12-14~experimental1) experimental; urgency=low

  * debian/patches/70_ftgl.diff: use FTGL for font rendering instead of
    the current proprietary code.
  * debian/control: build-depend on libftgl-dev.
  * debian/control: depend on ttf-uralic so that we don't need to embed our
    own font.


Modified: packages/branches/chromium/chromium-ftgl/debian/changelog
===================================================================
--- packages/branches/chromium/chromium-ftgl/debian/changelog	2008-05-12 14:45:57 UTC (rev 6979)
+++ packages/branches/chromium/chromium-ftgl/debian/changelog	2008-05-12 15:04:40 UTC (rev 6980)
@@ -1,4 +1,4 @@
-chromium (0.9.12-14) UNRELEASED; urgency=low
+chromium (0.9.12-14~experimental1) experimental; urgency=low
 
   [ Reinhard Tartler ]
   * 50_fix-configure (Closes: #459056)
@@ -36,8 +36,15 @@
   * Ease backporting by relaxing the two versioned build-deps slightly
   * Fix some spelling errors
 
- -- Jon Dowland <jon at alcopop.org>  Thu, 12 Jul 2007 11:26:12 +0100
+  [ Sam Hocevar ]
+  * debian/patches/70_ftgl.diff: use FTGL for font rendering instead of
+    the current proprietary code.
+  * debian/control: build-depend on libftgl-dev.
+  * debian/control: depend on ttf-uralic so that we don't need to embed our
+    own font.
 
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Mon, 12 May 2008 17:04:11 +0200
+
 chromium (0.9.12-13) unstable; urgency=low
 
   * New maintainer (Closes: #417805).

Modified: packages/branches/chromium/chromium-ftgl/debian/control
===================================================================
--- packages/branches/chromium/chromium-ftgl/debian/control	2008-05-12 14:45:57 UTC (rev 6979)
+++ packages/branches/chromium/chromium-ftgl/debian/control	2008-05-12 15:04:40 UTC (rev 6980)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
 Uploaders: Sam Hocevar (Debian packages) <sam+deb at zoy.org>
-Build-Depends: debhelper (>= 5.0), quilt, libsdl1.2-dev (>= 1.2.2-3.1~), libsmpeg-dev, libopenal-dev (>= 0.2005080600), libalut-dev, libglpng-dev, libglu1-mesa-dev | libglu1-xorg-dev
+Build-Depends: debhelper (>= 5.0), quilt, libsdl1.2-dev (>= 1.2.2-3.1~), libsmpeg-dev, libopenal-dev (>= 0.2005080600), libalut-dev, libglpng-dev, libglu1-mesa-dev | libglu1-xorg-dev, libftgl-dev
 Standards-Version: 3.7.3
 Homepage: http://www.reptilelabour.com/software/chromium/
 Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/chromium/
@@ -11,7 +11,7 @@
 
 Package: chromium
 Architecture: any
-Depends: ${shlibs:Depends}, chromium-data (>= 0.9.12)
+Depends: ${shlibs:Depends}, chromium-data (>= 0.9.12), ttf-uralic
 Description: fast paced, arcade-style, scrolling space shooter
  Chromium is a top down fast paced high action scrolling space shooter
  which uses the SDL libs. In this game you are the captain of the

Added: packages/branches/chromium/chromium-ftgl/debian/patches/70_ftgl.diff
===================================================================
--- packages/branches/chromium/chromium-ftgl/debian/patches/70_ftgl.diff	                        (rev 0)
+++ packages/branches/chromium/chromium-ftgl/debian/patches/70_ftgl.diff	2008-05-12 15:04:40 UTC (rev 6980)
@@ -0,0 +1,353 @@
+Index: chromium-0.9.12/configure
+===================================================================
+--- chromium-0.9.12.orig/configure	2008-05-12 14:59:59.000000000 +0000
++++ chromium-0.9.12/configure	2008-05-12 14:59:59.000000000 +0000
+@@ -9,6 +9,7 @@
+ ###################################
+ ENABLE_SDL="yes"
+ ENABLE_SMPEG="yes"
++ENABLE_FTGL="yes"
+ ENABLE_VORBIS="no"
+ ENABLE_SETUP="yes"
+ 
+@@ -100,6 +101,24 @@
+ fi
+ 
+ 
++## Check FTGL installation
++######################################################################
++if [ $ENABLE_FTGL = "yes" ]; then
++	print_message ""
++	print_message "Verify FTGL install:"
++	print_message "------------------"
++	if check_for_ftgl_libs; then
++		print_message "found FTGL $(pkg-config --modversion ftgl)"
++		FTGL_LIBS="\$(shell pkg-config --libs ftgl)"
++		FTGL_CFLAGS="\$(shell pkg-config --cflags ftgl) -DUSE_FTGL"
++	else
++		print_ftgl_error
++		exit 1
++	fi
++else
++	: # FIXME: bail out with an error
++fi
++
+ ## Check Ogg/Vorbis installation
+ ######################################################################
+ if [ $ENABLE_VORBIS = "yes" ]; then
+@@ -171,12 +190,14 @@
+ echo "AL_CFLAGS    = $AL_CFLAGS"      >> config.mak
+ echo "SDL_CFLAGS   = $SDL_CFLAGS"     >> config.mak
+ echo "SMPEG_CFLAGS = $SMPEG_CFLAGS"   >> config.mak
++echo "FTGL_CFLAGS  = $FTGL_CFLAGS"    >> config.mak
+ echo "PKG_CFLAGS   = $PKG_CFLAGS"     >> config.mak
+ echo ""                               >> config.mak
+ echo "GL_LIBS      = $GL_LIBS"        >> config.mak
+ echo "AL_LIBS      = $AL_LIBS"        >> config.mak
+ echo "SDL_LIBS     = $SDL_LIBS"       >> config.mak
+ echo "SMPEG_LIBS   = $SMPEG_LIBS"     >> config.mak
++echo "FTGL_LIBS    = $FTGL_LIBS"      >> config.mak
+ echo "VORBIS_LIBS  = $VORBIS_LIBS"    >> config.mak
+ 
+ 
+Index: chromium-0.9.12/scripts/configure_functions
+===================================================================
+--- chromium-0.9.12.orig/scripts/configure_functions	2008-05-12 14:59:59.000000000 +0000
++++ chromium-0.9.12/scripts/configure_functions	2008-05-12 14:59:59.000000000 +0000
+@@ -183,6 +183,24 @@
+ }
+ 
+ ######################################################################
++function check_for_ftgl_libs
++{
++	if pkg-config --modversion ftgl >/dev/null 2>&1; then
++		return 0
++	fi
++	
++	return 1
++}
++
++function print_ftgl_error
++{
++	print_error "Chromium B.S.U. requires that FTGL version 2.1.3 or greater"
++	print_error "be installed. You can acquire the latest version of FTGL at"
++	print_error "http://ftgl.sf.net/"
++	print_error ""
++}
++
++######################################################################
+ function check_for_vorbis_libs
+ {
+ 	local directory
+Index: chromium-0.9.12/src/Global.cpp
+===================================================================
+--- chromium-0.9.12.orig/src/Global.cpp	2008-05-12 14:59:59.000000000 +0000
++++ chromium-0.9.12/src/Global.cpp	2008-05-12 14:59:59.000000000 +0000
+@@ -10,7 +10,7 @@
+ #include "HiScore.h"
+ #include "Config.h"
+ 
+-TexFont	*Global::texFont	= 0;
++FTFont	*Global::ftFont	= 0;
+ 
+ MainToolkit *Global::toolkit = 0;
+ 
+Index: chromium-0.9.12/src/Global.h
+===================================================================
+--- chromium-0.9.12.orig/src/Global.h	2001-04-11 16:04:40.000000000 +0000
++++ chromium-0.9.12/src/Global.h	2008-05-12 14:59:59.000000000 +0000
+@@ -12,7 +12,7 @@
+ #include <time.h>
+ 
+ #include "define.h"
+-#include "TexFont.h"
++#include <FTGL/ftgl.h>
+ #include "MainToolkit.h"
+ 
+ class HeroAircraft;
+@@ -55,7 +55,7 @@
+ 	
+ 	static bool 	mouseActive;
+ 	
+-	static TexFont	*texFont;
++	static FTFont	*ftFont;
+ 
+ 	static float	fps;
+ 	static int		frame;
+Index: chromium-0.9.12/src/MainGL.cpp
+===================================================================
+--- chromium-0.9.12.orig/src/MainGL.cpp	2001-05-21 01:48:38.000000000 +0000
++++ chromium-0.9.12/src/MainGL.cpp	2008-05-12 14:59:59.000000000 +0000
+@@ -97,23 +97,21 @@
+ //----------------------------------------------------------
+ void MainGL::loadTextures()
+ {
+-	GLuint	texobj;
+-	game->texFont = txfLoadFont( dataLoc("fonts/space.txf") );
+-	if(!game->texFont)
++	game->ftFont = new FTTextureFont("/usr/share/fonts/truetype/uralic/gothub__.ttf");
++	if(game->ftFont->Error())
+ 	{
++		delete game->ftFont;
+ 		fprintf(stderr, "\nERROR loading texture font. Check data path and try again.\n\n");
+ 		exit(1);
+ 	}
+-	glGenTextures(1, &texobj);
+-	txfEstablishTexture(game->texFont, texobj, GL_FALSE);
++	game->ftFont->FaceSize(24);
+ }
+ 
+ //----------------------------------------------------------
+ void MainGL::deleteTextures()
+ {
+-	glDeleteTextures(1, &game->texFont->texobj);
+-	txfUnloadFont(game->texFont);
+-	game->texFont = 0;
++	delete game->ftFont;
++	game->ftFont = 0;
+ }
+ 
+ //----------------------------------------------------------
+@@ -362,7 +360,7 @@
+ 		aa *= (-pulse/50.0);
+ 	ca = 1.0-tmp;
+ 
+-	height = 1.5*txfStringHeight(game->texFont);
++	height = 1.5 * game->ftFont->LineHeight();
+ 	
+ 	strncpy(buffer, string, 128);
+ 	index[0] = buffer;
+@@ -391,10 +389,9 @@
+ 
+ 				glPushMatrix();
+ 				glScalef(scale, scale*0.75, 1.0);
+-				width = txfStringLength(game->texFont, index[l], strlen(index[l]));
++				width = game->ftFont->Advance(index[l]).Xf();
+ 				glTranslatef(-(width/2.0)-x_sin, y+y_sin, 0.0);
+-				txfBindFontTexture(game->texFont);
+-				txfRenderString(game->texFont, index[l], strlen(index[l]));
++				game->ftFont->Render(index[l]);
+ 				glPopMatrix();
+ 
+ 			}
+Index: chromium-0.9.12/src/MenuGL.cpp
+===================================================================
+--- chromium-0.9.12.orig/src/MenuGL.cpp	2001-05-21 01:48:38.000000000 +0000
++++ chromium-0.9.12/src/MenuGL.cpp	2008-05-12 14:59:59.000000000 +0000
+@@ -256,7 +256,6 @@
+ 		glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+ 		drawElectric();
+ 		glPopMatrix();
+-		txfBindFontTexture(game->texFont);
+ 		glColor4f(1.0, 1.0, 1.0, 0.9);
+ 		float sc = 0.035;
+ 		for(i = 0; i < NumSelections; i++)
+@@ -265,7 +264,7 @@
+ 			glTranslatef(left, top+(inc*i), 10.0);
+ 			glRotatef(textAngle, 1.0, 0.0, 0.0);
+ 			glScalef(sc, sc*0.75, 1.0);
+-			txfRenderString(game->texFont, menuText[i], strlen(menuText[i]));
++			game->ftFont->Render(menuText[i]);
+ 			glPopMatrix();
+ 		}
+ 		
+@@ -277,7 +276,7 @@
+ 			glColor4f(1.0, 1.0, 1.0, 0.6+0.2*r);
+ 			glTranslatef(-18.75, -8.5, 0.0);
+ 			glScalef(sc, sc*0.75, 1.0);
+-			txfRenderString(game->texFont, "high scores", 11);
++			game->ftFont->Render("high scores");
+ 			glTranslatef(-100.0, -30.0, 0.0);
+ 			char buf[16];
+ 			int i,len;
+@@ -306,9 +305,9 @@
+ //				glColor4f(0.5+r*0.5, 0.5, 0.25-r*0.25, 0.2+0.2*r);
+ 				sprintf(buf, "%d", (int)hiScore->getScore(config->intSkill(), i) );
+ 				len = strlen(buf);
+-				trans = txfStringLength(game->texFont, buf, len);
++				trans = game->ftFont->Advance(buf).Xf();
+ 				glTranslatef( 80-trans, 0.0, 0.0);
+-				txfRenderString(game->texFont, buf, len);
++				game->ftFont->Render(buf);
+ 				glTranslatef(-80, -30.0, 0.0);
+ 			}
+ 			glPopMatrix();
+@@ -335,19 +334,19 @@
+ 			glTranslatef(-c*1.5, c, 0.0);
+ 			if(c < 3)	n = (int)c;
+ 			else		n = 3;
+-			txfRenderString(game->texFont, "the", n);
+-			glTranslatef(c-txfStringLength(game->texFont, "the", n), -38+c, 0.0);
++			game->ftFont->Render("the", n);
++			glTranslatef(c-game->ftFont->Advance("the", n).Xf(), -38+c, 0.0);
+ 			if(c < 10)	n = (int)(c-3);
+ 			else		n = 7;
+-			txfRenderString(game->texFont, "reptile", n);
+-			glTranslatef(c-txfStringLength(game->texFont, "reptile", n), -38+c, 0.0);
++			game->ftFont->Render("reptile", n);
++			glTranslatef(c-game->ftFont->Advance("reptile", n).Xf(), -38+c, 0.0);
+ 			if(c < 16)	n = (int)c-10;
+ 			else		n = 6;
+-			txfRenderString(game->texFont, "labour", n);
+-			glTranslatef(c-txfStringLength(game->texFont, "labour", n), -38+c, 0.0);
++			game->ftFont->Render("labour", n);
++			glTranslatef(c-game->ftFont->Advance("labour", n).Xf(), -38+c, 0.0);
+ 			if(c < 23)	n = (int)(c-16);
+ 			else		n = 7;
+-			txfRenderString(game->texFont, "project", n);
++			game->ftFont->Render("project", n);
+ 			// font height is 23
+ 			glPopMatrix();
+ 		}
+@@ -365,7 +364,7 @@
+ 			unsigned int	ti = (unsigned int)(112.0*mssgAlpha);
+ 			if(ti > strlen(mssgText))
+ 				ti = strlen(mssgText);
+-			txfRenderString(game->texFont, mssgText, ti);
++			game->ftFont->Render(mssgText, ti);
+ 			mssgAlpha -= 0.004;
+ 			glColor4f(1.0, 1.0, 1.0, 1.0);
+ 		}
+@@ -536,8 +535,7 @@
+ 			glColor4f(1.0, 1.0, 1.0, 0.5);
+ 			glTranslatef(11.0, 0.0, 0.0);
+ 			glScalef(sc, sc, 1.0);
+-			txfBindFontTexture(game->texFont);
+-			txfRenderString(game->texFont, buf, strlen(buf));
++			game->ftFont->Render(buf);
+ 		}
+ 		glPopMatrix();
+ 		
+Index: chromium-0.9.12/src/StatusDisplay.cpp
+===================================================================
+--- chromium-0.9.12.orig/src/StatusDisplay.cpp	2001-05-21 01:44:18.000000000 +0000
++++ chromium-0.9.12/src/StatusDisplay.cpp	2008-05-12 14:59:59.000000000 +0000
+@@ -159,20 +159,18 @@
+ 	glColor4f(1.0, 1.0, 1.0, 0.4);
+ 	glPushMatrix();
+ 		sprintf(scoreBuf, "%07d", (int)hero->getScore());
+-		txfBindFontTexture(game->texFont);
+ 		glTranslatef(-9.0, -8.2, 25.0);
+ 		glScalef(0.025, 0.02, 1.0);
+-		txfRenderString(game->texFont, scoreBuf, strlen(scoreBuf));
++		game->ftFont->Render(scoreBuf);
+ 	glPopMatrix();
+ 	//-- draw fps
+ 	if(config->showFPS())
+ 	{
+ 		glPushMatrix();
+ 			sprintf(scoreBuf, "%3.1f", game->fps);
+-			txfBindFontTexture(game->texFont);
+ 			glTranslatef(7.75, 8.0, 25.0);
+ 			glScalef(0.018, 0.015, 1.0);
+-			txfRenderString(game->texFont, scoreBuf, strlen(scoreBuf));
++			game->ftFont->Render(scoreBuf);
+ 		glPopMatrix();
+ 	}
+ 	
+@@ -633,16 +631,15 @@
+ 		off[0] = 2.0 * sin(game->frame*0.01);
+ 		off[1] = 1.0 * cos(game->frame*0.011);
+ 		glPushMatrix();
+-		txfBindFontTexture(game->texFont);
+ 		glTranslatef(-14.5, -3.0, 0.0);
+ 		glScalef(0.21, 0.21, 1.0);
+ 		glPushMatrix();
+ 		glColor4f(1.0, 1.0, 1.0, 0.10*fabs(sin(game->frame*0.05)) );
+-		txfRenderString(game->texFont, "p a u s e d", 11);
++		game->ftFont->Render("p a u s e d");
+ 		glPopMatrix();
+ 		glColor4f(1.0, 1.0, 1.0, 0.10*fabs(sin(game->frame*0.03)) );
+ 		glTranslatef(off[0], off[1], 0.0);
+-		txfRenderString(game->texFont, "p a u s e d", 11);
++		game->ftFont->Render("p a u s e d");
+ 		glPopMatrix();
+ 	}
+ 	if( game->tipShipPast == 1 && game->gameLevel == 1)
+@@ -659,24 +656,22 @@
+ 	{
+ 		tipShipShow--;
+ 		glPushMatrix();
+-		txfBindFontTexture(game->texFont);
+ 		glTranslatef(-16, 13.0, 0.0);
+ 		glScalef(0.035, 0.035, 1.0);
+ 		glColor4f(1.0, 1.0, 1.0, tipShipShow/300.0 );
+ 		char *str = "do not let -any- ships past you! each one costs you a life!";
+-		txfRenderString(game->texFont, str, strlen(str));
++		game->ftFont->Render(str);
+ 		glPopMatrix();
+ 	}
+ 	if(	tipSuperShow > 0 )
+ 	{
+ 		tipSuperShow--;
+ 		glPushMatrix();
+-		txfBindFontTexture(game->texFont);
+ 		glTranslatef(-16, 13.0, 0.0);
+ 		glScalef(0.035, 0.035, 1.0);
+ 		glColor4f(1.0, 1.0, 1.0, tipSuperShow/300.0 );
+ 		char *str = "let super shields pass by for an extra life!";
+-		txfRenderString(game->texFont, str, strlen(str));
++		game->ftFont->Render(str);
+ 		glPopMatrix();
+ 	}
+ }
+Index: chromium-0.9.12/src/Makefile
+===================================================================
+--- chromium-0.9.12.orig/src/Makefile	2008-05-12 15:00:03.000000000 +0000
++++ chromium-0.9.12/src/Makefile	2008-05-12 15:00:22.000000000 +0000
+@@ -11,12 +11,12 @@
+ DATA	=	/usr/share/games/chromium/
+ CC	=	gcc
+ CXX	=	g++
+-CFLAGS	=	-pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -Wall -W -g -O2 -DAUDIO_OPENAL -D_REENTRANT -DPKGDATADIR=\"$(DATA)\"
+-CXXFLAGS=	-pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) -Wall -W -g -O2 -DAUDIO_OPENAL -D_REENTRANT -DPKGDATADIR=\"$(DATA)\"
++CFLAGS	=	-pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) $(FTGL_CFLAGS) -Wall -W -g -O2 -DAUDIO_OPENAL -D_REENTRANT -DPKGDATADIR=\"$(DATA)\"
++CXXFLAGS=	-pipe $(PKG_CFLAGS) $(AL_CFLAGS) $(SDL_CFLAGS) $(SMPEG_CFLAGS) $(FTGL_CFLAGS) -Wall -W -g -O2 -DAUDIO_OPENAL -D_REENTRANT -DPKGDATADIR=\"$(DATA)\"
+ INCPATH	=	-I/usr/X11R6/include
+ LINK	=	g++
+ LFLAGS	=	
+-LIBS	=	$(SUBLIBS) $(GL_LIBS) $(AL_LIBS) $(SDL_LIBS) $(SMPEG_LIBS) $(VORBIS_LIBS)
++LIBS	=	$(SUBLIBS) $(GL_LIBS) $(AL_LIBS) $(SDL_LIBS) $(SMPEG_LIBS) $(FTGL_LIBS) $(VORBIS_LIBS)
+ MOC	=	$(QTDIR)/bin/moc
+ UIC	=	$(QTDIR)/bin/uic
+ 

Modified: packages/branches/chromium/chromium-ftgl/debian/patches/series
===================================================================
--- packages/branches/chromium/chromium-ftgl/debian/patches/series	2008-05-12 14:45:57 UTC (rev 6979)
+++ packages/branches/chromium/chromium-ftgl/debian/patches/series	2008-05-12 15:04:40 UTC (rev 6980)
@@ -11,3 +11,4 @@
 50_fix-configure
 55_mouse-restart
 60_user_data.patch -p0
+70_ftgl.diff




More information about the Pkg-games-commits mailing list