1 |
commit: 922b678e0d4a69689b0ad3bc007752aec15c4d04 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 8 19:47:48 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 14 13:09:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=922b678e |
7 |
|
8 |
qt5-build.eclass: Use kde.org eclass for snapshots and live ebuilds |
9 |
|
10 |
- Drop unused src_unpack phase |
11 |
- Snapshots are identified by having KDE_ORG_COMMIT set pre-inherit |
12 |
- All live ebuilds and snapshots except qtwebengine inherit kde.org.eclass |
13 |
- SRC_URI, src_unpack handling is done by kde.org.eclass for them |
14 |
|
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
eclass/qt5-build.eclass | 54 ++++++++++++++++++++++--------------------------- |
18 |
1 file changed, 24 insertions(+), 30 deletions(-) |
19 |
|
20 |
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass |
21 |
index a2fb90b5..a42fbce9 100644 |
22 |
--- a/eclass/qt5-build.eclass |
23 |
+++ b/eclass/qt5-build.eclass |
24 |
@@ -76,26 +76,17 @@ _QT5_P=${QT5_MODULE}-everywhere-src-${PV} |
25 |
|
26 |
inherit estack flag-o-matic toolchain-funcs virtualx |
27 |
|
28 |
-HOMEPAGE="https://www.qt.io/" |
29 |
-LICENSE="|| ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3" |
30 |
-SLOT=5/$(ver_cut 1-2) |
31 |
- |
32 |
-case ${PV} in |
33 |
- 5.15.9999) |
34 |
- # KDE upstream for 5.15 patches |
35 |
- HOMEPAGE+=" https://invent.kde.org/qt/qt/" |
36 |
- EGIT_BRANCH="kde/5.15" |
37 |
- ;; |
38 |
- *) |
39 |
+if [[ ${PN} != qtwebengine ]]; then |
40 |
+ if [[ ${QT5_BUILD_TYPE} == live ]] || [[ -n ${KDE_ORG_COMMIT} ]]; then |
41 |
+ # KDE Qt5PatchCollection |
42 |
+ inherit kde.org |
43 |
+ else |
44 |
# official stable release |
45 |
+ HOMEPAGE="https://www.qt.io/" |
46 |
SRC_URI="https://download.qt.io/official_releases/qt/${PV%.*}/${PV}/submodules/${_QT5_P}.tar.xz" |
47 |
S=${WORKDIR}/${_QT5_P} |
48 |
- ;; |
49 |
-esac |
50 |
- |
51 |
-EGIT_REPO_URI=( "https://invent.kde.org/qt/qt/${QT5_MODULE}.git" ) |
52 |
- |
53 |
-[[ ${QT5_BUILD_TYPE} == live ]] && inherit git-r3 |
54 |
+ fi |
55 |
+fi |
56 |
|
57 |
# @ECLASS-VARIABLE: QT5_BUILD_DIR |
58 |
# @OUTPUT_VARIABLE |
59 |
@@ -103,6 +94,8 @@ EGIT_REPO_URI=( "https://invent.kde.org/qt/qt/${QT5_MODULE}.git" ) |
60 |
# Build directory for out-of-source builds. |
61 |
: ${QT5_BUILD_DIR:=${S}_build} |
62 |
|
63 |
+LICENSE="|| ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3" |
64 |
+SLOT=5/$(ver_cut 1-2) |
65 |
IUSE="debug test" |
66 |
|
67 |
if [[ ${QT5_BUILD_TYPE} == release ]]; then |
68 |
@@ -121,17 +114,7 @@ fi |
69 |
|
70 |
###### Phase functions ###### |
71 |
|
72 |
-EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm |
73 |
- |
74 |
-# @FUNCTION: qt5-build_src_unpack |
75 |
-# @DESCRIPTION: |
76 |
-# Unpacks the sources. |
77 |
-qt5-build_src_unpack() { |
78 |
- case ${QT5_BUILD_TYPE} in |
79 |
- live) git-r3_src_unpack ;& |
80 |
- release) default ;; |
81 |
- esac |
82 |
-} |
83 |
+EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm |
84 |
|
85 |
# @FUNCTION: qt5-build_src_prepare |
86 |
# @DESCRIPTION: |
87 |
@@ -139,6 +122,15 @@ qt5-build_src_unpack() { |
88 |
qt5-build_src_prepare() { |
89 |
qt5_prepare_env |
90 |
|
91 |
+ if [[ -n ${KDE_ORG_COMMIT} ]]; then |
92 |
+ # Upstream bumped version in 5.15 branch after 5.15.2 release but their |
93 |
+ # 5.15.3 release is closed and this will never be more than a Qt 5.15.2 |
94 |
+ # with patches on top. |
95 |
+ einfo "Preparing KDE Qt5PatchCollection snapshot at ${KDE_ORG_COMMIT}" |
96 |
+ sed -e "/^MODULE_VERSION/s/5\.15\.3/5\.15\.2/" -i .qmake.conf || die |
97 |
+ mkdir -p .git || die # need to fake a git repository for configure |
98 |
+ fi |
99 |
+ |
100 |
if [[ ${QT5_MODULE} == qtbase ]]; then |
101 |
qt5_symlink_tools_to_build_dir |
102 |
|
103 |
@@ -637,9 +629,11 @@ qt5_base_configure() { |
104 |
|
105 |
# a forwarding header is no longer created since 5.8, causing the system |
106 |
# config to always be used. bug 599636 |
107 |
- # ${S}/include does not exist in live sources |
108 |
+ # ${S}/include does not exist in live sources or kde.org snapshots |
109 |
local basedir="${S}/" |
110 |
- [[ ${QT5_BUILD_TYPE} == live ]] && basedir="" |
111 |
+ if [[ ${QT5_BUILD_TYPE} == live ]] || [[ -n ${KDE_ORG_COMMIT} ]]; then |
112 |
+ basedir="" |
113 |
+ fi |
114 |
cp src/corelib/global/qconfig.h "${basedir}"include/QtCore/ || die |
115 |
|
116 |
popd >/dev/null || die |