OpenTyrian: add recipe and patch for version 2.1

This commit is contained in:
Mikołaj 'lich' Halber
2015-12-15 19:21:29 +01:00
parent c7ad890adc
commit 9958069872
3 changed files with 133 additions and 0 deletions

View File

@@ -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
}

View File

@@ -0,0 +1,45 @@
From d1ffdc61ccb3c8eccbb0c938e8fafa4f8c3dc3f7 Mon Sep 17 00:00:00 2001
From: Mikolaj 'lich' Halber <lich@opmbx.org>
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 <stdio.h>
#include <stdlib.h>
#include <time.h>
+#include <libgen.h>
+#include <unistd.h>
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

View File

@@ -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/
}