# Copyright 2026 Shin'ya Minazuki EAPI=8 inherit git-r3 toolchain-funcs DESCRIPTION="Service monitoring and init system" HOMEPAGE="https://davmac.org/projects/dinit/" EGIT_REPO_URI="https://github.com/davmac314/dinit" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64" DEPEND="capabilities? ( sys-libs/libcap )" RDEPEND="${DEPEND}" BDEPEND="" IUSE="capabilities cgroups initgroups ioprio oom-adj shutdown utmpx" src_configure() { export CXX="$(tc-getCXX)" export EXTRA_CXXFLAGS="${CFLAGS}" ./configure --prefix="${EPREFIX}/usr" \ --shutdown-prefix="${PN}" \ $(use_enable shutdown) \ $(use_enable capabilities) \ $(use_enable oom-adj) \ $(use_enable utmpx) \ $(use_enable initgroups) \ $(use_enable ioprio) # Let the user put their own optimization settings elog "Filtering out upstream's optimization settings..." sed -i -e 's/-Os//' mconfig sed -i -e 's/-flto//' mconfig } src_compile() { emake } src_install() { emake DESTDIR="${D}" install } pkg_postinst() { einfo "This package will not override your init system by default," einfo "and if you want to use it as such, you will have to port the init scripts yourself" }