1 |
commit: 098b7e47a525e49ea8208517ea2e27750d72d854 |
2 |
Author: Louis Sautier <sautier.louis <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Mar 4 13:25:03 2016 +0000 |
4 |
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 4 13:25:03 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=098b7e47 |
7 |
|
8 |
media-video/bdsup2sub++: store settings in a hidden directory |
9 |
|
10 |
Patch taken from https://github.com/amichaelt/BDSup2SubPlusPlus/pull/36 |
11 |
Settings will go to ~/.config/bdsup2sub++ instead of ~/bdsup2sub++ |
12 |
|
13 |
Package-Manager: portage-2.2.27 |
14 |
|
15 |
media-video/bdsup2sub++/bdsup2sub++-1.0.2.ebuild | 2 + |
16 |
.../files/bdsup2sub++-1.0.2-hidden-config.patch | 53 ++++++++++++++++++++++ |
17 |
2 files changed, 55 insertions(+) |
18 |
|
19 |
diff --git a/media-video/bdsup2sub++/bdsup2sub++-1.0.2.ebuild b/media-video/bdsup2sub++/bdsup2sub++-1.0.2.ebuild |
20 |
index de59e68..35fb8d5 100644 |
21 |
--- a/media-video/bdsup2sub++/bdsup2sub++-1.0.2.ebuild |
22 |
+++ b/media-video/bdsup2sub++/bdsup2sub++-1.0.2.ebuild |
23 |
@@ -24,6 +24,8 @@ DEPEND="${RDEPEND}" |
24 |
|
25 |
S="${WORKDIR}/${MY_PN}-${PV}/src" |
26 |
|
27 |
+PATCHES=( "${FILESDIR}/${P}-hidden-config.patch" ) |
28 |
+ |
29 |
src_configure() { |
30 |
eqmake4 ${PN}.pro |
31 |
} |
32 |
|
33 |
diff --git a/media-video/bdsup2sub++/files/bdsup2sub++-1.0.2-hidden-config.patch b/media-video/bdsup2sub++/files/bdsup2sub++-1.0.2-hidden-config.patch |
34 |
new file mode 100644 |
35 |
index 0000000..cf75cc3 |
36 |
--- /dev/null |
37 |
+++ b/media-video/bdsup2sub++/files/bdsup2sub++-1.0.2-hidden-config.patch |
38 |
@@ -0,0 +1,53 @@ |
39 |
+From 2e27e6a49cc0be24b9a8efbf6a2ab2ec84fd1f92 Mon Sep 17 00:00:00 2001 |
40 |
+From: darealshinji <djcj@×××.de> |
41 |
+Date: Thu, 23 Oct 2014 18:20:38 +0200 |
42 |
+Subject: [PATCH] save ini file in hidden directory on Unix systems |
43 |
+ |
44 |
+--- |
45 |
+ src/bdsup2sub.cpp | 6 ++++-- |
46 |
+ src/types.h | 8 ++++++-- |
47 |
+ 2 files changed, 10 insertions(+), 4 deletions(-) |
48 |
+ |
49 |
+diff --git a/bdsup2sub.cpp b/bdsup2sub.cpp |
50 |
+index 823e365..a9ccc15 100644 |
51 |
+--- a/bdsup2sub.cpp |
52 |
++++ b/bdsup2sub.cpp |
53 |
+@@ -386,15 +386,17 @@ void BDSup2Sub::init() |
54 |
+ |
55 |
+ void BDSup2Sub::loadSettings() |
56 |
+ { |
57 |
+- QString iniPath; |
58 |
++ QString iniPath, configPath; |
59 |
+ #ifdef Q_OS_WIN |
60 |
+ iniPath = QString(getenv("APPDATA")); |
61 |
++ configPath = QString("bdsup2sub++"); |
62 |
+ #endif |
63 |
+ #ifndef Q_OS_WIN |
64 |
+ iniPath = QString(getenv("HOME")); |
65 |
++ configPath = QString(".config/bdsup2sub++"); |
66 |
+ #endif |
67 |
+ QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, iniPath); |
68 |
+- settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "bdsup2sub++", "bdsup2sub++"); |
69 |
++ settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, configPath, iniName); |
70 |
+ |
71 |
+ if (!fromCLI) |
72 |
+ { |
73 |
+diff --git a/types.h b/types.h |
74 |
+index d760eca..784a81b 100644 |
75 |
+--- a/types.h |
76 |
++++ b/types.h |
77 |
+@@ -28,8 +28,12 @@ |
78 |
+ const QString progName = "BDSup2Sub++"; |
79 |
+ const QString progNameVer = progName + " 1.0.2"; |
80 |
+ const QString authorDate = "0xdeadbeef, mjuhasz, Adam T."; |
81 |
+-const QString oldIniName = "bdsup2sub.ini"; |
82 |
+-const QString iniName = "bdsup2sub++.ini"; |
83 |
++#ifdef Q_OS_WIN |
84 |
++ const QString iniName = "bdsup2sub++"; |
85 |
++#endif |
86 |
++#ifndef Q_OS_WIN |
87 |
++ const QString iniName = "config"; |
88 |
++#endif |
89 |
+ |
90 |
+ const QStringList scalingFilters = { |
91 |
+ "Bilinear", "Triangle", "Bicubic", "Bell", "B-Spline", "Hermite", "Lanczos3", "Mitchell" |