# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 PYTHON_COMPAT=( python3_{11..14} ) inherit cmake flag-o-matic python-r1 DESCRIPTION="SIP library supporting voice/video calls and text messaging" HOMEPAGE="https://gitlab.linphone.org/BC/public/liblinphone" SRC_URI="https://gitlab.linphone.org/BC/public/${PN}/-/archive/${PV}/${P}.tar.bz2" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug doc ldap lime qrcode test tools" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="test" # needs include from belle-sip RDEPEND="dev-cpp/belr dev-cpp/jsoncpp dev-cpp/xsd dev-db/sqlite:3 |' src/http/http-client.h \ src/core/core.cpp \ || die "sed failed for json" # rename target, name is used further in linking with linphone sed -i '/set(JsonCPP_TARGET/s|_lib||' cmake/FindJsonCPP.cmake \ || die "sed failed for FindJsonCPP.cmake" cmake_src_prepare } src_configure() { local mycmakeargs=( -DENABLE_CONSOLE_UI=YES -DENABLE_DEBUG_LOGS="$(usex debug)" -DENABLE_DOC="$(usex doc)" -DENABLE_LDAP="$(usex ldap)" -DENABLE_LIME_X3DH="$(usex lime)" -DENABLE_QRCODE="$(usex qrcode)" -DENABLE_STRICT=NO -DENABLE_TOOLS="$(usex tools)" -DENABLE_UNIT_TESTS="$(usex test)" -Wno-dev ) append-flags -Wno-error=incompatible-pointer-types cmake_src_configure } src_test() { "${S}"_build/tester/liblinphone-tester \ --resource-dir "${S}"/tester/ \ || die "tests failed" cmake_src_test } src_install() { cmake_src_install # path is needed for LibLinphoneConfig.cmake # portage doesn't install empty dirs keepdir /usr/"$(get_libdir)"/liblinphone/plugins }