# $FreeBSD$

PORTNAME=	veloren
DISTVERSIONPREFIX=	v
DISTVERSION=	0.8.0
CATEGORIES=	games
MASTER_SITES=	https://veloren.net/icons/favicon/:icon
DISTFILES=	android-icon-192x192.png:icon
EXTRACT_ONLY=	${DISTFILES:N*\:icon:C/:.*//}

MAINTAINER=	jbeich@FreeBSD.org
COMMENT=	Multiplayer voxel RPG written in Rust

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	libasound.so:audio/alsa-lib
RUN_DEPENDS=	${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins

USES=		cargo python:3.4+,build xorg
USE_XORG=	xcb
USE_GITHUB=	nodefault
GH_TUPLE=	zesterer:euc:c9a7c17a03d45fce00caeeca09afa1e1558cd183:euc \
		hecrj:iced:f46431600cb61d4e83e0ded1ca79525478436be3:iced_core \
		xMAC94x:portpicker-rs:9d6df36c53c94684080a64a7212dd6bfc3617ee4:portpicker \
		Imberflur:scan_fmt:5f9e8eed73e93e8d19fa864d76e75bb4984cffe7:scan_fmt \
		amethyst:specs:7a2e348ab2223818bad487695c66c43db88050a5:specs \
		fdehau:tui-rs:54b841fab6cfdb38e8dc1382176e965787964b4c:tui
USE_GITLAB=	yes
GL_COMMIT=	bce6e1c6e953c4531519ee4c4138ea0a7e34bb78
GL_TUPLE=	veloren:auth:b943c85e4a38f5ec60cd18c34c73097640162bfe:authcommon \
		veloren:conrod:1ae5193588fb662a7189d81edd9f2d653c7f1da0:conrod_core \
		veloren:specs-idvs:fcb0b2306b571f62f9f85d89e79e087454d95efd:specsidvs \
		veloren:vek:237a78528b505f34f6dde5dc77db3b642388fe4a:vek \
		veloren:winit:7c8c5f21384c898f50d37298d229093549b08803:winit
CARGO_ENV=	VELOREN_USERDATA_STRATEGY=system
PLIST_FILES=	bin/${PORTNAME}-chat-cli \
		bin/${PORTNAME}-server-cli \
		bin/${PORTNAME}-voxygen \
		share/icons/hicolor/192x192/apps/${PORTNAME}.png
PORTDATA=	*

.if exists(/usr/bin/ld.lld) && ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
# veloren_voxygen*rcgu* has 71718 section headers, breaking old GNU ld.bfd in base
LDFLAGS+=	-fuse-ld=lld
.endif

DESKTOP_ENTRIES="Veloren (client)" \
		"" \
		"${PORTNAME}" \
		"${PORTNAME}-voxygen" \
		"Game;RolePlaying;" \
		""

CARGO_CRATES=	ab_glyph-0.2.6 \
		ab_glyph_rasterizer-0.1.3 \
		addr2line-0.13.0 \
		adler-0.2.3 \
		adler32-1.2.0 \
		ahash-0.3.8 \
		aho-corasick-0.7.13 \
		alsa-0.4.2 \
		alsa-sys-0.3.0 \
		andrew-0.3.0 \
		android_glue-0.2.3 \
		ansi-parser-0.6.5 \
		ansi_term-0.11.0 \
		ansi_term-0.12.1 \
		anymap-0.12.1 \
		approx-0.3.2 \
		approx-0.4.0 \
		arc-swap-0.4.7 \
		arr_macro-0.1.3 \
		arr_macro_impl-0.1.3 \
		arraygen-0.1.14 \
		arrayref-0.3.6 \
		arrayvec-0.4.12 \
		arrayvec-0.5.1 \
		ascii-0.9.3 \
		ascii-1.0.0 \
		async-std-1.5.0 \
		async-task-1.3.1 \
		atom-0.3.5 \
		atty-0.2.14 \
		autocfg-0.1.7 \
		autocfg-1.0.1 \
		backtrace-0.3.50 \
		base-x-0.2.6 \
		base64-0.10.1 \
		base64-0.11.0 \
		base64-0.12.3 \
		bincode-1.3.1 \
		bindgen-0.53.3 \
		bitflags-1.2.1 \
		bitvec-0.17.4 \
		blake2b_simd-0.5.10 \
		block-0.1.6 \
		broadcaster-1.0.0 \
		bstr-0.2.13 \
		bumpalo-3.4.0 \
		bytemuck-1.4.1 \
		byteorder-1.3.4 \
		bytes-0.4.12 \
		bytes-0.5.6 \
		calloop-0.6.4 \
		cassowary-0.3.0 \
		cast-0.2.3 \
		cc-1.0.60 \
		cesu8-1.1.0 \
		cexpr-0.4.0 \
		cfg-if-0.1.10 \
		cfg-if-1.0.0 \
		cgl-0.3.2 \
		chrono-0.4.18 \
		chunked_transfer-1.2.0 \
		clang-sys-0.29.3 \
		clap-2.33.3 \
		clipboard-win-3.1.1 \
		clipboard-win-4.0.3 \
		clipboard_macos-0.1.0 \
		clipboard_wayland-0.1.1 \
		clipboard_x11-0.1.0 \
		cloudabi-0.0.3 \
		cloudabi-0.1.0 \
		cocoa-0.23.0 \
		cocoa-foundation-0.1.0 \
		combine-3.8.1 \
		combine-4.3.2 \
		const-random-0.1.8 \
		const-random-macro-0.1.8 \
		const-tweaker-0.3.1 \
		const-tweaker-attribute-0.5.0 \
		const_fn-0.4.3 \
		constant_time_eq-0.1.5 \
		cookie-0.12.0 \
		copy_dir-0.1.2 \
		copypasta-0.7.1 \
		core-foundation-0.6.4 \
		core-foundation-0.7.0 \
		core-foundation-0.9.1 \
		core-foundation-sys-0.6.2 \
		core-foundation-sys-0.7.0 \
		core-foundation-sys-0.8.1 \
		core-graphics-0.19.2 \
		core-graphics-0.22.1 \
		core-graphics-types-0.1.1 \
		core-video-sys-0.1.4 \
		coreaudio-rs-0.9.1 \
		coreaudio-sys-0.2.5 \
		cpal-0.13.0 \
		crc32fast-1.2.0 \
		criterion-0.3.3 \
		criterion-plot-0.4.3 \
		crossbeam-0.7.2 \
		crossbeam-channel-0.3.9 \
		crossbeam-channel-0.4.4 \
		crossbeam-channel-0.5.0 \
		crossbeam-deque-0.7.3 \
		crossbeam-deque-0.8.0 \
		crossbeam-epoch-0.7.2 \
		crossbeam-epoch-0.8.2 \
		crossbeam-epoch-0.9.0 \
		crossbeam-queue-0.1.2 \
		crossbeam-queue-0.2.3 \
		crossbeam-utils-0.6.6 \
		crossbeam-utils-0.7.2 \
		crossbeam-utils-0.8.0 \
		crossterm-0.17.7 \
		crossterm_winapi-0.6.1 \
		csv-1.1.3 \
		csv-core-0.1.10 \
		ctor-0.1.16 \
		daggy-0.5.0 \
		darling-0.10.2 \
		darling_core-0.10.2 \
		darling_macro-0.10.2 \
		dashmap-3.11.10 \
		data-encoding-2.3.0 \
		deflate-0.8.6 \
		derivative-2.1.1 \
		deunicode-1.1.1 \
		diesel-1.4.5 \
		diesel_derives-1.4.1 \
		diesel_migrations-1.4.0 \
		directories-next-2.0.0 \
		dirs-2.0.2 \
		dirs-sys-0.3.5 \
		dirs-sys-next-0.1.0 \
		discard-1.0.4 \
		dispatch-0.1.4 \
		dispatch-0.2.0 \
		dlib-0.4.2 \
		dot_vox-4.1.0 \
		dotenv-0.15.0 \
		downcast-rs-1.2.0 \
		draw_state-0.8.0 \
		either-1.6.1 \
		enum-iterator-0.6.0 \
		enum-iterator-derive-0.6.0 \
		error-chain-0.12.4 \
		error-code-2.0.2 \
		euclid-0.20.14 \
		failure-0.1.8 \
		failure_derive-0.1.8 \
		fehler-1.0.0 \
		fehler-macros-1.0.0 \
		fetch_unroll-0.2.1 \
		filetime-0.2.12 \
		find_folder-0.3.0 \
		fixedbitset-0.1.9 \
		fnv-1.0.7 \
		foreign-types-0.3.2 \
		foreign-types-shared-0.1.1 \
		fsevent-2.0.2 \
		fsevent-sys-3.0.2 \
		fuchsia-cprng-0.1.1 \
		fuchsia-zircon-0.3.3 \
		fuchsia-zircon-sys-0.3.3 \
		futures-0.1.29 \
		futures-0.3.5 \
		futures-channel-0.3.6 \
		futures-core-0.3.6 \
		futures-cpupool-0.1.8 \
		futures-executor-0.3.5 \
		futures-io-0.3.5 \
		futures-macro-0.3.5 \
		futures-sink-0.3.6 \
		futures-task-0.3.5 \
		futures-timer-2.0.2 \
		futures-timer-3.0.2 \
		futures-util-0.3.5 \
		fxhash-0.2.1 \
		getrandom-0.1.15 \
		gfx-0.18.2 \
		gfx_core-0.9.2 \
		gfx_device_gl-0.16.2 \
		gfx_gl-0.6.1 \
		gilrs-0.7.4 \
		gilrs-core-0.2.6 \
		gimli-0.22.0 \
		git2-0.13.11 \
		gl_generator-0.14.0 \
		glam-0.9.5 \
		glob-0.3.0 \
		glsl-include-0.3.1 \
		glutin-0.25.1 \
		glutin_egl_sys-0.1.5 \
		glutin_emscripten_sys-0.1.1 \
		glutin_gles2_sys-0.1.5 \
		glutin_glx_sys-0.1.7 \
		glutin_wgl_sys-0.1.5 \
		glyph_brush-0.7.0 \
		glyph_brush_draw_cache-0.1.3 \
		glyph_brush_layout-0.2.1 \
		guillotiere-0.5.2 \
		h2-0.1.26 \
		half-1.6.0 \
		hashbrown-0.7.2 \
		hashbrown-0.9.1 \
		heck-0.3.1 \
		hermit-abi-0.1.16 \
		hex-0.3.2 \
		hibitset-0.6.3 \
		horrorshow-0.8.3 \
		hound-3.4.0 \
		http-0.1.21 \
		http-body-0.1.0 \
		http-service-0.4.0 \
		http-service-hyper-0.4.1 \
		httparse-1.3.4 \
		hyper-0.12.35 \
		ident_case-1.0.1 \
		idna-0.1.5 \
		idna-0.2.0 \
		image-0.23.10 \
		indexmap-1.6.0 \
		inline_tweak-1.0.8 \
		inotify-0.8.3 \
		inotify-sys-0.1.3 \
		instant-0.1.7 \
		io-kit-sys-0.1.0 \
		iovec-0.1.4 \
		itertools-0.9.0 \
		itoa-0.4.6 \
		jni-0.14.0 \
		jni-0.17.0 \
		jni-sys-0.3.0 \
		jobserver-0.1.21 \
		js-sys-0.3.45 \
		kernel32-sys-0.2.2 \
		khronos_api-3.1.0 \
		kv-log-macro-1.0.7 \
		lazy-bytes-cast-5.0.1 \
		lazy_static-1.4.0 \
		lazycell-1.3.0 \
		lewton-0.10.1 \
		libc-0.2.77 \
		libflate-0.1.27 \
		libgit2-sys-0.12.13+1.0.1 \
		libloading-0.5.2 \
		libloading-0.6.3 \
		libm-0.1.4 \
		libsqlite3-sys-0.18.0 \
		libssh2-sys-0.2.19 \
		libudev-sys-0.1.4 \
		libz-sys-1.1.2 \
		line_drawing-0.8.0 \
		linked-hash-map-0.5.3 \
		lock_api-0.3.4 \
		lock_api-0.4.1 \
		log-0.4.11 \
		lz-fear-0.1.1 \
		mach-0.2.3 \
		mach-0.3.2 \
		malloc_buf-0.0.6 \
		matchers-0.0.1 \
		matches-0.1.8 \
		maybe-uninit-2.0.0 \
		memchr-2.3.3 \
		memmap-0.7.0 \
		memoffset-0.5.6 \
		migrations_internals-1.4.1 \
		migrations_macros-1.4.2 \
		mime-0.3.16 \
		minifb-0.14.0 \
		miniz_oxide-0.3.7 \
		miniz_oxide-0.4.2 \
		mio-0.6.22 \
		mio-0.7.0 \
		mio-extras-2.0.6 \
		mio-uds-0.6.8 \
		miow-0.2.1 \
		miow-0.3.5 \
		mopa-0.2.2 \
		native-dialog-0.4.3 \
		ndk-0.2.0 \
		ndk-glue-0.2.0 \
		ndk-macro-0.2.0 \
		ndk-sys-0.2.0 \
		net2-0.2.35 \
		nix-0.15.0 \
		nix-0.17.0 \
		nix-0.18.0 \
		nodrop-0.1.14 \
		noise-0.6.0 \
		nom-4.2.3 \
		nom-5.1.2 \
		notify-5.0.0-pre.3 \
		ntapi-0.3.4 \
		num-0.1.42 \
		num-0.2.1 \
		num-bigint-0.2.6 \
		num-complex-0.2.4 \
		num-derive-0.3.2 \
		num-integer-0.1.43 \
		num-iter-0.1.41 \
		num-rational-0.2.4 \
		num-rational-0.3.0 \
		num-traits-0.1.43 \
		num-traits-0.2.12 \
		num_cpus-1.13.0 \
		num_enum-0.4.3 \
		num_enum_derive-0.4.3 \
		objc-0.2.7 \
		objc-foundation-0.1.1 \
		objc_id-0.1.1 \
		object-0.20.0 \
		oboe-0.3.0 \
		oboe-sys-0.3.0 \
		ogg-0.7.0 \
		old_school_gfx_glutin_ext-0.25.0 \
		once_cell-1.4.1 \
		oorandom-11.1.2 \
		openssl-probe-0.1.2 \
		openssl-sys-0.9.58 \
		orbclient-0.3.27 \
		ordered-float-1.1.0 \
		ordered-float-2.0.0 \
		osascript-0.3.0 \
		osmesa-sys-0.1.2 \
		owned_ttf_parser-0.6.0 \
		owned_ttf_parser-0.8.0 \
		packed_simd_2-0.3.4 \
		parking_lot-0.9.0 \
		parking_lot-0.10.2 \
		parking_lot-0.11.0 \
		parking_lot_core-0.6.2 \
		parking_lot_core-0.7.2 \
		parking_lot_core-0.8.0 \
		peeking_take_while-0.1.2 \
		percent-encoding-1.0.1 \
		percent-encoding-2.1.0 \
		petgraph-0.4.13 \
		pin-project-0.4.24 \
		pin-project-internal-0.4.24 \
		pin-project-lite-0.1.9 \
		pin-utils-0.1.0 \
		piston-float-0.3.0 \
		piston-viewport-0.5.0 \
		pistoncore-input-0.24.0 \
		pkg-config-0.3.18 \
		plotters-0.2.15 \
		png-0.16.7 \
		ppv-lite86-0.2.9 \
		proc-macro-crate-0.1.5 \
		proc-macro-error-1.0.4 \
		proc-macro-error-attr-1.0.4 \
		proc-macro-hack-0.5.18 \
		proc-macro-nested-0.1.6 \
		proc-macro2-0.4.30 \
		proc-macro2-1.0.23 \
		prometheus-0.10.0 \
		qstring-0.7.2 \
		quote-0.6.13 \
		quote-1.0.7 \
		radium-0.3.0 \
		rand-0.5.6 \
		rand-0.6.5 \
		rand-0.7.3 \
		rand_chacha-0.1.1 \
		rand_chacha-0.2.2 \
		rand_core-0.3.1 \
		rand_core-0.4.2 \
		rand_core-0.5.1 \
		rand_hc-0.1.0 \
		rand_hc-0.2.0 \
		rand_isaac-0.1.1 \
		rand_jitter-0.1.4 \
		rand_os-0.1.3 \
		rand_pcg-0.1.2 \
		rand_pcg-0.2.1 \
		rand_xorshift-0.1.1 \
		raw-window-handle-0.3.3 \
		rayon-1.4.0 \
		rayon-core-1.8.1 \
		rdrand-0.4.0 \
		redox_syscall-0.1.57 \
		redox_users-0.3.5 \
		regex-1.3.9 \
		regex-automata-0.1.9 \
		regex-syntax-0.6.18 \
		ring-0.16.15 \
		rle-decode-fast-1.0.1 \
		rodio-0.13.0 \
		ron-0.6.2 \
		roots-0.0.6 \
		route-recognizer-0.1.13 \
		rust-argon2-0.8.2 \
		rustc-demangle-0.1.16 \
		rustc-hash-1.1.0 \
		rustc_version-0.2.3 \
		rustls-0.16.0 \
		rustls-0.18.1 \
		rusttype-0.7.9 \
		rusttype-0.8.3 \
		rusttype-0.9.2 \
		rusty-xinput-1.2.0 \
		ryu-1.0.5 \
		same-file-1.0.6 \
		scoped-tls-1.0.0 \
		scopeguard-1.1.0 \
		sct-0.6.0 \
		sdl2-0.32.2 \
		sdl2-sys-0.32.6 \
		semver-0.9.0 \
		semver-parser-0.7.0 \
		serde-1.0.116 \
		serde_cbor-0.11.1 \
		serde_derive-1.0.116 \
		serde_json-1.0.57 \
		serde_qs-0.5.2 \
		serde_repr-0.1.6 \
		sha1-0.6.0 \
		sharded-slab-0.0.9 \
		shared_library-0.1.9 \
		shellexpand-2.0.0 \
		shlex-0.1.1 \
		shred-0.10.2 \
		shred-derive-0.6.2 \
		shrev-1.1.1 \
		signal-hook-0.1.16 \
		signal-hook-registry-1.2.1 \
		slab-0.4.2 \
		smallvec-0.6.13 \
		smallvec-1.4.2 \
		smithay-client-toolkit-0.11.0 \
		smithay-client-toolkit-0.12.0 \
		smithay-clipboard-0.5.2 \
		smithay-clipboard-0.6.1 \
		socket2-0.3.15 \
		spin-0.5.2 \
		spin_sleep-1.0.0 \
		static_assertions-1.1.0 \
		stb_truetype-0.3.1 \
		stdweb-0.1.3 \
		stdweb-0.4.20 \
		stdweb-derive-0.5.3 \
		stdweb-internal-macros-0.2.9 \
		stdweb-internal-runtime-0.1.5 \
		str-buf-1.0.5 \
		string-0.2.1 \
		strsim-0.8.0 \
		strsim-0.9.3 \
		structopt-0.3.18 \
		structopt-derive-0.4.11 \
		sum_type-0.2.0 \
		svg_fmt-0.4.1 \
		syn-0.15.44 \
		syn-1.0.42 \
		synstructure-0.12.4 \
		take_mut-0.2.2 \
		tar-0.4.30 \
		textwrap-0.11.0 \
		thiserror-1.0.20 \
		thiserror-impl-1.0.20 \
		thread_local-1.0.1 \
		tide-0.6.0 \
		time-0.1.44 \
		tiny_http-0.7.0 \
		tinytemplate-1.1.0 \
		tinyvec-0.3.4 \
		tokio-0.1.22 \
		tokio-buf-0.1.1 \
		tokio-current-thread-0.1.7 \
		tokio-executor-0.1.10 \
		tokio-io-0.1.13 \
		tokio-reactor-0.1.12 \
		tokio-sync-0.1.8 \
		tokio-tcp-0.1.4 \
		tokio-threadpool-0.1.18 \
		tokio-timer-0.2.13 \
		toml-0.5.6 \
		tracing-0.1.21 \
		tracing-appender-0.1.1 \
		tracing-attributes-0.1.11 \
		tracing-core-0.1.17 \
		tracing-futures-0.2.4 \
		tracing-log-0.1.1 \
		tracing-subscriber-0.2.12 \
		tracing-tracy-0.3.0 \
		tracy-client-0.9.0 \
		tracy-client-sys-0.10.0 \
		treeculler-0.1.0 \
		try-lock-0.2.3 \
		ttf-parser-0.6.2 \
		ttf-parser-0.8.2 \
		tuple_utils-0.3.0 \
		twox-hash-1.5.0 \
		tynm-0.1.4 \
		unicode-bidi-0.3.4 \
		unicode-normalization-0.1.13 \
		unicode-segmentation-1.6.0 \
		unicode-width-0.1.8 \
		unicode-xid-0.1.0 \
		unicode-xid-0.2.1 \
		unreachable-1.0.0 \
		untrusted-0.7.1 \
		ureq-0.11.4 \
		ureq-1.4.1 \
		url-1.7.2 \
		url-2.1.1 \
		uuid-0.8.1 \
		uvth-3.1.1 \
		uvth-4.0.1 \
		vcpkg-0.2.10 \
		vec_map-0.8.2 \
		vek-0.11.2 \
		version_check-0.1.5 \
		version_check-0.9.2 \
		void-1.0.2 \
		walkdir-0.1.8 \
		walkdir-2.3.1 \
		want-0.2.0 \
		wasi-0.9.0+wasi-snapshot-preview1 \
		wasi-0.10.0+wasi-snapshot-preview1 \
		wasm-bindgen-0.2.68 \
		wasm-bindgen-backend-0.2.68 \
		wasm-bindgen-futures-0.4.18 \
		wasm-bindgen-macro-0.2.68 \
		wasm-bindgen-macro-support-0.2.68 \
		wasm-bindgen-shared-0.2.68 \
		wayland-client-0.27.0 \
		wayland-client-0.28.1 \
		wayland-commons-0.27.0 \
		wayland-commons-0.28.1 \
		wayland-cursor-0.27.0 \
		wayland-cursor-0.28.1 \
		wayland-egl-0.28.1 \
		wayland-protocols-0.27.0 \
		wayland-protocols-0.28.1 \
		wayland-scanner-0.27.0 \
		wayland-scanner-0.28.1 \
		wayland-sys-0.27.0 \
		wayland-sys-0.28.1 \
		web-sys-0.3.45 \
		webpki-0.21.3 \
		webpki-roots-0.18.0 \
		webpki-roots-0.20.0 \
		wfd-0.1.4 \
		which-4.0.2 \
		winapi-0.2.8 \
		winapi-0.3.9 \
		winapi-build-0.1.1 \
		winapi-i686-pc-windows-gnu-0.4.0 \
		winapi-util-0.1.5 \
		winapi-x86_64-pc-windows-gnu-0.4.0 \
		window_clipboard-0.1.2 \
		winres-0.1.11 \
		ws2_32-sys-0.2.1 \
		x11-clipboard-0.5.1 \
		x11-dl-2.18.5 \
		xattr-0.2.2 \
		xcb-0.9.0 \
		xcursor-0.3.2 \
		xdg-2.2.0 \
		xi-unicode-0.3.0 \
		xml-rs-0.8.3
CARGO_USE_GITHUB=	yes
CARGO_USE_GITLAB=	yes
CARGO_GIT_SUBDIR=	authcommon:authc:authc \
			conrod_core:conrod_core:conrod_core \
			conrod_core:conrod_winit:backends/conrod_winit \
			iced_core:iced:native \
			iced_core:iced_winit:winit
# https://gitlab.com/veloren/veloren/issues/264
CARGO_ENV+=		RUSTC_BOOTSTRAP=1
# XXX https://github.com/rust-lang/cargo/issues/4101
CARGO_INSTALL_PATH=	chat-cli server-cli voxygen

post-patch:
# .git/ directory is missing, so don't abort if git binary is also missing
	@${REINPLACE_CMD} -e 's/"git"/"${TRUE}"/' \
		${WRKSRC}/common/build.rs
# Extract (snapshot) version from the port instead of empty file
	@${REINPLACE_CMD} -e '/GIT_HASH/s/=.*/= "${DISTVERSIONFULL}";/' \
		-e "/GIT_DATE.*static/s/=.*/= \"$$(date -r $$(${AWK} '/TIMESTAMP/ { print $$3 }' \
			${DISTINFO_FILE}) +'%Y-%m-%d-%H:%M')\";/" \
		${WRKSRC}/common/src/util/mod.rs
# Respect PREFIX != /usr/local for system assets
	@${REINPLACE_CMD} -e 's,/usr/share,${DATADIR:H},' \
		${WRKSRC}/common/src/assets/mod.rs
# lang/python3 cannot be used as a dependency
	@${REINPLACE_CMD} -e 's/"python3"/"${PYTHON_CMD:T}"/' \
		${WRKSRC}/cargo-crates/xcb-*/build.rs

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
	(cd ${WRKSRC} && ${COPYTREE_SHARE} assets ${STAGEDIR}${DATADIR})
	${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/192x192/apps
	${INSTALL_DATA} ${DISTDIR}/android-icon-192x192.png \
		${STAGEDIR}${PREFIX}/share/icons/hicolor/192x192/apps/${PORTNAME}.png

.include <bsd.port.mk>
