summaryrefslogtreecommitdiff
path: root/media-sound/drumgizmo/drumgizmo-9999.ebuild
blob: da8771ed62cc9db221e4ef5dba4e188e11e786fc (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Copyright 2020-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

if [[ "${PV}" == "9999" ]]; then
	inherit git-r3
	EGIT_REPO_URI="git://git.drumgizmo.org/${PN}.git"
else
	SRC_URI="https://www.drumgizmo.org/releases/${P}/${P}.tar.gz"
	KEYWORDS="~amd64"
fi

DESCRIPTION="Audio sampler plugin and stand-alone app that simulates a real drum kit"
HOMEPAGE="https://drumgizmo.org/"

inherit autotools

LICENSE="LGPL-3+"
SLOT="0"
IUSE="alsa cli jack +lv2 midi nls test"
REQUIRED_USE="|| ( cli lv2 )"
RESTRICT="!test? ( test )"

# TODO:
# Unbundle media-libs/zita-resampler. This requires a massive patch for build system.

RDEPEND="
	media-libs/libsndfile
	cli? (
		alsa? ( media-libs/alsa-lib )
		jack? ( virtual/jack )
		midi? ( media-libs/libsmf )
	)
	lv2? (
		media-libs/lv2
		x11-libs/libX11
		x11-libs/libXext
	)
"
DEPEND="${RDEPEND}
	test? (
		dev-libs/serd
		media-libs/lilv
	)
"
BDEPEND="
	virtual/pkgconfig
	nls? ( sys-devel/gettext )
"

PATCHES=(
	"${FILESDIR}"/${PN}-0.9.20-configure-portable-shell.patch
	"${FILESDIR}"/${PN}-0.9.20-include-cstdint.patch
	"${FILESDIR}"/${PN}-0.9.20-disable-lv2-test.patch
	"${FILESDIR}"/${PN}-0.9.20-disable-translation-test.patch
	"${FILESDIR}"/${PN}-0.9.20-fix-painter-test.patch
)

pkg_pretend() {
	if ! use cli; then
		use alsa && ewarn "Ignoring USE=alsa since cli is disabled"
		use jack && ewarn "Ignoring USE=jack since cli is disabled"
		use midi && ewarn "Ignoring USE=midi since cli is disabled"
	fi
}

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	local myeconfargs=(
		--enable-gui=x11
		# requres VST2 SDK
		--disable-vst
		# all SSE conditionals were removed in 0.9.16
		--enable-sse=no
		$(use_enable cli)
		$(use_enable lv2)
		$(use_with nls)
		$(use_with test)
	)

	if use cli; then
		myeconfargs+=(
			$(use_enable alsa input-alsamidi)
			$(use_enable alsa output-alsa)
			$(use_enable jack input-jackmidi)
			$(use_enable jack output-jackaudio)
			$(use_enable midi input-midifile)
		)
	else
		myeconfargs+=(
			--disable-input-alsamidi
			--disable-output-alsa
			--disable-input-jackmidi
			--disable-output-jackaudio
			--disable-input-midifile
		)
	fi

	econf "${myeconfargs[@]}"
}