summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Wieczorek2016-05-15 18:41:07 +0200
committerMarcin Wieczorek2016-05-15 18:41:07 +0200
commite190081280c8ebbc9c3bbe5080cd93f3cda94df5 (patch)
treebae6d346fa1f5cab7dd9bc6b4b5633deddebb2e1
parent27ef2c50171b8eb4a675d7d042f028bd9e00cb76 (diff)
downloadaur-e190081280c8ebbc9c3bbe5080cd93f3cda94df5.tar.gz
Added multiuser patch (Release: 2)
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--multiuser.patch75
3 files changed, 87 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e9ad7456b1b4..899c0c651b2d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = supermodel-svn
pkgdesc = A Sega Model 3 Arcade Emulator
- pkgver = 0.3a
+ pkgver = 20160515.411
pkgrel = 1
url = http://www.supermodel3.com/
install = supermodel.install
@@ -11,8 +11,10 @@ pkgbase = supermodel-svn
depends = sdl
depends = zlib
source = supermodel.sh
+ source = multiuser.patch
source = supermodel-svn::svn+https://svn.code.sf.net/p/model3emu/code/trunk
md5sums = ea8274c2a37acddd026fce9c831530cc
+ md5sums = 2169d888da85c9baf9f55fc18c738ef8
md5sums = SKIP
pkgname = supermodel-svn
diff --git a/PKGBUILD b/PKGBUILD
index 027a49c77e8d..31b6c71987f0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Anton Shestakov <engored@ya.ru>
pkgname=supermodel-svn
-pkgver=0.3a
+pkgver=20160515.411
pkgrel=1
pkgdesc='A Sega Model 3 Arcade Emulator'
arch=('i686' 'x86_64')
@@ -11,17 +11,24 @@ license=('GPL3')
depends=('mesa' 'sdl' 'zlib')
install=supermodel.install
source=('supermodel.sh'
+ 'multiuser.patch'
"${pkgname}::svn+https://svn.code.sf.net/p/model3emu/code/trunk")
md5sums=('ea8274c2a37acddd026fce9c831530cc'
+ '2169d888da85c9baf9f55fc18c738ef8'
'SKIP')
MAKEFLAGS="-j1"
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+ svn info | awk '/Revision/{r=$2}/Date/{gsub(/-/,"");d=$4}END{print d"."r}'
+}
+
build() {
cd "${srcdir}/supermodel-svn/"
sed -e "s/-Wall -O3/$CFLAGS/" -i 'Makefiles/Makefile.SDL.UNIX.GCC'
- # patch -p1 < ../multiuser.patch
+ patch -p1 < ../multiuser.patch
make -f 'Makefiles/Makefile.SDL.UNIX.GCC'
}
diff --git a/multiuser.patch b/multiuser.patch
new file mode 100644
index 000000000000..269c4adab39f
--- /dev/null
+++ b/multiuser.patch
@@ -0,0 +1,75 @@
+--- a/Src/OSD/SDL/Main.cpp 2016-05-15 18:16:43.001377932 +0200
++++ b/Src/OSD/SDL/Main.cpp 2016-05-15 18:21:03.166635163 +0200
+@@ -512,8 +512,6 @@
+ Configuration file management and input settings.
+ ******************************************************************************/
+
+-static const char s_configFilePath[] = { "Config/Supermodel.ini" };
+-
+ // Create and configure inputs
+ static bool ConfigureInputs(CInputs *Inputs, bool configure)
+ {
+@@ -523,6 +521,9 @@
+ ";\n"
+ };
+
++ char s_configFilePath[512];
++ sprintf(s_configFilePath, "%s/.supermodel/supermodel.ini", getenv("HOME"));
++
+ // Open and parse configuration file
+ CINIFile INI;
+ INI.Open(s_configFilePath); // doesn't matter if it exists or not, will get overwritten
+@@ -624,6 +625,9 @@
+ // Read settings (from a specific section) from the config file
+ static void ReadConfigFile(const char *section)
+ {
++ char s_configFilePath[512];
++ sprintf(s_configFilePath, "%s/.supermodel/supermodel.ini", getenv("HOME"));
++
+ CINIFile INI;
+
+ INI.Open(s_configFilePath);
+@@ -719,8 +723,8 @@
+ {
+ CBlockFile SaveState;
+
+- char filePath[24];
+- sprintf(filePath, "Saves/%s.st%d", Model3->GetGameInfo()->id, s_saveSlot);
++ char filePath[512];
++ sprintf(filePath, "%s/.supermodel/saves/%s.st%d", getenv("HOME"), Model3->GetGameInfo()->id, s_saveSlot);
+ if (OKAY != SaveState.Create(filePath, "Supermodel Save State", "Supermodel Version " SUPERMODEL_VERSION))
+ {
+ ErrorLog("Unable to save state to '%s'.", filePath);
+@@ -744,8 +748,8 @@
+ CBlockFile SaveState;
+
+ // Generate file path
+- char filePath[24];
+- sprintf(filePath, "Saves/%s.st%d", Model3->GetGameInfo()->id, s_saveSlot);
++ char filePath[512];
++ sprintf(filePath, "%s/.supermodel/saves/%s.st%d", getenv("HOME"), Model3->GetGameInfo()->id, s_saveSlot);
+
+ // Open and check to make sure format is correct
+ if (OKAY != SaveState.Load(filePath))
+@@ -779,8 +783,8 @@
+ {
+ CBlockFile NVRAM;
+
+- char filePath[24];
+- sprintf(filePath, "NVRAM/%s.nv", Model3->GetGameInfo()->id);
++ char filePath[512];
++ sprintf(filePath, "%s/.supermodel/NVRAM/%s.nv", getenv("HOME"), Model3->GetGameInfo()->id);
+ if (OKAY != NVRAM.Create(filePath, "Supermodel NVRAM State", "Supermodel Version " SUPERMODEL_VERSION))
+ {
+ ErrorLog("Unable to save NVRAM to '%s'. Make sure directory exists!", filePath);
+@@ -803,8 +807,8 @@
+ CBlockFile NVRAM;
+
+ // Generate file path
+- char filePath[24];
+- sprintf(filePath, "NVRAM/%s.nv", Model3->GetGameInfo()->id);
++ char filePath[512];
++ sprintf(filePath, "%s/.supermodel/NVRAM/%s.nv", getenv("HOME"), Model3->GetGameInfo()->id);
+
+ // Open and check to make sure format is correct
+ if (OKAY != NVRAM.Load(filePath))