Add SDL Lopan recipe.

* This could use better tileset and background graphics... any
suggestions?
This commit is contained in:
Adrien Destugues
2013-11-28 20:55:31 +01:00
parent f8b6827ae3
commit 1d59820519
2 changed files with 76 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
From e3ccf5397d0576d6d629b504ebed761f03a08c9d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 28 Nov 2013 20:44:31 +0100
Subject: Search data in app directory.
diff --git a/lopan.c b/lopan.c
index d653914..a597b9f 100644
--- a/lopan.c
+++ b/lopan.c
@@ -1,3 +1,4 @@
+#include <libgen.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>
@@ -543,6 +544,8 @@ int code;
unsigned char redraw;
int backup;
+ chdir(dirname(argv[0]));
+
bgsetnumber=tilesetnumber=-1;
randomize();
opendisplay(640,400);
--
1.8.3.4

View File

@@ -0,0 +1,49 @@
SUMMARY="An SDL version of the Lopan game"
HOMEPAGE="http://www.linuxmotors.com/sdllopan/"
LICENSE="Public Domain"
COPYRIGHT="1999-2008 Dave Ashley"
SRC_URI="http://www.linuxmotors.com/sdllopan/downloads/sdllopan-10.tgz"
CHECKSUM_MD5="10c03c69d2df6bcae9d835d18215978f"
REVISION="1"
ARCHITECTURES="x86_gcc2"
PROVIDES="
sdllopan = $portVersion
app:lopan = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libsdl$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libsdl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
haiku_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
PATCHES="sdllopan-10.patchset"
BUILD()
{
make $jobArgs
}
INSTALL()
{
mkdir -p $appsDir/Lopan
cp lopan $appsDir/Lopan/Lopan
cp -r data $appsDir/Lopan
addAppDeskbarSymlink $appsDir/Lopan/Lopan Lopan
}
# ----- DESCRIPTION -----------------------------------------------------------
DESCRIPTION="
The well known Lopan (Mah Jongg) game. Find pair and try to remove all 144
tiles before getting locked.
"