Merged in Begasus/haikuports_games/abrick (pull request #227)

abrick, updated recipe and added patch file
This commit is contained in:
Jerome Duval
2014-09-11 13:23:47 +02:00
2 changed files with 70 additions and 16 deletions

View File

@@ -1,25 +1,56 @@
DESCRIPTION="Abandoned Bricks is a tetris like cross-platform puzzle game written in C++ using the SDL Library"
HOMEPAGE="www.abrick.sourceforge.net"
SUMMARY="Abandoned Bricks is a tetris like cross-platform puzzle game."
DESCRIPTION="The goal of the game is to reach the highest possible score. \
Shapes fall from the top of the screen. You can move them sideways and \
rotate them in order to get the best fit when they reach the bottom. \
When you manage to complete a horizontal line, it disappears. When screen \
is full the game is over. The game speeds up whenever the lines are full. \
Therefore, it's better to fill as many lines you can at once. That way you \
can reach higher levels with the same speed."
HOMEPAGE="http://www.abrick.sourceforge.net"
LICENSE="GNU GPL v2"
COPYRIGHT="2004, 2005 Milan Babuskov "
SRC_URI="http://sourceforge.net/projects/abrick/files/abrick/abrick-1.12/abrick-1.12-src.tar.gz"
CHECKSUM_MD5="56bdb952e2c247abfccf6e4a5251753c"
STATUS_HAIKU="stable"
CHECKSUM_SHA256="75113463cb8cdbcd0ed251865253c1124ae493b5c1a35393e901b3337c9d0c74"
REVISION="1"
DEPEND="media-libs/libsdl >= 1.2.14
media-libs/sdl-mixer >=1.2.0"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SOURCE_DIR="abrick-1.12-src"
PATCHES="abrick-1.12.patch"
PROVIDES="
abrick = $portVersion
app:abrick = $portVersion
"
REQUIRES="
haiku >= $haikuVersion
lib:libsdl
lib:libSDL_mixer
lib:libSDL_image
"
BUILD_REQUIRES="
haiku_devel >= $haikuVersion
devel:libSDL
devel:libSDL_mixer
devel:libSDL_image
"
BUILD_PREREQUIRES="
cmd:make
cmd:gcc
"
BUILD()
{
cd abrick-1.12-src
make
make $jobArgs
}
INSTALL()
{
cd abrick-1.12-src
GAMEDIR=`finddir B_APPS_DIRECTORY`/abrick
mkdir -p ${DESTDIR}/${GAMEDIR}
cp -af abrick ${DESTDIR}/${GAMEDIR}
cp -af data ${DESTDIR}/${GAMEDIR}
mkdir -p $appsDir/Abrick
cp -af abrick $appsDir/Abrick
cp -af data $appsDir/Abrick
cp -af html $appsDir/Abrick
addAppDeskbarSymlink $appsDir/Abrick/abrick Abrick
}
LICENSE="GNU GPL v2"
COPYRIGHT="2004, 2005 Milan Babuskov "

View File

@@ -0,0 +1,23 @@
--- abrick-1.12-src/main.cpp.org 2014-09-03 20:35:03.195821568 +0200
+++ abrick-1.12-src/main.cpp 2014-09-03 20:34:52.090177536 +0200
@@ -10,11 +10,20 @@
#include "config.h"
#include "menu.h"
#include "allmenus.h"
+
+#ifdef __HAIKU__
+#include <unistd.h>
+#include <libgen.h>
+#endif
+
SDL_Surface *Screen; // global object
//-----------------------------------------------------------------------------
//! initialize SDL, and start main menu
int main(int argc, char **argv)
{
+ #ifdef __HAIKU__
+ chdir(dirname(argv[0]));
+ #endif
Screen = 0;
bool Fullscreen = false; // defaults
bool SWSurface = true;