summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-11-23 18:44:51 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2024-11-23 18:45:43 +0100
commit550aefb422dfa76d7d33153ef36620360f38b0f5 (patch)
treefee5ca1eeb034044a53fdfb144a426284abf64e4 /media-sound
parentprofiles: Revert "Mask Qt5 packages without revdeps" (diff)
downloadgentoo-550aefb422dfa76d7d33153ef36620360f38b0f5.tar.gz
gentoo-550aefb422dfa76d7d33153ef36620360f38b0f5.tar.bz2
gentoo-550aefb422dfa76d7d33153ef36620360f38b0f5.zip
media-sound/musescore: Revert "drop 3.6.2-r1, 4.3.2"
Too soon. This reverts commit 689f0b7f345de9fc1fcf95a83b0be7f1f14d3661. Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/musescore/Manifest2
-rw-r--r--media-sound/musescore/files/musescore-3.0.1-man-pages.patch29
-rw-r--r--media-sound/musescore/files/musescore-3.6.1-rename-audioitem.patch12
-rw-r--r--media-sound/musescore/files/musescore-4.2.0-uncompressed-man-pages.patch29
-rw-r--r--media-sound/musescore/files/musescore-4.2.1-missing-headers.patch63
-rw-r--r--media-sound/musescore/files/musescore-4.3.2-unbundle-deps.patch48
-rw-r--r--media-sound/musescore/metadata.xml6
-rw-r--r--media-sound/musescore/musescore-3.6.2-r1.ebuild127
-rw-r--r--media-sound/musescore/musescore-4.3.2.ebuild143
9 files changed, 459 insertions, 0 deletions
diff --git a/media-sound/musescore/Manifest b/media-sound/musescore/Manifest
index 062cfadc6e2d..0b06ed1d72dc 100644
--- a/media-sound/musescore/Manifest
+++ b/media-sound/musescore/Manifest
@@ -1,2 +1,4 @@
DIST MuseScore_General-0.2.0.tar.bz2 35122747 BLAKE2B 7f9cafb7912ab8c977842c51df69506d4ad3d1d37498c856978a2d5ab50a1c4fe9145a4807f8c353e6f14138704abb2bbd70c948f1621b494c6e0458c2df0184 SHA512 69eeb22e8c9d1d393a2af857baeb8e49bf2a492651d18190685c74df84a5f6b424e37077e39d9d69c117c4896ea1fbb857eba25a1fbcb6f98d53f384a55713cc
+DIST musescore-3.6.2.tar.gz 69077899 BLAKE2B 4562267b2fd6498b0ba1e503a9117c2680035ccdb66f94bbd9b98ef1c37d4f9eb7d8a84cbac7726b67b9c95e4f076aaaf83087f4ded195150c42ec77462d48e8 SHA512 04ff1ddd82358c070640f81bbaa9c47c5da95aa57c56a5d1b975ad984744e0def17d5581da6bbeda1aae1c68470100d104d4f8a39ba33bf37bf8891ffcbf1d6e
+DIST musescore-4.3.2.tar.gz 138083648 BLAKE2B 02c1fe9de387fd7783ecb26643f76694d7b4c29541318799c9c35f0f222d7a89ccd3164ec6109bb265245d836a2eb73f29ef687bebc2fb189eacf30c7e5ca970 SHA512 9cffbc25c748970980ec6013c4489178b143ec9ac78fbfcb995b1fbc02512cb6ff3ce912224ded9b526811c6b86a1810307c888e354d9ef09febdffa525f94c5
DIST musescore-4.4.3.tar.gz 143462048 BLAKE2B 98a0a685093dc4f21d263308663ce263f11d9ce3dcf92038f266afebd19f2d9aa125d831aaa5fb805c0eeeca26a869b589c304b1c6004b7adb537ddff263d4e6 SHA512 0eb7e8eaed3397f826449312dfedeceab86c102c83969c8d5e88ccfa08daf27fceff092ad1a96274fcaf815d15d6c4a416940506b6eddb0ade25e1f53119d719
diff --git a/media-sound/musescore/files/musescore-3.0.1-man-pages.patch b/media-sound/musescore/files/musescore-3.0.1-man-pages.patch
new file mode 100644
index 000000000000..a9e871f12d77
--- /dev/null
+++ b/media-sound/musescore/files/musescore-3.0.1-man-pages.patch
@@ -0,0 +1,29 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -660,7 +660,7 @@ if (NOT MINGW AND NOT MSVC AND NOT APPLE)
+ # Compress man pages if gzip is installed (don't on OpenBSD)
+ # Note: Compressing man pages is normal on Linux but not OpenBSD
+ find_program( GZIP_EXECUTABLE gzip DOC "A tool for compressing manpages (optional)." )
+- if (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
++ if (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD" AND false)
+ message(STATUS "Found 'gzip'. Man pages will be compressed.")
+ set(MAN_TARGET ${MAN_BUILD})
+ set(MAN_EXTENSION ${MAN_EXTENSION}.gz)
+@@ -677,7 +677,7 @@ if (NOT MINGW AND NOT MSVC AND NOT APPLE)
+ COMMAND echo "Man pages have been compressed ready for installation."
+ VERBATIM
+ )
+- else (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
++ else (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD" AND false)
+ if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ message(STATUS "System is OpenBSD: Man pages will not be compressed.")
+ else (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+@@ -687,7 +687,7 @@ if (NOT MINGW AND NOT MSVC AND NOT APPLE)
+ COMMAND echo "Man pages will be installed uncompressed."
+ VERBATIM
+ )
+- endif (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
++ endif (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD" AND false)
+ # Install man pages in either compressed or uncompressed form
+ install( FILES ${MAN_BUILD} DESTINATION share/man/man1 COMPONENT doc)
+ # Create symlink alias for man pages so `man musescore` = `man mscore`
diff --git a/media-sound/musescore/files/musescore-3.6.1-rename-audioitem.patch b/media-sound/musescore/files/musescore-3.6.1-rename-audioitem.patch
new file mode 100644
index 000000000000..caf9ae67ec70
--- /dev/null
+++ b/media-sound/musescore/files/musescore-3.6.1-rename-audioitem.patch
@@ -0,0 +1,12 @@
+Fix misnamed variable causing build failure with USE=-mp3
+https://bugs.gentoo.org/767760
+Signed-off-by: Ionen Wolkens <sudinave@gmail.com>
+--- a/mscore/exportdialog.cpp
++++ b/mscore/exportdialog.cpp
+@@ -77,5 +77,5 @@
+ // Disable .mp3 option if unavailable
+ QStandardItem* mp3Item = fileTypeComboBoxModel->item(3);
+- mp3Item->setFlags(audioItem->flags() & ~Qt::ItemIsEnabled);
++ mp3Item->setFlags(mp3Item->flags() & ~Qt::ItemIsEnabled);
+ # endif
+ # ifndef HAS_AUDIOFILE
diff --git a/media-sound/musescore/files/musescore-4.2.0-uncompressed-man-pages.patch b/media-sound/musescore/files/musescore-4.2.0-uncompressed-man-pages.patch
new file mode 100644
index 000000000000..12bcb0f2f42b
--- /dev/null
+++ b/media-sound/musescore/files/musescore-4.2.0-uncompressed-man-pages.patch
@@ -0,0 +1,29 @@
+--- a/build/cmake/SetupAppImagePackaging.cmake
++++ b/build/cmake/SetupAppImagePackaging.cmake
+@@ -99,7 +99,7 @@ configure_file(${MAN_TARGET} ${MAN_BUILD})
+ # Note: Compressing man pages is normal on Linux but not OpenBSD
+ find_program(GZIP_EXECUTABLE gzip DOC "A tool for compressing manpages (optional).")
+
+-if(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
++if(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD" AND false)
+ message(STATUS "Found 'gzip'. Man pages will be compressed.")
+ set(MAN_TARGET ${MAN_BUILD})
+ set(MAN_EXTENSION ${MAN_EXTENSION}.gz)
+@@ -116,7 +116,7 @@ if(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ COMMAND echo "Man pages have been compressed ready for installation."
+ VERBATIM
+ )
+-else(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
++else(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD" AND false)
+ if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ message(STATUS "System is OpenBSD: Man pages will not be compressed.")
+ else(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+@@ -127,7 +127,7 @@ else(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ COMMAND echo "Man pages will be installed uncompressed."
+ VERBATIM
+ )
+-endif(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
++endif(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD" AND false)
+
+ # Install man pages in either compressed or uncompressed form
+ install(FILES ${MAN_BUILD} DESTINATION share/man/man1 COMPONENT doc)
diff --git a/media-sound/musescore/files/musescore-4.2.1-missing-headers.patch b/media-sound/musescore/files/musescore-4.2.1-missing-headers.patch
new file mode 100644
index 000000000000..56ae1f4fa2d6
--- /dev/null
+++ b/media-sound/musescore/files/musescore-4.2.1-missing-headers.patch
@@ -0,0 +1,63 @@
+--- a/src/framework/ui/uimodule.h
++++ b/src/framework/ui/uimodule.h
+@@ -24,6 +24,7 @@
+ #define MU_UI_UIMODULE_H
+
+ #include "modularity/imodulesetup.h"
++#include <QtGlobal>
+
+ namespace mu::ui {
+ class UiConfiguration;
+--- a/src/framework/ui/view/interactiveprovider.h
++++ b/src/framework/ui/view/interactiveprovider.h
+@@ -26,6 +26,7 @@
+ #include <QVariant>
+ #include <QMap>
+ #include <QStack>
++#include <QEventLoop>
+
+ #include "modularity/ioc.h"
+ #include "../iinteractiveprovider.h"
+--- a/src/importexport/musicxml/internal/musicxml/musicxmlsupport.cpp
++++ b/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 std::map<mu::String, AccidentalType> smuflAccidentalTypes {
+--- a/src/importexport/videoexport/internal/videowriter.cpp
++++ b/src/importexport/videoexport/internal/videowriter.cpp
+@@ -32,6 +32,8 @@
+
+ #include "log.h"
+
++#include <QPainter>
++
+ using namespace mu::iex::videoexport;
+ using namespace mu::project;
+ using namespace mu::notation;
+--- a/src/learn/view/learnpagemodel.h
++++ b/src/learn/view/learnpagemodel.h
+@@ -23,6 +23,7 @@
+ #define MU_LEARN_LEARNPAGEMODEL_H
+
+ #include <QObject>
++#include <QVariant>
+
+ #include "async/asyncable.h"
+
+--- a/src/project/internal/exporttype.h
++++ b/src/project/internal/exporttype.h
+@@ -23,6 +23,8 @@
+ #define MU_PROJECT_EXPORTTYPE_H
+
+ #include <unordered_set>
++#include <QList>
++#include <QVariant>
+
+ #include "containers.h"
+
diff --git a/media-sound/musescore/files/musescore-4.3.2-unbundle-deps.patch b/media-sound/musescore/files/musescore-4.3.2-unbundle-deps.patch
new file mode 100644
index 000000000000..6a3f44702f27
--- /dev/null
+++ b/media-sound/musescore/files/musescore-4.3.2-unbundle-deps.patch
@@ -0,0 +1,48 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -188,7 +188,7 @@ if (MUE_BUILD_UNIT_TESTS)
+ FULL_DOCS "List XML files outputted by google test."
+ )
+
+- add_subdirectory(thirdparty/googletest)
++ find_package(GTest REQUIRED)
+ endif(MUE_BUILD_UNIT_TESTS)
+
+ add_subdirectory(share)
+--- a/src/framework/audio/CMakeLists.txt
++++ b/src/framework/audio/CMakeLists.txt
+@@ -268,10 +268,10 @@ if (MUE_ENABLE_AUDIO_EXPORT)
+ ${CMAKE_CURRENT_LIST_DIR}/internal/soundtracks/soundtrackwriter.h
+ )
+
+- add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/lame lame)
++ pkg_check_modules(lame REQUIRED IMPORTED_TARGET lame)
+ set(MODULE_LINK
+ ${MODULE_LINK}
+- lame
++ PkgConfig::lame
+ )
+ if (MUE_COMPILE_USE_SYSTEM_OPUSENC)
+ pkg_check_modules(libopusenc REQUIRED IMPORTED_TARGET libopusenc)
+--- a/src/framework/audio/internal/encoders/mp3encoder.cpp
++++ b/src/framework/audio/internal/encoders/mp3encoder.cpp
+@@ -22,7 +22,7 @@
+
+ #include "mp3encoder.h"
+
+-#include "lame.h"
++#include "lame/lame.h"
+
+ using namespace mu;
+ using namespace mu::audio;
+--- a/src/framework/testing/gtest.cmake
++++ b/src/framework/testing/gtest.cmake
+@@ -60,7 +60,7 @@ find_package(Qt5 COMPONENTS Core Gui REQUIRED)
+ target_link_libraries(${MODULE_TEST}
+ Qt5::Core
+ Qt5::Gui
+- gmock
++ GTest::gmock
+ global
+ ${MODULE_TEST_LINK}
+ )
diff --git a/media-sound/musescore/metadata.xml b/media-sound/musescore/metadata.xml
index 265b53d9c817..bdf3cf8fbc6d 100644
--- a/media-sound/musescore/metadata.xml
+++ b/media-sound/musescore/metadata.xml
@@ -10,6 +10,12 @@
<remote-id type="github">musescore/MuseScore</remote-id>
</upstream>
<use>
+ <flag name="osc">Enable OSC remote control protocol</flag>
+ <flag name="omr">Enable PDF import (OMR - optical music recognition)</flag>
+ <flag name="portmidi">Enable support for building against <pkg>media-libs/portmidi</pkg></flag>
+ <flag name="sf3">Enable SoundFont 3 support using <pkg>media-libs/libvorbis</pkg></flag>
+ <flag name="sfz">Enable experimental SFZ sampler</flag>
+ <flag name="webengine">Use <pkg>dev-qt/qtwebengine</pkg> for embedded web browser</flag>
<flag name="video">Support exporting scores as videos using the command line</flag>
</use>
</pkgmetadata>
diff --git a/media-sound/musescore/musescore-3.6.2-r1.ebuild b/media-sound/musescore/musescore-3.6.2-r1.ebuild
new file mode 100644
index 000000000000..38e0104ea372
--- /dev/null
+++ b/media-sound/musescore/musescore-3.6.2-r1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+CHECKREQS_DISK_BUILD=3500M
+inherit cmake flag-o-matic qmake-utils xdg check-reqs
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${PN}/MuseScore.git"
+else
+ SRC_URI="https://github.com/musescore/MuseScore/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 ~arm64 x86"
+ S="${WORKDIR}/MuseScore-${PV}"
+fi
+
+DESCRIPTION="WYSIWYG Music Score Typesetter"
+HOMEPAGE="https://musescore.org/"
+# MuseScore_General-*.tar.bz2 packaged from https://ftp.osuosl.org/pub/musescore/soundfont/MuseScore_General/
+# It has to be repackaged because the files are not versioned, current version can be found in VERSION file there.
+SRC_URI+=" https://dev.gentoo.org/~fordfrog/distfiles/MuseScore_General-0.2.0.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="alsa debug jack mp3 osc omr portaudio portmidi pulseaudio +sf3 sfz webengine"
+REQUIRED_USE="portmidi? ( portaudio )"
+
+BDEPEND="
+ dev-qt/linguist-tools:5
+ virtual/pkgconfig
+"
+DEPEND="
+ dev-qt/designer:5
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtgui:5
+ dev-qt/qthelp:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtopengl:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtquickcontrols2:5
+ >=dev-qt/qtsingleapplication-2.6.1_p20171024[X]
+ dev-qt/qtsvg:5
+ dev-qt/qtxml:5
+ dev-qt/qtxmlpatterns:5
+ >=media-libs/freetype-2.5.2
+ media-libs/libsndfile
+ sys-libs/zlib:=
+ alsa? ( >=media-libs/alsa-lib-1.0.0 )
+ jack? ( virtual/jack )
+ mp3? ( media-sound/lame )
+ omr? ( app-text/poppler )
+ portaudio? ( media-libs/portaudio )
+ portmidi? ( media-libs/portmidi )
+ pulseaudio? ( media-sound/pulseaudio )
+ sf3? ( media-libs/libvorbis )
+ webengine? ( dev-qt/qtwebengine:5[widgets] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.1-man-pages.patch"
+ "${FILESDIR}/${PN}-3.6.1-rename-audioitem.patch"
+)
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]]; then
+ git-r3_src_unpack
+ unpack ${A}
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Move soundfonts to the correct directory
+ mv "${WORKDIR}"/sound/* "${S}"/share/sound/ || die "Failed to move soundfont files"
+}
+
+src_configure() {
+ # -Werror=odr
+ # https://bugs.gentoo.org/860885
+ #
+ # The relevant code no longer exists in later releases.
+ filter-lto
+
+ # bug #766111
+ export PATH="$(qt5_get_bindir):${PATH}"
+
+ local mycmakeargs=(
+ -DAEOLUS=OFF # does not compile
+ -DBUILD_ALSA="$(usex alsa)"
+ -DBUILD_CRASH_REPORTER=OFF
+ -DBUILD_JACK="$(usex jack)"
+ -DBUILD_LAME="$(usex mp3)"
+ -DBUILD_PCH=OFF
+ -DBUILD_PORTAUDIO="$(usex portaudio)"
+ -DBUILD_PORTMIDI="$(usex portmidi)"
+ -DBUILD_PULSEAUDIO="$(usex pulseaudio)"
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_TELEMETRY_MODULE=ON
+ -DBUILD_WEBENGINE="$(usex webengine)"
+ -DCMAKE_SKIP_RPATH=ON
+ -DDOWNLOAD_SOUNDFONT=OFF
+ -DHAS_AUDIOFILE=ON
+ -DOCR=OFF
+ -DOMR="$(usex omr)"
+ -DSOUNDFONT3=ON
+ -DZERBERUS="$(usex sfz)"
+ -DUSE_PATH_WITH_EXPLICIT_QT_VERSION=ON
+ -DUSE_SYSTEM_FREETYPE=ON
+ -DUSE_SYSTEM_POPPLER=ON
+ -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON
+ )
+ cmake_src_configure
+}
+
+src_compile() {
+ cd "${BUILD_DIR}" || die
+ cmake_build -j1 lrelease manpages
+ cmake_src_compile
+}
diff --git a/media-sound/musescore/musescore-4.3.2.ebuild b/media-sound/musescore/musescore-4.3.2.ebuild
new file mode 100644
index 000000000000..b5a97d520654
--- /dev/null
+++ b/media-sound/musescore/musescore-4.3.2.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CHECKREQS_DISK_BUILD=3500M
+VIRTUALX_REQUIRED="test"
+inherit cmake flag-o-matic qmake-utils xdg check-reqs virtualx
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/musescore/MuseScore.git"
+else
+ SRC_URI="
+ https://github.com/musescore/MuseScore/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ "
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ S="${WORKDIR}/MuseScore-${PV}"
+fi
+
+DESCRIPTION="WYSIWYG Music Score Typesetter"
+HOMEPAGE="https://musescore.org/"
+# MuseScore_General-*.tar.bz2 packaged from https://ftp.osuosl.org/pub/musescore/soundfont/MuseScore_General/
+# It has to be repackaged because the files are not versioned, current version can be found in VERSION file there.
+SRC_URI+=" https://dev.gentoo.org/~fordfrog/distfiles/MuseScore_General-0.2.0.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="jack test video"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ dev-qt/linguist-tools:5
+ virtual/pkgconfig
+"
+RDEPEND="
+ dev-libs/tinyxml2:=
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtgui:5
+ dev-qt/qthelp:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtnetworkauth:5
+ dev-qt/qtopengl:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtquickcontrols2:5[widgets]
+ >=dev-qt/qtsingleapplication-2.6.1_p20171024[X]
+ dev-qt/qtsvg:5
+ dev-qt/qtx11extras:5
+ dev-qt/qtxml:5
+ dev-qt/qtxmlpatterns:5
+ >=media-libs/alsa-lib-1.0.0
+ media-libs/flac:=
+ >=media-libs/freetype-2.5.2
+ media-libs/libopusenc
+ media-libs/libsndfile
+ media-libs/opus
+ media-sound/lame
+ sys-libs/zlib:=
+ jack? ( virtual/jack )
+ video? ( media-video/ffmpeg )
+"
+# dev-cpp/gtest is required even when tests are disabled!
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/gtest
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.2.0-uncompressed-man-pages.patch"
+ "${FILESDIR}/${PN}-4.3.2-unbundle-deps.patch"
+ "${FILESDIR}/${PN}-4.2.0-dynamic_cast-crash.patch"
+ "${FILESDIR}/${PN}-4.2.1-missing-headers.patch"
+)
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]]; then
+ git-r3_src_unpack
+ unpack ${A}
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Move soundfonts to the correct directory
+ mv -v "${WORKDIR}"/sound/* "${S}"/share/sound/ || die "Failed to move soundfont files"
+
+ # Make sure we don't accidentally use bundled third party deps
+ # for which we want to use system packages instead.
+ rm -r thirdparty/{flac,googletest,lame,opus,opusenc} \
+ || die "Failed to remove unused thirdparty directories"
+}
+
+src_configure() {
+ # confuses rcc, bug #908808
+ filter-lto
+
+ # bug #766111
+ export PATH="$(qt5_get_bindir):${PATH}"
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}"
+ -DCMAKE_C_FLAGS_RELEASE="${CFLAGS}"
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_SKIP_RPATH=TRUE
+ -DMUE_BUILD_CRASHPAD_CLIENT=OFF
+ -DMUE_BUILD_UNIT_TESTS="$(usex test)"
+ -DMUE_BUILD_UPDATE_MODULE=OFF
+ -DMUE_BUILD_VIDEOEXPORT_MODULE="$(usex video)"
+ -DMUE_COMPILE_USE_CCACHE=OFF
+ -DMUE_COMPILE_USE_SYSTEM_FLAC=ON
+ -DMUE_COMPILE_USE_SYSTEM_FREETYPE=ON
+ -DMUE_COMPILE_USE_SYSTEM_OPUSENC=ON
+ -DMUE_COMPILE_USE_SYSTEM_TINYXML=ON
+ -DMUE_DOWNLOAD_SOUNDFONT=OFF
+ -DMUE_ENABLE_AUDIO_JACK=$(usex jack)
+ -DMUSESCORE_BUILD_MODE=release
+ )
+ cmake_src_configure
+}
+
+src_compile() {
+ cd "${BUILD_DIR}" || die
+ cmake_build lrelease manpages
+ cmake_src_compile
+}
+
+src_test() {
+ virtx cmake_src_test
+}
+
+src_install() {
+ cmake_src_install
+
+ # Hack to not install bundled libraries
+ rm -rf "${ED}/usr/include" "${ED}/usr/$(get_libdir)" || die
+}