git: 9b1e2aa43af2 - main - x11/shotman: update to 0.4.1

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 10 Feb 2023 19:08:55 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9b1e2aa43af28ee808ec71a8429701df0222f493

commit 9b1e2aa43af28ee808ec71a8429701df0222f493
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-02-09 09:01:51 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-02-10 19:02:27 +0000

    x11/shotman: update to 0.4.1
    
    Changes:        https://git.sr.ht/~whynothugo/shotman/refs/v0.4.1
    Reported by:    Repology
---
 x11/shotman/Makefile             |  3 ++-
 x11/shotman/Makefile.crates      |  2 --
 x11/shotman/distinfo             | 10 +++-------
 x11/shotman/files/patch-build.rs | 17 +++++++++++++++++
 4 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/x11/shotman/Makefile b/x11/shotman/Makefile
index cb81bac85b35..85e6b9f0b87c 100644
--- a/x11/shotman/Makefile
+++ b/x11/shotman/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	shotman
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.4.0
+DISTVERSION=	0.4.1
 CATEGORIES=	x11 wayland
 MASTER_SITES=	https://git.sr.ht/~whynothugo/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/
 # XXX Teach USES=cargo to not override default DISTFILES
@@ -16,6 +16,7 @@ LICENSE_FILE=	${WRKSRC}/LICENCE.md
 LIB_DEPENDS=	libxkbcommon.so:x11/libxkbcommon
 
 USES=		cargo pkgconfig
+CARGO_ENV=	SHOTMAN_VERSION="${DISTVERSIONFULL}"
 PLIST_FILES=	bin/${PORTNAME} \
 		bin/${PORTNAME}_completions \
 		share/bash-completion/completions/${PORTNAME} \
diff --git a/x11/shotman/Makefile.crates b/x11/shotman/Makefile.crates
index 09c71af96afb..555217a2f062 100644
--- a/x11/shotman/Makefile.crates
+++ b/x11/shotman/Makefile.crates
@@ -11,8 +11,6 @@ CARGO_CRATES=	adler-1.0.2 \
 		chrono-0.4.23 \
 		clap-4.1.4 \
 		clap_complete-4.1.1 \
-		clap_complete_command-0.4.0 \
-		clap_complete_fig-4.1.0 \
 		clap_derive-4.1.0 \
 		clap_lex-0.3.0 \
 		codespan-reporting-0.11.1 \
diff --git a/x11/shotman/distinfo b/x11/shotman/distinfo
index ce384fe8053a..4cf9bba6cd28 100644
--- a/x11/shotman/distinfo
+++ b/x11/shotman/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1675076032
-SHA256 (shotman-v0.4.0.tar.gz) = 387ade4c244c26f03081b7c065b1e6f745032d1ae9e5d7b1adafcc636f8d3dbe
-SIZE (shotman-v0.4.0.tar.gz) = 27267
+TIMESTAMP = 1675933311
+SHA256 (shotman-v0.4.1.tar.gz) = e9f25856b40ac21cd4e7795d175b127ec86f0b8fd81ead8772c7e610d9c0de06
+SIZE (shotman-v0.4.1.tar.gz) = 27662
 SHA256 (rust/crates/adler-1.0.2.crate) = f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe
 SIZE (rust/crates/adler-1.0.2.crate) = 12778
 SHA256 (rust/crates/android_system_properties-0.1.5.crate) = 819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311
@@ -27,10 +27,6 @@ SHA256 (rust/crates/clap-4.1.4.crate) = f13b9c79b5d1dd500d20ef541215a6423c75829e
 SIZE (rust/crates/clap-4.1.4.crate) = 207077
 SHA256 (rust/crates/clap_complete-4.1.1.crate) = 3d6540eedc41f8a5a76cf3d8d458057dcdf817be4158a55b5f861f7a5483de75
 SIZE (rust/crates/clap_complete-4.1.1.crate) = 32707
-SHA256 (rust/crates/clap_complete_command-0.4.0.crate) = 4160b4a4f72ef58bd766bad27c09e6ef1cc9d82a22f6a0f55d152985a4a48e31
-SIZE (rust/crates/clap_complete_command-0.4.0.crate) = 6293
-SHA256 (rust/crates/clap_complete_fig-4.1.0.crate) = cf0c76d8fcf782a1102ccfcd10ca8246e7fdd609c1cd6deddbb96cb638e9bb5c
-SIZE (rust/crates/clap_complete_fig-4.1.0.crate) = 10970
 SHA256 (rust/crates/clap_derive-4.1.0.crate) = 684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8
 SIZE (rust/crates/clap_derive-4.1.0.crate) = 27897
 SHA256 (rust/crates/clap_lex-0.3.0.crate) = 0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8
diff --git a/x11/shotman/files/patch-build.rs b/x11/shotman/files/patch-build.rs
new file mode 100644
index 000000000000..f5fb2bfdcf22
--- /dev/null
+++ b/x11/shotman/files/patch-build.rs
@@ -0,0 +1,17 @@
+https://lists.sr.ht/~whynothugo/shotman/%3Clel5-5qpi-wny%40FreeBSD.org%3E
+
+--- build.rs.orig	2023-02-09 09:01:51 UTC
++++ build.rs
+@@ -1,5 +1,6 @@ fn main() {
+ use std::process::Command;
+ fn main() {
++  if std::env::var("SHOTMAN_VERSION").is_err() {
+     let version = Command::new("git")
+         .args(["describe", "--tags"])
+         .output()
+@@ -13,4 +14,5 @@ fn main() {
+         .unwrap_or(String::from("unknown")); // failed to run git
+ 
+     println!("cargo:rustc-env=SHOTMAN_VERSION={version}");
++  }
+ }