diff options
author | jbeich <jbeich@FreeBSD.org> | 2016-12-26 13:39:42 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2016-12-26 13:39:42 +0800 |
commit | 9874350ae9d4ebf1f84f8707abcbb797e65a7eef (patch) | |
tree | 52bf820265b194b3630f456450a0abb1c8bf80d0 /games | |
parent | 8ea2d71958a7afa23a09d7d282381af89ef51e2a (diff) | |
download | freebsd-ports-gnome-9874350ae9d4ebf1f84f8707abcbb797e65a7eef.tar.gz freebsd-ports-gnome-9874350ae9d4ebf1f84f8707abcbb797e65a7eef.tar.zst freebsd-ports-gnome-9874350ae9d4ebf1f84f8707abcbb797e65a7eef.zip |
games/openbor: allow to disable HOME hack
Add an environment variable for vendor behavior as unpacked data/
doesn't work with more than one (game) module. Some even mix non-stub
.pak file with data/ which makes re-packing them tricky.
Diffstat (limited to 'games')
-rw-r--r-- | games/openbor/Makefile | 1 | ||||
-rw-r--r-- | games/openbor/files/patch-sdl_sdlport.c | 24 | ||||
-rw-r--r-- | games/openbor/pkg-message | 10 |
3 files changed, 22 insertions, 13 deletions
diff --git a/games/openbor/Makefile b/games/openbor/Makefile index 8355cbc26840..ecb08fad05ec 100644 --- a/games/openbor/Makefile +++ b/games/openbor/Makefile @@ -2,6 +2,7 @@ PORTNAME= openbor PORTVERSION= 3.0.r4420 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= LOCAL/jbeich \ https://svn.code.sf.net/p/${PORTNAME}/engine/engine/:svn diff --git a/games/openbor/files/patch-sdl_sdlport.c b/games/openbor/files/patch-sdl_sdlport.c index 4e02426b2ffa..8a143220a1c5 100644 --- a/games/openbor/files/patch-sdl_sdlport.c +++ b/games/openbor/files/patch-sdl_sdlport.c @@ -1,24 +1,22 @@ Store settings under ~/.openbor instead of current directory ---- sdl/sdlport.c.orig 2013-12-29 14:05:10 UTC +--- sdl/sdlport.c.orig 2015-04-18 21:21:56 UTC +++ sdl/sdlport.c -@@ -6,6 +6,11 @@ - * Copyright (c) 2004 - 2014 OpenBOR Team - */ - -+#include <errno.h> -+#include <unistd.h> -+#include <err.h> -+#include <sys/stat.h> -+ - #include "sdlport.h" - #include "packfile.h" +@@ -11,6 +11,8 @@ #include "ram.h" -@@ -92,6 +97,15 @@ int main(int argc, char *argv[]) + #include "video.h" + #include "menu.h" ++#include <sys/stat.h> ++#include <err.h> + #include <time.h> + #include <unistd.h> + +@@ -103,6 +105,16 @@ int main(int argc, char *argv[]) #ifdef ANDROID dirExists(rootDir, 1); chdir(rootDir); +#else ++ if(!getenv("OPENBOR_USE_CURDIR")) + { + if (chdir(getenv("HOME")) != 0) + err(1, "cannot cd to $HOME"); diff --git a/games/openbor/pkg-message b/games/openbor/pkg-message new file mode 100644 index 000000000000..6cb325cfbbb5 --- /dev/null +++ b/games/openbor/pkg-message @@ -0,0 +1,10 @@ +To play a module copy its .pak file under ~/.openbor/Paks/ directory. +If only one file is there OpenBOR would run the module on startup, +otherwise module launcher would appear. + +In case a module has data/ directory unpacked you may need to run it +as follows: + + $ cd /path/to/module + $ cp -R ~/.openbor/Saves . + $ OPENBOR_USE_CURDIR=1 openbor |