update i3-mousedrag to a newer checkout based on 4.20.1
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
34a012e6a2
commit
e985aef700
@ -1,14 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.13 2021/02/18 11:50:23 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.14 2021/11/12 16:00:14 sthen Exp $
|
||||
|
||||
# see https://github.com/i3/i3/issues/3085 / orestisfl:issue-2643
|
||||
COMMENT= improved dynamic tiling window manager, fork with mouse drag
|
||||
|
||||
GH_ACCOUNT= orestisfl
|
||||
GH_PROJECT= i3
|
||||
GH_COMMIT= 1b0585ddf8f2e2206effbd106cb028cac6ffe6d9
|
||||
GH_COMMIT= 9236a0a9163799a38b2f989d660d0ade81dd16e6
|
||||
|
||||
DISTNAME= i3-mousedrag-4.19.1pl20210102
|
||||
REVISION= 5
|
||||
DISTNAME= i3-mousedrag-4.20.1pl20211111
|
||||
|
||||
CATEGORIES= x11
|
||||
|
||||
@ -65,7 +64,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-mousedrag-4.19.1pl20210102-1b0585dd.tar.gz) = E1k9ott76HqaKrwZHk9h8r3OjCbHlc0A9qxzuXH9b8U=
|
||||
SIZE (i3-mousedrag-4.19.1pl20210102-1b0585dd.tar.gz) = 4193596
|
||||
SHA256 (i3-mousedrag-4.20.1pl20211111-9236a0a9.tar.gz) = pFnoggWN5AJsuj6U4mhxm041BJtPqK//t0sbdwES+VQ=
|
||||
SIZE (i3-mousedrag-4.20.1pl20211111-9236a0a9.tar.gz) = 4202258
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-etc_config,v 1.4 2021/02/12 23:14:30 sthen Exp $
|
||||
$OpenBSD: patch-etc_config,v 1.5 2021/11/12 16:00:14 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.4 2021/02/12 23:14:30 sthen Exp $
|
||||
$OpenBSD: patch-etc_config_keycodes,v 1.5 2021/11/12 16:00:14 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,5 @@
|
||||
$OpenBSD: patch-i3-dmenu-desktop,v 1.2 2021/02/03 14:24:57 sthen Exp $
|
||||
$OpenBSD: patch-i3-dmenu-desktop,v 1.3 2021/11/12 16:00:14 sthen Exp $
|
||||
|
||||
Index: i3-dmenu-desktop
|
||||
--- i3-dmenu-desktop.orig
|
||||
+++ i3-dmenu-desktop
|
||||
@ -11,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',
|
||||
@ -26,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.
|
||||
@ -35,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;
|
||||
|
||||
@ -44,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
|
||||
@ -53,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,8 +1,9 @@
|
||||
$OpenBSD: patch-man_i3_man,v 1.1.1.1 2019/02/16 10:09:57 sthen Exp $
|
||||
$OpenBSD: patch-man_i3_man,v 1.2 2021/11/12 16:00:14 sthen Exp $
|
||||
|
||||
Index: man/i3.man
|
||||
--- man/i3.man.orig
|
||||
+++ man/i3.man
|
||||
@@ -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
|
||||
@ -18,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.2 2021/02/18 11:19:19 sthen Exp $
|
||||
$OpenBSD: patch-meson_build,v 1.3 2021/11/12 16:00:14 sthen Exp $
|
||||
|
||||
OpenBSD will not implement wordexp(3); use glob(3) instead
|
||||
|
||||
Index: meson.build
|
||||
--- meson.build.orig
|
||||
+++ meson.build
|
||||
@@ -600,7 +600,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(
|
||||
@@ -608,7 +610,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,8 +1,9 @@
|
||||
$OpenBSD: patch-src_bindings_c,v 1.4 2021/02/18 11:50:23 sthen Exp $
|
||||
$OpenBSD: patch-src_bindings_c,v 1.5 2021/11/12 16:00:14 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-mousedrag/patches/patch-src_config_directives_c
Normal file
54
x11/i3-mousedrag/patches/patch-src_config_directives_c
Normal file
@ -0,0 +1,54 @@
|
||||
$OpenBSD: patch-src_config_directives_c,v 1.1 2021/11/12 16:00:14 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,8 +1,9 @@
|
||||
$OpenBSD: patch-src_config_parser_c,v 1.2 2021/02/03 14:24:57 sthen Exp $
|
||||
$OpenBSD: patch-src_config_parser_c,v 1.3 2021/11/12 16:00:14 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,12 +1,12 @@
|
||||
$OpenBSD: patch-src_main_c,v 1.1 2021/02/03 14:24:57 sthen Exp $
|
||||
$OpenBSD: patch-src_main_c,v 1.2 2021/11/12 16:00:14 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…
x
Reference in New Issue
Block a user