media-sound/qsynth: amd64 stable wrt bug #720454
[gentoo.git] / media-sound / fmit / fmit-1.0.15-r3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit qmake-utils
7
8 DESCRIPTION="Free Music Instrument Tuner"
9 HOMEPAGE="https://gillesdegottex.github.io/fmit"
10 SRC_URI="https://github.com/gillesdegottex/fmit/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="GPL-2+ LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="alsa jack oss portaudio"
16
17 RDEPEND="
18         dev-qt/qtcore:5
19         dev-qt/qtgui:5[-gles2-only]
20         dev-qt/qtmultimedia:5
21         dev-qt/qtopengl:5
22         dev-qt/qtsvg:5
23         dev-qt/qtwidgets:5
24         >=sci-libs/fftw-3.3.4:3.0=
25         virtual/opengl
26         alsa? ( media-libs/alsa-lib )
27         jack? ( virtual/jack )
28         portaudio? ( media-libs/portaudio )
29 "
30 DEPEND="${RDEPEND}
31         dev-qt/linguist-tools:5
32 "
33
34 src_prepare() {
35         # Fix the path to readme file to prevent errors on start up
36         sed -i "/QFile readmefile/c\QFile readmefile \
37                 (\"/usr/share/doc/${PF}/README.txt\");" \
38                 src/main.cpp || die "README sed failed"
39         # Fix the PREFIX location, insert real path.
40         sed -i "/QString fmitprefix/c\QString fmitprefix(STR(/usr));" \
41                 src/main.cpp || die "PREFIX fix sed failed"
42         # Fix the PREFIX location, insert real path.
43         sed -i "/QString fmitprefix/c\QString fmitprefix(STR(/usr));" \
44                 src/modules/MicrotonalView.cpp || die "PREFIX fix sed failed"
45         default
46 }
47
48 src_configure() {
49         local config flag
50         for flag in alsa jack portaudio oss; do
51                 use ${flag} && config+=" acs_${flag}"
52         done
53
54         "$(qt5_get_bindir)"/lrelease fmit.pro || die "Running lrelease failed"
55
56         eqmake5 CONFIG+="${config}" fmit.pro PREFIX="${D}"/usr \
57                 PREFIXSHORTCUT="${D}"/usr DISTDIR=/usr
58 }