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
 }

Reply via email to