summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2024-01-20 05:34:34 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2024-01-21 01:55:58 +0100
commit899041aa86b131e37fa497b3a5c17889ce9dbe67 (patch)
tree90720492f467cedf73d5286cbaa1bb3c979b1564 /media-sound
parentdev-util/reuse: add 3.0.1 (diff)
downloadgentoo-899041aa86b131e37fa497b3a5c17889ce9dbe67.tar.gz
gentoo-899041aa86b131e37fa497b3a5c17889ce9dbe67.tar.bz2
gentoo-899041aa86b131e37fa497b3a5c17889ce9dbe67.zip
media-sound/musescore: add 4.2.0
Closes: https://bugs.gentoo.org/913160 Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/musescore/Manifest1
-rw-r--r--media-sound/musescore/files/musescore-4.2.0-dynamic_cast-crash.patch11
-rw-r--r--media-sound/musescore/files/musescore-4.2.0-missing-headers.patch41
-rw-r--r--media-sound/musescore/files/musescore-4.2.0-unbundle-deps.patch119
-rw-r--r--media-sound/musescore/files/musescore-4.2.0-uncompressed-man-pages.patch29
-rw-r--r--media-sound/musescore/metadata.xml1
-rw-r--r--media-sound/musescore/musescore-4.2.0.ebuild135
7 files changed, 337 insertions, 0 deletions
diff --git a/media-sound/musescore/Manifest b/media-sound/musescore/Manifest
index 66f132cab519..c7794297ac84 100644
--- a/media-sound/musescore/Manifest
+++ b/media-sound/musescore/Manifest
@@ -1,3 +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.0.2.tar.gz 123962958 BLAKE2B aa31b5346a4c5cfc44f66cf266724c8439d03b449336c16a960df21201d460c21a9b645654584876cc8f20f96f7e95cc24980cda85544a2338ddb8523874fe5e SHA512 fda63124281c4e19160482dff5472889b8753f2389e3d115b2b8e23f3edb976df0912a4e554334a4fc7cc4f9a6945165a07e781fcc2eec46db373e298d9f3616
+DIST musescore-4.2.0.tar.gz 135490976 BLAKE2B 518b26a5263fc6da520cead315bbb6bf4e6a471e6bd68063a765355cef264f20722b8ad7e4207ecf58ec416240632744d70c3c1d5d58b245ce46c001a1898e72 SHA512 5494cc643e0d0bf104ed335b54f12955ce0041da93ceb81596ffdbf862b355056ca2011e3bc4ba31aa6ade08034e33fa5ad5a3b7a54bce991812894efb7f76aa
diff --git a/media-sound/musescore/files/musescore-4.2.0-dynamic_cast-crash.patch b/media-sound/musescore/files/musescore-4.2.0-dynamic_cast-crash.patch
new file mode 100644
index 000000000000..0c9c43d11877
--- /dev/null
+++ b/media-sound/musescore/files/musescore-4.2.0-dynamic_cast-crash.patch
@@ -0,0 +1,11 @@
+--- a/src/engraving/style/style.cpp
++++ b/src/engraving/style/style.cpp
+@@ -42,7 +42,7 @@ using namespace mu::engraving;
+
+ const PropertyValue& MStyle::value(Sid idx) const
+ {
+- if (idx == Sid::NOSTYLE) {
++ if (idx == Sid::NOSTYLE || size_t(idx) >= m_values.size()) {
+ static PropertyValue dummy;
+ return dummy;
+ }
diff --git a/media-sound/musescore/files/musescore-4.2.0-missing-headers.patch b/media-sound/musescore/files/musescore-4.2.0-missing-headers.patch
new file mode 100644
index 000000000000..2a40ccc00c35
--- /dev/null
+++ b/media-sound/musescore/files/musescore-4.2.0-missing-headers.patch
@@ -0,0 +1,41 @@
+--- 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/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"
+
diff --git a/media-sound/musescore/files/musescore-4.2.0-unbundle-deps.patch b/media-sound/musescore/files/musescore-4.2.0-unbundle-deps.patch
new file mode 100644
index 000000000000..50b388814680
--- /dev/null
+++ b/media-sound/musescore/files/musescore-4.2.0-unbundle-deps.patch
@@ -0,0 +1,119 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -185,7 +185,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,11 +268,18 @@ if (MUE_ENABLE_AUDIO_EXPORT)
+ ${CMAKE_CURRENT_LIST_DIR}/internal/soundtracks/soundtrackwriter.h
+ )
+
+- add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/lame lame)
+- add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/opusenc opusenc)
+- add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/flac flac)
++ pkg_check_modules(lame REQUIRED IMPORTED_TARGET lame)
++ pkg_check_modules(libopusenc REQUIRED IMPORTED_TARGET libopusenc)
++ pkg_check_modules(flac REQUIRED IMPORTED_TARGET flac)
++ pkg_check_modules(flacpp REQUIRED IMPORTED_TARGET flac++)
+
+- set(MODULE_LINK ${MODULE_LINK} lame opusenc flac)
++ set(MODULE_LINK
++ ${MODULE_LINK}
++ PkgConfig::lame
++ PkgConfig::libopusenc
++ PkgConfig::flac
++ PkgConfig::flacpp
++ )
+ endif()
+
+ if (ARCH_IS_X86_64)
+--- 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/audio/internal/encoders/oggencoder.cpp
++++ b/src/framework/audio/internal/encoders/oggencoder.cpp
+@@ -22,7 +22,7 @@
+
+ #include "oggencoder.h"
+
+-#include "opusenc.h"
++#include "opus/opusenc.h"
+
+ #include "log.h"
+
+--- a/src/framework/global/CMakeLists.txt
++++ b/src/framework/global/CMakeLists.txt
+@@ -111,8 +111,6 @@ set(MODULE_SRC
+ ${CMAKE_CURRENT_LIST_DIR}/serialization/xmlstreamreader.h
+ ${CMAKE_CURRENT_LIST_DIR}/serialization/xmlstreamwriter.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/serialization/xmlstreamwriter.h
+- ${CMAKE_CURRENT_LIST_DIR}/thirdparty//tinyxml/tinyxml2.cpp
+- ${CMAKE_CURRENT_LIST_DIR}/thirdparty//tinyxml/tinyxml2.h
+ ${CMAKE_CURRENT_LIST_DIR}/serialization/zipreader.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/serialization/zipreader.h
+ ${CMAKE_CURRENT_LIST_DIR}/serialization/zipwriter.cpp
+@@ -130,6 +128,8 @@ set(MODULE_SRC
+ ${CMAKE_CURRENT_LIST_DIR}/concurrency/taskscheduler.h
+ )
+
++find_package(tinyxml2 REQUIRED)
++
+ if (GLOBAL_NO_INTERNAL)
+ set(MODULE_DEF ${MODULE_DEF} -DGLOBAL_NO_INTERNAL)
+ else()
+@@ -209,6 +209,7 @@ list(APPEND MODULE_INCLUDE
+ list(APPEND MODULE_LINK
+ ${FS_LIB}
+ ${Z_LIB}
++ tinyxml2::tinyxml2
+ )
+
+ if (MUE_ENABLE_CUSTOM_ALLOCATOR)
+--- a/src/framework/global/serialization/xmldom.cpp
++++ b/src/framework/global/serialization/xmldom.cpp
+@@ -21,7 +21,7 @@
+ */
+ #include "xmldom.h"
+
+-#include "thirdparty/tinyxml/tinyxml2.h"
++#include <tinyxml2.h>
+
+ #include "log.h"
+
+--- a/src/framework/global/serialization/xmlstreamreader.cpp
++++ b/src/framework/global/serialization/xmlstreamreader.cpp
+@@ -23,7 +23,7 @@
+
+ #include <cstring>
+
+-#include "thirdparty/tinyxml/tinyxml2.h"
++#include <tinyxml2.h>
+
+ #include "log.h"
+
+--- 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/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/metadata.xml b/media-sound/musescore/metadata.xml
index c17629b67a33..bb8981f3fa8a 100644
--- a/media-sound/musescore/metadata.xml
+++ b/media-sound/musescore/metadata.xml
@@ -17,5 +17,6 @@
<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-4.2.0.ebuild b/media-sound/musescore/musescore-4.2.0.ebuild
new file mode 100644
index 000000000000..8517858ee081
--- /dev/null
+++ b/media-sound/musescore/musescore-4.2.0.ebuild
@@ -0,0 +1,135 @@
+# 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 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="test video"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ dev-qt/linguist-tools:5
+ virtual/pkgconfig
+"
+RDEPEND="
+ dev-libs/tinyxml2:=
+ dev-qt/designer:5
+ 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
+ >=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:=
+ video? ( media-video/ffmpeg )
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-uncompressed-man-pages.patch"
+ "${FILESDIR}/${P}-unbundle-deps.patch"
+ "${FILESDIR}/${P}-missing-headers.patch"
+ "${FILESDIR}/${P}-dynamic_cast-crash.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() {
+ # 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_FREETYPE=ON
+ -DMUE_DOWNLOAD_SOUNDFONT=OFF
+ -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
+}