1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
CMAKE_MAKEFILE_GENERATOR="emake"
|
|
6 |
#CMAKE_MAKEFILE_GENERATOR="emake"
|
7 |
7 |
CHECKREQS_DISK_BUILD=3500M
|
8 |
|
inherit cmake qmake-utils xdg check-reqs
|
|
8 |
VIRTUALX_REQUIRED="test"
|
|
9 |
inherit cmake qmake-utils xdg check-reqs virtualx
|
9 |
10 |
|
10 |
11 |
if [[ ${PV} == "9999" ]]; then
|
11 |
12 |
inherit git-r3
|
12 |
13 |
EGIT_REPO_URI="https://github.com/${PN}/MuseScore.git"
|
13 |
14 |
else
|
14 |
|
SRC_URI="https://github.com/musescore/MuseScore/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
15 |
|
KEYWORDS="amd64 ~arm64 x86"
|
|
15 |
SRC_URI="
|
|
16 |
https://github.com/musescore/MuseScore/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
|
17 |
"
|
|
18 |
KEYWORDS="~amd64 ~arm64 ~x86"
|
16 |
19 |
S="${WORKDIR}/MuseScore-${PV}"
|
17 |
20 |
fi
|
18 |
21 |
|
... | ... | |
24 |
27 |
|
25 |
28 |
LICENSE="GPL-2"
|
26 |
29 |
SLOT="0"
|
27 |
|
IUSE="alsa debug jack mp3 osc omr portaudio portmidi pulseaudio +sf3 sfz webengine"
|
28 |
|
REQUIRED_USE="portmidi? ( portaudio )"
|
|
30 |
IUSE="debug jumbo-build test"
|
|
31 |
RESTRICT="!test? ( test )"
|
29 |
32 |
|
30 |
33 |
BDEPEND="
|
31 |
34 |
dev-qt/linguist-tools:5
|
32 |
35 |
virtual/pkgconfig
|
33 |
36 |
"
|
34 |
|
DEPEND="
|
|
37 |
RDEPEND="
|
|
38 |
dev-libs/tinyxml2:=
|
35 |
39 |
dev-qt/designer:5
|
36 |
40 |
dev-qt/qtconcurrent:5
|
37 |
41 |
dev-qt/qtcore:5
|
... | ... | |
39 |
43 |
dev-qt/qtgui:5
|
40 |
44 |
dev-qt/qthelp:5
|
41 |
45 |
dev-qt/qtnetwork:5
|
|
46 |
dev-qt/qtnetworkauth:5
|
42 |
47 |
dev-qt/qtopengl:5
|
43 |
48 |
dev-qt/qtprintsupport:5
|
|
49 |
dev-qt/qtquickcontrols:5
|
44 |
50 |
dev-qt/qtquickcontrols2:5
|
45 |
51 |
>=dev-qt/qtsingleapplication-2.6.1_p20171024[X]
|
46 |
52 |
dev-qt/qtsvg:5
|
|
53 |
dev-qt/qtx11extras:5
|
47 |
54 |
dev-qt/qtxml:5
|
48 |
55 |
dev-qt/qtxmlpatterns:5
|
|
56 |
>=media-libs/alsa-lib-1.0.0
|
|
57 |
media-libs/flac:=
|
49 |
58 |
>=media-libs/freetype-2.5.2
|
|
59 |
media-libs/libopusenc
|
50 |
60 |
media-libs/libsndfile
|
|
61 |
media-libs/opus
|
|
62 |
media-sound/lame
|
51 |
63 |
sys-libs/zlib:=
|
52 |
|
alsa? ( >=media-libs/alsa-lib-1.0.0 )
|
53 |
|
jack? ( virtual/jack )
|
54 |
|
mp3? ( media-sound/lame )
|
55 |
|
omr? ( app-text/poppler )
|
56 |
|
portaudio? ( media-libs/portaudio )
|
57 |
|
portmidi? ( media-libs/portmidi )
|
58 |
|
pulseaudio? ( media-sound/pulseaudio )
|
59 |
|
sf3? ( media-libs/libvorbis )
|
60 |
|
webengine? ( dev-qt/qtwebengine:5[widgets] )
|
61 |
64 |
"
|
62 |
|
RDEPEND="${DEPEND}"
|
|
65 |
# dev-cpp/gtest is required even when tests are disabled!
|
|
66 |
DEPEND="
|
|
67 |
${RDEPEND}
|
|
68 |
|
|
69 |
dev-cpp/gtest
|
|
70 |
"
|
63 |
71 |
|
64 |
72 |
PATCHES=(
|
65 |
|
"${FILESDIR}/${PN}-3.0.1-man-pages.patch"
|
66 |
|
"${FILESDIR}/${PN}-3.6.1-rename-audioitem.patch"
|
|
73 |
"${FILESDIR}/${P}-uncompressed-man-pages.patch"
|
|
74 |
"${FILESDIR}/${P}-unbundle-deps.patch"
|
67 |
75 |
)
|
68 |
76 |
|
69 |
77 |
src_unpack() {
|
... | ... | |
80 |
88 |
|
81 |
89 |
# Move soundfonts to the correct directory
|
82 |
90 |
mv "${WORKDIR}"/sound/* "${S}"/share/sound/ || die "Failed to move soundfont files"
|
|
91 |
|
|
92 |
# Make sure we don't accidentally use bundled third party deps
|
|
93 |
# for which we want to use system packages instead.
|
|
94 |
rm -r thirdparty/{flac,freetype,googletest,lame,opus,opusenc} \
|
|
95 |
|| die "Failed to remove unused thirdparty directories"
|
83 |
96 |
}
|
84 |
97 |
|
85 |
98 |
src_configure() {
|
... | ... | |
87 |
100 |
export PATH="$(qt5_get_bindir):${PATH}"
|
88 |
101 |
|
89 |
102 |
local mycmakeargs=(
|
90 |
|
-DAEOLUS=OFF # does not compile
|
91 |
|
-DBUILD_ALSA="$(usex alsa)"
|
92 |
|
-DBUILD_CRASH_REPORTER=OFF
|
93 |
|
-DBUILD_JACK="$(usex jack)"
|
94 |
|
-DBUILD_LAME="$(usex mp3)"
|
95 |
|
-DBUILD_PCH=OFF
|
96 |
|
-DBUILD_PORTAUDIO="$(usex portaudio)"
|
97 |
|
-DBUILD_PORTMIDI="$(usex portmidi)"
|
98 |
|
-DBUILD_PULSEAUDIO="$(usex pulseaudio)"
|
99 |
|
-DBUILD_SHARED_LIBS=ON
|
100 |
|
-DBUILD_TELEMETRY_MODULE=ON
|
101 |
|
-DBUILD_WEBENGINE="$(usex webengine)"
|
102 |
|
-DCMAKE_SKIP_RPATH=ON
|
|
103 |
-DMUSESCORE_BUILD_CONFIG=release
|
|
104 |
|
|
105 |
-DBUILD_CRASHPAD_CLIENT=OFF
|
|
106 |
-DBUILD_AUTOUPDATE=OFF
|
|
107 |
# Jack support has been dropped in 4.0.0,
|
|
108 |
# but its remnants are still in the build system and cause trouble.
|
|
109 |
# https://github.com/musescore/MuseScore/issues/12775
|
|
110 |
-DBUILD_JACK=OFF
|
103 |
111 |
-DDOWNLOAD_SOUNDFONT=OFF
|
104 |
|
-DHAS_AUDIOFILE=ON
|
105 |
|
-DOCR=OFF
|
106 |
|
-DOMR="$(usex omr)"
|
107 |
112 |
-DSOUNDFONT3=ON
|
108 |
|
-DZERBERUS="$(usex sfz)"
|
109 |
|
-DUSE_PATH_WITH_EXPLICIT_QT_VERSION=ON
|
|
113 |
-DBUILD_UNIT_TESTS="$(usex test)"
|
|
114 |
-DCMAKE_SKIP_RPATH=ON
|
|
115 |
-DTRY_USE_CCACHE=OFF
|
|
116 |
-DBUILD_UNITY="$(usex jumbo-build)"
|
110 |
117 |
-DUSE_SYSTEM_FREETYPE=ON
|
111 |
|
-DUSE_SYSTEM_POPPLER=ON
|
112 |
|
-DUSE_SYSTEM_QTSINGLEAPPLICATION=ON
|
113 |
118 |
)
|
114 |
119 |
cmake_src_configure
|
115 |
120 |
}
|
... | ... | |
119 |
124 |
cmake_build -j1 lrelease manpages
|
120 |
125 |
cmake_src_compile
|
121 |
126 |
}
|
|
127 |
|
|
128 |
src_test() {
|
|
129 |
virtx cmake_src_test
|
|
130 |
}
|
|
131 |
|
|
132 |
src_install() {
|
|
133 |
cmake_src_install
|
|
134 |
|
|
135 |
# Hack to not install bundled libraries like libogg
|
|
136 |
rm -rf "${ED}/usr/include" "${ED}/usr/$(get_libdir)" || die
|
|
137 |
}
|