aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-05 23:10:38 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-05 23:11:43 +0100
commit00e18f9fa9c5e4e595c08da43325bf2f1d800d1b (patch)
tree286b458451638cfa2f3896918e074f86515c61d4
parent8baa5c8b7c9aa1d85726778d1a44d11e2791388b (diff)
downloadguix-00e18f9fa9c5e4e595c08da43325bf2f1d800d1b.tar
guix-00e18f9fa9c5e4e595c08da43325bf2f1d800d1b.tar.gz
gnu: musescore: Update to 3.0.2.
* gnu/packages/music.scm (musescore): Update to 3.0.2. [source]: Add patch. * gnu/packages/patches/musescore-fix-use_webengine.patch: New file. * gnu/local.mk (dist_patch_DATA): Reference patch.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/music.scm10
-rw-r--r--gnu/packages/patches/musescore-fix-use_webengine.patch165
3 files changed, 173 insertions, 3 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index dffc58069d..939a91b600 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1057,6 +1057,7 @@ dist_patch_DATA = \
%D%/packages/patches/mumps-build-parallelism.patch \
%D%/packages/patches/mupen64plus-ui-console-notice.patch \
%D%/packages/patches/mupen64plus-video-z64-glew-correct-path.patch \
+ %D%/packages/patches/musescore-fix-use_webengine.patch \
%D%/packages/patches/mutt-store-references.patch \
%D%/packages/patches/m4-gnulib-libio.patch \
%D%/packages/patches/netcdf-date-time.patch \
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index a716f0e142..c4333364e1 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3637,7 +3637,7 @@ audio samples and various soft sythesizers. It can receive input from a MIDI ke
(define-public musescore
(package
(name "musescore")
- (version "3.0.1")
+ (version "3.0.2")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -3646,7 +3646,7 @@ audio samples and various soft sythesizers. It can receive input from a MIDI ke
(file-name (git-file-name name version))
(sha256
(base32
- "085qwfv3fsgry1pnx531w83lnyvf7kbaklipdf8zqa9shi6d3x9i"))
+ "1w9il6gg0dh4yi20nbdcibx5z5z4bvzppq8wsqf1l916hnczsj3s"))
(modules '((guix build utils)))
(snippet
;; Un-bundle OpenSSL and remove unused libraries.
@@ -3660,7 +3660,11 @@ audio samples and various soft sythesizers. It can receive input from a MIDI ke
'("thirdparty/freetype"
"thirdparty/openssl"
"thirdparty/portmidi"))
- #t))))
+ #t))
+ ;; Fix compilation error due to BUILD_WEBENGINE CMake option not
+ ;; properly handled. Applied upstream already:
+ ;; <https://github.com/musescore/MuseScore/commit/bb0c1a9b4940f3f6b52c0df535289ec8a3bc9e03>
+ (patches (search-patches "musescore-fix-use_webengine.patch"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
diff --git a/gnu/packages/patches/musescore-fix-use_webengine.patch b/gnu/packages/patches/musescore-fix-use_webengine.patch
new file mode 100644
index 0000000000..b0b8216a42
--- /dev/null
+++ b/gnu/packages/patches/musescore-fix-use_webengine.patch
@@ -0,0 +1,165 @@
+From bb0c1a9b4940f3f6b52c0df535289ec8a3bc9e03 Mon Sep 17 00:00:00 2001
+From: Dmitri Ovodok <dmitrio95@yandex.ru>
+Date: Mon, 4 Feb 2019 21:35:25 +0300
+Subject: [PATCH] Fix build without USE_WEBENGINE and SCRIPT_INTERFACE
+
+Old-style login dialog is used if USE_WEBENGINE is turned off
+---
+ mscore/logindialog.h | 2 ++
+ mscore/musescore.cpp | 4 +++-
+ mscore/network/loginmanager.cpp | 13 +++++++++++--
+ mscore/network/loginmanager.h | 4 ++++
+ mscore/network/loginmanager_p.h | 4 ++++
+ 5 files changed, 24 insertions(+), 3 deletions(-)
+
+diff --git a/mscore/logindialog.h b/mscore/logindialog.h
+index 4e86ae7985..f44511d8c0 100644
+--- a/mscore/logindialog.h
++++ b/mscore/logindialog.h
+@@ -21,6 +21,8 @@ class LoginManager;
+
+ //---------------------------------------------------------
+ // LoginDialog
++// Old-style login dialog in case QtWebEngine is
++// unavailable.
+ //---------------------------------------------------------
+
+ class LoginDialog : public QDialog, public Ui::LoginDialog
+diff --git a/mscore/musescore.cpp b/mscore/musescore.cpp
+index 80c712aea9..5bb8354992 100644
+--- a/mscore/musescore.cpp
++++ b/mscore/musescore.cpp
+@@ -7572,12 +7572,14 @@ bool MuseScore::exportPartsPdfsToJSON(const QString& inFilePath, const QString&
+ }
+
+ //---------------------------------------------------------
+-// getQmlEngine
++// getPluginEngine
+ //---------------------------------------------------------
+
++#ifdef SCRIPT_INTERFACE
+ QmlPluginEngine* MuseScore::getPluginEngine()
+ {
+ if (!_qmlEngine)
+ _qmlEngine = new QmlPluginEngine(this);
+ return _qmlEngine;
+ }
++#endif
+diff --git a/mscore/network/loginmanager.cpp b/mscore/network/loginmanager.cpp
+index a53d7fe811..664786ccc8 100644
+--- a/mscore/network/loginmanager.cpp
++++ b/mscore/network/loginmanager.cpp
+@@ -18,7 +18,9 @@
+ #include "kQOAuth/kqoauthrequest.h"
+ #include "kQOAuth/kqoauthrequest_xauth.h"
+
++#ifdef USE_WEBENGINE
+ #include <QWebEngineCookieStore>
++#endif
+
+ namespace Ms {
+
+@@ -286,8 +288,11 @@ void LoginManager::onTryLoginError(const QString& error)
+ disconnect(this, SIGNAL(getUserError(QString)), this, SLOT(onTryLoginError(QString)));
+ connect(this, SIGNAL(loginSuccess()), this, SLOT(tryLogin()));
+ logout();
++#ifdef USE_WEBENGINE
+ loginInteractive();
+-// mscore->showLoginDialog(); // TODO: switch depending on USE_WEBENGINE
++#else
++ mscore->showLoginDialog();
++#endif
+ }
+ /*------- END - TRY LOGIN ROUTINES ----------------------------*/
+
+@@ -295,6 +300,7 @@ void LoginManager::onTryLoginError(const QString& error)
+ // loginInteractive
+ //---------------------------------------------------------
+
++#ifdef USE_WEBENGINE
+ void LoginManager::loginInteractive()
+ {
+ QWebEngineView* webView = new QWebEngineView;
+@@ -326,6 +332,7 @@ void LoginManager::loginInteractive()
+ webView->load(ApiInfo::loginUrl);
+ webView->show();
+ }
++#endif
+
+ //---------------------------------------------------------
+ // login
+@@ -346,7 +353,7 @@ void LoginManager::login(QString login, QString password)
+ connect(reply, &QNetworkReply::finished, this, [this, reply] {
+ onReplyFinished(reply, RequestType::LOGIN);
+ });
+- }
++ }
+
+ //---------------------------------------------------------
+ // onLoginSuccessReply
+@@ -874,6 +881,7 @@ ApiRequest ApiRequestBuilder::build() const
+ // musescore.com
+ //---------------------------------------------------------
+
++#ifdef USE_WEBENGINE
+ void ApiWebEngineRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo& request)
+ {
+ const ApiInfo& apiInfo = ApiInfo::instance();
+@@ -881,4 +889,5 @@ void ApiWebEngineRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo&
+ request.setHttpHeader(apiInfo.clientIdHeader, apiInfo.clientId);
+ request.setHttpHeader(apiInfo.apiKeyHeader, apiInfo.apiKey);
+ }
++#endif
+ }
+diff --git a/mscore/network/loginmanager.h b/mscore/network/loginmanager.h
+index 584eeea30d..327d9fc966 100644
+--- a/mscore/network/loginmanager.h
++++ b/mscore/network/loginmanager.h
+@@ -13,6 +13,8 @@
+ #ifndef __LOGINMANAGER_H__
+ #define __LOGINMANAGER_H__
+
++#include "config.h"
++
+ namespace Ms {
+
+ //---------------------------------------------------------
+@@ -83,7 +85,9 @@ class LoginManager : public QObject
+ public:
+ LoginManager(QAction* uploadAudioMenuAction, QObject* parent = 0);
+ void login(QString login, QString password);
++#ifdef USE_WEBENGINE
+ void loginInteractive();
++#endif
+ void upload(const QString& path, int nid, const QString& title, const QString& description, const QString& priv, const QString& license, const QString& tags, const QString& changes);
+ bool hasAccessToken();
+ void getUser();
+diff --git a/mscore/network/loginmanager_p.h b/mscore/network/loginmanager_p.h
+index 88228a3958..2848dde35a 100644
+--- a/mscore/network/loginmanager_p.h
++++ b/mscore/network/loginmanager_p.h
+@@ -20,6 +20,8 @@
+ #ifndef __LOGINMANAGER_P_H__
+ #define __LOGINMANAGER_P_H__
+
++#include "config.h"
++
+ namespace Ms {
+
+ //---------------------------------------------------------
+@@ -102,6 +104,7 @@ class ApiRequestBuilder
+ // ApiWebEngineRequestInterceptor
+ //---------------------------------------------------------
+
++#ifdef USE_WEBENGINE
+ class ApiWebEngineRequestInterceptor : public QWebEngineUrlRequestInterceptor
+ {
+ Q_OBJECT
+@@ -109,6 +112,7 @@ class ApiWebEngineRequestInterceptor : public QWebEngineUrlRequestInterceptor
+ ApiWebEngineRequestInterceptor(QObject* parent) : QWebEngineUrlRequestInterceptor(parent) {}
+ void interceptRequest(QWebEngineUrlRequestInfo& info) override;
+ };
++#endif
+
+ //---------------------------------------------------------
+ // HttpStatus