rpms/teeworlds/F-10 teeworlds-0.5.0-extlibs.patch, NONE, 1.1 teeworlds-0.5.0-optflags.patch, NONE, 1.1 teeworlds-0.5.0-segv.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 teeworlds.spec, 1.1, 1.2 teeworlds-datadir.patch, 1.1, NONE teeworlds-extlibs.patch, 1.1, NONE
Lubomir Rintel
lkundrak at fedoraproject.org
Sun Jan 18 18:41:07 UTC 2009
- Previous message (by thread): rpms/xsane/devel xsane.spec,1.59,1.60
- Next message (by thread): rpms/teeworlds/F-9 teeworlds-0.5.0-extlibs.patch, NONE, 1.1 teeworlds-0.5.0-optflags.patch, NONE, 1.1 teeworlds-0.5.0-segv.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 teeworlds.spec, 1.1, 1.2 teeworlds-datadir.patch, 1.1, NONE teeworlds-extlibs.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: lkundrak
Update of /cvs/pkgs/rpms/teeworlds/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27141/F-10
Modified Files:
.cvsignore sources teeworlds.spec
Added Files:
teeworlds-0.5.0-extlibs.patch teeworlds-0.5.0-optflags.patch
teeworlds-0.5.0-segv.patch
Removed Files:
teeworlds-datadir.patch teeworlds-extlibs.patch
Log Message:
Import 0.5.0 into branches
teeworlds-0.5.0-extlibs.patch:
--- NEW FILE teeworlds-0.5.0-extlibs.patch ---
Use external libraries.
* Bam checks for headers existence in a rather stupid way. It should be
fixed to allow OptFindLibrary("pnglite", {"sys/types.h", "pnglite.h"}...
* Multiple directores to look for headers are not yet implemented in bam,
therefore these are really Fedora specific.
* engine_openfile() search multiple paths, which we don't do.
Lubomir Rintel <lkundrak at v3.sk>
diff -up teeworlds-0.5.0-src/default.bam.extlibs teeworlds-0.5.0-src/default.bam
--- teeworlds-0.5.0-src/default.bam.extlibs 2009-01-13 20:36:11.000000000 +0100
+++ teeworlds-0.5.0-src/default.bam 2009-01-18 19:08:33.000000000 +0100
@@ -7,6 +7,8 @@ config = NewConfig()
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("wavpack", "wavpack/wavpack.h", false))
+config:Add(OptFindLibrary("pnglite", "sys/types.h", false))
config:Add(SDL.OptFind("sdl", true))
config:Finalize("config.bam")
@@ -156,9 +161,30 @@ function build(settings)
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 wavpack if needed
+ if config.wavpack.value == 1 then
+ settings.link.libs:Add("wavpack")
+ if config.wavpack.include_path then
+ settings.cc.includes:Add(config.wavpack.include_path)
+ end
+ wavpack = {}
+ else
+ 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()
diff -up teeworlds-0.5.0-src/src/engine/client/ec_gfx.c.extlibs teeworlds-0.5.0-src/src/engine/client/ec_gfx.c
--- teeworlds-0.5.0-src/src/engine/client/ec_gfx.c.extlibs 2009-01-13 20:36:11.000000000 +0100
+++ teeworlds-0.5.0-src/src/engine/client/ec_gfx.c 2009-01-18 18:43:39.000000000 +0100
@@ -18,7 +18,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>
diff -up teeworlds-0.5.0-src/src/engine/client/ec_snd.c.extlibs teeworlds-0.5.0-src/src/engine/client/ec_snd.c
--- teeworlds-0.5.0-src/src/engine/client/ec_snd.c.extlibs 2009-01-13 20:36:11.000000000 +0100
+++ teeworlds-0.5.0-src/src/engine/client/ec_snd.c 2009-01-18 19:07:35.000000000 +0100
@@ -6,7 +6,7 @@
#include "SDL.h"
-#include <engine/external/wavpack/wavpack.h>
+#include <wavpack/wavpack.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -358,19 +358,12 @@ static void rate_convert(int sid)
snd->num_frames = num_frames;
}
-
-static IOHANDLE file = NULL;
-
-static int read_data(void *buffer, int size)
-{
- return io_read(file, buffer, size);
-}
-
int snd_load_wv(const char *filename)
{
SAMPLE *snd;
int sid = -1;
char error[100];
+ char completefilename[512];
WavpackContext *context;
/* don't waste memory on sound when we are stress testing */
@@ -381,19 +374,13 @@ int snd_load_wv(const char *filename)
if(!sound_enabled)
return 1;
- file = engine_openfile(filename, IOFLAG_READ); /* 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);
+ engine_getpath(completefilename, sizeof(completefilename), filename, IOFLAG_READ);
+ context = WavpackOpenFileInput(completefilename, error, 0, 0);
if (context)
{
int samples = WavpackGetNumSamples(context);
@@ -445,12 +432,9 @@ int snd_load_wv(const char *filename)
}
else
{
- dbg_msg("sound/wv", "failed to open %s: %s", filename, error);
+ dbg_msg("sound/wv", "failed to open %s: %s", completefilename, error);
}
- io_close(file);
- file = NULL;
-
if(config.debug)
dbg_msg("sound/wv", "loaded %s", filename);
diff -up teeworlds-0.5.0-src/src/game/client/render.hpp.extlibs teeworlds-0.5.0-src/src/game/client/render.hpp
--- teeworlds-0.5.0-src/src/game/client/render.hpp.extlibs 2009-01-13 20:36:11.000000000 +0100
+++ teeworlds-0.5.0-src/src/game/client/render.hpp 2009-01-18 18:43:39.000000000 +0100
@@ -37,7 +37,7 @@ enum
TILERENDERFLAG_EXTEND=4,
};
-typedef struct SPRITE;
+struct SPRITE;
void select_sprite(SPRITE *spr, int flags=0, int sx=0, int sy=0);
void select_sprite(int id, int flags=0, int sx=0, int sy=0);
diff -up teeworlds-0.5.0-src/src/tools/dilate.c.extlibs teeworlds-0.5.0-src/src/tools/dilate.c
--- teeworlds-0.5.0-src/src/tools/dilate.c.extlibs 2009-01-13 20:36:11.000000000 +0100
+++ teeworlds-0.5.0-src/src/tools/dilate.c 2009-01-18 18:43:39.000000000 +0100
@@ -1,6 +1,9 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
-#include "../engine/external/pnglite/pnglite.c"
+#include <sys/types.h>
+#include <string.h>
+#include <stdio.h>
+#include <pnglite.h>
typedef struct pixel_t
{
diff -up teeworlds-0.5.0-src/src/tools/tileset_borderfix.c.extlibs teeworlds-0.5.0-src/src/tools/tileset_borderfix.c
--- teeworlds-0.5.0-src/src/tools/tileset_borderfix.c.extlibs 2009-01-13 20:36:11.000000000 +0100
+++ teeworlds-0.5.0-src/src/tools/tileset_borderfix.c 2009-01-18 18:43:39.000000000 +0100
@@ -1,6 +1,9 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
-#include "../engine/external/pnglite/pnglite.c"
+#include <sys/types.h>
+#include <string.h>
+#include <stdio.h>
+#include <pnglite.h>
typedef struct pixel_t
{
teeworlds-0.5.0-optflags.patch:
--- NEW FILE teeworlds-0.5.0-optflags.patch ---
This should really be done in bam's NewSettings.
Lubomir Rintel <lkundrak at v3.sk>
diff -urp teeworlds-0.5.0-src/default.bam teeworlds-0.5.0-src.fixed/default.bam
--- teeworlds-0.5.0-src/default.bam 2009-01-17 14:20:53.000000000 +0100
+++ teeworlds-0.5.0-src.fixed/default.bam 2009-01-17 14:18:23.000000000 +0100
@@ -106,6 +109,9 @@ end
function build(settings)
--settings.objdir = Path("objs")
settings.cc.Output = Intermediate_Output
+ settings.cc.flags:Add(os.getenv ('CFLAGS'))
+ settings.cc.flags:Add(os.getenv ('CPPFLAGS'))
+ settings.cc.flags:Add(os.getenv ('LDFLAGS'))
if config.compiler.value == "cl" then
settings.cc.flags:Add("/wd4244")
teeworlds-0.5.0-segv.patch:
--- NEW FILE teeworlds-0.5.0-segv.patch ---
Don't segfault when graphics can't be initialized (i.e. attempt to
launch outside of X11)
Lubomir Rintel <lkundrak at v3.sk>
diff -up teeworlds-0.5.0-src/src/engine/client/ec_client.c.segv teeworlds-0.5.0-src/src/engine/client/ec_client.c
--- teeworlds-0.5.0-src/src/engine/client/ec_client.c.segv 2009-01-18 19:19:05.000000000 +0100
+++ teeworlds-0.5.0-src/src/engine/client/ec_client.c 2009-01-18 19:19:24.000000000 +0100
@@ -1521,7 +1521,7 @@ static void client_run()
snapshot_parts = 0;
/* init graphics and sound */
- if(!gfx_init())
+ if(gfx_init() < 1)
return;
/* start refreshing addresses while we load */
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/teeworlds/F-10/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore 8 Jan 2009 14:49:21 -0000 1.2
+++ .cvsignore 18 Jan 2009 18:40:36 -0000 1.3
@@ -1,2 +1,2 @@
-teeworlds-0.4.3-src.tar.gz
+teeworlds-0.5.0-src.tar.gz
teeworlds.png
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/teeworlds/F-10/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources 8 Jan 2009 14:49:21 -0000 1.2
+++ sources 18 Jan 2009 18:40:36 -0000 1.3
@@ -1,2 +1,2 @@
-a31a8cbd1af3f71a462122166e5872d6 teeworlds-0.4.3-src.tar.gz
+39d7b5d41c2c7250201214a4ab6844ed teeworlds-0.5.0-src.tar.gz
d541e3afa7809bd73bb64adb0795cb65 teeworlds.png
Index: teeworlds.spec
===================================================================
RCS file: /cvs/pkgs/rpms/teeworlds/F-10/teeworlds.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- teeworlds.spec 8 Jan 2009 14:49:21 -0000 1.1
+++ teeworlds.spec 18 Jan 2009 18:40:37 -0000 1.2
@@ -1,6 +1,6 @@
Name: teeworlds
-Version: 0.4.3
-Release: 5%{?dist}
+Version: 0.5.0
+Release: 1%{?dist}
Summary: Online multi-player platform 2D shooter
Group: Amusements/Games
@@ -9,20 +9,20 @@
Source0: http://www.teeworlds.com/files/%{name}-%{version}-src.tar.gz
Source1: %{name}.png
Source2: %{name}.desktop
-Patch0: %{name}-datadir.patch
-Patch1: %{name}-extlibs.patch
+Patch1: %{name}-0.5.0-extlibs.patch
+Patch2: %{name}-0.5.0-optflags.patch
+Patch3: %{name}-0.5.0-segv.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: mesa-libGLU-devel
-BuildRequires: bam = 0.0.%{version}
+BuildRequires: bam >= 0.2.0
BuildRequires: python-devel
BuildRequires: alsa-lib-devel
BuildRequires: desktop-file-utils
BuildRequires: zlib-devel
-BuildRequires: libglfw-devel
BuildRequires: wavpack-devel
-BuildRequires: portaudio-devel
BuildRequires: pnglite-devel
+BuildRequires: SDL-devel
Requires: %{name}-data
@@ -51,19 +51,18 @@
%prep
%setup -q -n %{name}-%{version}-src
+rm -rf src/engine/external
-%patch0 -p1 -b .datadir
%patch1 -p1 -b .extlibs
-rm -rf src/engine/external
+%patch2 -p1 -b .optflags
+%patch3 -p1 -b .segv
-iconv -f iso-8859-1 -t utf-8 readme.txt > readme.txt.utf8
-sed -i 's|\r$||g' readme.txt.utf8
+iconv -f iso-8859-1 -t utf-8 readme.txt |sed 's|\r||g' > readme.txt.utf8
touch -c -r readme.txt readme.txt.utf8
mv readme.txt.utf8 readme.txt
%build
-sed 's|-D__OPTFLAGS__|%{optflags}|' -i default.bam
-bam -v release
+CFLAGS="%{optflags}" bam -v release
%install
@@ -116,6 +115,9 @@
%changelog
+* Sat Jan 17 2009 Lubomir Rintel <lkundrak at v3.sk> 0.5.0-1
+- New upstream release
+
* Fri Jan 02 2009 Simon Wesp <cassmodiah at fedoraproject.org> 0.4.3-5
- Remove requires from subpackage 'data'
- Correct description
--- teeworlds-datadir.patch DELETED ---
--- teeworlds-extlibs.patch DELETED ---
- Previous message (by thread): rpms/xsane/devel xsane.spec,1.59,1.60
- Next message (by thread): rpms/teeworlds/F-9 teeworlds-0.5.0-extlibs.patch, NONE, 1.1 teeworlds-0.5.0-optflags.patch, NONE, 1.1 teeworlds-0.5.0-segv.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 teeworlds.spec, 1.1, 1.2 teeworlds-datadir.patch, 1.1, NONE teeworlds-extlibs.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list