From bcf3e7ceca1d04483500251686f07907d75d3652 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Thu, 16 Apr 2009 16:28:05 +0200 Subject: [PATCH] upgrade supertux to supertux2-0.3.1, add cmake, openal, physfs --- packages/games/openal-soft/build | 20 +++++ packages/games/openal-soft/install | 7 ++ packages/games/openal-soft/url | 1 + packages/games/physfs/build | 20 +++++ packages/games/physfs/install | 7 ++ packages/games/physfs/url | 1 + .../patches/supertux-0.3.1-comments.diff | 35 +++++++++ .../patches/supertux-0.3.1-cons_disable.diff | 19 +++++ .../patches/supertux-0.3.1-gcc43.diff | 78 +++++++++++++++++++ .../patches/supertux-0.3.1-gcc44.diff | 26 +++++++ packages/toolchain/devel/cmake/build | 14 ++++ packages/toolchain/devel/cmake/url | 1 + 12 files changed, 229 insertions(+) create mode 100755 packages/games/openal-soft/build create mode 100755 packages/games/openal-soft/install create mode 100644 packages/games/openal-soft/url create mode 100755 packages/games/physfs/build create mode 100755 packages/games/physfs/install create mode 100644 packages/games/physfs/url create mode 100644 packages/games/supertux/patches/supertux-0.3.1-comments.diff create mode 100644 packages/games/supertux/patches/supertux-0.3.1-cons_disable.diff create mode 100644 packages/games/supertux/patches/supertux-0.3.1-gcc43.diff create mode 100644 packages/games/supertux/patches/supertux-0.3.1-gcc44.diff create mode 100755 packages/toolchain/devel/cmake/build create mode 100644 packages/toolchain/devel/cmake/url diff --git a/packages/games/openal-soft/build b/packages/games/openal-soft/build new file mode 100755 index 0000000000..7385dfa98c --- /dev/null +++ b/packages/games/openal-soft/build @@ -0,0 +1,20 @@ +#!/bin/sh + +. config/options + +$SCRIPTS/build toolchain +$SCRIPTS/build cmake + +cd $BUILD/$1* +mkdir -p .build +cd .build + +cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr \ + -D CMAKE_FIND_ROOT_PATH:PATH=$SYSROOT_PREFIX \ + .. + +make + +$STRIP *.so* + +$MAKEINSTALL diff --git a/packages/games/openal-soft/install b/packages/games/openal-soft/install new file mode 100755 index 0000000000..86113af4bd --- /dev/null +++ b/packages/games/openal-soft/install @@ -0,0 +1,7 @@ +#!/bin/sh + +. config/options + +mkdir -p $INSTALL/usr/lib +cp -P $BUILD/$1*/.build/*.so* $INSTALL/usr/lib + diff --git a/packages/games/openal-soft/url b/packages/games/openal-soft/url new file mode 100644 index 0000000000..fc3dac9e86 --- /dev/null +++ b/packages/games/openal-soft/url @@ -0,0 +1 @@ +http://kcat.strangesoft.net/openal-releases/openal-soft-1.7.411.tar.bz2 \ No newline at end of file diff --git a/packages/games/physfs/build b/packages/games/physfs/build new file mode 100755 index 0000000000..7385dfa98c --- /dev/null +++ b/packages/games/physfs/build @@ -0,0 +1,20 @@ +#!/bin/sh + +. config/options + +$SCRIPTS/build toolchain +$SCRIPTS/build cmake + +cd $BUILD/$1* +mkdir -p .build +cd .build + +cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr \ + -D CMAKE_FIND_ROOT_PATH:PATH=$SYSROOT_PREFIX \ + .. + +make + +$STRIP *.so* + +$MAKEINSTALL diff --git a/packages/games/physfs/install b/packages/games/physfs/install new file mode 100755 index 0000000000..86113af4bd --- /dev/null +++ b/packages/games/physfs/install @@ -0,0 +1,7 @@ +#!/bin/sh + +. config/options + +mkdir -p $INSTALL/usr/lib +cp -P $BUILD/$1*/.build/*.so* $INSTALL/usr/lib + diff --git a/packages/games/physfs/url b/packages/games/physfs/url new file mode 100644 index 0000000000..fadccbe898 --- /dev/null +++ b/packages/games/physfs/url @@ -0,0 +1 @@ +http://icculus.org/physfs/downloads/physfs-2.0.0.tar.gz \ No newline at end of file diff --git a/packages/games/supertux/patches/supertux-0.3.1-comments.diff b/packages/games/supertux/patches/supertux-0.3.1-comments.diff new file mode 100644 index 0000000000..3a6f2ac3e8 --- /dev/null +++ b/packages/games/supertux/patches/supertux-0.3.1-comments.diff @@ -0,0 +1,35 @@ +From: Lubomir Rintel +Subject: [PATCH] Fix useless warnings using most locales + +This actually addresses two issues: + +Consider blank lines to be comments, skip over them rather than +attempting to read keywords there. + +Empty a token when the comment is enountered -- the comment +is not necessarily followed by a keyword, but it can be an EOF. + +diff -up supertux-0.3.1/src/tinygettext/tinygettext.cpp.comments supertux-0.3.1/src/tinygettext/tinygettext.cpp +--- supertux-0.3.1/src/tinygettext/tinygettext.cpp.comments 2008-12-20 22:37:54.000000000 +0100 ++++ supertux-0.3.1/src/tinygettext/tinygettext.cpp 2008-12-20 22:38:17.000000000 +0100 +@@ -705,15 +705,16 @@ public: + switch(state) + { + case READ_KEYWORD: +- if (c == '#') ++ // Read a new token ++ token = Token(); ++ ++ if (c == '#' || c == '\n' || c == '\r') + { + state = SKIP_COMMENT; ++ in.unget(); + } + else + { +- // Read a new token +- token = Token(); +- + do { // Read keyword + token.keyword += c; + } while((c = getchar(in)) != EOF && !isspace(c)); diff --git a/packages/games/supertux/patches/supertux-0.3.1-cons_disable.diff b/packages/games/supertux/patches/supertux-0.3.1-cons_disable.diff new file mode 100644 index 0000000000..c8378dcabf --- /dev/null +++ b/packages/games/supertux/patches/supertux-0.3.1-cons_disable.diff @@ -0,0 +1,19 @@ +diff -up supertux-0.3.1/src/console.cpp.cons_disable supertux-0.3.1/src/console.cpp +--- supertux-0.3.1/src/console.cpp.cons_disable 2008-12-20 22:46:37.000000000 +0100 ++++ supertux-0.3.1/src/console.cpp 2008-12-20 22:46:48.000000000 +0100 +@@ -347,6 +347,7 @@ Console::addLine(std::string s) + // output line to stderr + std::cerr << s << std::endl; + ++#if 0 + // wrap long lines + std::string overflow; + unsigned int line_count = 0; +@@ -373,6 +374,7 @@ Console::addLine(std::string s) + // increase time that console stays open + if(stayOpen < 6) + stayOpen += 1.5; ++#endif + } + + void diff --git a/packages/games/supertux/patches/supertux-0.3.1-gcc43.diff b/packages/games/supertux/patches/supertux-0.3.1-gcc43.diff new file mode 100644 index 0000000000..bd1ef00a2c --- /dev/null +++ b/packages/games/supertux/patches/supertux-0.3.1-gcc43.diff @@ -0,0 +1,78 @@ +diff -up supertux-0.3.1/src/addon_manager.cpp~ supertux-0.3.1/src/addon_manager.cpp +--- supertux-0.3.1/src/addon_manager.cpp~ 2008-07-10 10:58:11.000000000 +0200 ++++ supertux-0.3.1/src/addon_manager.cpp 2008-07-10 10:58:11.000000000 +0200 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include "addon_manager.hpp" + #include "config.h" + #include "log.hpp" +diff -up supertux-0.3.1/src/console.hpp~ supertux-0.3.1/src/console.hpp +--- supertux-0.3.1/src/console.hpp~ 2008-07-10 10:48:45.000000000 +0200 ++++ supertux-0.3.1/src/console.hpp 2008-07-10 10:57:01.000000000 +0200 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + + class Console; +diff -up supertux-0.3.1/src/lisp/lexer.cpp~ supertux-0.3.1/src/lisp/lexer.cpp +--- supertux-0.3.1/src/lisp/lexer.cpp~ 2008-07-10 11:00:49.000000000 +0200 ++++ supertux-0.3.1/src/lisp/lexer.cpp 2008-07-10 11:00:49.000000000 +0200 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #include "lexer.hpp" + +diff -up supertux-0.3.1/src/resources.cpp~ supertux-0.3.1/src/resources.cpp +diff -up supertux-0.3.1/src/sprite/sprite_manager.hpp~ supertux-0.3.1/src/sprite/sprite_manager.hpp +--- supertux-0.3.1/src/sprite/sprite_manager.hpp~ 2008-07-10 10:58:59.000000000 +0200 ++++ supertux-0.3.1/src/sprite/sprite_manager.hpp 2008-07-10 10:58:59.000000000 +0200 +@@ -21,6 +21,7 @@ + #define SUPERTUX_SPRITE_MANAGER_H + + #include ++#include + + class SpriteData; + class Sprite; +diff -up supertux-0.3.1/src/textscroller.hpp~ supertux-0.3.1/src/textscroller.hpp +--- supertux-0.3.1/src/textscroller.hpp~ 2008-07-10 10:50:27.000000000 +0200 ++++ supertux-0.3.1/src/textscroller.hpp 2008-07-10 10:57:18.000000000 +0200 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include "screen.hpp" + #include "math/vector.hpp" +diff -up supertux-0.3.1/src/title.cpp~ supertux-0.3.1/src/title.cpp +--- supertux-0.3.1/src/title.cpp~ 2008-07-10 10:57:50.000000000 +0200 ++++ supertux-0.3.1/src/title.cpp 2008-07-10 10:57:50.000000000 +0200 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff -up supertux-0.3.1/src/video/sdl_texture.hpp~ supertux-0.3.1/src/video/sdl_texture.hpp +--- supertux-0.3.1/src/video/sdl_texture.hpp~ 2008-07-10 11:01:13.000000000 +0200 ++++ supertux-0.3.1/src/video/sdl_texture.hpp 2008-07-10 11:01:13.000000000 +0200 +@@ -22,6 +22,7 @@ + + #include + ++#include + #include + + #include "texture.hpp" diff --git a/packages/games/supertux/patches/supertux-0.3.1-gcc44.diff b/packages/games/supertux/patches/supertux-0.3.1-gcc44.diff new file mode 100644 index 0000000000..bba9144461 --- /dev/null +++ b/packages/games/supertux/patches/supertux-0.3.1-gcc44.diff @@ -0,0 +1,26 @@ +Fix build with GCC 4.4 + +Lubomir Rintel + +diff -up supertux-0.3.1/src/lisp/lisp.cpp.gcc44 supertux-0.3.1/src/lisp/lisp.cpp +--- supertux-0.3.1/src/lisp/lisp.cpp.gcc44 2009-03-01 15:13:40.000000000 +0100 ++++ supertux-0.3.1/src/lisp/lisp.cpp 2009-03-01 15:13:53.000000000 +0100 +@@ -19,6 +19,7 @@ + + #include + ++#include + #include "lisp.hpp" + + namespace lisp +diff -up supertux-0.3.1/src/random_generator.cpp.gcc44 supertux-0.3.1/src/random_generator.cpp +--- supertux-0.3.1/src/random_generator.cpp.gcc44 2009-03-01 15:14:05.000000000 +0100 ++++ supertux-0.3.1/src/random_generator.cpp 2009-03-01 15:14:18.000000000 +0100 +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + #include "random_generator.hpp" + + RandomGenerator systemRandom; // global random number generator diff --git a/packages/toolchain/devel/cmake/build b/packages/toolchain/devel/cmake/build new file mode 100755 index 0000000000..be28f22b36 --- /dev/null +++ b/packages/toolchain/devel/cmake/build @@ -0,0 +1,14 @@ +#!/bin/sh + +. config/options + +export CC=$HOST_CC +export CXX=$HOST_CXX +export CFLAGS="$HOST_CFLAGS" +export CXXFLAGS="$HOST_CXXFLAGS" + +cd $BUILD/$1* + +./configure --no-qt-gui +make +cp bin/cmake bin/ccmake bin/cpack bin/ctest $ROOT/$TOOLCHAIN/bin diff --git a/packages/toolchain/devel/cmake/url b/packages/toolchain/devel/cmake/url new file mode 100644 index 0000000000..a1653e9aad --- /dev/null +++ b/packages/toolchain/devel/cmake/url @@ -0,0 +1 @@ +http://www.cmake.org/files/v2.6/cmake-2.6.2.tar.gz