PORTNAME=	cargo-edit
DISTVERSIONPREFIX=	v
DISTVERSION=	0.13.14
CATEGORIES=	devel

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Rust: Utility for managing cargo dependencies from the command line
WWW=		https://github.com/killercup/cargo-edit

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

LIB_DEPENDS=	libssh2.so:security/libssh2

USES=		cargo localbase:ldflags ssl

USE_GITHUB=	yes
GH_ACCOUNT=	killercup

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=	aho-corasick-1.1.5 \
		anstream-1.0.0 \
		anstyle-1.0.14 \
		anstyle-lossy-1.1.5 \
		anstyle-parse-1.0.0 \
		anstyle-query-1.1.5 \
		anstyle-svg-1.1.1 \
		anstyle-wincon-3.0.11 \
		anyhow-1.0.104 \
		atty-0.2.14 \
		base16ct-0.2.0 \
		base64-0.23.1 \
		base64ct-1.8.3 \
		bitflags-1.3.2 \
		bitflags-2.13.2 \
		block-buffer-0.10.4 \
		block-buffer-0.12.1 \
		borsh-1.8.1 \
		bstr-1.13.1 \
		bumpalo-3.20.3 \
		bytes-1.12.1 \
		camino-1.2.6 \
		cargo-platform-0.3.3 \
		cargo-test-macro-0.4.14 \
		cargo-test-support-0.11.6 \
		cargo-util-0.2.32 \
		cargo_metadata-0.23.1 \
		cc-1.9.0 \
		cfg-if-1.0.5 \
		cfg_aliases-0.2.2 \
		clap-4.6.7 \
		clap-cargo-0.19.0 \
		clap-verbosity-flag-3.0.4 \
		clap_builder-4.6.7 \
		clap_derive-4.6.7 \
		clap_lex-1.1.1 \
		colorchoice-1.0.5 \
		combine-4.6.9 \
		concolor-control-0.0.7 \
		concolor-query-0.0.4 \
		const-oid-0.9.6 \
		const-oid-0.10.2 \
		content_inspector-0.2.4 \
		core-foundation-0.10.1 \
		core-foundation-sys-0.8.7 \
		cpufeatures-0.2.17 \
		cpufeatures-0.3.1 \
		crates-io-0.41.2 \
		crossbeam-deque-0.8.8 \
		crossbeam-epoch-0.9.21 \
		crossbeam-utils-0.8.23 \
		crypto-bigint-0.5.5 \
		crypto-common-0.1.6 \
		crypto-common-0.2.2 \
		ct-codecs-1.1.8 \
		defmt-1.2.0 \
		defmt-macros-1.2.0 \
		defmt-parser-1.1.0 \
		der-0.7.10 \
		deranged-0.5.9 \
		digest-0.10.7 \
		digest-0.11.3 \
		displaydoc-0.2.7 \
		dunce-1.0.5 \
		ecdsa-0.16.9 \
		ed25519-compact-2.6.0 \
		either-1.19.0 \
		elliptic-curve-0.13.8 \
		env_filter-2.0.0 \
		env_logger-0.11.11 \
		equivalent-1.0.3 \
		errno-0.3.14 \
		fastrand-2.5.0 \
		ff-0.13.1 \
		fiat-crypto-0.3.0 \
		filetime-0.2.29 \
		find-msvc-tools-0.1.15 \
		flate2-1.1.10 \
		form_urlencoded-1.2.2 \
		generic-array-0.14.9 \
		getrandom-0.2.17 \
		getrandom-0.4.3 \
		git2-0.21.0 \
		glob-0.3.4 \
		globset-0.4.20 \
		group-0.13.0 \
		hashbrown-0.17.1 \
		heck-0.5.0 \
		hermit-abi-0.1.19 \
		hex-0.4.3 \
		hkdf-0.12.4 \
		hmac-0.12.1 \
		home-0.5.12 \
		html-escape-0.2.15 \
		http-1.5.0 \
		httparse-1.10.1 \
		humantime-2.4.0 \
		humantime-serde-1.1.1 \
		hybrid-array-0.4.15 \
		icu_collections-2.3.0 \
		icu_locale_core-2.3.0 \
		icu_normalizer-2.3.0 \
		icu_normalizer_data-2.3.0 \
		icu_properties-2.3.0 \
		icu_properties_data-2.3.0 \
		icu_provider-2.3.1 \
		idna-1.1.0 \
		idna_adapter-1.2.2 \
		ignore-0.4.33 \
		indexmap-2.14.2 \
		is_terminal_polyfill-1.70.2 \
		itertools-0.15.0 \
		itoa-1.0.18 \
		jiff-0.2.38 \
		jiff-core-0.1.1 \
		jiff-static-0.2.38 \
		jni-0.22.4 \
		jni-macros-0.22.4 \
		jni-sys-0.4.1 \
		jni-sys-macros-0.4.1 \
		jobserver-0.1.35 \
		js-sys-0.3.106 \
		libc-0.2.191 \
		libgit2-sys-0.18.8+1.9.7 \
		libssh2-sys-0.3.3 \
		libz-sys-1.1.30 \
		linux-raw-sys-0.12.1 \
		litemap-0.8.3 \
		log-0.4.34 \
		memchr-2.8.3 \
		memmap2-0.9.12 \
		miow-0.6.1 \
		normalize-line-endings-0.3.0 \
		num-conv-0.2.2 \
		once_cell-1.21.4 \
		once_cell_polyfill-1.70.2 \
		openssl-probe-0.1.6 \
		openssl-probe-0.2.1 \
		openssl-sys-0.9.117 \
		orion-0.17.15 \
		os_pipe-1.2.3 \
		p384-0.13.1 \
		pasetors-0.7.8 \
		pathdiff-0.2.3 \
		pem-rfc7468-0.7.0 \
		percent-encoding-2.3.2 \
		pin-project-lite-0.2.17 \
		pkcs8-0.10.2 \
		pkg-config-0.3.34 \
		portable-atomic-1.15.0 \
		portable-atomic-util-0.2.8 \
		potential_utf-0.1.6 \
		powerfmt-0.2.1 \
		primeorder-0.13.6 \
		proc-macro2-1.0.107 \
		quote-1.0.47 \
		r-efi-6.0.0 \
		rand_core-0.6.4 \
		rayon-1.12.0 \
		rayon-core-1.13.0 \
		regex-1.13.1 \
		regex-automata-0.4.18 \
		regex-syntax-0.8.11 \
		rfc6979-0.4.0 \
		ring-0.17.14 \
		rustc-stable-hash-0.1.2 \
		rustc_version-0.4.1 \
		rustix-1.1.5 \
		rustls-0.23.46 \
		rustls-native-certs-0.8.5 \
		rustls-pki-types-1.15.1 \
		rustls-platform-verifier-0.7.1 \
		rustls-platform-verifier-android-0.2.0 \
		rustls-webpki-0.103.16 \
		rustversion-1.0.23 \
		same-file-1.0.6 \
		schannel-0.1.30 \
		sec1-0.7.3 \
		security-framework-3.7.0 \
		security-framework-sys-2.17.0 \
		semver-1.0.28 \
		serde-1.0.229 \
		serde_core-1.0.229 \
		serde_derive-1.0.229 \
		serde_json-1.0.154 \
		serde_spanned-1.1.2 \
		sha2-0.10.9 \
		sha2-0.11.1 \
		shell-escape-0.1.5 \
		shlex-1.3.0 \
		shlex-2.0.1 \
		signature-2.2.0 \
		simd_cesu8-1.2.0 \
		simdutf8-0.1.5 \
		similar-3.2.0 \
		smallvec-1.16.3 \
		smol_str-0.3.7 \
		snapbox-1.2.2 \
		snapbox-macros-1.1.0 \
		spki-0.7.3 \
		stable_deref_trait-1.2.1 \
		strsim-0.11.1 \
		subtle-2.6.1 \
		syn-2.0.119 \
		syn-3.0.9 \
		synstructure-0.14.0 \
		tame-index-0.27.0 \
		tar-0.4.46 \
		tempfile-3.27.0 \
		termcolor-1.4.1 \
		terminal_size-0.4.4 \
		thiserror-2.0.21 \
		thiserror-impl-2.0.21 \
		time-0.3.55 \
		time-core-0.1.9 \
		time-macros-0.2.32 \
		tinystr-0.8.4 \
		toml-1.1.8+spec-1.1.0 \
		toml-span-0.7.2 \
		toml_datetime-1.1.2+spec-1.1.0 \
		toml_edit-0.25.17+spec-1.1.0 \
		toml_parser-1.1.5+spec-1.1.0 \
		toml_writer-1.1.3+spec-1.1.0 \
		tracing-0.1.44 \
		tracing-core-0.1.36 \
		trycmd-1.2.1 \
		typenum-1.20.1 \
		unicode-ident-1.0.27 \
		unicode-width-0.2.2 \
		untrusted-0.9.0 \
		ureq-3.5.0 \
		ureq-proto-0.6.5 \
		url-2.5.8 \
		utf8-zero-0.8.1 \
		utf8_iter-1.0.4 \
		utf8parse-0.2.2 \
		vcpkg-0.2.15 \
		version_check-0.9.5 \
		wait-timeout-0.2.1 \
		walkdir-2.5.0 \
		wasi-0.11.1+wasi-snapshot-preview1 \
		wasm-bindgen-0.2.129 \
		wasm-bindgen-macro-0.2.129 \
		wasm-bindgen-macro-support-0.2.129 \
		wasm-bindgen-shared-0.2.129 \
		webpki-root-certs-1.0.10 \
		webpki-roots-1.0.10 \
		winapi-0.3.9 \
		winapi-i686-pc-windows-gnu-0.4.0 \
		winapi-util-0.1.11 \
		winapi-x86_64-pc-windows-gnu-0.4.0 \
		windows-link-0.2.1 \
		windows-sys-0.52.0 \
		windows-sys-0.61.2 \
		windows-targets-0.52.6 \
		windows_aarch64_gnullvm-0.52.6 \
		windows_aarch64_msvc-0.52.6 \
		windows_i686_gnu-0.52.6 \
		windows_i686_gnullvm-0.52.6 \
		windows_i686_msvc-0.52.6 \
		windows_x86_64_gnu-0.52.6 \
		windows_x86_64_gnullvm-0.52.6 \
		windows_x86_64_msvc-0.52.6 \
		winnow-1.0.4 \
		writeable-0.6.4 \
		yoke-0.8.3 \
		yoke-derive-0.8.4 \
		zerofrom-0.1.8 \
		zerofrom-derive-0.1.8 \
		zeroize-1.9.1 \
		zerotrie-0.2.5 \
		zerovec-0.11.8 \
		zerovec-derive-0.11.6 \
		zlib-rs-0.6.8 \
		zmij-1.0.23

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

PLIST_FILES=	bin/cargo-set-version \
		bin/cargo-upgrade

post-install: # these 2 were merged into cargo
	@${RM} \
		${STAGEDIR}${PREFIX}/bin/cargo-add \
		${STAGEDIR}${PREFIX}/bin/cargo-rm

.include <bsd.port.mk>
