summaryrefslogtreecommitdiff
blob: 50150787ae0704660c9d43b1a6c1225b8c59af52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools xdg

DESCRIPTION="Accurate, easy to use, and highly configurable musical instrument tuner"
HOMEPAGE="https://www.nongnu.org/lingot/"
SRC_URI="https://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="alsa +fftw jack pulseaudio test"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( pulseaudio )"

RDEPEND="
	dev-libs/glib:2
	dev-libs/json-c:=
	x11-libs/cairo
	x11-libs/gtk+:3
	alsa? ( media-libs/alsa-lib )
	fftw? ( sci-libs/fftw:3.0= )
	jack? ( virtual/jack )
	pulseaudio? ( media-libs/libpulse )
"
DEPEND="${RDEPEND}
	test? ( dev-util/cunit )
"
BDEPEND="
	dev-util/intltool
	sys-devel/gettext
	virtual/pkgconfig
"

PATCHES=( "${FILESDIR}"/${P}-desktop-icon.patch )

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	local myemakeargs=(
		$(use_with alsa)
		$(use_with fftw)
		$(use_with jack)
		$(use_with pulseaudio)
		$(use_with test cunit)
	)

	econf "${myemakeargs[@]}"
}

src_install() {
	default
	find "${ED}" -name '*.la' -delete || die
}