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

# Autogenerated by pycargoebuild 0.13.2

EAPI=8

CRATES="
	addr2line@0.21.0
	adler@1.0.2
	aes@0.7.5
	aho-corasick@1.1.2
	alloc-no-stdlib@2.0.4
	alloc-stdlib@0.2.2
	ammonia@3.3.0
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anyhow@1.0.80
	arc-swap@1.7.0
	ashpd@0.8.0
	async-broadcast@0.7.0
	async-channel@2.2.0
	async-compression@0.4.6
	async-executor@1.8.0
	async-fs@2.1.1
	async-io@2.3.1
	async-lock@2.8.0
	async-lock@3.3.0
	async-net@2.0.0
	async-process@2.1.0
	async-recursion@1.0.5
	async-signal@0.2.5
	async-task@4.7.0
	async-trait@0.1.77
	atomic-waker@1.1.2
	autocfg@1.1.0
	backtrace@0.3.69
	base64@0.21.7
	base64@0.22.0
	bigdecimal@0.4.3
	bit_field@0.10.2
	bitflags@1.3.2
	bitflags@2.4.2
	block-buffer@0.10.4
	block-buffer@0.9.0
	block-modes@0.8.1
	block-padding@0.2.1
	block@0.1.6
	blocking@1.5.1
	brotli-decompressor@2.5.1
	brotli@3.4.0
	bumpalo@3.15.3
	bytecount@0.6.7
	bytemuck@1.14.3
	byteorder@1.5.0
	bytes@1.5.0
	bytesize@1.3.0
	cairo-rs@0.19.2
	cairo-sys-rs@0.19.2
	camino@1.1.6
	cargo-platform@0.1.7
	cargo_metadata@0.14.2
	cc@1.0.89
	cfg-expr@0.15.7
	cfg-if@1.0.0
	cfg_aliases@0.1.1
	chrono@0.4.34
	cipher@0.3.0
	color-backtrace@0.6.1
	color_quant@1.1.0
	commafeed_api@0.1.1
	concurrent-queue@2.4.0
	cookie@0.17.0
	cookie_store@0.20.0
	core-foundation-sys@0.8.6
	core-foundation@0.9.4
	cpufeatures@0.2.12
	crc-any@2.4.4
	crc32fast@1.4.0
	crossbeam-channel@0.5.12
	crossbeam-deque@0.8.5
	crossbeam-epoch@0.9.18
	crossbeam-utils@0.8.19
	crunchy@0.2.2
	crypto-common@0.1.6
	data-encoding@2.5.0
	debug-helper@0.3.13
	deranged@0.3.11
	derivative@2.2.0
	des@0.7.0
	destructure_traitobject@0.2.0
	diesel@2.1.4
	diesel_derives@2.1.2
	diesel_migrations@2.1.0
	diesel_table_macro_syntax@0.1.0
	diffus-derive@0.10.0
	diffus@0.10.0
	digest@0.10.7
	digest@0.9.0
	dirs-sys@0.4.1
	dirs@5.0.1
	either@1.10.0
	encoding_rs@0.8.33
	endi@1.1.0
	entities@1.0.1
	enum-as-inner@0.6.0
	enumflags2@0.7.9
	enumflags2_derive@0.7.9
	equivalent@1.0.1
	errno@0.3.8
	error-chain@0.12.4
	escaper@0.1.1
	event-listener-strategy@0.4.0
	event-listener-strategy@0.5.0
	event-listener@2.5.3
	event-listener@4.0.3
	event-listener@5.2.0
	exr@1.72.0
	eyre@0.6.12
	fastrand@2.0.1
	fdeflate@0.3.4
	feed-rs@1.4.0
	feedbin_api@0.2.1
	feedly_api@0.5.1
	fever_api@0.4.1
	field-offset@0.3.6
	flate2@1.0.28
	flume@0.11.0
	fnv@1.0.7
	foreign-types-shared@0.1.1
	foreign-types@0.3.2
	form_urlencoded@1.2.1
	futf@0.1.5
	futures-channel@0.3.30
	futures-core@0.3.30
	futures-executor@0.3.30
	futures-io@0.3.30
	futures-lite@2.2.0
	futures-macro@0.3.30
	futures-sink@0.3.30
	futures-task@0.3.30
	futures-util@0.3.30
	futures@0.3.30
	gdk-pixbuf-sys@0.19.0
	gdk-pixbuf@0.19.2
	gdk4-sys@0.8.0
	gdk4@0.8.0
	generic-array@0.14.7
	getrandom@0.2.12
	gettext-rs@0.7.0
	gettext-sys@0.21.3
	gif@0.13.1
	gimli@0.28.1
	gio-sys@0.19.0
	gio@0.19.2
	glib-macros@0.19.2
	glib-sys@0.19.0
	glib@0.19.2
	glob@0.3.1
	gobject-sys@0.19.0
	graphene-rs@0.19.2
	graphene-sys@0.19.0
	greader_api@0.4.3
	gsk4-sys@0.8.0
	gsk4@0.8.0
	gtk4-macros@0.8.0
	gtk4-sys@0.8.0
	gtk4@0.8.0
	h2@0.3.24
	half@2.4.0
	hard-xml-derive@1.34.0
	hard-xml@1.34.0
	hashbrown@0.14.3
	heck@0.4.1
	hermit-abi@0.3.9
	hex@0.4.3
	hostname@0.3.1
	html2pango@0.6.0
	html5ever@0.26.0
	http-body@0.4.6
	http@0.2.12
	httparse@1.8.0
	httpdate@1.0.3
	humantime@2.1.0
	hyper-tls@0.5.0
	hyper@0.14.28
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.60
	idna@0.3.0
	idna@0.4.0
	idna@0.5.0
	image@0.24.9
	indenter@0.3.3
	indexmap@2.2.5
	ipconfig@0.3.2
	ipnet@2.9.0
	ipnetwork@0.20.0
	itertools@0.10.5
	itertools@0.12.1
	itoa@1.0.10
	javascriptcore6-sys@0.3.0
	javascriptcore6@0.3.0
	jetscii@0.5.3
	jpeg-decoder@0.3.1
	js-sys@0.3.69
	lazy_static@1.4.0
	lebe@0.5.2
	libadwaita-sys@0.6.0
	libadwaita@0.6.0
	libc@0.2.153
	libm@0.2.8
	libredox@0.0.1
	libsqlite3-sys@0.27.0
	libxml@0.3.3
	linked-hash-map@0.5.6
	linkify@0.9.0
	linux-raw-sys@0.4.13
	locale_config@0.3.0
	lock_api@0.4.11
	log-mdc@0.1.0
	log4rs@1.3.0
	log@0.4.21
	lru-cache@0.1.2
	mac@0.1.1
	magic-crypt@3.1.13
	malloc_buf@0.0.6
	maplit@1.0.2
	markup5ever@0.11.0
	markup5ever_rcdom@0.2.0
	match_cfg@0.1.0
	md-5@0.9.1
	md5@0.7.0
	memchr@2.7.1
	memoffset@0.9.0
	migrations_internals@2.1.0
	migrations_macros@2.1.0
	mime@0.3.17
	mime_guess@2.0.4
	miniflux_api@0.6.0
	miniz_oxide@0.7.2
	mio@0.8.11
	moka@0.12.5
	nanohtml2text@0.1.4
	native-tls@0.2.11
	new_debug_unreachable@1.0.4
	nextcloud_news_api@0.3.0
	nix@0.28.0
	num-bigint@0.4.4
	num-conv@0.1.0
	num-integer@0.1.46
	num-traits@0.2.18
	num_cpus@1.16.0
	obfstr@0.4.3
	objc-foundation@0.1.1
	objc@0.2.7
	objc_id@0.1.1
	object@0.32.2
	once_cell@1.19.0
	opaque-debug@0.3.1
	openssl-macros@0.1.1
	openssl-probe@0.1.5
	openssl-sys@0.9.101
	openssl@0.10.64
	opml@1.1.6
	option-ext@0.2.0
	ordered-float@2.10.1
	ordered-stream@0.2.0
	pango-sys@0.19.0
	pango@0.19.2
	parking@2.2.0
	parking_lot@0.12.1
	parking_lot_core@0.9.9
	percent-encoding@2.3.1
	phf@0.10.1
	phf_codegen@0.10.0
	phf_generator@0.10.0
	phf_shared@0.10.0
	pin-project-lite@0.2.13
	pin-utils@0.1.0
	piper@0.2.1
	pkg-config@0.3.30
	png@0.17.13
	polling@3.5.0
	powerfmt@0.2.0
	ppv-lite86@0.2.17
	precomputed-hash@0.1.1
	proc-macro-crate@3.1.0
	proc-macro-error-attr@1.0.4
	proc-macro-error@1.0.4
	proc-macro2@1.0.78
	psl-types@2.0.11
	publicsuffix@2.2.3
	pulldown-cmark@0.9.6
	qoi@0.4.1
	quanta@0.12.2
	quick-error@1.2.3
	quick-xml@0.31.0
	quote@1.0.35
	r2d2@0.8.10
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	random_color@0.8.0
	raw-cpuid@11.0.1
	rayon-core@1.12.1
	rayon@1.9.0
	rc-writer@1.1.10
	redox_syscall@0.4.1
	redox_users@0.4.4
	regex-automata@0.4.6
	regex-syntax@0.8.2
	regex@1.10.3
	reqwest@0.11.24
	resolv-conf@0.7.0
	rust-embed-impl@8.3.0
	rust-embed-utils@8.3.0
	rust-embed@8.3.0
	rustc-demangle@0.1.23
	rustc_version@0.4.0
	rustix@0.38.31
	rustls-pemfile@1.0.4
	ryu@1.0.17
	same-file@1.0.6
	sanitize-filename@0.5.0
	schannel@0.1.23
	scheduled-thread-pool@0.2.7
	scopeguard@1.2.0
	security-framework-sys@2.9.1
	security-framework@2.9.2
	semver@1.0.22
	serde-value@0.7.0
	serde@1.0.197
	serde_derive@1.0.197
	serde_json@1.0.114
	serde_repr@0.1.18
	serde_spanned@0.6.5
	serde_urlencoded@0.7.1
	serde_yaml@0.9.32
	sha1@0.10.6
	sha2@0.10.8
	sha2@0.9.9
	shellexpand@3.1.0
	signal-hook-registry@1.4.1
	simd-adler32@0.3.7
	siphasher@0.3.11
	siphasher@1.0.0
	skeptic@0.13.7
	slab@0.4.9
	smallvec@1.13.1
	socket2@0.5.6
	soup3-sys@0.6.0
	soup3@0.6.0
	spin@0.9.8
	static_assertions@1.1.0
	string_cache@0.8.7
	string_cache_codegen@0.5.2
	syn@1.0.109
	syn@2.0.52
	sync_wrapper@0.1.2
	system-configuration-sys@0.5.0
	system-configuration@0.5.1
	system-deps@6.2.0
	tagptr@0.2.0
	target-lexicon@0.12.14
	temp-dir@0.1.12
	tempfile@3.10.1
	tendril@0.4.3
	termcolor@1.4.1
	thiserror-impl@1.0.57
	thiserror@1.0.57
	thread-id@4.2.1
	tiff@0.9.1
	tiger@0.1.0
	time-core@0.1.2
	time-macros@0.2.17
	time@0.3.34
	tinyvec@1.6.0
	tinyvec_macros@0.1.1
	tokio-macros@2.2.0
	tokio-native-tls@0.3.1
	tokio-socks@0.5.1
	tokio-util@0.7.10
	tokio@1.36.0
	toml@0.7.8
	toml@0.8.10
	toml_datetime@0.6.5
	toml_edit@0.19.15
	toml_edit@0.21.1
	toml_edit@0.22.6
	tower-service@0.3.2
	tracing-attributes@0.1.27
	tracing-core@0.1.32
	tracing@0.1.40
	triomphe@0.1.11
	trust-dns-proto@0.23.2
	trust-dns-resolver@0.23.2
	try-lock@0.2.5
	typemap-ors@1.0.0
	typenum@1.17.0
	uds_windows@1.1.0
	unicase@2.7.0
	unicode-bidi@0.3.15
	unicode-ident@1.0.12
	unicode-normalization@0.1.23
	unsafe-any-ors@1.0.0
	unsafe-libyaml@0.2.10
	url@2.5.0
	utf-8@0.7.6
	uuid@1.7.0
	vcpkg@0.2.15
	version-compare@0.1.1
	version_check@0.9.4
	walkdir@2.5.0
	want@0.3.1
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.92
	wasm-bindgen-futures@0.4.42
	wasm-bindgen-macro-support@0.2.92
	wasm-bindgen-macro@0.2.92
	wasm-bindgen-shared@0.2.92
	wasm-bindgen@0.2.92
	wasm-streams@0.4.0
	web-sys@0.3.69
	webkit6-sys@0.3.0
	webkit6@0.3.0
	weezl@0.1.8
	widestring@1.0.2
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.6
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-core@0.52.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-targets@0.48.5
	windows-targets@0.52.4
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.4
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.4
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.4
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.4
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.4
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.4
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.4
	winnow@0.5.40
	winnow@0.6.5
	winreg@0.50.0
	xdg-home@1.1.0
	xml-rs@0.8.19
	xml5ever@0.17.0
	xmlparser@0.13.6
	xmltree@0.10.3
	zbus@4.1.2
	zbus_macros@4.1.2
	zbus_names@3.0.0
	zune-inflate@0.2.54
	zvariant@4.0.2
	zvariant_derive@4.0.2
	zvariant_utils@1.1.0
"
declare -A GIT_CRATES=(
	[article_scraper]='https://gitlab.com/news-flash/article_scraper;0dcebe8b49b8d867810d0f7ff155e502f637bb96;article_scraper-%commit%/article_scraper'
	[news-flash]='https://gitlab.com/news_flash/news_flash;46cf25eff46655e314ae38b28c04f0f943b3910a;news_flash-%commit%'
	[newsblur_api]='https://gitlab.com/news-flash/newsblur_api;5e7d06f357159d3623964b6b56c7672457c14340;newsblur_api-%commit%'
)

inherit cargo gnome2-utils meson xdg

MY_PN="news_flash_gtk"
DESCRIPTION="Feed Reader written in GTK"
HOMEPAGE="https://gitlab.com/news-flash/news_flash_gtk"
SRC_URI="
	https://gitlab.com/news-flash/${MY_PN}/-/archive/v.${PV}/${MY_PN}.tar.bz2
	${CARGO_CRATE_URIS}
"
COMMIT="77a830bd3d22a68f4f7179ce74c716c911c02fff"
S="${WORKDIR}/${MY_PN}-v.${PV}-${COMMIT}"

LICENSE="GPL-3"
# Dependent crate licenses
LICENSE+="
	Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD GPL-3+ MIT MPL-2.0
	Unicode-DFS-2016 Unlicense
"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="
	dev-db/sqlite:3
	dev-libs/glib
	dev-libs/openssl:=
	gui-libs/gtk
	gui-libs/libadwaita
	net-libs/webkit-gtk:6
	sys-devel/gettext
	x11-misc/xdg-utils
"
BDEPEND="
	dev-libs/glib
	dev-libs/appstream-glib
	dev-util/blueprint-compiler
"

# Rust
QA_FLAGS_IGNORED="usr/bin/io.gitlab.news_flash.NewsFlash"

src_unpack() {
	cargo_src_unpack
	sed -i -e "s/0\.0\.0/${PV}/" "${S}"/{Cargo.toml,meson.build} || die
}

src_configure() {
	meson_src_configure
	ln -s "${CARGO_HOME}" "${BUILD_DIR}/cargo-home" || die
}

src_install() {
	meson_src_install
	dosym -r /usr/bin/io.gitlab.news_flash.NewsFlash /usr/bin/newsflash
}

pkg_postinst() {
	xdg_pkg_postinst
	gnome2_schemas_update
	elog "If you want scraper data in order to load some feeds directly in NewsFlash;"
	elog "Close this repository into ~/.local/share/news-flash/ :"
	elog "https://github.com/fivefilters/ftr-site-config"
}

pkg_postrm() {
	xdg_pkg_postrm
	gnome2_schemas_update
}