#
-%define min_qt_version 5.15.0
+%define min_qt_version 5.15.8
Summary: MuseScore - music notation software
Summary(pl.UTF-8): MuseScore - oprogramowanie do notacji muzycznej
Name: musescore
-Version: 3.6.2
-Release: 1
+Version: 4.0.2
+Release: 0.1
License: GPL v2
Group: Applications
Source0: https://github.com/musescore/MuseScore/archive/v%{version}.tar.gz
-# Source0-md5: 682c4a38b8b39d246d196c392ae08ab7
-Patch0: do_not_bundle_qtwebengine.patch
+# Source0-md5: e1a5b52bd2cede8f6f332f0f6e315b73
+Patch0: no-crashpad.patch
Patch1: desktop.patch
Patch2: use-qtmake-qt5.patch
Patch3: set_as_stable.patch
+Patch4: %{name}-4.0.2-return.patch
URL: https://musescore.org/
BuildRequires: Qt5Concurrent-devel >= %{min_qt_version}
BuildRequires: Qt5Core-devel >= %{min_qt_version}
BuildRequires: Qt5Gui-devel >= %{min_qt_version}
BuildRequires: Qt5Help-devel >= %{min_qt_version}
BuildRequires: Qt5Network-devel >= %{min_qt_version}
+BuildRequires: Qt5NetworkAuth-devel >= %{min_qt_version}
BuildRequires: Qt5OpenGL-devel >= %{min_qt_version}
BuildRequires: Qt5PrintSupport-devel >= %{min_qt_version}
BuildRequires: Qt5Qml-devel >= %{min_qt_version}
BuildRequires: Qt5Svg-devel >= %{min_qt_version}
BuildRequires: Qt5Test-devel >= %{min_qt_version}
BuildRequires: Qt5UiTools-devel >= %{min_qt_version}
-%ifnarch x32
-BuildRequires: Qt5WebEngine-devel >= %{min_qt_version}
-%endif
+#%ifnarch x32
+#BuildRequires: Qt5WebEngine-devel >= %{min_qt_version}
+#%endif
BuildRequires: Qt5Quick-controls2-devel
BuildRequires: Qt5Widgets-devel >= %{min_qt_version}
BuildRequires: Qt5Xml-devel >= %{min_qt_version}
BuildRequires: qt5-linguist
BuildRequires: qt5-qmake
BuildRequires: texlive-latex
+Requires: Qt5Quick-graphicaleffects
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# broken:
# extracting debug info from /home/users/jajcus/tmp/musescore-3.0.4-root-jajcus/usr/bin/mscore
# /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
-%define _enable_debug_packages 0
+#%define _enable_debug_packages 0
%description
MuseScore is an open source and free music notation software.
- integrated sequencer and software synthesizer to play the score
- print or create pdf files
+%package fonts
+Summary: MuseScore fonts
+Summary(pl.UTF-8): Czcionki MuseScore
+License: GPL-3.0-or-later WITH Font-exception-2.0 AND OFL-1.1
+Group: Fonts
+BuildArch: noarch
+
+%description fonts
+Additional fonts for use by the MuseScore music notation program.
+
%prep
%setup -q -n MuseScore-%{version}
-
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
cd build.release
# cmake flags taken from the main Makefile
-CFLAGS="%{rpmcflags} -DNDEBUG -DQT_NO_DEBUG -fPIC" \
-CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG -fPIC" \
+#CFLAGS="%{rpmcflags} -DNDEBUG -DQT_NO_DEBUG -fPIC" \
+#CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG -fPIC" \
%cmake \
- -DCMAKE_BUILD_TYPE=RELEASE \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DMUSESCORE_BUILD_CONFIG=release \
-DMSCORE_INSTALL_SUFFIX="" \
-DMUSESCORE_LABEL="" \
- -DBUILD_LAME="TRUE" \
+ -DBUILD_UNIT_TESTS=OFF \
-DCMAKE_SKIP_RPATH="FALSE" \
-DDOWNLOAD_SOUNDFONT="OFF" \
-DUSE_SYSTEM_FREETYPE="ON" \
- -DBUILD_PORTMIDI="OFF" \
- -DBUILD_CRASH_REPORTER="FALSE" \
+ -DBUILD_CRASHPAD_CLIENT=OFF \
%ifarch x32
-DBUILD_WEBENGINE="OFF" \
%endif
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-rm $RPM_BUILD_ROOT/%{_mandir}/man1/musescore.1.gz
-echo ".so mscore.1" > $RPM_BUILD_ROOT/%{_mandir}/man1/musescore.1
+# don't package kddockwidgets. It should not be installed
+rm $RPM_BUILD_ROOT%{_libdir}/*.a
+rm -r $RPM_BUILD_ROOT%{_includedir}/kddockwidgets
+rm -r $RPM_BUILD_ROOT%{_libdir}/cmake/KDDockWidgets
+
+# Remove opus devel files, they are provided by system
+rm -r $RPM_BUILD_ROOT%{_includedir}/opus
+
+rm $RPM_BUILD_ROOT%{_mandir}/man1/musescore.1.gz
+echo ".so mscore.1" > $RPM_BUILD_ROOT%{_mandir}/man1/musescore.1
+
+# install fonts
+install -d $RPM_BUILD_ROOT%{fontdir}
+install -p fonts/*.ttf $RPM_BUILD_ROOT%{fontdir}
+install -p fonts/*/*.ttf $RPM_BUILD_ROOT%{fontdir}
+install -p fonts/bravura/BravuraText.otf $RPM_BUILD_ROOT%{fontdir}
+install -p fonts/campania/Campania.otf $RPM_BUILD_ROOT%{fontdir}
+install -p fonts/edwin/*.otf $RPM_BUILD_ROOT%{fontdir}
+install -p fonts/gootville/GootvilleText.otf $RPM_BUILD_ROOT%{fontdir}
+install -p fonts/leland/LelandText.otf $RPM_BUILD_ROOT%{fontdir}
+install -p fonts/musejazz/MuseJazzText.otf $RPM_BUILD_ROOT%{fontdir}
+install -p fonts/petaluma/PetalumaText.otf $RPM_BUILD_ROOT%{fontdir}
+
+# unique names for font docs
+mv fonts/edwin/README.md fonts/edwin/README.md.edwin
+mv fonts/edwin/LICENSE.txt fonts/edwin/LICENSE.txt.edwin
+mv fonts/leland/README.md fonts/leland/README.md.leland
+mv fonts/leland/LICENSE.txt fonts/leland/LICENSE.txt.leland
%post
%update_desktop_database
%defattr(644,root,root,755)
%doc README.md Compatibility
%attr(755,root,root) %{_bindir}/mscore
-%attr(755,root,root) %{_bindir}/musescore
-%{_datadir}/mscore-3.6
-%{_desktopdir}/mscore.desktop
+%{_datadir}/mscore-4.0
+%{_desktopdir}/org.musescore.MuseScore.desktop
%{_iconsdir}/*/*/apps/*
%{_iconsdir}/*/*/mimetypes/*
%{_mandir}/man1/mscore.1*
---- MuseScore-3.6.2/build/FindQt5.cmake~ 2021-02-08 12:16:37.000000000 +0000
-+++ MuseScore-3.6.2/build/FindQt5.cmake 2021-03-03 22:35:06.449357445 +0000
-@@ -47,7 +47,7 @@
+--- MuseScore-4.0.2/build/cmake/FindQt5.cmake~ 2023-03-13 12:59:42.000000000 +0000
++++ MuseScore-4.0.2/build/cmake/FindQt5.cmake 2023-03-16 22:43:00.355961397 +0000
+@@ -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})
set(_qmake_vars
QT_INSTALL_ARCHDATA
QT_INSTALL_BINS
---- MuseScore-3.6.2/CMakeLists.txt~ 2021-02-08 12:16:37.000000000 +0000
-+++ MuseScore-3.6.2/CMakeLists.txt 2021-03-03 22:36:02.887616621 +0000
-@@ -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)