Skip to content

Commit

Permalink
audio/musescore: update to 4.2.1, latest upstream
Browse files Browse the repository at this point in the history
While here, add a .desktop file as requested in PR 275314 .
  • Loading branch information
Adriaan de Groot authored and Adriaan de Groot committed Feb 27, 2024
1 parent 8de7c0d commit d2a73d2
Show file tree
Hide file tree
Showing 14 changed files with 179 additions and 22 deletions.
30 changes: 15 additions & 15 deletions audio/musescore/Makefile
@@ -1,30 +1,27 @@
PORTNAME= ${GH_PROJECT:tl}
DISTVERSIONPREFIX= v
DISTVERSION= 4.1.1
DISTVERSION= 4.2.1
CATEGORIES= audio

MAINTAINER= adridg@FreeBSD.org
COMMENT= Free music composition & notation software
WWW= https://musescore.org/

LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE.GPL
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE.txt

LIB_DEPENDS= libmp3lame.so:audio/lame \
libsndfile.so:audio/libsndfile \
libvorbis.so:audio/libvorbis \
libogg.so:audio/libogg \
LIB_DEPENDS= libsndfile.so:audio/libsndfile \
libasound.so:audio/alsa-lib \
libasound_module_pcm_oss.so:audio/alsa-plugins \
libfreetype.so:print/freetype2
libasound_module_pcm_oss.so:audio/alsa-plugins

USES= cmake compiler:c++11-lib localbase \
pkgconfig qt:5
USES= cmake compiler:c++11-lib desktop-file-utils localbase \
pkgconfig qt:5 shared-mime-info
USE_QT= concurrent core dbus declarative designer graphicaleffects gui \
help location network networkauth opengl printsupport \
quickcontrols quickcontrols2 scripttools sql svg testlib \
webchannel widgets x11extras xml xmlpatterns \
buildtools:build linguisttools:build qmake:build uitools:build
network networkauth opengl printsupport \
quickcontrols quickcontrols2 svg \
widgets x11extras xml xmlpatterns \
buildtools:build linguisttools:build qmake:build testlib:build \
uitools:build

USE_GITHUB= yes
GH_PROJECT= MuseScore
Expand Down Expand Up @@ -61,5 +58,8 @@ post-stage:
${STAGEDIR}${PREFIX}/lib/cmake/GTest \
${STAGEDIR}${PREFIX}/lib/cmake/KDDockWidgets \
${STAGEDIR}${PREFIX}/lib/cmake
${INSTALL_DATA} ${FILESDIR}/mscore.desktop ${STAGEDIR}${PREFIX}/share/applications/
${INSTALL_DATA} ${WRKSRC}/share/icons/AppIcon/MS4_AppIcon_48x48.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/apps/mscore.png


.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions audio/musescore/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1694947674
SHA256 (musescore-MuseScore-v4.1.1_GH0.tar.gz) = 3e53ce88b98c08422c8f8dc8c71c6e31d1038c2b263649f6647de6fa4269ce9b
SIZE (musescore-MuseScore-v4.1.1_GH0.tar.gz) = 131007032
TIMESTAMP = 1707166162
SHA256 (musescore-MuseScore-v4.2.1_GH0.tar.gz) = 9636b303afdb44228dc6d64dbc14773b60840dec7225602d79b126d97f555680
SIZE (musescore-MuseScore-v4.2.1_GH0.tar.gz) = 136655690
19 changes: 19 additions & 0 deletions audio/musescore/files/mscore.desktop
@@ -0,0 +1,19 @@
[Desktop Entry]
Version=1.0
Name=MuseScore 4.2
GenericName=Music notation
GenericName[de]=Notensatz
GenericName[fr]=Notation musicale
Comment=Create, play and print sheet music
Comment[ru]=Визуальный редактор нотных партитур
Comment[fr]=Gravure de partitions musicales
Exec=mscore %F
Icon=mscore
StartupNotify=true
StartupWMClass=mscore
Terminal=false
Type=Application
Categories=Qt;Audio;Sequencer;Midi;AudioVideoEditing;Music;AudioVideo;
Keywords=music;notation;composition;composing;arranging;making;sheet music;music notation software;lead sheet;leadsheet;score;full score;scorewriter;MIDI;musicxml;playback;instrument;
Keywords[de]=Musik;Noten;Musiknoten;Komposition;Komponieren;Arrangieren;Notenblatt;Notenblätter;Notationsprogramm;Musiknotationsprogramm;Musiknotation;Tabulatur;MIDI;musicxml;Instrument;
MimeType=application/x-musescore;application/x-musescore+xml;application/vnd.recordare.musicxml;application/vnd.recordare.musicxml+xml;audio/midi;application/x-bww;application/x-biab;application/x-capella;audio/x-gtp;application/x-musedata;application/x-overture;audio/x-ptb;application/x-sf2;application/x-sf3;
6 changes: 3 additions & 3 deletions audio/musescore/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
--- CMakeLists.txt.orig 2023-07-11 13:58:04.000000000 +0000
+++ CMakeLists.txt 2023-07-26 01:16:10.541419000 +0000
@@ -46,7 +46,7 @@
--- CMakeLists.txt.orig 2024-01-23 09:35:14 UTC
+++ CMakeLists.txt
@@ -48,7 +48,7 @@ set(MUSESCORE_BUILD_CONFIGURATION "app" CACHE STRING "
# - vtest - for visual tests (for CI)
# - utest - for unit tests (for CI)

Expand Down
10 changes: 10 additions & 0 deletions audio/musescore/files/patch-build_cmake_GetPlatformInfo.cmake
@@ -0,0 +1,10 @@
--- build/cmake/GetPlatformInfo.cmake.orig 2024-02-06 21:53:14 UTC
+++ build/cmake/GetPlatformInfo.cmake
@@ -29,6 +29,7 @@ elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
set(OS_IS_LIN 1)
elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "FreeBSD")
+ set(OS_IS_LIN 1)
set(OS_IS_FBSD 1)
elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
set(OS_IS_MAC 1)
11 changes: 11 additions & 0 deletions audio/musescore/files/patch-src_framework_ui_CMakeLists.txt
@@ -0,0 +1,11 @@
--- src/framework/ui/CMakeLists.txt.orig 2024-02-08 21:39:07 UTC
+++ src/framework/ui/CMakeLists.txt
@@ -48,6 +48,8 @@ elseif(OS_IS_LIN)
set(PLATFORM_THEME_SRC
${CMAKE_CURRENT_LIST_DIR}/internal/platform/linux/linuxplatformtheme.cpp
${CMAKE_CURRENT_LIST_DIR}/internal/platform/linux/linuxplatformtheme.h
+ ${CMAKE_CURRENT_LIST_DIR}/internal/platform/stub/stubplatformtheme.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/internal/platform/stub/stubplatformtheme.h
)
else()
set(PLATFORM_THEME_SRC
@@ -0,0 +1,17 @@
--- src/framework/ui/internal/platform/stub/stubplatformtheme.cpp.orig 2024-02-08 19:49:06 UTC
+++ src/framework/ui/internal/platform/stub/stubplatformtheme.cpp
@@ -25,6 +25,8 @@
using namespace mu::ui;
using namespace mu::async;

+namespace mu::ui {
+StubPlatformTheme::~StubPlatformTheme() = default;
void StubPlatformTheme::startListening()
{
}
@@ -59,4 +61,5 @@ void StubPlatformTheme::applyPlatformStyleOnAppForThem

void StubPlatformTheme::applyPlatformStyleOnWindowForTheme(QWindow*, const ThemeCode&)
{
+}
}
@@ -0,0 +1,10 @@
--- src/framework/ui/internal/platform/stub/stubplatformtheme.h.orig 2024-02-08 19:49:29 UTC
+++ src/framework/ui/internal/platform/stub/stubplatformtheme.h
@@ -29,6 +29,7 @@ namespace mu::ui {
class StubPlatformTheme : public IPlatformTheme
{
public:
+ ~StubPlatformTheme() override;
void startListening() override;
void stopListening() override;

@@ -0,0 +1,24 @@
--- src/importexport/musicxml/internal/musicxml/exportxml.cpp.orig 2024-02-05 22:14:10 UTC
+++ src/importexport/musicxml/internal/musicxml/exportxml.cpp
@@ -3624,8 +3624,8 @@ static void writeBeam(XmlWriter& xml, ChordRest* const
// TODO: correctly handle Beam::Mode::AUTO
// when equivalent to BEGIN32 or BEGIN64
if ((blp < i && bln >= i)
- || bmc == BeamMode::BEGIN16 && i > 1
- || bmc == BeamMode::BEGIN32 && i > 2) {
+ || (bmc == BeamMode::BEGIN16 && i > 1)
+ || (bmc == BeamMode::BEGIN32 && i > 2)) {
text = "begin";
} else if (blp < i && bln < i) {
if (bln > 0) {
@@ -3634,8 +3634,8 @@ static void writeBeam(XmlWriter& xml, ChordRest* const
text = "backward hook";
}
} else if ((blp >= i && bln < i)
- || bmn == BeamMode::BEGIN16 && i > 1
- || bmn == BeamMode::BEGIN32 && i > 2) {
+ || (bmn == BeamMode::BEGIN16 && i > 1)
+ || (bmn == BeamMode::BEGIN32 && i > 2)) {
text = "end";
} else if (blp >= i && bln >= i) {
text = "continue";
@@ -0,0 +1,11 @@
--- src/importexport/musicxml/internal/musicxml/importmxmlpass1.h.orig 2024-02-05 22:17:12 UTC
+++ src/importexport/musicxml/internal/musicxml/importmxmlpass1.h
@@ -179,7 +179,7 @@ class MusicXMLParserPass1 (public)
bool hasBeamingInfo() const { return _hasBeamingInfo; }
bool isVocalStaff(const QString& id) const { return _parts[id].isVocalStaff(); }
static VBox* createAndAddVBoxForCreditWords(Score* const score, const int miny = 0, const int maxy = 75);
- const int maxDiff() { return _maxDiff; }
+ int maxDiff() const { return _maxDiff; }
void insertAdjustedDuration(Fraction key, Fraction value) { _adjustedDurations.insert(key, value); }
QMap<Fraction, Fraction>& adjustedDurations() { return _adjustedDurations; }
void insertSeenDenominator(int val) { _seenDenominators.emplace(val); }
@@ -0,0 +1,11 @@
--- src/importexport/musicxml/internal/musicxml/musicxmlsupport.cpp.orig 2024-02-05 22:18:41 UTC
+++ src/importexport/musicxml/internal/musicxml/musicxmlsupport.cpp
@@ -34,6 +34,8 @@

#include "log.h"

+#include <QXmlStreamReader>
+
using AccidentalType = mu::engraving::AccidentalType;
using SymId = mu::engraving::SymId;
const static QMap<QString, AccidentalType> smuflAccidentalTypes {
11 changes: 11 additions & 0 deletions audio/musescore/files/patch-src_project_internal_exporttype.cpp
@@ -0,0 +1,11 @@
--- src/project/internal/exporttype.cpp.orig 2024-02-27 16:37:17 UTC
+++ src/project/internal/exporttype.cpp
@@ -21,6 +21,8 @@
*/
#include "exporttype.h"

+#include <QVariantList>
+
using namespace mu::project;

ExportTypeList::ExportTypeList()
13 changes: 13 additions & 0 deletions audio/musescore/files/patch-src_project_internal_exporttype.h
@@ -0,0 +1,13 @@
--- src/project/internal/exporttype.h.orig 2024-01-23 09:35:14 UTC
+++ src/project/internal/exporttype.h
@@ -26,6 +26,10 @@

#include "containers.h"

+#include <QList>
+#include <QString>
+#include <QVariantList>
+
namespace mu::project {
struct ExportType;
class ExportTypeList : public QList<ExportType>
22 changes: 21 additions & 1 deletion audio/musescore/pkg-plist
@@ -1,5 +1,20 @@
bin/mscore
bin/musescore
share/applications/mscore.desktop
share/applications/org.musescore.MuseScore.desktop
share/icons/hicolor/128x128/apps/mscore.png
share/icons/hicolor/16x16/apps/mscore.png
share/icons/hicolor/24x24/apps/mscore.png
share/icons/hicolor/32x32/apps/mscore.png
share/icons/hicolor/48x48/apps/mscore.png
share/icons/hicolor/512x512/apps/mscore.png
share/icons/hicolor/512x512/mimetypes/application-x-musescore+xml.png
share/icons/hicolor/512x512/mimetypes/application-x-musescore.png
share/icons/hicolor/64x64/apps/mscore.png
share/icons/hicolor/96x96/apps/mscore.png
share/man/man1/mscore.1.gz
share/man/man1/musescore.1.gz
share/metainfo/org.musescore.MuseScore.appdata.xml
share/mime/packages/musescore.xml
%%DATADIR%%/autobotscripts/TC1.1_CreateSimpleScore.js
%%DATADIR%%/autobotscripts/TC1.2_CreateSimpleScoreWithRandomInstruments.js
%%DATADIR%%/autobotscripts/TC2_CreateSimpleScoreByTemplate.js
Expand All @@ -20,6 +35,7 @@ bin/musescore
%%DATADIR%%/autobotscripts/steps/Score.js
%%DATADIR%%/instruments/instruments.xml
%%DATADIR%%/instruments/orders.xml
%%DATADIR%%/instruments/string_tunings_presets.json
%%DATADIR%%/locale/instruments_af.qm
%%DATADIR%%/locale/instruments_ar.qm
%%DATADIR%%/locale/instruments_ar_DZ.qm
Expand All @@ -36,6 +52,7 @@ bin/musescore
%%DATADIR%%/locale/instruments_da.qm
%%DATADIR%%/locale/instruments_de.qm
%%DATADIR%%/locale/instruments_el.qm
%%DATADIR%%/locale/instruments_en.qm
%%DATADIR%%/locale/instruments_en_GB.qm
%%DATADIR%%/locale/instruments_en_US.qm
%%DATADIR%%/locale/instruments_eo.qm
Expand Down Expand Up @@ -66,6 +83,7 @@ bin/musescore
%%DATADIR%%/locale/instruments_lv.qm
%%DATADIR%%/locale/instruments_ml.qm
%%DATADIR%%/locale/instruments_mn_MN.qm
%%DATADIR%%/locale/instruments_mt.qm
%%DATADIR%%/locale/instruments_nb.qm
%%DATADIR%%/locale/instruments_nl.qm
%%DATADIR%%/locale/instruments_nn.qm
Expand Down Expand Up @@ -105,6 +123,7 @@ bin/musescore
%%DATADIR%%/locale/musescore_da.qm
%%DATADIR%%/locale/musescore_de.qm
%%DATADIR%%/locale/musescore_el.qm
%%DATADIR%%/locale/musescore_en.qm
%%DATADIR%%/locale/musescore_en_GB.qm
%%DATADIR%%/locale/musescore_en_US.qm
%%DATADIR%%/locale/musescore_eo.qm
Expand Down Expand Up @@ -135,6 +154,7 @@ bin/musescore
%%DATADIR%%/locale/musescore_lv.qm
%%DATADIR%%/locale/musescore_ml.qm
%%DATADIR%%/locale/musescore_mn_MN.qm
%%DATADIR%%/locale/musescore_mt.qm
%%DATADIR%%/locale/musescore_nb.qm
%%DATADIR%%/locale/musescore_nl.qm
%%DATADIR%%/locale/musescore_nn.qm
Expand Down

0 comments on commit d2a73d2

Please sign in to comment.