diff --git a/games-arcade/asylum/asylum-0.3.2.recipe b/games-arcade/asylum/asylum-0.3.2.recipe new file mode 100644 index 000000000..e4f196c31 --- /dev/null +++ b/games-arcade/asylum/asylum-0.3.2.recipe @@ -0,0 +1,61 @@ +SUMMARY="A C port of the computer game Asylum" +DESCRIPTION="SDL Asylum is a C port of the computer game Asylum, which was \ +written by Andy Southgate in 1994 for the Acorn Archimedes and is now public \ +domain. It has been tested on Linux and Cygwin, but it should be possible to \ +run it on other platforms which support the SDL graphics library." +HOMEPAGE="http://sdl-asylum.sourceforge.net/" +COPYRIGHT="1993 Andy Southgate" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://downloads.sourceforge.net/sdl-asylum/asylum-$portVersion.tar.gz" +CHECKSUM_SHA256="94c5bc7de89f185cbc0ac7a4add21e890ca9680a6d01c21841aae69c4b9e724f" +PATCHES="asylum-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64" + +GLOBAL_WRITABLE_FILES=" + settings/asylum/hiscores directory keep-old + " + +PROVIDES=" + asylum = $portVersion + app:Asylum = $portVersion + " +REQUIRES=" + haiku + lib:libgl + lib:libglu + lib:libsdl + lib:libsdl_mixer + " + +BUILD_REQUIRES=" + haiku_devel + devel:libgl + devel:libglu + devel:libsdl + devel:libsdl_mixer + " +BUILD_PREREQUIRES=" + cmd:g++ + cmd:make + " + +BUILD() +{ + make clean + make $jobArgs HOST=haiku \ + INSTALLBIN=$appsDir/Asylum \ + INSTALLRESOURCEPATH=$dataDir/asylum \ + INSTALLHISCORES=$settingsDir/asylum/hiscores +} + +INSTALL() +{ + mkdir -p $appsDir + make install HOST=haiku \ + INSTALLGROUP="`id -gn`" \ + INSTALLBIN=$appsDir/Asylum \ + INSTALLRESOURCEPATH=$dataDir/asylum \ + INSTALLHISCORES=$settingsDir/asylum/hiscores +} diff --git a/games-arcade/asylum/patches/asylum-0.3.2.patchset b/games-arcade/asylum/patches/asylum-0.3.2.patchset new file mode 100644 index 000000000..286953392 --- /dev/null +++ b/games-arcade/asylum/patches/asylum-0.3.2.patchset @@ -0,0 +1,114 @@ +From 737f8e22eb9cc7bea218274e0f1d068d7da1c193 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sun, 11 Nov 2018 10:16:27 +0100 +Subject: Makefile, use Haiku settings + + +diff --git a/Makefile b/Makefile +index 57882d7..2d18918 100644 +--- a/Makefile ++++ b/Makefile +@@ -27,13 +27,11 @@ CHMOD=chmod + #CHGRP=echo + #CHMOD=echo + ifeq ($(HOST),haiku) +- CC=i586-pc-haiku-gcc +- COPTS+=$(CPPFLAGS) -D_NO_SOUND + INSTALLBIN=/boot/common/games/asylum/asylum + INSTALLRESOURCEPATH=/boot/common/games/asylum/data + INSTALLHISCORES=/boot/common/games/asylum/hiscores + OS_SOURCE=asylum_haiku.c +- LIBS=-lSDL_mixer -lSDL -lbe -lroot -ldevice -lgame -lGL -ltextencoding -lmedia ++ LIBS=-lSDL_mixer -lSDL -lbe -lroot -ldevice -lgame -lGL -lGLU -ltextencoding -lmedia + endif + ifeq ($(HOST),mingw) + INSTALLBIN="c:/program files/asylum/asylum.exe" +-- +2.19.1 + + +From f92dd526223060927c05239c2b62deffe1e249ed Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sun, 11 Nov 2018 10:18:06 +0100 +Subject: Don't use GL renderer + + +diff --git a/asylum.c b/asylum.c +index 8fe9a5b..3879333 100644 +--- a/asylum.c ++++ b/asylum.c +@@ -262,8 +262,8 @@ void setdefaults() + options.gearchange = (arm3 == 0) ? 0 : 1; + options.explospeed = (arm3 == 0) ? 2 : 1; + options.fullscreen = 0; +- options.opengl = 1; +- options.size = 1; // 640 x 512 ++ options.opengl = 0; ++ options.size = 0; // 640 x 512 + options.scale = 1; + options.joyno = 0; + options.mentalzone = 1; +-- +2.19.1 + + +From e8768d00273829d9cab66ba0554e60a4cf7510c1 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sun, 11 Nov 2018 13:37:18 +0100 +Subject: Move user settings to ~/config/settings + + +diff --git a/file.c b/file.c +index 48e1346..2dda765 100644 +--- a/file.c ++++ b/file.c +@@ -32,8 +32,8 @@ char storage[STOREAREALEN]; + static char resource_path[240]; + static char score_path[240]; + +-char configname[] = "/.asylum"; //"Config"; +-char savegamename[] = "/.asylum_game"; ++char configname[] = "/config/settings/.asylum"; //"Config"; ++char savegamename[] = "/config/settings/.asylum_game"; + + static const char* score_name[4] = { + "/EgoHighScores", "/PsycheHighScores", "/IdHighScores", "/ExtendedHighScores" +-- +2.19.1 + + +From 524cf34a4959e4405f26969c05efb88faebd0b80 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Mon, 12 Nov 2018 09:32:07 +0100 +Subject: Make Asylum launch from Tracker + + +diff --git a/asylum.c b/asylum.c +index 3879333..4412e48 100644 +--- a/asylum.c ++++ b/asylum.c +@@ -18,6 +18,11 @@ + #include + #include + ++#ifdef __HAIKU__ ++#include ++#include ++#endif ++ + #include "asylum_os.h" + #include "asylum.h" + +@@ -464,6 +469,9 @@ void c_array_initializers() + + int main(int argc, char** argv) + { ++#ifdef __HAIKU__ ++ chdir(dirname(argv[0])); ++#endif + find_resources(); + + if ((argc > 2) && !strcmp(argv[1], "--dumpmusic")) +-- +2.19.1 +