]> Pileus Git - ~andy/sunrise/blob - media-sound/sndpeek/sndpeek-1.1.ebuild
sunrise/app-portage/overlay-utils/Manifest: Fix manifests from last commit
[~andy/sunrise] / media-sound / sndpeek / sndpeek-1.1.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils toolchain-funcs
6
7 DESCRIPTION="real-time audio visualization"
8 HOMEPAGE="http://soundlab.cs.princeton.edu/software/sndpeek/"
9 SRC_URI="http://soundlab.cs.princeton.edu/software/${PN}/files/${P}.tgz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~x86"
14 IUSE="oss jack alsa"
15
16 DEPEND="media-libs/glut
17         virtual/opengl
18         virtual/glu
19         x11-libs/libXmu
20         x11-libs/libX11
21         x11-libs/libXext
22         jack? ( media-sound/jack-audio-connection-kit )
23         alsa? ( media-libs/alsa-lib )"
24 RDEPEND="${DEPEND}"
25
26 src_unpack() {
27         unpack ${A}
28         cd "${S}"
29         epatch "${FILESDIR}/${P}-makefile.patch"
30 }
31
32 pkg_setup() {
33         local cnt=0
34         use jack && cnt="$((${cnt} + 1))"
35         use alsa && cnt="$((${cnt} + 1))"
36         use oss && cnt="$((${cnt} + 1))"
37         if [[ "${cnt}" -eq 0 ]]; then
38                 eerror "One of the following USE flags is needed: jack, alsa or oss"
39                 die "Please set one audio engine type"
40         elif [[ "${cnt}" -ne 1 ]]; then
41                 ewarn "You have set ${P} to use multiple audio engine."
42         fi
43 }
44
45 src_compile() {
46         cd "${S}/src/sndpeek"
47
48         local backend
49         if use jack; then
50                 backend="jack"
51         elif use alsa; then
52                 backend="alsa"
53         elif use oss; then
54                 backend="oss"
55         fi
56         einfo "Compiling against ${backend}"
57         emake -f "makefile.${backend}" CC=$(tc-getCC) CXX=$(tc-getCXX) || die "emake failed"
58 }
59
60 src_install() {
61         dobin src/sndpeek/sndpeek
62
63         dodoc AUTHORS README THANKS TODO VERSIONS
64 }