summaryrefslogtreecommitdiff
blob: aaaa9ffa518f6fabb8aa6acdb38d077355ad1fd6 (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-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{6,7} )
inherit git-r3 python-single-r1 xdg desktop

DESCRIPTION="Collection of tools useful for audio production"
HOMEPAGE="http://kxstudio.linuxaudio.org/Applications:Cadence"
EGIT_REPO_URI="https://github.com/falkTX/Cadence.git"
KEYWORDS=""
LICENSE="GPL-2"
SLOT="0"

IUSE="a2jmidid -pulseaudio opengl"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

# for jack project rendering also needs media-sound/jack_capture which is not in the tree yet
CDEPEND="
	${PYTHON_DEPS}
	dev-python/dbus-python[${PYTHON_USEDEP}]
	dev-python/PyQt5[dbus,gui,opengl?,svg,widgets,${PYTHON_USEDEP}]
	media-sound/jack2[dbus]
	a2jmidid? ( media-sound/a2jmidid[dbus] )
	pulseaudio? ( media-sound/pulseaudio[jack] )
"
RDEPEND="${CDEPEND}"
DEPEND="${RDEPEND}"

PATCHES=( "${FILESDIR}"/${PN}-add-skip-stripping.patch )

src_prepare() {
	sed -i -e "s/python3/${EPYTHON}/" \
		data/cadence \
		data/cadence-aloop-daemon \
		data/cadence-jacksettings \
		data/cadence-logs \
		data/cadence-render \
		data/cadence-session-start \
		data/catarina \
		data/catia \
		data/claudia \
		data/claudia-launcher || die "sed failed"

	default
}

src_compile() {
	myemakeargs=(PREFIX="/usr"
		SKIP_STRIPPING=true
	)

	emake "${myemakeargs[@]}"
}

src_install() {
	emake PREFIX="/usr" DESTDIR="${D}" install

	# Clean up stuff that shouldn't be installed
	rm -rf "${D}"/etc/X11/xinit/xinitrc.d/61cadence-session-inject
	rm -rf "${D}"/etc/xdg/autostart/cadence-session-start.desktop
	rm -rf "${D}"/usr/share/applications/*.desktop

	if use !pulseaudio; then
		rm -rf "${D}"/usr/bin/cadence-pulse2{jack,loopback}
		rm -rf "${D}"/usr/share/cadence/pulse2{jack,loopback}
	fi

	# Replace desktop entries with QA issues with these
	make_desktop_entry cadence Cadence cadence "AudioVideo;AudioVideoEditing;Qt"
	make_desktop_entry catia Catia catia "AudioVideo;AudioVideoEditing;Qt"
	make_desktop_entry catarina Catarina catarina "AudioVideo;AudioVideoEditing;Qt"
}