Add ebuild for media-video/handbrake-0.9.4.
[overlay.git] / media-video / handbrake / handbrake-0.9.4.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit gnome2-utils
8
9 MY_PN="HandBrake"
10 S="${WORKDIR}/${MY_PN}-${PV}"
11
12 DESCRIPTION="Open-source DVD to MPEG-4 converter"
13 HOMEPAGE="http://handbrake.fr/"
14 SRC_URI="http://handbrake.fr/rotation.php?file=${MY_PN}-${PV}.tar.bz2
15                 -> ${MY_PN}-${PV}.tar.bz2"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20
21 IUSE="css doc gtk"
22 RDEPEND="sys-libs/zlib
23         css? ( media-libs/libdvdcss )
24         gtk? (  >=x11-libs/gtk+-2.8
25                         dev-libs/dbus-glib
26                         sys-apps/hal
27                         net-libs/webkit-gtk
28                         x11-libs/libnotify
29                         media-libs/gstreamer
30                         media-libs/gst-plugins-base
31         )"
32 DEPEND="dev-lang/yasm
33         dev-lang/python
34         || ( net-misc/wget net-misc/curl ) 
35         ${RDEPEND}"
36
37 src_configure() {
38         # Python configure script doesn't accept all econf flags
39         ./configure --force --prefix=/usr \
40                 $(use_enable gtk) \
41                 || die "configure failed"
42 }
43
44 src_compile() {
45         emake -C build || die "failed compiling ${PN}"
46 }
47
48 src_install() {
49         emake -C build DESTDIR="${D}" install || die "failed installing ${PN}"
50
51         if use doc; then
52                 emake -C build doc
53                 dodoc AUTHORS CREDITS NEWS THANKS \
54                         build/doc/articles/txt/* || die "docs failed"
55         fi
56 }
57
58 pkg_preinst() {
59         gnome2_icon_savelist
60 }
61
62 pkg_postinst() {
63         gnome2_icon_cache_update
64 }
65
66 pkg_postrm() {
67         gnome2_icon_cache_update
68 }