Files
guru/dev-cpp/trantor/trantor-1.5.13.ebuild
tastytea 0cba64b4ed dev-cpp/trantor: add 1.5.13
Signed-off-by: tastytea <gentoo@tastytea.de>
2023-08-26 12:35:14 +02:00

50 lines
1.0 KiB
Bash

# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Non-blocking I/O tcp network lib based on c++14/17"
HOMEPAGE="https://github.com/an-tao/trantor"
SRC_URI="https://github.com/an-tao/trantor/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="adns doc +ssl test"
RESTRICT="!test? ( test )"
RDEPEND="
adns? ( net-dns/c-ares:= )
ssl? ( dev-libs/openssl:= )
"
DEPEND="
${RDEPEND}
test? ( dev-cpp/gtest )
"
BDEPEND="doc? ( app-doc/doxygen[dot] )"
src_prepare() {
sed -i 's/ -Werror)$/)/' CMakeLists.txt || die "could not remove -Werror"
cmake_src_prepare
}
src_configure() {
local -a mycmakeargs=(
"-DBUILD_SHARED_LIBS=YES"
"-DBUILD_DOC=$(usex doc)"
"-DBUILD_TESTING=$(usex test)"
"-DBUILD_C-ARES=$(usex adns)"
"-DTRANTOR_USE_TLS=$(usex ssl openssl none)"
)
cmake_src_configure
}
src_install() {
use doc && HTML_DOCS="${BUILD_DIR}/docs/trantor/html/*"
cmake_src_install
}