summaryrefslogtreecommitdiff
blob: b81f0b49287bea1b74d4e5e729e83afb4aa682de (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/ogmrip/ogmrip-0.9.0-r1.ebuild,v 1.2 2006/06/02 15:14:24 sbriesen Exp $

inherit autotools eutils gnome2

DESCRIPTION="Application and libraries for encoding DVDs into AVI/OGM files"
HOMEPAGE="http://ogmrip.sourceforge.net/"
SRC_URI="mirror://sourceforge/ogmrip/${P}.tar.gz"
LICENSE="LGPL-2.1"

SLOT="0"
IUSE="debug gnome hal matroska subp"
KEYWORDS="~amd64 ~ppc ~x86"

RDEPEND=">=dev-libs/glib-2.6
	>=media-libs/libdvdread-0.9.4
	>=media-sound/ogmtools-1.4
	>=media-sound/vorbis-tools-1.0
	>=media-sound/lame-3.96
	>=media-video/mplayer-1.0_pre4
	matroska? ( >=media-video/mkvtoolnix-0.9 )
	gnome? ( >=x11-libs/gtk+-2.6
		>=gnome-base/gconf-2.6
		>=gnome-base/libgnomeui-2.6
		>=gnome-base/libglade-2.5 )
	subp? ( >=app-text/gocr-0.39
		>=app-text/enchant-1.1 )
	hal? ( >=sys-apps/hal-0.4.2 )"

DEPEND="${RDEPEND}
	>=dev-util/intltool-0.29
	>=dev-util/pkgconfig-0.12.0"

G2CONF="${G2CONF} $(use_enable gnome gnome-support) $(use_enable debug maintainer-mode) $(use_enable subp enchant-support) $(use_enable hal hal-support)"

DOCS="AUTHORS ChangeLog COPYING README INSTALL NEWS TODO"

pkg_setup() {
	if ! which mencoder > /dev/null 2>&1; then
		eerror "Unable to find mencoder in the PATH. You need mencoder to use OGMRip."
		eerror "Please, add encode to your USE flags and emerge mplayer again."
		die "Unable to find mencoder in the PATH. You need mencoder to use OGMRip."
	fi
	if ! mencoder -ovc help 2> /dev/null | grep -q "^ *xvid *- .*$"; then
		echo
		eerror "Mplayer is not build with XviD support. OGMRip requires XviD support in mplayer."
		eerror "Please, add xvid to your USE flags and emerge mplayer again."
		die "Mplayer is not build with XviD support. OGMRip requires XviD support in mplayer."
	fi
}
src_unpack() {
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${P}-lang.patch
	epatch ${FILESDIR}/${P}-gcc4.patch
	epatch ${FILESDIR}/${P}-mplayercvs.patch
	epatch ${FILESDIR}/${P}-types.patch
	eautoreconf
}