summaryrefslogtreecommitdiff
blob: fe55c4f6b5fb3e58c3cb7b0da326d553cbfbc954 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-tv/nvrec/nvrec-0.1_pre20030316.ebuild,v 1.3 2003/08/21 06:04:08 phosphan Exp $

inherit eutils

MY_VER="20030316"
DESCRIPTION="High quality video capture for Linux"
HOMEPAGE="http://${PN}.sourceforge.net/"
SRC_URI="http://${PN}.sourceforge.net/downloads/${PN}-${MY_VER}.tar.gz
	mirror://sourceforge/ffmpeg/ffmpeg-0.4.6.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"
IUSE="avi quicktime sdl oggvorbis"

DEPEND="dev-lang/perl
	>=sys-devel/automake-1.6.1
	>=sys-devel/autoconf-2.53
	avi? ( media-video/avifile )
	quicktime? ( virtual/quicktime )
	sdl? ( media-libs/libsdl )
	sdl? ( media-sound/mad )
	=media-libs/divx4linux-20020418*
	!media-libs/divx4linux-2003*
	media-sound/lame
	media-video/ffmpeg"
RDEPEND="avi? ( media-video/avifile )
	quicktime? ( virtual/quicktime )
	sdl? ( media-libs/libsdl )
	sdl? ( media-sound/mad )
	=media-libs/divx4linux-20020418*
	!media-libs/divx4linux-2003*
	media-sound/lame"

S=${WORKDIR}/${PN}-${MY_VER}

src_unpack() {
	if nm /usr/lib/libquicktime.so | grep -q png; then
		die "It looks like you have installed quicktime4linux after installing libquicktime. NVrec can't be installed, see bug #20705 for why."
	fi

	local ffversion
	ffversion="ffmpeg-0.4.6-r1"
	ffP="ffmpeg-0.4.6"
	export ffversion
	bash ${FILESDIR}/get_ffmpeg_functions.sh > ${T}/funcs.sh
	source ${T}/funcs.sh
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${MY_VER}.patch
	ffS=${WORKDIR}/${ffP}	
	cd ${ffS}
	epatch ${PORTDIR}/media-video/ffmpeg/files/${ffP}-Makefiles.diff
	cd ${WORKDIR}
	ln -s ${ffP} ffmpeg
}

src_compile() {
	cd ${ffS}
	ffmpeg_src_compile
	cd ${S}	
	./bootstrap
	local myconf
	myconf="$(use_with avi avifile)"
	myconf="${myconf} $(use_with quicktime)"
	myconf="${myconf} $(use_with sdl sdl) $(use_with sdl mad)"
	econf || die "configure failed"
	# ugly ugly ugly... but no configure option there 
	use oggvorbis && ( sed < Makefile > Makefile.new -e \
		's/\(^.*LDADD = .*\)/\1 -lvorbis -lvorbisenc/' && \
		mv Makefile.new Makefile)
	emake || die "make failed"
}

src_install() {
	einstall || die "install failed"
	insinto /etc
	doins etc/nvrec.conf
	dodoc AUTHORS CREDITS ChangeLog FAQ KNOWN_BUGS README README.FIRST STATUS
}