Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Dec 2016 05:39:42 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r429479 - in head/games/openbor: . files
Message-ID:  <201612260539.uBQ5dgaD021441@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Mon Dec 26 05:39:42 2016
New Revision: 429479
URL: https://svnweb.freebsd.org/changeset/ports/429479

Log:
  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.

Added:
  head/games/openbor/pkg-message   (contents, props changed)
Modified:
  head/games/openbor/Makefile   (contents, props changed)
  head/games/openbor/files/patch-sdl_sdlport.c   (contents, props changed)

Modified: head/games/openbor/Makefile
==============================================================================
--- head/games/openbor/Makefile	Mon Dec 26 05:39:30 2016	(r429478)
+++ head/games/openbor/Makefile	Mon Dec 26 05:39:42 2016	(r429479)
@@ -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

Modified: head/games/openbor/files/patch-sdl_sdlport.c
==============================================================================
--- head/games/openbor/files/patch-sdl_sdlport.c	Mon Dec 26 05:39:30 2016	(r429478)
+++ head/games/openbor/files/patch-sdl_sdlport.c	Mon Dec 26 05:39:42 2016	(r429479)
@@ -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");

Added: head/games/openbor/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/openbor/pkg-message	Mon Dec 26 05:39:42 2016	(r429479)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612260539.uBQ5dgaD021441>