commit:     36f34d8cc9904dd4f1129cb5d0d7d63afce698fa
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  5 21:25:59 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Feb  5 21:58:52 2021 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=36f34d8c

dev-qt/qtwebengine: Add snapshot switch, go back to ~dev-qt deps

This is going back on c07a5bbe to some extent, as it just does not work to
have these flexible deps completely without issues unless bigger hacks are
applied. Any updates for Qt 5.15.2 will provided as snapshots instead.

Apply hacks for successful snapshot build:
- Add faux .git subdirs to fix build
- sed MODULE_VERSION down to 5.15.2 (from 5.15.3 in git)
  - fixes installed header path
  - fixes installed cmake config requirements
  - consequently, revdeps do not fail to configure

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtwebengine/qtwebengine-5.15.9999.ebuild | 41 ++++++++++++++++---------
 1 file changed, 27 insertions(+), 14 deletions(-)

diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.9999.ebuild 
b/dev-qt/qtwebengine/qtwebengine-5.15.9999.ebuild
index 01d4c802..0f61b7f9 100644
--- a/dev-qt/qtwebengine/qtwebengine-5.15.9999.ebuild
+++ b/dev-qt/qtwebengine/qtwebengine-5.15.9999.ebuild
@@ -4,18 +4,22 @@
 EAPI=7
 
 PYTHON_COMPAT=( python2_7 )
-QTMIN=5.15.2
+QTVER=$(ver_cut 1-3)
 inherit multiprocessing python-any-r1 qt5-build
 
 DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML 
applications"
 
-# patchset based on https://github.com/chromium-ppc64le releases
-SRC_URI+=" ppc64? ( 
https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-5.15.2-ppc64.tar.xz )"
-
 if [[ ${QT5_BUILD_TYPE} == release ]]; then
        KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+       if [[ ${PV} == ${QTVER}_p* ]]; then
+               SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P}.tar.xz";
+               S="${WORKDIR}/${P}"
+       fi
 fi
 
+# patchset based on https://github.com/chromium-ppc64le releases
+SRC_URI+=" ppc64? ( 
https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-5.15.2-ppc64.tar.xz )"
+
 IUSE="alsa bindist designer geolocation jumbo-build kerberos pulseaudio 
+system-ffmpeg +system-icu widgets"
 REQUIRED_USE="designer? ( widgets )"
 
@@ -29,12 +33,12 @@ RDEPEND="
        dev-libs/libxml2[icu]
        dev-libs/libxslt
        dev-libs/re2:=
-       >=dev-qt/qtcore-${QTMIN}:5
-       >=dev-qt/qtdeclarative-${QTMIN}:5
-       >=dev-qt/qtgui-${QTMIN}:5
-       >=dev-qt/qtnetwork-${QTMIN}:5
-       >=dev-qt/qtprintsupport-${QTMIN}:5
-       >=dev-qt/qtwebchannel-${QTMIN}:5[qml]
+       ~dev-qt/qtcore-${QTVER}
+       ~dev-qt/qtdeclarative-${QTVER}
+       ~dev-qt/qtgui-${QTVER}
+       ~dev-qt/qtnetwork-${QTVER}
+       ~dev-qt/qtprintsupport-${QTVER}
+       ~dev-qt/qtwebchannel-${QTVER}[qml]
        media-libs/fontconfig
        media-libs/freetype
        media-libs/harfbuzz:=
@@ -62,15 +66,15 @@ RDEPEND="
        x11-libs/libXScrnSaver
        x11-libs/libXtst
        alsa? ( media-libs/alsa-lib )
-       designer? ( >=dev-qt/designer-${QTMIN}:5 )
-       geolocation? ( >=dev-qt/qtpositioning-${QTMIN}:5 )
+       designer? ( ~dev-qt/designer-${QTVER} )
+       geolocation? ( ~dev-qt/qtpositioning-${QTVER} )
        kerberos? ( virtual/krb5 )
        pulseaudio? ( media-sound/pulseaudio:= )
        system-ffmpeg? ( media-video/ffmpeg:0= )
        system-icu? ( >=dev-libs/icu-60.2:= )
        widgets? (
-               >=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
-               >=dev-qt/qtwidgets-${QTMIN}:5
+               ~dev-qt/qtdeclarative-${QTVER}[widgets]
+               ~dev-qt/qtwidgets-${QTVER}
        )
 "
 DEPEND="${RDEPEND}
@@ -86,6 +90,15 @@ DEPEND="${RDEPEND}
 PATCHES=( "${FILESDIR}/${PN}-5.15.0-disable-fatal-warnings.patch" ) # bug 
695446
 
 src_prepare() {
+       if [[ ${PV} == ${QTVER}_p* ]]; then
+               # This is made from git, and for some reason will fail w/o .git 
directories.
+               mkdir -p .git src/3rdparty/chromium/.git || die
+
+               # We need to make sure this integrates well into Qt 5.15.2 
installation.
+               # Otherwise revdeps fail w/o heavy changes. This is the 
simplest way to do it.
+               sed -e "/^MODULE_VERSION/s/5.*/${QTMIN}/" -i .qmake.conf || die
+       fi
+
        if ! use jumbo-build; then
                sed -i -e 's|use_jumbo_build=true|use_jumbo_build=false|' \
                        src/buildtools/config/common.pri || die

Reply via email to