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

EAPI=5
inherit qt4-build-multilib

DESCRIPTION="The WebKit module for the Qt toolkit"

if [[ ${QT4_BUILD_TYPE} == release ]]; then
	KEYWORDS="amd64 arm ia64 ~mips ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd"
fi

IUSE="icu +jit"

# libxml2[!icu?] is needed for bugs 407315 and 411091
DEPEND="
	>=dev-db/sqlite-3.8.3:3[${MULTILIB_USEDEP}]
	~dev-qt/qtcore-${PV}[aqua=,debug=,ssl,${MULTILIB_USEDEP}]
	~dev-qt/qtgui-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
	~dev-qt/qtxmlpatterns-${PV}[aqua=,debug=,${MULTILIB_USEDEP}]
	>=x11-libs/libX11-1.5.0-r1[${MULTILIB_USEDEP}]
	>=x11-libs/libXrender-0.9.7-r1[${MULTILIB_USEDEP}]
	icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
"
RDEPEND="${DEPEND}"

PATCHES=(
	"${FILESDIR}/4.8.2-javascriptcore-x32.patch"
)

QT4_TARGET_DIRECTORIES="
	src/3rdparty/webkit/Source/JavaScriptCore
	src/3rdparty/webkit/Source/WebCore
	src/3rdparty/webkit/Source/WebKit/qt"

QCONFIG_ADD="webkit"
QCONFIG_DEFINE="QT_WEBKIT"

src_prepare() {
	# Remove -Werror from CXXFLAGS
	sed -i -e '/QMAKE_CXXFLAGS\s*+=/ s:-Werror::g' \
		src/3rdparty/webkit/Source/WebKit.pri || die

	# Fix version number in generated pkgconfig file (bug 406443)
	sed -i -e 's/^isEmpty(QT_BUILD_TREE)://' \
		src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro || die

	# Prevent automagic dependency on qt-mobility (bug 547350)
	sed -i -e 's/contains(MOBILITY_CONFIG,\s*\w\+)/false/' \
		src/3rdparty/webkit/Source/WebCore/features.pri || die

	if use icu; then
		sed -i -e '/CONFIG\s*+=\s*text_breaking_with_icu/ s:^#\s*::' \
			src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri || die
	fi

	qt4-build-multilib_src_prepare
}

multilib_src_configure() {
	local myconf=(
		-webkit
		-system-sqlite
		$(qt_use icu)
		$(qt_use jit javascript-jit)
		-DENABLE_VIDEO=0
	)
	qt4_multilib_src_configure
}