git: 1c0ab17170ab - main - x11/inputplug: Update to 0.4.0

From: Mateusz Piotrowski <0mp_at_FreeBSD.org>
Date: Mon, 04 Oct 2021 18:39:36 UTC
The branch main has been updated by 0mp:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1c0ab17170abe120b51a92ea278a10a5987263c1

commit 1c0ab17170abe120b51a92ea278a10a5987263c1
Author:     Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2021-10-04 18:38:22 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2021-10-04 18:39:31 +0000

    x11/inputplug: Update to 0.4.0
    
    Changes:        https://github.com/andrewshadura/inputplug/releases/tag/0.4.0
---
 x11/inputplug/Makefile                             | 48 ++++++++++++--
 x11/inputplug/distinfo                             | 76 +++++++++++++++++++++-
 .../patch-cargo-crates_pidfile-rs-0.1.0_src_lib.rs | 11 ++++
 x11/inputplug/files/patch-inputplug.c              | 12 ----
 4 files changed, 125 insertions(+), 22 deletions(-)

diff --git a/x11/inputplug/Makefile b/x11/inputplug/Makefile
index e08f9a1ef965..99d4f26bfd9c 100644
--- a/x11/inputplug/Makefile
+++ b/x11/inputplug/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	inputplug
-DISTVERSION=	0.3
+DISTVERSION=	0.4.0
 CATEGORIES=	x11
 
 MAINTAINER=	0mp@FreeBSD.org
@@ -8,17 +8,51 @@ COMMENT=	XInput event monitor daemon
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	mk-configure>=0:devel/mk-configure
-
-USES=		localbase perl5 pkgconfig xorg
+USES=		cargo gmake pkgconfig xorg
 USE_GITHUB=	yes
 GH_ACCOUNT=	andrewshadura
-USE_PERL5=	build
 USE_XORG=	x11 xcb xi
-MAKE_CMD=	mkcmake
-MAKE_ARGS=	MANDIR="${PREFIX}/share/man"
+CARGO_CRATES=	anyhow-1.0.44 \
+		autocfg-1.0.1 \
+		bitflags-1.2.1 \
+		cc-1.0.70 \
+		cfg-if-1.0.0 \
+		clap-2.33.3 \
+		gethostname-0.2.1 \
+		heck-0.3.3 \
+		lazy_static-1.4.0 \
+		libc-0.2.103 \
+		log-0.4.14 \
+		memoffset-0.6.4 \
+		nix-0.20.2 \
+		nix-0.22.2 \
+		pidfile-rs-0.1.0 \
+		pkg-config-0.3.20 \
+		proc-macro-error-1.0.4 \
+		proc-macro-error-attr-1.0.4 \
+		proc-macro2-1.0.29 \
+		quote-1.0.9 \
+		structopt-0.3.23 \
+		structopt-derive-0.4.16 \
+		syn-1.0.78 \
+		textwrap-0.11.0 \
+		thiserror-1.0.29 \
+		thiserror-impl-1.0.29 \
+		unicode-segmentation-1.8.0 \
+		unicode-width-0.1.9 \
+		unicode-xid-0.2.2 \
+		version_check-0.9.3 \
+		winapi-0.3.9 \
+		winapi-i686-pc-windows-gnu-0.4.0 \
+		winapi-wsapoll-0.1.1 \
+		winapi-x86_64-pc-windows-gnu-0.4.0 \
+		x11rb-0.8.1
 
 PLIST_FILES=	bin/inputplug \
 		share/man/man1/inputplug.1.gz
 
+post-install:
+	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/share/man/man1
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
 .include <bsd.port.mk>
diff --git a/x11/inputplug/distinfo b/x11/inputplug/distinfo
index ca4c1bd2ba95..f847d52f51c9 100644
--- a/x11/inputplug/distinfo
+++ b/x11/inputplug/distinfo
@@ -1,3 +1,73 @@
-TIMESTAMP = 1602328140
-SHA256 (andrewshadura-inputplug-0.3_GH0.tar.gz) = acac8e3972f3f10f9b6791321d2441e6b54d93d97c2de81e13eb14734a635ef7
-SIZE (andrewshadura-inputplug-0.3_GH0.tar.gz) = 7003
+TIMESTAMP = 1633352479
+SHA256 (rust/crates/anyhow-1.0.44.crate) = 61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1
+SIZE (rust/crates/anyhow-1.0.44.crate) = 35067
+SHA256 (rust/crates/autocfg-1.0.1.crate) = cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a
+SIZE (rust/crates/autocfg-1.0.1.crate) = 12908
+SHA256 (rust/crates/bitflags-1.2.1.crate) = cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693
+SIZE (rust/crates/bitflags-1.2.1.crate) = 16745
+SHA256 (rust/crates/cc-1.0.70.crate) = d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0
+SIZE (rust/crates/cc-1.0.70.crate) = 57200
+SHA256 (rust/crates/cfg-if-1.0.0.crate) = baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd
+SIZE (rust/crates/cfg-if-1.0.0.crate) = 7934
+SHA256 (rust/crates/clap-2.33.3.crate) = 37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002
+SIZE (rust/crates/clap-2.33.3.crate) = 201925
+SHA256 (rust/crates/gethostname-0.2.1.crate) = e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028
+SIZE (rust/crates/gethostname-0.2.1.crate) = 8988
+SHA256 (rust/crates/heck-0.3.3.crate) = 6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c
+SIZE (rust/crates/heck-0.3.3.crate) = 10260
+SHA256 (rust/crates/lazy_static-1.4.0.crate) = e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646
+SIZE (rust/crates/lazy_static-1.4.0.crate) = 10443
+SHA256 (rust/crates/libc-0.2.103.crate) = dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6
+SIZE (rust/crates/libc-0.2.103.crate) = 540563
+SHA256 (rust/crates/log-0.4.14.crate) = 51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710
+SIZE (rust/crates/log-0.4.14.crate) = 34582
+SHA256 (rust/crates/memoffset-0.6.4.crate) = 59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9
+SIZE (rust/crates/memoffset-0.6.4.crate) = 7664
+SHA256 (rust/crates/nix-0.20.2.crate) = f5e06129fb611568ef4e868c14b326274959aa70ff7776e9d55323531c374945
+SIZE (rust/crates/nix-0.20.2.crate) = 217111
+SHA256 (rust/crates/nix-0.22.2.crate) = d3bb9a13fa32bc5aeb64150cd3f32d6cf4c748f8f8a417cce5d2eb976a8370ba
+SIZE (rust/crates/nix-0.22.2.crate) = 227371
+SHA256 (rust/crates/pidfile-rs-0.1.0.crate) = 5bf50ad3f0e69aab8d669bb31a314baea3f35e4e441c0b07af883c06eacd3496
+SIZE (rust/crates/pidfile-rs-0.1.0.crate) = 5016
+SHA256 (rust/crates/pkg-config-0.3.20.crate) = 7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb
+SIZE (rust/crates/pkg-config-0.3.20.crate) = 15395
+SHA256 (rust/crates/proc-macro-error-1.0.4.crate) = da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c
+SIZE (rust/crates/proc-macro-error-1.0.4.crate) = 25293
+SHA256 (rust/crates/proc-macro-error-attr-1.0.4.crate) = a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869
+SIZE (rust/crates/proc-macro-error-attr-1.0.4.crate) = 7971
+SHA256 (rust/crates/proc-macro2-1.0.29.crate) = b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d
+SIZE (rust/crates/proc-macro2-1.0.29.crate) = 38772
+SHA256 (rust/crates/quote-1.0.9.crate) = c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7
+SIZE (rust/crates/quote-1.0.9.crate) = 25042
+SHA256 (rust/crates/structopt-0.3.23.crate) = bf9d950ef167e25e0bdb073cf1d68e9ad2795ac826f2f3f59647817cf23c0bfa
+SIZE (rust/crates/structopt-0.3.23.crate) = 52029
+SHA256 (rust/crates/structopt-derive-0.4.16.crate) = 134d838a2c9943ac3125cf6df165eda53493451b719f3255b2a26b85f772d0ba
+SIZE (rust/crates/structopt-derive-0.4.16.crate) = 20996
+SHA256 (rust/crates/syn-1.0.78.crate) = a4eac2e6c19f5c3abc0c229bea31ff0b9b091c7b14990e8924b92902a303a0c0
+SIZE (rust/crates/syn-1.0.78.crate) = 233861
+SHA256 (rust/crates/textwrap-0.11.0.crate) = d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060
+SIZE (rust/crates/textwrap-0.11.0.crate) = 17322
+SHA256 (rust/crates/thiserror-1.0.29.crate) = 602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88
+SIZE (rust/crates/thiserror-1.0.29.crate) = 17455
+SHA256 (rust/crates/thiserror-impl-1.0.29.crate) = bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c
+SIZE (rust/crates/thiserror-impl-1.0.29.crate) = 15201
+SHA256 (rust/crates/unicode-segmentation-1.8.0.crate) = 8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b
+SIZE (rust/crates/unicode-segmentation-1.8.0.crate) = 94011
+SHA256 (rust/crates/unicode-width-0.1.9.crate) = 3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973
+SIZE (rust/crates/unicode-width-0.1.9.crate) = 16745
+SHA256 (rust/crates/unicode-xid-0.2.2.crate) = 8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3
+SIZE (rust/crates/unicode-xid-0.2.2.crate) = 14955
+SHA256 (rust/crates/version_check-0.9.3.crate) = 5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe
+SIZE (rust/crates/version_check-0.9.3.crate) = 12547
+SHA256 (rust/crates/winapi-0.3.9.crate) = 5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419
+SIZE (rust/crates/winapi-0.3.9.crate) = 1200382
+SHA256 (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6
+SIZE (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = 2918815
+SHA256 (rust/crates/winapi-wsapoll-0.1.1.crate) = 44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e
+SIZE (rust/crates/winapi-wsapoll-0.1.1.crate) = 2881
+SHA256 (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f
+SIZE (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 2947998
+SHA256 (rust/crates/x11rb-0.8.1.crate) = 6ffb080b3f2f616242a4eb8e7d325035312127901025b0052bc3154a282d0f19
+SIZE (rust/crates/x11rb-0.8.1.crate) = 611888
+SHA256 (andrewshadura-inputplug-0.4.0_GH0.tar.gz) = 3457cc849a582454b82e4e01cee13ca1b605777f28bbf88c12680df06c27e90e
+SIZE (andrewshadura-inputplug-0.4.0_GH0.tar.gz) = 7871
diff --git a/x11/inputplug/files/patch-cargo-crates_pidfile-rs-0.1.0_src_lib.rs b/x11/inputplug/files/patch-cargo-crates_pidfile-rs-0.1.0_src_lib.rs
new file mode 100644
index 000000000000..74f2ff8142b0
--- /dev/null
+++ b/x11/inputplug/files/patch-cargo-crates_pidfile-rs-0.1.0_src_lib.rs
@@ -0,0 +1,11 @@
+--- cargo-crates/pidfile-rs-0.1.0/src/lib.rs.orig	2021-10-04 13:21:00 UTC
++++ cargo-crates/pidfile-rs-0.1.0/src/lib.rs
+@@ -121,7 +121,7 @@ impl Pidfile {
+             Ok(c_path) => {
+                 let mut old_pid: pid_t = -1;
+                 let pidfn = unsafe {
+-                    bsd_pidfile_open(c_path.as_ptr(), permissions.mode(), &mut old_pid)
++                    bsd_pidfile_open(c_path.as_ptr(),  permissions.mode() as mode_t, &mut old_pid)
+                 };
+                 if !pidfn.is_null() {
+                     return Ok(Pidfile {
diff --git a/x11/inputplug/files/patch-inputplug.c b/x11/inputplug/files/patch-inputplug.c
deleted file mode 100644
index ff925db96e55..000000000000
--- a/x11/inputplug/files/patch-inputplug.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- inputplug.c.orig	2020-10-10 11:36:14 UTC
-+++ inputplug.c
-@@ -3,6 +3,9 @@
- #include <assert.h>
- #include <unistd.h>
- #include <errno.h>
-+#if __FreeBSD__
-+#include <signal.h>
-+#endif
- #include <stdio.h>
- #include <stdbool.h>
- #include <stdint.h>