diff --git a/games-arcade/xrick/patches/xrick-021212.patchset b/games-arcade/xrick/patches/xrick-021212.patchset new file mode 100644 index 000000000..3f130c1d8 --- /dev/null +++ b/games-arcade/xrick/patches/xrick-021212.patchset @@ -0,0 +1,30 @@ +From 1989e5b49aa41dee60c76b0951fea2dd8b1b2251 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 12 Jan 2014 21:32:19 +0100 +Subject: Look for the datafile next to the executable. + +XRick can be run from Deskbar or Tracker this way. + +diff --git a/src/xrick.c b/src/xrick.c +index 38d4e26..870adc7 100644 +--- a/src/xrick.c ++++ b/src/xrick.c +@@ -25,8 +25,13 @@ main(int argc, char *argv[]) + sys_init(argc, argv); + if (sysarg_args_data) + data_setpath(sysarg_args_data); +- else +- data_setpath("data.zip"); ++ else { ++ const char* basename = dirname(argv[0]); ++ char* datapath = malloc(strlen(basename) + strlen("/data.zip") + 1); ++ strcpy(datapath, basename); ++ strcat(datapath, "/data.zip"); ++ data_setpath(datapath); ++ } + game_run(); + data_closepath(); + sys_shutdown(); +-- +1.8.3.4 + diff --git a/games-arcade/xrick/xrick-021212.recipe b/games-arcade/xrick/xrick-021212.recipe new file mode 100644 index 000000000..bef842bcb --- /dev/null +++ b/games-arcade/xrick/xrick-021212.recipe @@ -0,0 +1,55 @@ +SUMMARY="xrick is a clone of Rick Dangerous." +HOMEPAGE="http://www.bigorno.net/xrick" +LICENSE="xrick" +COPYRIGHT="2000-2006 Bigorno.net" +SRC_URI="http://www.bigorno.net/xrick/xrick-021212.tgz" +CHECKSUM_MD5="615190051481266710cb43ecd1fe930c" +REVISION="1" +ARCHITECTURES="x86_gcc2" + +PROVIDES=" + xrick = $portVersion + app:xrick = $portVersion + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libsdl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " +BUILD_REQUIRES=" + devel:libsdl$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + haiku_devel >= $haikuVersion + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + " + +PATCHES="xrick-$portVersion.patchset" +BUILD() +{ + make $jobArgs +} + +INSTALL() +{ + mkdir -p $appsDir/XRick + cp xrick $appsDir/XRick + cp data.zip $appsDir/XRick + addAppDeskbarSymlink $appsDir/XRick/xrick "Rick Dangerous" +} + +# ----- DESCRIPTION ----------------------------------------------------------- + +DESCRIPTION=" +Remember Rick Dangerous? + +Way before Lara Croft, back in the 1980's and early 1990's, Rick Dangerous was +the Indiana Jones of computer games, running away from rolling rocks, avoiding +traps, from South America to a futuristic missile base via Egypt and the +Schwarzendumpf castle. +"