Files
haikuports/media-sound/musescore/musescore-3.6.2.recipe
2023-12-13 11:43:49 +01:00

121 lines
3.4 KiB
Bash

SUMMARY="Free music composition and notation software"
DESCRIPTION="This application is used to create, play, and print beautiful sheet music"
HOMEPAGE="https://musescore.org/"
COPYRIGHT="2002-2021 Werner Schweer and others"
LICENSE="GNU GPL v2"
REVISION="4"
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
icons.zip
"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
musescore$secondaryArchSuffix = $portVersion
app:MuseScore = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libmp3lame$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libportaudio$secondaryArchSuffix
lib:libportmidi$secondaryArchSuffix
lib:libQt5$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Designer$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5Quick$secondaryArchSuffix
lib:libQt5Test$secondaryArchSuffix
lib:libQt5Xml$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfreetype$secondaryArchSuffix
devel:libGL$secondaryArchSuffix
devel:libmp3lame$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libportaudio$secondaryArchSuffix
devel:libportmidi$secondaryArchSuffix
devel:libQt5$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Designer$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix
devel:libQt5Quick$secondaryArchSuffix
devel:libQt5Test$secondaryArchSuffix
devel:libQt5Xml$secondaryArchSuffix
devel:libsndfile$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:getconf
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
mkdir -p $appsDir
make PREFIX=$appsDir/MuseScore \
UPDATE_CACHE=FALSE \
BUILD_PULSEAUDIO=OFF \
BUILD_JACK=OFF \
BUILD_PORTMIDI=ON \
BUILD_PORTAUDIO=ON \
BUILD_WEBENGINE=OFF \
USE_SYSTEM_FREETYPE=ON \
DOWNLOAD_SOUNDFONT=OFF \
BUILD_ALSA=OFF \
NO_RPATH=TRUE \
MUSESCORE_BUILD_CONFIG=release revision release
}
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="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/musescore.rdef.in > musescore.rdef
addResourcesToBinaries musescore.rdef $appsDir/MuseScore/MuseScore
addAppDeskbarSymlink $appsDir/MuseScore/MuseScore
}