summaryrefslogtreecommitdiff
blob: 48c2387379031cf77ba2925d47942d8a8defac0a (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/yammi/yammi-0.8.2.ebuild,v 1.14 2004/06/08 01:19:38 agriffis Exp $

inherit flag-o-matic eutils

DESCRIPTION="MP3/Ogg/Wav-Manager and Jukebox 4 XMMS/Noatun"
HOMEPAGE="http://yammi.sourceforge.net/"
SRC_URI="mirror://sourceforge/yammi/${P}fixed.tar.gz"
RESTRICT="nomirror"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ~amd64"
IUSE="cdr xmms oggvorbis kde"

DEPEND=">=x11-libs/qt-3.1.0-r1
	>=media-libs/id3lib-3.8.2
	>=media-sound/cdparanoia-3.9.8
	>=media-sound/lame-3.93.1
	virtual/mpg123
	>=media-sound/sox-12.17.3-r1
	cdr? ( >=app-cdr/cdlabelgen-2.4.0 >=app-cdr/mp3burn-0.1 )
	xmms? ( >=media-sound/xmms-1.2.7-r18 )
	oggvorbis? ( >=media-libs/libvorbis-1.0-r1 >=media-sound/vorbis-tools-1.0-r1 )
	kde? ( >=kde-base/kdebase-3.0.4 )"

src_unpack() {
	unpack ${P}fixed.tar.gz
	epatch ${FILESDIR}/${P}-qt.patch
}

src_compile() {
	addpredict ${QTDIR}/etc/settings/

	# need to filter -fomit-frame-pointer for pentium II
	is-flag "-march=pentium2" && filter-flags "-fomit-frame-pointer"

	#needed to let configure detect the id3libs correct
	export LDFLAGS="-lstdc++"

	local myconf
	use xmms || myconf="--disable-xmms"
	use kde || myconf="--disable-KDE --disable-noatun ${myconf}"

	if ! use xmms && ! use kde
	then
		myconf="--disable-ogglibs ${myconf}"
	else
		use oggvorbis || myconf="--disable-oogvorbis ${myconf}"
	fi

	econf ${myconf} || die "./configure failed"

	emake || die "emake failed"
}

src_install() {
	make DESTDIR=$D install || die
	dodoc AUTHORS CHANGELOG CREDITS INSTALL README TODO
}

pkg_postinst() {
	if ! use kde && ! use xmms
	then
		ewarn "Yammi is compiled without support for xmms and noatun."
		ewarn "Now the functionality of Yammi is very limited."
		ewarn "It is highly recommended to recompile Yammi."
		ewarn
		ewarn "To get xmms support:"
		ewarn "$ export USE=\"xmms\""
		ewarn
		ewarn "To get noatun support:"
		ewarn "$ export USE=\"kde\""
		ewarn
		ewarn "Or to get support for both:"
		ewarn "$ export USE=\"xmms kde\""
	fi
}