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

EAPI=7

CRATES="
	adler-1.0.2
	aho-corasick-0.7.15
	ansi_term-0.11.0
	ansi_term-0.12.1
	arrayvec-0.5.2
	askama-0.10.5
	askama_derive-0.10.5
	askama_escape-0.10.1
	askama_shared-0.11.1
	async-trait-0.1.48
	atty-0.2.14
	autocfg-1.0.1
	base64-0.13.0
	bitflags-1.2.1
	bitmaps-2.1.0
	bitvec-0.19.5
	bstr-0.2.15
	bumpalo-3.6.1
	byteorder-1.4.3
	bytes-1.0.1
	capnp-0.14.0
	capnpc-0.14.2
	cc-1.0.67
	cfg-if-1.0.0
	chrono-0.4.19
	clap-2.33.3
	codespan-0.11.1
	codespan-reporting-0.11.1
	core-foundation-0.9.1
	core-foundation-sys-0.8.2
	crc32fast-1.2.1
	crossbeam-utils-0.8.3
	ctor-0.1.20
	ctrlc-3.1.8
	data-encoding-2.3.2
	der-oid-macro-0.4.0
	der-parser-5.1.0
	diff-0.1.12
	either-1.6.1
	encoding_rs-0.8.28
	filetime-0.2.14
	fixedbitset-0.2.0
	flate2-1.0.20
	fnv-1.0.7
	foreign-types-0.3.2
	foreign-types-shared-0.1.1
	form_urlencoded-1.0.1
	fs_extra-1.2.0
	funty-1.1.0
	futures-channel-0.3.13
	futures-core-0.3.13
	futures-sink-0.3.13
	futures-task-0.3.13
	futures-util-0.3.13
	getopts-0.2.21
	getrandom-0.2.2
	globset-0.4.6
	h2-0.3.2
	hashbrown-0.9.1
	heck-0.3.2
	hermit-abi-0.1.18
	hexpm-1.3.0
	http-0.2.3
	http-body-0.4.1
	httparse-1.3.5
	httpdate-0.3.2
	humansize-1.1.0
	hyper-0.14.5
	hyper-tls-0.5.0
	idna-0.2.2
	ignore-0.4.17
	im-15.0.0
	indexmap-1.6.2
	ipnet-2.3.0
	itertools-0.10.0
	itoa-0.4.7
	js-sys-0.3.49
	lazy_static-1.4.0
	lexical-core-0.7.5
	libc-0.2.91
	log-0.4.14
	matchers-0.0.1
	matches-0.1.8
	memchr-2.3.4
	mime-0.3.16
	miniz_oxide-0.4.4
	mio-0.7.11
	miow-0.3.7
	native-tls-0.2.7
	nix-0.20.0
	nom-6.1.2
	ntapi-0.3.6
	num-bigint-0.4.0
	num-integer-0.1.44
	num-traits-0.2.14
	num_cpus-1.13.0
	oid-registry-0.1.1
	once_cell-1.7.2
	openssl-0.10.33
	openssl-probe-0.1.2
	openssl-sys-0.9.61
	output_vt100-0.1.2
	percent-encoding-2.1.0
	petgraph-0.5.1
	pin-project-1.0.6
	pin-project-internal-1.0.6
	pin-project-lite-0.2.6
	pin-utils-0.1.0
	pkg-config-0.3.19
	ppv-lite86-0.2.10
	pretty_assertions-0.7.1
	proc-macro-error-1.0.4
	proc-macro-error-attr-1.0.4
	proc-macro2-1.0.24
	protobuf-2.22.1
	protobuf-codegen-2.22.1
	protobuf-codegen-pure-2.22.1
	pulldown-cmark-0.8.0
	quote-1.0.9
	radium-0.5.3
	rand-0.8.3
	rand_chacha-0.3.0
	rand_core-0.5.1
	rand_core-0.6.2
	rand_hc-0.3.0
	rand_xoshiro-0.4.0
	redox_syscall-0.2.5
	regex-1.4.5
	regex-automata-0.1.9
	regex-syntax-0.6.23
	remove_dir_all-0.5.3
	reqwest-0.11.2
	ring-0.16.20
	rpassword-5.0.1
	rusticata-macros-3.0.1
	rustversion-1.0.4
	ryu-1.0.5
	same-file-1.0.6
	schannel-0.1.19
	security-framework-2.2.0
	security-framework-sys-2.2.0
	serde-1.0.125
	serde_derive-1.0.125
	serde_json-1.0.64
	serde_urlencoded-0.7.0
	sharded-slab-0.1.1
	sized-chunks-0.6.4
	slab-0.4.2
	smallvec-1.6.1
	socket2-0.4.0
	spin-0.5.2
	static_assertions-1.1.0
	strsim-0.10.0
	strsim-0.8.0
	structopt-0.3.21
	structopt-derive-0.4.14
	strum-0.20.0
	strum_macros-0.20.1
	syn-1.0.65
	tap-1.0.1
	tar-0.4.33
	tempfile-3.2.0
	termcolor-1.1.2
	textwrap-0.11.0
	thiserror-1.0.24
	thiserror-impl-1.0.24
	thread_local-1.1.3
	tinyvec-1.1.1
	tinyvec_macros-0.1.0
	tokio-1.4.0
	tokio-native-tls-0.3.0
	tokio-util-0.6.5
	toml-0.5.8
	tower-service-0.3.1
	tracing-0.1.25
	tracing-attributes-0.1.15
	tracing-core-0.1.17
	tracing-log-0.1.2
	tracing-serde-0.1.2
	tracing-subscriber-0.2.17
	try-lock-0.2.3
	typenum-1.13.0
	unicase-2.6.0
	unicode-bidi-0.3.4
	unicode-normalization-0.1.17
	unicode-segmentation-1.7.1
	unicode-width-0.1.8
	unicode-xid-0.2.1
	untrusted-0.7.1
	url-2.2.1
	vcpkg-0.2.11
	vec_map-0.8.2
	version_check-0.9.3
	walkdir-2.3.2
	want-0.3.0
	wasi-0.10.2+wasi-snapshot-preview1
	wasm-bindgen-0.2.72
	wasm-bindgen-backend-0.2.72
	wasm-bindgen-futures-0.4.22
	wasm-bindgen-macro-0.2.72
	wasm-bindgen-macro-support-0.2.72
	wasm-bindgen-shared-0.2.72
	web-sys-0.3.49
	winapi-0.3.9
	winapi-i686-pc-windows-gnu-0.4.0
	winapi-util-0.1.5
	winapi-x86_64-pc-windows-gnu-0.4.0
	winreg-0.7.0
	wyz-0.2.0
	x509-parser-0.9.2
	xattr-0.2.2
"

inherit cargo

DESCRIPTION="A statically typed functional language for the BEAM"
HOMEPAGE="https://gleam.run"
SRC_URI="
	https://github.com/gleam-lang/gleam/archive/v${PV}.tar.gz -> ${P}.tar.gz
	$(cargo_crate_uris ${CRATES})
"
RESTRICT="mirror"

LICENSE="0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSL-1.1 ISC MIT MPL-2.0 Unlicense ZLIB"
SLOT="0"
KEYWORDS="~amd64"

QA_FLAGS_IGNORED="usr/bin/gleam"

src_configure() {
	export RUSTFLAGS="${RUSTFLAGS} --cap-lints warn"
	cargo_src_configure
}
