dev-cpp/sdbus-c++: add 2.0.0

Signed-off-by: John M. Harris Jr. <johnmh@johnmh.me>
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
John M. Harris Jr.
2024-10-26 11:56:12 -07:00
committed by James Le Cuirot
parent 4a2aa07963
commit b9c8018413
2 changed files with 75 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST sdbus-c++-1.4.0.tar.gz 224529 BLAKE2B a82656f3d1b98bbf4f7f83c708e507168105a2c2341df3983f782c2590b9e0e1811fb594065c248d8d93a3b4ca31ca99c141f0ecbab050d7358f78a499ceede2 SHA512 8b13dc57f15de482f59edfff7cdd4e2b4e2e659b9cdff9f946783bb0bf1ec735f789675dd19ebe7d38a06358fe77dcfabdc2a387660af00f2c0f3962de214d76
DIST sdbus-c++-2.0.0.tar.gz 243202 BLAKE2B 946a7d87b882ae44843864311fc93ddf010a4f3fe3d341fb5d3f05890f2693d341082007db94f57eee06bf60e3f3a1adc35e63bbf057883b4a6d0b466791def0 SHA512 638453d2ea0d5ba556eacda59ca114896bf275d227b33b525259bf69dac3d766df6586046e6ea83a8c1afe9fb0701f4d358819ed9300bab598e775a0a2880917

View File

@@ -0,0 +1,74 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit meson cmake
DESCRIPTION="High-level C++ D-Bus library"
HOMEPAGE="https://github.com/Kistler-Group/sdbus-cpp"
SRC_URI="https://github.com/Kistler-Group/sdbus-cpp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-2.1+ Nokia-Qt-LGPL-Exception-1.1" # Nothing to do with Qt but exception text is exactly the same.
SLOT="0/2"
KEYWORDS="~amd64"
IUSE="doc +elogind systemd test tools"
REQUIRED_USE="?? ( elogind systemd )"
RESTRICT="!test? ( test )"
RDEPEND="
elogind? ( >=sys-auth/elogind-252 )
systemd? ( >=sys-apps/systemd-252:= )
!elogind? ( !systemd? ( >=sys-libs/basu-0.2.1 ) )
tools? ( dev-libs/expat )
"
DEPEND="
${RDEPEND}
test? ( >=dev-cpp/gtest-1.14.0 )
"
BDEPEND="
virtual/pkgconfig
doc? ( app-text/doxygen[dot] )
"
S="${WORKDIR}/sdbus-cpp-${PV}"
src_configure() {
local mycmakeargs=(
-DSDBUSCPP_BUILD_CODEGEN=$(usex tools)
-DSDBUSCPP_BUILD_DOCS=yes
-DSDBUSCPP_BUILD_DOXYGEN_DOCS=$(usex doc)
-DSDBUSCPP_BUILD_LIBSYSTEMD=no
-DSDBUSCPP_BUILD_TESTS=$(usex test)
)
cmake_src_configure
}
src_compile() {
cmake_src_compile all $(usev doc)
}
src_test() {
if ! cmp -s {"${S}"/tests/integrationtests/files,/etc/dbus-1/system.d}/org.sdbuscpp.integrationtests.conf; then
ewarn "Not running the tests as a D-Bus configuration file has not been"
ewarn "installed yet or has changed since. The tests can be run after"
ewarn "the package has been merged."
return
elif [[ ! -S /run/dbus/system_bus_socket ]]; then
ewarn "Not running the tests as the system-wide D-Bus daemon is unavailable."
return
fi
cmake_src_test
}
src_install() {
cmake_src_install
rm -v "${ED}"/usr/share/doc/${PF}/COPYING || die
if use test; then
# Delete installed test binaries.
rm -rv "${ED}"/usr/tests || die
fi
}