PORTNAME=	rye
DISTVERSION=	0.29.0
PORTREVISION=	1
CATEGORIES=	devel

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Hassle-free Python experience
WWW=		https://rye-up.com

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

BROKEN_i386=	link fails: ld: error: undefined symbol: __atomic_is_lock_free

BUILD_DEPENDS=	gmake:devel/gmake
LIB_DEPENDS=	libzstd.so:archivers/zstd

USES=		cargo perl5
USE_PERL5=	build

USE_GITHUB=	yes
GH_ACCOUNT=	mitsuhiko

CARGO_CRATES=	addr2line-0.21.0 \
		adler-1.0.2 \
		aead-0.5.2 \
		age-0.9.2 \
		age-core-0.9.0 \
		ahash-0.8.7 \
		aho-corasick-1.1.2 \
		allocator-api2-0.2.16 \
		anstyle-1.0.5 \
		anyhow-1.0.79 \
		arc-swap-1.6.0 \
		autocfg-1.1.0 \
		backtrace-0.3.69 \
		base64-0.13.1 \
		base64-0.21.7 \
		bech32-0.9.1 \
		bitflags-1.3.2 \
		bitflags-2.4.2 \
		block-buffer-0.10.4 \
		bstr-1.9.0 \
		bumpalo-3.14.0 \
		byteorder-1.5.0 \
		bzip2-0.4.4 \
		bzip2-sys-0.1.11+1.0.8 \
		cc-1.0.83 \
		cfb-0.7.3 \
		cfg-if-1.0.0 \
		chacha20-0.9.1 \
		chacha20poly1305-0.10.1 \
		charset-0.1.3 \
		chumsky-0.9.3 \
		cipher-0.4.4 \
		clap-4.4.18 \
		clap_builder-4.4.18 \
		clap_complete-4.4.10 \
		clap_derive-4.4.7 \
		clap_lex-0.6.0 \
		configparser-3.0.4 \
		console-0.15.8 \
		cookie-factory-0.3.2 \
		core-foundation-sys-0.8.6 \
		cpufeatures-0.2.12 \
		crc32fast-1.3.2 \
		crossbeam-utils-0.8.19 \
		crypto-common-0.1.6 \
		ctrlc-3.4.2 \
		curl-0.4.44 \
		curl-sys-0.4.71+curl-8.6.0 \
		curve25519-dalek-3.2.0 \
		darling-0.14.4 \
		darling_core-0.14.4 \
		darling_macro-0.14.4 \
		dashmap-5.5.3 \
		data-encoding-2.5.0 \
		decompress-0.6.0 \
		deranged-0.3.11 \
		derive_builder-0.12.0 \
		derive_builder_core-0.12.0 \
		derive_builder_macro-0.12.0 \
		deunicode-1.4.2 \
		digest-0.9.0 \
		digest-0.10.7 \
		displaydoc-0.2.4 \
		either-1.9.0 \
		encode_unicode-0.3.6 \
		encoding_rs-0.8.33 \
		equivalent-1.0.1 \
		errno-0.3.8 \
		fastrand-1.9.0 \
		fastrand-2.0.1 \
		filetime-0.2.23 \
		find-crate-0.6.3 \
		flate2-1.0.28 \
		fluent-0.16.0 \
		fluent-bundle-0.15.2 \
		fluent-langneg-0.13.0 \
		fluent-syntax-0.11.0 \
		fnv-1.0.7 \
		form_urlencoded-1.2.1 \
		fs-err-2.11.0 \
		fs2-0.4.3 \
		fslock-0.2.1 \
		generic-array-0.14.7 \
		getrandom-0.1.16 \
		getrandom-0.2.12 \
		gimli-0.28.1 \
		git-testament-0.2.5 \
		git-testament-derive-0.2.0 \
		globset-0.4.14 \
		hashbrown-0.14.3 \
		heck-0.4.1 \
		hex-0.4.3 \
		hkdf-0.12.4 \
		hmac-0.12.1 \
		home-0.5.9 \
		i18n-config-0.4.6 \
		i18n-embed-0.13.9 \
		i18n-embed-fl-0.6.7 \
		i18n-embed-impl-0.8.3 \
		ident_case-1.0.1 \
		idna-0.5.0 \
		indexmap-2.2.2 \
		indicatif-0.17.7 \
		infer-0.12.0 \
		inout-0.1.3 \
		insta-1.35.1 \
		insta-cmd-0.5.0 \
		instant-0.1.12 \
		intl-memoizer-0.5.1 \
		intl_pluralrules-7.0.2 \
		io_tee-0.1.1 \
		itoa-1.0.10 \
		jobserver-0.1.27 \
		junction-1.0.0 \
		lazy_static-1.4.0 \
		libc-0.2.153 \
		libz-sys-1.1.15 \
		license-3.2.0 \
		linked-hash-map-0.5.6 \
		linux-raw-sys-0.4.13 \
		lock_api-0.4.11 \
		log-0.4.20 \
		mailparse-0.14.1 \
		memchr-2.7.1 \
		minijinja-1.0.12 \
		minimal-lexical-0.2.1 \
		miniz_oxide-0.7.2 \
		nix-0.27.1 \
		nom-7.1.3 \
		ntapi-0.4.1 \
		num-conv-0.1.0 \
		number_prefix-0.4.0 \
		object-0.32.2 \
		once_cell-1.19.0 \
		opaque-debug-0.3.0 \
		openssl-probe-0.1.5 \
		openssl-src-300.2.2+3.2.1 \
		openssl-sys-0.9.99 \
		parking_lot-0.12.1 \
		parking_lot_core-0.9.9 \
		pathdiff-0.2.1 \
		pbkdf2-0.11.0 \
		pep440_rs-0.4.0 \
		pep508_rs-0.3.0 \
		percent-encoding-2.3.1 \
		pin-project-1.1.4 \
		pin-project-internal-1.1.4 \
		pin-project-lite-0.2.13 \
		pkg-config-0.3.29 \
		poly1305-0.8.0 \
		portable-atomic-1.6.0 \
		powerfmt-0.2.0 \
		ppv-lite86-0.2.17 \
		proc-macro-error-1.0.4 \
		proc-macro-error-attr-1.0.4 \
		proc-macro2-1.0.78 \
		psm-0.1.21 \
		python-pkginfo-0.6.0 \
		quote-1.0.35 \
		quoted_printable-0.4.8 \
		quoted_printable-0.5.0 \
		rand-0.7.3 \
		rand-0.8.5 \
		rand_chacha-0.2.2 \
		rand_chacha-0.3.1 \
		rand_core-0.5.1 \
		rand_core-0.6.4 \
		rand_hc-0.2.0 \
		redox_syscall-0.4.1 \
		regex-1.10.3 \
		regex-automata-0.4.5 \
		regex-syntax-0.8.2 \
		reword-7.0.0 \
		rfc2047-decoder-0.2.2 \
		ring-0.17.7 \
		rust-embed-6.8.1 \
		rust-embed-impl-6.8.1 \
		rust-embed-utils-7.8.1 \
		rustc-demangle-0.1.23 \
		rustc-hash-1.1.0 \
		rustix-0.38.31 \
		rustls-0.21.10 \
		rustls-webpki-0.101.7 \
		ryu-1.0.16 \
		salsa20-0.10.2 \
		same-file-1.0.6 \
		schannel-0.1.23 \
		scopeguard-1.2.0 \
		scrypt-0.10.0 \
		sct-0.7.1 \
		secrecy-0.8.0 \
		self-replace-1.3.7 \
		self_cell-0.10.3 \
		self_cell-1.0.3 \
		serde-1.0.196 \
		serde_derive-1.0.196 \
		serde_json-1.0.113 \
		serde_spanned-0.6.5 \
		sha2-0.10.8 \
		shell-words-1.1.0 \
		shlex-1.3.0 \
		similar-2.4.0 \
		slug-0.1.5 \
		smallvec-1.13.1 \
		socket2-0.4.10 \
		spin-0.9.8 \
		stacker-0.1.15 \
		static_vcruntime-2.0.0 \
		strsim-0.10.0 \
		subtle-2.5.0 \
		syn-1.0.109 \
		syn-2.0.48 \
		sysinfo-0.29.11 \
		tar-0.4.40 \
		target-lexicon-0.12.13 \
		tempfile-3.9.0 \
		terminal_size-0.3.0 \
		thiserror-1.0.56 \
		thiserror-impl-1.0.56 \
		time-0.3.34 \
		time-core-0.1.2 \
		time-macros-0.2.17 \
		tinystr-0.7.5 \
		tinyvec-1.6.0 \
		tinyvec_macros-0.1.1 \
		toml-0.5.11 \
		toml-0.8.9 \
		toml_datetime-0.6.5 \
		toml_edit-0.21.1 \
		tracing-0.1.40 \
		tracing-attributes-0.1.27 \
		tracing-core-0.1.32 \
		type-map-0.4.0 \
		typenum-1.17.0 \
		unic-langid-0.9.4 \
		unic-langid-impl-0.9.4 \
		unicode-bidi-0.3.15 \
		unicode-ident-1.0.12 \
		unicode-normalization-0.1.22 \
		unicode-segmentation-1.10.1 \
		unicode-width-0.1.11 \
		universal-hash-0.5.1 \
		unscanny-0.1.0 \
		untrusted-0.9.0 \
		ureq-2.9.1 \
		url-2.5.0 \
		uuid-1.7.0 \
		vcpkg-0.2.15 \
		version_check-0.9.4 \
		walkdir-2.4.0 \
		wasi-0.9.0+wasi-snapshot-preview1 \
		wasi-0.11.0+wasi-snapshot-preview1 \
		wasm-bindgen-0.2.90 \
		wasm-bindgen-backend-0.2.90 \
		wasm-bindgen-macro-0.2.90 \
		wasm-bindgen-macro-support-0.2.90 \
		wasm-bindgen-shared-0.2.90 \
		webpki-roots-0.25.4 \
		which-6.0.0 \
		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.48.0 \
		windows-sys-0.52.0 \
		windows-targets-0.48.5 \
		windows-targets-0.52.0 \
		windows_aarch64_gnullvm-0.48.5 \
		windows_aarch64_gnullvm-0.52.0 \
		windows_aarch64_msvc-0.48.5 \
		windows_aarch64_msvc-0.52.0 \
		windows_i686_gnu-0.48.5 \
		windows_i686_gnu-0.52.0 \
		windows_i686_msvc-0.48.5 \
		windows_i686_msvc-0.52.0 \
		windows_x86_64_gnu-0.48.5 \
		windows_x86_64_gnu-0.52.0 \
		windows_x86_64_gnullvm-0.48.5 \
		windows_x86_64_gnullvm-0.52.0 \
		windows_x86_64_msvc-0.48.5 \
		windows_x86_64_msvc-0.52.0 \
		winnow-0.5.37 \
		winreg-0.52.0 \
		x25519-dalek-1.1.1 \
		xattr-1.3.1 \
		yaml-rust-0.4.5 \
		zerocopy-0.7.32 \
		zerocopy-derive-0.7.32 \
		zeroize-1.7.0 \
		zeroize_derive-1.4.2 \
		zip-0.6.6 \
		zstd-0.12.4 \
		zstd-0.13.0 \
		zstd-safe-6.0.6 \
		zstd-safe-7.0.0 \
		zstd-sys-2.0.9+zstd.1.5.5 \
		monotrail-utils@git+https://github.com/konstin/poc-monotrail?rev=e0251f68c254f834180198b8677fcf85d4b6a844\#e0251f68c254f834180198b8677fcf85d4b6a844 \
		dialoguer@git+https://github.com/console-rs/dialoguer?rev=47a9d4df729db7ffc1492bd0845be786e6f20153\#47a9d4df729db7ffc1492bd0845be786e6f20153

OPENSSLINC=	/usr/include
OPENSSLLIB=	/usr/lib

PLIST_FILES=	bin/${PORTNAME}

do-install:
	# binaries (workaround for error: found a virtual manifest at `xx` instead of a package manifest)
	${INSTALL_PROGRAM} \
		${WRKDIR}/target/*/release/${PORTNAME} \
		${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>
