Lines 2-47
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
3 |
|
4 |
EAPI=6 |
4 |
EAPI=6 |
|
|
5 |
|
6 |
CMAKE_MAKEFILE_GENERATOR="ninja" |
5 |
PYTHON_COMPAT=( python2_7 ) |
7 |
PYTHON_COMPAT=( python2_7 ) |
6 |
QT_MIN_VER="5.9.1:5" |
8 |
QT_MIN_VER="5.6.2:5" |
7 |
inherit python-any-r1 qt5-build |
9 |
USE_RUBY="ruby22 ruby23 ruby24" |
|
|
10 |
inherit check-reqs cmake-utils flag-o-matic python-any-r1 qmake-utils ruby-single toolchain-funcs |
11 |
|
12 |
DESCRIPTION="Open source web browser engine" |
13 |
HOMEPAGE="https://www.qt.io/" |
14 |
SRC_URI="https://github.com/annulen/webkit/releases/download/${P/_/-}/${P/_/-}.tar.xz" |
8 |
|
15 |
|
9 |
DESCRIPTION="WebKit rendering library for the Qt5 framework (deprecated)" |
16 |
SLOT=5 |
10 |
|
17 |
|
11 |
if [[ ${QT5_BUILD_TYPE} == release ]]; then |
18 |
LICENSE="LGPL-2+ BSD" |
12 |
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
19 |
KEYWORDS="~amd64 ~x86" |
13 |
fi |
|
|
14 |
|
20 |
|
15 |
# TODO: qttestlib |
21 |
IUSE="+geolocation gles2 +gstreamer +hyphen +jit multimedia nsplugin opengl orientation +printsupport qml webp X" |
16 |
|
22 |
|
17 |
IUSE="geolocation gstreamer gles2 +jit multimedia opengl orientation printsupport qml test webchannel webp" |
23 |
REQUIRED_USE=" |
18 |
REQUIRED_USE="?? ( gstreamer multimedia )" |
24 |
nsplugin? ( X ) |
|
|
25 |
qml? ( opengl ) |
26 |
?? ( gstreamer multimedia ) |
27 |
" |
19 |
|
28 |
|
|
|
29 |
# Dependencies found at Source/cmake/OptionsQt.cmake |
20 |
RDEPEND=" |
30 |
RDEPEND=" |
21 |
dev-db/sqlite:3 |
31 |
dev-db/sqlite:3 |
22 |
dev-libs/icu:= |
32 |
dev-libs/icu:= |
23 |
>=dev-libs/leveldb-1.18-r1 |
|
|
24 |
dev-libs/libxml2:2 |
33 |
dev-libs/libxml2:2 |
25 |
dev-libs/libxslt |
34 |
dev-libs/libxslt |
26 |
>=dev-qt/qtcore-${QT_MIN_VER}[icu] |
35 |
>=dev-qt/qtcore-${QT_MIN_VER}=[icu] |
27 |
>=dev-qt/qtgui-${QT_MIN_VER} |
36 |
>=dev-qt/qtgui-${QT_MIN_VER} |
28 |
>=dev-qt/qtnetwork-${QT_MIN_VER} |
37 |
>=dev-qt/qtnetwork-${QT_MIN_VER} |
29 |
>=dev-qt/qtsql-${QT_MIN_VER} |
|
|
30 |
>=dev-qt/qtwidgets-${QT_MIN_VER} |
38 |
>=dev-qt/qtwidgets-${QT_MIN_VER} |
31 |
media-libs/fontconfig:1.0 |
|
|
32 |
media-libs/libpng:0= |
39 |
media-libs/libpng:0= |
33 |
>=sys-libs/zlib-1.2.5 |
|
|
34 |
virtual/jpeg:0 |
40 |
virtual/jpeg:0 |
35 |
virtual/opengl |
|
|
36 |
x11-libs/libX11 |
37 |
x11-libs/libXcomposite |
38 |
x11-libs/libXrender |
39 |
geolocation? ( >=dev-qt/qtpositioning-${QT_MIN_VER} ) |
41 |
geolocation? ( >=dev-qt/qtpositioning-${QT_MIN_VER} ) |
40 |
gstreamer? ( |
42 |
gstreamer? ( |
41 |
dev-libs/glib:2 |
43 |
dev-libs/glib:2 |
42 |
media-libs/gstreamer:1.0 |
44 |
media-libs/gstreamer:1.0 |
43 |
media-libs/gst-plugins-base:1.0 |
45 |
media-libs/gst-plugins-base:1.0 |
|
|
46 |
media-libs/gst-plugins-bad:1.0 |
44 |
) |
47 |
) |
|
|
48 |
hyphen? ( dev-libs/hyphen ) |
45 |
multimedia? ( >=dev-qt/qtmultimedia-${QT_MIN_VER}[widgets] ) |
49 |
multimedia? ( >=dev-qt/qtmultimedia-${QT_MIN_VER}[widgets] ) |
46 |
opengl? ( |
50 |
opengl? ( |
47 |
>=dev-qt/qtgui-${QT_MIN_VER}[gles2=] |
51 |
>=dev-qt/qtgui-${QT_MIN_VER}[gles2=] |
Lines 49-119
Link Here
|
49 |
) |
53 |
) |
50 |
orientation? ( >=dev-qt/qtsensors-${QT_MIN_VER} ) |
54 |
orientation? ( >=dev-qt/qtsensors-${QT_MIN_VER} ) |
51 |
printsupport? ( >=dev-qt/qtprintsupport-${QT_MIN_VER} ) |
55 |
printsupport? ( >=dev-qt/qtprintsupport-${QT_MIN_VER} ) |
52 |
qml? ( >=dev-qt/qtdeclarative-${QT_MIN_VER} ) |
56 |
qml? ( |
53 |
webchannel? ( >=dev-qt/qtwebchannel-${QT_MIN_VER} ) |
57 |
>=dev-qt/qtdeclarative-${QT_MIN_VER} |
|
|
58 |
>=dev-qt/qtwebchannel-${QT_MIN_VER}[qml] |
59 |
) |
54 |
webp? ( media-libs/libwebp:0= ) |
60 |
webp? ( media-libs/libwebp:0= ) |
|
|
61 |
X? ( |
62 |
x11-libs/libX11 |
63 |
x11-libs/libXcomposite |
64 |
x11-libs/libXrender |
65 |
) |
55 |
" |
66 |
" |
|
|
67 |
|
68 |
# Need real bison, not yacc |
56 |
DEPEND="${RDEPEND} |
69 |
DEPEND="${RDEPEND} |
57 |
${PYTHON_DEPS} |
70 |
${PYTHON_DEPS} |
58 |
dev-lang/ruby |
71 |
${RUBY_DEPS} |
|
|
72 |
dev-lang/perl |
59 |
dev-util/gperf |
73 |
dev-util/gperf |
60 |
sys-devel/bison |
74 |
>=sys-devel/bison-2.4.3 |
61 |
sys-devel/flex |
75 |
sys-devel/flex |
62 |
virtual/rubygems |
76 |
virtual/pkgconfig |
63 |
test? ( >=dev-qt/qttest-${QT_MIN_VER} ) |
|
|
64 |
" |
77 |
" |
65 |
|
78 |
|
66 |
PATCHES=( |
79 |
S="${WORKDIR}/${P/_/-}" |
67 |
"${FILESDIR}/${PN}-5.4.2-system-leveldb.patch" |
80 |
|
68 |
) |
81 |
CHECKREQS_DISK_BUILD="1G" # Debug build requires much more see bug #417307 |
69 |
|
|
|
70 |
src_prepare() { |
71 |
# ensure bundled library cannot be used |
72 |
rm -r Source/ThirdParty/leveldb || die |
73 |
|
74 |
# force using system library |
75 |
sed -i -e 's/qtConfig(system-jpeg)/true/' \ |
76 |
-e 's/qtConfig(system-png)/true/' \ |
77 |
Tools/qmake/mkspecs/features/features.prf || die |
78 |
|
79 |
# bug 466216 |
80 |
sed -i -e '/CONFIG +=/s/rpath//' \ |
81 |
Source/WebKit/qt/declarative/{experimental/experimental,public}.pri \ |
82 |
Tools/qmake/mkspecs/features/{force_static_libs_as_shared,unix/default_post}.prf \ |
83 |
|| die |
84 |
|
85 |
qt_use_disable_config opengl opengl Tools/qmake/mkspecs/features/features.prf |
86 |
|
87 |
qt_use_disable_mod geolocation positioning Tools/qmake/mkspecs/features/features.prf |
88 |
qt_use_disable_mod multimedia multimediawidgets Tools/qmake/mkspecs/features/features.prf |
89 |
qt_use_disable_mod orientation sensors Tools/qmake/mkspecs/features/features.prf |
90 |
qt_use_disable_mod printsupport printsupport Tools/qmake/mkspecs/features/features.prf |
91 |
qt_use_disable_mod qml quick Tools/qmake/mkspecs/features/features.prf |
92 |
qt_use_disable_mod webchannel webchannel \ |
93 |
Source/WebKit2/Target.pri \ |
94 |
Source/WebKit2/WebKit2.pri |
95 |
|
82 |
|
96 |
if ! use gstreamer; then |
83 |
pkg_pretend() { |
97 |
PATCHES+=("${FILESDIR}/${PN}-5.8.0-disable-gstreamer.patch") |
84 |
if [[ ${MERGE_TYPE} != "binary" ]] ; then |
|
|
85 |
if is-flagq "-g*" && ! is-flagq "-g*0" ; then |
86 |
einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS" |
87 |
check-reqs_pkg_pretend |
88 |
fi |
98 |
fi |
89 |
fi |
|
|
90 |
} |
99 |
|
91 |
|
100 |
# bug 562396 |
92 |
pkg_setup() { |
101 |
use jit || PATCHES+=("${FILESDIR}/${PN}-5.5.1-disable-jit.patch") |
93 |
if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then |
|
|
94 |
check-reqs_pkg_setup |
95 |
fi |
102 |
|
96 |
|
103 |
use webp || sed -i -e '/config_libwebp: WEBKIT_CONFIG += use_webp/d' \ |
97 |
python-any-r1_pkg_setup |
104 |
Tools/qmake/mkspecs/features/features.prf || die |
98 |
} |
105 |
|
99 |
|
106 |
# bug 458222 |
100 |
src_configure() { |
107 |
sed -i -e '/SUBDIRS += examples/d' Source/QtWebKit.pro || die |
101 |
# Respect CC, otherwise fails on prefix #395875 |
|
|
102 |
tc-export CC |
103 |
|
104 |
# older glibc needs this for INTPTR_MAX, bug #533976 |
105 |
if has_version "<sys-libs/glibc-2.18" ; then |
106 |
append-cppflags "-D__STDC_LIMIT_MACROS" |
107 |
fi |
108 |
|
109 |
# Multiple rendering bugs on youtube, github, etc without this, bug #547224 |
110 |
append-flags $(test-flags -fno-strict-aliasing) |
111 |
|
112 |
local ruby_interpreter="" |
113 |
|
114 |
if has_version "virtual/rubygems[ruby_targets_ruby24]"; then |
115 |
ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby24)" |
116 |
elif has_version "virtual/rubygems[ruby_targets_ruby23]"; then |
117 |
ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby23)" |
118 |
else |
119 |
ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby22)" |
120 |
fi |
121 |
|
122 |
local mycmakeargs=( |
123 |
-DENABLE_API_TESTS=OFF |
124 |
-DENABLE_GEOLOCATION=$(usex geolocation) |
125 |
-DUSE_GSTREAMER=$(usex gstreamer) |
126 |
-DENABLE_JIT=$(usex jit) |
127 |
-DUSE_QT_MULTIMEDIA=$(usex multimedia) |
128 |
-DENABLE_NETSCAPE_PLUGIN_API=$(usex nsplugin) |
129 |
-DENABLE_OPENGL=$(usex opengl) |
130 |
-DENABLE_DEVICE_ORIENTATION=$(usex orientation) |
131 |
-DENABLE_WEBKIT2=$(usex qml) |
132 |
$(cmake-utils_use_find_package webp WebP) |
133 |
-DENABLE_X11_TARGET=$(usex X) |
134 |
-DCMAKE_BUILD_TYPE=Release |
135 |
-DPORT=Qt |
136 |
${ruby_interpreter} |
137 |
) |
138 |
|
139 |
cmake-utils_src_configure |
140 |
} |
108 |
|
141 |
|
109 |
qt5-build_src_prepare |
142 |
src_compile() { |
|
|
143 |
cmake-utils_src_compile |
110 |
} |
144 |
} |
111 |
|
145 |
|
112 |
src_install() { |
146 |
src_install() { |
113 |
qt5-build_src_install |
147 |
cmake-utils_src_install |
114 |
|
148 |
|
115 |
# bug 572056 |
149 |
# bug 572056 |
116 |
if [[ ! -f ${D%/}${QT5_LIBDIR}/libQt5WebKit.so ]]; then |
150 |
if [[ ! -f ${D%/}$(qt5_get_libdir)/libQt5WebKit.so ]]; then |
117 |
eerror "${CATEGORY}/${PF} could not build due to a broken ruby environment." |
151 |
eerror "${CATEGORY}/${PF} could not build due to a broken ruby environment." |
118 |
die 'Check "eselect ruby" and ensure you have a working ruby in your $PATH' |
152 |
die 'Check "eselect ruby" and ensure you have a working ruby in your $PATH' |
119 |
fi |
153 |
fi |