summaryrefslogtreecommitdiff
blob: 7576a39cdb4e7700703033ec9a597dc9b9adf102 (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-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/hydrogen/hydrogen-0.9.4.ebuild,v 1.3 2010/01/06 22:33:40 maekke Exp $

EAPI=2
inherit eutils multilib

DESCRIPTION="Advanced drum machine"
HOMEPAGE="http://www.hydrogen-music.org/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2 ZLIB"
SLOT="0"
KEYWORDS="amd64 ~ppc ~ppc64 ~sparc x86"
IUSE="alsa flac jack ladspa lash oss"

RDEPEND="x11-libs/qt-gui:4
	app-arch/libarchive
	alsa? ( media-libs/alsa-lib )
	flac? ( media-libs/flac[cxx] )
	jack? ( media-sound/jack-audio-connection-kit )
	ladspa? ( media-libs/liblrdf )
	lash? ( media-sound/lash )"
DEPEND="${RDEPEND}
	dev-util/scons"

src_prepare() {
	sed -i \
		-e '/cppflags +=/d' \
			Sconstruct || die
}

src_compile() {
	export QTDIR="/usr/$(get_libdir)"

	local myconf="libarchive=1 portaudio=0 portmidi=0"

	use alsa || myconf="${myconf} alsa=0"
	use flac || myconf="${myconf} flac=0"
	use jack || myconf="${myconf} jack=0"
	use ladspa || myconf="${myconf} lrdf=0"
	use lash && myconf="${myconf} lash=1"
	use oss || myconf="${myconf} oss=0"

	scons \
		prefix=/usr \
		DESTDIR="${D}" \
		optflags="${CXXFLAGS}" \
		${myconf} || die
}

src_install() {
	dobin hydrogen || die
	insinto /usr/share/hydrogen
	doins -r data || die
	doicon data/img/gray/h2-icon.svg
	domenu hydrogen.desktop
	dosym /usr/share/hydrogen/data/doc /usr/share/doc/${PF}/html
	dodoc AUTHORS ChangeLog README.txt
}