summaryrefslogtreecommitdiff
blob: 53a89f6774315bb25eb17d6ed6ec864377cede08 (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
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Donny Davies <woodchip@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/media-sound/freeamp/freeamp-2.1.1.ebuild,v 1.3 2002/02/19 10:39:36 danarmak Exp $
use arts && . /usr/portage/eclass/inherit.eclass
use arts && inherit functions && set-kdedir

# I highly suggest you read the features section of the freeamp website to
# see all the neat stuff this program can do. Pretty spiffy :)

DESCRIPTION="An extremely full-featured mp3/vorbis/cd player with ALSA support"
SRC_URI="http://www.freeamp.org/download/src/${P}.tar.bz2"
HOMEPAGE="http://www.freeamp.org/"
S=${WORKDIR}/freeamp

RDEPEND="virtual/glibc
	>=dev-libs/glib-1.2.5 >=x11-libs/gtk+-1.2.5
	>=sys-libs/zlib-1.1.3 >=sys-libs/ncurses-5.2
	~media-libs/freetype-1.3.1 >=media-libs/musicbrainz-1.0.1
	esd? ( media-sound/esound ) alsa? ( media-libs/alsa-lib )
	gnome? ( gnome-base/ORBit >=media-libs/gdk-pixbuf-0.8 )
	X? ( virtual/x11 ) arts? ( kde-base/kdelibs )
	vorbis? ( media-libs/libvorbis )"
DEPEND="${RDEPEND} dev-lang/nasm sys-devel/perl"

# Unfortunately you can't selectively build a lot of the features. Therefore
# this whole package is essentially a judgement call. However, I've made the
# DEPEND in a strategic manner to ensure that your USE variable is respected
# when the knobs are *set*.

src_unpack() {

    unpack ${A}
    
    if [ "`use arts`" ]; then
	cd ${S}/io/arts/src
	cp artspmo.cpp 1
	sed -e 's:artsc/artsc.h:artsc.h:g' 1 > artspmo.cpp
    fi

}

src_compile() {

	local myconf
	use alsa || myconf="${myconf} --disable-alsa"
	use esd  || myconf="${myconf} --disable-esd"
	use arts && myconf="${myconf} --with-extra-includes=${KDEDIR}/include"

	./configure --prefix=/usr --host=${CHOST} ${myconf} || die
	make ; assert "compile problem :("
}

src_install() {

	into /usr ; dobin freeamp
	exeinto /usr/lib/freeamp/plugins  ; doexe plugins/*
	insinto /usr/share/freeamp/themes ; doins themes/*
	dodir /usr/share/freeamp/fonts

	dodoc AUTHORS ChangeLog CHANGES COPYING NEWS README README.linux

	cd ${D}/usr/share/freeamp ; tar zxf ${S}/help/unix/freeamphelp.tar.gz
	chown -R root.root help ; chmod 644 help/*
	dosym /usr/share/freeamp/help /usr/share/doc/${PF}/html
}