PORTNAME=	git-cliff
DISTVERSIONPREFIX=	v
DISTVERSION=	2.2.0
CATEGORIES=	devel

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Highly customizable changelog generator
WWW=		https://git-cliff.org

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

BROKEN_powerpc64le=	compilation failure: called `Option::unwrap()` on a `None` value in ring-0.16.20/build.rs:358:10 # see https://github.com/rust-lang/rust/issues/119901

USES=		cargo

USE_GITHUB=	yes
GH_ACCOUNT=	orhun

WRKSRC_SUBDIR=	git-cliff
CARGO_CARGOLOCK=	${WRKSRC}/../Cargo.lock

RUSTFLAGS=	${ARCH:S/i386/YES/:C/^[a-z].*//:S/YES/-C target-feature=+sse,+sse2/} # add sse sse2 target-features only on i386

CARGO_CRATES=	addr2line-0.21.0 \
		adler-1.0.2 \
		adler32-1.2.0 \
		aho-corasick-1.1.3 \
		android-tzdata-0.1.1 \
		android_system_properties-0.1.5 \
		anstream-0.6.13 \
		anstyle-1.0.6 \
		anstyle-parse-0.2.3 \
		anstyle-query-1.0.2 \
		anstyle-wincon-3.0.2 \
		anyhow-1.0.81 \
		async-trait-0.1.79 \
		autocfg-1.2.0 \
		backtrace-0.3.71 \
		base64-0.21.7 \
		bincode-1.3.3 \
		bitflags-1.3.2 \
		bitflags-2.5.0 \
		block-buffer-0.10.4 \
		bstr-1.9.1 \
		bumpalo-3.15.4 \
		bytes-1.6.0 \
		cacache-12.0.0 \
		cc-1.0.90 \
		cfg-if-1.0.0 \
		chrono-0.4.37 \
		chrono-tz-0.8.6 \
		chrono-tz-build-0.2.1 \
		clap-4.5.4 \
		clap_builder-4.5.2 \
		clap_complete-4.5.1 \
		clap_derive-4.5.4 \
		clap_lex-0.7.0 \
		clap_mangen-0.2.20 \
		colorchoice-1.0.0 \
		config-0.14.0 \
		console-0.15.8 \
		conventional_commit_parser-0.9.4 \
		core-foundation-0.9.4 \
		core-foundation-sys-0.8.6 \
		cpufeatures-0.2.12 \
		crc32fast-1.4.0 \
		crossbeam-deque-0.8.5 \
		crossbeam-epoch-0.9.18 \
		crossbeam-utils-0.8.19 \
		crypto-common-0.1.6 \
		deranged-0.3.11 \
		deunicode-1.4.3 \
		diff-0.1.13 \
		digest-0.10.7 \
		directories-5.0.1 \
		dirs-5.0.1 \
		dirs-sys-0.4.1 \
		doc-comment-0.3.3 \
		document-features-0.2.8 \
		either-1.10.0 \
		encode_unicode-0.3.6 \
		encoding_rs-0.8.33 \
		env_logger-0.10.2 \
		equivalent-1.0.1 \
		errno-0.3.8 \
		fastrand-2.0.2 \
		flate2-1.0.28 \
		fnv-1.0.7 \
		form_urlencoded-1.2.1 \
		futures-0.3.30 \
		futures-channel-0.3.30 \
		futures-core-0.3.30 \
		futures-executor-0.3.30 \
		futures-io-0.3.30 \
		futures-macro-0.3.30 \
		futures-sink-0.3.30 \
		futures-task-0.3.30 \
		futures-util-0.3.30 \
		generic-array-0.14.7 \
		getrandom-0.2.12 \
		gimli-0.28.1 \
		git-conventional-0.12.6 \
		git2-0.18.3 \
		glob-0.3.1 \
		globset-0.4.14 \
		globwalk-0.8.1 \
		h2-0.3.25 \
		hashbrown-0.14.3 \
		heck-0.5.0 \
		hermit-abi-0.3.9 \
		hex-0.4.3 \
		http-0.2.12 \
		http-body-0.4.6 \
		http-cache-0.18.0 \
		http-cache-reqwest-0.13.0 \
		http-cache-semantics-1.0.2 \
		http-serde-1.1.3 \
		httparse-1.8.0 \
		httpdate-1.0.3 \
		humansize-2.1.3 \
		humantime-2.1.0 \
		hyper-0.14.28 \
		hyper-rustls-0.24.2 \
		iana-time-zone-0.1.60 \
		iana-time-zone-haiku-0.1.2 \
		idna-0.5.0 \
		ignore-0.4.22 \
		include-flate-0.2.0 \
		include-flate-codegen-0.1.4 \
		include-flate-codegen-exports-0.1.4 \
		indexmap-2.2.6 \
		indicatif-0.17.8 \
		instant-0.1.12 \
		ipnet-2.9.0 \
		is-terminal-0.4.12 \
		itoa-1.0.11 \
		jobserver-0.1.28 \
		js-sys-0.3.69 \
		lazy-regex-3.1.0 \
		lazy-regex-proc_macros-3.1.0 \
		lazy_static-1.4.0 \
		libc-0.2.153 \
		libflate-1.4.0 \
		libflate_lz77-1.2.0 \
		libgit2-sys-0.16.2+1.7.2 \
		libm-0.2.8 \
		libredox-0.0.1 \
		libz-sys-1.1.16 \
		linked-hash-map-0.5.6 \
		linux-raw-sys-0.4.13 \
		litrs-0.4.1 \
		log-0.4.21 \
		memchr-2.7.1 \
		memmap2-0.5.10 \
		miette-5.10.0 \
		miette-derive-5.10.0 \
		mime-0.3.17 \
		mime_guess-2.0.4 \
		minimal-lexical-0.2.1 \
		miniz_oxide-0.7.2 \
		mio-0.8.11 \
		next_version-0.2.15 \
		nom-7.1.3 \
		num-conv-0.1.0 \
		num-traits-0.2.18 \
		num_cpus-1.16.0 \
		number_prefix-0.4.0 \
		object-0.32.2 \
		once_cell-1.19.0 \
		option-ext-0.2.0 \
		parse-zoneinfo-0.3.0 \
		pathdiff-0.2.1 \
		percent-encoding-2.3.1 \
		pest-2.7.8 \
		pest_derive-2.7.8 \
		pest_generator-2.7.8 \
		pest_meta-2.7.8 \
		phf-0.11.2 \
		phf_codegen-0.11.2 \
		phf_generator-0.11.2 \
		phf_shared-0.11.2 \
		pin-project-lite-0.2.13 \
		pin-utils-0.1.0 \
		pkg-config-0.3.30 \
		portable-atomic-1.6.0 \
		powerfmt-0.2.0 \
		ppv-lite86-0.2.17 \
		pretty_assertions-1.4.0 \
		proc-macro-hack-0.5.20+deprecated \
		proc-macro2-1.0.79 \
		quote-1.0.35 \
		rand-0.8.5 \
		rand_chacha-0.3.1 \
		rand_core-0.6.4 \
		redox_syscall-0.4.1 \
		redox_users-0.4.4 \
		reflink-copy-0.1.15 \
		regex-1.10.4 \
		regex-automata-0.4.6 \
		regex-syntax-0.8.3 \
		reqwest-0.11.27 \
		reqwest-middleware-0.2.5 \
		ring-0.17.8 \
		rle-decode-fast-1.0.3 \
		roff-0.2.1 \
		rust-embed-8.3.0 \
		rust-embed-impl-8.3.0 \
		rust-embed-utils-8.3.0 \
		rustc-demangle-0.1.23 \
		rustix-0.38.32 \
		rustls-0.21.10 \
		rustls-0.22.3 \
		rustls-pemfile-1.0.4 \
		rustls-pki-types-1.4.1 \
		rustls-webpki-0.101.7 \
		rustls-webpki-0.102.2 \
		ryu-1.0.17 \
		same-file-1.0.6 \
		sct-0.7.1 \
		secrecy-0.8.0 \
		semver-1.0.22 \
		serde-1.0.197 \
		serde_derive-1.0.197 \
		serde_json-1.0.115 \
		serde_regex-1.1.0 \
		serde_spanned-0.6.5 \
		serde_urlencoded-0.7.1 \
		sha-1-0.10.1 \
		sha1-0.10.6 \
		sha2-0.10.8 \
		shellexpand-3.1.0 \
		siphasher-0.3.11 \
		slab-0.4.9 \
		slug-0.1.5 \
		socket2-0.5.6 \
		spin-0.9.8 \
		ssri-9.2.0 \
		strsim-0.11.0 \
		subtle-2.5.0 \
		syn-1.0.109 \
		syn-2.0.55 \
		sync_wrapper-0.1.2 \
		system-configuration-0.5.1 \
		system-configuration-sys-0.5.0 \
		task-local-extensions-0.1.4 \
		tempfile-3.10.1 \
		tera-1.19.1 \
		termcolor-1.4.1 \
		terminal_size-0.3.0 \
		thiserror-1.0.58 \
		thiserror-impl-1.0.58 \
		time-0.3.34 \
		time-core-0.1.2 \
		time-macros-0.2.17 \
		tinyvec-1.6.0 \
		tinyvec_macros-0.1.1 \
		tokio-1.37.0 \
		tokio-macros-2.2.0 \
		tokio-rustls-0.24.1 \
		tokio-stream-0.1.15 \
		tokio-util-0.7.10 \
		toml-0.8.12 \
		toml_datetime-0.6.5 \
		toml_edit-0.22.9 \
		tower-service-0.3.2 \
		tracing-0.1.40 \
		tracing-core-0.1.32 \
		try-lock-0.2.5 \
		typenum-1.17.0 \
		ucd-trie-0.1.6 \
		unic-char-property-0.9.0 \
		unic-char-range-0.9.0 \
		unic-common-0.9.0 \
		unic-segment-0.9.0 \
		unic-ucd-segment-0.9.0 \
		unic-ucd-version-0.9.0 \
		unicase-2.7.0 \
		unicode-bidi-0.3.15 \
		unicode-ident-1.0.12 \
		unicode-normalization-0.1.23 \
		unicode-width-0.1.11 \
		untrusted-0.9.0 \
		update-informer-1.1.0 \
		ureq-2.9.6 \
		url-2.5.0 \
		utf8parse-0.2.1 \
		vcpkg-0.2.15 \
		version_check-0.9.4 \
		walkdir-2.5.0 \
		want-0.3.1 \
		wasi-0.11.0+wasi-snapshot-preview1 \
		wasm-bindgen-0.2.92 \
		wasm-bindgen-backend-0.2.92 \
		wasm-bindgen-futures-0.4.42 \
		wasm-bindgen-macro-0.2.92 \
		wasm-bindgen-macro-support-0.2.92 \
		wasm-bindgen-shared-0.2.92 \
		web-sys-0.3.69 \
		webpki-roots-0.25.4 \
		webpki-roots-0.26.1 \
		winapi-0.3.9 \
		winapi-i686-pc-windows-gnu-0.4.0 \
		winapi-util-0.1.6 \
		winapi-x86_64-pc-windows-gnu-0.4.0 \
		windows-0.54.0 \
		windows-core-0.52.0 \
		windows-core-0.54.0 \
		windows-result-0.1.0 \
		windows-sys-0.48.0 \
		windows-sys-0.52.0 \
		windows-targets-0.48.5 \
		windows-targets-0.52.4 \
		windows_aarch64_gnullvm-0.48.5 \
		windows_aarch64_gnullvm-0.52.4 \
		windows_aarch64_msvc-0.48.5 \
		windows_aarch64_msvc-0.52.4 \
		windows_i686_gnu-0.48.5 \
		windows_i686_gnu-0.52.4 \
		windows_i686_msvc-0.48.5 \
		windows_i686_msvc-0.52.4 \
		windows_x86_64_gnu-0.48.5 \
		windows_x86_64_gnu-0.52.4 \
		windows_x86_64_gnullvm-0.48.5 \
		windows_x86_64_gnullvm-0.52.4 \
		windows_x86_64_msvc-0.48.5 \
		windows_x86_64_msvc-0.52.4 \
		winnow-0.6.5 \
		winreg-0.50.0 \
		xxhash-rust-0.8.10 \
		yaml-rust-0.4.5 \
		yansi-0.5.1 \
		zeroize-1.7.0

PLIST_FILES=	bin/${PORTNAME} \
		bin/git-cliff-completions \
		bin/git-cliff-mangen

post-install:
	@${STRIP_CMD} \
		${STAGEDIR}${PREFIX}/bin/${PORTNAME} \
		${STAGEDIR}${PREFIX}/bin/git-cliff-completions \
		${STAGEDIR}${PREFIX}/bin/git-cliff-mangen

.include <bsd.port.mk>
