Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/tox/
Date: Fri, 07 Jan 2022 05:15:13
Message-Id: 1641531977.f507f98aca30fe012a14ee6060a9001766aae94a.sam@gentoo
1 commit: f507f98aca30fe012a14ee6060a9001766aae94a
2 Author: Josiah Mullins <JoMull01 <AT> protonmail <DOT> com>
3 AuthorDate: Tue Dec 21 21:22:45 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 7 05:06:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f507f98a
7
8 net-libs/tox: Bump to version 0.2.13.
9
10 Signed-off-by: Josiah Mullins <JoMull01 <AT> protonmail.com>
11 Bug: https://bugs.gentoo.org/829650
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 net-libs/tox/Manifest | 1 +
15 net-libs/tox/tox-0.2.13.ebuild | 114 +++++++++++++++++++++++++++++++++++++++++
16 2 files changed, 115 insertions(+)
17
18 diff --git a/net-libs/tox/Manifest b/net-libs/tox/Manifest
19 index e976a4f2d42d..e5f406e55e51 100644
20 --- a/net-libs/tox/Manifest
21 +++ b/net-libs/tox/Manifest
22 @@ -1 +1,2 @@
23 DIST c-toxcore-0.2.12.tar.gz 504832 BLAKE2B 625713142cc1e4b6583879144c05d47a40a1d98031a8a2bf0deec85a199f816a0ff6df5c76e9487a526d7c1c1650b37a10ed81be8233eaa1395707851378474f SHA512 c22f139cfff3a5aedf5fb08c33cae0dae3d6fbceec87867c81290e3bf9d2e13466a0e2bad8378a7a7ba1e9b7b9ad756712963461ae248102e4cab7d4691228d8
24 +DIST c-toxcore-0.2.13.tar.gz 511533 BLAKE2B 8c68180710e3d06eaaef9fc05dc0ff2492907586934d1d6f57f147e07bb78b262f78b0057911e4b5cd27d2d1efb51cb714f757b90caa269988e604cafa62cd00 SHA512 f4ed9ea4afb7f9c14a5afd949f3a52e7880838c910acaf5adc39acb09ad574406be08f43b76a9fbdd4fc4bd14f0d73212dc7bd10783565055c910c6c3e5e357a
25
26 diff --git a/net-libs/tox/tox-0.2.13.ebuild b/net-libs/tox/tox-0.2.13.ebuild
27 new file mode 100644
28 index 000000000000..e05b2ca9cd78
29 --- /dev/null
30 +++ b/net-libs/tox/tox-0.2.13.ebuild
31 @@ -0,0 +1,114 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +inherit cmake systemd
38 +
39 +MY_P="c-toxcore-${PV}"
40 +DESCRIPTION="Encrypted P2P, messaging, and audio/video calling platform"
41 +HOMEPAGE="https://tox.chat https://github.com/TokTok/c-toxcore"
42 +SRC_URI="https://github.com/TokTok/c-toxcore/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
43 +
44 +LICENSE="GPL-3+"
45 +SLOT="0/0.2"
46 +KEYWORDS="~amd64 ~arm ~x86"
47 +IUSE="+av daemon dht-node ipv6 log-debug +log-error log-info log-trace log-warn test"
48 +
49 +REQUIRED_USE="?? ( log-debug log-error log-info log-trace log-warn )
50 + daemon? ( dht-node )"
51 +RESTRICT="!test? ( test )"
52 +
53 +BDEPEND="virtual/pkgconfig"
54 +DEPEND="
55 + dev-libs/libsodium:=[asm,urandom,-minimal]
56 + av? (
57 + media-libs/libvpx:=
58 + media-libs/opus
59 + )
60 + daemon? ( dev-libs/libconfig:= )"
61 +RDEPEND="
62 + ${DEPEND}
63 + daemon? (
64 + acct-group/tox
65 + acct-user/tox
66 + )"
67 +
68 +S="${WORKDIR}/${MY_P}"
69 +
70 +src_prepare() {
71 + cmake_src_prepare
72 +
73 + #Remove faulty tests
74 + for testname in lan_discovery save_compatibility set_status_message; do
75 + sed -i -e "/^auto_test(${testname})$/d" CMakeLists.txt || die
76 + done
77 +}
78 +
79 +src_configure() {
80 + local mycmakeargs=(
81 + -DAUTOTEST=$(usex test ON OFF)
82 + -DBOOTSTRAP_DAEMON=$(usex daemon ON OFF)
83 + -DBUILD_MISC_TESTS=$(usex test ON OFF)
84 + -DBUILD_TOXAV=$(usex av ON OFF)
85 + -DDHT_BOOTSTRAP=$(usex dht-node ON OFF)
86 + -DENABLE_SHARED=ON
87 + -DENABLE_STATIC=OFF
88 + -DMUST_BUILD_TOXAV=$(usex av ON OFF)
89 + )
90 +
91 + if use test; then
92 + mycmakeargs+=(
93 + -DTEST_TIMEOUT_SECONDS=150
94 + -DUSE_IPV6=$(usex ipv6 ON OFF)
95 + )
96 + else
97 + mycmakeargs+=(-DUSE_IPV6=OFF)
98 + fi
99 +
100 + if use log-trace; then
101 + mycmakeargs+=(-DMIN_LOGGER_LEVEL="TRACE")
102 + elif use log-debug; then
103 + mycmakeargs+=(-DMIN_LOGGER_LEVEL="DEBUG")
104 + elif use log-info; then
105 + mycmakeargs+=(-DMIN_LOGGER_LEVEL="INFO")
106 + elif use log-warn; then
107 + mycmakeargs+=(-DMIN_LOGGER_LEVEL="WARNING")
108 + elif use log-error; then
109 + mycmakeargs+=(-DMIN_LOGGER_LEVEL="ERROR")
110 + else
111 + mycmakeargs+=(-DMIN_LOGGER_LEVEL="")
112 + einfo "Logging disabled"
113 + fi
114 +
115 + cmake_src_configure
116 +}
117 +
118 +src_test() {
119 + cmake_src_test -j1
120 +}
121 +
122 +src_install() {
123 + cmake_src_install
124 +
125 + if use daemon; then
126 + newinitd "${FILESDIR}"/initd tox-dht-daemon
127 + newconfd "${FILESDIR}"/confd tox-dht-daemon
128 + insinto /etc
129 + doins "${FILESDIR}"/tox-bootstrapd.conf
130 + systemd_dounit "${FILESDIR}"/tox-bootstrapd.service
131 + fi
132 +}
133 +
134 +pkg_postinst() {
135 + if use dht-node; then
136 + ewarn "The QA notice regarding libmisc_tools.so is known by the upstream"
137 + ewarn "developers and is on their TODO list. For more information,"
138 + ewarn "please see 'https://github.com/toktok/c-toxcore/issues/1144'"
139 + ewarn ""
140 + ewarn "There is currently an unresolved issue with tox DHT Bootstrap node"
141 + ewarn "that causes the program to be built with a null library reference."
142 + ewarn "This causes an infinite loop for certain revdep-rebuild commands."
143 + ewarn "If you aren't running a node, please consider disabling the dht-node use flag."
144 + fi
145 +}