# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Crates list + licences generated by pycargoebuild 0.15.0

EAPI=8

inherit cargo 

DESCRIPTION="Terminal document viewer for .docx files"
HOMEPAGE="https://github.com/bgreenwell/doxx/"
SRC_URI="
	https://github.com/bgreenwell/doxx/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	https://gitea.com/slash/schplaf-gentoo-overlay-files/raw/tag/${P}/doxx/doxx-${PV}-crates.tar.xz
	${CARGO_CRATE_URIS}
"

LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
	Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
	LGPL-3+ MIT MPL-2.0 UoI-NCSA Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS="~amd64"

DOCS=( CHANGELOG.md LICENSE README.md RELEASE.md )
RUST_MIN_VER="1.82.0"

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""

pkg_setup() {
	rust_pkg_setup
}

src_unpack() {
	#if [[ "${PV}" = "9999" ]]; then
	#	git-r3_src_unpack
	#	cargo_live_src_unpack
	#else
	cargo_src_unpack
	#fi
}

src_configure() {
	cargo_src_configure --frozen
}

src_install() {
	einstalldocs
	cargo_src_install
}