1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-12-22 15:07:44 +02:00

supertux: initial port

Credits go to OE recipy!
This commit is contained in:
kyak 2011-02-13 22:08:08 +03:00
parent e901f0fc8d
commit 8be517484d
7 changed files with 2822 additions and 0 deletions

71
supertux/Makefile Normal file
View File

@ -0,0 +1,71 @@
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=supertux
PKG_VERSION:=0.1.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.berlios.de/$(PKG_NAME)/
PKG_MD5SUM:=f2fc288459f33d5cd8f645fbca737a63
include $(INCLUDE_DIR)/package.mk
define Package/supertux
TITLE:=supertux
SECTION:=games
CATEGORY:=Games
URL:=http://supertux.lethargik.org
DEPENDS:=+libsdl +libsdl-image +libmikmod
endef
define Package/supertux/description
SuperTux is a classic 2D jump'n run sidescroller game in a style similar to the original Super Mario games covered under the GPL.
endef
CONFIGURE_ARGS+=--disable-opengl \
--disable-sdltest \
--with-sdl-prefix=$(STAGING_DIR)/usr \
--enable-320x240
TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
define Build/Configure
( cd $(PKG_BUILD_DIR) ; ./autogen.sh )
$(call Build/Configure/Default)
endef
define Build/Prepare
$(call Build/Prepare/Default)
(\
bzip2 -dc $(FILES_DIR)/supertux-smallsize-data.tar.bz2 | $(TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xf -; \
$(CP) $(FILES_DIR)/img-resize.sh $(PKG_BUILD_DIR); \
cd $(PKG_BUILD_DIR); \
for i in background shared tilesets title worldmap; do \
echo "Converting images in ${PKG_BUILD_DIR}/data/images/$$$$i..."; \
cd ${PKG_BUILD_DIR}/data/images/$$$$i; \
sh ${PKG_BUILD_DIR}/img-resize.sh; \
done; \
)
endef
define Package/supertux/install
$(INSTALL_DIR) \
$(1)/usr/bin/ \
$(1)/usr/share/supertux/{images,levels,music,sounds} \
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/src/supertux \
$(1)/usr/bin/
$(CP) \
$(PKG_BUILD_DIR)/data/{images,levels,music,sounds,supertux.strf,*.txt} \
$(1)/usr/share/supertux
endef
$(eval $(call RequireCommand,pngcrush,Please install pngcrush.))
$(eval $(call RequireCommand,convert,Please install imagemagick.))
$(eval $(call BuildPackage,supertux))

View File

@ -0,0 +1,28 @@
#!/bin/sh
conv() {
if [ ! -d org ]; then
mkdir org
mv *.jpg *.png org/
fi
for i in org/*; do
b=`basename $i`
ext=`expr "x$b" : 'x.*\.\(.*\)'`
if [ "$ext" = "png" ]; then
if [ $b = "tux-life.png" ]; then
cp $i _.png
else
convert $i -resize 50% _.png
fi
pngcrush -q _.png $b
elif [ "$ext" = "jpg" ]; then
convert $i -resize 50% -quality 60 $b
fi
done
rm _.png
}
conv

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,85 @@
Index: supertux-0.1.3/src/badguy.cpp
===================================================================
--- supertux-0.1.3.orig/src/badguy.cpp
+++ supertux-0.1.3/src/badguy.cpp
@@ -21,6 +21,7 @@
// 02111-1307, USA.
#include <iostream>
+#include <cstdlib>
#include <math.h>
#include "globals.h"
Index: supertux-0.1.3/src/configfile.cpp
===================================================================
--- supertux-0.1.3.orig/src/configfile.cpp
+++ supertux-0.1.3/src/configfile.cpp
@@ -18,7 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdlib.h>
-#include <string>
+#include <cstring>
#include "configfile.h"
#include "setup.h"
#include "globals.h"
Index: supertux-0.1.3/src/gameobjs.cpp
===================================================================
--- supertux-0.1.3.orig/src/gameobjs.cpp
+++ supertux-0.1.3/src/gameobjs.cpp
@@ -19,6 +19,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
#include <algorithm>
+#include <cstring>
#include "world.h"
#include "tile.h"
#include "gameloop.h"
Index: supertux-0.1.3/src/particlesystem.cpp
===================================================================
--- supertux-0.1.3.orig/src/particlesystem.cpp
+++ supertux-0.1.3/src/particlesystem.cpp
@@ -20,6 +20,7 @@
#include "particlesystem.h"
#include <iostream>
+#include <cstdlib>
#include <math.h>
#include "globals.h"
#include "world.h"
Index: supertux-0.1.3/src/sprite_manager.cpp
===================================================================
--- supertux-0.1.3.orig/src/sprite_manager.cpp
+++ supertux-0.1.3/src/sprite_manager.cpp
@@ -18,6 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <iostream>
+#include <cstring>
#include "lispreader.h"
#include "sprite_manager.h"
Index: supertux-0.1.3/src/tile.cpp
===================================================================
--- supertux-0.1.3.orig/src/tile.cpp
+++ supertux-0.1.3/src/tile.cpp
@@ -21,6 +21,7 @@
#include "tile.h"
#include "scene.h"
#include "assert.h"
+#include <cstring>
TileManager* TileManager::instance_ = 0;
std::set<TileGroup>* TileManager::tilegroups_ = 0;
Index: supertux-0.1.3/src/worldmap.cpp
===================================================================
--- supertux-0.1.3.orig/src/worldmap.cpp
+++ supertux-0.1.3/src/worldmap.cpp
@@ -20,6 +20,7 @@
#include <iostream>
#include <fstream>
#include <vector>
+#include <cstring>
#include <assert.h>
#include <unistd.h>
#include "globals.h"

View File

@ -0,0 +1,13 @@
Index: supertux-0.1.3/data/Makefile.am
===================================================================
--- supertux-0.1.3.orig/data/Makefile.am 2010-07-04 22:53:15.209949507 +0200
+++ supertux-0.1.3/data/Makefile.am 2010-07-04 22:53:51.490637559 +0200
@@ -2,8 +2,6 @@
supertux.strf \
$(wildcard *.txt) \
CREDITS \
- $(wildcard sounds/*.wav) \
- images/icon.xpm \
$(wildcard images/*.png) \
$(wildcard images/*.xpm) \
$(wildcard images/background/*.png) \

View File

@ -0,0 +1,11 @@
--- supertux-0.1.3/src/menu.h 2011-02-13 21:26:19.427185060 +0300
+++ supertux-0.1.3_320/src/menu.h 2011-02-13 21:30:06.936066603 +0300
@@ -207,7 +207,7 @@
bool isToggled(int id);
- void Menu::get_controlfield_key_into_input(MenuItem *item);
+ void get_controlfield_key_into_input(MenuItem *item);
void draw ();
void draw_item(int index, int menu_width, int menu_height);