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

EAPI=8

CRATES="
	aho-corasick@0.7.20
	anstream@0.3.2
	anstyle-parse@0.2.1
	anstyle-query@1.0.0
	anstyle-wincon@1.0.1
	anstyle@1.0.1
	ascii-canvas@3.0.0
	autocfg@1.1.0
	bit-set@0.5.3
	bit-vec@0.6.3
	bitflags@1.3.2
	bitflags@2.3.3
	camino@1.1.6
	cargo-platform@0.1.3
	cargo_metadata@0.15.4
	cc@1.0.81
	cfg-if@1.0.0
	clap@4.3.19
	clap_builder@4.3.19
	clap_lex@0.5.0
	codespan-reporting@0.11.1
	codespan@0.11.1
	colorchoice@1.0.0
	crunchy@0.2.2
	diff@0.1.13
	dirs-next@2.0.0
	dirs-sys-next@0.1.2
	either@1.9.0
	ena@0.14.2
	equivalent@1.0.1
	errno-dragonfly@0.1.2
	errno@0.3.2
	fixedbitset@0.4.2
	getrandom@0.2.10
	hashbrown@0.12.3
	hashbrown@0.14.0
	hermit-abi@0.3.2
	indexmap@1.9.3
	indexmap@2.0.0
	indoc@2.0.3
	is-terminal@0.4.9
	itertools@0.10.5
	itoa@1.0.9
	lalrpop-util@0.19.12
	lalrpop@0.19.12
	libc@0.2.147
	linux-raw-sys@0.4.5
	lock_api@0.4.10
	log@0.4.19
	memchr@2.5.0
	new_debug_unreachable@1.0.4
	once_cell@1.18.0
	parking_lot@0.12.1
	parking_lot_core@0.9.8
	paste@1.0.14
	petgraph@0.6.3
	phf_shared@0.10.0
	precomputed-hash@0.1.1
	prettyplease@0.2.12
	proc-macro2@1.0.66
	quote@1.0.32
	redox_syscall@0.2.16
	redox_syscall@0.3.5
	redox_users@0.4.3
	regex-syntax@0.6.29
	regex@1.7.3
	rustix@0.38.7
	rustversion@1.0.14
	ryu@1.0.15
	scopeguard@1.2.0
	semver@1.0.18
	serde@1.0.182
	serde_derive@1.0.182
	serde_json@1.0.104
	serde_spanned@0.6.3
	siphasher@0.3.10
	smallvec@1.11.0
	string_cache@0.8.7
	strsim@0.10.0
	syn@2.0.28
	term@0.7.0
	termcolor@1.2.0
	thiserror-impl@1.0.44
	thiserror@1.0.44
	tiny-keccak@2.0.2
	toml@0.7.6
	toml_datetime@0.6.3
	toml_edit@0.19.14
	unicode-ident@1.0.11
	unicode-width@0.1.10
	unicode-xid@0.2.4
	utf8parse@0.2.1
	uuid@1.4.1
	wasi@0.11.0+wasi-snapshot-preview1
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.5
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-sys@0.48.0
	windows-targets@0.48.1
	windows_aarch64_gnullvm@0.48.0
	windows_aarch64_msvc@0.48.0
	windows_i686_gnu@0.48.0
	windows_i686_msvc@0.48.0
	windows_x86_64_gnu@0.48.0
	windows_x86_64_gnullvm@0.48.0
	windows_x86_64_msvc@0.48.0
	winnow@0.5.4
"

inherit cargo cmake

DESCRIPTION="Cross-platform COM implementation"
HOMEPAGE="https://git.dblsaiko.net/nucom/about"
SRC_URI="
	https://git.dblsaiko.net/${PN}/snapshot/${P}.tar.gz
	${CARGO_CRATE_URIS}"

LICENSE="LGPL-3"
# Dependent crate licenses
LICENSE+=" Apache-2.0 CC0-1.0 MIT Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"

#RDEPEND=""
#DEPEND="${RDEPEND}"
BDEPEND="
	kde-frameworks/extra-cmake-modules
	dev-build/corrosion"

src_configure() {
	cargo_env cmake_src_configure
}

src_compile() {
	cargo_env cmake_src_compile
}

src_install() {
	cargo_env cmake_src_install
}