PORTNAME=	diesel
DISTVERSIONPREFIX=	v
DISTVERSION=	2.0.3
PORTREVISION=	2
CATEGORIES=	databases
PKGNAMESUFFIX=	-cli

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Extensible ORM and Query Builder for Rust
WWW=		https://diesel.rs

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

USES=		cargo mysql pgsql sqlite

USE_GITHUB=	yes
GH_ACCOUNT=	diesel-rs

CARGO_BUILD_ARGS=	--package=diesel_cli
CARGO_INSTALL_PATH=	diesel_cli
CARGO_CRATES=	aho-corasick-0.7.20 \
		android_system_properties-0.1.5 \
		ansi_term-0.12.1 \
		assert_matches-1.5.0 \
		atty-0.2.14 \
		autocfg-1.1.0 \
		base64-0.13.1 \
		bcrypt-0.10.1 \
		bigdecimal-0.3.0 \
		bitflags-1.3.2 \
		blowfish-0.8.0 \
		bumpalo-3.12.0 \
		byteorder-1.4.3 \
		cc-1.0.78 \
		cfg-if-1.0.0 \
		chrono-0.4.23 \
		cipher-0.3.0 \
		clap-2.34.0 \
		clap-3.2.23 \
		clap_complete-3.2.5 \
		clap_lex-0.2.4 \
		codespan-reporting-0.11.1 \
		core-foundation-sys-0.8.3 \
		cxx-1.0.87 \
		cxx-build-1.0.87 \
		cxxbridge-flags-1.0.87 \
		cxxbridge-macro-1.0.87 \
		difference-2.0.0 \
		diffy-0.3.0 \
		dotenvy-0.15.6 \
		env_logger-0.8.4 \
		fastrand-1.8.0 \
		form_urlencoded-1.1.0 \
		generic-array-0.14.6 \
		getrandom-0.2.8 \
		hashbrown-0.12.3 \
		heck-0.3.3 \
		heck-0.4.0 \
		hermit-abi-0.1.19 \
		iana-time-zone-0.1.53 \
		iana-time-zone-haiku-0.1.1 \
		idna-0.3.0 \
		indexmap-1.9.2 \
		instant-0.1.12 \
		ipnet-2.7.1 \
		ipnetwork-0.20.0 \
		itoa-1.0.5 \
		js-sys-0.3.60 \
		lazy_static-1.4.0 \
		libc-0.2.139 \
		libsqlite3-sys-0.25.2 \
		link-cplusplus-1.0.8 \
		lock_api-0.4.9 \
		log-0.4.17 \
		memchr-2.5.0 \
		mysqlclient-sys-0.2.5 \
		nu-ansi-term-0.46.0 \
		num-bigint-0.4.3 \
		num-integer-0.1.45 \
		num-traits-0.2.15 \
		once_cell-1.17.0 \
		opaque-debug-0.3.0 \
		os_str_bytes-6.4.1 \
		overload-0.1.1 \
		parking_lot-0.12.1 \
		parking_lot_core-0.9.6 \
		percent-encoding-2.2.0 \
		pkg-config-0.3.26 \
		ppv-lite86-0.2.17 \
		pq-sys-0.4.7 \
		proc-macro-error-1.0.4 \
		proc-macro-error-attr-1.0.4 \
		proc-macro2-1.0.50 \
		quickcheck-1.0.3 \
		quote-1.0.23 \
		r2d2-0.8.10 \
		rand-0.8.5 \
		rand_chacha-0.3.1 \
		rand_core-0.6.4 \
		redox_syscall-0.2.16 \
		regex-1.7.1 \
		regex-syntax-0.6.28 \
		remove_dir_all-0.5.3 \
		ryu-1.0.12 \
		scheduled-thread-pool-0.2.6 \
		scopeguard-1.1.0 \
		scratch-1.0.3 \
		serde-1.0.152 \
		serde_derive-1.0.152 \
		serde_json-1.0.91 \
		serde_regex-1.1.0 \
		smallvec-1.10.0 \
		strsim-0.8.0 \
		strsim-0.10.0 \
		structopt-0.3.26 \
		structopt-derive-0.4.18 \
		syn-1.0.107 \
		tempfile-3.3.0 \
		termcolor-1.2.0 \
		textwrap-0.11.0 \
		textwrap-0.16.0 \
		time-0.3.17 \
		time-core-0.1.0 \
		time-macros-0.2.6 \
		tinyvec-1.6.0 \
		tinyvec_macros-0.1.0 \
		toml-0.5.11 \
		typenum-1.16.0 \
		unicode-bidi-0.3.10 \
		unicode-ident-1.0.6 \
		unicode-normalization-0.1.22 \
		unicode-segmentation-1.10.0 \
		unicode-width-0.1.10 \
		url-2.3.1 \
		uuid-1.2.2 \
		vcpkg-0.2.15 \
		vec_map-0.8.2 \
		version_check-0.9.4 \
		wasi-0.11.0+wasi-snapshot-preview1 \
		wasm-bindgen-0.2.83 \
		wasm-bindgen-backend-0.2.83 \
		wasm-bindgen-macro-0.2.83 \
		wasm-bindgen-macro-support-0.2.83 \
		wasm-bindgen-shared-0.2.83 \
		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.42.0 \
		windows_aarch64_gnullvm-0.42.1 \
		windows_aarch64_msvc-0.42.1 \
		windows_i686_gnu-0.42.1 \
		windows_i686_msvc-0.42.1 \
		windows_x86_64_gnu-0.42.1 \
		windows_x86_64_gnullvm-0.42.1 \
		windows_x86_64_msvc-0.42.1

PLIST_FILES=	bin/${PORTNAME}

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

.include <bsd.port.mk>
