From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1591109-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4C6B8158004
	for <garchives@archives.gentoo.org>; Tue, 16 Jan 2024 07:59:56 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 366C3E2B88;
	Tue, 16 Jan 2024 07:59:55 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 1C91FE2B88
	for <gentoo-commits@lists.gentoo.org>; Tue, 16 Jan 2024 07:59:55 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 4E0163432B0
	for <gentoo-commits@lists.gentoo.org>; Tue, 16 Jan 2024 07:59:54 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id BE1B911F4
	for <gentoo-commits@lists.gentoo.org>; Tue, 16 Jan 2024 07:59:52 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1705391963.e28dc0abdb49a100d303076b50f24545e4bf8d15.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/tox/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-libs/tox/tox-9999.ebuild
X-VCS-Directories: net-libs/tox/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: e28dc0abdb49a100d303076b50f24545e4bf8d15
X-VCS-Branch: master
Date: Tue, 16 Jan 2024 07:59:52 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 7bba688a-2091-4932-918a-4f0b982abbe4
X-Archives-Hash: 92f9a5d15994185f875a0a010484b9fd

commit:     e28dc0abdb49a100d303076b50f24545e4bf8d15
Author:     Matt Jolly <Matt.Jolly <AT> footclan <DOT> ninja>
AuthorDate: Tue Jan 16 04:59:03 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 16 07:59:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e28dc0ab

net-libs/tox: make live ebuild a template; fix QA issues

Signed-off-by: Matt Jolly <Matt.Jolly <AT> footclan.ninja>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/tox/tox-9999.ebuild | 46 ++++++++++++++++++++++++++++----------------
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/net-libs/tox/tox-9999.ebuild b/net-libs/tox/tox-9999.ebuild
index a529f806e7a6..e8d52a959406 100644
--- a/net-libs/tox/tox-9999.ebuild
+++ b/net-libs/tox/tox-9999.ebuild
@@ -1,33 +1,40 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit cmake git-r3 systemd
+inherit cmake systemd
 
 DESCRIPTION="Encrypted P2P, messaging, and audio/video calling platform"
-HOMEPAGE="https://tox.chat"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/TokTok/c-toxcore.git"
+HOMEPAGE="https://tox.chat https://github.com/TokTok/c-toxcore"
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/TokTok/c-toxcore.git"
+else
+	MY_P="c-toxcore-${PV}"
+	SRC_URI="https://github.com/TokTok/c-toxcore/releases/download/v${PV}/${MY_P}.tar.gz"
+	KEYWORDS="~amd64 ~arm ~x86"
+	S="${WORKDIR}/${MY_P}"
+fi
 
 LICENSE="GPL-3+"
 SLOT="0/0.2"
-KEYWORDS=""
 IUSE="+av debug daemon dht-node ipv6 key-utils log-debug +log-error log-info log-trace log-warn test"
-RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( log-debug log-error log-info log-trace log-warn )
 		daemon? ( dht-node )"
+RESTRICT="!test? ( test )"
 
 BDEPEND="virtual/pkgconfig"
-DEPEND="dev-libs/libsodium:=[asm,urandom,-minimal]
+DEPEND="dev-libs/libsodium:=[asm,urandom,-minimal(-)]
 	av? (
 		media-libs/libvpx:=
 		media-libs/opus
 	)
 	daemon? ( dev-libs/libconfig:= )"
-RDEPEND="
-	${DEPEND}
+
+RDEPEND="${DEPEND}
 	daemon? (
 		acct-group/tox
 		acct-user/tox
@@ -37,7 +44,7 @@ RDEPEND="
 src_prepare() {
 	cmake_src_prepare
 
-	#remove faulty tests
+	#Remove faulty tests
 	for testname in lan_discovery save_load; do
 		sed -i -e "/^auto_test(${testname})$/d" ./auto_tests/CMakeLists.txt || die
 	done
@@ -55,12 +62,16 @@ src_configure() {
 		-DDHT_BOOTSTRAP=$(usex dht-node ON OFF)
 		-DENABLE_SHARED=ON
 		-DENABLE_STATIC=OFF
-		-DMUST_BUILD_TOXAV=$(usex av ON OFF))
+		-DFULLY_STATIC=OFF
+		-DMUST_BUILD_TOXAV=$(usex av ON OFF)
+	)
+
 	if use test; then
 		mycmakeargs+=(
 			-DTEST_TIMEOUT_SECONDS=150
 			-DNON_HERMETIC_TESTS=OFF
-			-DUSE_IPV6=$(usex ipv6 ON OFF))
+			-DUSE_IPV6=$(usex ipv6 ON OFF)
+		)
 	else
 		mycmakeargs+=(-DUSE_IPV6=OFF)
 	fi
@@ -77,8 +88,9 @@ src_configure() {
 		mycmakeargs+=(-DMIN_LOGGER_LEVEL="ERROR")
 	else
 		mycmakeargs+=(-DMIN_LOGGER_LEVEL="")
-		einfo "Logging Disabled"
+		einfo "Logging disabled"
 	fi
+
 	cmake_src_configure
 }
 
@@ -104,9 +116,9 @@ pkg_postinst() {
 		ewarn "developers and is on their TODO list. For more information,"
 		ewarn "please see 'https://github.com/toktok/c-toxcore/issues/1144'"
 		ewarn ""
-		ewarn "There is currently an unresolved issuer with tox DHT Bootstrap node"
-		ewarn "that causes the program to be built with a null libray reference."
+		ewarn "There is currently an unresolved issue with tox DHT Bootstrap node"
+		ewarn "that causes the program to be built with a null library reference."
 		ewarn "This causes an infinite loop for certain revdep-rebuild commands."
-		ewarn "If you aren't running a node, consider disabling the dht node use flag"
+		ewarn "If you aren't running a node, please consider disabling the dht-node use flag."
 	fi
 }