r6542 - in packages/trunk/vegastrike/debian: . patches

Vincent Fourmond fourmond at alioth.debian.org
Mon Apr 14 23:49:19 UTC 2008


Author: fourmond
Date: 2008-04-14 23:49:18 +0000 (Mon, 14 Apr 2008)
New Revision: 6542

Added:
   packages/trunk/vegastrike/debian/patches/fix-mips.diff
Modified:
   packages/trunk/vegastrike/debian/changelog
   packages/trunk/vegastrike/debian/patches/series
Log:
[vegastrike] Fix a rather unexpected FTBS on mips arches because of a variable called mips...

Modified: packages/trunk/vegastrike/debian/changelog
===================================================================
--- packages/trunk/vegastrike/debian/changelog	2008-04-13 21:58:38 UTC (rev 6541)
+++ packages/trunk/vegastrike/debian/changelog	2008-04-14 23:49:18 UTC (rev 6542)
@@ -1,9 +1,11 @@
-vegastrike (0.5~svn12126-2) UNRELEASED; urgency=low
+vegastrike (0.5~svn12126-2) unstable; urgency=low
 
-  * NOT RELEASED YET
+  * Oops, the mips and mipsel architectures really don't like when
+    variables are called mips... Added fix-mips.diff to fix that 
+    (closes: #475961)
+  
+ -- Vincent Fourmond <fourmond at debian.org>  Tue, 15 Apr 2008 01:06:46 +0200
 
- -- Vincent Fourmond <fourmond at debian.org>  Sun, 13 Apr 2008 14:50:12 +0200
-
 vegastrike (0.5~svn12126-1) unstable; urgency=low
 
   [ Barry deFreese ]

Added: packages/trunk/vegastrike/debian/patches/fix-mips.diff
===================================================================
--- packages/trunk/vegastrike/debian/patches/fix-mips.diff	                        (rev 0)
+++ packages/trunk/vegastrike/debian/patches/fix-mips.diff	2008-04-14 23:49:18 UTC (rev 6542)
@@ -0,0 +1,60 @@
+Index: vegastrike-0.5~svn12126/src/gldrv/gl_texture.cpp
+===================================================================
+--- vegastrike-0.5~svn12126.orig/src/gldrv/gl_texture.cpp	2008-04-15 01:06:12.000000000 +0200
++++ vegastrike-0.5~svn12126/src/gldrv/gl_texture.cpp	2008-04-15 01:06:26.000000000 +0200
+@@ -694,9 +694,9 @@
+ 	int offset1 = 2;
+ 	char mipmapbuf[3] = {buffer[0],buffer[1],'\0'};
+ //	printf("mipmaps char form : %s \n",mipmapbuf);
+-	int mips =  0;
++	int my_mips_variable =  0;
+ 	if(internformat >= DXT1 && internformat <= DXT5)
+-		mips = atoi(mipmapbuf);
++		my_mips_variable = atoi(mipmapbuf);
+ 	// If datatype is png, we aren't compressing it
+ 	if(internformat >= PNGPALETTE8){
+ 		gl_options.compression = false;
+@@ -738,7 +738,7 @@
+ 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);			
+ 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ 		 if(internformat >= DXT1 && internformat <= DXT5){
+-		 	if(textures[handle].width > 8 && textures[handle].height > 8 && mips > 0){
++		 	if(textures[handle].width > 8 && textures[handle].height > 8 && my_mips_variable > 0){
+ 		 		offset1 += ((textures[handle].width +3)/4)*((textures[handle].height +3)/4) * blocksize;
+ 				textures[handle].width >>=1;
+ 				textures[handle].height >>=1;
+@@ -752,7 +752,7 @@
+ 		blocksize = 8;
+ 
+ 	if(internformat >= DXT1 && internformat <= DXT5){
+-		while((textures[handle].width > maxdimension || textures[handle].height > maxdimension) && mips > 0){
++		while((textures[handle].width > maxdimension || textures[handle].height > maxdimension) && my_mips_variable > 0){
+ 			offset1 += ((textures[handle].width +3)/4)*((textures[handle].height +3)/4) * blocksize;
+ 			textures[handle].width >>=1;
+ 			textures[handle].height >>=1;
+@@ -829,21 +829,21 @@
+ 				// from the division by 4. Because of catenation, all other numbers will result with
+ 				// the expected number as if the +3 wasn't there. same as max(1,width/4)
+ 				size = ((width +3)/4) * ((height +3)/4) * blocksize;				
+-				for(i = 0;i<mips;++i){
++				for(i = 0;i<my_mips_variable;++i){
+ 					glCompressedTexImage2D_p(image2D,i,internalformat,width,height,0,size,buffer+offset1+offset);
+-					// We halve width and height until they reach 1, or i == mips
++					// We halve width and height until they reach 1, or i == my_mips_variable
+ 					if(width != 1)
+ 						width >>=1;
+ 					if(height != 1)
+ 						height >>=1;
+-					if(i < mips -1)
++					if(i < my_mips_variable -1)
+ 						offset += size;
+ 					size = ((width +3)/4) * ((height +3)/4) * blocksize;
+ 				}	
+ 				/* HACK */
+ 				// This is a workaround for ani_texture which hates not having 
+ 				// mipmaps. 
+-				if(mips == 0){
++				if(my_mips_variable == 0){
+ 					size = ((width +3)/4) * ((height +3)/4) * blocksize;
+ 					textures[handle].mipmapped= NEAREST;
+ 					// We need to reverse some parameters that are set cuz 

Modified: packages/trunk/vegastrike/debian/patches/series
===================================================================
--- packages/trunk/vegastrike/debian/patches/series	2008-04-13 21:58:38 UTC (rev 6541)
+++ packages/trunk/vegastrike/debian/patches/series	2008-04-14 23:49:18 UTC (rev 6542)
@@ -1,3 +1,4 @@
+fix-mips.diff
 advertise-vsinstall.diff
 bootstrap-fail-on-error.diff
 Makefile.diff




More information about the Pkg-games-commits mailing list