summaryrefslogtreecommitdiff
blob: 06edc24ba4abe241ca7327e575a6d9821f49b351 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/zinf/zinf-2.2.5-r1.ebuild,v 1.7 2004/08/22 04:45:28 obz Exp $

inherit kde-functions eutils flag-o-matic

DESCRIPTION="An extremely full-featured mp3/vorbis/cd player with ALSA support, previously called FreeAmp"
HOMEPAGE="http://www.zinf.org/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
RESTRICT="nomirror"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 amd64 -sparc"
IUSE="debug esd X gtk oggvorbis gnome arts alsa nls ipv6"

RDEPEND=">=dev-libs/glib-2.0.0
	sys-libs/gdbm
	sys-libs/zlib
	>=sys-libs/ncurses-5.2
	>=media-libs/musicbrainz-1.0.1
	X? ( virtual/x11 )
	esd? ( media-sound/esound )
	gtk? ( >=x11-libs/gtk+-2.0.0 )
	gnome? ( =gnome-base/orbit-0* )
	oggvorbis? ( media-libs/libvorbis )
	alsa? ( >=media-libs/alsa-lib-0.9.8 )
	arts? ( kde-base/arts )"

# When updating next, check boost to see if the newer versions fix compilation
DEPEND="${RDEPEND}
	x86? ( dev-lang/nasm )
	nls? ( sys-devel/gettext )
	>=media-libs/id3lib-3.8.0
	dev-libs/boost
	dev-db/metakit
	>=sys-devel/automake-1.7
	dev-lang/perl"

src_unpack() {
	unpack ${A}

	cd ${S}
	epatch ${FILESDIR}/${P}-cdplay.patch
	epatch ${FILESDIR}/${P}-configure.patch

	export WANT_AUTOMAKE=1.7
	export WANT_AUTOCONF=2.5

	#ebegin "Running aclocal (${WANT_AUTOMAKE})"
	#aclocal -I m4
	#eend $?
	touch aclocal.m4

	ebegin "Running automake (${WANT_AUTOMAKE})"
	automake
	eend $?

	ebegin "Running autoconf (${WANT_AUTOCONF})"
	autoconf
	eend $?
}

src_compile() {
	local myconf="--enable-cmdline"

	use x86 || myconf="${myconf} --disable-x86opts"

	myconf="${myconf} `use_enable debug`"
	myconf="${myconf} `use_enable esd`"
	myconf="${myconf} `use_enable arts`"
	myconf="${myconf} `use_enable alsa`"
	myconf="${myconf} `use_enable gnome corba`"
	myconf="${myconf} `use_enable ipv6`"

	if use amd64; then
		replace-flags -O? -O
		append-flags -frerun-cse-after-loop
	fi

	if use arts; then
		set-kdedir 3
		export ARTSCCONFIG="$KDEDIR/bin/artsc-config"
	fi

	econf ${myconf} || die
	make || die
}

src_install() {
	into /usr
	dobin base/zinf

	exeinto /usr/lib/zinf/plugins
	doexe plugins/*

	insinto /usr/share/zinf/themes
	doins themes/*

	dodoc AUTHORS ChangeLog NEWS README
}