commit: 6c1e7646b5598cf8d9c8dae3cc1b6e3e2e9ffb4c
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 15 09:34:38 2025 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Nov 15 10:11:55 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c1e7646
dev-util/qbs: add 3.1.1
Been procrastinating on bumping this, but tried now given ran into
a test build failure with (upcoming) Qt 6.10.1. Unfortunately did
not fix it, nor has a fix to allow dropping qt610.patch. Given
the test that fail to build is a test we were skipping either way,
just going to skip building it on top for now rather than spend
time on this.
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
dev-util/qbs/Manifest | 1 +
dev-util/qbs/qbs-3.1.1.ebuild | 101 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 102 insertions(+)
diff --git a/dev-util/qbs/Manifest b/dev-util/qbs/Manifest
index 181c35f3bc9b..87e011719f04 100644
--- a/dev-util/qbs/Manifest
+++ b/dev-util/qbs/Manifest
@@ -1 +1,2 @@
DIST qbs-src-3.0.3.tar.gz 5796778 BLAKE2B
d0e5409a88c8e166453ad579c7317a18a06218c6107892bf0305b05c05beb0d526edfa992a5fa3c021f6d30ca6b65833c26738c512ecde11487c9499b26a2027
SHA512
b31c5163a9348059a2843ef28c3d62a97994c3d20dcc33686c72a15ef73e4a732456b8e023b19d7e927bb45f8fef84cbd8b746a5bbbdb1a454a21f7ef50724a9
+DIST qbs-src-3.1.1.tar.gz 5803914 BLAKE2B
506781d2b564a0ef106918c6911bed3142820eb2a0daab82991e5ccefcac2085a23a8fb98ae987fc70891e6e6a4ad6337eb9e38858578838bd081be78eaea44c
SHA512
4db032558cf37d182dd8938f78eb93c08cde13fff5932ad118b0e5da5e28156993a6cdefcebe5ea562f8ecea2acf1d351ed4e2635d30c2d62567dc4ca09b9b97
diff --git a/dev-util/qbs/qbs-3.1.1.ebuild b/dev-util/qbs/qbs-3.1.1.ebuild
new file mode 100644
index 000000000000..07cba8c0f68e
--- /dev/null
+++ b/dev-util/qbs/qbs-3.1.1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+inherit cmake flag-o-matic python-any-r1 toolchain-funcs
+
+DESCRIPTION="Modern build tool for software projects"
+HOMEPAGE="https://doc.qt.io/qbs/"
+SRC_URI="https://download.qt.io/official_releases/qbs/${PV}/${PN}-src-${PV}.tar.gz"
+S=${WORKDIR}/${PN}-src-${PV}
+
+LICENSE="|| ( LGPL-2.1 LGPL-3 ) Boost-1.0 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+# uses CorePrivate wrt qtbase:=
+RDEPEND="
+ dev-qt/qt5compat:6
+ dev-qt/qtbase:6=[concurrent,gui,network,widgets,xml]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? (
+ $(python_gen_any_dep '
+ dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ ')
+ dev-qt/qttools:6[assistant,qdoc]
+ )
+"
+
+CMAKE_SKIP_TESTS=(
+ # QBS does not inherit toolchain/flags knowledge from cmake, and
+ # while can use ${BUILD_DIR}/bin/qbs-config to improve this it
+ # remains very fickle and will fail in varied ways with clang,
+ # musl, -native-symlinks, and libc++. After consideration it feels
+ # not worth worrying about affected tests here (even if notable).
+ tst_api
+ tst_blackbox # also skips blackbox-* (intended)
+ tst_language
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.1-qtver.patch
+ "${FILESDIR}"/${PN}-2.4.1-ldconfig.patch
+ "${FILESDIR}"/${PN}-3.0.3-qt610.patch
+)
+
+python_check_deps() {
+ # _find_python_module in cmake/QbsDocumentation.cmake
+ python_has_version "dev-python/beautifulsoup4[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/lxml[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # test fails to build with Qt 6.10.1 -- not looked into but, given
+ # skip this test either way, may as well also not build it for now
+ sed -i '/add_subdirectory(language)/d' tests/auto/CMakeLists.txt || die
+}
+
+src_configure() {
+ # temporary workaround for musl-1.2.4 (bug #906929), this ideally
+ # needs fixing in qtbase as *64 usage comes from its headers' macros
+ use elibc_musl && append-lfs-flags
+
+ # tests build failure w/ gcc:14 + -O3 (bug #933187, needs looking into)
+ use test && tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] &&
+ replace-flags -O3 -O2
+
+ local mycmakeargs=(
+ -DQBS_DOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF}
+ -DQBS_INSTALL_HTML_DOCS=$(usex doc)
+ -DQBS_INSTALL_MAN_PAGE=yes
+ -DQBS_INSTALL_QCH_DOCS=$(usex doc)
+ -DQBS_LIB_INSTALL_DIR="$(get_libdir)"
+ -DQT_VERSION_MAJOR=6 #931596
+ -DWITH_TESTS=$(usex test)
+ -DWITH_UNIT_TESTS=$(usex test)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ local DOCS=( README.md changelogs )
+ cmake_src_install
+
+ use !test || rm -- "${ED}"/usr/bin/{tst_*,qbs_*,clang-format-test} ||
die
+
+ docompress -x /usr/share/doc/${PF}/qbs.qch
+}