PORTNAME=	aichat
DISTVERSIONPREFIX=	v
DISTVERSION=	0.8.0
PORTREVISION=	2
CATEGORIES=	misc

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Using ChatGPT/GPT-3.5/GPT-4 in the terminal
WWW=		https://github.com/sigoden/aichat

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

LIB_DEPENDS=	libonig.so:devel/oniguruma

USES=		cargo

USE_GITHUB=	yes
GH_ACCOUNT=	sigoden

CARGO_CRATES=	adler-1.0.2 \
		aho-corasick-0.7.20 \
		android_system_properties-0.1.5 \
		anyhow-1.0.69 \
		arrayvec-0.5.2 \
		atty-0.2.14 \
		autocfg-1.1.0 \
		base64-0.21.0 \
		bincode-1.3.3 \
		bit-set-0.5.3 \
		bit-vec-0.6.3 \
		bitflags-1.3.2 \
		bstr-1.3.0 \
		bumpalo-3.12.0 \
		bytes-1.4.0 \
		cc-1.0.79 \
		cfg-if-1.0.0 \
		chrono-0.4.23 \
		clap-4.1.8 \
		clap_derive-4.1.8 \
		clap_lex-0.3.2 \
		codespan-reporting-0.11.1 \
		core-foundation-0.9.3 \
		core-foundation-sys-0.8.3 \
		crc32fast-1.3.2 \
		crossbeam-0.8.2 \
		crossbeam-channel-0.5.7 \
		crossbeam-deque-0.8.3 \
		crossbeam-epoch-0.9.14 \
		crossbeam-queue-0.3.8 \
		crossbeam-utils-0.8.15 \
		crossterm-0.24.0 \
		crossterm-0.25.0 \
		crossterm_winapi-0.9.0 \
		ctrlc-3.2.5 \
		cxx-1.0.92 \
		cxx-build-1.0.92 \
		cxxbridge-flags-1.0.92 \
		cxxbridge-macro-1.0.92 \
		dirs-4.0.0 \
		dirs-sys-0.3.7 \
		dyn-clone-1.0.11 \
		either-1.8.1 \
		encoding_rs-0.8.32 \
		errno-0.2.8 \
		errno-dragonfly-0.1.2 \
		eventsource-stream-0.2.3 \
		fancy-regex-0.11.0 \
		fd-lock-3.0.10 \
		flate2-1.0.25 \
		fnv-1.0.7 \
		form_urlencoded-1.1.0 \
		futures-channel-0.3.26 \
		futures-core-0.3.26 \
		futures-io-0.3.26 \
		futures-macro-0.3.26 \
		futures-sink-0.3.26 \
		futures-task-0.3.26 \
		futures-util-0.3.26 \
		getrandom-0.2.8 \
		h2-0.3.16 \
		hashbrown-0.12.3 \
		heck-0.4.1 \
		hermit-abi-0.1.19 \
		hermit-abi-0.2.6 \
		hermit-abi-0.3.1 \
		http-0.2.9 \
		http-body-0.4.5 \
		httparse-1.8.0 \
		httpdate-1.0.2 \
		hyper-0.14.24 \
		hyper-rustls-0.23.2 \
		iana-time-zone-0.1.53 \
		iana-time-zone-haiku-0.1.1 \
		idna-0.3.0 \
		indexmap-1.9.2 \
		inquire-0.5.3 \
		io-lifetimes-1.0.5 \
		ipnet-2.7.1 \
		is-terminal-0.4.4 \
		itertools-0.10.5 \
		itoa-1.0.6 \
		js-sys-0.3.61 \
		lazy_static-1.4.0 \
		libc-0.2.139 \
		link-cplusplus-1.0.8 \
		linux-raw-sys-0.1.4 \
		lock_api-0.4.9 \
		log-0.4.17 \
		memchr-2.5.0 \
		memoffset-0.8.0 \
		mime-0.3.16 \
		minimal-lexical-0.2.1 \
		miniz_oxide-0.6.2 \
		mio-0.8.6 \
		newline-converter-0.2.2 \
		nix-0.26.2 \
		nom-7.1.3 \
		nu-ansi-term-0.46.0 \
		num-integer-0.1.45 \
		num-traits-0.2.15 \
		num_cpus-1.15.0 \
		once_cell-1.17.1 \
		onig-6.4.0 \
		onig_sys-69.8.1 \
		openssl-probe-0.1.5 \
		os_str_bytes-6.4.1 \
		overload-0.1.1 \
		parking_lot-0.12.1 \
		parking_lot_core-0.9.7 \
		percent-encoding-2.2.0 \
		pin-project-lite-0.2.9 \
		pin-utils-0.1.0 \
		pkg-config-0.3.26 \
		proc-macro-error-1.0.4 \
		proc-macro-error-attr-1.0.4 \
		proc-macro2-1.0.51 \
		quote-1.0.23 \
		redox_syscall-0.2.16 \
		redox_users-0.4.3 \
		reedline-0.16.0 \
		regex-1.7.1 \
		regex-automata-0.1.10 \
		regex-syntax-0.6.28 \
		reqwest-0.11.14 \
		ring-0.16.20 \
		rustc-hash-1.1.0 \
		rustix-0.36.9 \
		rustls-0.20.8 \
		rustls-native-certs-0.6.2 \
		rustls-pemfile-1.0.2 \
		rustversion-1.0.12 \
		ryu-1.0.13 \
		same-file-1.0.6 \
		schannel-0.1.21 \
		scopeguard-1.1.0 \
		scratch-1.0.5 \
		sct-0.7.0 \
		security-framework-2.8.2 \
		security-framework-sys-2.8.0 \
		serde-1.0.152 \
		serde_derive-1.0.152 \
		serde_json-1.0.94 \
		serde_urlencoded-0.7.1 \
		serde_yaml-0.9.19 \
		signal-hook-0.3.15 \
		signal-hook-mio-0.2.3 \
		signal-hook-registry-1.4.1 \
		slab-0.4.8 \
		smallvec-1.10.0 \
		socket2-0.4.9 \
		spin-0.5.2 \
		static_assertions-1.1.0 \
		strip-ansi-escapes-0.1.1 \
		strsim-0.10.0 \
		strum-0.24.1 \
		strum_macros-0.24.3 \
		syn-1.0.109 \
		syntect-5.0.0 \
		termcolor-1.2.0 \
		thiserror-1.0.39 \
		thiserror-impl-1.0.39 \
		time-0.1.45 \
		tinyvec-1.6.0 \
		tinyvec_macros-0.1.1 \
		tokio-1.26.0 \
		tokio-macros-1.8.2 \
		tokio-rustls-0.23.4 \
		tokio-socks-0.5.1 \
		tokio-util-0.7.7 \
		tower-service-0.3.2 \
		tracing-0.1.37 \
		tracing-core-0.1.30 \
		try-lock-0.2.4 \
		unicode-bidi-0.3.10 \
		unicode-ident-1.0.8 \
		unicode-normalization-0.1.22 \
		unicode-segmentation-1.10.1 \
		unicode-width-0.1.10 \
		unsafe-libyaml-0.2.7 \
		untrusted-0.7.1 \
		url-2.3.1 \
		utf8parse-0.2.0 \
		version_check-0.9.4 \
		vte-0.10.1 \
		vte_generate_state_changes-0.1.1 \
		walkdir-2.3.2 \
		want-0.3.0 \
		wasi-0.10.0+wasi-snapshot-preview1 \
		wasi-0.11.0+wasi-snapshot-preview1 \
		wasm-bindgen-0.2.84 \
		wasm-bindgen-backend-0.2.84 \
		wasm-bindgen-futures-0.4.34 \
		wasm-bindgen-macro-0.2.84 \
		wasm-bindgen-macro-support-0.2.84 \
		wasm-bindgen-shared-0.2.84 \
		wasm-streams-0.2.3 \
		web-sys-0.3.61 \
		webpki-0.22.0 \
		webpki-roots-0.22.6 \
		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 \
		windows-sys-0.42.0 \
		windows-sys-0.45.0 \
		windows-targets-0.42.1 \
		windows_aarch64_gnullvm-0.42.1 \
		windows_aarch64_msvc-0.42.1 \
		windows_i686_gnu-0.42.1 \
		windows_i686_msvc-0.42.1 \
		windows_x86_64_gnu-0.42.1 \
		windows_x86_64_gnullvm-0.42.1 \
		windows_x86_64_msvc-0.42.1 \
		winreg-0.10.1

PLIST_FILES=	bin/${PORTNAME}

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}

.include <bsd.port.mk>
