summaryrefslogtreecommitdiff
path: root/media-sound/gtick/gtick-0.5.5-r1.ebuild
blob: 68489f29c98f412514578ca9069204b7f3ad70b7 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools desktop xdg-utils

DESCRIPTION="Metronome application supporting different meters and speeds ranging"
HOMEPAGE="https://www.antcom.de/gtick/"
SRC_URI="https://www.antcom.de/gtick/download/${P}.tar.gz"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="amd64 ~ppc ~sparc x86"
IUSE="nls sndfile test"

RESTRICT="!test? ( test )"

RDEPEND="
	media-libs/libpulse
	virtual/libintl
	x11-libs/gtk+:2
	sndfile? ( media-libs/libsndfile )
"
DEPEND="
	${RDEPEND}
	test? ( dev-libs/check )
"
BDEPEND="
	virtual/pkgconfig
	nls? ( sys-devel/gettext )
"

PATCHES=(
	"${FILESDIR}"/${PN}-0.5.5-desktop.patch
	"${FILESDIR}"/${PN}-0.5.5-autotools.patch
	"${FILESDIR}"/${PN}-0.5.5-no-dmalloc-tests.patch
	"${FILESDIR}"/${PN}-0.5.5-c23.patch
)

src_prepare() {
	default

	sed -i 's:^\(appdatadir = .*/\)appdata:\1metainfo:' \
		Makefile.{am,in} || die

	eautoreconf
}

src_configure() {
	local myeconfargs=(
		$(use_enable nls)
		$(use_with sndfile)
	)

	econf "${myeconfargs[@]}"
}

src_install() {
	local res

	default

	for res in 32 48 64; do
		newicon -s ${res} src/icon${res}x${res}.xpm gtick.xpm
	done
}

pkg_postinst() {
	xdg_icon_cache_update
}

pkg_postrm() {
	xdg_icon_cache_update
}