summaryrefslogtreecommitdiff
blob: 6b7ef90da648333e33389a884485f25a48e62b72 (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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE='threads(+)'

VALA_MAX_API_VERSION=0.34

inherit cmake-utils gnome2-utils pax-utils python-any-r1 vala virtualx xdg-utils

DESCRIPTION="A lightweight web browser based on WebKitGTK+"
HOMEPAGE="http://www.midori-browser.org/"
SRC_URI="http://www.${PN}-browser.org/downloads/${PN}_${PV}_all_.tar.bz2"

KEYWORDS="~amd64 ~arm ~mips x86 ~x86-fbsd"

LICENSE="LGPL-2.1 MIT"
SLOT="0"
IUSE="doc granite xscreensaver +jit"

RDEPEND="
	>=app-crypt/gcr-3:=[gtk]
	>=dev-db/sqlite-3.6.19:3
	>=dev-libs/glib-2.32.3:2
	dev-libs/libxml2
	>=net-libs/libsoup-2.38:2.4
	>=x11-libs/libnotify-0.7
	>=x11-libs/gtk+-3.10.0:3
	>=net-libs/webkit-gtk-2.3.91:4[jit=]
	granite? ( >=dev-libs/granite-0.2 )
	xscreensaver? (
		x11-libs/libX11
		x11-libs/libXScrnSaver )
"
DEPEND="${RDEPEND}
	${PYTHON_DEPS}
	$(vala_depend)
	dev-util/intltool
	gnome-base/librsvg
	sys-devel/gettext
	doc? ( dev-util/gtk-doc )
"

pkg_setup() {
	python-any-r1_pkg_setup
}

src_prepare() {
	eapply "${FILESDIR}"/${P}-libsoup.patch #587448

	cmake-utils_src_prepare
	vala_src_prepare
	sed -i -e '/^install/s:COPYING:HACKING TODO TRANSLATE:' CMakeLists.txt || die
}

src_configure() {
	strip-linguas -i po

	local mycmakeargs=(
		-DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
		-DUSE_APIDOCS="$(usex doc)"
		-DUSE_GRANITE="$(usex granite)"
		-DUSE_ZEITGEIST=OFF
		-DVALA_EXECUTABLE="${VALAC}"
		-DUSE_GTK3=ON
		-DHALF_BRO_INCOM_WEBKIT2=ON
	)

	use xscreensaver || mycmakeargs+=( -DXSS=XSS-NOTFOUND )

	cmake-utils_src_configure
}

src_test() {
	virtx cmake-utils_src_test
}

pkg_postinst() {
	gnome2_icon_cache_update
	xdg_desktop_database_update
}

pkg_postrm() {
	gnome2_icon_cache_update
	xdg_desktop_database_update
}