mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-23 05:14:18 +08:00
added gigalomania (megalomania clone) + sdl_image + sdl_mixer
This commit is contained in:
parent
d57e19dfd5
commit
06fdddf420
99
recipes/gigalomania/01_makefile.patch
Normal file
99
recipes/gigalomania/01_makefile.patch
Normal file
@ -0,0 +1,99 @@
|
||||
--- source/Makefile 2018-05-28 10:13:03.737049078 +0200
|
||||
+++ build/Makefile 2018-05-28 11:23:29.808994973 +0200
|
||||
@@ -1,13 +1,14 @@
|
||||
-CC=g++
|
||||
+CC=$(CPPHOST)
|
||||
CCFLAGS=-O2 -Wall
|
||||
CFILES=game.cpp gamestate.cpp gui.cpp image.cpp main.cpp panel.cpp player.cpp resources.cpp screen.cpp sector.cpp sound.cpp tutorial.cpp utils.cpp TinyXML/tinyxml.cpp TinyXML/tinyxmlerror.cpp TinyXML/tinyxmlparser.cpp
|
||||
HFILES=game.h gamestate.h gui.h image.h panel.h player.h resources.h screen.h sector.h sound.h tutorial.h utils.h common.h stdafx.h TinyXML/tinyxml.h
|
||||
OFILES=game.o gamestate.o gui.o image.o panel.o player.o resources.o screen.o sector.o sound.o tutorial.o utils.o main.o TinyXML/tinyxml.o TinyXML/tinyxmlerror.o TinyXML/tinyxmlparser.o
|
||||
APP=gigalomania
|
||||
-INC=`sdl2-config --cflags`
|
||||
-LINKPATH=`sdl2-config --libs` -L/usr/X11R6/lib/ -L/usr/lib
|
||||
+INC=$(CPPFLAGS)
|
||||
+LINKPATH=$(LDFLAGS)
|
||||
+GAMEPATH="/games/gigalomania"
|
||||
|
||||
-LIBS=-lSDL2_image -lSDL2_mixer
|
||||
+LIBS=-lSDL_mixer -lSDL_image -ljpeg -lpng -lSDL -lorbital -lz
|
||||
|
||||
all: $(APP)
|
||||
|
||||
@@ -19,69 +20,16 @@
|
||||
|
||||
# REMEMBER to update debian/dirs if the system directories that we use are changed!!!
|
||||
install: $(APP)
|
||||
- mkdir -p $(DESTDIR)/opt/gigalomania # -p so we don't fail if folder already exists
|
||||
- cp $(APP) $(DESTDIR)/opt/gigalomania
|
||||
- cp readme.html $(DESTDIR)/opt/gigalomania
|
||||
- cp -a gfx/ $(DESTDIR)/opt/gigalomania # -a need to copy permissions etc
|
||||
- cp -a islands/ $(DESTDIR)/opt/gigalomania
|
||||
- cp -a music/ $(DESTDIR)/opt/gigalomania
|
||||
- cp -a sound/ $(DESTDIR)/opt/gigalomania
|
||||
- # needed for DESTDIR option:
|
||||
- mkdir -p $(DESTDIR)/usr/share/applications
|
||||
- cp gigalomania.desktop $(DESTDIR)/usr/share/applications/
|
||||
- #cp gigalomania_fullscreen.desktop $(DESTDIR)/usr/share/applications/
|
||||
- # needed for DESTDIR option:
|
||||
- mkdir -p $(DESTDIR)/usr/share/pixmaps
|
||||
- cp gigalomania64.png $(DESTDIR)/usr/share/pixmaps/
|
||||
-# REMEMBER to update debian/dirs if the system directories that we use are changed!!!
|
||||
+ mkdir -p $(DESTDIR)$(GAMEPATH) # -p so we don't fail if folder already exists
|
||||
+ cp $(APP) $(DESTDIR)$(GAMEPATH)
|
||||
+ cp readme.html $(DESTDIR)$(GAMEPATH)
|
||||
+ cp -a gfx/ $(DESTDIR)$(GAMEPATH)
|
||||
+ cp -a islands/ $(DESTDIR)$(GAMEPATH)
|
||||
+ cp -a music/ $(DESTDIR)$(GAMEPATH)
|
||||
+ cp -a sound/ $(DESTDIR)$(GAMEPATH)
|
||||
|
||||
uninstall:
|
||||
- rm -rf $(DESTDIR)/opt/gigalomania # -f so we don't fail if folder doesn't exist
|
||||
- rm -f $(DESTDIR)/usr/share/applications/gigalomania.desktop
|
||||
- #rm -f $(DESTDIR)/usr/share/applications/gigalomania_fullscreen.desktop
|
||||
- rm -f $(DESTDIR)/usr/share/pixmaps/gigalomania64.png
|
||||
-
|
||||
-install_maemo: $(APP)
|
||||
- mkdir -p $(DESTDIR)/opt/gigalomania # -p so we don't fail if folder already exists
|
||||
- cp $(APP) $(DESTDIR)/opt/gigalomania
|
||||
- cp -a gfx/ $(DESTDIR)/opt/gigalomania # -a need to copy permissions etc
|
||||
- cp -a islands/ $(DESTDIR)/opt/gigalomania
|
||||
- cp -a music/ $(DESTDIR)/opt/gigalomania
|
||||
- cp -a sound/ $(DESTDIR)/opt/gigalomania
|
||||
- mkdir -p $(DESTDIR)/usr/share/applications/hildon/
|
||||
- cp gigalomania_maemo.desktop $(DESTDIR)/usr/share/applications/hildon/
|
||||
- mkdir -p $(DESTDIR)/usr/share/pixmaps
|
||||
- cp gigalomania48.png $(DESTDIR)/usr/share/pixmaps/
|
||||
- chmod a+x gigalomania_mobile.sh # workaround for permissions not set in zip file!
|
||||
- mkdir -p $(DESTDIR)/usr/bin/
|
||||
- cp gigalomania_mobile.sh $(DESTDIR)/usr/bin/gigalomania_mobile.sh
|
||||
-
|
||||
-uninstall_maemo:
|
||||
- rm -rf $(DESTDIR)/opt/gigalomania # -f so we don't fail if folder doesn't exist
|
||||
- rm -f $(DESTDIR)/usr/share/applications/hildon/gigalomania_maemo.desktop
|
||||
- rm -f $(DESTDIR)/usr/share/pixmaps/gigalomania48.png
|
||||
- rm -f $(DESTDIR)/usr/bin/gigalomania_mobile.sh
|
||||
-
|
||||
-install_meego: $(APP)
|
||||
- mkdir -p $(DESTDIR)/opt/gigalomania # -p so we don't fail if folder already exists
|
||||
- cp $(APP) $(DESTDIR)/opt/gigalomania
|
||||
- cp -a gfx/ $(DESTDIR)/opt/gigalomania # -a need to copy permissions etc
|
||||
- cp -a islands/ $(DESTDIR)/opt/gigalomania
|
||||
- cp -a music/ $(DESTDIR)/opt/gigalomania
|
||||
- cp -a sound/ $(DESTDIR)/opt/gigalomania
|
||||
- mkdir -p $(DESTDIR)/usr/share/applications
|
||||
- cp gigalomania_maemo.desktop $(DESTDIR)/usr/share/applications/
|
||||
- mkdir -p $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/
|
||||
- cp gigalomania48.png $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/
|
||||
- chmod a+x gigalomania_mobile.sh # workaround for permissions not set in zip file!
|
||||
- mkdir -p $(DESTDIR)/usr/bin/
|
||||
- cp gigalomania_mobile.sh $(DESTDIR)/usr/bin/gigalomania_mobile.sh
|
||||
-
|
||||
-uninstall_meego:
|
||||
- rm -rf $(DESTDIR)/opt/gigalomania # -f so we don't fail if folder doesn't exist
|
||||
- rm -f $(DESTDIR)/usr/share/applications/gigalomania_maemo.desktop
|
||||
- rm -f $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/gigalomania48.png
|
||||
- rm -f $(DESTDIR)/usr/bin/gigalomania_mobile.sh
|
||||
+ rm -rf $(DESTDIR)$(GAMEPATH)
|
||||
|
||||
clean:
|
||||
rm -rf *.o
|
||||
9
recipes/gigalomania/02_stdafx.patch
Normal file
9
recipes/gigalomania/02_stdafx.patch
Normal file
@ -0,0 +1,9 @@
|
||||
--- source/stdafx.h 2018-05-28 11:51:01.961563258 +0200
|
||||
+++ build/stdafx.h 2018-05-28 11:55:02.478236113 +0200
|
||||
@@ -20,5 +20,5 @@
|
||||
#elif defined(__MORPHOS__)
|
||||
#include <SDL/SDL.h>
|
||||
#else
|
||||
-#include <sdl.h>
|
||||
+#include <SDL/SDL.h>
|
||||
#endif
|
||||
11
recipes/gigalomania/03_image.patch
Normal file
11
recipes/gigalomania/03_image.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- source/image.h 2018-05-28 10:13:03.769049093 +0200
|
||||
+++ build/image.h 2018-05-28 11:11:33.754769751 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
#elif defined(__MORPHOS__)
|
||||
#include <SDL/SDL_image.h>
|
||||
#else
|
||||
-#include <SDL_image.h>
|
||||
+#include <SDL/SDL_image.h>
|
||||
#endif
|
||||
|
||||
const int font_index_period_c = 26;
|
||||
11
recipes/gigalomania/04_sound.patch
Normal file
11
recipes/gigalomania/04_sound.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- source/sound.h 2018-05-28 10:13:03.857049133 +0200
|
||||
+++ build/sound.h 2018-05-28 11:11:47.002814093 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
#elif defined(__linux)
|
||||
#include <SDL2/SDL_mixer.h>
|
||||
#else
|
||||
-#include <SDL_mixer.h>
|
||||
+#include <SDL/SDL_mixer.h>
|
||||
#endif
|
||||
|
||||
bool initSound();
|
||||
11
recipes/gigalomania/05_game.patch
Normal file
11
recipes/gigalomania/05_game.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- source/game.h 2018-05-28 11:51:01.785562766 +0200
|
||||
+++ build/game.h 2018-05-28 11:53:10.909923925 +0200
|
||||
@@ -530,7 +530,7 @@
|
||||
void startNewGame_g();
|
||||
|
||||
// DATADIR is place to look if data not present in application's folder
|
||||
-//#define DATADIR "C:/temp/glmdata" // test on Windows
|
||||
+#define DATADIR "/games/gigalomania" // redox games dir?
|
||||
|
||||
extern string maps_dirname;
|
||||
#ifdef DATADIR
|
||||
62
recipes/gigalomania/06_game_cpp.patch
Normal file
62
recipes/gigalomania/06_game_cpp.patch
Normal file
@ -0,0 +1,62 @@
|
||||
--- source/game.cpp 2018-05-28 14:37:45.401234128 +0200
|
||||
+++ build/game.cpp 2018-05-28 14:47:42.698867243 +0200
|
||||
@@ -2942,11 +2942,11 @@
|
||||
//user_width = 1184;
|
||||
//user_height = 720;
|
||||
|
||||
- if( user_width >= 4*default_width_c ) {
|
||||
+ /*if( user_width >= 4*default_width_c ) {
|
||||
scale_width = 4.0f;
|
||||
LOG("scale width 4x\n");
|
||||
}
|
||||
- else if( user_width >= 3*default_width_c ) {
|
||||
+ else*/ if( user_width >= 3*default_width_c ) {
|
||||
scale_width = 3.0f;
|
||||
LOG("scale width 3x\n");
|
||||
}
|
||||
@@ -2963,11 +2963,11 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- if( user_height >= 4*default_height_c ) {
|
||||
+ /*if( user_height >= 4*default_height_c ) {
|
||||
scale_height = 4.0f;
|
||||
LOG("scale height 4x\n");
|
||||
}
|
||||
- else if( user_height >= 3*default_height_c ) {
|
||||
+ else*/ if( user_height >= 3*default_height_c ) {
|
||||
scale_height = 3.0f;
|
||||
LOG("scale height 3x\n");
|
||||
}
|
||||
@@ -3022,11 +3022,11 @@
|
||||
screen = new Gigalomania::Screen();
|
||||
|
||||
#if SDL_MAJOR_VERSION == 1
|
||||
- if( screen->open(4*default_width_c, 4*default_height_c, fullscreen) ) {
|
||||
+ /*if( screen->open(4*default_width_c, 4*default_height_c, fullscreen) ) {
|
||||
scale_width = scale_height = 4.0f;
|
||||
LOG("scale 4x\n");
|
||||
}
|
||||
- else if( screen->open(3*default_width_c, 3*default_height_c, fullscreen) ) {
|
||||
+ else*/ if( screen->open(3*default_width_c, 3*default_height_c, fullscreen) ) {
|
||||
scale_width = scale_height = 3.0f;
|
||||
LOG("scale 3x\n");
|
||||
}
|
||||
@@ -3636,7 +3636,7 @@
|
||||
}
|
||||
|
||||
//bool quit = false;
|
||||
-bool debugwindow = true;
|
||||
+bool debugwindow = false;
|
||||
|
||||
void Game::requestQuit(bool force_quit) {
|
||||
if( !state_changed ) {
|
||||
@@ -5243,7 +5243,7 @@
|
||||
debugwindow = true;
|
||||
#endif
|
||||
|
||||
- bool fullscreen = false;
|
||||
+ bool fullscreen = true;
|
||||
#if defined(__amigaos4__) || defined(AROS) || defined(__MORPHOS__)
|
||||
fullscreen = false; // run in windowed mode due to reported performance problems in fullscreen mode on AmigaOS 4; also randomly hangs on AROS in fullscreen mode; also included MorphOS just to be safe
|
||||
#endif
|
||||
24
recipes/gigalomania/07_gamestate_cpp.patch
Normal file
24
recipes/gigalomania/07_gamestate_cpp.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- source/gamestate.cpp 2018-05-28 11:51:01.789562777 +0200
|
||||
+++ build/gamestate.cpp 2018-05-28 14:24:06.690031507 +0200
|
||||
@@ -1428,8 +1428,9 @@
|
||||
};
|
||||
|
||||
void GameState::fadeScreen(bool out, int delay, void (*func_finish)()) {
|
||||
- if( fade != NULL )
|
||||
+ if( fade != NULL ) {
|
||||
delete fade;
|
||||
+ }
|
||||
if( game_g->isTesting() ) {
|
||||
if( func_finish != NULL ) {
|
||||
func_finish();
|
||||
@@ -1442,8 +1443,9 @@
|
||||
|
||||
void GameState::whiteFlash() {
|
||||
//ASSERT( whitefade == NULL );
|
||||
- if( whitefade != NULL )
|
||||
+ if( whitefade != NULL ) {
|
||||
delete whitefade;
|
||||
+ }
|
||||
if( !game_g->isTesting() ) {
|
||||
whitefade = new FadeEffect(true, false, 0, NULL);
|
||||
}
|
||||
42
recipes/gigalomania/recipe.sh
Normal file
42
recipes/gigalomania/recipe.sh
Normal file
@ -0,0 +1,42 @@
|
||||
VERSION=0.27
|
||||
GIT=https://git.code.sf.net/p/gigalomania/code
|
||||
BRANCH=master
|
||||
BUILD_DEPENDS=(sdl_mixer sdl_image sdl liborbital libpng libjpeg zlib)
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
export CPPHOST=${HOST}-g++
|
||||
sysroot="${PWD}/../sysroot"
|
||||
export LDFLAGS="-L$sysroot/lib"
|
||||
export CPPFLAGS="-I$sysroot/include"
|
||||
make all
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
bundledir="$dest/bundle"
|
||||
|
||||
make VERBOSE=1 DESTDIR="$dest" install
|
||||
rm -rf "$bundledir"
|
||||
skip=1
|
||||
}
|
||||
12
recipes/sdl_image/01_redox.patch
Normal file
12
recipes/sdl_image/01_redox.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -rupNw source-original/config.sub source/config.sub
|
||||
--- source-original/config.sub 2012-01-19 07:30:05.000000000 +0100
|
||||
+++ source/config.sub 2018-05-01 17:31:52.766229515 +0200
|
||||
@@ -1276,7 +1276,7 @@ case $os in
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
- | -kopensolaris* \
|
||||
+ | -kopensolaris* | -redox* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
39
recipes/sdl_image/recipe.sh
Normal file
39
recipes/sdl_image/recipe.sh
Normal file
@ -0,0 +1,39 @@
|
||||
VERSION=1.2.12
|
||||
TAR=https://www.libsdl.org/projects/SDL_image/release/SDL_image-$VERSION.tar.gz
|
||||
BUILD_DEPENDS=(sdl liborbital libjpeg libpng zlib)
|
||||
|
||||
export CFLAGS="-I$PWD/sysroot/include/"
|
||||
export LDFLAGS="-L$PWD/sysroot/lib/"
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
./autogen.sh
|
||||
./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest --enable-png --enable-jpg
|
||||
make
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
make DESTDIR="$dest" install
|
||||
skip=1
|
||||
}
|
||||
12
recipes/sdl_mixer/01_redox.patch
Normal file
12
recipes/sdl_mixer/01_redox.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -rupN sdl_mixer/build-scripts/config.sub sdl_mixer-redox/build-scripts/config.sub
|
||||
--- sdl_mixer/build-scripts/config.sub 2012-01-15 14:01:05.000000000 -0800
|
||||
+++ sdl_mixer-redox/build-scripts/config.sub 2016-07-27 18:17:24.513894959 -0700
|
||||
@@ -1276,7 +1276,7 @@ case $os in
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
- | -kopensolaris* \
|
||||
+ | -kopensolaris* | -redox* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
39
recipes/sdl_mixer/recipe.sh
Normal file
39
recipes/sdl_mixer/recipe.sh
Normal file
@ -0,0 +1,39 @@
|
||||
VERSION=1.2.12
|
||||
TAR=https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-$VERSION.tar.gz
|
||||
BUILD_DEPENDS=(sdl liborbital)
|
||||
|
||||
export CFLAGS="-I$PWD/sysroot/include/"
|
||||
export LDFLAGS="-L$PWD/sysroot/lib/"
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
./autogen.sh
|
||||
./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest --disable-music-cmd --disable-music-mp3 --disable-smpegtest
|
||||
make
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
make DESTDIR="$dest" install
|
||||
skip=1
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user