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

EAPI=8

inherit meson

DESCRIPTION="Drop-in replacement for libudev with gardendev database integration"
HOMEPAGE="https://git.pinkro.se/Rose/gardenhouse/libudev-garden.git/about"

if [ ${PV} = 9999 ]; then
	inherit git-r3
	EGIT_REPO_URI="https://git.pinkro.se/Rose/gardenhouse/libudev-garden.git"
	KEYWORDS=""
else
	SRC_URI="https://git.pinkro.se/Rose/gardenhouse/libudev-garden.git/snapshot/${P}.tar.gz"
	KEYWORDS="~*"
fi

LICENSE="ISC"
SLOT="0"
IUSE="+static-libs"

RDEPEND="
	!sys-apps/systemd-utils[udev]
	!sys-apps/systemd
        !sys-libs/libudev-zero
"

src_configure() {
	local emesonargs=(
		$(meson_option static-libs static)
	)
	meson_src_configure
}