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

EAPI=8

inherit cmake

DESCRIPTION="Lock-free, cross-platform, scalable, extensible multi-agent framework for C++"
HOMEPAGE="https://stiffstream.com/en/products/sobjectizer.html
	https://github.com/Stiffstream/sobjectizer"
SRC_URI="https://github.com/Stiffstream/sobjectizer/releases/download/v${PV}/so-${PV}.tar.bz2"

S="${WORKDIR}/so-${PV}/dev"

LICENSE="BSD-with-attribution"
SLOT="0"
KEYWORDS="~amd64"

# The static library is always built on purpose: RESTinio's CMake
# integration (RESTINIO_DEP_SOBJECTIZER=find) links the
# sobjectizer::StaticLib target exported by the installed package
# configuration.
src_configure() {
	local mycmakeargs=(
		-DBUILD_ALL=OFF
		-DSOBJECTIZER_BUILD_SHARED=ON
		-DSOBJECTIZER_BUILD_STATIC=ON
		-DSOBJECTIZER_INSTALL=ON
	)
	cmake_src_configure
}