From 99580698727c8af8058015d3be890bc05f0a2a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=27lich=27=20Halber?= Date: Tue, 15 Dec 2015 19:21:29 +0100 Subject: [PATCH] OpenTyrian: add recipe and patch for version 2.1 --- .../opentyrian/opentyrian-2.1.20130907.recipe | 50 +++++++++++++++++++ .../patches/opentyrian-2.1.20130907.patchset | 45 +++++++++++++++++ .../opentyrian_data/opentyrian_data-21.recipe | 38 ++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 games-arcade/opentyrian/opentyrian-2.1.20130907.recipe create mode 100644 games-arcade/opentyrian/patches/opentyrian-2.1.20130907.patchset create mode 100644 games-arcade/opentyrian_data/opentyrian_data-21.recipe diff --git a/games-arcade/opentyrian/opentyrian-2.1.20130907.recipe b/games-arcade/opentyrian/opentyrian-2.1.20130907.recipe new file mode 100644 index 000000000..1a1351494 --- /dev/null +++ b/games-arcade/opentyrian/opentyrian-2.1.20130907.recipe @@ -0,0 +1,50 @@ +SUMMARY="A port of the DOS shoot-em-up Tyrian" +DESCRIPTION="OpenTyrian is an arcade-style vertical scrolling shooter. The story is set in the \ +year 20,031 where you play as Trent Hawkins, a skilled fighter-pilot employed to fight Microsol \ +and save the galaxy. February 2007 the Pascal source code for Tyrian was licensed for a small \ +group of developers to re-write it in C, in a project named OpenTyrian, licensed under the GNU \ +General Public License. Following that announcement, in April 2007 Daniel Cook announced the \ +free availability of his Tyrian artwork under generic liberal terms." +HOMEPAGE="https://bitbucket.org/opentyrian/opentyrian/" +COPYRIGHT="OpenTyrian Team" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="http://www.camanis.net/opentyrian/releases/opentyrian-$portVersion-src.tar.gz" +SOURCE_DIR="opentyrian-$portVersion" +CHECKSUM_SHA256="f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008dee45f" +PATCHES="opentyrian-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 ?x86_64 ?x86" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + opentyrian = $portVersion + app:OpenTyrian + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libSDL$secondaryArchSuffix + lib:libsdl_net$secondaryArchSuffix + opentyrian_data + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libsdl$secondaryArchSuffix + devel:libsdl_net$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + " +BUILD() +{ + make $jobArgs +} + +INSTALL() +{ + mkdir -p $appsDir/OpenTyrian + cp opentyrian* $appsDir/OpenTyrian/OpenTyrian + addAppDeskbarSymlink $appsDir/OpenTyrian/OpenTyrian OpenTyrian +} diff --git a/games-arcade/opentyrian/patches/opentyrian-2.1.20130907.patchset b/games-arcade/opentyrian/patches/opentyrian-2.1.20130907.patchset new file mode 100644 index 000000000..734abb664 --- /dev/null +++ b/games-arcade/opentyrian/patches/opentyrian-2.1.20130907.patchset @@ -0,0 +1,45 @@ +From d1ffdc61ccb3c8eccbb0c938e8fafa4f8c3dc3f7 Mon Sep 17 00:00:00 2001 +From: Mikolaj 'lich' Halber +Date: Tue, 15 Dec 2015 15:06:31 +0000 +Subject: Added Haiku support + + +diff --git a/Makefile b/Makefile +index 88a8bd6..5d1a683 100644 +--- a/Makefile ++++ b/Makefile +@@ -37,7 +37,9 @@ ifneq ($(HG_REV), ) + EXTRA_CFLAGS += '-DHG_REV="$(HG_REV)"' + endif + +-EXTRA_LDLIBS += -lm ++ifneq (BePC, $(shell uname -m)) ++ EXTRA_LDLIBS += -lm ++endif + + SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags) + SDL_LDLIBS := $(shell $(SDL_CONFIG) --libs) +diff --git a/src/opentyr.c b/src/opentyr.c +index 3cffa49..d0f85a4 100644 +--- a/src/opentyr.c ++++ b/src/opentyr.c +@@ -52,6 +52,8 @@ + #include + #include + #include ++#include ++#include + + const char *opentyrian_str = "OpenTyrian", + *opentyrian_version = HG_REV; +@@ -275,6 +277,7 @@ void opentyrian_menu( void ) + + int main( int argc, char *argv[] ) + { ++ chdir(dirname(argv[0])); + mt_srand(time(NULL)); + + printf("\nWelcome to... >> %s %s <<\n\n", opentyrian_str, opentyrian_version); +-- +2.2.2 + diff --git a/games-arcade/opentyrian_data/opentyrian_data-21.recipe b/games-arcade/opentyrian_data/opentyrian_data-21.recipe new file mode 100644 index 000000000..ae1ba10db --- /dev/null +++ b/games-arcade/opentyrian_data/opentyrian_data-21.recipe @@ -0,0 +1,38 @@ +SUMMARY="A port of the DOS shoot-em-up Tyrian (data files) " +DESCRIPTION="OpenTyrian is an arcade-style vertical scrolling shooter. The story is set in the \ +year 20,031 where you play as Trent Hawkins, a skilled fighter-pilot employed to fight Microsol \ +and save the galaxy. February 2007 the Pascal source code for Tyrian was licensed for a small \ +group of developers to re-write it in C, in a project named OpenTyrian, licensed under the GNU \ +General Public License. Following that announcement, in April 2007 Daniel Cook announced the \ +free availability of his Tyrian artwork under generic liberal terms." +HOMEPAGE="https://bitbucket.org/opentyrian/opentyrian/" +COPYRIGHT="OpenTyrian Team" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="http://sites.google.com/a/camanis.net/opentyrian/tyrian/tyrian$portVersion.zip" +SOURCE_DIR="tyrian$portVersion" +CHECKSUM_SHA256="7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277" + +ARCHITECTURES="any" +DISABLE_SOURCE_PACKAGE=yes + +PROVIDES=" + opentyrian_data = $portVersion + " +#REQUIRES=" +# " +#BUILD_REQUIRES=" +# " +#BUILD_PREREQUIRES=" +# " +BUILD() +{ + true +} + +INSTALL() +{ + mkdir -p $appsDir/OpenTyrian + mkdir -p $appsDir/OpenTyrian/data + cp -r * $appsDir/OpenTyrian/data/ +}