[SCM] Packaging for teeworlds branch, master, updated. 2d194e7bcb49237986bfb29cff0414babba9d907

Felix Geyer debfx-pkg at fobos.de
Mon May 9 14:24:38 UTC 2011


The following commit has been merged in the master branch:
commit e084ad2a78fe324f36fa69931db97d0fd5adbec2
Author: Felix Geyer <debfx-pkg at fobos.de>
Date:   Mon May 9 11:42:35 2011 +0200

    Refresh patches for new upstream release.

diff --git a/debian/changelog b/debian/changelog
index c181733..c3c2204 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+teeworlds (0.6.0-1) UNRELEASED; urgency=low
+
+  * New upstream release. (Closes: #625651)
+    - Refresh patches.
+
+ -- Felix Geyer <debfx-pkg at fobos.de>  Mon, 09 May 2011 11:09:33 +0200
+
 teeworlds (0.5.2-2) unstable; urgency=low
 
   * Only fix permissions of data files when arch-all packages are built.
diff --git a/debian/patches/new-wavpack.patch b/debian/patches/new-wavpack.patch
index 76a2b6a..923a8ab 100644
--- a/debian/patches/new-wavpack.patch
+++ b/debian/patches/new-wavpack.patch
@@ -1,57 +1,66 @@
-diff --git a/src/engine/client/ec_snd.c b/src/engine/client/ec_snd.c
-index 034dfb2..67e819c 100644
---- a/src/engine/client/ec_snd.c
-+++ b/src/engine/client/ec_snd.c
-@@ -359,19 +359,13 @@
+diff -Nur teeworlds-0.6.0.orig/src/engine/client/sound.cpp teeworlds-0.6.0/src/engine/client/sound.cpp
+--- teeworlds-0.6.0.orig/src/engine/client/sound.cpp	2011-04-09 21:15:25.000000000 +0200
++++ teeworlds-0.6.0/src/engine/client/sound.cpp	2011-05-09 11:16:20.140095357 +0200
+@@ -305,17 +305,13 @@
+ 	pSample->m_NumFrames = NumFrames;
  }
  
- 
--static IOHANDLE file = NULL;
--
--static int read_data(void *buffer, int size)
+-int CSound::ReadData(void *pBuffer, int Size)
 -{
--	return io_read(file, buffer, size);
+-	return io_read(ms_File, pBuffer, Size);
 -}
 -
- int snd_load_wv(const char *filename)
+ int CSound::LoadWV(const char *pFilename)
  {
- 	SAMPLE *snd;
- 	int sid = -1;
- 	char error[100];
- 	WavpackContext *context;
-+	char completefilename[512];
+ 	CSample *pSample;
+ 	int SampleID = -1;
+ 	char aError[100];
+ 	WavpackContext *pContext;
++	char completeFilename[512];
  	
- 	/* don't waste memory on sound when we are stress testing */
- 	if(config.dbg_stress)
-@@ -381,19 +375,13 @@
- 	if(!sound_enabled)
- 		return 1;
- 
--	file = engine_openfile(filename, IOFLAG_READ); /* TODO: use system.h stuff for this */
--	if(!file)
+ 	// don't waste memory on sound when we are stress testing
+ 	if(g_Config.m_DbgStress)
+@@ -328,19 +324,13 @@
+ 	if(!m_pStorage)
+ 		return -1;
+ 
+-	ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL);
+-	if(!ms_File)
 -	{
--		dbg_msg("sound/wv", "failed to open %s", filename);
+-		dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename);
 -		return -1;
 -	}
 -
- 	sid = snd_alloc_id();
- 	if(sid < 0)
+ 	SampleID = AllocID();
+ 	if(SampleID < 0)
  		return -1;
- 	snd = &samples[sid];
+ 	pSample = &m_aSamples[SampleID];
  
--	context = WavpackOpenFileInput(read_data, error);
-+	engine_getpath(completefilename, sizeof(completefilename), filename, IOFLAG_READ);
-+	context = WavpackOpenFileInput(completefilename, error, OPEN_2CH_MAX, 0);
- 	if (context)
+-	pContext = WavpackOpenFileInput(ReadData, aError);
++	engine_getpath(completeFilename, sizeof(completeFilename), pFilename, IOFLAG_READ);
++	pContext = WavpackOpenFileInput(completeFilename, error, OPEN_2CH_MAX, 0);
+ 	if (pContext)
  	{
- 		int samples = WavpackGetNumSamples(context);
-@@ -448,9 +436,6 @@
- 		dbg_msg("sound/wv", "failed to open %s: %s", filename, error);
- 	}
+ 		int m_aSamples = WavpackGetNumSamples(pContext);
+@@ -482,7 +472,5 @@
+ 	lock_release(m_SoundLock);
+ }
+ 
+-IOHANDLE CSound::ms_File = 0;
+-
+ IEngineSound *CreateEngineSound() { return new CSound; }
+ 
+diff -Nur teeworlds-0.6.0.orig/src/engine/client/sound.h teeworlds-0.6.0/src/engine/client/sound.h
+--- teeworlds-0.6.0.orig/src/engine/client/sound.h	2011-04-09 21:15:25.000000000 +0200
++++ teeworlds-0.6.0/src/engine/client/sound.h	2011-05-09 11:15:16.739801319 +0200
+@@ -19,10 +19,6 @@
+ 
+ 	static void RateConvert(int SampleID);
  
--	io_close(file);
--	file = NULL;
+-	// TODO: Refactor: clean this mess up
+-	static IOHANDLE ms_File;
+-	static int ReadData(void *pBuffer, int Size);
 -
- 	if(config.debug)
- 		dbg_msg("sound/wv", "loaded %s", filename);
+ 	virtual int LoadWV(const char *pFilename);
  
+ 	virtual void SetListenerPos(float x, float y);
diff --git a/debian/patches/pass-build-flags.patch b/debian/patches/pass-build-flags.patch
index c55cfb5..e8abe45 100644
--- a/debian/patches/pass-build-flags.patch
+++ b/debian/patches/pass-build-flags.patch
@@ -1,10 +1,11 @@
---- teeworlds-0.5.2.orig/default.bam
-+++ teeworlds-0.5.2/default.bam
-@@ -287,6 +287,8 @@ release_settings.debug = 0
- release_settings.cc.optimize = 1
+diff -Nur teeworlds-0.6.0.orig/bam.lua teeworlds-0.6.0/bam.lua
+--- teeworlds-0.6.0.orig/bam.lua	2011-04-09 21:15:25.000000000 +0200
++++ teeworlds-0.6.0/bam.lua	2011-05-09 11:20:20.921209965 +0200
+@@ -284,6 +284,8 @@
+ release_settings.optimize = 1
  release_settings.cc.defines:Add("CONF_RELEASE")
  
-+Import("debian.bam")
++Import("debian.lua")
 +
  if platform == "macosx"  and arch == "ia32" then
  	debug_settings_ppc = debug_settings:Copy()
diff --git a/debian/patches/set-data-dir.patch b/debian/patches/set-data-dir.patch
index c3fbe0f..99bfe35 100644
--- a/debian/patches/set-data-dir.patch
+++ b/debian/patches/set-data-dir.patch
@@ -1,12 +1,12 @@
-diff -Nur teeworlds-0.5.2.orig/src/engine/e_engine.c teeworlds-0.5.2/src/engine/e_engine.c
---- teeworlds-0.5.2.orig/src/engine/e_engine.c	2010-05-31 18:36:59.000000000 +0200
-+++ teeworlds-0.5.2/src/engine/e_engine.c	2010-05-31 22:48:11.603356248 +0200
-@@ -13,7 +13,7 @@
- #include "e_linereader.h"
+diff -Nur teeworlds-0.6.0.orig/src/engine/shared/storage.cpp teeworlds-0.6.0/src/engine/shared/storage.cpp
+--- teeworlds-0.6.0.orig/src/engine/shared/storage.cpp	2011-04-09 21:15:25.000000000 +0200
++++ teeworlds-0.6.0/src/engine/shared/storage.cpp	2011-05-09 11:22:09.381711049 +0200
+@@ -5,7 +5,7 @@
+ #include "linereader.h"
  
- /* compiled-in data-dir path */
+ // compiled-in data-dir path
 -#define DATA_DIR "data"
 +#define DATA_DIR "/usr/share/games/teeworlds/data"
  
- static JOBPOOL hostlookuppool;
- static int engine_find_datadir(char *argv0);
+ class CStorage : public IStorage
+ {
diff --git a/debian/patches/system-libs.patch b/debian/patches/system-libs.patch
index 1094411..2e20fad 100644
--- a/debian/patches/system-libs.patch
+++ b/debian/patches/system-libs.patch
@@ -1,46 +1,22 @@
-From 867ae42dc44aeceb318a2970d0634766d3c19845 Mon Sep 17 00:00:00 2001
-From: =?utf-8?q?Gon=C3=A9ri=20Le=20Bouder?= <goneri at rulezlan.org>
-Date: Sat, 22 Aug 2009 14:21:39 +0200
-Subject: [PATCH 1/2] load system lib if possible
-
----
- default.bam                |   30 +++++++++++++++++++++++++++---
- src/engine/client/ec_gfx.c |    2 +-
- src/engine/client/ec_snd.c |    2 +-
- 3 files changed, 29 insertions(+), 5 deletions(-)
-
-Index: teeworlds-0.5.1/default.bam
-===================================================================
---- teeworlds-0.5.1.orig/default.bam	2009-08-22 14:52:11.339935327 +0200
-+++ teeworlds-0.5.1/default.bam	2009-08-22 14:52:16.143931013 +0200
-@@ -7,6 +7,8 @@
- config:Add(OptFindCompiler())
- config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all"))
- config:Add(OptFindLibrary("zlib", "zlib.h", false))
-+config:Add(OptFindLibrary("pnglite", "pnglite.h", false))
-+config:Add(OptFindLibrary("wavpack", "wavpack/wavpack.h", false))
+diff -Nur teeworlds-0.6.0.orig/bam.lua teeworlds-0.6.0/bam.lua
+--- teeworlds-0.6.0.orig/bam.lua	2011-04-09 21:15:25.000000000 +0200
++++ teeworlds-0.6.0/bam.lua	2011-05-09 11:26:18.562860118 +0200
+@@ -11,6 +11,8 @@
+ config:Add(OptLibrary("zlib", "zlib.h", false))
  config:Add(SDL.OptFind("sdl", true))
- config:Finalize("config.bam")
+ config:Add(FreeType.OptFind("freetype", true))
++config:Add(OptLibrary("pnglite", "pnglite.h", false))
++config:Add(OptLibrary("wavpack", "wavpack/wavpack.h", false))
+ config:Finalize("config.lua")
  
-@@ -150,9 +152,31 @@
+ -- data compiler
+@@ -176,9 +178,29 @@
  		settings.cc.includes:Add("src/engine/external/zlib")
  	end
  
 -	-- build the small libraries
 -	wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c"))
 -	pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c"))
-+	-- compile pnglite if needed
-+	if config.pnglite.value == 1 then
-+		settings.link.libs:Add("pnglite")
-+		if config.pnglite.include_path then
-+			settings.cc.includes:Add(config.pnglite.include_path)
-+		end
-+		pnglite = {}
-+	else
-+	    pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c"))
-+		settings.cc.includes:Add("src/engine/external/pnglite")
-+	end
-+
 +	-- compile wavpack if needed
 +	if config.wavpack.value == 1 then
 +		settings.link.libs:Add("wavpack")
@@ -49,61 +25,69 @@ Index: teeworlds-0.5.1/default.bam
 +		end
 +		wavpack = {}
 +	else
-+	    wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c"))
++		wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c"))
 +		settings.cc.includes:Add("src/engine/external")
 +	end
-+
-+
++	
++	-- compile pnglite if needed
++	if config.pnglite.value == 1 then
++		settings.link.libs:Add("pnglite")
++		if config.pnglite.include_path then
++			settings.cc.includes:Add(config.pnglite.include_path)
++		end
++		pnglite = {}
++	else
++		pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c"))
++		settings.cc.includes:Add("src/engine/external/pnglite")
++	end
  	
  	-- build game components
  	engine_settings = settings:Copy()
-Index: teeworlds-0.5.1/src/engine/client/ec_gfx.c
-===================================================================
---- teeworlds-0.5.1.orig/src/engine/client/ec_gfx.c	2009-08-22 14:52:11.491926006 +0200
-+++ teeworlds-0.5.1/src/engine/client/ec_gfx.c	2009-08-22 14:52:16.143931013 +0200
-@@ -18,7 +18,7 @@
+diff -Nur teeworlds-0.6.0.orig/src/engine/client/graphics.cpp teeworlds-0.6.0/src/engine/client/graphics.cpp
+--- teeworlds-0.6.0.orig/src/engine/client/graphics.cpp	2011-04-09 21:15:25.000000000 +0200
++++ teeworlds-0.6.0/src/engine/client/graphics.cpp	2011-05-09 11:28:12.813386048 +0200
+@@ -19,7 +19,7 @@
  #endif
  
  #include <base/system.h>
 -#include <engine/external/pnglite/pnglite.h>
 +#include <pnglite.h>
  
- #include <engine/e_client_interface.h>
- #include <engine/e_engine.h>
-Index: teeworlds-0.5.1/src/engine/client/ec_snd.c
-===================================================================
---- teeworlds-0.5.1.orig/src/engine/client/ec_snd.c	2009-08-22 14:52:11.439913667 +0200
-+++ teeworlds-0.5.1/src/engine/client/ec_snd.c	2009-08-22 14:52:16.143931013 +0200
-@@ -6,7 +6,7 @@
- 
- #include "SDL.h"
+ #include <engine/shared/config.h>
+ #include <engine/graphics.h>
+diff -Nur teeworlds-0.6.0.orig/src/engine/client/sound.cpp teeworlds-0.6.0/src/engine/client/sound.cpp
+--- teeworlds-0.6.0.orig/src/engine/client/sound.cpp	2011-04-09 21:15:25.000000000 +0200
++++ teeworlds-0.6.0/src/engine/client/sound.cpp	2011-05-09 11:28:37.823501101 +0200
+@@ -10,7 +10,7 @@
+ #include "sound.h"
  
--#include <engine/external/wavpack/wavpack.h>
-+#include <wavpack/wavpack.h>
- #include <stdio.h>
- #include <stdlib.h>
+ extern "C" { // wavpack
+-	#include <engine/external/wavpack/wavpack.h>
++	#include <wavpack/wavpack.h>
+ }
  #include <math.h>
-Index: teeworlds-0.5.1/src/tools/dilate.c
-===================================================================
---- teeworlds-0.5.1.orig/src/tools/dilate.c	2009-08-22 14:52:11.403909861 +0200
-+++ teeworlds-0.5.1/src/tools/dilate.c	2009-08-22 14:52:16.143931013 +0200
-@@ -1,6 +1,6 @@
- /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
  
--#include "../engine/external/pnglite/pnglite.c"
+diff -Nur teeworlds-0.6.0.orig/src/tools/dilate.cpp teeworlds-0.6.0/src/tools/dilate.cpp
+--- teeworlds-0.6.0.orig/src/tools/dilate.cpp	2011-04-09 21:15:25.000000000 +0200
++++ teeworlds-0.6.0/src/tools/dilate.cpp	2011-05-09 11:27:22.203153141 +0200
+@@ -2,7 +2,7 @@
+ /* If you are missing that file, acquire a complete release at teeworlds.com.                */
+ #include <base/system.h>
+ #include <base/math.h>
+-#include <engine/external/pnglite/pnglite.h>
 +#include <pnglite.h>
  
- typedef struct pixel_t
+ typedef struct
  {
-Index: teeworlds-0.5.1/src/tools/tileset_borderfix.c
-===================================================================
---- teeworlds-0.5.1.orig/src/tools/tileset_borderfix.c	2009-08-22 14:52:11.367913739 +0200
-+++ teeworlds-0.5.1/src/tools/tileset_borderfix.c	2009-08-22 14:52:25.220912175 +0200
-@@ -1,6 +1,6 @@
- /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
- 
--#include "../engine/external/pnglite/pnglite.c"
+diff -Nur teeworlds-0.6.0.orig/src/tools/tileset_borderfix.cpp teeworlds-0.6.0/src/tools/tileset_borderfix.cpp
+--- teeworlds-0.6.0.orig/src/tools/tileset_borderfix.cpp	2011-04-09 21:15:25.000000000 +0200
++++ teeworlds-0.6.0/src/tools/tileset_borderfix.cpp	2011-05-09 11:27:12.403108027 +0200
+@@ -2,7 +2,7 @@
+ /* If you are missing that file, acquire a complete release at teeworlds.com.                */
+ #include <stdlib.h>
+ #include <base/system.h>
+-#include <engine/external/pnglite/pnglite.h>
 +#include <pnglite.h>
  
- typedef struct pixel_t
+ typedef struct
  {
diff --git a/debian/rules b/debian/rules
index 1ebb136..01d11cb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,19 +7,19 @@ LDFLAGS += -Wl,--as-needed
 	dh $@
 
 override_dh_auto_build:
-	echo "release_settings.cc.optimize = 0" >> debian.bam
-	echo "release_settings.cc.flags:Add(\"$(CFLAGS)\")" >> debian.bam
-	echo "release_settings.link.inputflags = release_settings.link.inputflags .. \" $(LDFLAGS)\"" >> debian.bam
+	echo "release_settings.cc.optimize = 0" >> debian.lua
+	echo "release_settings.cc.flags:Add(\"$(CFLAGS)\")" >> debian.lua
+	echo "release_settings.link.inputflags = release_settings.link.inputflags .. \" $(LDFLAGS)\"" >> debian.lua
 	bam -v release
 
 override_dh_auto_install:
 	mv teeworlds_srv teeworlds-server
 
 override_dh_auto_clean:
-	touch debian.bam
+	touch debian.lua
 	bam -c
 	find -type f -name '*.o' -exec rm {} \;
-	rm -rf tmp.* config.bam debian.bam fake_server map_resave crapnet tileset_borderfix
+	rm -rf tmp.* config.bam debian.lua fake_server map_resave crapnet tileset_borderfix
 	rm -rf teeworlds_srv teeworlds-server dilate versionsrv packetgen mastersrv teeworlds
 	rm -f datasrc/*.pyc 
 

-- 
Packaging for teeworlds



More information about the Pkg-games-commits mailing list