summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2024-03-12 23:48:23 +0100
committerBernard Cafarelli <voyageur@gentoo.org>2024-03-13 00:05:09 +0100
commit42dad3026eaed5691c161eaf1f34f792573ca478 (patch)
tree6e1e8b10485ea874f12afbca51b2fa5f85716007 /dev-qt/kdsingleapplication/kdsingleapplication-1.1.0.ebuild
parentnet-libs/libre-graph-api-cpp-qt-client: new package, add 1.0.4 (diff)
downloadgentoo-42dad3026eaed5691c161eaf1f34f792573ca478.tar.gz
gentoo-42dad3026eaed5691c161eaf1f34f792573ca478.tar.bz2
gentoo-42dad3026eaed5691c161eaf1f34f792573ca478.zip
dev-qt/kdsingleapplication: new package, add 1.1.0
Moved from guru overlay version Needed for newer net-misc/owncloud-client Closes: https://bugs.gentoo.org/925665 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'dev-qt/kdsingleapplication/kdsingleapplication-1.1.0.ebuild')
-rw-r--r--dev-qt/kdsingleapplication/kdsingleapplication-1.1.0.ebuild96
1 files changed, 96 insertions, 0 deletions
diff --git a/dev-qt/kdsingleapplication/kdsingleapplication-1.1.0.ebuild b/dev-qt/kdsingleapplication/kdsingleapplication-1.1.0.ebuild
new file mode 100644
index 000000000000..67fef37a2e74
--- /dev/null
+++ b/dev-qt/kdsingleapplication/kdsingleapplication-1.1.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake multibuild
+
+DESCRIPTION="KDAB's helper class for single-instance policy applications"
+HOMEPAGE="https://github.com/KDAB/KDSingleApplication"
+SRC_URI="https://github.com/KDAB/KDSingleApplication/releases/download/v${PV}/kdsingleapplication-${PV}.tar.gz"
+
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+IUSE="doc examples test qt6"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ qt6? (
+ dev-qt/qtbase:6[network,widgets]
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ doc? (
+ app-text/doxygen[dot]
+ dev-qt/qthelp:5
+ qt6? (
+ dev-qt/qttools:6[assistant]
+ )
+ )
+ examples? (
+ dev-util/patchelf
+ )
+ dev-qt/qttest:5
+"
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( qt5 $(usev qt6) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=(
+ -DINSTALL_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
+ )
+ if [[ ${MULTIBUILD_VARIANT} == qt6 ]]; then
+ mycmakeargs+=(
+ -DKDSingleApplication_DOCS=OFF
+ -DKDSingleApplication_EXAMPLES=OFF
+ -DKDSingleApplication_QT6=ON
+ -DKDSingleApplication_TESTS=OFF
+ )
+ else
+ mycmakeargs+=(
+ -DKDSingleApplication_DOCS=$(usex doc)
+ -DKDSingleApplication_EXAMPLES=$(usex examples)
+ -DKDSingleApplication_QT6=OFF
+ -DKDSingleApplication_TESTS=$(usex test)
+ )
+ fi
+ cmake_src_configure
+ }
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake_src_compile
+}
+
+src_test() {
+ mytest() {
+ [[ ${MULTIBUILD_VARIANT} == qt5 ]] && cmake_src_test
+ }
+ multibuild_foreach_variant mytest
+}
+
+src_install() {
+ myinstall() {
+ cmake_src_install
+ if [[ ${MULTIBUILD_VARIANT} == qt5 ]]; then
+ rm -rf "${BUILD_DIR}"/docs/api/html/examples || die
+ use doc && HTML_DOCS="${BUILD_DIR}/docs/api/html/*"
+ if use examples; then
+ patchelf --remove-rpath "${BUILD_DIR}"/bin/widgetsingleapplication || die
+ dobin "${BUILD_DIR}"/bin/widgetsingleapplication
+ fi
+ fi
+ }
+ multibuild_foreach_variant myinstall
+ einstalldocs
+}