Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwebengine/
Date: Thu, 02 Sep 2021 18:38:32
Message-Id: 1630607887.65d22cb153e059dfec7e973a92c2dd95aad1730e.asturm@gentoo
1 commit: 65d22cb153e059dfec7e973a92c2dd95aad1730e
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 28 10:07:17 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 2 18:38:07 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65d22cb1
7
8 dev-qt/qtwebengine: 5.15.2_p20210824 snapshot bump, EAPI-8 bump
9
10 Snapshotted at:
11 Branch: 5.15.6
12 Commit: 2acbba86362ac3a1c2d8c20390dc263875f8f09c
13
14 Additional cherry-pick from branch 5.15:
15 Fix crash when clicking on a link in PDF
16 Commit: 7f4a6ff45743cecbfe0dd14ef29afd0874a2ed39
17
18 Submodule qtwebengine-chromium.git:
19 Branch: 87-based
20 Commit: 9f71911e38c041cedc5291c5e772b7d03ce8b8c
21
22 Bug: https://bugs.gentoo.org/810781
23 Package-Manager: Portage-3.0.22, Repoman-3.0.3
24 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
25
26 dev-qt/qtwebengine/Manifest | 1 +
27 .../qtwebengine-5.15.2_p20210824.ebuild | 224 +++++++++++++++++++++
28 2 files changed, 225 insertions(+)
29
30 diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest
31 index 562f5ae1546..c4c1b9d408f 100644
32 --- a/dev-qt/qtwebengine/Manifest
33 +++ b/dev-qt/qtwebengine/Manifest
34 @@ -1,2 +1,3 @@
35 DIST qtwebengine-5.15.2-chromium87-ppc64le.tar.xz 28536 BLAKE2B 98f8e01e7026d9df1d30ae453d4394d3c4ad04c0620a2496235d45f5f1080c2280e040826cde7f72d9771bfc80d0c3df56c9dcbe4f763cec432ad56de37d64c5 SHA512 c90a76f44a9d720624016fd082ab3036f12e13b9789e869ebaf5e4774afca7d4187faf187f365f696d1a7eda05ca75516556ee9d291cdb3408d57cc4b23e2654
36 DIST qtwebengine-5.15.2_p20210625.tar.xz 320144708 BLAKE2B cd11e69a34ff0fa07d26262906a12304c39a12575024d61db18bc696284e9c5700090e5bfed217c89d2c8eac49b0ccb7d7ee0ba716ec3a81878de1301566884d SHA512 517a8cdaff684894456db8cfb5cfca412b8764e7035623d8190d9a06f6995742097a53eb67329d12bf8dc0a56372f7d09a54532ba804a5bff245ca8ef042a4e1
37 +DIST qtwebengine-5.15.2_p20210824.tar.xz 320214264 BLAKE2B fe611805107822f495e0921de4fc9a8737bd3238a332e03d27421a3fd14dc1417c1d69e9ec5e9f6bf922f98045cbdf9ee2c76621db988c8b1e6e0e90b2c6dc7e SHA512 3a5f9ef45ba488aee601e092d1c4a5f707a854d5b9f0a5e62cb88dcdf280163182abc98b0a55b28591e81e18b5147142d404dcdc92feb61414ce2d4ce0d2dca6
38
39 diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210824.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210824.ebuild
40 new file mode 100644
41 index 00000000000..1a87eb9defb
42 --- /dev/null
43 +++ b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210824.ebuild
44 @@ -0,0 +1,224 @@
45 +# Copyright 1999-2021 Gentoo Authors
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=8
49 +
50 +PYTHON_COMPAT=( python2_7 )
51 +QTVER=$(ver_cut 1-3)
52 +inherit estack flag-o-matic multiprocessing python-any-r1 qt5-build
53 +
54 +DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applications"
55 +HOMEPAGE="https://www.qt.io/"
56 +
57 +if [[ ${QT5_BUILD_TYPE} == release ]]; then
58 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
59 + if [[ ${PV} == ${QTVER}_p* ]]; then
60 + SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P}.tar.xz"
61 + S="${WORKDIR}/${P}"
62 + QT5_BUILD_DIR="${S}_build"
63 + fi
64 +else
65 + EGIT_BRANCH="5.15"
66 + EGIT_REPO_URI=(
67 + "https://code.qt.io/qt/${QT5_MODULE}.git"
68 + "https://github.com/qt/${QT5_MODULE}.git"
69 + )
70 + inherit git-r3
71 +fi
72 +
73 +# patchset based on https://github.com/chromium-ppc64le releases
74 +SRC_URI+=" ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-5.15.2-chromium87-ppc64le.tar.xz )"
75 +
76 +IUSE="alsa bindist designer geolocation +jumbo-build kerberos pulseaudio +system-ffmpeg +system-icu widgets"
77 +REQUIRED_USE="designer? ( widgets )"
78 +
79 +RDEPEND="
80 + app-arch/snappy:=
81 + dev-libs/glib:2
82 + dev-libs/nspr
83 + dev-libs/nss
84 + dev-libs/expat
85 + dev-libs/libevent:=
86 + dev-libs/libxml2[icu]
87 + dev-libs/libxslt
88 + dev-libs/re2:=
89 + ~dev-qt/qtcore-${QTVER}
90 + ~dev-qt/qtdeclarative-${QTVER}
91 + ~dev-qt/qtgui-${QTVER}
92 + ~dev-qt/qtnetwork-${QTVER}
93 + ~dev-qt/qtprintsupport-${QTVER}
94 + ~dev-qt/qtwebchannel-${QTVER}[qml]
95 + media-libs/fontconfig
96 + media-libs/freetype
97 + media-libs/harfbuzz:=
98 + media-libs/lcms:2
99 + media-libs/libjpeg-turbo:=
100 + media-libs/libpng:0=
101 + >=media-libs/libvpx-1.5:=[svc(+)]
102 + media-libs/libwebp:=
103 + media-libs/mesa[egl,X(+)]
104 + media-libs/opus
105 + sys-apps/dbus
106 + sys-apps/pciutils
107 + sys-libs/zlib[minizip]
108 + virtual/libudev
109 + x11-libs/libdrm
110 + x11-libs/libX11
111 + x11-libs/libXcomposite
112 + x11-libs/libXcursor
113 + x11-libs/libXdamage
114 + x11-libs/libXext
115 + x11-libs/libXfixes
116 + x11-libs/libXi
117 + x11-libs/libxkbfile
118 + x11-libs/libXrandr
119 + x11-libs/libXrender
120 + x11-libs/libXScrnSaver
121 + x11-libs/libXtst
122 + alsa? ( media-libs/alsa-lib )
123 + designer? ( ~dev-qt/designer-${QTVER} )
124 + geolocation? ( ~dev-qt/qtpositioning-${QTVER} )
125 + kerberos? ( virtual/krb5 )
126 + pulseaudio? ( media-sound/pulseaudio:= )
127 + system-ffmpeg? ( media-video/ffmpeg:0= )
128 + system-icu? ( >=dev-libs/icu-69.1:= )
129 + widgets? (
130 + ~dev-qt/qtdeclarative-${QTVER}[widgets]
131 + ~dev-qt/qtwidgets-${QTVER}
132 + )
133 +"
134 +DEPEND="${RDEPEND}"
135 +BDEPEND="${PYTHON_DEPS}
136 + dev-util/gperf
137 + dev-util/ninja
138 + dev-util/re2c
139 + net-libs/nodejs[ssl]
140 + sys-devel/bison
141 + sys-devel/flex
142 + ppc64? ( >=dev-util/gn-0.1807 )
143 +"
144 +
145 +PATCHES=(
146 + "${FILESDIR}/${PN}-5.15.0-disable-fatal-warnings.patch" # bug 695446
147 + "${FILESDIR}/${PN}-5.15.2_p20210224-chromium-87-v8-icu68.patch" # downstream, bug 757606
148 + "${FILESDIR}/${PN}-5.15.2_p20210224-disable-git.patch" # downstream snapshot fix
149 + "${FILESDIR}/${PN}-5.15.2_p20210406-glibc-2.33.patch" # by Fedora, bug 769989
150 + "${FILESDIR}/${PN}-5.15.2_p20210521-gcc11.patch" # by Fedora, bug 768261
151 +)
152 +
153 +pkg_preinst() {
154 + elog "This version of Qt WebEngine is based on Chromium version 87.0.4280, with"
155 + elog "additional security fixes from newer versions. Extensive as it is, the"
156 + elog "list of backports is impossible to evaluate, but always bound to be behind"
157 + elog "Chromium's release schedule."
158 + elog "In addition, various online services may deny service based on an outdated"
159 + elog "user agent version (and/or other checks). Google is already known to do so."
160 + elog
161 + elog "tldr: Your web browsing experience will be compromised."
162 +}
163 +
164 +src_unpack() {
165 + # bug 307861
166 + eshopts_push -s extglob
167 + if is-flagq '-g?(gdb)?([1-9])'; then
168 + ewarn
169 + ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)."
170 + ewarn "You may experience really long compilation times and/or increased memory usage."
171 + ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug."
172 + ewarn
173 + fi
174 + eshopts_pop
175 +
176 + case ${QT5_BUILD_TYPE} in
177 + live) git-r3_src_unpack ;&
178 + release) default ;;
179 + esac
180 +}
181 +
182 +src_prepare() {
183 + if [[ ${PV} == ${QTVER}_p* ]]; then
184 + # This is made from git, and for some reason will fail w/o .git directories.
185 + mkdir -p .git src/3rdparty/chromium/.git || die
186 +
187 + # We need to make sure this integrates well into Qt 5.15.2 installation.
188 + # Otherwise revdeps fail w/o heavy changes. This is the simplest way to do it.
189 + sed -e "/^MODULE_VERSION/s/5.*/${QTVER}/" -i .qmake.conf || die
190 + fi
191 +
192 + # QTBUG-88657 - jumbo-build could still make trouble
193 + if ! use jumbo-build; then
194 + sed -i -e 's|use_jumbo_build=true|use_jumbo_build=false|' \
195 + src/buildtools/config/common.pri || die
196 + fi
197 +
198 + # bug 620444 - ensure local headers are used
199 + find "${S}" -type f -name "*.pr[fio]" | \
200 + xargs sed -i -e 's|INCLUDEPATH += |&$${QTWEBENGINE_ROOT}_build/include $${QTWEBENGINE_ROOT}/include |' || die
201 +
202 + if use system-icu; then
203 + # Sanity check to ensure that bundled copy of ICU is not used.
204 + # Whole src/3rdparty/chromium/third_party/icu directory cannot be deleted because
205 + # src/3rdparty/chromium/third_party/icu/BUILD.gn is used by build system.
206 + # If usage of headers of bundled copy of ICU occurs, then lists of shim headers in
207 + # shim_headers("icui18n_shim") and shim_headers("icuuc_shim") in
208 + # src/3rdparty/chromium/third_party/icu/BUILD.gn should be updated.
209 + local file
210 + while read file; do
211 + echo "#error This file should not be used!" > "${file}" || die
212 + done < <(find src/3rdparty/chromium/third_party/icu -type f "(" -name "*.c" -o -name "*.cpp" -o -name "*.h" ")" 2>/dev/null)
213 + fi
214 +
215 + qt_use_disable_config alsa webengine-alsa src/buildtools/config/linux.pri
216 + qt_use_disable_config pulseaudio webengine-pulseaudio src/buildtools/config/linux.pri
217 +
218 + qt_use_disable_mod designer webenginewidgets src/plugins/plugins.pro
219 +
220 + qt_use_disable_mod widgets widgets src/src.pro
221 +
222 + qt5-build_src_prepare
223 +
224 + # we need to generate ppc64 stuff because upstream does not ship it yet
225 + if use ppc64; then
226 + einfo "Patching for ppc64le and generating build files"
227 + eapply "${FILESDIR}/qtwebengine-5.15.2-enable-ppc64.patch"
228 + pushd src/3rdparty/chromium > /dev/null || die
229 + eapply -p0 "${WORKDIR}/${PN}-ppc64le"
230 + popd > /dev/null || die
231 + pushd src/3rdparty/chromium/third_party/libvpx > /dev/null || die
232 + mkdir -vp source/config/linux/ppc64 || die
233 + mkdir -p source/libvpx/test || die
234 + touch source/libvpx/test/test.mk || die
235 + ./generate_gni.sh || die
236 + popd >/dev/null || die
237 + fi
238 +}
239 +
240 +src_configure() {
241 + export NINJA_PATH=/usr/bin/ninja
242 + export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}"
243 +
244 + local myqmakeargs=(
245 + --
246 + -no-build-qtpdf
247 + -printing-and-pdf
248 + -system-opus
249 + -system-webp
250 + $(usex alsa '-alsa' '-no-alsa')
251 + $(usex bindist '-no-proprietary-codecs' '-proprietary-codecs')
252 + $(usex geolocation '-webengine-geolocation' '-no-webengine-geolocation')
253 + $(usex kerberos '-webengine-kerberos' '-no-webengine-kerberos')
254 + $(usex pulseaudio '-pulseaudio' '-no-pulseaudio')
255 + $(usex system-ffmpeg '-system-ffmpeg' '-qt-ffmpeg')
256 + $(usex system-icu '-webengine-icu' '-no-webengine-icu')
257 + )
258 + qt5-build_src_configure
259 +}
260 +
261 +src_install() {
262 + qt5-build_src_install
263 +
264 + # bug 601472
265 + if [[ ! -f ${D}${QT5_LIBDIR}/libQt5WebEngine.so ]]; then
266 + die "${CATEGORY}/${PF} failed to build anything. Please report to https://bugs.gentoo.org/"
267 + fi
268 +}