diff --git a/recipes/freetype/recipe.sh b/recipes/freetype/recipe.sh index 78bd7cd9995cf736e38a35447868ffa89dda460e..ce2cc9a2f6e1f6443398d5feca03540695336677 100644 --- a/recipes/freetype/recipe.sh +++ b/recipes/freetype/recipe.sh @@ -35,5 +35,6 @@ function recipe_clean { function recipe_stage { dest="$(realpath $1)" make DESTDIR="$dest" install + sed -i -e "s%//lib/libpng16.la%$dest/../sysroot/lib/libpng16.la%" "$dest/lib/libfreetype.la" skip=1 } diff --git a/recipes/sdl_gfx/recipe.sh b/recipes/sdl_gfx/recipe.sh new file mode 100644 index 0000000000000000000000000000000000000000..1392fbe87d58c22fd1e647cc508ed21ad16813be --- /dev/null +++ b/recipes/sdl_gfx/recipe.sh @@ -0,0 +1,39 @@ +VERSION=2.0.25 +TAR=https://sourceforge.net/projects/sdlgfx/files/SDL_gfx-$VERSION.tar.gz +BUILD_DEPENDS=(sdl liborbital libiconv) + +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 + make -j"$(nproc)" + 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 +} diff --git a/recipes/sdl_ttf/01_redox.patch b/recipes/sdl_ttf/01_redox.patch new file mode 100644 index 0000000000000000000000000000000000000000..9366f51c1d9631704b6a25d555bb6564b47d63c7 --- /dev/null +++ b/recipes/sdl_ttf/01_redox.patch @@ -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* \ \ No newline at end of file diff --git a/recipes/sdl_ttf/recipe.sh b/recipes/sdl_ttf/recipe.sh new file mode 100644 index 0000000000000000000000000000000000000000..14e082a8d2516ad0d36c7e9a56cb30a7fbec8a84 --- /dev/null +++ b/recipes/sdl_ttf/recipe.sh @@ -0,0 +1,43 @@ +VERSION=2.0.11 +TAR=https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$VERSION.tar.gz +BUILD_DEPENDS=(sdl liborbital freetype libpng zlib) + +export CFLAGS="-I$PWD/sysroot/include/ -I$PWD/sysroot/include/freetype2/" +export LDFLAGS="-L$PWD/sysroot/lib/" + +function recipe_version { + echo "$VERSION" + skip=1 +} + +function recipe_update { + echo "skipping update" + skip=1 +} + +function recipe_build { + sysroot="${PWD}/../sysroot" + export SDL_CONFIG="$sysroot/bin/sdl-config" + export FREETYPE_CONFIG="$sysroot/bin/freetype-config" + + ./autogen.sh + ./configure --prefix=/ --host=${HOST} --disable-shared --disable-sdltest + make -j"$(nproc)" + 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 +} diff --git a/recipes/syobonaction/01_redox.patch b/recipes/syobonaction/01_redox.patch new file mode 100644 index 0000000000000000000000000000000000000000..718fae80585c8deb92bb6824058717787b33371a --- /dev/null +++ b/recipes/syobonaction/01_redox.patch @@ -0,0 +1,64 @@ +diff -rupNw source-original/DxLib.cpp source/DxLib.cpp +--- source-original/DxLib.cpp 2018-12-08 19:59:16.777579338 +0100 ++++ source/DxLib.cpp 2018-12-08 02:13:39.541585079 +0100 +@@ -24,7 +24,7 @@ int DxLib_Init() + return -1; + } + +- SDL_WM_SetCaption("Syobon Action (ã—ょã¼ã‚“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³)", ++ SDL_WM_SetCaption("Syobon Action", + NULL); + SDL_ShowCursor(SDL_DISABLE); + +diff -rupNw source-original/DxLib.h source/DxLib.h +--- source-original/DxLib.h 2018-12-08 19:59:16.777579338 +0100 ++++ source/DxLib.h 2018-12-08 01:26:50.763357641 +0100 +@@ -18,7 +18,7 @@ + #define FALSE 0 + #define byte unsigned char + +-#define ScreenFlip() SDL_Flip(screen) ++#define ScreenFlip() SDL_UpdateRect(screen, 0, 0, screen->w, screen->h) + #define GetNowCount() SDL_GetTicks() + + //UNIMPLEMENTED - macro substitution +diff -rupNw source-original/main.cpp source/main.cpp +--- source-original/main.cpp 2018-12-08 19:59:16.781579399 +0100 ++++ source/main.cpp 2018-12-08 18:11:33.716589712 +0100 +@@ -1,9 +1,11 @@ + #include "main.h" ++#include <unistd.h> + + // プãƒã‚°ãƒ©ãƒ 㯠WinMain ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ + //Changed to ansi c++ main() + int main(int argc, char *argv[]) + { ++ chdir("file:/share/syobonaction/"); + parseArgs(argc, argv); + if (DxLib_Init() == -1) + return 1; +@@ -4706,7 +4708,7 @@ void deinit() + setc0(); + FillScreen(); + DrawString(200, 200, "EXITING...", GetColor(255, 255, 255)); +- SDL_Flip(screen); ++ SDL_UpdateRect(screen, 0, 0, screen->w, screen->h); + + //SURFACES + for (t = 0; t < 51; t++) +diff -rupNw source-original/Makefile source/Makefile +--- source-original/Makefile 2018-12-08 19:59:16.777579338 +0100 ++++ source/Makefile 2018-12-08 01:32:40.319685337 +0100 +@@ -1,8 +1,8 @@ + SyobonAction:main.o loadg.o DxLib.o +- gcc main.o loadg.o DxLib.o -o SyobonAction `sdl-config --libs` -lSDL_gfx -lSDL_image -lSDL_mixer -lSDL_ttf ++ ${CXX} ${LDFLAGS} main.o loadg.o DxLib.o -o SyobonAction `${SDL_CONFIG} --libs` -lSDL_gfx -lSDL_image -lSDL_mixer -lpng -ljpeg -lz -lSDL -lSDL_ttf -lfreetype + main.o:main.cpp +- gcc -c main.cpp ++ ${CXX} ${CPPFLAGS} -c main.cpp + loadg.o:loadg.cpp +- gcc -c loadg.cpp ++ ${CXX} ${CPPFLAGS} -c loadg.cpp + DxLib.o:DxLib.cpp +- gcc -c DxLib.cpp ++ ${CXX} ${CPPFLAGS} -c DxLib.cpp diff --git a/recipes/syobonaction/recipe.sh b/recipes/syobonaction/recipe.sh new file mode 100644 index 0000000000000000000000000000000000000000..7324346527077e4a4c9bd1a85f30ad299855a55d --- /dev/null +++ b/recipes/syobonaction/recipe.sh @@ -0,0 +1,44 @@ +VERSION=1.0-rc3 +GIT=https://github.com/angelXwind/OpenSyobonAction +BUILD_DEPENDS=(sdl liborbital sdl_mixer sdl_image sdl_gfx sdl_ttf freetype libjpeg libpng zlib) + +function recipe_version { + echo "$VERSION" + skip=1 +} + +function recipe_update { + echo "skipping update" + skip=1 +} + +function recipe_build { + sysroot="${PWD}/../sysroot" + export SDL_CONFIG="$sysroot/bin/sdl-config" + export CPPFLAGS="-I$sysroot/include -I$sysroot/include/SDL" + export LDFLAGS="-L$sysroot/lib" + + make -j"$(nproc)" + skip=1 +} + +function recipe_test { + echo "skipping test" + skip=1 +} + +function recipe_clean { + make clean + skip=1 +} + +function recipe_stage { + dest="$(realpath $1)" + mkdir -pv "$1/bin" + mkdir -pv "$1/share/syobonaction" + cp -Rv ./SyobonAction "$1/bin/syobonaction" + cp -Rv ./BGM "$1/share/syobonaction" + cp -Rv ./res "$1/share/syobonaction" + cp -Rv ./SE "$1/share/syobonaction" + skip=1 +}