PageRenderTime 62ms CodeModel.GetById 58ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/media-video/handbrake/handbrake-0.9.3.ebuild

http://github.com/stsquad/Gentoo-Overlay
Unknown | 99 lines | 78 code | 21 blank | 0 comment | 0 complexity | f2ac7c813015062a1ec530a036558e6e MD5 | raw file
 1# Copyright 1999-2007 Gentoo Foundation
 2# Distributed under the terms of the GNU General Public License v2
 3# $Header: $
 4
 5EAPI="1"
 6inherit eutils
 7
 8DESCRIPTION="Open-source DVD to MPEG-4 converter."
 9HOMEPAGE="http://handbrake.fr/"
10LICENSE="GPL-2"
11SLOT="0"
12
13#real link is http://handbrake.fr/rotation.php?file=HandBrake-0.9.3.tar.gz
14#However, wget does not treat this correctly, and neither does the unpack process.
15SRC_URI="http://handbrake.fr/HandBrake-${PV}.tar.gz"
16
17KEYWORDS="x86 amd64"
18RESTRICT="fetch"
19
20#qt4 UI is broke, may just need dependancies. This USE flag does nothing.
21#Maybe you have better luck ;
22IUSE="-gtk -qt4"
23RDEPEND="
24	gtk? (	>=x11-libs/gtk+-2.8
25		>=gnome-extra/gtkhtml-3.14
26	)"
27DEPEND="sys-libs/zlib
28	dev-util/ftjam
29	$RDEPEND"
30
31
32S="${WORKDIR}/HandBrake-${PV}"
33GTK="${S}/gtk/src"
34
35pkg_nofetch() {
36	einfo "Just download the source code from"
37	einfo "${HOMEPAGE}"
38	einfo "and save it in ${DISTDIR} "
39}
40
41src_unpack() {
42   unpack "${A}"
43}
44
45src_compile() {
46
47	cd "${S}"
48
49#for local testing purposes; to prevent redownload of contribs.
50#	cp -v /tmp/handbrake/HandBrake-0.9.3/contrib/*.tar.gz ./contrib	
51	
52	einfo "Building HandBrakeCLI."
53	make || die "make HandBrakeCLI failed"
54
55	if use gtk ; then
56		cd ${S}/gtk
57		einfo "Building ghb."
58		./autogen.sh || die "gtk autogen.sh failed"
59		make || die "make ghb failed"
60	fi
61	
62#	if use qt4 ; then
63#		cd ${S}/qt4
64#		einfo "Building qtHB."
65#		qmake || die "qmake failed"
66#		make || die "make qtHB failed"
67#	fi
68}
69
70src_install() {
71	into /usr
72	dobin HandBrakeCLI
73	dodoc AUTHORS BUILD CREDITS NEWS THANKS TRANSLATIONS
74	if use gtk ; then
75		dobin ${GTK}/ghb
76		
77		insinto /usr/share/applications/
78		newins ${GTK}/ghb.desktop ghb.desktop
79		for res in 64 128; do
80        	        insinto /usr/share/icons/hicolor/${res}x${res}/apps/
81                	newins ${GTK}/hb-icon${res}.png handbrake.png
82        	done
83	fi
84	
85#	if use qt4 ; then
86#		dobin ./qt4/qtHB
87#	fi
88	
89}
90
91pkg_postinst() {
92	einfo "HandBrakeCLI had been installed."
93        if use gtk; then
94                einfo "So has ghb, the Handbrake GUI."
95                einfo "ghb.desktop has been installed to"
96                einfo "/usr/share/applications/"
97        fi
98}
99