aboutsummaryrefslogtreecommitdiff
blob: e29ad307c65825998e4f3b30336f3ba15ca51e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="Baresip is a portable and modular SIP User-Agent"
HOMEPAGE="https://github.com/baresip/baresip"
SRC_URI="https://github.com/baresip/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"

IUSE="aac acip alsa amr aptx aom codec2 console dbus echo evdev ffmpeg gstreamer
	  gtk3 jack httpd httpreq mpa mqtt opus pipewire portaudio pulseaudio sdl
	  serreg snapshot sndfile spandsp static-libs syslog tcpcontrol v4l video vpx webrtc X"

RE_PVF="$(ver_cut 1-2)*"

DEPEND="
	dev-libs/openssl:0=
	=net-voip/re-${RE_PVF}
	sys-libs/zlib
	aac? ( media-libs/fdk-aac )
	alsa? ( media-libs/alsa-lib )
	amr? ( media-libs/opencore-amr )
	aom? ( media-libs/libaom )
	aptx? ( media-libs/libopenaptx )
	codec2? ( media-libs/codec2 )
	dbus? (
		dev-util/gdbus-codegen
		sys-apps/dbus
	)
	ffmpeg? ( media-video/ffmpeg )
	gstreamer? (
		media-libs/gstreamer:1.0
		media-libs/gst-plugins-base:1.0
		media-libs/gst-plugins-good:1.0
	)
	gtk3? ( x11-libs/gtk+:3 )
	jack? ( virtual/jack )
	mpa? (
		media-sound/twolame
		media-sound/mpg123
		media-libs/speexdsp
	)
	mqtt? ( app-misc/mosquitto )
	opus? ( media-libs/opus )
	pipewire? ( media-video/pipewire )
	snapshot? ( media-libs/libpng )
	portaudio? ( media-libs/portaudio )
	pulseaudio? ( media-libs/libpulse )
	sdl? ( media-libs/libsdl2 )
	sndfile? ( media-libs/libsndfile )
	spandsp? ( media-libs/spandsp )
	v4l? ( media-libs/libv4l )
	vpx? ( media-libs/libvpx )
	webrtc? ( media-plugins/gst-plugins-webrtc )
	X? ( x11-libs/libX11 )
	"

RDEPEND="${DEPEND}"

src_configure() {
	use aac && MODULES+="aac;"
	use acip && MODULES+="ebuacip;"
	use alsa && MODULES+="alsa;"
	use amr && MODULES+="amr;"
	use aom && MODULES+="av1;"
	use aptx && MODULES+="aptx;"
	use codec2 && MODULES+="codec2;"
	use console && MODULES+="cons;"
	use dbus && MODULES+="ctrl_dbus;"
	use evdev && MODULES+="evdev;"
	use echo && MODULES+="echo;"
	use gtk3 && MODULES+="gtk;"
	use gstreamer && MODULES+="gst;"
	use httpd && MODULES+="httpd;"
	use httpreq && MODULES+="httpreq;"
	use ffmpeg && MODULES+="avcodec;avfilter;avformat;selfview;swscale;"
	use jack && MODULES+="jack;"
	use mpa && MODULES+="mpa;"
	use mqtt && MODULES+="mqtt;"
	use opus && MODULES+="opus;opus_multistream;"
	use pipewire && MODULES+="pipewire;"
	use pulseaudio && MODULES+="pulse;"
	use portaudio && MODULES+="portaudio;"
	use serreg && MODULES+="serreg;"
	use snapshot && MODULES+="snapshot;"
	use sdl && MODULES+="sdl;"
	use sndfile && MODULES+="sndfile;"
	use spandsp && MODULES+="g722;g726;plc;"
	use syslog && MODULES+="syslog;"
	use tcpcontrol && MODULES+="ctrl_tcp;"
	use v4l && MODULES+="v4l2;"
	use video && MODULES+="vidbridge;vidinfo;"
	use vpx && MODULES+="vp8;vp9;"
	use webrtc && MODULES+="webrtc_aec;"
	use X && MODULES+="x11;"
	MODULES+="account;aubridge;auconv;aufile;auresamp;ausine;contact;debug_cmd;dtls_srtp;g711;ice;menu;mixausrc;mixminus;mwi;natpmp;netroam;pcp;presence;turn;rtcpsummary;srtp;stdio;stun;uuid;vumeter"

	local mycmakeargs=(
		-DMODULES="$MODULES"
		-DSTATIC=$(usex static-libs ON OFF)
	)
	cmake_src_configure
}