commit:     f0e8b63ec921dd92192295801d36c1deacac4b32
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 24 22:00:26 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 23:50:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0e8b63e

net-libs/libquotient: add 0.7.0

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 net-libs/libquotient/Manifest                      |  1 +
 .../files/libquotient-0.7.0-no-android.patch       | 29 ++++++++++++++++
 .../files/libquotient-0.7.0-no-tests.patch         | 34 ++++++++++++++++++
 net-libs/libquotient/libquotient-0.7.0.ebuild      | 40 ++++++++++++++++++++++
 4 files changed, 104 insertions(+)

diff --git a/net-libs/libquotient/Manifest b/net-libs/libquotient/Manifest
index 95feba5e741b..1db805f951f8 100644
--- a/net-libs/libquotient/Manifest
+++ b/net-libs/libquotient/Manifest
@@ -1 +1,2 @@
 DIST libquotient-0.6.11.tar.gz 562144 BLAKE2B 
75be68371ac1873e38f9ff81273419ed1eb773d02408137a7dafc9a60f520a2ba0b5556783272f8902dd98f7f5dac3a92ab393da5dd48acfffeba8b1631a84dd
 SHA512 
76a11c80822ae3279d643559b481a09fe45b1f8effb7b0efeeb7ab54f13dd06997d9220dcb36c13d270f5641f496dba350f528c49e239757f4546de9fbe940fa
+DIST libquotient-0.7.0.tar.gz 667312 BLAKE2B 
020baf8bcbbcedd6220e4f3476b152b3a0e88d53786e5b4575f9c096aa36847220a186ca782e068b2fd1f54771e45e1b313d10913af2cc2be3a1c45074acb733
 SHA512 
6770e3caa6198a77fc33bf7edd2a34d5673e01474b639aa020af989046ff04c44ff5ce26b6418ae31fcca49cc54a147052153ed5c60706f26c177ebd57d452c5

diff --git a/net-libs/libquotient/files/libquotient-0.7.0-no-android.patch 
b/net-libs/libquotient/files/libquotient-0.7.0-no-android.patch
new file mode 100644
index 000000000000..f6cc8f838f1a
--- /dev/null
+++ b/net-libs/libquotient/files/libquotient-0.7.0-no-android.patch
@@ -0,0 +1,29 @@
+From 41299fe27a428bf02880865b7f8c1a7bee3f8ad5 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Sun, 3 Jan 2021 15:18:01 +0100
+Subject: [PATCH] Install EXPORT_ANDROID_MK only if(ANDROID)
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 523f5ae7..613e270c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -381,7 +381,10 @@ install(FILES
+     
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake"
+     DESTINATION ${CMakeFilesLocation}
+ )
+-install(EXPORT_ANDROID_MK ${PROJECT_NAME}Targets DESTINATION 
${CMAKE_INSTALL_DATADIR}/ndk-modules)
++
++if (ANDROID)
++    install(EXPORT_ANDROID_MK ${PROJECT_NAME}Targets DESTINATION 
${CMAKE_INSTALL_DATADIR}/ndk-modules)
++endif ()
+ 
+ if (WIN32)
+     install(FILES mime/packages/freedesktop.org.xml DESTINATION mime/packages)
+-- 
+2.39.0
+

diff --git a/net-libs/libquotient/files/libquotient-0.7.0-no-tests.patch 
b/net-libs/libquotient/files/libquotient-0.7.0-no-tests.patch
new file mode 100644
index 000000000000..510b8a0a4d28
--- /dev/null
+++ b/net-libs/libquotient/files/libquotient-0.7.0-no-tests.patch
@@ -0,0 +1,34 @@
+From e5cc442f13aee922f6b2a954ad52b7aa8c558b2c Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Sat, 24 Dec 2022 22:51:12 +0100
+Subject: [PATCH] Put Qt5Test dependency behind -DBUILD_TESTING
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 523f5ae7..9ae697b2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -93,7 +93,7 @@ else()
+     set(QtExtraModules "Multimedia") # See #483
+ endif()
+ string(REGEX REPLACE "^(.).*" "Qt\\1" Qt ${QtMinVersion}) # makes "Qt5" or 
"Qt6"
+-find_package(${Qt} ${QtMinVersion} REQUIRED Core Network Gui Test 
${QtExtraModules})
++find_package(${Qt} ${QtMinVersion} REQUIRED Core Network Gui 
${QtExtraModules})
+ get_filename_component(Qt_Prefix "${${Qt}_DIR}/../../../.." ABSOLUTE)
+ message(STATUS "Using Qt ${${Qt}_VERSION} at ${Qt_Prefix}")
+ 
+@@ -342,6 +342,7 @@ configure_file(${PROJECT_NAME}.pc.in 
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}
+ # Configure testing
+ 
+ if (BUILD_TESTING)
++    find_package(${Qt}Test ${QtMinVersion} REQUIRED)
+     enable_testing()
+     add_subdirectory(quotest)
+     add_subdirectory(autotests)
+-- 
+2.39.0
+

diff --git a/net-libs/libquotient/libquotient-0.7.0.ebuild 
b/net-libs/libquotient/libquotient-0.7.0.ebuild
new file mode 100644
index 000000000000..11ec72e83ea7
--- /dev/null
+++ b/net-libs/libquotient/libquotient-0.7.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Qt-based SDK to develop applications for Matrix"
+HOMEPAGE="https://github.com/quotient-im/libQuotient";
+SRC_URI="https://github.com/quotient-im/libQuotient/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/libQuotient-${PV}"
+
+LICENSE="LGPL-2+"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm64 ~ppc64"
+IUSE=""
+
+DEPEND="
+       dev-libs/qtkeychain:=[qt5(+)]
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+       dev-qt/qtmultimedia:5
+       dev-qt/qtnetwork:5[ssl]
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       # downstream patches
+       "${FILESDIR}"/${P}-no-android.patch
+       "${FILESDIR}"/${P}-no-tests.patch
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_WITH_QT6=OFF
+               -DBUILD_TESTING=OFF
+               -DQuotient_ENABLE_E2EE=OFF # TODO: libolm, libqtolm not packaged
+       )
+       cmake_src_configure
+}

Reply via email to