summaryrefslogtreecommitdiff
blob: 5ee1099604480e601298251caca5d3db3003b07f (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/gst-plugins-bad/gst-plugins-bad-0.10.9-r1.ebuild,v 1.1 2008/12/26 12:48:38 ssuominen Exp $

EAPI=2

inherit flag-o-matic

DESCRIPTION="Basepack of plugins for gstreamer"
HOMEPAGE="http://gstreamer.sourceforge.net"
SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.bz2"

LICENSE="GPL-2 LGPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="aac amrwb encode bzip2 gsm debug dts dvb jack ladspa libmms musepack
musicbrainz mythtv neon nls sdl sndfile twolame vcd"

RDEPEND=">=dev-libs/glib-2.12:2
	>=media-libs/gstreamer-0.10.21-r2
	>=media-libs/gst-plugins-base-0.10.21-r1
	>=dev-libs/liboil-0.3.14
	jack? ( media-sound/jack-audio-connection-kit )
	amrwb? ( media-libs/amrwb )
	bzip2? ( app-arch/bzip2 )
	dts? ( media-libs/libdca )
	gsm? ( =media-sound/gsm-1.0.12-r1 )
	ladspa? ( >=media-libs/ladspa-sdk-1.12-r2 )
	libmms? ( media-libs/libmms )
	musepack? ( >=media-libs/libmpcdec-1.2 )
	twolame? ( media-sound/twolame )
	neon? ( >=net-misc/neon-0.26 )
	mythtv? ( media-libs/gmyth )
	aac? ( >=media-libs/faad2-2.6.1 )
	encode? ( aac? ( media-libs/faac ) )
	sndfile? ( media-libs/libsndfile )
	sdl? ( media-libs/libsdl )
	musicbrainz? ( =media-libs/musicbrainz-2* )"
DEPEND="${RDEPEND}
	nls? ( sys-devel/gettext )
	dev-util/pkgconfig
	vcd? ( virtual/os-headers )
	dvb? ( virtual/os-headers )
	!media-plugins/gst-plugins-amrwb
	!media-plugins/gst-plugins-dvb
	!media-plugins/gst-plugins-faac
	!media-plugins/gst-plugins-faad
	!media-plugins/gst-plugins-ladspa
	!media-plugins/gst-plugins-libmms
	!media-plugins/gst-plugins-musepack
	!media-plugins/gst-plugins-mythtv
	!media-plugins/gst-plugins-neon"

src_configure() {
	local encode="--disable-faac"

	if use encode; then
		use aac && encode="--enable-faac"
	fi

	econf \
		--disable-static \
		--disable-dependency-tracking \
		$(use_enable nls) \
		$(use_enable debug) \
		--disable-valgrind \
		--disable-examples \
		--disable-quicktime \
		$(use_enable vcd) \
		--disable-alsa \
		$(use_enable amrwb) \
		--disable-apexsink \
		$(use_enable bzip2 bz2) \
		--disable-cdaudio \
		--disable-celt \
		--disable-dc1394 \
		--disable-directfb \
		--disable-dirac \
		$(use_enable dts) \
		--disable-divx \
		--disable-dvdnav \
		$(use_enable gsm) \
		--disable-metadata \
		$(use_enable aac faad) \
		--disable-fbdev \
		$(use_enable jack) \
		$(use_enable ladspa) \
		--disable-jp2k \
		$(use_enable libmms) \
		--disable-mplex \
		--disable-mpeg2enc \
		$(use_enable musepack) \
		$(use_enable musicbrainz) \
		$(use_enable mythtv) \
		--disable-nas \
		$(use_enable neon) \
		--disable-ofa \
		--disable-timidity \
		--disable-wildmidi \
		$(use_enable twolame) \
		$(use_enable sdl) \
		$(use_enable sndfile) \
		--disable-soundtouch \
		--disable-spc \
		--disable-swfdec \
		--disable-theoradec \
		--disable-x264 \
		--disable-xvid \
		$(use_enable dvb) \
		--disable-oss4 \
		--disable-wininet \
		--disable-acm \
		--with-package-name="GStreamer ebuild for Gentoo" \
		--with-package-origin="http://packages.gentoo.org/package/media-libs/${PN}" \
		${encode}
}

src_compile() {
	# GStreamer doesn't handle optimization so well
	strip-flags
	replace-flags -O3 -O2
	filter-flags -fprefetch-loop-arrays

	emake || die "emake failed."
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed."
	dodoc AUTHORS ChangeLog NEWS README RELEASE

	# Drop unnecessary libtool files
	find "${D}"/usr -name '*.la' -delete
}