summaryrefslogtreecommitdiff
blob: b34a5aa5906987e90aef768646a159bc0623ef38 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra/cinelerra-1.2.0.ebuild,v 1.8 2004/07/14 21:32:13 agriffis Exp $

inherit gcc eutils flag-o-matic
export WANT_GCC_3="yes"

#export CFLAGS=${CFLAGS/-O?/-O2}

filter-flags "-fPIC -fforce-addr"

RESTRICT="nostrip"

DESCRIPTION="Cinelerra - Professional Video Editor"
HOMEPAGE="http://heroinewarrior.com/cinelerra.php3"
SRC_URI="mirror://sourceforge/heroines/${P}-src.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 -ppc ~amd64"
IUSE=""

DEPEND="virtual/x11
	virtual/libc
	=sys-devel/gcc-3*
	dev-lang/nasm"
#	>=media-libs/a52dec-0.7.3"

src_unpack() {
	unpack ${A}
#	epatch ${FILESDIR}/gcc-3.3.1-collate.patch
#	epatch ${FILESDIR}/pthread_t_not_int.patch
	epatch ${FILESDIR}/${P}-gcc34.patch
	touch ${S}/hvirtual_config.h
}

src_compile() {
	export CFLAGS=${CFLAGS}
	cd ${S}/freetype-2.1.4/builds/unix
	econf ||die
	cd ${S}/quicktime/ffmpeg-0.4.8
	econf ||die

	echo "#undef HAVE_V4L2" >> ${S}/hvirtual_config.h

	cd ${S}
	make || die "make failed"
}

src_install() {
	local myarch
	if use x86; then
		myarch="${CHOST/-*/}" #should solve the i586/i686 problem
	fi
	if use amd64; then
		myarch="x86_64" #Fixes BUG #51740
	fi
	if use ppc; then
		myarch="ppc"
	fi
	cd ${S}/${PN}/${myarch}
	dobin ${PN} || die "cinelerra not built"

	cd ${S}/plugins
	insinto /usr/lib/${PN}
	doins ${myarch}/*.plugin
	insinto /usr/lib/${PN}/fonts
	doins titler/fonts/*

	cd ${S}/libmpeg3/${myarch}
	dobin mpeg3dump mpeg3cat mpeg3toc

#	cd ${S}/mix/i686
#	dobin mix2000

#	cd ${S}/xmovie/i686
#	dobin xmovie

	cd ${S}/mplexhi/${myarch}
	dobin mplexhi

	cd ${S}/mplexlo/${myarch}
	dobin mplexlo

	cd ${S}
#	dodoc CVS COPYING
	dohtml -a png,html,texi,sdw -r doc/*
}