1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
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"
12 LICENSE="GPL-2+ LGPL-2.1"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="alsa jack oss portaudio"
19 dev-qt/qtgui:5[-gles2-only]
24 >=sci-libs/fftw-3.3.4:3.0=
26 alsa? ( media-libs/alsa-lib )
27 jack? ( virtual/jack )
28 portaudio? ( media-libs/portaudio )
31 dev-qt/linguist-tools:5
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"
50 for flag in alsa jack portaudio oss; do
51 use ${flag} && config+=" acs_${flag}"
54 "$(qt5_get_bindir)"/lrelease fmit.pro || die "Running lrelease failed"
56 eqmake5 CONFIG+="${config}" fmit.pro PREFIX="${D}"/usr \
57 PREFIXSHORTCUT="${D}"/usr DISTDIR=/usr