commit:     9c9376b47aea93a273fa2eaeed61950133372e80
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  2 14:08:51 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Jul  2 15:10:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c9376b4

dev-qt/qt-creator: update live

Not tested much, but did build successfully once w/ Go bits.

May or may not consider making this optional when there is a release
after a closer look. Does not have a proper option, but it already
skips it if it does not find Go... so -DGO_BIN=no or so would likely
work.

Being off by default would also be less annoying for go rebuilds,
I doubt anyone wants to rebuild something massive like qt-creator
every go bump. Not that I really checked what this is used for yet.

For now not going to touch this too much given it may get changed
around upstream.

Closes: https://bugs.gentoo.org/935332
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-qt/qt-creator/qt-creator-9999.ebuild | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/dev-qt/qt-creator/qt-creator-9999.ebuild 
b/dev-qt/qt-creator/qt-creator-9999.ebuild
index f7ae725146b9..7e70e0a5b37d 100644
--- a/dev-qt/qt-creator/qt-creator-9999.ebuild
+++ b/dev-qt/qt-creator/qt-creator-9999.ebuild
@@ -6,7 +6,8 @@ EAPI=8
 LLVM_COMPAT=( {15..18} )
 LLVM_OPTIONAL=1
 PYTHON_COMPAT=( python3_{10..13} )
-inherit cmake flag-o-matic llvm-r1 python-any-r1 readme.gentoo-r1 xdg
+inherit cmake edo flag-o-matic go-env llvm-r1 multiprocessing
+inherit python-any-r1 readme.gentoo-r1 xdg
 
 if [[ ${PV} == 9999 ]]; then
        inherit git-r3
@@ -23,7 +24,10 @@ else
        QTC_PV=${PV/_/-}
        QTC_P=${PN}-opensource-src-${QTC_PV}
        [[ ${QTC_PV} == ${PV} ]] && QTC_REL=official || QTC_REL=development
-       SRC_URI="https://download.qt.io/${QTC_REL}_releases/qtcreator/$(ver_cut 
1-2)/${PV/_/-}/${QTC_P}.tar.xz"
+       SRC_URI="
+               https://download.qt.io/${QTC_REL}_releases/qtcreator/$(ver_cut 
1-2)/${PV/_/-}/${QTC_P}.tar.xz
+               https://dev.gentoo.org/~ionen/distfiles/${P}-vendor.tar.xz
+       "
        S=${WORKDIR}/${QTC_P}
        KEYWORDS="~amd64"
 fi
@@ -32,6 +36,7 @@ DESCRIPTION="Lightweight IDE for C++/QML development 
centering around Qt"
 HOMEPAGE="https://www.qt.io/product/development-tools";
 
 LICENSE="GPL-3"
+LICENSE+=" BSD MIT" # go
 SLOT="0"
 IUSE="
        +clang designer doc +help keyring plugin-dev qmldesigner
@@ -79,8 +84,11 @@ RDEPEND="
        qmldesigner? ( >=dev-qt/qtquicktimeline-${QT_PV} )
 "
 DEPEND="${COMMON_DEPEND}"
+# intentionally skipping := on go (unlike go-module.eclass) given not
+# worth a massive rebuild every time for the minor go usage
 BDEPEND="
        ${PYTHON_DEPS}
+       >=dev-lang/go-1.21.7
        >=dev-qt/qttools-${QT_PV}[linguist]
        doc? ( >=dev-qt/qttools-${QT_PV}[qdoc,qtattributionsscanner] )
 "
@@ -90,11 +98,23 @@ PATCHES=(
        "${FILESDIR}"/${PN}-12.0.0-musl-no-malloc-trim.patch
 )
 
+QA_FLAGS_IGNORED="usr/libexec/qtcreator/cmdbridge-.*" # written in Go
+
 pkg_setup() {
        python-any-r1_pkg_setup
        use clang && llvm-r1_pkg_setup
 }
 
+src_unpack() {
+       if [[ ${PV} == 9999 ]]; then
+               git-r3_src_unpack
+               cd "${S}/src/libs/gocmdbridge/server" || die
+               edo go mod vendor
+       else
+               default
+       fi
+}
+
 src_prepare() {
        cmake_src_prepare
 
@@ -112,6 +132,9 @@ src_prepare() {
 }
 
 src_configure() {
+       go-env_set_compile_environment
+       local -x GOFLAGS="-p=$(makeopts_jobs) -v -x -buildvcs=false 
-buildmode=pie"
+
        # -Werror=lto-type-mismatch issues, needs looking into
        filter-lto
 

Reply via email to