r6624 - in packages/trunk/teeworlds/debian: . patches

Jack Coulter jscinoz-guest at alioth.debian.org
Fri Apr 18 00:55:28 UTC 2008


Author: jscinoz-guest
Date: 2008-04-18 00:55:28 +0000 (Fri, 18 Apr 2008)
New Revision: 6624

Added:
   packages/trunk/teeworlds/debian/patches/
   packages/trunk/teeworlds/debian/patches/new-wavpack.patch
   packages/trunk/teeworlds/debian/patches/series
   packages/trunk/teeworlds/debian/patches/system-libs.patch
Log:
Attempt #2 at importing the patches properly...


Added: packages/trunk/teeworlds/debian/patches/new-wavpack.patch
===================================================================
--- packages/trunk/teeworlds/debian/patches/new-wavpack.patch	                        (rev 0)
+++ packages/trunk/teeworlds/debian/patches/new-wavpack.patch	2008-04-18 00:55:28 UTC (rev 6624)
@@ -0,0 +1,50 @@
+Index: teeworlds-0.4.2/src/engine/client/ec_snd.c
+===================================================================
+--- teeworlds-0.4.2.orig/src/engine/client/ec_snd.c	2008-04-18 09:11:33.000000000 +1000
++++ teeworlds-0.4.2/src/engine/client/ec_snd.c	2008-04-18 09:13:45.000000000 +1000
+@@ -371,14 +371,6 @@
+ 	snd->num_frames = num_frames;
+ }
+ 
+-
+-static FILE *file = NULL;
+-
+-static int read_data(void *buffer, int size)
+-{
+-	return fread(buffer, 1, size, file);	
+-}
+-
+ int snd_load_wv(const char *filename)
+ {
+ 	SAMPLE *snd;
+@@ -394,19 +386,12 @@
+ 	if(!sound_enabled)
+ 		return 1;
+ 
+-	file = fopen(filename, "rb"); /* TODO: use system.h stuff for this */
+-	if(!file)
+-	{
+-		dbg_msg("sound/wv", "failed to open %s", filename);
+-		return -1;
+-	}
+-
+ 	sid = snd_alloc_id();
+ 	if(sid < 0)
+ 		return -1;
+ 	snd = &samples[sid];
+ 
+-	context = WavpackOpenFileInput(read_data, error);
++	context = WavpackOpenFileInput(filename, error, OPEN_2CH_MAX, 0);
+ 	if (context)
+ 	{
+ 		int samples = WavpackGetNumSamples(context);
+@@ -461,9 +446,6 @@
+ 		dbg_msg("sound/wv", "failed to open %s: %s", filename, error);
+ 	}
+ 
+-	fclose(file);
+-	file = NULL;
+-
+ 	if(config.debug)
+ 		dbg_msg("sound/wv", "loaded %s", filename);
+ 

Added: packages/trunk/teeworlds/debian/patches/series
===================================================================
--- packages/trunk/teeworlds/debian/patches/series	                        (rev 0)
+++ packages/trunk/teeworlds/debian/patches/series	2008-04-18 00:55:28 UTC (rev 6624)
@@ -0,0 +1,2 @@
+new-wavpack.patch
+system-libs.patch

Added: packages/trunk/teeworlds/debian/patches/system-libs.patch
===================================================================
--- packages/trunk/teeworlds/debian/patches/system-libs.patch	                        (rev 0)
+++ packages/trunk/teeworlds/debian/patches/system-libs.patch	2008-04-18 00:55:28 UTC (rev 6624)
@@ -0,0 +1,181 @@
+Index: teeworlds-0.4.2/default.bam
+===================================================================
+--- teeworlds-0.4.2.orig/default.bam	2008-04-18 09:16:00.000000000 +1000
++++ teeworlds-0.4.2/default.bam	2008-04-18 09:32:22.000000000 +1000
+@@ -214,7 +214,6 @@
+ 
+ 	-- set some platform specific settings
+ 	settings.cc.includes:add("src")
+-	settings.cc.includes:add("src/external/zlib")
+ 
+ 	if family == "unix" then
+    		if platform == "macosx" then
+@@ -232,6 +231,7 @@
+ 			end
+ 			
+ 			settings.linker.libs:add("pthread")
++			settings.linker.libs:add("z")
+ 		end
+ 	elseif family == "windows" then
+ 		glfw_platform = "win32"
+@@ -244,30 +244,6 @@
+ 		settings.linker.libs:add("shell32.lib")
+ 	end
+ 	
+-	-- build glfw
+-	glfw_settings = settings:copy()
+-	glfw_settings.cc.includes:add("src/external/glfw/include")
+-	glfw_settings.cc.includes:add("src/engine/external/glfw/lib")
+-	glfw_settings.cc.includes:add("src/engine/external/glfw/lib/" .. glfw_platform)
+-
+-	glfw = Compile(glfw_settings, Collect(
+-		"src/engine/external/glfw/lib/*.c",
+-		"src/engine/external/glfw/lib/" .. glfw_platform .. "/*.c"))
+-		
+-	-- build portaudio
+-	pa_settings = settings:copy()
+-	pa_settings.cc.defines:add("PA_USE_" .. string.upper(pa_hostapi))
+-	pa_settings.cc.defines:add("PA_NO_WMME")
+-	pa_settings.cc.defines:add("PA_NO_ASIO")
+-	pa_settings.cc.includes:add("src/engine/external/portaudio/include")
+-	pa_settings.cc.includes:add("src/engine/external/portaudio/src/common")
+-	pa_settings.cc.includes:add("src/engine/external/portaudio/src/os/" .. pa_platform)
+-	
+-	portaudio = Compile(pa_settings,
+-		Collect("src/engine/external/portaudio/src/common/*.c"),
+-		Collect("src/engine/external/portaudio/src/os/" .. pa_platform .. "/*.c"),
+-		Collect("src/engine/external/portaudio/src/hostapi/" .. pa_hostapi .. "/*.c"))
+-	
+ 	-- build game components
+ 	engine_settings = settings:copy()
+ 	
+@@ -287,7 +263,7 @@
+ 
+ 	-- client
+ 	client_settings = engine_settings:copy()
+-	client_settings.cc.includes:add("src/external/glfw/include")
++	client_settings.cc.includes:add("/usr/include/GL")
+ 
+ 	if family == "unix" then
+    		if platform == "macosx" then
+@@ -303,6 +279,10 @@
+ 			client_settings.linker.libs:add("X11")
+ 			client_settings.linker.libs:add("GL")
+ 			client_settings.linker.libs:add("GLU")
++			client_settings.linker.libs:add("z")
++			client_settings.linker.libs:add("wavpack")
++			client_settings.linker.libs:add("portaudio")
++			client_settings.linker.libs:add("glfw")
+ 		end
+ 	elseif family == "windows" then
+ 		client_settings.linker.libs:add("opengl32.lib")
+@@ -311,8 +291,6 @@
+ 	end
+ 
+ 	external_settings = settings:copy()
+-	zlib = Compile(external_settings, Collect("src/engine/external/zlib/*.c"))
+-	wavpack = Compile(external_settings, Collect("src/engine/external/wavpack/*.c"))
+ 	pnglite = Compile(external_settings, Collect("src/engine/external/pnglite/*.c"))
+ 
+ 	engine = Compile(engine_settings, Collect("src/engine/*.c"))
+@@ -332,19 +310,19 @@
+ 	tools = {}
+ 	for i,v in objs do
+ 		toolname = PathFilename(PathBase(v))
+-		tools[i] = Link(settings, toolname, v, engine, zlib)
++		tools[i] = Link(settings, toolname, v, engine)
+ 	end
+ 	
+ 	-- build client, server and master server
+ 	client_exe = Link(client_settings, "teeworlds", game_shared, game_client,
+-		engine, client, game_editor, glfw, portaudio, zlib, pnglite, wavpack,
++		engine, client, game_editor, pnglite,
+ 		client_link_other)
+ 
+ 	server_exe = Link(server_settings, "teeworlds_srv", engine, server,
+-		game_shared, game_server, zlib)
++		game_shared, game_server)
+ 
+ 	masterserver_exe = Link(server_settings, "mastersrv", masterserver,
+-		engine, zlib)
++		engine)
+ 
+ 	if platform == "macosx" then
+ 		osxlaunch_exe = Link(client_settings, "TeeLaunch", osxlaunch)
+Index: teeworlds-0.4.2/scripts/gen_keys.py
+===================================================================
+--- teeworlds-0.4.2.orig/scripts/gen_keys.py	2008-04-18 09:21:02.000000000 +1000
++++ teeworlds-0.4.2/scripts/gen_keys.py	2008-04-18 09:21:15.000000000 +1000
+@@ -1,7 +1,7 @@
+ import sys, os
+ 
+ # load header
+-glfw = "src/engine/external/glfw/include/GL/glfw.h"
++glfw = "/usr/include/GL/glfw.h"
+ lines = [line.strip() for line in file(glfw).readlines()]
+ 
+ # genereate keys.h file
+Index: teeworlds-0.4.2/src/engine/client/ec_gfx.c
+===================================================================
+--- teeworlds-0.4.2.orig/src/engine/client/ec_gfx.c	2008-04-18 09:21:39.000000000 +1000
++++ teeworlds-0.4.2/src/engine/client/ec_gfx.c	2008-04-18 09:21:50.000000000 +1000
+@@ -1,5 +1,5 @@
+ /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
+-#include <engine/external/glfw/include/GL/glfw.h>
++#include <GL/glfw.h>
+ #include <engine/external/pnglite/pnglite.h>
+ 
+ #include <engine/e_system.h>
+Index: teeworlds-0.4.2/src/engine/client/ec_inp.c
+===================================================================
+--- teeworlds-0.4.2.orig/src/engine/client/ec_inp.c	2008-04-18 09:22:13.000000000 +1000
++++ teeworlds-0.4.2/src/engine/client/ec_inp.c	2008-04-18 09:22:25.000000000 +1000
+@@ -1,6 +1,6 @@
+ /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
+ #include <string.h>
+-#include <engine/external/glfw/include/GL/glfw.h>
++#include <GL/glfw.h>
+ 
+ #include <engine/e_system.h>
+ #include <engine/e_client_interface.h>
+Index: teeworlds-0.4.2/src/engine/client/ec_snd.c
+===================================================================
+--- teeworlds-0.4.2.orig/src/engine/client/ec_snd.c	2008-04-18 09:22:41.000000000 +1000
++++ teeworlds-0.4.2/src/engine/client/ec_snd.c	2008-04-18 09:23:01.000000000 +1000
+@@ -3,8 +3,8 @@
+ #include <engine/e_client_interface.h>
+ #include <engine/e_config.h>
+ 
+-#include <engine/external/portaudio/include/portaudio.h>
+-#include <engine/external/wavpack/wavpack.h>
++#include <portaudio.h>
++#include <wavpack/wavpack.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
+Index: teeworlds-0.4.2/src/engine/e_datafile.c
+===================================================================
+--- teeworlds-0.4.2.orig/src/engine/e_datafile.c	2008-04-18 09:23:19.000000000 +1000
++++ teeworlds-0.4.2/src/engine/e_datafile.c	2008-04-18 09:23:33.000000000 +1000
+@@ -1,7 +1,7 @@
+ /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
+ #include "e_system.h"
+ #include "e_datafile.h"
+-#include "external/zlib/zlib.h"
++#include <zlib.h>
+ 
+ static const int DEBUG=0;
+ 
+Index: teeworlds-0.4.2/src/engine/external/pnglite/pnglite.c
+===================================================================
+--- teeworlds-0.4.2.orig/src/engine/external/pnglite/pnglite.c	2008-04-18 09:23:53.000000000 +1000
++++ teeworlds-0.4.2/src/engine/external/pnglite/pnglite.c	2008-04-18 09:24:05.000000000 +1000
+@@ -5,7 +5,7 @@
+ #define USE_ZLIB 1
+ 
+ #if USE_ZLIB
+-#include "../zlib/zlib.h"
++#include <zlib.h>
+ #else
+ #include "zlite.h"
+ #endif




More information about the Pkg-games-commits mailing list