summaryrefslogtreecommitdiff
blob: edb2a4ed8ad64244eb9470856bd799c4ba907ad0 (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
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
inherit multilib-minimal toolchain-funcs

DESCRIPTION="GStreamer plugin for ICE (RFC 5245) support"
HOMEPAGE="https://nice.freedesktop.org/wiki/"
MY_P=libnice-${PV}
SRC_URI="https://nice.freedesktop.org/releases/${MY_P}.tar.gz"

LICENSE="|| ( MPL-1.1 LGPL-2.1 )"
SLOT="1.0"
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
IUSE=""

RDEPEND="
	~net-libs/libnice-${PV}[${MULTILIB_USEDEP}]
	media-libs/gstreamer:${SLOT}[${MULTILIB_USEDEP}]
	media-libs/gst-plugins-base:${SLOT}[${MULTILIB_USEDEP}]
"
DEPEND="${RDEPEND}
	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
"

S=${WORKDIR}/${MY_P}

src_prepare() {
	default
	sed -e 's:$(top_builddir)/nice/libnice.la:$(NICE_LIBS):' \
		-i gst/Makefile.{am,in} || die "sed failed"
}

multilib_src_configure() {
	# gnutls vs openssl left intentionally automagic here - the chosen USE flag configuration of libnice will ensure
	# one of them is present, configure will be happy, but gstreamer bits don't use it, so it doesn't matter.
	# gupnp is not used in the gst plugin.
	ECONF_SOURCE=${S} \
	econf \
		--enable-compile-warnings=yes \
		--disable-static \
		--disable-static-plugins \
		--without-gstreamer-0.10 \
		--with-gstreamer \
		--with-crypto-library=auto \
		--disable-introspection \
		--disable-gupnp
}

multilib_src_compile() {
	emake -C gst \
		NICE_LIBS="$($(tc-getPKG_CONFIG) --libs-only-l nice)"
}

multilib_src_test() {
	:
}

multilib_src_install() {
	emake -C gst DESTDIR="${D}" install
}

multilib_src_install_all() {
	find "${ED}" -name '*.la' -delete || die
}