diff options
author | Mike Swanson | 2014-06-13 17:06:02 -0700 |
---|---|---|
committer | Mike Swanson | 2014-06-13 17:06:02 -0700 |
commit | b6b062ef703556dcdd93277e6f1b98ba8ca4cdbd (patch) | |
tree | 4b1f9b5fe44b3c8ffdb5630fcdfa7f32d72ec378 | |
parent | 551c271e8aa4ab00b18abb55e028333ff3612127 (diff) | |
download | aur-b6b062ef703556dcdd93277e6f1b98ba8ca4cdbd.tar.gz |
fix upstream issue #97
It's not clear to me that this will be fixed soon. This patch might be
a temporary solution, but it works.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0002-find_basepath_correctly.patch | 36 | ||||
-rw-r--r-- | PKGBUILD | 9 |
3 files changed, 45 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = dhewm3-git pkgdesc = Doom 3 engine with native 64-bit support, SDL, and OpenAL pkgver = 2013.09.17.g6d8108c - pkgrel = 1 + pkgrel = 2 url = https://github.com/dhewm/dhewm3 install = dhewm3.install arch = i686 @@ -19,9 +19,11 @@ pkgbase = dhewm3-git source = git+https://github.com/dhewm/dhewm3.git source = dhewm3.desktop source = 0001-game_data_location.patch + source = 0002-find_basepath_correctly.patch sha256sums = SKIP sha256sums = 7c9ae892c6cf0453fcd57731689ccedac8f8ce10f33043f7dd5fb66bd73d1287 sha256sums = dbbb0607a92482a1b753cf9cac97dcc57345b92ee43449c9826f5b23af7624f9 + sha256sums = 41ea4db22a8a884a2ce9b6c8e68dc2e0364a02528eda2bec81e4a90b9c322557 pkgname = dhewm3-git diff --git a/0002-find_basepath_correctly.patch b/0002-find_basepath_correctly.patch new file mode 100644 index 000000000000..a3151a5aec99 --- /dev/null +++ b/0002-find_basepath_correctly.patch @@ -0,0 +1,36 @@ +diff --git a/neo/sys/linux/main.cpp b/neo/sys/linux/main.cpp +index d4b52b0..9b77c36 100644 +--- a/neo/sys/linux/main.cpp ++++ b/neo/sys/linux/main.cpp +@@ -62,6 +62,16 @@ bool Sys_GetPath(sysPath_t type, idStr &path) { + + common->Warning("base path '" BUILD_DATADIR "' does not exist"); + ++ // fallback to vanilla doom3 install ++ if (stat(LINUX_DEFAULT_PATH, &st) != -1 && S_ISDIR(st.st_mode)) { ++ common->Warning("using hardcoded default base path"); ++ ++ path = LINUX_DEFAULT_PATH; ++ return true; ++ } ++ ++ common->Warning("base path '" LINUX_DEFAULT_PATH "' does not exist"); ++ + // try next to the executable.. + if (Sys_GetPath(PATH_EXE, path)) { + path = path.StripFilename(); +@@ -73,14 +83,6 @@ bool Sys_GetPath(sysPath_t type, idStr &path) { + } + } + +- // fallback to vanilla doom3 install +- if (stat(LINUX_DEFAULT_PATH, &st) != -1 && S_ISDIR(st.st_mode)) { +- common->Warning("using hardcoded default base path"); +- +- path = LINUX_DEFAULT_PATH; +- return true; +- } +- + return false; + + case PATH_CONFIG: @@ -1,7 +1,7 @@ # Maintainer: Mike Swanson <mikeonthecomputer@gmail.com> pkgname=dhewm3-git pkgver=2013.09.17.g6d8108c -pkgrel=1 +pkgrel=2 pkgdesc="Doom 3 engine with native 64-bit support, SDL, and OpenAL" arch=('i686' 'x86_64') url="https://github.com/dhewm/dhewm3" @@ -12,10 +12,12 @@ optdepends=('curl: download support') install=dhewm3.install source=('git+https://github.com/dhewm/dhewm3.git' 'dhewm3.desktop' - '0001-game_data_location.patch') + '0001-game_data_location.patch' + '0002-find_basepath_correctly.patch') sha256sums=('SKIP' '7c9ae892c6cf0453fcd57731689ccedac8f8ce10f33043f7dd5fb66bd73d1287' - 'dbbb0607a92482a1b753cf9cac97dcc57345b92ee43449c9826f5b23af7624f9') + 'dbbb0607a92482a1b753cf9cac97dcc57345b92ee43449c9826f5b23af7624f9' + '41ea4db22a8a884a2ce9b6c8e68dc2e0364a02528eda2bec81e4a90b9c322557') pkgver() { cd "${pkgname/-git/}" @@ -25,6 +27,7 @@ pkgver() { build() { cd "${pkgname/-git/}" patch -p1 < "$srcdir"/0001-game_data_location.patch + patch -p1 < "$srcdir"/0002-find_basepath_correctly.patch cd neo cmake -DCMAKE_INSTALL_PREFIX=/usr -DD3XP=1 -DDEDICATED=1 . |