src_prepare-overlay/dev-cpp/sdbus-cpp/sdbus-cpp-1.2.0.ebuild
Alfred Wingate 76271cb738
dev-cpp/sdbus-cpp: add 1.2.0
Signed-off-by: Alfred Wingate <parona@protonmail.com>
2023-07-17 19:15:59 +03:00

71 lines
1.3 KiB
Bash

# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="High-level C++ D-Bus library for Linux"
HOMEPAGE="https://github.com/Kistler-Group/sdbus-cpp/"
SYSTEMDVER="253"
SRC_URI="
https://github.com/Kistler-Group/sdbus-cpp/archive/v${PV}.tar.gz -> ${P}.tar.gz
!systemd? (
https://github.com/systemd/systemd-stable/archive/v"${SYSTEMDVER}".tar.gz
-> systemd-stable-"${SYSTEMDVER}".tar.gz
)
"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc examples systemd test"
RESTRICT="!test? ( test )"
CDEPEND="
systemd? ( sys-apps/systemd )
"
DEPEND="
${CDEPEND}
test? (
dev-cpp/gtest
)
"
RDEPEND="
${CDEPEND}
"
BDEPEND="
virtual/pkgconfig
test? (
sys-apps/dbus
)
"
PATCHES=( "${FILESDIR}/remove_download_from_external_project-1.patch" )
src_prepare() {
cmake_src_prepare
use systemd || mv "${WORKDIR}"/systemd-stable-"${SYSTEMDVER}" "${S}"_build/systemd || die
}
src_configure() {
local mycmakeargs=(
-DBUILD_CODE_GEN=ON
-DBUILD_LIBSYSTEMD=$(usex !systemd)
-DBUILD_TESTS=$(usex test)
-DBUILD_EXAMPLES=$(usex examples)
-DBUILD_SHARED_LIBS=ON
-DBUILD_DOC=$(usex doc)
)
cmake_src_configure
}
src_test() {
local myctestargs=(
# Requires system level configs for dbus
--exclude-regex integration-tests
)
cmake_src_test
}