summaryrefslogtreecommitdiff
path: root/net-libs
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2023-12-07 23:38:27 +0100
committerSam James <sam@gentoo.org>2023-12-17 12:04:13 +0000
commite9cace638f598a1ca8254c28d0b47a22de92658d (patch)
treed869578dda5c4b199e824dea2ae3ff7b6b415f5b /net-libs
parent77a694c68a78037c636f476d4781aaa0e0dea902 (diff)
downloadkde-e9cace638f598a1ca8254c28d0b47a22de92658d.tar.gz
kde-e9cace638f598a1ca8254c28d0b47a22de92658d.tar.bz2
kde-e9cace638f598a1ca8254c28d0b47a22de92658d.zip
net-libs/accounts-qt: add 9999 w/ IUSE qt5,qt6 [WIP]
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/accounts-qt/accounts-qt-9999.ebuild102
-rw-r--r--net-libs/accounts-qt/files/accounts-qt-1.16-libdir.patch116
-rw-r--r--net-libs/accounts-qt/metadata.xml11
3 files changed, 229 insertions, 0 deletions
diff --git a/net-libs/accounts-qt/accounts-qt-9999.ebuild b/net-libs/accounts-qt/accounts-qt-9999.ebuild
new file mode 100644
index 00000000000..8147971f055
--- /dev/null
+++ b/net-libs/accounts-qt/accounts-qt-9999.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qmake-utils multibuild
+
+if [[ ${PV} = *9999* ]] ; then
+ EGIT_REPO_URI="https://gitlab.com/nicolasfella/lib${PN}.git/"
+ EGIT_BRANCH="qt6"
+ inherit git-r3
+else
+ SRC_URI="https://gitlab.com/accounts-sso/lib${PN}/-/archive/VERSION_${PV}/lib${PN}-VERSION_${PV}.tar.gz -> ${P}a.tar.gz"
+ S="${WORKDIR}/lib${PN}-VERSION_${PV}"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+fi
+
+DESCRIPTION="Qt bindings for libaccounts-glib"
+HOMEPAGE="https://accounts-sso.gitlab.io"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="doc +qt5 qt6 test"
+
+# dbus problems
+RESTRICT="test"
+
+RDEPEND="
+ dev-libs/glib:2
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtxml:5
+ )
+ qt6? ( dev-qt/qtbase:6[xml] )
+ >=net-libs/libaccounts-glib-1.23:=
+"
+DEPEND="${RDEPEND}
+ test? (
+ qt5? ( dev-qt/qttest:5 )
+ qt6? ( dev-qt/qtbase:6[test] )
+ )
+"
+BDEPEND="
+ doc? (
+ app-doc/doxygen[dot]
+ || (
+ dev-qt/qttools:6[assistant]
+ dev-qt/qthelp:5
+ )
+ )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-1.16-libdir.patch" )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) )
+}
+
+src_prepare() {
+ default
+
+ local qhelpgeneratorpath
+ if has_version "dev-qt/qttools:6[assistant]"; then
+ qhelpgeneratorpath="$(qt6_get_libdir)/qt6/libexec"
+ elif has_version "dev-qt/qthelp:5"; then
+ qhelpgeneratorpath="$(qt5_get_bindir)"
+ else
+ eerror "dev-qt/qttools:6[assistant] nor dev-qt/qthelp:5 available even though in deps(?)"
+ fi
+
+ sed -e "s|share/doc/\$\${PROJECT_NAME}|share/doc/${PF}|" \
+ -i doc/doc.pri || die
+ sed -e "/QHG_LOCATION/s|qhelpgenerator|${qhelpgeneratorpath}/&|" \
+ -i doc/doxy.conf || die
+ if ! use doc; then
+ sed -e "/include( doc\/doc.pri )/d" -i ${PN}.pro || die
+ fi
+ if ! use test; then
+ sed -e '/^SUBDIRS/s/tests//' \
+ -i accounts-qt.pro || die "couldn't disable tests"
+ fi
+}
+
+src_configure() {
+ my_src_configure() {
+ if [[ ${MULTIBUILD_VARIANT} == qt6 ]]; then
+ eqmake6 PREFIX="${EPREFIX}"/usr LIBDIR=$(get_libdir)
+ else
+ eqmake5 PREFIX="${EPREFIX}"/usr LIBDIR=$(get_libdir)
+ fi
+ }
+
+ multibuild_foreach_variant my_src_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant default
+}
+
+src_install() {
+ multibuild_foreach_variant emake INSTALL_ROOT="${D}" install
+}
diff --git a/net-libs/accounts-qt/files/accounts-qt-1.16-libdir.patch b/net-libs/accounts-qt/files/accounts-qt-1.16-libdir.patch
new file mode 100644
index 00000000000..dfcbe71938b
--- /dev/null
+++ b/net-libs/accounts-qt/files/accounts-qt-1.16-libdir.patch
@@ -0,0 +1,116 @@
+From e3882382b2e98bce5be07baf23771856828123fc Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Thu, 7 Dec 2023 23:20:32 +0100
+Subject: [PATCH] Make LIBDIR configurable
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ Accounts/AccountsQt5Config.cmake.in | 2 +-
+ Accounts/AccountsQt6Config.cmake.in | 4 ++--
+ Accounts/accounts-qt5.pc.in | 2 +-
+ Accounts/accounts-qt6.pc.in | 2 +-
+ common-installs-config.pri | 2 +-
+ common-pkgconfig.pri | 2 +-
+ common-project-config.pri | 6 +++---
+ 7 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/Accounts/AccountsQt5Config.cmake.in b/Accounts/AccountsQt5Config.cmake.in
+index 746f689..9280a7d 100644
+--- a/Accounts/AccountsQt5Config.cmake.in
++++ b/Accounts/AccountsQt5Config.cmake.in
+@@ -1,5 +1,5 @@
+ # ACCOUNTSQT_INCLUDE_DIRS - The libaccounts-qt include directories
+ # ACCOUNTSQT_LIBRARIES - The libraries needed to use libaccounts-qt
+
+-set(ACCOUNTSQT_LIBRARIES $${INSTALL_LIBDIR}/lib$${TARGET}.so)
++set(ACCOUNTSQT_LIBRARIES $${INSTALL_PREFIX}/$${LIBDIR}/lib$${TARGET}.so)
+ set(ACCOUNTSQT_INCLUDE_DIRS $${INSTALL_PREFIX}/include/$${TARGET}/)
+diff --git a/Accounts/AccountsQt6Config.cmake.in b/Accounts/AccountsQt6Config.cmake.in
+index 55a8964..9280a7d 100644
+--- a/Accounts/AccountsQt6Config.cmake.in
++++ b/Accounts/AccountsQt6Config.cmake.in
+@@ -1,5 +1,5 @@
+ # ACCOUNTSQT_INCLUDE_DIRS - The libaccounts-qt include directories
+ # ACCOUNTSQT_LIBRARIES - The libraries needed to use libaccounts-qt
+
+-set(ACCOUNTSQT_LIBRARIES $${INSTALL_LIBDIR}/lib$${TARGET}.so)
+-set(ACCOUNTSQT_INCLUDE_DIRS $${INSTALL_PREFIX}/include/$${TARGET}/)
+\ No newline at end of file
++set(ACCOUNTSQT_LIBRARIES $${INSTALL_PREFIX}/$${LIBDIR}/lib$${TARGET}.so)
++set(ACCOUNTSQT_INCLUDE_DIRS $${INSTALL_PREFIX}/include/$${TARGET}/)
+diff --git a/Accounts/accounts-qt5.pc.in b/Accounts/accounts-qt5.pc.in
+index fbfcea8..faea96b 100644
+--- a/Accounts/accounts-qt5.pc.in
++++ b/Accounts/accounts-qt5.pc.in
+@@ -1,6 +1,6 @@
+ prefix=$$INSTALL_PREFIX
+ exec_prefix=${prefix}
+-libdir=$$INSTALL_LIBDIR
++libdir=${prefix}/$$LIBDIR
+ includedir=${prefix}/include/accounts-qt5
+ servicefilesdir=${prefix}/share/accounts/services
+ servicetypefilesdir=${prefix}/share/accounts/service-types
+diff --git a/Accounts/accounts-qt6.pc.in b/Accounts/accounts-qt6.pc.in
+index c625b2e..cdc0233 100644
+--- a/Accounts/accounts-qt6.pc.in
++++ b/Accounts/accounts-qt6.pc.in
+@@ -1,6 +1,6 @@
+ prefix=$$INSTALL_PREFIX
+ exec_prefix=${prefix}
+-libdir=$$INSTALL_LIBDIR
++libdir=${prefix}/$$LIBDIR
+ includedir=${prefix}/include/accounts-qt6
+ servicefilesdir=${prefix}/share/accounts/services
+ servicetypefilesdir=${prefix}/share/accounts/service-types
+diff --git a/common-installs-config.pri b/common-installs-config.pri
+index 82baf75..420accb 100644
+--- a/common-installs-config.pri
++++ b/common-installs-config.pri
+@@ -17,7 +17,7 @@ contains( TEMPLATE, app ) {
+ #-----------------------------------------------------------------------------
+ contains( TEMPLATE, lib ) {
+
+- target.path = $${INSTALL_LIBDIR}
++ target.path = $${INSTALL_PREFIX}/$${LIBDIR}
+ INSTALLS += target
+ message("====")
+ message("==== INSTALLS += target")
+diff --git a/common-pkgconfig.pri b/common-pkgconfig.pri
+index 975068a..9f010d3 100644
+--- a/common-pkgconfig.pri
++++ b/common-pkgconfig.pri
+@@ -3,7 +3,7 @@
+ !isEmpty(pkgconfig.files) {
+ QMAKE_SUBSTITUTES += $${pkgconfig.files}.in
+ pkgconfig.CONFIG = no_check_exist
+- pkgconfig.path = $${INSTALL_LIBDIR}/pkgconfig
++ pkgconfig.path = $${INSTALL_PREFIX}/$${LIBDIR}/pkgconfig
+ QMAKE_EXTRA_TARGETS += pkgconfig
+
+ QMAKE_CLEAN += $${pkgconfig.files}
+diff --git a/common-project-config.pri b/common-project-config.pri
+index b856961..0484e36 100644
+--- a/common-project-config.pri
++++ b/common-project-config.pri
+@@ -44,15 +44,15 @@ INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib
+ isEmpty( LIBDIR ) {
+ message("====")
+ message("==== NOTE: To override the library installation path run: `qmake LIBDIR=/custom/path'")
+- message("==== (current installation path is `$${INSTALL_LIBDIR}')")
++ message("==== (current installation path is `$${INSTALL_PREFIX}/$${LIBDIR}')")
+ } else {
+ INSTALL_LIBDIR = $${LIBDIR}
+ message("====")
+- message("==== library install path set to `$${INSTALL_LIBDIR}'")
++ message("==== library install path set to `$${INSTALL_PREFIX}/$${LIBDIR}'")
+ }
+
+ isEmpty ( CMAKE_CONFIG_PATH ) {
+- CMAKE_CONFIG_PATH = $${INSTALL_LIBDIR}/cmake
++ CMAKE_CONFIG_PATH = $${INSTALL_PREFIX}/$${LIBDIR}/cmake
+ message("====")
+ message("==== NOTE: To override the cmake module installation path run: `qmake CMAKE_CONFIG_PATH=/custom/path'")
+ message("==== (current installation path is `$${CMAKE_CONFIG_PATH}')")
+--
+2.43.0
+
diff --git a/net-libs/accounts-qt/metadata.xml b/net-libs/accounts-qt/metadata.xml
new file mode 100644
index 00000000000..17eb6070226
--- /dev/null
+++ b/net-libs/accounts-qt/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>kde@gentoo.org</email>
+ <name>Gentoo KDE Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="gitlab">accounts-sso/libaccounts-qt</remote-id>
+ </upstream>
+</pkgmetadata>