git: b998385f30f4 - main - x11-wm/i3: add PREFIX to the man pages pathes

From: Sergey A. Osokin <osa_at_FreeBSD.org>
Date: Sun, 15 Jun 2025 18:08:20 UTC
The branch main has been updated by osa:

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

commit b998385f30f4384bb6f5c7de4edd55af309c9ae2
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2025-06-15 18:05:58 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2025-06-15 18:08:03 +0000

    x11-wm/i3: add PREFIX to the man pages pathes
    
    Bump PORTREVISION.
    
    Approved by:    bapt (maintainer)
---
 x11-wm/i3/Makefile                           |  6 ++++++
 x11-wm/i3/files/patch-man_i3-config-wizard.1 | 17 +++++++++++++++++
 x11-wm/i3/files/patch-man_i3.1               | 20 ++++++++++++++++++++
 3 files changed, 43 insertions(+)

diff --git a/x11-wm/i3/Makefile b/x11-wm/i3/Makefile
index 9dc82e9499ab..9a57598f09bd 100644
--- a/x11-wm/i3/Makefile
+++ b/x11-wm/i3/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	i3
 DISTVERSION=	4.24
+PORTREVISION=	1
 CATEGORIES=	x11-wm
 MASTER_SITES=	https://i3wm.org/downloads/ \
 		http://i3wm.org/downloads/
@@ -40,4 +41,9 @@ MAKE_JOBS_UNSAFE=	yes
 
 CONFLICTS_INSTALL=	i3-gaps
 
+post-patch:
+	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \
+		${WRKSRC}/man/i3-config-wizard.1 \
+		${WRKSRC}/man/i3.1
+
 .include <bsd.port.mk>
diff --git a/x11-wm/i3/files/patch-man_i3-config-wizard.1 b/x11-wm/i3/files/patch-man_i3-config-wizard.1
new file mode 100644
index 000000000000..f3a35647095c
--- /dev/null
+++ b/x11-wm/i3/files/patch-man_i3-config-wizard.1
@@ -0,0 +1,17 @@
+--- man/i3-config-wizard.1.orig	2025-06-15 17:44:02 UTC
++++ man/i3-config-wizard.1
+@@ -54,12 +54,12 @@ Display a short help message and exit\&.
+ Display a short help message and exit\&.
+ .RE
+ .SH "FILES"
+-.SS "/etc/i3/config\&.keycodes"
++.SS "%%PREFIX%%/etc/i3/config\&.keycodes"
+ .sp
+ This file contains the default configuration with keycodes\&. All the bindcode lines will be transformed to bindsym and the user\-specified modifier will be used\&.
+ .SH "DESCRIPTION"
+ .sp
+-i3\-config\-wizard is started by i3 in its default config, unless ~/\&.i3/config exists\&. i3\-config\-wizard creates a keysym based i3 config file (based on /etc/i3/config\&.keycodes) in ~/\&.i3/config\&.
++i3\-config\-wizard is started by i3 in its default config, unless ~/\&.i3/config exists\&. i3\-config\-wizard creates a keysym based i3 config file (based on %%PREFIX%%/etc/i3/config\&.keycodes) in ~/\&.i3/config\&.
+ .sp
+ The advantage of using keysyms is that the config file is easy to read, understand and modify\&. However, if we shipped with a keysym based default config file, the key positions would not be consistent across different keyboard layouts (take for example the homerow for movement)\&. Therefore, we ship with a keycode based default config and let the wizard transform it according to your current keyboard layout\&.
+ .SH "SEE ALSO"
diff --git a/x11-wm/i3/files/patch-man_i3.1 b/x11-wm/i3/files/patch-man_i3.1
new file mode 100644
index 000000000000..176fc478c2ef
--- /dev/null
+++ b/x11-wm/i3/files/patch-man_i3.1
@@ -0,0 +1,20 @@
+--- man/i3.1.orig	2024-11-06 17:26:59 UTC
++++ man/i3.1
+@@ -261,7 +261,7 @@ When starting, i3 looks for configuration files in the
+ .sp -1
+ .IP "  3." 4.2
+ .\}
+-/etc/xdg/i3/config (or $XDG_CONFIG_DIRS/i3/config if set)
++/usr/local/etc/xdg/i3/config (or $XDG_CONFIG_DIRS/i3/config if set)
+ .RE
+ .sp
+ .RS 4
+@@ -272,7 +272,7 @@ When starting, i3 looks for configuration files in the
+ .sp -1
+ .IP "  4." 4.2
+ .\}
+-/etc/i3/config
++/usr/local/etc/i3/config
+ .RE
+ .sp
+ You can specify a custom path using the \-c option\&.