PORTNAME=	cargo-spellcheck
DISTVERSIONPREFIX=	v
DISTVERSION=	0.14.0
PORTREVISION=	5
CATEGORIES=	devel

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Checks documentation for spelling and grammar mistakes
WWW=		https://github.com/drahnr/cargo-spellcheck

LICENSE=	APACHE20 MIT
LICENSE_COMB=	dual
LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE-APACHE
LICENSE_FILE_MIT=	${WRKSRC}/LICENSE-MIT

BROKEN_armv7=	compilation fails, see https://github.com/eyre-rs/eyre/issues/211

LIB_DEPENDS=	libonig.so:devel/oniguruma

USES=		cargo llvm

USE_GITHUB=	yes
GH_ACCOUNT=	drahnr

RUSTFLAGS=	${ARCH:S/i386/YES/:C/^[a-z].*//:S/YES/-C target-feature=+sse,+sse2/} # add sse sse2 target-features only on i386

CARGO_CRATES=	addr2line-0.21.0 \
		adler-1.0.2 \
		aho-corasick-0.7.20 \
		aho-corasick-1.1.2 \
		always-assert-0.2.0 \
		anstream-0.6.13 \
		anstyle-1.0.6 \
		anstyle-parse-0.2.2 \
		anstyle-query-1.0.0 \
		anstyle-wincon-3.0.1 \
		assert_matches-1.5.0 \
		autocfg-1.1.0 \
		backtrace-0.3.69 \
		base64-0.21.4 \
		bimap-0.6.3 \
		bincode-1.3.3 \
		bindgen-0.61.0 \
		bit-set-0.5.3 \
		bit-vec-0.6.3 \
		bitflags-1.3.2 \
		bitflags-2.4.0 \
		block-buffer-0.10.4 \
		bstr-1.7.0 \
		bumpalo-3.14.0 \
		byteorder-1.5.0 \
		bytes-1.5.0 \
		bzip2-0.4.4 \
		bzip2-sys-0.1.11+1.0.8 \
		cargo_toml-0.20.0 \
		cc-1.0.83 \
		cexpr-0.6.0 \
		cfg-if-1.0.0 \
		clang-sys-1.6.1 \
		clap-4.4.6 \
		clap-verbosity-flag-2.0.1 \
		clap_builder-4.4.6 \
		clap_complete-4.4.3 \
		clap_derive-4.4.2 \
		clap_lex-0.5.1 \
		color-eyre-0.6.2 \
		color-spantrace-0.2.0 \
		colorchoice-1.0.0 \
		console-0.15.7 \
		core-foundation-0.9.3 \
		core-foundation-sys-0.8.4 \
		countme-3.0.1 \
		cov-mark-2.0.0-pre.1 \
		cpufeatures-0.2.9 \
		crc32fast-1.3.2 \
		crossbeam-channel-0.5.8 \
		crossbeam-deque-0.8.3 \
		crossbeam-epoch-0.9.15 \
		crossbeam-utils-0.8.16 \
		crossterm-0.27.0 \
		crossterm_winapi-0.9.1 \
		crypto-common-0.1.6 \
		derivative-2.2.0 \
		digest-0.10.7 \
		directories-3.0.2 \
		directories-5.0.1 \
		dirs-sys-0.3.7 \
		dirs-sys-0.4.1 \
		drop_bomb-0.1.5 \
		either-1.9.0 \
		encode_unicode-0.3.6 \
		encoding_rs-0.8.33 \
		enum_dispatch-0.3.12 \
		env_filter-0.1.0 \
		env_logger-0.11.3 \
		equivalent-1.0.1 \
		errno-0.3.5 \
		eyre-0.6.8 \
		fancy-regex-0.5.0 \
		fancy-regex-0.13.0 \
		fd-lock-4.0.0 \
		flate2-1.0.27 \
		fnv-1.0.7 \
		form_urlencoded-1.2.0 \
		fs-err-2.9.0 \
		fst-0.4.7 \
		futures-0.3.28 \
		futures-channel-0.3.28 \
		futures-core-0.3.28 \
		futures-executor-0.3.28 \
		futures-io-0.3.28 \
		futures-macro-0.3.28 \
		futures-sink-0.3.28 \
		futures-task-0.3.28 \
		futures-util-0.3.28 \
		generic-array-0.14.7 \
		getopts-0.2.21 \
		getrandom-0.2.10 \
		gimli-0.28.0 \
		glob-0.3.1 \
		globset-0.4.13 \
		h2-0.3.26 \
		half-1.8.2 \
		hashbrown-0.14.3 \
		heck-0.4.1 \
		hermit-abi-0.3.3 \
		hex-0.4.3 \
		home-0.5.5 \
		http-0.2.9 \
		http-body-0.4.5 \
		httparse-1.8.0 \
		httpdate-1.0.3 \
		humantime-2.1.0 \
		hunspell-rs-0.4.0 \
		hunspell-sys-0.3.1 \
		hyper-0.14.27 \
		hyper-rustls-0.24.1 \
		idna-0.4.0 \
		ignore-0.4.20 \
		indenter-0.3.3 \
		indexmap-2.2.6 \
		ipnet-2.8.0 \
		iso_country-0.1.4 \
		isolang-2.3.0 \
		itertools-0.8.2 \
		itertools-0.10.5 \
		itertools-0.12.1 \
		itoa-1.0.9 \
		jod-thread-0.1.2 \
		js-sys-0.3.64 \
		lazy_static-1.4.0 \
		lazycell-1.3.0 \
		libc-0.2.153 \
		linux-raw-sys-0.4.10 \
		lock_api-0.4.10 \
		log-0.4.21 \
		lzma-sys-0.1.20 \
		maplit-1.0.2 \
		memchr-2.6.4 \
		memoffset-0.7.1 \
		memoffset-0.9.0 \
		mime-0.3.17 \
		minimal-lexical-0.2.1 \
		miniz_oxide-0.7.1 \
		mio-0.8.11 \
		miow-0.6.0 \
		nix-0.26.4 \
		nlprule-0.6.4 \
		nlprule-build-0.6.4 \
		nom-7.1.3 \
		num_cpus-1.16.0 \
		object-0.32.1 \
		once_cell-1.18.0 \
		onig-6.4.0 \
		onig_sys-69.8.1 \
		option-ext-0.2.0 \
		owo-colors-3.5.0 \
		parking_lot-0.12.1 \
		parking_lot_core-0.9.8 \
		peeking_take_while-0.1.2 \
		percent-encoding-2.3.0 \
		phf-0.11.2 \
		phf_shared-0.11.2 \
		pin-project-lite-0.2.13 \
		pin-utils-0.1.0 \
		pkg-config-0.3.27 \
		proc-macro2-1.0.69 \
		pulldown-cmark-0.10.0 \
		pulldown-cmark-escape-0.10.0 \
		quote-1.0.33 \
		ra-ap-rustc_lexer-0.44.0 \
		ra_ap_limit-0.0.212 \
		ra_ap_parser-0.0.212 \
		ra_ap_stdx-0.0.212 \
		ra_ap_syntax-0.0.212 \
		ra_ap_text_edit-0.0.212 \
		rayon-1.8.0 \
		rayon-cond-0.1.0 \
		rayon-core-1.12.0 \
		redox_syscall-0.2.16 \
		redox_syscall-0.3.5 \
		redox_users-0.4.3 \
		regex-1.10.0 \
		regex-automata-0.4.1 \
		regex-syntax-0.6.29 \
		regex-syntax-0.8.0 \
		reqwest-0.11.22 \
		ring-0.16.20 \
		ring-0.17.8 \
		rowan-0.15.15 \
		roxmltree-0.14.1 \
		rustc-demangle-0.1.23 \
		rustc-hash-1.1.0 \
		rustix-0.38.19 \
		rustls-0.21.11 \
		rustls-pemfile-1.0.3 \
		rustls-webpki-0.101.7 \
		ryu-1.0.15 \
		same-file-1.0.6 \
		scopeguard-1.2.0 \
		sct-0.7.0 \
		serde-1.0.188 \
		serde-xml-rs-0.4.1 \
		serde_derive-1.0.188 \
		serde_json-1.0.107 \
		serde_plain-1.0.2 \
		serde_regex-1.1.0 \
		serde_spanned-0.6.3 \
		serde_urlencoded-0.7.1 \
		sha2-0.10.8 \
		sharded-slab-0.1.7 \
		shlex-1.3.0 \
		signal-hook-0.3.17 \
		signal-hook-mio-0.2.3 \
		signal-hook-registry-1.4.1 \
		siphasher-0.3.11 \
		slab-0.4.9 \
		smallvec-1.11.1 \
		smol_str-0.2.1 \
		socket2-0.4.9 \
		socket2-0.5.4 \
		spin-0.5.2 \
		spin-0.9.8 \
		srx-0.1.4 \
		strsim-0.10.0 \
		syn-1.0.109 \
		syn-2.0.38 \
		system-configuration-0.5.1 \
		system-configuration-sys-0.5.0 \
		text-size-1.1.1 \
		thiserror-1.0.49 \
		thiserror-impl-1.0.49 \
		thousands-0.2.0 \
		thread_local-1.1.7 \
		time-0.1.45 \
		tinyvec-1.6.0 \
		tinyvec_macros-0.1.1 \
		tokio-1.33.0 \
		tokio-macros-2.1.0 \
		tokio-rustls-0.24.1 \
		tokio-util-0.7.9 \
		toml-0.8.2 \
		toml_datetime-0.6.3 \
		toml_edit-0.20.2 \
		tower-service-0.3.2 \
		tracing-0.1.40 \
		tracing-attributes-0.1.27 \
		tracing-core-0.1.32 \
		tracing-error-0.2.0 \
		tracing-subscriber-0.3.17 \
		triomphe-0.1.11 \
		try-lock-0.2.4 \
		typenum-1.17.0 \
		unicase-2.7.0 \
		unicode-bidi-0.3.13 \
		unicode-ident-1.0.12 \
		unicode-normalization-0.1.22 \
		unicode-properties-0.1.0 \
		unicode-width-0.1.11 \
		unicode-xid-0.2.4 \
		untrusted-0.7.1 \
		untrusted-0.9.0 \
		url-2.4.1 \
		utf8parse-0.2.1 \
		uuid-1.4.1 \
		valuable-0.1.0 \
		version_check-0.9.4 \
		walkdir-2.4.0 \
		want-0.3.1 \
		wasi-0.10.0+wasi-snapshot-preview1 \
		wasi-0.11.0+wasi-snapshot-preview1 \
		wasm-bindgen-0.2.87 \
		wasm-bindgen-backend-0.2.87 \
		wasm-bindgen-futures-0.4.37 \
		wasm-bindgen-macro-0.2.87 \
		wasm-bindgen-macro-support-0.2.87 \
		wasm-bindgen-shared-0.2.87 \
		web-sys-0.3.64 \
		webpki-roots-0.25.2 \
		which-4.4.2 \
		winapi-0.3.9 \
		winapi-i686-pc-windows-gnu-0.4.0 \
		winapi-util-0.1.6 \
		winapi-x86_64-pc-windows-gnu-0.4.0 \
		windows-sys-0.45.0 \
		windows-sys-0.48.0 \
		windows-sys-0.52.0 \
		windows-targets-0.42.2 \
		windows-targets-0.48.5 \
		windows-targets-0.52.5 \
		windows_aarch64_gnullvm-0.42.2 \
		windows_aarch64_gnullvm-0.48.5 \
		windows_aarch64_gnullvm-0.52.5 \
		windows_aarch64_msvc-0.42.2 \
		windows_aarch64_msvc-0.48.5 \
		windows_aarch64_msvc-0.52.5 \
		windows_i686_gnu-0.42.2 \
		windows_i686_gnu-0.48.5 \
		windows_i686_gnu-0.52.5 \
		windows_i686_gnullvm-0.52.5 \
		windows_i686_msvc-0.42.2 \
		windows_i686_msvc-0.48.5 \
		windows_i686_msvc-0.52.5 \
		windows_x86_64_gnu-0.42.2 \
		windows_x86_64_gnu-0.48.5 \
		windows_x86_64_gnu-0.52.5 \
		windows_x86_64_gnullvm-0.42.2 \
		windows_x86_64_gnullvm-0.48.5 \
		windows_x86_64_gnullvm-0.52.5 \
		windows_x86_64_msvc-0.42.2 \
		windows_x86_64_msvc-0.48.5 \
		windows_x86_64_msvc-0.52.5 \
		winnow-0.5.16 \
		winreg-0.50.0 \
		xml-rs-0.8.19 \
		xmlparser-0.13.6 \
		xz2-0.1.7 \
		zip-0.5.13

MAKE_ENV=	LIBCLANG_PATH=${LLVM_PREFIX}/lib \
		LLVM_CONFIG_PATH=${LLVM_CONFIG}

PLIST_FILES=	bin/${PORTNAME}

.include <bsd.port.mk>
