summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Swanson2019-02-10 08:33:49 -0800
committerMike Swanson2019-02-10 08:33:49 -0800
commitac9867492e8977efe9e23b5bfe2a2e06c65d6669 (patch)
treee469f9197787b3693395f4010d7732a0704d5755
parentf0a359ceafa512c9092b5ec6084345fa44353a72 (diff)
downloadaur-ac9867492e8977efe9e23b5bfe2a2e06c65d6669.tar.gz
Backport getenv() fix from upstream
-rw-r--r--.SRCINFO6
-rw-r--r--0001-Fix-getenv-returning-NULL.patch45
-rw-r--r--PKGBUILD20
3 files changed, 66 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cb1839d640d9..5201eb092a88 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sat Feb 9 21:58:34 UTC 2019
+# Sun Feb 10 16:32:26 UTC 2019
pkgbase = libtas
pkgdesc = Tool-assisted speedrunning utility for Linux-native binaries
pkgver = 1.3.3
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/clementgallet/libTAS
arch = x86_64
license = GPL3
@@ -17,7 +17,9 @@ pkgbase = libtas
depends = xcb-util-cursor
depends = zlib
source = https://github.com/clementgallet/libTAS/archive/v1.3.3.tar.gz
+ source = 0001-Fix-getenv-returning-NULL.patch
sha512sums = dcb6d7c4d02e55d5c3e4e542c8fc99e6b6476f7f96711024f4a61103b2e5aa61c83994cb45b7510727e3e2f3201efb738929f495a0939874fcd09818513c6f1e
+ sha512sums = 4f9c4d7f7a255ba35adc362ff278b0b55bea7fc92ccc6ad8f0c725b78b72aacc2239e22ce8e58b07ddb7101e2016cb2791bdc77169b1d3a72fded908b84d5f3e
pkgname = libtas
diff --git a/0001-Fix-getenv-returning-NULL.patch b/0001-Fix-getenv-returning-NULL.patch
new file mode 100644
index 000000000000..f3ccdb801140
--- /dev/null
+++ b/0001-Fix-getenv-returning-NULL.patch
@@ -0,0 +1,45 @@
+From 5ca20a59239bc1852df5d410ca043ca6a5ea8283 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cl=C3=A9ment=20Gallet?= <clement.gallet@ens-lyon.org>
+Date: Sat, 9 Feb 2019 00:31:18 +0100
+Subject: [PATCH] Fix getenv returning NULL
+
+---
+ src/program/main.cpp | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/src/program/main.cpp b/src/program/main.cpp
+index c3f04f1..f62121a 100644
+--- a/src/program/main.cpp
++++ b/src/program/main.cpp
+@@ -191,8 +191,11 @@ int main(int argc, char **argv)
+ context.libtaspath += "/libtas.so";
+
+ /* Create the working directories */
+- context.config.configdir = getenv("XDG_CONFIG_HOME");
+- if (context.config.configdir.empty()) {
++ char *path = getenv("XDG_CONFIG_HOME");
++ if (path) {
++ context.config.configdir = path;
++ }
++ else {
+ context.config.configdir = getenv("HOME");
+ context.config.configdir += "/.config";
+ }
+@@ -213,8 +216,12 @@ int main(int argc, char **argv)
+ /* If the config file set custom directories for the remaining working dir,
+ * we create these directories (if not already created).
+ * Otherwise, we set and create the default ones. */
+- std::string data_dir = getenv("XDG_DATA_HOME");
+- if (data_dir.empty()) {
++ std::string data_dir;
++ path = getenv("XDG_DATA_HOME");
++ if (path) {
++ data_dir = path;
++ }
++ else {
+ data_dir = getenv("HOME");
+ data_dir += "/.local/share";
+ }
+--
+2.20.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 41020f62b93b..177374699f51 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=libtas
pkgver=1.3.3
-pkgrel=1
+pkgrel=2
pkgdesc="Tool-assisted speedrunning utility for Linux-native binaries"
arch=('x86_64')
url="https://github.com/clementgallet/libTAS"
@@ -10,8 +10,22 @@ license=('GPL3')
depends=('alsa-lib' 'ffmpeg' 'fontconfig' 'freetype2'
'qt5-base' 'xcb-util-cursor' 'zlib')
makedepends=('cmake' 'extra-cmake-modules')
-source=("${url}/archive/v${pkgver}.tar.gz")
-sha512sums=('dcb6d7c4d02e55d5c3e4e542c8fc99e6b6476f7f96711024f4a61103b2e5aa61c83994cb45b7510727e3e2f3201efb738929f495a0939874fcd09818513c6f1e')
+source=("${url}/archive/v${pkgver}.tar.gz"
+ 0001-Fix-getenv-returning-NULL.patch)
+sha512sums=('dcb6d7c4d02e55d5c3e4e542c8fc99e6b6476f7f96711024f4a61103b2e5aa61c83994cb45b7510727e3e2f3201efb738929f495a0939874fcd09818513c6f1e'
+ '4f9c4d7f7a255ba35adc362ff278b0b55bea7fc92ccc6ad8f0c725b78b72aacc2239e22ce8e58b07ddb7101e2016cb2791bdc77169b1d3a72fded908b84d5f3e')
+
+prepare() {
+ cd libTAS-$pkgver
+
+ for patch in ../*.patch; do
+ if [ ! -f "$patch" ]; then
+ break;
+ else
+ patch -p1 -i "$patch"
+ fi
+ done
+}
build() {
cd "libTAS-$pkgver"