Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libtgvoip/
Date: Mon, 03 May 2021 17:01:52
Message-Id: 1620061297.2a8fe601bd8edca219a319602da3b73da92e5dd9.gyakovlev@gentoo
1 commit: 2a8fe601bd8edca219a319602da3b73da92e5dd9
2 Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
3 AuthorDate: Tue Apr 27 22:11:34 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Mon May 3 17:01:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a8fe601
7
8 media-libs/libtgvoip: Make pulseaudio optional again
9
10 Also drop libressl, tg_owt requires openssl, and nobody's complained...
11 That said, does anyone use USE=-dsp? Does it even work?
12
13 Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
14 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
15
16 .../libtgvoip/libtgvoip-2.4.4_p20210302-r1.ebuild | 62 ++++++++++++++++++++++
17 1 file changed, 62 insertions(+)
18
19 diff --git a/media-libs/libtgvoip/libtgvoip-2.4.4_p20210302-r1.ebuild b/media-libs/libtgvoip/libtgvoip-2.4.4_p20210302-r1.ebuild
20 new file mode 100644
21 index 00000000000..61e1244e5dd
22 --- /dev/null
23 +++ b/media-libs/libtgvoip/libtgvoip-2.4.4_p20210302-r1.ebuild
24 @@ -0,0 +1,62 @@
25 +# Copyright 2020-2021 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +inherit flag-o-matic autotools
31 +
32 +LIBTGVOIP_COMMIT="0c0a6e476df58ee441490da72ca7a32f83e68dbd"
33 +
34 +DESCRIPTION="VoIP library for Telegram clients"
35 +HOMEPAGE="https://github.com/telegramdesktop/libtgvoip"
36 +SRC_URI="https://github.com/telegramdesktop/libtgvoip/archive/${LIBTGVOIP_COMMIT}.tar.gz -> ${P}.tar.gz"
37 +
38 +LICENSE="Unlicense"
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~ppc64"
41 +IUSE="+dsp +alsa pulseaudio"
42 +
43 +DEPEND="
44 + media-libs/opus:=
45 + alsa? ( media-libs/alsa-lib )
46 + dsp? ( media-libs/tg_owt )
47 + pulseaudio? ( media-sound/pulseaudio )
48 +"
49 +RDEPEND="${DEPEND}"
50 +BDEPEND="virtual/pkgconfig"
51 +REQUIRED_USE="
52 + || ( alsa pulseaudio )
53 +"
54 +
55 +S="${WORKDIR}/${PN}-${LIBTGVOIP_COMMIT}"
56 +
57 +src_prepare() {
58 + # Will be controlled by us
59 + sed -i -e '/^CFLAGS += -DTGVOIP_NO_DSP/d' Makefile.am || die
60 + default
61 + # https://bugs.gentoo.org/717210
62 + echo 'libtgvoip_la_LIBTOOLFLAGS = --tag=CXX' >> Makefile.am || die
63 + eautoreconf
64 +}
65 +
66 +src_configure() {
67 + local myconf=(
68 + --disable-static
69 + --disable-dsp # WebRTC is linked from tg_owt
70 + $(use_with alsa)
71 + $(use_with pulseaudio pulse)
72 + )
73 + if use dsp; then
74 + append-cppflags '-I/usr/include/tg_owt'
75 + append-cppflags '-I/usr/include/tg_owt/third_party/abseil-cpp'
76 + append-libs '-ltg_owt'
77 + else
78 + append-cppflags '-DTGVOIP_NO_DSP'
79 + fi
80 + econf "${myconf[@]}"
81 +}
82 +
83 +src_install() {
84 + default
85 + find "${D}" -name '*.la' -delete || die
86 +}