summaryrefslogtreecommitdiff
path: root/media-libs/libtgvoip
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libtgvoip')
-rw-r--r--media-libs/libtgvoip/Manifest2
-rw-r--r--media-libs/libtgvoip/libtgvoip-2.4.4_p20240706.ebuild63
2 files changed, 65 insertions, 0 deletions
diff --git a/media-libs/libtgvoip/Manifest b/media-libs/libtgvoip/Manifest
index a3dffb7007bb..c9783d910596 100644
--- a/media-libs/libtgvoip/Manifest
+++ b/media-libs/libtgvoip/Manifest
@@ -1,3 +1,5 @@
DIST libtgvoip-2.4.4_p20221208.tar.gz 1098020 BLAKE2B 6f1eae38e4396ca3b88ab4337176a6076d5f9008b2a865cd286265a9b73d83d44c2cc6828b65dcb580a897a19badeab502395e2128a15c276ae796ac1ab0da68 SHA512 62243629890b1c13f1dbbffae4f82964a0fe23d2071852730674ccbef31126c6e205cfa526f07ba1549ef8eae31e371fb4335ce5f95fd649560bee2b3b530e64
+DIST libtgvoip-2.4.4_p20240706.tar.gz 1089879 BLAKE2B 0b0b83d4c43b18ab6af0cfd2795887180c4cb89d2b4ca22680a472e61c4908a4d2634fcb14677702bc9dc10e0df8d61029e0d361aa53303940cfbec36516afee SHA512 80d09c3e2a02461a2e71855ef086d453c4a95829c8183c7768f390bef82ab2124a3059931a043704e010d5e9ca512ee3001eb054dd3903f84ab51970e52e2ef4
EBUILD libtgvoip-2.4.4_p20221208-r1.ebuild 1590 BLAKE2B acd78346ce651d81b37c5aa9aebdef2fc0aa08d11279f948a28bad7488542c4e4911ef462a90e03f7064de3f27b7a42faf96d5a1be36154bfb74609efbc7535e SHA512 58dad0923ce053873c4a16e67871d4bd35ec1ae1833d1dc3792fbb480e7829c09ca8797c39e5b8e2e28513db42e82e9de51a1e4d7082b18806c622b9fb8f6a3a
+EBUILD libtgvoip-2.4.4_p20240706.ebuild 1591 BLAKE2B 1811a79497aee8bcda032cdfa2aba5bc458a2fd826b94fc996a66ed3209b3f10709ca70c312247504bcfe40486a5c63a0e5a1736f62b6644c7c83ca397b8c1a7 SHA512 ab6d334ab4ac2de1b266a3cbb130321cffc9d1a47972b579d426d2a6295bde8d222889394e2f27351662dfb759662bf453db5e28a3f07dc3651a4d749a2df78d
MISC metadata.xml 633 BLAKE2B 53413d3bf4124e2d415bd0851deac01649bdf5f44069805a8e8904b93a0ad731df46169813955670aafedb6630a6fe7102b5954339df59435aafa6a6a35bd954 SHA512 96a69dcfd9e0b615fefb8ea9a8715ad2a2d4c62ce59e725434de3fe42889bb93c2b4ac1fbd2d20a23be62c9a59ca70e93f883247a83f344ff9abde2970cd4e50
diff --git a/media-libs/libtgvoip/libtgvoip-2.4.4_p20240706.ebuild b/media-libs/libtgvoip/libtgvoip-2.4.4_p20240706.ebuild
new file mode 100644
index 000000000000..3032ed6833b6
--- /dev/null
+++ b/media-libs/libtgvoip/libtgvoip-2.4.4_p20240706.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic autotools
+
+DESCRIPTION="VoIP library for Telegram clients"
+HOMEPAGE="https://github.com/telegramdesktop/libtgvoip"
+
+LIBTGVOIP_COMMIT="2d2592860478e60d972b96e67ee034b8a71bb57a"
+SRC_URI="https://github.com/telegramdesktop/libtgvoip/archive/${LIBTGVOIP_COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${LIBTGVOIP_COMMIT}"
+
+LICENSE="Unlicense"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv"
+IUSE="+dsp +alsa pulseaudio"
+
+DEPEND="
+ dev-libs/openssl:=
+ media-libs/opus
+ alsa? ( media-libs/alsa-lib )
+ dsp? ( media-libs/tg_owt:= )
+ pulseaudio? ( media-libs/libpulse )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+REQUIRED_USE="
+ || ( alsa pulseaudio )
+"
+
+src_prepare() {
+ # Will be controlled by us
+ sed -i -e '/^CFLAGS += -DTGVOIP_NO_DSP/d' Makefile.am || die
+ # https://bugs.gentoo.org/717210
+ echo 'libtgvoip_la_LIBTOOLFLAGS = --tag=CXX' >> Makefile.am || die
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # Not using the CMake build despite being the preferred one, because
+ # it's lacking relevant configure options.
+ local myconf=(
+ --disable-dsp # WebRTC is linked from tg_owt
+ $(use_with alsa)
+ $(use_with pulseaudio pulse)
+ )
+ if use dsp; then
+ append-cppflags "-I${ESYSROOT}/usr/include/tg_owt"
+ append-cppflags "-I${ESYSROOT}/usr/include/tg_owt/third_party/abseil-cpp"
+ append-libs '-ltg_owt'
+ else
+ append-cppflags '-DTGVOIP_NO_DSP'
+ fi
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}