PORTNAME=	pijul
PORTVERSION=	1.0.0.b24
CATEGORIES=	devel

MAINTAINER=	cs@FreeBSD.org
COMMENT=	Distributed version control system
WWW=		https://pijul.org/

LICENSE=	GPLv2

LIB_DEPENDS=	libzstd.so:archivers/zstd \
		libsodium.so:security/libsodium \
		libgit2.so:devel/libgit2

USES=		cargo ssl
CARGO_INSTALL=	no
CARGO_CRATES=	${PORTNAME}-1.0.0-beta.24 \
		addr2line-0.25.1 \
		adler2-2.0.1 \
		adler32-1.2.0 \
		aes-0.7.5 \
		aho-corasick-1.1.5 \
		anstream-1.0.0 \
		anstyle-1.0.14 \
		anstyle-parse-1.0.0 \
		anstyle-query-1.1.5 \
		anstyle-wincon-3.0.11 \
		anyhow-1.0.104 \
		arrayvec-0.7.8 \
		atomic-0.6.1 \
		atomic-waker-1.1.2 \
		autocfg-1.5.1 \
		aws-lc-rs-1.18.0 \
		aws-lc-sys-0.44.0 \
		backtrace-0.3.76 \
		base64-0.22.1 \
		base64ct-1.8.3 \
		bcrypt-pbkdf-0.10.0 \
		bincode-1.3.3 \
		bit-vec-0.6.3 \
		bitflags-1.3.2 \
		bitflags-2.13.1 \
		blake3-1.8.7 \
		block-buffer-0.9.0 \
		block-buffer-0.10.4 \
		block-buffer-0.12.1 \
		block-modes-0.8.1 \
		block-padding-0.2.1 \
		block2-0.6.2 \
		blowfish-0.9.1 \
		bstr-1.13.1 \
		bumpalo-3.20.3 \
		bytemuck-1.25.2 \
		byteorder-1.5.0 \
		bytes-1.12.1 \
		canonical-path-2.0.2 \
		cc-1.4.4 \
		cfg-if-1.0.4 \
		cfg_aliases-0.2.2 \
		chacha20-0.10.1 \
		chardetng-1.0.0 \
		cipher-0.3.0 \
		cipher-0.4.4 \
		clap-4.6.6 \
		clap_builder-4.6.6 \
		clap_complete-4.6.9 \
		clap_derive-4.6.4 \
		clap_lex-1.1.0 \
		clap_mangen-0.3.3 \
		cmake-0.1.58 \
		cmov-0.5.4 \
		colorchoice-1.0.5 \
		combine-4.6.7 \
		console-0.15.11 \
		console-0.16.4 \
		const-oid-0.10.2 \
		constant_time_eq-0.4.2 \
		core-foundation-0.9.4 \
		core-foundation-0.10.1 \
		core-foundation-sys-0.8.7 \
		cpufeatures-0.2.17 \
		cpufeatures-0.3.0 \
		crc32fast-1.5.1 \
		crossbeam-deque-0.8.7 \
		crossbeam-epoch-0.9.20 \
		crossbeam-utils-0.8.22 \
		crypto-common-0.1.7 \
		crypto-common-0.2.2 \
		crypto-mac-0.11.0 \
		cryptovec-0.7.1 \
		ctr-0.8.0 \
		ctrlc-3.5.2 \
		ctutils-0.4.2 \
		curve25519-dalek-5.0.0 \
		curve25519-dalek-derive-0.1.1 \
		data-encoding-2.11.1 \
		defmt-1.1.1 \
		defmt-macros-1.1.1 \
		defmt-parser-1.0.0 \
		der-0.8.1 \
		dialoguer-0.12.0 \
		diffs-0.5.1 \
		digest-0.9.0 \
		digest-0.10.7 \
		digest-0.11.3 \
		dirs-3.0.2 \
		dirs-next-2.0.0 \
		dirs-sys-0.3.7 \
		dirs-sys-next-0.1.2 \
		dispatch2-0.3.1 \
		displaydoc-0.2.7 \
		dunce-1.0.5 \
		edit-0.1.5 \
		either-1.18.0 \
		encode_unicode-1.0.0 \
		encoding_rs-0.8.35 \
		env_filter-2.0.0 \
		env_logger-0.11.11 \
		equivalent-1.0.2 \
		errno-0.2.8 \
		errno-0.3.14 \
		errno-dragonfly-0.1.2 \
		fastrand-2.5.0 \
		fiat-crypto-0.3.0 \
		figment-0.10.19 \
		filetime-0.2.29 \
		find-msvc-tools-0.1.11 \
		flate2-1.1.9 \
		fnv-1.0.7 \
		foldhash-0.1.5 \
		foreign-types-0.3.2 \
		foreign-types-shared-0.1.1 \
		form_urlencoded-1.2.2 \
		fs4-1.1.0 \
		fs_extra-1.3.0 \
		futures-0.3.34 \
		futures-channel-0.3.34 \
		futures-core-0.3.34 \
		futures-executor-0.3.34 \
		futures-io-0.3.34 \
		futures-macro-0.3.34 \
		futures-sink-0.3.34 \
		futures-task-0.3.34 \
		futures-util-0.3.34 \
		generic-array-0.14.7 \
		getrandom-0.2.17 \
		getrandom-0.3.4 \
		getrandom-0.4.3 \
		gimli-0.32.3 \
		git2-0.21.0 \
		globset-0.4.20 \
		h2-0.4.18 \
		hashbrown-0.15.5 \
		hashbrown-0.17.1 \
		heck-0.5.0 \
		hermit-abi-0.5.2 \
		hmac-0.11.0 \
		home-0.5.12 \
		http-1.5.0 \
		http-body-1.1.0 \
		http-body-util-0.1.5 \
		httparse-1.10.1 \
		httpdate-1.0.3 \
		human-panic-2.0.8 \
		hybrid-array-0.4.14 \
		hyper-1.11.0 \
		hyper-rustls-0.27.9 \
		hyper-util-0.1.20 \
		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 \
		imara-diff-0.1.8 \
		indexmap-2.14.0 \
		indicatif-0.17.11 \
		inout-0.1.4 \
		ipnet-2.12.1 \
		is-docker-0.2.0 \
		is-wsl-0.4.0 \
		is_terminal_polyfill-1.70.2 \
		itoa-1.0.18 \
		jiff-0.2.35 \
		jiff-core-0.1.0 \
		jiff-static-0.2.35 \
		jiff-tzdb-0.1.8 \
		jiff-tzdb-platform-0.1.3 \
		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.104 \
		keccak-0.2.2 \
		kem-0.3.0 \
		lazy_static-0.2.11 \
		lazy_static-1.5.0 \
		libc-0.2.189 \
		libgit2-sys-0.18.8+1.9.7 \
		libm-0.2.16 \
		libredox-0.1.20 \
		libsodium-sys-0.2.7 \
		libz-sys-1.1.29 \
		linked-hash-map-0.5.6 \
		linux-raw-sys-0.4.15 \
		linux-raw-sys-0.12.1 \
		litemap-0.8.3 \
		lock_api-0.4.14 \
		log-0.4.34 \
		lru-cache-0.1.2 \
		lru-slab-0.1.2 \
		md5-0.7.0 \
		memchr-2.8.3 \
		memmap2-0.9.11 \
		mime-0.3.17 \
		minimal-lexical-0.2.1 \
		miniz_oxide-0.8.9 \
		mio-1.2.2 \
		ml-kem-0.3.2 \
		module-lattice-0.2.3 \
		nix-0.31.3 \
		nom-7.1.3 \
		ntapi-0.4.3 \
		num-bigint-0.4.8 \
		num-integer-0.1.47 \
		num-traits-0.2.19 \
		num_cpus-1.17.0 \
		number_prefix-0.4.0 \
		objc2-0.6.4 \
		objc2-core-foundation-0.3.2 \
		objc2-encode-4.1.0 \
		objc2-io-kit-0.3.2 \
		object-0.37.3 \
		once_cell-1.21.4 \
		once_cell_polyfill-1.70.2 \
		opaque-debug-0.3.1 \
		open-5.4.1 \
		openssl-0.10.81 \
		openssl-macros-0.1.1 \
		openssl-probe-0.2.1 \
		openssl-sys-0.9.117 \
		pager-0.16.1 \
		palimpsest-0.3.0 \
		parking_lot-0.12.5 \
		parking_lot_core-0.9.12 \
		password-hash-0.2.1 \
		path-slash-0.2.1 \
		pbkdf2-0.8.0 \
		pbkdf2-0.12.2 \
		percent-encoding-2.3.2 \
		pijul-config-1.0.0-beta.24 \
		pijul-core-1.0.0-beta.24 \
		pijul-identity-1.0.0-beta.23 \
		pijul-interaction-1.0.0-beta.24 \
		pijul-macros-1.0.0-beta.13 \
		pijul-remote-1.0.0-beta.24 \
		pijul-repository-1.0.0-beta.23 \
		pin-project-lite-0.2.17 \
		pkcs8-0.11.0 \
		pkg-config-0.3.34 \
		plain-0.2.3 \
		portable-atomic-1.15.0 \
		portable-atomic-util-0.2.7 \
		potential_utf-0.1.6 \
		ppv-lite86-0.2.21 \
		proc-macro2-1.0.107 \
		ptree-0.5.2 \
		quinn-0.11.11 \
		quinn-proto-0.11.17 \
		quinn-udp-0.5.15 \
		quote-1.0.47 \
		r-efi-5.3.0 \
		r-efi-6.0.0 \
		rand-0.9.5 \
		rand-0.10.2 \
		rand_chacha-0.9.0 \
		rand_core-0.6.4 \
		rand_core-0.9.5 \
		rand_core-0.10.1 \
		rand_distr-0.6.0 \
		rand_pcg-0.10.2 \
		redox_syscall-0.5.18 \
		redox_syscall-0.9.3 \
		redox_users-0.4.6 \
		regex-1.13.1 \
		regex-automata-0.4.18 \
		regex-syntax-0.8.11 \
		reqwest-0.13.4 \
		ring-0.17.14 \
		rlimit-0.11.0 \
		roff-1.1.1 \
		rustc-demangle-0.1.28 \
		rustc-hash-2.1.3 \
		rustc_version-0.4.1 \
		rustix-0.38.44 \
		rustix-1.1.4 \
		rustls-0.23.43 \
		rustls-native-certs-0.8.4 \
		rustls-pki-types-1.15.1 \
		rustls-platform-verifier-0.7.0 \
		rustls-platform-verifier-android-0.1.1 \
		rustls-webpki-0.103.15 \
		rustversion-1.0.23 \
		ryu-1.0.23 \
		same-file-1.0.6 \
		sanakirja-2.0.0-beta.3 \
		sanakirja-core-2.0.0-beta.1 \
		schannel-0.1.29 \
		scopeguard-1.2.0 \
		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.151 \
		serde_spanned-0.6.9 \
		serde_spanned-1.1.1 \
		serde_urlencoded-0.7.1 \
		sha2-0.9.9 \
		sha2-0.10.9 \
		sha2-0.11.0 \
		sha3-0.11.0 \
		shell-words-1.1.1 \
		shlex-2.0.1 \
		signal-hook-registry-1.4.8 \
		simd-adler32-0.3.10 \
		simd_cesu8-1.2.0 \
		simdutf8-0.1.5 \
		slab-0.4.12 \
		smallvec-1.15.2 \
		socket2-0.6.5 \
		spki-0.8.0 \
		ssh-libsodium-0.4.0 \
		stable_deref_trait-1.2.1 \
		streaming-iterator-0.1.9 \
		strsim-0.11.1 \
		subtle-2.6.1 \
		syn-2.0.119 \
		syn-3.0.3 \
		sync_wrapper-1.0.2 \
		synstructure-0.13.2 \
		sysinfo-0.38.4 \
		system-configuration-0.7.0 \
		system-configuration-sys-0.6.0 \
		tar-0.4.46 \
		tempfile-3.27.0 \
		termcolor-1.4.1 \
		thiserror-1.0.69 \
		thiserror-2.0.20 \
		thiserror-impl-1.0.69 \
		thiserror-impl-2.0.20 \
		threadpool-1.8.1 \
		thrussh-0.49.0 \
		thrussh-config-0.6.0 \
		thrussh-keys-0.44.0 \
		tint-1.0.1 \
		tinystr-0.8.4 \
		tinyvec-1.12.0 \
		tinyvec_macros-0.1.1 \
		tokio-1.53.1 \
		tokio-macros-2.7.2 \
		tokio-rustls-0.26.4 \
		tokio-stream-0.1.19 \
		tokio-util-0.7.19 \
		toml-0.8.23 \
		toml-1.1.4+spec-1.1.0 \
		toml_datetime-0.6.11 \
		toml_datetime-1.1.1+spec-1.1.0 \
		toml_edit-0.22.27 \
		toml_write-0.1.2 \
		toml_writer-1.1.2+spec-1.1.0 \
		tower-0.5.3 \
		tower-http-0.6.11 \
		tower-layer-0.3.3 \
		tower-service-0.3.3 \
		tracing-0.1.44 \
		tracing-attributes-0.1.31 \
		tracing-core-0.1.36 \
		tree-sitter-0.25.10 \
		tree-sitter-bash-0.25.1 \
		tree-sitter-c-0.24.2 \
		tree-sitter-cpp-0.23.4 \
		tree-sitter-css-0.25.0 \
		tree-sitter-go-0.25.0 \
		tree-sitter-haskell-0.23.1 \
		tree-sitter-html-0.23.2 \
		tree-sitter-java-0.23.5 \
		tree-sitter-javascript-0.25.0 \
		tree-sitter-json-0.24.8 \
		tree-sitter-language-0.1.7 \
		tree-sitter-nix-0.3.0 \
		tree-sitter-ocaml-0.25.0 \
		tree-sitter-python-0.25.0 \
		tree-sitter-ruby-0.23.1 \
		tree-sitter-rust-0.24.2 \
		tree-sitter-svelte-ng-1.0.2 \
		tree-sitter-typescript-0.23.2 \
		try-lock-0.2.5 \
		typenum-1.20.1 \
		uncased-0.9.10 \
		unicode-ident-1.0.24 \
		unicode-segmentation-1.13.3 \
		unicode-width-0.2.2 \
		untrusted-0.9.0 \
		url-2.5.8 \
		utf8_iter-1.0.4 \
		utf8parse-0.2.2 \
		uuid-1.25.0 \
		validator-0.21.0 \
		vcpkg-0.2.15 \
		version_check-0.9.5 \
		walkdir-2.5.0 \
		want-0.3.1 \
		wasi-0.11.1+wasi-snapshot-preview1 \
		wasip2-1.0.4+wasi-0.2.12 \
		wasite-0.1.0 \
		wasm-bindgen-0.2.127 \
		wasm-bindgen-futures-0.4.77 \
		wasm-bindgen-macro-0.2.127 \
		wasm-bindgen-macro-support-0.2.127 \
		wasm-bindgen-shared-0.2.127 \
		wasm-streams-0.5.0 \
		web-sys-0.3.104 \
		web-time-1.1.0 \
		webpki-root-certs-1.0.9 \
		which-4.4.2 \
		whoami-1.6.1 \
		whoami-2.1.3 \
		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-0.62.2 \
		windows-collections-0.3.2 \
		windows-core-0.62.2 \
		windows-future-0.3.2 \
		windows-implement-0.60.2 \
		windows-interface-0.59.3 \
		windows-link-0.2.1 \
		windows-numerics-0.3.1 \
		windows-registry-0.6.1 \
		windows-result-0.4.1 \
		windows-strings-0.5.1 \
		windows-sys-0.52.0 \
		windows-sys-0.59.0 \
		windows-sys-0.61.2 \
		windows-targets-0.52.6 \
		windows-threading-0.2.1 \
		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-0.7.15 \
		wit-bindgen-0.57.1 \
		writeable-0.6.4 \
		xattr-1.6.1 \
		yasna-0.4.0 \
		yoke-0.8.3 \
		yoke-derive-0.8.2 \
		zerocopy-0.8.56 \
		zerocopy-derive-0.8.56 \
		zerofrom-0.1.8 \
		zerofrom-derive-0.1.7 \
		zeroize-1.9.0 \
		zerotrie-0.2.5 \
		zerovec-0.11.8 \
		zerovec-derive-0.11.6 \
		zmij-1.0.23 \
		zstd-seekable-0.1.23

PLIST_FILES=	bin/pijul

.include <bsd.port.options.mk>

.if ${ARCH} == powerpc
LTO_UNSAFE=	yes
.endif

post-patch:
	${MV} ${WRKSRC}/cargo-crates/pijul-1.0.0-beta.24/* ${WRKSRC}/

do-install:
	${INSTALL_SCRIPT} ${CARGO_TARGET_DIR}/*/pijul ${STAGEDIR}${PREFIX}/bin/pijul

.include <bsd.port.mk>
