PORTNAME=	librepcb
DISTVERSION=	2.0.1
DISTVERSIONSUFFIX=	-source
PORTREVISION=	1
CATEGORIES=	cad
MASTER_SITES=	https://download.librepcb.org/releases/${DISTVERSION}/:main

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Schematic and PCB editing software
WWW=		https://librepcb.org/ \
		https://github.com/LibrePCB/LibrePCB/

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
		libfontconfig.so:x11-fonts/fontconfig \
		libfreeimage.so:graphics/freeimage \
		libfreetype.so:print/freetype2 \
		libtbb.so:devel/onetbb \
		libTKService.so:cad/opencascade

USES=		cargo cmake:noninja,testing compiler:c++17-lang desktop-file-utils gl \
		gmake localbase:ldflags qt:6 shared-mime-info xorg #zip
USE_QT=		base declarative svg tools:build
USE_GL=		gl glu
USE_XORG=	x11

WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSION}

MAKE_ENV+=	${WRK_ENV} ${CARGO_ENV}

DISTFILES=	librepcb-${DISTVERSIONFULL}.zip:main

CARGO_SRC_SUBDIR=	libs/librepcb/rust-core # Rust sub-project
#CARGO_SRC_SUBDIR=	libs/slint # Rust sub-project
CARGO_CRATES=	ab_glyph-0.2.29 \
		ab_glyph_rasterizer-0.1.8 \
		accesskit-0.22.0 \
		accesskit_atspi_common-0.15.0 \
		accesskit_consumer-0.32.0 \
		accesskit_macos-0.23.0 \
		accesskit_unix-0.18.0 \
		accesskit_windows-0.30.0 \
		accesskit_winit-0.30.0 \
		addr2line-0.24.2 \
		adler2-2.0.0 \
		ahash-0.8.11 \
		aho-corasick-1.1.3 \
		aligned-vec-0.5.0 \
		allocator-api2-0.2.21 \
		android-activity-0.5.2 \
		android-activity-0.6.0 \
		android-build-0.1.2 \
		android-properties-0.2.2 \
		android-tzdata-0.1.1 \
		android_system_properties-0.1.5 \
		annotate-snippets-0.12.10 \
		anstream-0.6.18 \
		anstyle-1.0.10 \
		anstyle-parse-0.2.6 \
		anstyle-query-1.1.2 \
		anstyle-wincon-3.0.6 \
		anstyle-wincon-3.0.7 \
		anyhow-1.0.94 \
		anyhow-1.0.98 \
		approx-0.5.1 \
		arbitrary-1.4.1 \
		arg_enum_proc_macro-0.3.4 \
		arrayref-0.3.9 \
		arrayvec-0.7.6 \
		as-raw-xcb-connection-1.0.1 \
		ash-0.38.0+1.3.281 \
		async-broadcast-0.7.2 \
		async-channel-2.3.1 \
		async-compat-0.2.4 \
		async-executor-1.13.1 \
		async-io-2.4.0 \
		async-lock-3.4.0 \
		async-net-2.0.0 \
		async-process-2.3.0 \
		async-recursion-1.1.1 \
		async-signal-0.2.10 \
		async-task-4.7.1 \
		async-trait-0.1.86 \
		atomic-waker-1.1.2 \
		atspi-0.29.0 \
		atspi-common-0.13.0 \
		atspi-proxies-0.13.0 \
		auto_enums-0.8.7 \
		autocfg-1.4.0 \
		av1-grain-0.2.3 \
		avif-serialize-0.8.3 \
		backtrace-0.3.74 \
		base64-0.22.1 \
		basic-toml-0.1.10 \
		bindgen-0.72.0 \
		bit-set-0.8.0 \
		bit-vec-0.8.0 \
		bit_field-0.10.2 \
		bitflags-1.3.2 \
		bitflags-2.6.0 \
		bitflags-2.9.0 \
		bitstream-io-2.6.0 \
		block-0.1.6 \
		block2-0.5.1 \
		block2-0.6.2 \
		blocking-1.6.1 \
		borsh-1.5.5 \
		built-0.7.7 \
		bumpalo-3.17.0 \
		by_address-1.2.1 \
		bytemuck-1.24.0 \
		bytemuck_derive-1.10.2 \
		byteorder-1.5.0 \
		byteorder-lite-0.1.0 \
		bytes-1.10.0 \
		calloop-0.13.0 \
		calloop-0.14.2 \
		calloop-wayland-source-0.3.0 \
		cbindgen-0.27.0 \
		cbindgen-0.29.0 \
		cc-1.1.31 \
		cesu8-1.1.0 \
		cexpr-0.6.0 \
		cfg-expr-0.15.8 \
		cfg-if-1.0.0 \
		cfg_aliases-0.2.1 \
		cgl-0.3.2 \
		chrono-0.4.40 \
		clang-sys-1.8.1 \
		clap-4.5.22 \
		clap-4.5.31 \
		clap_builder-4.5.22 \
		clap_builder-4.5.31 \
		clap_derive-4.5.28 \
		clap_lex-0.7.3 \
		clap_lex-0.7.4 \
		clipboard-win-3.1.1 \
		clru-0.6.2 \
		codespan-reporting-0.12.0 \
		color_quant-1.1.0 \
		colorchoice-1.0.3 \
		combine-4.6.7 \
		concurrent-queue-2.5.0 \
		console_error_panic_hook-0.1.7 \
		const-field-offset-0.1.5 \
		const-field-offset-macro-0.1.5 \
		const_format-0.2.34 \
		const_format_proc_macros-0.2.34 \
		copypasta-0.10.1 \
		core-foundation-0.10.1 \
		core-foundation-0.9.4 \
		core-foundation-sys-0.8.7 \
		core-graphics-0.23.2 \
		core-graphics-0.24.0 \
		core-graphics-types-0.1.3 \
		core-graphics-types-0.2.0 \
		core_maths-0.1.1 \
		countme-3.0.1 \
		cpp-0.5.10 \
		cpp_build-0.5.10 \
		cpp_common-0.5.10 \
		cpp_macros-0.5.10 \
		crc32fast-1.4.2 \
		critical-section-1.2.0 \
		crossbeam-channel-0.5.14 \
		crossbeam-deque-0.8.6 \
		crossbeam-epoch-0.9.18 \
		crossbeam-queue-0.3.12 \
		crossbeam-utils-0.8.20 \
		crossbeam-utils-0.8.21 \
		crunchy-0.2.3 \
		css-color-parser2-1.0.1 \
		ctor-lite-0.1.0 \
		cursor-icon-1.1.0 \
		data-url-0.3.1 \
		deranged-0.3.11 \
		derive_more-2.0.1 \
		derive_more-impl-2.0.1 \
		derive_utils-0.15.0 \
		dispatch-0.2.0 \
		dispatch2-0.3.0 \
		displaydoc-0.2.5 \
		dissimilar-1.0.9 \
		dlib-0.5.2 \
		document-features-0.2.11 \
		downcast-rs-1.2.1 \
		dpi-0.1.1 \
		drm-0.12.0 \
		drm-0.14.1 \
		drm-ffi-0.8.0 \
		drm-ffi-0.9.0 \
		drm-fourcc-2.2.0 \
		drm-sys-0.7.0 \
		drm-sys-0.8.0 \
		either-1.14.0 \
		endi-1.1.0 \
		enumflags2-0.7.11 \
		enumflags2_derive-0.7.11 \
		env_home-0.1.0 \
		equivalent-1.0.1 \
		equivalent-1.0.2 \
		errno-0.3.10 \
		esp-backtrace-0.17.0 \
		esp-config-0.5.0 \
		esp-metadata-0.8.0 \
		esp-metadata-generated-0.1.0 \
		esp-println-0.15.0 \
		euclid-0.22.11 \
		evalexpr-12.0.2 \
		event-listener-5.4.0 \
		event-listener-strategy-0.5.3 \
		exr-1.73.0 \
		fastrand-2.2.0 \
		fastrand-2.3.0 \
		fdeflate-0.3.7 \
		fdsm-0.8.0 \
		fdsm-ttf-parser-0.2.0 \
		femtovg-0.19.3 \
		field-offset-0.3.6 \
		filetime-0.2.25 \
		flate2-1.0.35 \
		flate2-1.1.5 \
		float-cmp-0.9.0 \
		fnv-1.0.7 \
		foldhash-0.1.4 \
		foldhash-0.2.0 \
		font-types-0.10.0 \
		fontdb-0.23.0 \
		fontdue-0.9.3 \
		fontique-0.7.0 \
		foreign-types-0.5.0 \
		foreign-types-macros-0.2.3 \
		foreign-types-shared-0.3.1 \
		form_urlencoded-1.2.1 \
		futures-0.3.31 \
		futures-channel-0.3.31 \
		futures-core-0.3.31 \
		futures-executor-0.3.31 \
		futures-io-0.3.31 \
		futures-lite-2.6.0 \
		futures-macro-0.3.31 \
		futures-sink-0.3.31 \
		futures-task-0.3.31 \
		futures-util-0.3.31 \
		gbm-0.18.0 \
		gbm-sys-0.4.0 \
		generational-arena-0.2.9 \
		generativity-1.1.0 \
		gethostname-0.4.3 \
		getopts-0.2.24 \
		getrandom-0.2.15 \
		getrandom-0.3.1 \
		gettext-rs-0.7.2 \
		gettext-sys-0.22.5 \
		gif-0.13.1 \
		gimli-0.31.1 \
		gl_generator-0.14.0 \
		glam-0.14.0 \
		glam-0.15.2 \
		glam-0.16.0 \
		glam-0.17.3 \
		glam-0.18.0 \
		glam-0.19.0 \
		glam-0.20.5 \
		glam-0.21.3 \
		glam-0.22.0 \
		glam-0.23.0 \
		glam-0.24.2 \
		glam-0.25.0 \
		glam-0.27.0 \
		glam-0.28.0 \
		glam-0.29.3 \
		glam-0.30.8 \
		glob-0.3.2 \
		glow-0.16.0 \
		glutin-0.32.2 \
		glutin-winit-0.5.0 \
		glutin_egl_sys-0.7.1 \
		glutin_glx_sys-0.6.1 \
		glutin_wgl_sys-0.6.1 \
		gpu-alloc-0.6.0 \
		gpu-alloc-types-0.3.0 \
		gpu-allocator-0.27.0 \
		gpu-descriptor-0.3.2 \
		gpu-descriptor-types-0.2.0 \
		half-2.6.0 \
		harfrust-0.3.2 \
		hash32-0.3.1 \
		hashbrown-0.14.5 \
		hashbrown-0.15.2 \
		hashbrown-0.15.5 \
		hashbrown-0.16.1 \
		heapless-0.8.0 \
		heck-0.4.1 \
		heck-0.5.0 \
		hermit-abi-0.3.9 \
		hermit-abi-0.4.0 \
		hex-0.4.3 \
		hexf-parse-0.2.1 \
		htmlparser-0.2.1 \
		iana-time-zone-0.1.61 \
		iana-time-zone-haiku-0.1.2 \
		icu_collections-1.5.0 \
		icu_locale_core-2.1.1 \
		icu_locid-1.5.0 \
		icu_locid_transform-1.5.0 \
		icu_locid_transform_data-1.5.0 \
		icu_normalizer-1.5.0 \
		icu_normalizer_data-1.5.0 \
		icu_properties-1.5.1 \
		icu_properties_data-1.5.0 \
		icu_provider-1.5.0 \
		icu_provider_macros-1.5.0 \
		idna-1.0.3 \
		idna_adapter-1.2.0 \
		image-0.25.6 \
		image-webp-0.2.1 \
		imagesize-0.13.0 \
		imgref-1.11.0 \
		indexmap-2.12.0 \
		indexmap-2.7.0 \
		inotify-0.11.0 \
		inotify-sys-0.1.5 \
		input-0.9.1 \
		input-sys-1.18.0 \
		integer-sqrt-0.1.5 \
		interactive-html-bom-0.2.0 \
		interpolate_name-0.2.4 \
		io-lifetimes-1.0.11 \
		is_terminal_polyfill-1.70.1 \
		itertools-0.12.1 \
		itertools-0.13.0 \
		itertools-0.14.0 \
		itoa-1.0.14 \
		java-locator-0.1.9 \
		jni-0.21.1 \
		jni-sys-0.3.0 \
		jobserver-0.1.32 \
		jpeg-decoder-0.3.1 \
		js-sys-0.3.77 \
		jzon-0.12.5 \
		keyboard-types-0.7.0 \
		khronos-egl-6.0.0 \
		khronos_api-3.1.0 \
		kqueue-1.1.1 \
		kqueue-sys-1.0.4 \
		kurbo-0.11.1 \
		kurbo-0.12.0 \
		lazy-bytes-cast-5.0.1 \
		lazy_static-1.5.0 \
		lebe-0.5.2 \
		libc-0.2.167 \
		libc-0.2.172 \
		libfuzzer-sys-0.4.9 \
		libloading-0.7.4 \
		libloading-0.8.6 \
		libm-0.2.11 \
		libredox-0.1.3 \
		libseat-0.2.3 \
		libseat-sys-0.1.9 \
		libudev-sys-0.1.4 \
		linebender_resource_handle-0.1.1 \
		linereader-0.4.0 \
		linked-hash-map-0.5.6 \
		linked_hash_set-0.1.5 \
		linux-raw-sys-0.4.14 \
		linux-raw-sys-0.4.15 \
		linux-raw-sys-0.6.5 \
		linux-raw-sys-0.9.4 \
		litemap-0.7.5 \
		litemap-0.8.0 \
		litrs-0.4.1 \
		locale_config-0.3.0 \
		lock_api-0.4.12 \
		log-0.4.22 \
		log-0.4.27 \
		loop9-0.1.5 \
		lsp-server-0.7.8 \
		lsp-types-0.95.1 \
		lyon_algorithms-1.0.5 \
		lyon_extra-1.0.3 \
		lyon_geom-1.0.6 \
		lyon_path-1.0.7 \
		lz-str-0.2.1 \
		malloc_buf-0.0.6 \
		matrixmultiply-0.3.9 \
		maybe-rayon-0.1.1 \
		memchr-2.7.4 \
		memmap2-0.9.9 \
		memoffset-0.9.1 \
		metal-0.31.0 \
		metal-0.32.0 \
		minimal-lexical-0.2.1 \
		miniz_oxide-0.8.0 \
		miniz_oxide-0.8.5 \
		mio-1.0.3 \
		muda-0.17.0 \
		naga-26.0.0 \
		naga-27.0.0 \
		nalgebra-0.34.1 \
		nalgebra-macros-0.3.0 \
		ndk-0.8.0 \
		ndk-0.9.0 \
		ndk-context-0.1.1 \
		ndk-sys-0.5.0+25.2.9519653 \
		ndk-sys-0.6.0+11769913 \
		new_debug_unreachable-1.0.6 \
		nix-0.30.1 \
		nom-7.1.3 \
		noop_proc_macro-0.3.0 \
		notify-8.1.0 \
		notify-types-2.0.0 \
		nucleo-matcher-0.3.1 \
		num-bigint-0.4.6 \
		num-complex-0.4.6 \
		num-conv-0.1.0 \
		num-derive-0.4.2 \
		num-integer-0.1.46 \
		num-rational-0.4.2 \
		num-traits-0.2.19 \
		num_enum-0.7.3 \
		num_enum_derive-0.7.3 \
		objc-0.2.7 \
		objc-foundation-0.1.1 \
		objc-sys-0.3.5 \
		objc2-0.5.2 \
		objc2-0.6.3 \
		objc2-app-kit-0.2.2 \
		objc2-app-kit-0.3.2 \
		objc2-cloud-kit-0.2.2 \
		objc2-cloud-kit-0.3.2 \
		objc2-contacts-0.2.2 \
		objc2-core-data-0.2.2 \
		objc2-core-data-0.3.2 \
		objc2-core-foundation-0.3.2 \
		objc2-core-graphics-0.3.2 \
		objc2-core-image-0.2.2 \
		objc2-core-image-0.3.2 \
		objc2-core-location-0.2.2 \
		objc2-core-text-0.3.2 \
		objc2-core-video-0.3.2 \
		objc2-encode-4.1.0 \
		objc2-foundation-0.2.2 \
		objc2-foundation-0.3.2 \
		objc2-io-surface-0.3.2 \
		objc2-link-presentation-0.2.2 \
		objc2-metal-0.2.2 \
		objc2-metal-0.3.2 \
		objc2-quartz-core-0.2.2 \
		objc2-quartz-core-0.3.2 \
		objc2-symbols-0.2.2 \
		objc2-ui-kit-0.2.2 \
		objc2-ui-kit-0.3.2 \
		objc2-uniform-type-identifiers-0.2.2 \
		objc2-user-notifications-0.2.2 \
		objc_id-0.1.1 \
		object-0.36.7 \
		once_cell-1.20.2 \
		once_cell-1.21.3 \
		orbclient-0.3.48 \
		ordered-float-4.6.0 \
		ordered-stream-0.2.0 \
		owned_ttf_parser-0.25.0 \
		parameterized_test-0.2.1 \
		parking-2.2.1 \
		parking_lot-0.12.3 \
		parking_lot_core-0.9.10 \
		parley-0.7.0 \
		paste-1.0.15 \
		pathdiff-0.2.3 \
		pb-rs-0.10.0 \
		percent-encoding-2.3.1 \
		pico-args-0.5.0 \
		pin-project-1.1.9 \
		pin-project-internal-1.1.9 \
		pin-project-lite-0.2.16 \
		pin-utils-0.1.0 \
		pin-weak-1.1.0 \
		piper-0.2.4 \
		pkg-config-0.3.32 \
		png-0.17.16 \
		polib-0.2.0 \
		polling-3.7.4 \
		portable-atomic-1.11.0 \
		portable-atomic-util-0.2.4 \
		powerfmt-0.2.0 \
		ppv-lite86-0.2.20 \
		presser-0.3.1 \
		prettyplease-0.2.29 \
		proc-macro-crate-3.2.0 \
		proc-macro2-1.0.92 \
		proc-macro2-1.0.95 \
		profiling-1.0.16 \
		profiling-procmacros-1.0.16 \
		pulldown-cmark-0.13.0 \
		pulldown-cmark-escape-0.11.0 \
		qoi-0.4.1 \
		qttypes-0.2.12 \
		quick-error-2.0.1 \
		quick-protobuf-0.8.1 \
		quick-xml-0.36.2 \
		quick-xml-0.37.2 \
		quote-1.0.37 \
		quote-1.0.40 \
		rand-0.8.5 \
		rand_chacha-0.3.1 \
		rand_core-0.6.4 \
		range-alloc-0.1.4 \
		rav1e-0.7.1 \
		ravif-0.11.11 \
		raw-window-handle-0.6.2 \
		raw-window-metal-1.1.0 \
		rawpointer-0.2.1 \
		rayon-1.10.0 \
		rayon-core-1.12.1 \
		read-fonts-0.35.0 \
		redox_syscall-0.4.1 \
		redox_syscall-0.5.9 \
		regex-1.11.1 \
		regex-automata-0.4.9 \
		regex-syntax-0.8.5 \
		renderdoc-sys-1.1.0 \
		resvg-0.45.0 \
		rgb-0.8.50 \
		rowan-0.16.1 \
		roxmltree-0.20.0 \
		roxmltree-0.21.1 \
		rustc-demangle-0.1.24 \
		rustc-hash-1.1.0 \
		rustc-hash-2.1.1 \
		rustc_version-0.4.1 \
		rustix-0.38.41 \
		rustix-0.38.44 \
		rustix-1.0.7 \
		rustversion-1.0.19 \
		rustybuzz-0.20.1 \
		ryu-1.0.18 \
		ryu-1.0.19 \
		safe_arch-0.7.4 \
		same-file-1.0.6 \
		scoped-tls-1.0.1 \
		scoped-tls-hkt-0.1.5 \
		scopeguard-1.2.0 \
		sctk-adwaita-0.10.1 \
		semver-1.0.25 \
		send_wrapper-0.6.0 \
		serde-1.0.215 \
		serde-1.0.228 \
		serde-wasm-bindgen-0.6.5 \
		serde_core-1.0.228 \
		serde_derive-1.0.215 \
		serde_derive-1.0.228 \
		serde_json-1.0.133 \
		serde_json-1.0.140 \
		serde_repr-0.1.19 \
		serde_spanned-0.6.8 \
		serde_spanned-0.6.9 \
		serde_spanned-1.0.3 \
		serde_yaml-0.9.34+deprecated \
		shlex-1.3.0 \
		signal-hook-registry-1.4.2 \
		simba-0.9.0 \
		simd-adler32-0.3.7 \
		simd_helpers-0.1.0 \
		simplecss-0.2.2 \
		siphasher-1.0.1 \
		skia-bindings-0.90.0 \
		skia-safe-0.90.0 \
		skrifa-0.37.0 \
		slab-0.4.9 \
		slabbin-1.2.0 \
		slotmap-1.0.7 \
		smallvec-1.15.1 \
		smithay-client-toolkit-0.19.2 \
		smithay-clipboard-0.7.2 \
		smol_str-0.2.2 \
		smol_str-0.3.2 \
		socket2-0.5.8 \
		softbuffer-0.4.6 \
		spin_on-0.1.1 \
		spirv-0.3.0+sdk-1.3.268.0 \
		stable_deref_trait-1.2.0 \
		static_assertions-1.1.0 \
		strict-num-0.1.1 \
		strsim-0.11.1 \
		strum-0.27.1 \
		strum_macros-0.27.1 \
		svgtypes-0.15.3 \
		swash-0.2.6 \
		syn-2.0.101 \
		syn-2.0.90 \
		synstructure-0.13.1 \
		sys-locale-0.3.2 \
		system-deps-6.2.2 \
		tar-0.4.44 \
		target-lexicon-0.12.16 \
		temp-dir-0.1.14 \
		tempfile-3.14.0 \
		tempfile-3.17.1 \
		termcolor-1.4.1 \
		terminal_size-0.4.1 \
		text-size-1.1.1 \
		thiserror-1.0.69 \
		thiserror-2.0.17 \
		thiserror-impl-1.0.69 \
		thiserror-impl-2.0.17 \
		thread_local-1.1.8 \
		tiff-0.9.1 \
		tikv-jemalloc-sys-0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7 \
		tikv-jemallocator-0.6.0 \
		time-0.3.37 \
		time-core-0.1.2 \
		tiny-skia-0.11.4 \
		tiny-skia-path-0.11.4 \
		tiny-xlib-0.2.4 \
		tinystr-0.7.6 \
		tinystr-0.8.1 \
		tinyvec-1.8.1 \
		tinyvec_macros-0.1.1 \
		tokio-1.43.0 \
		tokio-macros-2.5.0 \
		toml-0.8.19 \
		toml-0.8.23 \
		toml-0.9.8 \
		toml_datetime-0.6.11 \
		toml_datetime-0.6.8 \
		toml_datetime-0.7.5+spec-1.1.0 \
		toml_edit-0.22.22 \
		toml_edit-0.22.27 \
		toml_edit-0.24.0+spec-1.1.0 \
		toml_parser-1.0.6+spec-1.1.0 \
		toml_write-0.1.2 \
		toml_writer-1.0.6+spec-1.1.0 \
		tr-0.1.11 \
		tracing-0.1.41 \
		tracing-attributes-0.1.28 \
		tracing-core-0.1.33 \
		ttf-parser-0.21.1 \
		ttf-parser-0.25.1 \
		typed-index-collections-3.2.3 \
		typenum-1.18.0 \
		udev-0.9.3 \
		uds_windows-1.1.0 \
		unicase-2.8.1 \
		unicode-bidi-0.3.18 \
		unicode-bidi-mirroring-0.4.0 \
		unicode-ccc-0.4.0 \
		unicode-ident-1.0.14 \
		unicode-ident-1.0.17 \
		unicode-linebreak-0.1.5 \
		unicode-properties-0.1.3 \
		unicode-script-0.5.7 \
		unicode-segmentation-1.12.0 \
		unicode-vo-0.1.0 \
		unicode-width-0.2.2 \
		unicode-xid-0.2.6 \
		unsafe-libyaml-0.2.11 \
		url-2.5.4 \
		usvg-0.45.0 \
		utf16_iter-1.0.5 \
		utf8_iter-1.0.4 \
		utf8parse-0.2.2 \
		v_frame-0.3.8 \
		version-compare-0.2.0 \
		version_check-0.9.5 \
		vk-parse-0.15.0 \
		vtable-0.3.0 \
		vtable-macro-0.3.0 \
		vulkano-0.35.1 \
		walkdir-2.5.0 \
		wasi-0.11.0+wasi-snapshot-preview1 \
		wasi-0.13.3+wasi-0.2.2 \
		wasm-bindgen-0.2.100 \
		wasm-bindgen-backend-0.2.100 \
		wasm-bindgen-futures-0.4.50 \
		wasm-bindgen-macro-0.2.100 \
		wasm-bindgen-macro-support-0.2.100 \
		wasm-bindgen-shared-0.2.100 \
		wayland-backend-0.3.8 \
		wayland-client-0.31.8 \
		wayland-csd-frame-0.3.0 \
		wayland-cursor-0.31.8 \
		wayland-protocols-0.32.6 \
		wayland-protocols-plasma-0.3.6 \
		wayland-protocols-wlr-0.3.6 \
		wayland-scanner-0.31.6 \
		wayland-sys-0.31.6 \
		web-sys-0.3.77 \
		web-time-1.1.0 \
		weezl-0.1.8 \
		wgpu-26.0.1 \
		wgpu-27.0.1 \
		wgpu-core-26.0.1 \
		wgpu-core-27.0.1 \
		wgpu-core-deps-apple-26.0.0 \
		wgpu-core-deps-apple-27.0.0 \
		wgpu-core-deps-emscripten-27.0.0 \
		wgpu-core-deps-windows-linux-android-26.0.0 \
		wgpu-core-deps-windows-linux-android-27.0.0 \
		wgpu-hal-26.0.4 \
		wgpu-hal-27.0.2 \
		wgpu-types-26.0.0 \
		wgpu-types-27.0.1 \
		which-8.0.0 \
		wide-0.7.32 \
		winapi-0.3.9 \
		winapi-i686-pc-windows-gnu-0.4.0 \
		winapi-util-0.1.9 \
		winapi-x86_64-pc-windows-gnu-0.4.0 \
		windows-0.58.0 \
		windows-0.61.1 \
		windows-0.62.2 \
		windows-collections-0.2.0 \
		windows-collections-0.3.2 \
		windows-core-0.52.0 \
		windows-core-0.58.0 \
		windows-core-0.61.0 \
		windows-core-0.62.2 \
		windows-future-0.2.0 \
		windows-future-0.3.2 \
		windows-implement-0.58.0 \
		windows-implement-0.60.2 \
		windows-interface-0.58.0 \
		windows-interface-0.59.3 \
		windows-link-0.1.1 \
		windows-link-0.2.1 \
		windows-numerics-0.2.0 \
		windows-numerics-0.3.1 \
		windows-result-0.2.0 \
		windows-result-0.3.2 \
		windows-result-0.4.1 \
		windows-strings-0.1.0 \
		windows-strings-0.4.0 \
		windows-strings-0.5.1 \
		windows-sys-0.45.0 \
		windows-sys-0.48.0 \
		windows-sys-0.52.0 \
		windows-sys-0.59.0 \
		windows-sys-0.60.2 \
		windows-targets-0.42.2 \
		windows-targets-0.48.5 \
		windows-targets-0.52.6 \
		windows-targets-0.53.2 \
		windows-threading-0.2.1 \
		windows_aarch64_gnullvm-0.42.2 \
		windows_aarch64_gnullvm-0.48.5 \
		windows_aarch64_gnullvm-0.52.6 \
		windows_aarch64_gnullvm-0.53.0 \
		windows_aarch64_msvc-0.42.2 \
		windows_aarch64_msvc-0.48.5 \
		windows_aarch64_msvc-0.52.6 \
		windows_aarch64_msvc-0.53.0 \
		windows_i686_gnu-0.42.2 \
		windows_i686_gnu-0.48.5 \
		windows_i686_gnu-0.52.6 \
		windows_i686_gnu-0.53.0 \
		windows_i686_gnullvm-0.52.6 \
		windows_i686_gnullvm-0.53.0 \
		windows_i686_msvc-0.42.2 \
		windows_i686_msvc-0.48.5 \
		windows_i686_msvc-0.52.6 \
		windows_i686_msvc-0.53.0 \
		windows_x86_64_gnu-0.42.2 \
		windows_x86_64_gnu-0.48.5 \
		windows_x86_64_gnu-0.52.6 \
		windows_x86_64_gnu-0.53.0 \
		windows_x86_64_gnullvm-0.42.2 \
		windows_x86_64_gnullvm-0.48.5 \
		windows_x86_64_gnullvm-0.52.6 \
		windows_x86_64_gnullvm-0.53.0 \
		windows_x86_64_msvc-0.42.2 \
		windows_x86_64_msvc-0.48.5 \
		windows_x86_64_msvc-0.52.6 \
		windows_x86_64_msvc-0.53.0 \
		winit-0.30.9 \
		winnow-0.6.20 \
		winnow-0.7.13 \
		winsafe-0.0.19 \
		wit-bindgen-rt-0.33.0 \
		write-fonts-0.43.0 \
		write16-1.0.0 \
		writeable-0.5.5 \
		writeable-0.6.2 \
		x11-clipboard-0.9.3 \
		x11-dl-2.21.0 \
		x11rb-0.13.1 \
		x11rb-protocol-0.13.1 \
		xattr-1.4.0 \
		xcursor-0.3.8 \
		xkbcommon-0.9.0 \
		xkbcommon-dl-0.4.2 \
		xkeysym-0.2.1 \
		xml-rs-0.8.25 \
		xmlwriter-0.1.0 \
		xshell-0.2.7 \
		xshell-macros-0.2.7 \
		yazi-0.2.1 \
		yeslogic-fontconfig-sys-6.0.0 \
		yoke-0.7.5 \
		yoke-derive-0.7.5 \
		zbus-5.7.1 \
		zbus-lockstep-0.5.2 \
		zbus-lockstep-macros-0.5.2 \
		zbus_macros-5.7.1 \
		zbus_names-4.2.0 \
		zbus_xml-5.0.2 \
		zeno-0.3.3 \
		zerocopy-0.7.35 \
		zerocopy-derive-0.7.35 \
		zerofrom-0.1.6 \
		zerofrom-derive-0.1.6 \
		zerovec-0.10.4 \
		zerovec-0.11.4 \
		zerovec-derive-0.10.3 \
		zip-0.6.6 \
		zune-core-0.4.12 \
		zune-inflate-0.2.54 \
		zune-jpeg-0.4.14 \
		zvariant-5.5.3 \
		zvariant_derive-5.5.3 \
		zvariant_utils-3.2.0

CMAKE_ARGS=		-DFREEBSD_CARGO_ENV=${CARGO_ENV}
CMAKE_ARGS+=		-DCMAKE_PREFIX_PATH=${LOCALBASE}/lib # workaround for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274834
CMAKE_OFF=		BUILD_TESTS
CMAKE_TESTING_ON=	BUILD_TESTS
CMAKE_TESTING_TARGET=

post-configure:
	@${ECHO_MSG} "===>   Creating cargo config for all Rust subprojects"
	@${MKDIR} ${WRKSRC}/.cargo
	@${ECHO_CMD} "[source.cargo]" > ${WRKSRC}/.cargo/config.toml
	@${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKSRC}/.cargo/config.toml
	@${ECHO_CMD} "[source.crates-io]" >> ${WRKSRC}/.cargo/config.toml
	@${ECHO_CMD} "replace-with = 'cargo'" >> ${WRKSRC}/.cargo/config.toml

post-test: # run tests
	@${BUILD_WRKSRC}/tests/unittests/librepcb-unittests

.include <bsd.port.mk>
