1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 if [[ ${PV} = *9999 ]]; then
7 EGIT_BRANCH="qtwebkit-5.212"
8 EGIT_REPO_URI="https://github.com/qtwebkit/qtwebkit.git"
11 MY_P="${PN}-${PV/_pre20200309/-alpha4}" # present as upgrade over previous snapshot
12 SRC_URI="https://github.com/annulen/webkit/releases/download/${MY_P}/${MY_P}.tar.xz"
13 KEYWORDS="amd64 arm arm64 ~ppc ppc64 x86"
14 S="${WORKDIR}/${MY_P}"
16 PYTHON_COMPAT=( python3_{6,7,8} )
17 USE_RUBY="ruby25 ruby26 ruby27"
18 inherit check-reqs cmake flag-o-matic python-any-r1 qmake-utils ruby-single toolchain-funcs
20 DESCRIPTION="WebKit rendering library for the Qt5 framework (deprecated)"
21 HOMEPAGE="https://www.qt.io/"
25 IUSE="geolocation gles2-only +gstreamer +hyphen +jit multimedia nsplugin opengl orientation +printsupport qml webp X"
30 ?? ( gstreamer multimedia )
33 # Dependencies found at Source/cmake/OptionsQt.cmake
40 >=sys-devel/bison-2.4.3
49 >=dev-qt/qtcore-${QT_MIN_VER}
50 >=dev-qt/qtgui-${QT_MIN_VER}
51 >=dev-qt/qtnetwork-${QT_MIN_VER}
52 >=dev-qt/qtwidgets-${QT_MIN_VER}=
56 geolocation? ( >=dev-qt/qtpositioning-${QT_MIN_VER} )
59 media-libs/gstreamer:1.0
60 media-libs/gst-plugins-bad:1.0
61 media-libs/gst-plugins-base:1.0
63 hyphen? ( dev-libs/hyphen )
64 multimedia? ( >=dev-qt/qtmultimedia-${QT_MIN_VER}[widgets] )
66 >=dev-qt/qtgui-${QT_MIN_VER}[gles2-only=]
67 >=dev-qt/qtopengl-${QT_MIN_VER}[gles2-only=]
69 orientation? ( >=dev-qt/qtsensors-${QT_MIN_VER} )
70 printsupport? ( >=dev-qt/qtprintsupport-${QT_MIN_VER} )
72 >=dev-qt/qtdeclarative-${QT_MIN_VER}
73 >=dev-qt/qtwebchannel-${QT_MIN_VER}[qml]
75 webp? ( media-libs/libwebp:= )
78 x11-libs/libXcomposite
84 CHECKREQS_DISK_BUILD="16G" # bug 417307
87 if [[ ${MERGE_TYPE} != binary ]] && is-flagq "-g*" && ! is-flagq "-g*0"; then
88 einfo "Checking for sufficient disk space to build ${PN} with debugging flags"
94 _check_reqs pkg_pretend
99 python-any-r1_pkg_setup
103 # Respect CC, otherwise fails on prefix, bug #395875
106 # Multiple rendering bugs on youtube, github, etc without this, bug #547224
107 append-flags $(test-flags -fno-strict-aliasing)
111 -DENABLE_API_TESTS=OFF
113 -DENABLE_GEOLOCATION=$(usex geolocation)
114 -DUSE_GSTREAMER=$(usex gstreamer)
115 -DUSE_LIBHYPHEN=$(usex hyphen)
116 -DENABLE_JIT=$(usex jit)
117 -DUSE_QT_MULTIMEDIA=$(usex multimedia)
118 -DENABLE_NETSCAPE_PLUGIN_API=$(usex nsplugin)
119 -DENABLE_OPENGL=$(usex opengl)
120 -DENABLE_PRINT_SUPPORT=$(usex printsupport)
121 -DENABLE_DEVICE_ORIENTATION=$(usex orientation)
122 -DENABLE_WEBKIT2=$(usex qml)
123 $(cmake_use_find_package webp WebP)
124 -DENABLE_X11_TARGET=$(usex X)
127 if has_version "virtual/rubygems[ruby_targets_ruby27]"; then
128 mycmakeargs+=( -DRUBY_EXECUTABLE=$(type -P ruby27) )
129 elif has_version "virtual/rubygems[ruby_targets_ruby26]"; then
130 mycmakeargs+=( -DRUBY_EXECUTABLE=$(type -P ruby26) )
132 mycmakeargs+=( -DRUBY_EXECUTABLE=$(type -P ruby25) )
142 if [[ ! -f ${ED}$(qt5_get_libdir)/libQt5WebKit.so ]]; then
143 eerror "${CATEGORY}/${PF} could not build due to a broken ruby environment."
144 die 'Check "eselect ruby" and ensure you have a working ruby in your $PATH'