summaryrefslogtreecommitdiff
blob: 5dd0249e16007798e0158b1b360bb53bad5e0c80 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/dvbcut/dvbcut-0.5.4-r1.ebuild,v 1.2 2007/11/23 22:57:07 aballier Exp $

inherit qt3 eutils

IUSE=""

MY_P="${P/-/_}"

DESCRIPTION="frame-accurate editing of MPEG-2 video with MPEG and AC3 audio"
HOMEPAGE="http://dvbcut.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"

LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="$(qt_min_version 3)
	media-libs/libao
	>=media-video/ffmpeg-0.4.9_p20070330"

DEPEND="${RDEPEND}
	dev-util/scons"

pkg_setup() {
	 if ! built_with_use media-video/ffmpeg a52; then
	 	eerror "This package requires media-video/ffmpeg compiled with A/52 (a.k.a. AC-3) support."
		eerror "Please reemerge media-video/ffmpeg with USE=\"a52\"."
		die "Please reemerge media-video/ffmpeg with USE=\"a52\"."
	fi
}

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/${PN}-0.5.3-ffmpeg-compat.patch"
	epatch "${FILESDIR}/${P}-gcc42.patch"
	epatch "${FILESDIR}/${P}-ffmpeg-compat2.patch"
	epatch "${FILESDIR}/${P}-ffmpeg-compat3.patch"
	epatch "${FILESDIR}/${P}-avformat-api-changes.patch"
}

src_compile() {
	emake FFMPEG=/usr || die "build failed"
}

src_install() {
	emake FFMPEG=/usr DESTDIR="${D}" PREFIX="/usr" MANPATH="/usr/share/man" install \
		|| die "install failed"
	make_desktop_entry dvbcut DVBcut \
		|| die "Couldn't make dvbcut desktop entry"
	dodoc CREDITS ChangeLog README README.ffmpeg README.icons
}