48 lines
923 B
Bash
48 lines
923 B
Bash
# Copyright 2022-2023 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit cmake
|
|
|
|
if [[ ${PV} == *9999* ]]; then
|
|
EGIT_REPO_URI="https://github.com/paullouisageneau/${PN}"
|
|
inherit git-r3
|
|
else
|
|
SRC_URI="https://github.com/paullouisageneau/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
|
KEYWORDS="~amd64"
|
|
fi
|
|
|
|
DESCRIPTION="C/C++ WebRTC network library"
|
|
HOMEPAGE="https://github.com/paullouisageneau/libdatachannel"
|
|
|
|
LICENSE="MPL-2.0"
|
|
SLOT="0"
|
|
IUSE="nice"
|
|
|
|
RDEPEND="
|
|
dev-libs/openssl
|
|
net-libs/usrsctp
|
|
dev-cpp/plog
|
|
net-libs/libsrtp[openssl]
|
|
dev-cpp/nlohmann_json
|
|
nice? ( net-libs/libnice ) || ( dev-libs/libjuice )
|
|
"
|
|
|
|
DEPEND="
|
|
${RDEPEND}
|
|
"
|
|
|
|
src_configure() {
|
|
local mycmakeargs=(
|
|
-DUSE_SYSTEM_SRTP=1
|
|
-DUSE_SYSTEM_USRSCTP=1
|
|
-DUSE_SYSTEM_PLOG=1
|
|
-DUSE_SYSTEM_JSON=1
|
|
-DUSE_SYSTEM_JUICE=1
|
|
-DUSE_GNUTLS=0
|
|
-DUSE_NICE=$(usex nice)
|
|
)
|
|
cmake_src_configure
|
|
}
|