MuseScore: enable portaudio backend

* add haiku icon theme
* use system colors
* strip binary
This commit is contained in:
Gerasim Troeglazov
2023-02-05 20:38:23 +10:00
parent f5ba94e625
commit 8bcf3d7e91
3 changed files with 56 additions and 15 deletions

Binary file not shown.

View File

@@ -3,20 +3,22 @@ DESCRIPTION="This application is used to create, play, and print beautiful sheet
HOMEPAGE="https://musescore.org/"
COPYRIGHT="2002-2021 Werner Schweer and others"
LICENSE="GNU GPL v2"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/musescore/MuseScore/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="c37acc6d7a316f04925265d2d22a35d715888580e16eff846e9b621954133c45"
SOURCE_DIR="MuseScore-$portVersion"
PATCHES="musescore-$portVersion.patchset"
ADDITIONAL_FILES="musescore.rdef.in"
ADDITIONAL_FILES="
musescore.rdef.in
icons.zip
"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
musescore$secondaryArchSuffix = $portVersion
cmd:mscore
app:musescore
app:MuseScore = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -24,6 +26,8 @@ REQUIRES="
lib:libGL$secondaryArchSuffix
lib:libmp3lame$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libportaudio$secondaryArchSuffix
lib:libportmidi$secondaryArchSuffix
lib:libQt5$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Designer$secondaryArchSuffix
@@ -43,6 +47,8 @@ BUILD_REQUIRES="
devel:libGL$secondaryArchSuffix
devel:libmp3lame$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libportaudio$secondaryArchSuffix
devel:libportmidi$secondaryArchSuffix
devel:libQt5$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Designer$secondaryArchSuffix
@@ -62,8 +68,14 @@ BUILD_PREREQUIRES="
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:unzip
"
PATCH()
{
unzip -o $sourceDir/../../additional-files/icons.zip -d $sourceDir/mscore/data/icons
}
BUILD()
{
export DISABLE_ASLR=1
@@ -72,8 +84,8 @@ BUILD()
UPDATE_CACHE=FALSE \
BUILD_PULSEAUDIO=OFF \
BUILD_JACK=OFF \
BUILD_PORTMIDI=OFF \
BUILD_PORTAUDIO=OFF \
BUILD_PORTMIDI=ON \
BUILD_PORTAUDIO=ON \
BUILD_WEBENGINE=OFF \
USE_SYSTEM_FREETYPE=ON \
DOWNLOAD_SOUNDFONT=OFF \
@@ -86,10 +98,14 @@ INSTALL()
{
make UPDATE_CACHE=FALSE -C build.release install
mv $appsDir/MuseScore/bin/mscore $appsDir/MuseScore/MuseScore
strip $appsDir/MuseScore/MuseScore
rm -rf $appsDir/MuseScore/bin
local APP_SIGNATURE="application/x-vnd.musescore"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="0" # "`echo "$portVersion" | cut -d. -f3`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
@@ -99,6 +115,6 @@ INSTALL()
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/musescore.rdef.in > musescore.rdef
addResourcesToBinaries musescore.rdef "$appsDir"/MuseScore/bin/musescore
addAppDeskbarSymlink "$appsDir"/MuseScore/bin/musescore MuseScore
addResourcesToBinaries musescore.rdef $appsDir/MuseScore/MuseScore
addAppDeskbarSymlink $appsDir/MuseScore/MuseScore
}

View File

@@ -1,4 +1,4 @@
From 879258db8aaada67116d9a83d5759393a0bd462c Mon Sep 17 00:00:00 2001
From 63873eae099d17a3ca8b94eddac32a27c48b74e6 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 17 Sep 2019 19:09:55 +0200
Subject: Import still relevant part of Haiku patches.
@@ -47,10 +47,10 @@ index 6eb2162..ff07f7c 100644
if (APPLE)
--
2.30.0
2.37.3
From 5e36125644dc5c6b5eecfe1b0d8a4c4935a65bb5 Mon Sep 17 00:00:00 2001
From cd1d44edbae4d976fd785f69ea4baf027f003804 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 7 Jan 2020 13:31:47 +1000
Subject: Don't set Fusion style for Haiku
@@ -71,10 +71,10 @@ index c08a15e..32444f2 100644
#ifdef Q_OS_MAC
// On Mac, update the color of the window title bars
--
2.30.0
2.37.3
From 4988f4c9533e94fe0c70590592426af360612c5c Mon Sep 17 00:00:00 2001
From d1531a162e549e80e4a02abae33077367d1a6e08 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 20 Jan 2021 09:52:46 +0100
Subject: Haiku patch
@@ -107,5 +107,30 @@ index 7037eb0..a5bd106 100644
/**
--
2.30.0
2.37.3
From 5e8416c870a86bfc12449a4cd21bf69bcb9eb32c Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 5 Feb 2023 20:10:19 +1000
Subject: Use system colors
diff --git a/mscore/musescore.cpp b/mscore/musescore.cpp
index 32444f2..1c19aca 100644
--- a/mscore/musescore.cpp
+++ b/mscore/musescore.cpp
@@ -7455,8 +7455,9 @@ void MuseScore::updateUiStyleAndTheme()
css.replace("$buttonHighlightEnabledOn", Ms::preferences.getColor(PREF_UI_BUTTON_HIGHLIGHT_COLOR_ENABLED_LIGHT_ON).name().toLatin1());
}
+#ifndef Q_OS_HAIKU
qApp->setStyleSheet(css);
-
+#endif
QString style = QString("*, QSpinBox { font: %1pt \"%2\" } ")
.arg(QString::number(preferences.getDouble(PREF_UI_THEME_FONTSIZE)), preferences.getString(PREF_UI_THEME_FONTFAMILY))
+ qApp->styleSheet();
--
2.37.3