From owner-svn-ports-all@freebsd.org Mon Dec 26 05:39:44 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 247D1C91DC3; Mon, 26 Dec 2016 05:39:44 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D42F3131; Mon, 26 Dec 2016 05:39:43 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBQ5dhFq021443; Mon, 26 Dec 2016 05:39:43 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBQ5dgaD021441; Mon, 26 Dec 2016 05:39:42 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201612260539.uBQ5dgaD021441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Mon, 26 Dec 2016 05:39:42 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r429479 - in head/games/openbor: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Dec 2016 05:39:44 -0000 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 -+#include -+#include -+#include -+ - #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 ++#include + #include + #include + +@@ -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