PORTNAME=	qdrant
DISTVERSIONPREFIX=	v
DISTVERSION=	1.1.0
CATEGORIES=	databases

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Vector search engine and database for the next gen AI applications
WWW=		https://qdrant.tech

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	gmake:devel/gmake \
		protoc:devel/protobuf

USES=		cargo perl5 llvm:min=13 pkgconfig
USE_PERL5=	build

USE_GITHUB=	yes

CARGO_CRATES=	actix-codec-0.5.0 \
		actix-cors-0.6.4 \
		actix-files-0.6.2 \
		actix-http-3.3.0 \
		actix-macros-0.2.3 \
		actix-router-0.5.1 \
		actix-rt-2.7.0 \
		actix-server-2.1.1 \
		actix-service-2.0.2 \
		actix-utils-3.0.1 \
		actix-web-4.3.1 \
		actix-web-codegen-4.2.0 \
		addr2line-0.19.0 \
		adler-1.0.2 \
		ahash-0.7.6 \
		ahash-0.8.2 \
		aho-corasick-0.7.20 \
		alloc-no-stdlib-2.0.4 \
		alloc-stdlib-0.2.2 \
		android_system_properties-0.1.5 \
		anes-0.1.6 \
		anyhow-1.0.69 \
		approx-0.5.1 \
		arc-swap-1.6.0 \
		arrayvec-0.4.12 \
		arrayvec-0.7.2 \
		askama_escape-0.10.3 \
		async-stream-0.3.3 \
		async-stream-impl-0.3.3 \
		async-trait-0.1.66 \
		atomic-polyfill-0.1.11 \
		atomic_refcell-0.1.9 \
		atomicwrites-0.4.0 \
		atty-0.2.14 \
		autocfg-1.1.0 \
		axum-0.6.1 \
		axum-core-0.3.0 \
		backtrace-0.3.67 \
		base64-0.13.1 \
		base64-0.21.0 \
		bincode-1.3.3 \
		bindgen-0.64.0 \
		bit-set-0.5.3 \
		bit-vec-0.6.3 \
		bitflags-1.3.2 \
		bitvec-1.0.1 \
		blake2-rfc-0.2.18 \
		block-buffer-0.10.3 \
		brotli-3.3.4 \
		brotli-decompressor-2.3.2 \
		bumpalo-3.11.1 \
		bytemuck-1.12.3 \
		byteorder-1.4.3 \
		bytes-1.3.0 \
		bytestring-1.2.0 \
		bzip2-sys-0.1.11+1.0.8 \
		cast-0.3.0 \
		cc-1.0.78 \
		cexpr-0.6.0 \
		cfg-if-1.0.0 \
		chrono-0.4.24 \
		ci_info-0.10.2 \
		ciborium-0.2.0 \
		ciborium-io-0.2.0 \
		ciborium-ll-0.2.0 \
		clang-sys-1.4.0 \
		clap-3.2.23 \
		clap-4.1.8 \
		clap_derive-4.1.8 \
		clap_lex-0.2.4 \
		clap_lex-0.3.0 \
		codespan-reporting-0.11.1 \
		colored-2.0.0 \
		config-0.13.3 \
		console-0.15.2 \
		constant_time_eq-0.1.5 \
		convert_case-0.4.0 \
		cookie-0.16.2 \
		core-foundation-0.9.3 \
		core-foundation-sys-0.8.3 \
		cpp_demangle-0.4.0 \
		cpufeatures-0.2.5 \
		crc-3.0.0 \
		crc-catalog-2.1.0 \
		crc32fast-1.3.2 \
		criterion-0.4.0 \
		criterion-plot-0.5.0 \
		critical-section-1.1.1 \
		crossbeam-channel-0.5.6 \
		crossbeam-deque-0.8.2 \
		crossbeam-epoch-0.9.13 \
		crossbeam-utils-0.8.14 \
		crypto-common-0.1.6 \
		cxx-1.0.85 \
		cxx-build-1.0.85 \
		cxxbridge-flags-1.0.85 \
		cxxbridge-macro-1.0.85 \
		debugid-0.8.0 \
		derive_more-0.99.17 \
		digest-0.10.6 \
		dlv-list-0.3.0 \
		docopt-1.1.1 \
		dyn-clone-1.0.10 \
		either-1.8.0 \
		encode_unicode-0.3.6 \
		encoding_rs-0.8.31 \
		env_logger-0.10.0 \
		envmnt-0.8.4 \
		errno-0.2.8 \
		errno-dragonfly-0.1.2 \
		fastrand-1.8.0 \
		filetime-0.2.19 \
		findshlibs-0.10.2 \
		fixedbitset-0.4.2 \
		flate2-1.0.25 \
		float_next_after-1.0.0 \
		fnv-1.0.7 \
		foreign-types-0.3.2 \
		foreign-types-shared-0.1.1 \
		form_urlencoded-1.1.0 \
		fs2-0.4.3 \
		fs_extra-1.3.0 \
		fsio-0.1.3 \
		funty-2.0.0 \
		futures-0.3.27 \
		futures-channel-0.3.27 \
		futures-core-0.3.27 \
		futures-executor-0.3.27 \
		futures-io-0.3.27 \
		futures-macro-0.3.27 \
		futures-sink-0.3.27 \
		futures-task-0.3.27 \
		futures-util-0.3.27 \
		fxhash-0.2.1 \
		generic-array-0.14.6 \
		geo-0.24.0 \
		geo-types-0.7.9 \
		geographiclib-rs-0.2.3 \
		geohash-0.13.0 \
		getopts-0.2.21 \
		getrandom-0.1.16 \
		getrandom-0.2.8 \
		getset-0.1.2 \
		gimli-0.27.0 \
		glob-0.3.0 \
		h2-0.3.15 \
		half-1.8.2 \
		hash32-0.2.1 \
		hashbrown-0.12.3 \
		hashring-0.3.0 \
		heapless-0.7.16 \
		heck-0.4.0 \
		hermit-abi-0.1.19 \
		hermit-abi-0.2.6 \
		http-0.2.9 \
		http-body-0.4.5 \
		http-range-0.1.5 \
		http-range-header-0.3.0 \
		httparse-1.8.0 \
		httpdate-1.0.2 \
		humantime-2.1.0 \
		hyper-0.14.23 \
		hyper-rustls-0.23.2 \
		hyper-timeout-0.4.1 \
		hyper-tls-0.5.0 \
		iana-time-zone-0.1.53 \
		iana-time-zone-haiku-0.1.1 \
		idna-0.3.0 \
		indexmap-1.9.2 \
		indicatif-0.17.3 \
		inferno-0.11.13 \
		instant-0.1.12 \
		io-lifetimes-1.0.3 \
		ipnet-2.7.0 \
		is-terminal-0.4.1 \
		itertools-0.10.5 \
		itoa-1.0.5 \
		jobserver-0.1.25 \
		js-sys-0.3.60 \
		json5-0.4.1 \
		language-tags-0.3.2 \
		lazy_static-1.4.0 \
		lazycell-1.3.0 \
		libc-0.2.138 \
		libloading-0.7.4 \
		libm-0.2.6 \
		librocksdb-sys-0.10.0+7.9.2 \
		libz-sys-1.1.8 \
		link-cplusplus-1.0.8 \
		linked-hash-map-0.5.6 \
		linux-raw-sys-0.1.4 \
		local-channel-0.1.3 \
		local-waker-0.1.3 \
		lock_api-0.4.9 \
		log-0.4.17 \
		matchit-0.7.0 \
		memchr-2.5.0 \
		memmap2-0.5.10 \
		memoffset-0.7.1 \
		merge-0.1.0 \
		merge_derive-0.1.0 \
		mime-0.3.16 \
		mime_guess-2.0.4 \
		minimal-lexical-0.2.1 \
		miniz_oxide-0.6.2 \
		mio-0.8.5 \
		multimap-0.8.3 \
		native-tls-0.2.11 \
		nias-0.5.0 \
		nix-0.26.2 \
		nodrop-0.1.14 \
		nom-7.1.1 \
		num-derive-0.3.3 \
		num-format-0.4.4 \
		num-integer-0.1.45 \
		num-traits-0.2.15 \
		num_cpus-1.15.0 \
		number_prefix-0.4.0 \
		object-0.30.0 \
		once_cell-1.16.0 \
		oorandom-11.1.3 \
		openssl-0.10.46 \
		openssl-macros-0.1.0 \
		openssl-probe-0.1.5 \
		openssl-src-111.25.0+1.1.1t \
		openssl-sys-0.9.81 \
		ordered-float-2.10.0 \
		ordered-float-3.4.0 \
		ordered-multimap-0.4.3 \
		os_str_bytes-6.4.1 \
		parking_lot-0.12.1 \
		parking_lot_core-0.9.5 \
		paste-1.0.11 \
		pathdiff-0.2.1 \
		peeking_take_while-0.1.2 \
		percent-encoding-2.2.0 \
		permutation_iterator-0.1.2 \
		pest-2.5.1 \
		pest_derive-2.5.1 \
		pest_generator-2.5.1 \
		pest_meta-2.5.1 \
		petgraph-0.6.2 \
		pin-project-1.0.12 \
		pin-project-internal-1.0.12 \
		pin-project-lite-0.2.9 \
		pin-utils-0.1.0 \
		pkg-config-0.3.26 \
		plotters-0.3.4 \
		plotters-backend-0.3.4 \
		plotters-svg-0.3.3 \
		portable-atomic-0.3.18 \
		pprof-0.11.1 \
		ppv-lite86-0.2.17 \
		prettyplease-0.1.22 \
		proc-macro-error-1.0.4 \
		proc-macro-error-attr-1.0.4 \
		proc-macro2-1.0.49 \
		prometheus-0.13.3 \
		proptest-1.1.0 \
		prost-0.11.8 \
		prost-build-0.11.4 \
		prost-derive-0.11.8 \
		prost-types-0.11.8 \
		protobuf-2.28.0 \
		protobuf-build-0.14.0 \
		quick-error-1.2.3 \
		quick-error-2.0.1 \
		quick-xml-0.26.0 \
		quote-1.0.23 \
		radium-0.7.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_distr-0.4.3 \
		rand_hc-0.2.0 \
		rand_xorshift-0.3.0 \
		rayon-1.7.0 \
		rayon-core-1.11.0 \
		redox_syscall-0.2.16 \
		regex-1.7.0 \
		regex-syntax-0.6.28 \
		reqwest-0.11.14 \
		rgb-0.8.34 \
		ring-0.16.20 \
		rmp-0.8.11 \
		rmp-serde-1.1.1 \
		robust-0.2.3 \
		rocksdb-0.20.1 \
		ron-0.7.1 \
		rstar-0.10.0 \
		rust-ini-0.18.0 \
		rustc-demangle-0.1.21 \
		rustc-hash-1.1.0 \
		rustc_version-0.4.0 \
		rustix-0.36.5 \
		rustls-0.20.7 \
		rustls-pemfile-1.0.1 \
		rustversion-1.0.11 \
		rusty-fork-0.3.0 \
		rusty-hook-0.11.2 \
		ryu-1.0.12 \
		same-file-1.0.6 \
		schannel-0.1.20 \
		schemars-0.8.12 \
		schemars_derive-0.8.12 \
		scopeguard-1.1.0 \
		scratch-1.0.3 \
		sct-0.7.0 \
		seahash-4.1.0 \
		security-framework-2.7.0 \
		security-framework-sys-2.6.1 \
		semver-1.0.17 \
		serde-1.0.156 \
		serde-value-0.7.0 \
		serde_cbor-0.11.2 \
		serde_derive-1.0.156 \
		serde_derive_internals-0.26.0 \
		serde_json-1.0.94 \
		serde_urlencoded-0.7.1 \
		sha1-0.10.5 \
		sha2-0.10.6 \
		shlex-1.1.0 \
		signal-hook-registry-1.4.0 \
		siphasher-0.3.10 \
		slab-0.4.7 \
		slog-2.7.0 \
		slog-scope-4.4.0 \
		slog-stdlog-4.1.1 \
		smallvec-1.10.0 \
		socket2-0.4.7 \
		spin-0.5.2 \
		spin-0.9.4 \
		stable_deref_trait-1.2.0 \
		static_assertions-1.1.0 \
		str_stack-0.1.0 \
		strsim-0.10.0 \
		symbolic-common-10.2.1 \
		symbolic-demangle-10.2.1 \
		syn-1.0.107 \
		sync_wrapper-0.1.1 \
		sys-info-0.9.1 \
		tap-1.0.1 \
		tar-0.4.38 \
		tempfile-3.4.0 \
		termcolor-1.1.3 \
		terminal_size-0.1.17 \
		textwrap-0.16.0 \
		thiserror-1.0.39 \
		thiserror-impl-1.0.39 \
		thread-id-4.0.0 \
		tikv-jemalloc-sys-0.5.2+5.3.0-patched \
		tikv-jemallocator-0.5.0 \
		time-0.1.45 \
		time-0.3.17 \
		time-core-0.1.0 \
		time-macros-0.2.6 \
		tinytemplate-1.2.1 \
		tinyvec-1.6.0 \
		tinyvec_macros-0.1.0 \
		tokio-1.26.0 \
		tokio-io-timeout-1.2.0 \
		tokio-macros-1.8.2 \
		tokio-native-tls-0.3.0 \
		tokio-rustls-0.23.4 \
		tokio-stream-0.1.11 \
		tokio-util-0.7.4 \
		toml-0.5.10 \
		tonic-0.8.3 \
		tonic-build-0.8.4 \
		tower-0.4.13 \
		tower-http-0.3.5 \
		tower-layer-0.3.2 \
		tower-service-0.3.2 \
		tracing-0.1.37 \
		tracing-attributes-0.1.23 \
		tracing-core-0.1.30 \
		tracing-futures-0.2.5 \
		try-lock-0.2.3 \
		typenum-1.16.0 \
		ucd-trie-0.1.5 \
		unarray-0.1.4 \
		unicase-2.6.0 \
		unicode-bidi-0.3.8 \
		unicode-ident-1.0.6 \
		unicode-normalization-0.1.22 \
		unicode-width-0.1.10 \
		untrusted-0.7.1 \
		url-2.3.1 \
		uuid-1.3.0 \
		vcpkg-0.2.15 \
		version_check-0.9.4 \
		wait-timeout-0.2.0 \
		walkdir-2.3.3 \
		want-0.3.0 \
		wasi-0.9.0+wasi-snapshot-preview1 \
		wasi-0.10.0+wasi-snapshot-preview1 \
		wasi-0.11.0+wasi-snapshot-preview1 \
		wasm-bindgen-0.2.83 \
		wasm-bindgen-backend-0.2.83 \
		wasm-bindgen-futures-0.4.33 \
		wasm-bindgen-macro-0.2.83 \
		wasm-bindgen-macro-support-0.2.83 \
		wasm-bindgen-shared-0.2.83 \
		wasm-streams-0.2.3 \
		web-sys-0.3.60 \
		webpki-0.22.0 \
		webpki-roots-0.22.6 \
		which-4.3.0 \
		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.36.1 \
		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.36.1 \
		windows_aarch64_msvc-0.42.1 \
		windows_i686_gnu-0.36.1 \
		windows_i686_gnu-0.42.1 \
		windows_i686_msvc-0.36.1 \
		windows_i686_msvc-0.42.1 \
		windows_x86_64_gnu-0.36.1 \
		windows_x86_64_gnu-0.42.1 \
		windows_x86_64_gnullvm-0.42.1 \
		windows_x86_64_msvc-0.36.1 \
		windows_x86_64_msvc-0.42.1 \
		winreg-0.10.1 \
		wyz-0.5.1 \
		xattr-0.2.3 \
		yaml-rust-0.4.5 \
		zstd-0.12.2+zstd.1.5.2 \
		zstd-safe-6.0.2+zstd.1.5.2 \
		zstd-sys-2.0.4+zstd.1.5.2 \
		raft,raft-proto@git+https://github.com/tikv/raft-rs?rev=5ce52b480065ff31ecef16b9b77c7c3b7c57c8c7\#5ce52b480065ff31ecef16b9b77c7c3b7c57c8c7 \
		quantization@git+https://github.com/qdrant/quantization.git\#9c2d0a60062559dbe7f699a6dfac9978e799e3e5 \
		wal@git+https://github.com/qdrant/wal.git?rev=7536f9e222d55cc53f7f7507a3028b0e303976cc\#7536f9e222d55cc53f7f7507a3028b0e303976cc

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

PLIST_FILES=	bin/${PORTNAME} \
		bin/schema_generator

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

.include <bsd.port.mk>
