summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-08-16 01:32:52 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-08-25 16:35:47 +0200
commit56772f246ddcb36b5dc4e580a95d63ea15c27d20 (patch)
treebee4f6a2424cd7d5b75e68ba4df2867ec36db2c8 /dev-qt
parentqt5-build.eclass: Support EAPI-8 (diff)
downloadgentoo-56772f246ddcb36b5dc4e580a95d63ea15c27d20.tar.gz
gentoo-56772f246ddcb36b5dc4e580a95d63ea15c27d20.tar.bz2
gentoo-56772f246ddcb36b5dc4e580a95d63ea15c27d20.zip
dev-qt/qtchooser: Move config file install from qt5-build.eclass
- EAPI-8 - Block colliding <dev-qt/qtcore-5.15.2-r10 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtchooser/qtchooser-66-r1.ebuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/dev-qt/qtchooser/qtchooser-66-r1.ebuild b/dev-qt/qtchooser/qtchooser-66-r1.ebuild
new file mode 100644
index 000000000000..46e2087883e4
--- /dev/null
+++ b/dev-qt/qtchooser/qtchooser-66-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qmake-utils toolchain-funcs
+
+DESCRIPTION="Tool to quickly switch between multiple Qt installations"
+HOMEPAGE="https://code.qt.io/cgit/qtsdk/qtchooser.git/"
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://code.qt.io/qtsdk/qtchooser.git"
+ inherit git-r3
+else
+ SRC_URI="http://download.qt.io/official_releases/${PN}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+LICENSE="|| ( LGPL-2.1 GPL-3 )"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? (
+ dev-qt/qtcore:5
+ dev-qt/qttest:5
+ )"
+RDEPEND="
+ !<dev-qt/qtcore-5.15.2-r10:5
+"
+
+qtchooser_make() {
+ emake \
+ CXX="$(tc-getCXX)" \
+ LFLAGS="${LDFLAGS}" \
+ prefix="${EPREFIX}/usr" \
+ "$@"
+}
+
+src_compile() {
+ qtchooser_make
+}
+
+src_test() {
+ pushd tests/auto >/dev/null || die
+ eqmake5
+ popd >/dev/null || die
+
+ qtchooser_make check
+}
+
+src_install() {
+ qtchooser_make INSTALL_ROOT="${D}" install
+
+ # install configuration file
+ cat > "${T}/qt5-${CHOST}.conf" <<-_EOF_ || die
+ $(qt5_get_bindir)
+ $(qt5_get_libdir)
+ _EOF_
+
+ (
+ insinto /etc/xdg/qtchooser
+ doins "${T}/qt5-${CHOST}.conf"
+ )
+
+ # convenience symlinks
+ dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/5.conf
+ dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/qt5.conf
+ dosym qt5.conf /etc/xdg/qtchooser/default.conf
+
+ # TODO: bash and zsh completion
+ # newbashcomp scripts/${PN}.bash ${PN}
+}