# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit lomiri

if [[ ${PV} == 9999 ]]; then
    KEYWORDS=""
    EGIT_REPO_URI="https://gitlab.com/ubports/development/core/lib-cpp/${PN}.git"
    inherit git-r3
else
    KEYWORDS="~amd64"
    SRC_URI="https://gitlab.com/ubports/development/core/lib-cpp/${PN}/-/archive/${PV}/${P}.tar.gz"
fi

DESCRIPTION="Simple yet beautiful networking API for C++11"
HOMEPAGE="https://gitlab.com/ubports/development/core/lib-cpp/${PN}"
LICENSE="LGPL-3"
SLOT="0"
RESTRICT="test mirror"

DEPEND="
    dev-libs/boost
    net-misc/curl
"
RDEPEND="${DEPEND}"

BDEPEND="
    dev-build/cmake
    dev-build/samurai
    virtual/pkgconfig
"

src_configure() {
    local mycmakeargs=(
        -DBUILD_TESTING=OFF
        -DNET_CPP_ENABLE_DOC_GENERATION=OFF
    )

    lomiri_src_configure
}