summaryrefslogtreecommitdiff
blob: 0272ecdc93ca096a9e954dca1be9709a785755d5 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/faad2/faad2-2.0_rc1.ebuild,v 1.3 2003/10/02 16:11:29 darkspecter Exp $

inherit eutils libtool

HOMEPAGE="http://faac.sourceforge.net/"
SRC_URI="mirror://sourceforge/faac/${PN}_${PV}.tar.gz"
LICENSE="GPL-2"
DESCRIPTION="FAAD2 is the fastest ISO AAC audio decoder available. FAAD2 correctly decodes all MPEG-4 and MPEG-2 MAIN, LOW, LTP, LD and ER object type AAC files."
S="${WORKDIR}"
IUSE="xmms"
KEYWORDS="~x86 ~ppc ~sparc amd64"
DEPEND=">=media-libs/libsndfile-1.0.1
	>=libtool-1.4.1-r10
	sys-devel/automake
	sys-devel/autoconf
	xmms? ( >=media-sound/xmms-1.2.7
			media-libs/id3lib )"
SLOT="0"

src_unpack() {
	unpack ${A}
	cd ${S}
}

src_compile() {
	sh ./bootstrap
	elibtoolize
	if [ ! "`use xmms`" ]
	then
		rm -rf ${S}/plugins/xmms/*
	fi
	econf
	if [ "`use xmms`" ]
	then
		cd ${S}/plugins/xmms
		elibtoolize
		econf
		sed -e "s:CFLAGS =:CFLAGS = -I ../../../include:" \
		-e "s:libdir = \`xmms-config --input-plugin-dir\`:libdir = ${D}/\`xmms-config --input-plugin-dir\`:" \
		${S}/plugins/xmms/src/Makefile > Makefile.new
		mv Makefile.new ${S}/plugins/xmms/src/Makefile
	else
		sed -e "s:plugins::g" Makefile > Makefile.new
		mv Makefile.new Makefile
	fi
	cd ${S}/frontend
	cp Makefile Makefile.orig
	sed -e "s:CCLD = \$(CC):CCLD = \$(CXX):" Makefile.orig > Makefile
	cd ${S}

	emake || die
}

src_install() {
	cd ${S}/plugins/xmms/src/
	sed -e "s:@inst_prefix_dir@:-L${D}/usr/lib:" libaac.la > libaac.la.new
	mv libaac.la.new libaac.la
	cd ${S}
	einstall
	dodoc AUTHORS ChangeLog INSTALL NEWS README README.linux TODO
}