Audacious: fix settings dir

This commit is contained in:
Gerasim Troeglazov
2019-04-15 22:41:35 +10:00
parent 655db50ab3
commit 9dda10fee4
2 changed files with 42 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ fetch lyrics for your music, to set an alarm in the morning, and more."
HOMEPAGE="https://audacious-media-player.org/"
COPYRIGHT="2010-2018 Błażej Szczygieł"
LICENSE="GNU GPL v3"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/audacious-media-player/audacious/archive/audacious-$portVersion.tar.gz"
CHECKSUM_SHA256="c478939b4bcf6704c26eee87d48cab26547e92a83741f437711178c433373fa1"
SOURCE_DIR="audacious-audacious-$portVersion"
@@ -66,6 +66,7 @@ BUILD_PREREQUIRES="
cmd:awk
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python2

View File

@@ -1,4 +1,4 @@
From a8774cdb93f973137df4e6ae7d846aa8d0190eac Mon Sep 17 00:00:00 2001
From f3901db657bbb399d660381d12ee112580884e8a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 26 Aug 2018 23:22:29 +1000
Subject: Ugly hack
@@ -32,5 +32,43 @@ index 52ad234..3178f44 100644
return EXIT_SUCCESS;
}
--
2.16.4
2.21.0
From 64223e5b135ddf5a1f0ab79968f2b9278edf7cd4 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 15 Apr 2019 22:16:23 +1000
Subject: Fix settings dir
diff --git a/src/libaudcore/runtime.cc b/src/libaudcore/runtime.cc
index 382e773..03d33c7 100644
--- a/src/libaudcore/runtime.cc
+++ b/src/libaudcore/runtime.cc
@@ -34,6 +34,9 @@
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#endif
#include <glib.h>
#include <libintl.h>
@@ -236,6 +239,13 @@ static void set_install_paths ()
static void set_config_paths ()
{
const char * xdg_config_home = g_get_user_config_dir ();
+#ifdef __HAIKU__
+ char audaciousSettings[PATH_MAX] = "";
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, audaciousSettings, sizeof(audaciousSettings)) == B_OK) {
+ strcat(audaciousSettings, "/Audacious");
+ xdg_config_home = audaciousSettings;
+ }
+#endif
StringBuf name = (instance_number == 1) ? str_copy ("audacious") :
str_printf ("audacious-%d", instance_number);
--
2.21.0