SHA256
1
0
forked from pool/musescore

first run for update to 4.0. Needs more work

OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/musescore?expand=0&rev=101
This commit is contained in:
Cor Blom 2022-12-15 16:00:39 +00:00 committed by Git OBS Bridge
parent 865959af7d
commit aeb3394940
6 changed files with 33 additions and 254 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c37acc6d7a316f04925265d2d22a35d715888580e16eff846e9b621954133c45
size 69077899

3
MuseScore-4.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1384979d3a0c1c0e4c9f4f5f5f58aa7998ce7efd4408284e9f60345dce63eda3
size 123828349

View File

@ -16,22 +16,18 @@
# #
%ifarch ppc64 ppc64le
%define qtwebengine 0
%else
%define qtwebengine 1
%endif
# Internal QML imports # Internal QML imports
%global __requires_exclude qmlimport\\((MuseScore|FileIO).* %global __requires_exclude qmlimport\\((MuseScore|FileIO).*
# Workaround boo#1189991
%define _lto_cflags %{nil}
%define rname mscore %define rname mscore
%define version_lesser 3.6 %define version_lesser 4.0
%define revision 3224f34 %define revision 3224f34
%define fontdir %{_datadir}/fonts/%{name} %define fontdir %{_datadir}/fonts/%{name}
%define docdir %{_docdir}/%{name} %define docdir %{_docdir}/%{name}
Name: musescore Name: musescore
Version: 3.6.2 Version: 4.0
Release: 0 Release: 0
Summary: A WYSIWYG music score typesetter Summary: A WYSIWYG music score typesetter
# Musescore code license is GPL-2.0 # Musescore code license is GPL-2.0
@ -41,7 +37,7 @@ License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-3.0
Group: Productivity/Multimedia/Sound/Editors and Convertors Group: Productivity/Multimedia/Sound/Editors and Convertors
URL: https://musescore.org URL: https://musescore.org
Source0: https://github.com/musescore/MuseScore/archive/v%{version}/MuseScore-%{version}.tar.gz Source0: https://github.com/musescore/MuseScore/archive/v%{version}/MuseScore-%{version}.tar.gz
Source1: %{rname}.desktop #Source1: %{rname}.desktop
# MuseScore expect to be able to download the latest version of its soundfonts # MuseScore expect to be able to download the latest version of its soundfonts
# They are downloaded from the link conteinde in CMakeLists.text # They are downloaded from the link conteinde in CMakeLists.text
# They are newer versions than the one included in the MuseScore tarball itself # They are newer versions than the one included in the MuseScore tarball itself
@ -52,9 +48,9 @@ Source5: https://ftp.osuosl.org/pub/musescore/soundfont/MuseScore_General
# PATCH-FIX-OPENSUSE: openSUSE has qmake-qt5 qmake was reserved for qt4, which is no longer present # PATCH-FIX-OPENSUSE: openSUSE has qmake-qt5 qmake was reserved for qt4, which is no longer present
Patch0: use-qtmake-qt5.patch Patch0: use-qtmake-qt5.patch
# PATCH-FIX-OPENSUSE: don't install qtwebengine files, they are not needed # PATCH-FIX-OPENSUSE: don't install qtwebengine files, they are not needed
Patch1: use-system-qtwebengine-files.patch #FIXME Patch1: use-system-qtwebengine-files.patch
# PATCH-FIX-OPENSUSE: don't use webview in startcentre (boo#1181604) # PATCH-FIX-OPENSUSE: don't use webview in startcentre (boo#1181604)
Patch2: no-webview-in-startcentre.patch #FIXME Patch2: no-webview-in-startcentre.patch
BuildRequires: cmake BuildRequires: cmake
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -62,6 +58,7 @@ BuildRequires: libQt5Help5
BuildRequires: libQt5QuickTemplates2-devel BuildRequires: libQt5QuickTemplates2-devel
BuildRequires: libmp3lame-devel BuildRequires: libmp3lame-devel
BuildRequires: libqt5-linguist-devel BuildRequires: libqt5-linguist-devel
BuildRequires: libqt5-qtbase-private-headers-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: portmidi-devel BuildRequires: portmidi-devel
BuildRequires: strip-nondeterminism BuildRequires: strip-nondeterminism
@ -71,7 +68,7 @@ BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Designer) BuildRequires: pkgconfig(Qt5Designer)
BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Help) BuildRequires: pkgconfig(Qt5Help)
BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5NetworkAuth)
BuildRequires: pkgconfig(Qt5OpenGL) BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5QuickControls2) BuildRequires: pkgconfig(Qt5QuickControls2)
@ -79,12 +76,8 @@ BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Test) BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5UiTools) BuildRequires: pkgconfig(Qt5UiTools)
%if %qtwebengine
BuildRequires: pkgconfig(Qt5WebEngine)
BuildRequires: pkgconfig(Qt5WebEngineCore)
BuildRequires: pkgconfig(Qt5WebEngineWidgets)
%endif
BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(Qt5Xml) BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5XmlPatterns) BuildRequires: pkgconfig(Qt5XmlPatterns)
BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(alsa)
@ -134,31 +127,22 @@ sed 's/\r$//' thirdparty/rtf2html/README.ru > tmpfile
touch -r thirdparty/rtf2html/README.ru tmpfile touch -r thirdparty/rtf2html/README.ru tmpfile
mv -f tmpfile thirdparty/rtf2html/README.ru mv -f tmpfile thirdparty/rtf2html/README.ru
sed 's/\r$//' thirdparty/portmidi/README.txt > tmpfile
touch -r thirdparty/portmidi/README.txt tmpfile
mv -f tmpfile thirdparty/portmidi/README.txt
%build %build
%define __builddir build.release %define __builddir build.release
%cmake \ %cmake \
-DCMAKE_BUILD_TYPE=RELEASE \ -DCMAKE_BUILD_TYPE=RELEASE \
-DMUSESCORE_BUILD_CONFIG=release \ -DMUSESCORE_BUILD_CONFIG=release \
-DBUILD_UNIT_TESTS=OFF \
-DUSE_SYSTEM_FREETYPE="ON" \ -DUSE_SYSTEM_FREETYPE="ON" \
%if %qtwebengine
-DBUILD_WEBENGINE="ON" \
%else
-DBUILD_WEBENGINE="OFF" \
%endif
-DBUILD_TELEMETRY_MODULE=OFF \ -DBUILD_TELEMETRY_MODULE=OFF \
-DMUSESCORE_REVISION=%{revision} -DMUSESCORE_REVISION=%{revision}
%make_jobs lrelease all %make_jobs lrelease all
# Put the desktop file in place for the packaging # Put the desktop file in place for the packaging
cp %{SOURCE1} . #cp %{SOURCE1} .
%install %install
%cmake_install %cmake_install
strip-nondeterminism -t zip %{buildroot}%{_datadir}/%{rname}-%{version_lesser}/workspaces/*.workspace
# install fonts # install fonts
mkdir -p %{buildroot}%{fontdir} mkdir -p %{buildroot}%{fontdir}
@ -174,13 +158,12 @@ install -p -m 644 fonts/petaluma/PetalumaText.otf %{buildroot}/%{fontdir}
# unique names for font docs # unique names for font docs
mv fonts/edwin/README.md fonts/edwin/README.md.edwin mv fonts/edwin/README.md fonts/edwin/README.md.edwin
mv fonts/edwin/GPL_LICENSE.txt fonts/edwin/GPL_LICENSE.txt.edwin
mv fonts/edwin/LICENSE.txt fonts/edwin/LICENSE.txt.edwin mv fonts/edwin/LICENSE.txt fonts/edwin/LICENSE.txt.edwin
mv fonts/leland/README.md fonts/leland/README.md.leland mv fonts/leland/README.md fonts/leland/README.md.leland
mv fonts/leland/LICENSE.txt fonts/leland/LICENSE.txt.leland mv fonts/leland/LICENSE.txt fonts/leland/LICENSE.txt.leland
# update desktop file # update desktop file
%suse_update_desktop_file -n %{rname} AudioVideo AudioVideoEditing #%suse_update_desktop_file -n org.musescore.MuseScore AudioVideo AudioVideoEditing
# also package additional demos # also package additional demos
mkdir -p %{buildroot}%{_datadir}/%{rname}-%{version_lesser}/demos mkdir -p %{buildroot}%{_datadir}/%{rname}-%{version_lesser}/demos
@ -242,10 +225,10 @@ install -p -m 644 share/wallpaper/COPYRIGHT %{buildroot}%docdir/COPYIN
%endif %endif
%files %files
%{_bindir}/%{name} %{_bindir}/crashpad_handler
%{_bindir}/%{rname} %{_bindir}/%{rname}
%{_datadir}/metainfo/org.musescore.MuseScore.appdata.xml %{_datadir}/metainfo/org.musescore.MuseScore.appdata.xml
%{_datadir}/applications/%{rname}.desktop %{_datadir}/applications/org.musescore.MuseScore.desktop
%{_datadir}/mime/packages/* %{_datadir}/mime/packages/*
%{_datadir}/icons/hicolor/* %{_datadir}/icons/hicolor/*
%dir %{_datadir}/%{rname}-%{version_lesser} %dir %{_datadir}/%{rname}-%{version_lesser}
@ -256,6 +239,8 @@ install -p -m 644 share/wallpaper/COPYRIGHT %{buildroot}%docdir/COPYIN
%dir %docdir %dir %docdir
%doc %docdir/* %doc %docdir/*
%{_libdir}
%files fonts %files fonts
%dir %{fontdir} %dir %{fontdir}
%{fontdir}/*.ttf %{fontdir}/*.ttf
@ -269,7 +254,6 @@ install -p -m 644 share/wallpaper/COPYRIGHT %{buildroot}%docdir/COPYIN
# see section 'unique names for font docs' above # see section 'unique names for font docs' above
%doc fonts/edwin/README.md.edwin %doc fonts/edwin/README.md.edwin
%doc fonts/edwin/GPL_LICENSE.txt.edwin
%doc fonts/edwin/LICENSE.txt.edwin %doc fonts/edwin/LICENSE.txt.edwin
%doc fonts/leland/README.md.leland %doc fonts/leland/README.md.leland
%doc fonts/leland/LICENSE.txt.leland %doc fonts/leland/LICENSE.txt.leland

View File

@ -1,176 +0,0 @@
diff -ur a/mscore/startcenter.cpp b/mscore/startcenter.cpp
--- a/mscore/startcenter.cpp 2021-02-08 13:16:37.000000000 +0100
+++ b/mscore/startcenter.cpp 2021-04-24 14:18:23.888027687 +0200
@@ -58,43 +58,6 @@
connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
setStyleSheet(QString("QPushButton { background-color: %1 }").arg(openScore->palette().color(QPalette::Base).name()));
-#ifdef USE_WEBENGINE
- if (!noWebView) {
-#if defined(WIN_PORTABLE)
- QWebEngineProfile* defaultProfile = QWebEngineProfile::defaultProfile();
- defaultProfile->setCachePath(QDir::cleanPath(QString("%1/../../../Data/settings/QWebEngine").arg(QCoreApplication::applicationDirPath())));
- defaultProfile->setPersistentStoragePath(QDir::cleanPath(QString("%1/../../../Data/settings/QWebEngine").arg(QCoreApplication::applicationDirPath())));
-#endif
- _webView = new MyWebView(this);
- _webView->setMaximumWidth(200);
-
- MyWebEnginePage* page = new MyWebEnginePage(this);
- MyWebUrlRequestInterceptor* wuri = new MyWebUrlRequestInterceptor(page);
- QWebEngineProfile* profile = page->profile();
-#if defined(WIN_PORTABLE)
- profile->setCachePath(QDir::cleanPath(QString("%1/../../../Data/settings/QWebEngine").arg(QCoreApplication::applicationDirPath())));
- profile->setPersistentStoragePath(QDir::cleanPath(QString("%1/../../../Data/settings/QWebEngine").arg(QCoreApplication::applicationDirPath())));
-#endif
- profile->setRequestInterceptor(wuri);
- _webView->setPage(page);
-
- auto extendedVer = QString(VERSION) + "." + QString(BUILD_NUMBER);
- QUrl connectPageUrl = QUrl(QString("https://connect2.musescore.com/?version=%1").arg(extendedVer));
- _webView->setUrl(connectPageUrl);
-
- horizontalLayout->addWidget(_webView);
-
- //workaround for the crashes sometimes happening in Chromium on macOS with Qt 5.12
- connect(_webView, &QWebEngineView::renderProcessTerminated, this, [this, profile, connectPageUrl](QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode)
- {
- qDebug() << "Login page loading terminated" << terminationStatus << " " << exitCode;
- profile->clearHttpCache();
- _webView->load(connectPageUrl);
- _webView->show();
- });
- }
-#endif
-
// if (enableExperimental)
// right now dont know how it use in WebEngine @handrok
// QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
@@ -217,62 +180,5 @@
AbstractDialog::keyReleaseEvent(event);
}
-#ifdef USE_WEBENGINE
-
-//---------------------------------------------------------
-// MyWebView
-//---------------------------------------------------------
-
-MyWebView::MyWebView(QWidget *parent):
- QWebEngineView(parent)
- {
- if (!enableExperimental)
- setContextMenuPolicy(Qt::NoContextMenu);
- }
-
-//---------------------------------------------------------
-// ~MyWebView
-//---------------------------------------------------------
-
-MyWebView::~MyWebView()
- {
- disconnect(this, SIGNAL(loadFinished(bool)), this, SLOT(stopBusy(bool)));
- }
-
-//---------------------------------------------------------
-// sizeHint
-//---------------------------------------------------------
-
-QSize MyWebView::sizeHint() const
- {
- return QSize(200 , 600);
- }
-
-
-bool MyWebEnginePage::acceptNavigationRequest(const QUrl & url, QWebEnginePage::NavigationType type, bool isMainFrame)
- {
- qDebug() << "acceptNavigationRequest(" << url << "," << type << "," << isMainFrame << ")";
-
- if (type == QWebEnginePage::NavigationTypeLinkClicked)
- {
- QString path(url.path());
- QFileInfo fi(path);
- if (fi.suffix() == "mscz" || fi.suffix() == "xml"
- || fi.suffix() == "musicxml" || fi.suffix() == "mxl") {
- mscore->loadFile(url);
- QAction* a = getAction("startcenter");
- a->setChecked(false);
- mscore->showStartcenter(false);
- }
- else
- QDesktopServices::openUrl(url);
-
- return false;
- }
- return true;
- }
-
-
-#endif //USE_WEBENGINE
}
diff -ur a/mscore/startcenter.h b/mscore/startcenter.h
--- a/mscore/startcenter.h 2021-02-08 13:16:37.000000000 +0100
+++ b/mscore/startcenter.h 2021-04-24 14:19:16.684029679 +0200
@@ -19,62 +19,12 @@
namespace Ms {
-#ifdef USE_WEBENGINE
-
-class MyWebUrlRequestInterceptor : public QWebEngineUrlRequestInterceptor {
- Q_OBJECT
-
- public:
- MyWebUrlRequestInterceptor(QObject* p = Q_NULLPTR)
- : QWebEngineUrlRequestInterceptor(p) {}
-
- void interceptRequest(QWebEngineUrlRequestInfo& info)
- {
- info.setHttpHeader("Accept-Language",
- QString("%1;q=0.8,en-US;q=0.6,en;q=0.4").arg(mscore->getLocaleISOCode()).toUtf8());
- }
- };
-
-//---------------------------------------------------------
-// MyWebEnginePage
-//---------------------------------------------------------
-
-class MyWebEnginePage : public QWebEnginePage {
- Q_OBJECT
-
- public:
- MyWebEnginePage(QObject* parent = Q_NULLPTR)
- : QWebEnginePage(parent) {}
-
- bool acceptNavigationRequest(const QUrl& url, QWebEnginePage::NavigationType type, bool isMainFrame);
- };
-
-//---------------------------------------------------------
-// MyWebEngineView
-//---------------------------------------------------------
-
-class MyWebView : public QWebEngineView {
- Q_OBJECT
-
- public slots:
-
- public:
- MyWebView(QWidget* parent = 0);
- ~MyWebView();
- virtual QSize sizeHint() const;
- };
-
-#endif //USE_WEBENGINE
-
//---------------------------------------------------------
// Startcenter
//---------------------------------------------------------
class Startcenter : public AbstractDialog, public Ui::Startcenter {
Q_OBJECT
-#ifdef USE_WEBENGINE
- MyWebView* _webView;
-#endif
virtual void closeEvent(QCloseEvent*);
private slots:

View File

@ -1,7 +1,16 @@
diff -ur a/build/FindQt5.cmake b/build/FindQt5.cmake diff -ur a/build/cmake/FindQt5.cmake b/build/cmake/FindQt5.cmake
--- a/build/FindQt5.cmake 2021-01-14 14:33:11.000000000 +0100 --- a/build/cmake/FindQt5.cmake 2022-12-13 22:58:31.000000000 +0100
+++ b/build/FindQt5.cmake 2021-01-15 13:28:45.346084556 +0100 +++ b/build/cmake/FindQt5.cmake 2022-12-14 20:37:54.029305951 +0100
@@ -55,7 +47,7 @@ @@ -2,7 +2,7 @@
include(GetUtilsFunctions) # library of CMake functions ("fn__" namespace)
# Print Qt version or fail the build if Qt (qmake) is not in PATH.
-fn__require_program(QMAKE Qt --version "https://musescore.org/en/handbook/developers-handbook/compilation" qmake)
+fn__require_program(QMAKE Qt --version "https://musescore.org/en/handbook/developers-handbook/compilation" qmake-qt5)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
@@ -52,7 +52,7 @@
include_directories(${QT_INCLUDES}) include_directories(${QT_INCLUDES})
@ -10,15 +19,3 @@ diff -ur a/build/FindQt5.cmake b/build/FindQt5.cmake
set(_qmake_vars set(_qmake_vars
QT_INSTALL_ARCHDATA QT_INSTALL_ARCHDATA
QT_INSTALL_BINS QT_INSTALL_BINS
diff -ur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2021-01-14 14:33:11.000000000 +0100
+++ b/CMakeLists.txt 2021-01-15 13:24:07.140841485 +0100
@@ -25,7 +25,7 @@
include(build/functions.cmake) # library of CMake functions ("fn__" namespace)
# Print Qt version or fail the build if Qt (qmake) is not in PATH.
-fn__require_program(QMAKE Qt --version "https://musescore.org/en/handbook/developers-handbook/compilation" qmake)
+fn__require_program(QMAKE Qt --version "https://musescore.org/en/handbook/developers-handbook/compilation" qmake-qt5)
# Libraries linked via full path no longer produce linker search paths.
cmake_policy(SET CMP0003 NEW)

View File

@ -1,26 +0,0 @@
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 6c489e8..03f26a0 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -217,21 +217,6 @@ if (MINGW)
else (MINGW)
if ( NOT MSVC )
- ## install qwebengine core
- if (NOT APPLE AND USE_WEBENGINE)
- install(PROGRAMS
- ${QT_INSTALL_LIBEXECS}/QtWebEngineProcess
- DESTINATION bin
- )
- install(DIRECTORY
- ${QT_INSTALL_DATA}/resources
- DESTINATION lib/qt5
- )
- install(DIRECTORY
- ${QT_INSTALL_TRANSLATIONS}/qtwebengine_locales
- DESTINATION lib/qt5/translations
- )
- endif(NOT APPLE AND USE_WEBENGINE)
set_target_properties (
mscore