[packages/musescore] - up to 4.0.2

mrozowik mrozowik at pld-linux.org
Sat Jun 3 12:09:31 CEST 2023


commit 2a7d97dda37c0142750ba90afb7bce84da3cdc7f
Author: Krzysztof Mrozowicz <mrozowik at pld-linux.org>
Date:   Sat Jun 3 10:09:08 2023 +0000

    - up to 4.0.2

 desktop.patch                | 12 +++----
 musescore-4.0.2-return.patch | 29 ++++++++++++++++
 musescore.spec               | 80 ++++++++++++++++++++++++++++++++------------
 no-crashpad.patch            | 13 +++++++
 set_as_stable.patch          | 14 ++++----
 use-qtmake-qt5.patch         | 26 +++++++-------
 6 files changed, 126 insertions(+), 48 deletions(-)
---
diff --git a/musescore.spec b/musescore.spec
index 541f1c3..4f629ab 100644
--- a/musescore.spec
+++ b/musescore.spec
@@ -1,20 +1,21 @@
 #
 
-%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}
@@ -22,6 +23,7 @@ BuildRequires:	Qt5Designer-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}
@@ -30,9 +32,9 @@ BuildRequires:	Qt5Sql-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}
@@ -51,12 +53,13 @@ BuildRequires:	qt5-build
 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.
@@ -74,13 +77,23 @@ Features:
 - 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
 
@@ -89,18 +102,18 @@ install -d build.release
 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
@@ -116,8 +129,34 @@ cd build.release
 %{__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
@@ -136,9 +175,8 @@ rm -rf $RPM_BUILD_ROOT
 %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*
diff --git a/desktop.patch b/desktop.patch
index 0da8c8b..d33049e 100644
--- a/desktop.patch
+++ b/desktop.patch
@@ -1,14 +1,14 @@
---- MuseScore-3.6.2/build/Linux+BSD/mscore.desktop.in~	2021-02-08 12:16:37.000000000 +0000
-+++ MuseScore-3.6.2/build/Linux+BSD/mscore.desktop.in	2021-03-03 21:45:47.808517532 +0000
-@@ -4,9 +4,11 @@
+--- MuseScore-4.0.2/build/Linux+BSD/org.musescore.MuseScore.desktop.in~	2023-03-13 12:59:42.000000000 +0000
++++ MuseScore-4.0.2/build/Linux+BSD/org.musescore.MuseScore.desktop.in	2023-03-16 22:21:45.069756860 +0000
+@@ -8,9 +8,11 @@
  GenericName=Music notation
  GenericName[de]=Notensatz
  GenericName[fr]=Notation musicale
 +GenericName[pl]=Zapis nutowy
- Comment=Create, play and print sheet music
+ Comment=Create, play and print beautiful sheet music
  Comment[ru]=Визуальный редактор нотных партитур
  Comment[fr]=Gravure de partitions musicales
 +Comment[pl]=Twórz, odtwarzaj i drukuj partytury
- Exec=mscore at MSCORE_INSTALL_SUFFIX@ %F
  Icon=mscore at MSCORE_INSTALL_SUFFIX@
- StartupNotify=true
+ Exec=mscore at MSCORE_INSTALL_SUFFIX@ %F
+ Terminal=false
diff --git a/musescore-4.0.2-return.patch b/musescore-4.0.2-return.patch
new file mode 100644
index 0000000..71fcb6a
--- /dev/null
+++ b/musescore-4.0.2-return.patch
@@ -0,0 +1,29 @@
+Index: MuseScore-4.0.2/src/project/internal/projectactionscontroller.cpp
+===================================================================
+--- MuseScore-4.0.2.orig/src/project/internal/projectactionscontroller.cpp
++++ MuseScore-4.0.2/src/project/internal/projectactionscontroller.cpp
+@@ -934,6 +934,7 @@ bool ProjectActionsController::askIfUser
+     default:
+         return false;
+     }
++    return false;
+ }
+ 
+ void ProjectActionsController::warnScoreWithoutPartsCannotBeSaved()
+@@ -960,6 +961,7 @@ bool ProjectActionsController::askIfUser
+     case SaveLocationType::Undefined:
+         return false;
+     }
++    return false;
+ }
+ 
+ void ProjectActionsController::warnCorruptedScoreCannotBeSavedOnCloud(const std::string& errorText, bool canRevert)
+@@ -1040,6 +1042,7 @@ bool ProjectActionsController::askIfUser
+     case SaveLocationType::Undefined:
+         return false;
+     }
++    return false;
+ }
+ 
+ void ProjectActionsController::showErrCorruptedScoreCannotBeSaved(const SaveLocation& location, const std::string& errorText)
+
diff --git a/no-crashpad.patch b/no-crashpad.patch
new file mode 100644
index 0000000..b439e1d
--- /dev/null
+++ b/no-crashpad.patch
@@ -0,0 +1,13 @@
+diff --git a/src/diagnostics/CMakeLists.txt b/src/diagnostics/CMakeLists.txt
+index 636d092..fec6273 100644
+--- a/src/diagnostics/CMakeLists.txt
++++ b/src/diagnostics/CMakeLists.txt
+@@ -104,7 +104,7 @@ include(${PROJECT_SOURCE_DIR}/build/module.cmake)
+ # === Install crashpad handler ===
+ set(CPAD_ROOT_PATH ${CMAKE_CURRENT_LIST_DIR}/crashpad_handler)
+ if (OS_IS_LIN)
+-    install(PROGRAMS ${CPAD_ROOT_PATH}/linux/x86-64/crashpad_handler DESTINATION bin)
++    #install(PROGRAMS ${CPAD_ROOT_PATH}/linux/x86-64/crashpad_handler DESTINATION bin)
+ elseif(OS_IS_WIN)
+     install(PROGRAMS ${CPAD_ROOT_PATH}/windows/x86-64/crashpad_handler.exe DESTINATION bin)
+ elseif(OS_IS_MAC)
diff --git a/set_as_stable.patch b/set_as_stable.patch
index 74c9fb8..d603713 100644
--- a/set_as_stable.patch
+++ b/set_as_stable.patch
@@ -1,11 +1,11 @@
---- MuseScore-3.6.2/CMakeLists.txt~	2021-03-03 22:52:43.929082684 +0000
-+++ MuseScore-3.6.2/CMakeLists.txt	2021-03-03 23:14:24.952219985 +0000
-@@ -108,7 +108,7 @@
- add_definitions(-DMUSESCORE_REVISION="${MUSESCORE_REVISION}")
+--- MuseScore-4.0.2/CMakeLists.txt~	2023-03-13 12:59:42.000000000 +0000
++++ MuseScore-4.0.2/CMakeLists.txt	2023-03-16 22:48:04.570633760 +0000
+@@ -40,7 +40,7 @@
+ ###########################################
  
- # Setup version number and general build settings
--SET(MUSESCORE_BUILD_CONFIG "dev" CACHE STRING "Build config")
-+SET(MUSESCORE_BUILD_CONFIG "release" CACHE STRING "Build config")
+ set(MUSESCORE_REVISION "" CACHE STRING "Build revision")
+-set(MUSESCORE_BUILD_CONFIG "dev" CACHE STRING "Build config")
++set(MUSESCORE_BUILD_CONFIG "release" CACHE STRING "Build config")
  # Possible MUSESCORE_BUILD_CONFIG values:
  # - dev     - for development/nightly builds
  # - testing - for testing versions (alpha, beta, RC)
diff --git a/use-qtmake-qt5.patch b/use-qtmake-qt5.patch
index 2635092..a6b0159 100644
--- a/use-qtmake-qt5.patch
+++ b/use-qtmake-qt5.patch
@@ -1,6 +1,15 @@
---- 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})
  
@@ -9,14 +18,3 @@
  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)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/musescore.git/commitdiff/2a7d97dda37c0142750ba90afb7bce84da3cdc7f



More information about the pld-cvs-commit mailing list