1 |
commit: 9e2eb6cf66ed0095be122abec0d033d9dbc77417 |
2 |
Author: Josiah Mullins <jomull01 <AT> protonmail <DOT> com> |
3 |
AuthorDate: Sat Oct 19 01:57:21 2019 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 4 06:07:42 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e2eb6cf |
7 |
|
8 |
net-libs/tox: update tox-9999 |
9 |
|
10 |
This commit introduces compatability with GLEP 81; |
11 |
updates the EAPI from 6 to 7; updates the cflags |
12 |
options; disables dht-node by default; and |
13 |
optimizes the package requirement section. |
14 |
|
15 |
Signed-off-by: Josiah Mullins <JoMull01 <AT> protonmail.com> |
16 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
17 |
|
18 |
net-libs/tox/tox-9999.ebuild | 89 ++++++++++++++++++++++++++++++++------------ |
19 |
1 file changed, 65 insertions(+), 24 deletions(-) |
20 |
|
21 |
diff --git a/net-libs/tox/tox-9999.ebuild b/net-libs/tox/tox-9999.ebuild |
22 |
index 3c267ef0e1e..501b16dc726 100644 |
23 |
--- a/net-libs/tox/tox-9999.ebuild |
24 |
+++ b/net-libs/tox/tox-9999.ebuild |
25 |
@@ -1,9 +1,9 @@ |
26 |
-# Copyright 1999-2018 Gentoo Foundation |
27 |
+# Copyright 1999-2019 Gentoo Authors |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
|
30 |
-EAPI=6 |
31 |
+EAPI=7 |
32 |
|
33 |
-inherit cmake-utils git-r3 systemd user |
34 |
+inherit cmake-utils git-r3 systemd |
35 |
|
36 |
DESCRIPTION="Encrypted P2P, messaging, and audio/video calling platform" |
37 |
HOMEPAGE="https://tox.chat" |
38 |
@@ -13,29 +13,66 @@ EGIT_REPO_URI="https://github.com/TokTok/c-toxcore.git" |
39 |
LICENSE="GPL-3+" |
40 |
SLOT="0/0.2" |
41 |
KEYWORDS="" |
42 |
-IUSE="+av daemon log-debug log-trace +no-log static-libs test" |
43 |
+IUSE="+av daemon dht-node ipv6 log-debug +log-error log-info log-trace log-warn static-libs test" |
44 |
|
45 |
-REQUIRED_USE="^^ ( no-log log-trace log-debug )" |
46 |
+REQUIRED_USE="^^ ( log-debug log-error log-info log-trace log-warn ) |
47 |
+ daemon? ( dht-node )" |
48 |
|
49 |
-RDEPEND=" |
50 |
- av? ( media-libs/libvpx:= |
51 |
+COMMON_DEPEND=" |
52 |
+ av? ( media-libs/libvpx |
53 |
media-libs/opus ) |
54 |
- daemon? ( dev-libs/libconfig ) |
55 |
+ daemon? ( acct-group/tox |
56 |
+ acct-user/tox |
57 |
+ dev-libs/libconfig ) |
58 |
>=dev-libs/libsodium-0.6.1:=[asm,urandom,-minimal]" |
59 |
-DEPEND="${RDEPEND} |
60 |
- virtual/pkgconfig" |
61 |
+BDEPEND="virtual/pkgconfig" |
62 |
+ |
63 |
+DEPEND="${COMMON_DEPEND}" |
64 |
+ |
65 |
+RDEPEND="${COMMON_DEPEND}" |
66 |
+ |
67 |
+src_prepare() { |
68 |
+ cmake-utils_src_prepare |
69 |
+ #remove faulty tests |
70 |
+ for testname in bootstrap lan_discovery save_compatibility tcp_relay tox_many_tcp; do |
71 |
+ sed -i -e "/^auto_test(${testname})$/d" CMakeLists.txt || die |
72 |
+ done |
73 |
+} |
74 |
|
75 |
src_configure() { |
76 |
local mycmakeargs=( |
77 |
- -DTRACE=$(usex log-trace) |
78 |
- -DDEBUG=$(usex log-debug) |
79 |
- -DBUILD_TOXAV=$(usex av) |
80 |
- -DMUST_BUILD_TOXAV=$(usex av) |
81 |
- -DBUILD_AV_TEST=$(usex av) |
82 |
+ -DAUTOTEST=$(usex test) |
83 |
-DBOOTSTRAP_DAEMON=$(usex daemon) |
84 |
+ -DBUILD_TOXAV=$(usex av) |
85 |
+ -DDHT_BOOTSTRAP=$(usex dht-node) |
86 |
+ -DENABLE_SHARED=ON |
87 |
-DENABLE_STATIC=$(usex static-libs) |
88 |
- ) |
89 |
+ -DMUST_BUILD_TOXAV=$(usex av)) |
90 |
+ if use test; then |
91 |
+ mycmakeargs+=( |
92 |
+ -DBUILD_AV_TEST=$(usex av) |
93 |
+ -DTEST_TIMEOUT_SECONDS=120 |
94 |
+ -DUSE_IPV6=$(usex ipv6)) |
95 |
+ else |
96 |
+ mycmakeargs+=( |
97 |
+ -DBUILD_AV_TEST=OFF |
98 |
+ -DUSE_IPV6=OFF) |
99 |
+ fi |
100 |
|
101 |
+ if use log-trace; then |
102 |
+ mycmakeargs+=(-DMIN_LOGGER_LEVEL="TRACE") |
103 |
+ elif use log-debug; then |
104 |
+ mycmakeargs+=(-DMIN_LOGGER_LEVEL="DEBUG") |
105 |
+ elif use log-info; then |
106 |
+ mycmakeargs+=(-DMIN_LOGGER_LEVEL="INFO") |
107 |
+ elif use log-warn; then |
108 |
+ mycmakeargs+=(-DMIN_LOGGER_LEVEL="WARNING") |
109 |
+ elif use log-error; then |
110 |
+ mycmakeargs+=(-DMIN_LOGGER_LEVEL="ERROR") |
111 |
+ else |
112 |
+ mycmakeargs+=(-DMIN_LOGGER_LEVEL="") |
113 |
+ einfo "Logging Disabled" |
114 |
+ fi |
115 |
cmake-utils_src_configure |
116 |
} |
117 |
|
118 |
@@ -49,20 +86,24 @@ src_install() { |
119 |
doins "${FILESDIR}"/tox-bootstrapd.conf |
120 |
systemd_dounit "${FILESDIR}"/tox-bootstrapd.service |
121 |
fi |
122 |
- |
123 |
- find "${D}" -name '*.la' -delete || die |
124 |
} |
125 |
|
126 |
pkg_postinst() { |
127 |
+ if use dht-node; then |
128 |
+ ewarn "There is currently an unresolved issue with tox" |
129 |
+ ewarn "DHT Bootstrap node that causes the program to be" |
130 |
+ ewarn "built with a null library reference. This" |
131 |
+ ewarn "causes an infinite loop for certain rev-dep-rebuild" |
132 |
+ ewarn "commands. If you aren't running a node, please" |
133 |
+ ewarn "consider disabling the dht-node flag" |
134 |
+ fi |
135 |
if use daemon; then |
136 |
- enewgroup tox |
137 |
- enewuser tox -1 -1 -1 tox |
138 |
- if [[ -f ${EROOT%/}/var/lib/tox-dht-bootstrap/key ]]; then |
139 |
+ if [[ -f ${EROOT}/var/lib/tox-dht-bootstrap/key ]]; then |
140 |
ewarn "Backwards compatability with the bootstrap daemon might have been" |
141 |
ewarn "broken a while ago. To resolve this issue, REMOVE the following files:" |
142 |
- ewarn " ${EROOT%/}/var/lib/tox-dht-bootstrap/key" |
143 |
- ewarn " ${EROOT%/}/etc/tox-bootstrapd.conf" |
144 |
- ewarn " ${EROOT%/}/run/tox-dht-bootstrap/tox-dht-bootstrap.pid" |
145 |
+ ewarn " ${EROOT}/var/lib/tox-dht-bootstrap/key" |
146 |
+ ewarn " ${EROOT}/etc/tox-bootstrapd.conf" |
147 |
+ ewarn " ${EROOT}/run/tox-dht-bootstrap/tox-dht-bootstrap.pid" |
148 |
ewarn "Then just re-emerge net-libs/tox" |
149 |
fi |
150 |
fi |