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

Signed-off-by: Matt Jolly <Matt.Jolly@footclan.ninja>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Matt Jolly
2024-01-16 14:59:03 +10:00
committed by Sam James
parent 978ec32c19
commit e28dc0abdb

View File

@@ -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
}