blob: 9c341997a9e2ee06e892c6e87e4f14ae6b612aee (
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
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="1"
inherit eutils
DESCRIPTION="Open-source DVD to MPEG-4 converter."
HOMEPAGE="http://handbrake.fr/"
LICENSE="GPL-2"
SLOT="0"
#real link is http://handbrake.fr/rotation.php?file=HandBrake-0.9.3.tar.gz
#However, wget does not treat this correctly, and neither does the unpack process.
SRC_URI="http://handbrake.fr/HandBrake-${PV}.tar.gz"
KEYWORDS="x86 amd64"
RESTRICT="fetch"
#qt4 UI is broke, may just need dependancies. This USE flag does nothing.
#Maybe you have better luck ;
IUSE="-gtk -qt4"
RDEPEND="
gtk? ( >=x11-libs/gtk+-2.8
>=gnome-extra/gtkhtml-3.14
)"
DEPEND="sys-libs/zlib
dev-util/ftjam
$RDEPEND"
S="${WORKDIR}/HandBrake-${PV}"
GTK="${S}/gtk/src"
pkg_nofetch() {
einfo "Just download the source code from"
einfo "${HOMEPAGE}"
einfo "and save it in ${DISTDIR} "
}
src_unpack() {
unpack "${A}"
}
src_compile() {
cd "${S}"
#for local testing purposes; to prevent redownload of contribs.
# cp -v /tmp/handbrake/HandBrake-0.9.3/contrib/*.tar.gz ./contrib
einfo "Building HandBrakeCLI."
make || die "make HandBrakeCLI failed"
if use gtk ; then
cd ${S}/gtk
einfo "Building ghb."
./autogen.sh || die "gtk autogen.sh failed"
make || die "make ghb failed"
fi
# if use qt4 ; then
# cd ${S}/qt4
# einfo "Building qtHB."
# qmake || die "qmake failed"
# make || die "make qtHB failed"
# fi
}
src_install() {
into /usr
dobin HandBrakeCLI
dodoc AUTHORS BUILD CREDITS NEWS THANKS TRANSLATIONS
if use gtk ; then
dobin ${GTK}/ghb
insinto /usr/share/applications/
newins ${GTK}/ghb.desktop ghb.desktop
for res in 64 128; do
insinto /usr/share/icons/hicolor/${res}x${res}/apps/
newins ${GTK}/hb-icon${res}.png handbrake.png
done
fi
# if use qt4 ; then
# dobin ./qt4/qtHB
# fi
}
pkg_postinst() {
einfo "HandBrakeCLI had been installed."
if use gtk; then
einfo "So has ghb, the Handbrake GUI."
einfo "ghb.desktop has been installed to"
einfo "/usr/share/applications/"
fi
}
|