summaryrefslogtreecommitdiff
blob: 919bb24f658130cf76aa4f9ada10ff694178ae06 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-www/mplayerplug-in/mplayerplug-in-2.66.ebuild,v 1.7 2005/04/16 20:11:24 geoman Exp $

inherit nsplugins toolchain-funcs

S=${WORKDIR}/${PN}
GECKO_SDK="gecko-sdk-i686-pc-linux-gnu-1.6.tar.gz"

DESCRIPTION="mplayer plug-in for Mozilla"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
	x86? ( ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.6/${GECKO_SDK} ) "
HOMEPAGE="http://mplayerplug-in.sourceforge.net/"

KEYWORDS="x86 ~amd64 ~ia64 ~ppc ~sparc ~alpha ~hppa"
SLOT="0"
LICENSE="GPL-2"
IUSE="gtk2"

DEPEND=">=media-video/mplayer-0.92
	gtk2? (
		>=x11-libs/gtk+-2.2.0
		dev-libs/atk
		>=dev-libs/glib-2.2.0
		>=x11-libs/pango-1.2.1 )
	!gtk2? (
		=x11-libs/gtk+-1.2*
		=dev-libs/glib-1.2* )"

src_compile() {
	local myconf
	use x86 && myconf="${myconf} --with-gecko-sdk=${WORKDIR}/gecko-sdk"
	if use gtk2; then
		einfo Configuring to build using gtk2
		myconf="${myconf} --enable-gtk2"
	else
		einfo Configuring to build using gtk1
		myconf="${myconf} --disable-gtk2 --enable-gtk1"
	fi
	econf ${myconf} || die
	emake || die
}

src_install() {
	exeinto /opt/netscape/plugins
	doexe mplayerplug-in.so
	inst_plugin /opt/netscape/plugins/mplayerplug-in.so

	insinto /etc
	doins mplayerplug-in.conf

	dodoc ChangeLog INSTALL LICENSE README
}