summaryrefslogtreecommitdiff
path: root/x11-wm/mango/files
diff options
context:
space:
mode:
Diffstat (limited to 'x11-wm/mango/files')
-rw-r--r--x11-wm/mango/files/patch-meson.build30
-rw-r--r--x11-wm/mango/files/patch-src_mango.c14
-rw-r--r--x11-wm/mango/files/pkg-message.in36
3 files changed, 80 insertions, 0 deletions
diff --git a/x11-wm/mango/files/patch-meson.build b/x11-wm/mango/files/patch-meson.build
new file mode 100644
index 0000000..5fc5a00
--- /dev/null
+++ b/x11-wm/mango/files/patch-meson.build
@@ -0,0 +1,30 @@
+--- meson.build.orig 2026-05-29 13:04:35 UTC
++++ meson.build
+@@ -12,12 +12,16 @@ endif
+ endif
+ endif
+
++osname = build_machine.system()
++
+ prefix = get_option('prefix')
+ sysconfdir = get_option('sysconfdir')
+
+ # 如果 sysconfdir 以 prefix 开头,去掉 prefix
+-if sysconfdir.startswith(prefix) and not is_nixos
+- sysconfdir = sysconfdir.substring(prefix.length())
++if sysconfdir.startswith(prefix) and not is_nixos and osname != 'freebsd'
++ sysconfdir = sysconfdir.replace(prefix, '')
+ # 确保 sysconfdir 是绝对路径
+ if not sysconfdir.startswith('/')
+ sysconfdir = '/' + sysconfdir
+@@ -72,9 +76,8 @@ c_args = [
+ '-g',
+ '-Wno-unused-function',
+ '-DWLR_USE_UNSTABLE',
+- '-D_POSIX_C_SOURCE=200809L',
+ '-DVERSION="@0@"'.format(version_with_hash),
+- '-DSYSCONFDIR="@0@"'.format('/etc'),
++ '-DSYSCONFDIR="@0@"'.format(sysconfdir),
+ ]
+
+ # 仅在 debug 选项启用时添加调试参数
diff --git a/x11-wm/mango/files/patch-src_mango.c b/x11-wm/mango/files/patch-src_mango.c
new file mode 100644
index 0000000..140092f
--- /dev/null
+++ b/x11-wm/mango/files/patch-src_mango.c
@@ -0,0 +1,14 @@
+--- src/mango.c.orig 2026-05-29 13:04:35 UTC
++++ src/mango.c
+@@ -7,7 +7,11 @@
+ #include <getopt.h>
+ #include <libinput.h>
+ #include <limits.h>
++#ifdef __FreeBSD__
++#include <dev/evdev/input-event-codes.h>
++#else
+ #include <linux/input-event-codes.h>
++#endif
+ #include <scenefx/render/fx_renderer/fx_renderer.h>
+ #include <scenefx/types/fx/blur_data.h>
+ #include <scenefx/types/fx/clipped_region.h>
diff --git a/x11-wm/mango/files/pkg-message.in b/x11-wm/mango/files/pkg-message.in
new file mode 100644
index 0000000..07378ce
--- /dev/null
+++ b/x11-wm/mango/files/pkg-message.in
@@ -0,0 +1,36 @@
+[
+{ type: install
+ message: <<EOM
+Before using Mango run the following commands as user:
+
+ mkdir -p ~/.config/mango
+ cp %%PREFIX%%/etc/mango/config.conf ~/.config/mango/
+
+then customize that file, in particular the variable
+
+ xkb_rules_layout
+
+and the keyboard shortcut to launch a terminal
+
+ bind=Alt,Return,spawn,foot
+
+(replace foot with your preferred terminal emulator).
+EOM
+}
+{ type: upgrade
+ maximum_version: "0.14.0"
+ message: <<EOM
+ Version 0.14.0 of Mango has some breaking changes:
+
+ - IPC Protocol Upgrade: The old dwl IPC protocol is now deprecated and will
+ be removed in the next version.
+ - Socket Restructuring: mmsg(1) now restricts the use of independent sockets.
+ This structural change delivers a more powerful, concise, and reliable
+ syntax, allowing you to seamlessly retrieve data for all clients, tags,
+ monitors, and messages.
+
+ As a result, you must adapt any script that uses the mmsg(1) command to
+ the new syntax.
+EOM
+}
+]