summaryrefslogtreecommitdiff
blob: c867a6f64500b34e706e0903fbf927f6f947310f (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
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/transcode/transcode-0.6.0.ebuild,v 1.6 2002/10/04 05:57:13 vapier Exp $

inherit libtool

MY_P=${P/_/}
S=${WORKDIR}/${MY_P}
DESCRIPTION="video stream processing tool"
SRC_URI="http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/${MY_P}.tgz"
HOMEPAGE="http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode"

# Note: transcode can use pretty much any media-related package ever written as
# a plugin. An exhaustive dep list would make me add about 20-30 packages to 
# portage. perhaps another time :-)

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86"

DEPEND=">=media-libs/a52dec-0.7.3
	>=media-libs/libdv-0.9.5
	x86? ( dev-lang/nasm )
	X? ( virtual/x11 )
	avi? ( >=media-video/avifile-0.7.4 )
	dvd? ( media-libs/libdvdread )
	mpeg? ( media-libs/libmpeg3 )
	encode? ( >=media-sound/lame-3.89 )
	sdl? ( media-libs/libsdl )
	quicktime? ( media-libs/quicktime4linux )
	>=media-video/avifile-0.7.4
	media-libs/libdvdread"
# Dont want to build without these currently
#	avi? ( >=media-video/avifile-0.7.4 )
#	dvd? ( media-libs/libdvdread )"

src_unpack() {
	unpack ${A}

	[ -z "${CC}" ] && CC="gcc"
	if [ "`${CC} -dumpversion | cut -f1 -d.`" = "3" ];
	then
		cd ${S}
		patch -p1 < ${FILESDIR}/transcode-0.6.0_pre5.diff || die
	fi
}

src_compile() {

	# fix invalid paths in .la files of plugins
	elibtoolize

	local myconf=""

	use mmx \
		&& myconf="${myconf} --enable-mmx"
	use mmx || ( use 3dnow || use sse ) \
		|| myconf="${myconf} --disable-mmx"
	# Dont disable mmx if 3dnow or sse are requested.

	use sse \
		&& myconf="${myconf} --enable-sse" \
		|| myconf="${myconf} --disable-sse"

#	use avi \
#		&& myconf="${myconf} --with-avifile-mods --enable-avifile6" \
#		|| myconf="${myconf} --without-avifile-mods --disable-avifile6"
#
#	use dvd \
#		&& myconf="${myconf} --with-dvdread" \
#		|| myconf="${myconf} --without-dvdread"
#
# Dont currently want to build without these
	myconf="${myconf} --with-dvdread --with-avifile-mods --enable-avifile6"   

	use encode \
		&& myconf="${myconf} --with-lame" \
		|| myconf="${myconf} --without-lame"
	
	use mpeg \
		&& myconf="${myconf} --with-libmpeg3" \
		|| myconf="${myconf} --without-libmpeg3"

	use quicktime \
		|| myconf="${myconf} --without-qt --without-openqt"

	use X \
		&& myconf="${myconf} --enable-x" \
		|| myconf="${myconf} --disable-x"

	# Use the MPlayer libpostproc if present
	[ -f ${ROOT}/usr/lib/libpostproc.a ] && \
	[ -f ${ROOT}/usr/include/postprocess.h ] && \
		myconf="${myconf} --with-libpostproc-builddir=${ROOT}/usr/lib"
	
	econf ${myconf} || die

	# Do not use emake !!
	make all || die
}

src_install () {

	make \
		DESTDIR=${D} \
		install || die
	
	dodoc AUTHORS COPYING ChangeLog README TODO
}