summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKillerBean2021-01-17 04:15:15 +0100
committerKillerBean2021-01-17 04:15:15 +0100
commit846b97da1cbd2a2b420de453eb2c54ef3b3f112e (patch)
treef0877370fde0c3e44e5c259b05a42125aa668f87
parentfa2015165831fbafa7c4501e7ad1ca3fe99b0881 (diff)
downloadaur-846b97da1cbd2a2b420de453eb2c54ef3b3f112e.tar.gz
Fix data path
-rw-r--r--.SRCINFO10
-rw-r--r--0001-set-welcome-path.patch40
-rw-r--r--01_qt_datalocation.patch12
-rw-r--r--PKGBUILD8
4 files changed, 22 insertions, 48 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 889fb94e0167..c6763f0f560f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = simulationcraft-git
pkgdesc = A tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm). Multi-player event-driven simulator written in C++ that models raid damage.
- pkgver = r41567.1a5296ef4b
+ pkgver = r46084.3baee4b094
pkgrel = 1
url = https://github.com/simulationcraft/simc
arch = i686
@@ -12,12 +12,14 @@ pkgbase = simulationcraft-git
depends = openssl
depends = qt5-webkit
depends = qt5-webengine
+ provides = simulationcraft
+ conflicts = simulationcraft
source = git+https://github.com/simulationcraft/simc.git
- source = 0001-set-welcome-path.patch
+ source = 01_qt_datalocation.patch
source = SimulationCraft.desktop
sha256sums = SKIP
- sha256sums = 618e5d13965b9093213ef2240e23a828870b07faac0908cb1978438501f9e43d
- sha256sums = fa947aea5f33ca5c4724655cf10ef6a46ae6065ba910a9f509ff96f30497ee31
+ sha256sums = fea45e1c7d8fa6ba18373b917916018f5e2e6e9f69ec09cbb0fb7295f241f73f
+ sha256sums = 12cddfa8077e3f7c5c7d8bc445f27691072911d36e296ffe21281c6f4a0c1dd9
pkgname = simulationcraft-git
diff --git a/0001-set-welcome-path.patch b/0001-set-welcome-path.patch
deleted file mode 100644
index 2b80ae707dfd..000000000000
--- a/0001-set-welcome-path.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/qt/sc_WelcomeTab.cpp 2019-09-05 11:14:00.167493391 +0200
-+++ b/qt/sc_WelcomeTab.cpp 2019-09-05 11:28:01.960790040 +0200
-@@ -9,17 +9,7 @@
- SC_WelcomeTabWidget_WebKit::SC_WelcomeTabWidget_WebKit( SC_MainWindow* parent ) :
- SC_WebEngineView( parent )
- {
-- QString welcomeFile = "";
-- for(const auto& path : SC_PATHS::getDataPaths())
-- {
-- QFile welcome_path(path + "/Welcome.html");
-- if (welcome_path.exists())
-- {
-- welcomeFile = welcome_path.fileName();
-- break;
-- }
-- }
-- QString welcome_uri = "file:///" + welcomeFile;
-+ QString welcome_uri = "file:///usr/share/simulationcraft-git/Welcome.html";
- setUrl( welcome_uri );
-
- page() -> setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
-@@ -39,17 +29,7 @@
- welcome_uri(),
- welcome_timer( new QTimer( this ) )
- {
-- QString welcomeFile("");
-- for(const auto& path : SC_PATHS::getDataPaths())
-- {
-- QFile welcome_path(path + "/Welcome.html");
-- if (welcome_path.exists())
-- {
-- welcomeFile = welcome_path.fileName();
-- break;
-- }
-- }
-- welcome_uri = "file:///" + welcomeFile;
-+ welcome_uri = "file:///usr/share/simulationcraft-git/Welcome.html";
- qDebug() << "welcome_uri: " << welcome_uri << "\n";
-
- welcome_timer->setSingleShot( true );
diff --git a/01_qt_datalocation.patch b/01_qt_datalocation.patch
new file mode 100644
index 000000000000..e07409ce3264
--- /dev/null
+++ b/01_qt_datalocation.patch
@@ -0,0 +1,12 @@
+diff --git a/qt/sc_window.cpp b/qt/sc_window.cpp
+index 18f0dc64e5..d8f7cf0df0 100644
+--- a/qt/sc_window.cpp
++++ b/qt/sc_window.cpp
+@@ -67,6 +67,7 @@ QStringList SC_PATHS::getDataPaths()
+ #else
+ QStringList shared_paths;
+ QStringList appdatalocation = QStandardPaths::standardLocations( QStandardPaths::DataLocation );
++ appdatalocation << "/usr/share/simulationcraft";
+ for ( int i = 0; i < appdatalocation.size(); ++i )
+ {
+ QDir dir( appdatalocation[ i ] );
diff --git a/PKGBUILD b/PKGBUILD
index ca4b058bbb50..e6aff3efb0bf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,10 +14,10 @@ makedepends=('cmake' 'git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/simulationcraft/simc.git'
- '0001-set-welcome-path.patch'
+ '01_qt_datalocation.patch'
'SimulationCraft.desktop')
sha256sums=('SKIP'
- '618e5d13965b9093213ef2240e23a828870b07faac0908cb1978438501f9e43d'
+ 'fea45e1c7d8fa6ba18373b917916018f5e2e6e9f69ec09cbb0fb7295f241f73f'
'12cddfa8077e3f7c5c7d8bc445f27691072911d36e296ffe21281c6f4a0c1dd9')
pkgver() {
cd "${srcdir}/${_gitname}/"
@@ -26,11 +26,11 @@ pkgver() {
prepare() {
cd "${srcdir}/${_gitname}/"
- patch -p1 < "${srcdir}/0001-set-welcome-path.patch"
+ patch -p1 < "${srcdir}/01_qt_datalocation.patch"
mkdir -p build
cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
+ cmake -DCMAKE_BUILD_TYPE=Release -DSC_TO_INSTALL=ON ..
}
build() {