update to i3-4.20.1, plus sync a few things with the i3-mousedrag port
add patch based on rsadowski's for i3-gaps; https://github.com/i3/i3/pull/4420 was merged which adds an "include" config directive based on wordexp(); OpenBSD doesn't have this (and is not ever likely to) so adapt to using glob() instead.
This commit is contained in:
parent
e985aef700
commit
7f14e92644
@ -1,15 +1,15 @@
|
||||
# $OpenBSD: Makefile,v 1.130 2021/02/27 13:56:04 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.131 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
COMMENT = improved dynamic tiling window manager
|
||||
COMMENT= improved dynamic tiling window manager
|
||||
|
||||
DISTNAME = i3-4.19.2
|
||||
DISTNAME= i3-4.20.1
|
||||
|
||||
CATEGORIES = x11
|
||||
CATEGORIES= x11
|
||||
|
||||
HOMEPAGE = https://i3wm.org/
|
||||
HOMEPAGE= https://i3wm.org/
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE = Yes
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
# XXX use of pledge has been neutered. For more details see
|
||||
# https://marc.info/?l=openbsd-ports&m=156762440931634&w=2
|
||||
@ -22,26 +22,27 @@ WANTLIB += xcb-xkb xcb-xrm xkbcommon xkbcommon-x11 yajl
|
||||
COMPILER= base-clang ports-gcc
|
||||
COMPILER_LANGS= c
|
||||
|
||||
MASTER_SITES = ${HOMEPAGE}/downloads/
|
||||
EXTRACT_SUFX = .tar.xz
|
||||
DEBUG_PACKAGES = ${BUILD_PACKAGES}
|
||||
MASTER_SITES= ${HOMEPAGE}/downloads/
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
DEBUG_PACKAGES= ${BUILD_PACKAGES}
|
||||
|
||||
LIB_DEPENDS = devel/libev \
|
||||
LIB_DEPENDS= devel/libev \
|
||||
devel/libyajl>=2.0.0 \
|
||||
devel/pango \
|
||||
devel/pcre \
|
||||
devel/startup-notification \
|
||||
x11/xkbcommon
|
||||
RUN_DEPENDS = devel/desktop-file-utils \
|
||||
RUN_DEPENDS= devel/desktop-file-utils \
|
||||
x11/dmenu \
|
||||
x11/i3status \
|
||||
x11/p5-AnyEvent-I3
|
||||
MODULES = devel/meson
|
||||
|
||||
# Tests now use the X11::XCB Perl module, not yet in ports and a bit complex
|
||||
#TEST_DEPENDS= x11/p5-AnyEvent-I3
|
||||
NO_TEST= Yes
|
||||
|
||||
MODULES= devel/meson
|
||||
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib"
|
||||
|
||||
@ -56,7 +57,7 @@ pre-configure:
|
||||
${WRKSRC}/man/i3.man
|
||||
|
||||
post-install:
|
||||
rm ${WRKINST}/etc/i3/*.{orig,beforesubst}
|
||||
rm ${WRKINST}/etc/i3/*{${PATCHORIG},.beforesubst}
|
||||
mv ${WRKINST}/etc/i3 ${PREFIX}/share/examples/
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (i3-4.19.2.tar.xz) = im7hd2idzyKWTSC2CTAU7k+gQZNF0/1RXVUS2ZgLsnk=
|
||||
SIZE (i3-4.19.2.tar.xz) = 1277396
|
||||
SHA256 (i3-4.20.1.tar.xz) = I+HsryCMHRYqDIxmxFkLMBpCTuXAESJ+q7luNv1r/OY=
|
||||
SIZE (i3-4.20.1.tar.xz) = 1284984
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-etc_config,v 1.5 2021/02/12 23:14:05 sthen Exp $
|
||||
$OpenBSD: patch-etc_config,v 1.6 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
Index: etc/config
|
||||
--- etc/config.orig
|
||||
+++ etc/config
|
||||
@@ -22,18 +22,18 @@ font pango:monospace 8
|
||||
@@ -26,18 +26,18 @@ exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
@ -29,7 +29,7 @@ Index: etc/config
|
||||
|
||||
# use these keys for focus, movement, and resize directions when reaching for
|
||||
# the arrows is not convenient
|
||||
@@ -46,13 +46,13 @@ set $right semicolon
|
||||
@@ -50,13 +50,13 @@ set $right semicolon
|
||||
floating_modifier Mod1
|
||||
|
||||
# start a terminal
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-etc_config_keycodes,v 1.6 2021/02/12 23:14:05 sthen Exp $
|
||||
$OpenBSD: patch-etc_config_keycodes,v 1.7 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
Fix keycodes for the "Left", "Down", "Up" and "Right" keys: they're
|
||||
different between Linux and OpenBSD.
|
||||
@ -6,7 +6,7 @@ different between Linux and OpenBSD.
|
||||
Index: etc/config.keycodes
|
||||
--- etc/config.keycodes.orig
|
||||
+++ etc/config.keycodes
|
||||
@@ -23,30 +23,30 @@ font pango:monospace 8
|
||||
@@ -27,30 +27,30 @@ exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
@ -46,7 +46,7 @@ Index: etc/config.keycodes
|
||||
# A more modern dmenu replacement is rofi:
|
||||
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
|
||||
# There also is i3-dmenu-desktop which only displays applications shipping a
|
||||
@@ -60,10 +60,10 @@ bindcode $mod+46 focus up
|
||||
@@ -64,10 +64,10 @@ bindcode $mod+46 focus up
|
||||
bindcode $mod+47 focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
@ -61,7 +61,7 @@ Index: etc/config.keycodes
|
||||
|
||||
# move focused window
|
||||
bindcode $mod+Shift+44 move left
|
||||
@@ -72,10 +72,10 @@ bindcode $mod+Shift+46 move up
|
||||
@@ -76,10 +76,10 @@ bindcode $mod+Shift+46 move up
|
||||
bindcode $mod+Shift+47 move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
@ -76,7 +76,7 @@ Index: etc/config.keycodes
|
||||
|
||||
# split in horizontal orientation
|
||||
bindcode $mod+43 split h
|
||||
@@ -161,10 +161,10 @@ mode "resize" {
|
||||
@@ -165,10 +165,10 @@ mode "resize" {
|
||||
bindcode 47 resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-i3-dmenu-desktop,v 1.9 2021/02/12 23:14:05 sthen Exp $
|
||||
$OpenBSD: patch-i3-dmenu-desktop,v 1.10 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
Index: i3-dmenu-desktop
|
||||
--- i3-dmenu-desktop.orig
|
||||
@ -12,7 +12,7 @@ Index: i3-dmenu-desktop
|
||||
!defined($xdg_data_dirs) ||
|
||||
$xdg_data_dirs eq '';
|
||||
|
||||
@@ -224,12 +224,12 @@ for my $file (values %desktops) {
|
||||
@@ -226,12 +226,12 @@ for my $file (values %desktops) {
|
||||
# 'evince.desktop' => {
|
||||
# 'Exec' => 'evince %U',
|
||||
# 'Name' => 'Dokumentenbetrachter',
|
||||
@ -27,7 +27,7 @@ Index: i3-dmenu-desktop
|
||||
# }
|
||||
# };
|
||||
|
||||
@@ -461,7 +461,7 @@ if (exists($app->{Terminal}) && $app->{Terminal}) {
|
||||
@@ -463,7 +463,7 @@ if (exists($app->{Terminal}) && $app->{Terminal}) {
|
||||
# we need to create a temporary script that contains the full command line
|
||||
# as the syntax for starting commands with arguments varies from terminal
|
||||
# emulator to terminal emulator.
|
||||
@ -36,7 +36,7 @@ Index: i3-dmenu-desktop
|
||||
my ($fh, $filename) = tempfile();
|
||||
binmode($fh, ':utf8');
|
||||
say $fh <<EOT;
|
||||
@@ -472,7 +472,7 @@ EOT
|
||||
@@ -474,7 +474,7 @@ EOT
|
||||
close($fh);
|
||||
chmod 0755, $filename;
|
||||
|
||||
@ -45,7 +45,7 @@ Index: i3-dmenu-desktop
|
||||
} else {
|
||||
# i3 executes applications by passing the argument to i3’s “exec” command
|
||||
# as-is to $SHELL -c. The i3 parser supports quoted strings: When a string
|
||||
@@ -513,7 +513,7 @@ notifications.
|
||||
@@ -515,7 +515,7 @@ notifications.
|
||||
|
||||
The .desktop files are searched in $XDG_DATA_HOME/applications (by default
|
||||
$HOME/.local/share/applications) and in the "applications" subdirectory of each
|
||||
@ -54,7 +54,7 @@ Index: i3-dmenu-desktop
|
||||
|
||||
Files with the same name in $XDG_DATA_HOME/applications take precedence over
|
||||
files in $XDG_DATA_DIRS, so that you can overwrite parts of the system-wide
|
||||
@@ -527,7 +527,7 @@ file respectively) by appending it to the name of the
|
||||
@@ -529,7 +529,7 @@ file respectively) by appending it to the name of the
|
||||
want to launch "GNU Emacs 24" with the patch /tmp/foobar.txt, you would type
|
||||
"emacs", press TAB, type " /tmp/foobar.txt" and press ENTER.
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
$OpenBSD: patch-i3-msg_main_c,v 1.7 2021/02/12 23:14:05 sthen Exp $
|
||||
$OpenBSD: patch-i3-msg_main_c,v 1.8 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
https://marc.info/?l=openbsd-ports&m=156762440931634&w=2
|
||||
|
||||
Index: i3-msg/main.c
|
||||
--- i3-msg/main.c.orig
|
||||
|
@ -1,4 +1,6 @@
|
||||
$OpenBSD: patch-i3-nagbar_main_c,v 1.18 2021/02/12 23:14:05 sthen Exp $
|
||||
$OpenBSD: patch-i3-nagbar_main_c,v 1.19 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
https://marc.info/?l=openbsd-ports&m=156762440931634&w=2
|
||||
|
||||
Index: i3-nagbar/main.c
|
||||
--- i3-nagbar/main.c.orig
|
||||
@ -12,7 +14,7 @@ Index: i3-nagbar/main.c
|
||||
} else {
|
||||
terminal_cmd = sstrdup(link_path);
|
||||
}
|
||||
@@ -459,7 +459,7 @@ int main(int argc, char *argv[]) {
|
||||
@@ -507,7 +507,7 @@ int main(int argc, char *argv[]) {
|
||||
font = load_font(pattern, true);
|
||||
set_font(&font);
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
$OpenBSD: patch-libi3_get_exe_path_c,v 1.5 2021/02/12 23:14:05 sthen Exp $
|
||||
|
||||
$OpenBSD: patch-libi3_get_exe_path_c,v 1.6 2021/11/12 16:06:07 sthen Exp $
|
||||
Index: libi3/get_exe_path.c
|
||||
--- libi3/get_exe_path.c.orig
|
||||
+++ libi3/get_exe_path.c
|
||||
|
@ -1,5 +1,4 @@
|
||||
$OpenBSD: patch-man_i3-config-wizard_man,v 1.3 2019/08/23 15:07:20 sthen Exp $
|
||||
|
||||
$OpenBSD: patch-man_i3-config-wizard_man,v 1.4 2021/11/12 16:06:07 sthen Exp $
|
||||
Index: man/i3-config-wizard.man
|
||||
--- man/i3-config-wizard.man.orig
|
||||
+++ man/i3-config-wizard.man
|
||||
|
@ -1,8 +1,6 @@
|
||||
$OpenBSD: patch-man_i3-dump-log_man,v 1.2 2019/08/23 15:07:20 sthen Exp $
|
||||
|
||||
Index: man/i3-dump-log.man
|
||||
--- man/i3-dump-log.man.orig
|
||||
+++ man/i3-dump-log.man
|
||||
$OpenBSD: patch-man_i3-dump-log_man,v 1.3 2021/11/12 16:06:07 sthen Exp $
|
||||
--- man/i3-dump-log.man.orig Fri Nov 11 11:05:52 2016
|
||||
+++ man/i3-dump-log.man Fri Nov 11 11:07:08 2016
|
||||
@@ -9,7 +9,7 @@ i3-dump-log - dumps the i3 SHM log
|
||||
|
||||
== SYNOPSIS
|
||||
|
@ -1,9 +1,8 @@
|
||||
$OpenBSD: patch-man_i3-nagbar_man,v 1.3 2019/08/23 15:07:20 sthen Exp $
|
||||
|
||||
$OpenBSD: patch-man_i3-nagbar_man,v 1.4 2021/11/12 16:06:07 sthen Exp $
|
||||
Index: man/i3-nagbar.man
|
||||
--- man/i3-nagbar.man.orig
|
||||
+++ man/i3-nagbar.man
|
||||
@@ -50,7 +50,7 @@ after modifying the configuration file.
|
||||
@@ -54,7 +54,7 @@ after modifying the configuration file.
|
||||
|
||||
------------------------------------------------
|
||||
i3-nagbar -m 'You have an error in your i3 config file!' \
|
||||
|
@ -1,20 +1,9 @@
|
||||
$OpenBSD: patch-man_i3_man,v 1.4 2019/08/23 15:07:20 sthen Exp $
|
||||
$OpenBSD: patch-man_i3_man,v 1.5 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
Index: man/i3.man
|
||||
--- man/i3.man.orig
|
||||
+++ man/i3.man
|
||||
@@ -172,8 +172,8 @@ When starting, i3 looks for configuration files in the
|
||||
|
||||
1. ~/.config/i3/config (or $XDG_CONFIG_HOME/i3/config if set)
|
||||
2. ~/.i3/config
|
||||
-3. /etc/xdg/i3/config (or $XDG_CONFIG_DIRS/i3/config if set)
|
||||
-4. /etc/i3/config
|
||||
+3. ${SYSCONFDIR}/xdg/i3/config (or $XDG_CONFIG_DIRS/i3/config if set)
|
||||
+4. ${SYSCONFDIR}/i3/config
|
||||
|
||||
You can specify a custom path using the -c option.
|
||||
|
||||
@@ -197,13 +197,13 @@ font pango:DejaVu Sans Mono 8
|
||||
@@ -200,13 +200,13 @@ font pango:DejaVu Sans Mono 8
|
||||
floating_modifier Mod1
|
||||
|
||||
# start a terminal
|
||||
@ -30,7 +19,7 @@ Index: man/i3.man
|
||||
|
||||
# change focus
|
||||
bindsym Mod1+j focus left
|
||||
@@ -316,7 +316,7 @@ ulimit -c unlimited
|
||||
@@ -319,7 +319,7 @@ ulimit -c unlimited
|
||||
|
||||
# Start i3 and log to ~/.i3/logfile
|
||||
echo "Starting at $(date)" >> ~/.i3/logfile
|
||||
|
@ -1,9 +1,21 @@
|
||||
$OpenBSD: patch-meson_build,v 1.1 2021/02/13 09:00:05 sthen Exp $
|
||||
$OpenBSD: patch-meson_build,v 1.2 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
OpenBSD will not implement wordexp(3); use glob(3) instead
|
||||
|
||||
Index: meson.build
|
||||
--- meson.build.orig
|
||||
+++ meson.build
|
||||
@@ -598,7 +598,7 @@ install_headers(
|
||||
@@ -52,7 +52,9 @@ endif
|
||||
|
||||
cdata.set('HAVE_STRNDUP', cc.has_function('strndup'))
|
||||
cdata.set('HAVE_MKDIRP', cc.has_function('mkdirp'))
|
||||
+cdata.set('HAVE_WORDEXP', cc.has_function('wordexp'))
|
||||
|
||||
+
|
||||
# Instead of generating config.h directly, make vcs_tag generate it so that
|
||||
# @VCS_TAG@ is replaced.
|
||||
config_h_in = configure_file(
|
||||
@@ -607,7 +609,7 @@ install_headers(
|
||||
# because configure_file strips the backslash in e.g. \@display,
|
||||
# resulting in @display, breaking our Perl code:
|
||||
# https://github.com/mesonbuild/meson/issues/7165
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-src_bindings_c,v 1.10 2021/02/12 23:14:05 sthen Exp $
|
||||
$OpenBSD: patch-src_bindings_c,v 1.11 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
Index: src/bindings.c
|
||||
--- src/bindings.c.orig
|
||||
+++ src/bindings.c
|
||||
@@ -835,7 +835,7 @@ CommandResult *run_binding(Binding *bind, Con *con) {
|
||||
@@ -851,7 +851,7 @@ CommandResult *run_binding(Binding *bind, Con *con) {
|
||||
|
||||
if (result->parse_error) {
|
||||
char *pageraction;
|
||||
|
54
x11/i3/patches/patch-src_config_directives_c
Normal file
54
x11/i3/patches/patch-src_config_directives_c
Normal file
@ -0,0 +1,54 @@
|
||||
$OpenBSD: patch-src_config_directives_c,v 1.9 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
OpenBSD will not implement wordexp(3); use glob(3) instead
|
||||
|
||||
Index: src/config_directives.c
|
||||
--- src/config_directives.c.orig
|
||||
+++ src/config_directives.c
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
-#include <wordexp.h>
|
||||
+#include <glob.h>
|
||||
|
||||
/*******************************************************************************
|
||||
* Include functions.
|
||||
@@ -18,6 +18,7 @@
|
||||
CFGFUN(include, const char *pattern) {
|
||||
DLOG("include %s\n", pattern);
|
||||
|
||||
+#ifdef HAVE_WORDEXP
|
||||
wordexp_t p;
|
||||
const int ret = wordexp(pattern, &p, 0);
|
||||
if (ret != 0) {
|
||||
@@ -27,6 +28,17 @@ CFGFUN(include, const char *pattern) {
|
||||
}
|
||||
char **w = p.we_wordv;
|
||||
for (size_t i = 0; i < p.we_wordc; i++) {
|
||||
+#else
|
||||
+ glob_t p;
|
||||
+ const int ret = glob(pattern, GLOB_ERR, NULL, &p );
|
||||
+ if (ret != 0) {
|
||||
+ ELOG("glob(%s): error %d\n", pattern, ret);
|
||||
+ result->has_errors = true;
|
||||
+ return;
|
||||
+ }
|
||||
+ char **w = p.gl_pathv;
|
||||
+ for (size_t i = 0; i < p.gl_pathc; i++) {
|
||||
+#endif
|
||||
char resolved_path[PATH_MAX] = {'\0'};
|
||||
if (realpath(w[i], resolved_path) == NULL) {
|
||||
LOG("Skipping %s: %s\n", w[i], strerror(errno));
|
||||
@@ -86,7 +98,11 @@ CFGFUN(include, const char *pattern) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
+#ifdef HAVE_WORDEXP
|
||||
wordfree(&p);
|
||||
+#else
|
||||
+ globfree(&p);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-src_config_parser_c,v 1.13 2021/02/12 23:14:05 sthen Exp $
|
||||
$OpenBSD: patch-src_config_parser_c,v 1.14 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
Index: src/config_parser.c
|
||||
--- src/config_parser.c.orig
|
||||
+++ src/config_parser.c
|
||||
@@ -792,8 +792,8 @@ static char *migrate_config(char *input, off_t size) {
|
||||
@@ -752,8 +752,8 @@ static char *migrate_config(char *input, off_t size) {
|
||||
*/
|
||||
void start_config_error_nagbar(const char *configpath, bool has_errors) {
|
||||
char *editaction, *pageraction;
|
||||
|
@ -1,10 +1,12 @@
|
||||
$OpenBSD: patch-src_main_c,v 1.21 2021/02/12 23:14:05 sthen Exp $
|
||||
$OpenBSD: patch-src_main_c,v 1.22 2021/11/12 16:06:07 sthen Exp $
|
||||
|
||||
https://marc.info/?l=openbsd-ports&m=156762440931634&w=2
|
||||
|
||||
Index: src/main.c
|
||||
--- src/main.c.orig
|
||||
+++ src/main.c
|
||||
@@ -970,7 +970,7 @@ int main(int argc, char *argv[]) {
|
||||
xcb_free_pixmap(conn, pixmap);
|
||||
@@ -1125,7 +1125,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
-#if defined(__OpenBSD__)
|
||||
|
Loading…
Reference in New Issue
Block a user