summaryrefslogtreecommitdiff
blob: 1ba75dadd3ae028ab099333c17af0961b2440a20 (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="3"

inherit multilib unpacker

MY_PV=${PV/_p/-}
MY_PN=${PN%%-bin-debian}

DESCRIPTION="Chromium build from Debian unstable"
HOMEPAGE="http://packages.debian.org/sid/chromium"
SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN:0:8}-browser/${PN:0:8}_${MY_PV}_amd64.deb"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

UDEV_V=198

DEPEND="app-arch/dpkg"
RDEPEND="
	app-accessibility/speech-dispatcher
	dev-libs/atk
	dev-libs/expat
	dev-libs/glib:2
	dev-libs/libevent
	dev-libs/libgcrypt
	dev-libs/libxml2
	dev-libs/libxslt
	dev-libs/nspr
	dev-libs/nss
	gnome-base/gconf
	gnome-base/libgnome-keyring
	media-libs/alsa-lib
	media-libs/flac
	media-libs/fontconfig
	media-libs/freetype
	media-libs/libvpx
	media-libs/speex
	>=media-sound/pulseaudio-2.0
	net-print/cups
	sys-apps/dbus
	>=sys-apps/systemd-${UDEV_V}
	>=sys-devel/gcc-4.6[cxx]
	>=sys-fs/udev-${UDEV_V}
	virtual/jpeg
	x11-libs/cairo
	x11-libs/gdk-pixbuf
	x11-libs/gtk+
	x11-libs/libX11
	x11-libs/libXScrnSaver
	x11-libs/libXcomposite
	x11-libs/libXext
	x11-libs/libXfixes
	x11-libs/libXrandr
	x11-libs/libXrender
	x11-libs/pango
	"

S=${WORKDIR}

QA_PREBUILT="usr/lib*/${MY_PN}/*"

src_install() {
	mv "${S}"/{usr,etc} "${D}"/ || die

	local libdir=$(get_libdir)
	[[ "${libdir}" != lib ]] && {
		mv "${D}"/usr/{lib,"${libdir}"} || die
	}

	ln -s libudev.so "${D}"/usr/${libdir}/libudev.so.0 || die

	echo sid > "${D}"/etc/debian_version || die

	# Link to Flash (not in RDEPEND)
	local flash_plugin_dir=/usr/${libdir}/firefox/plugins
	dodir "${flash_plugin_dir}"
	ln -s ../../nsbrowser/plugins/libflashplayer.so "${D}"/${flash_plugin_dir}/libflashplayer.so || die

	# Otherwise:
	# [14345:14345:0708/125539:FATAL:zygote_host_impl_linux.cc(140)]
	# The SUID sandbox helper binary was found, but is not configured correctly.
	# Rather than run without sandboxing I'm aborting now. You need to make sure
	# that /usr/lib/chromium/chromium-sandbox is owned by root and has mode 4755.
	# Aborted
	chmod 4755 "${D}"/usr/${libdir}/${MY_PN}/${MY_PN}-sandbox || die
}