summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--xdg_data_dir.patch21
3 files changed, 32 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 05b6a3f1b7fb..d4d51f166163 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = alephone-git
pkgdesc = A free, enhanced port of the classic FPS "Marathon 2" by Bungie Software (development version)
- pkgver = 1.6.1.r5745.e1e51743
+ pkgver = 1.7b1.r5879.2da0b706
pkgrel = 1
url = https://alephone.lhowon.org/
arch = i686
@@ -29,6 +29,8 @@ pkgbase = alephone-git
provides = alephone
conflicts = alephone
source = git+https://github.com/Aleph-One-Marathon/alephone
+ source = xdg_data_dir.patch
md5sums = SKIP
+ md5sums = 296df23c9e47fc772e5e6e1b62c50827
pkgname = alephone-git
diff --git a/PKGBUILD b/PKGBUILD
index 86c94d834d36..03ede7bdd129 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
pkgname=alephone-git
-pkgver=1.6.1.r5745.e1e51743
+pkgver=1.7b1.r5879.2da0b706
pkgrel=1
pkgdesc='A free, enhanced port of the classic FPS "Marathon 2" by Bungie Software (development version)'
arch=('i686' 'x86_64')
@@ -17,8 +17,10 @@ optdepends=('alephone-eternalx: community-made scenario'
'alephone-marathon: M1A1 data converted for AlephOne'
'alephone-marathon2: original data for Marathon 2: Durandal')
makedepends=('git' 'boost' 'mesa' 'icoutils' 'autoconf-archive')
-source=("git+https://github.com/Aleph-One-Marathon/alephone")
-md5sums=('SKIP')
+source=("git+https://github.com/Aleph-One-Marathon/alephone"
+ "xdg_data_dir.patch")
+md5sums=('SKIP'
+ '296df23c9e47fc772e5e6e1b62c50827')
pkgver() {
cd alephone/Source_Files/Misc
@@ -29,6 +31,9 @@ pkgver() {
prepare() {
cd alephone
+ # Use XDG Base Directory specification for user data
+ patch -Np1 -i "${srcdir}/xdg_data_dir.patch"
+
# convert the windows icons
cd Resources/Windows
icotool -x -w 48 alephone.ico -o "$srcdir"/alephone.png
diff --git a/xdg_data_dir.patch b/xdg_data_dir.patch
new file mode 100644
index 000000000000..ad223dd01fb5
--- /dev/null
+++ b/xdg_data_dir.patch
@@ -0,0 +1,21 @@
+diff --git a/Source_Files/CSeries/cspaths_sdl.cpp b/Source_Files/CSeries/cspaths_sdl.cpp
+index b562c908..50b04b54 100644
+--- a/Source_Files/CSeries/cspaths_sdl.cpp
++++ b/Source_Files/CSeries/cspaths_sdl.cpp
+@@ -176,9 +176,14 @@ static std::string _get_local_data_path()
+ static std::string local_dir = "";
+ if (local_dir.empty())
+ {
+- const char *home = getenv("HOME");
++ const char *home = getenv("XDG_DATA_HOME");
+ if (home)
+- local_dir = std::string(home) + "/.alephone";
++ local_dir = std::string(home) + "/alephone";
++ else {
++ home = getenv("HOME");
++ if (home)
++ local_dir = std::string(home) + "/.local/share/alephone";
++ }
+ }
+ return local_dir;
+ }