diff options
Diffstat (limited to 'x11-wm/mango')
| -rw-r--r-- | x11-wm/mango/Makefile | 47 | ||||
| -rw-r--r-- | x11-wm/mango/distinfo | 3 | ||||
| -rw-r--r-- | x11-wm/mango/files/patch-meson.build | 30 | ||||
| -rw-r--r-- | x11-wm/mango/files/patch-src_mango.c | 14 | ||||
| -rw-r--r-- | x11-wm/mango/files/pkg-message.in | 36 | ||||
| -rw-r--r-- | x11-wm/mango/pkg-descr | 19 | ||||
| -rw-r--r-- | x11-wm/mango/pkg-plist | 37 |
7 files changed, 186 insertions, 0 deletions
diff --git a/x11-wm/mango/Makefile b/x11-wm/mango/Makefile new file mode 100644 index 0000000..cb9359a --- /dev/null +++ b/x11-wm/mango/Makefile @@ -0,0 +1,47 @@ +PORTNAME= mango +DISTVERSION= 0.15.4 + +CATEGORIES= x11-wm + +MAINTAINER= nivit@FreeBSD.org +COMMENT= Lightweight, high-performance Wayland compositor built on dwl +WWW= https://mangowm.github.io/ + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= hwdata>=0.399:misc/hwdata \ + wayland-protocols>=1.24:graphics/wayland-protocols +LIB_DEPENDS= libcjson.so:devel/libcjson \ + libinput.so:x11/libinput \ + libpcre2-8.so:devel/pcre2 \ + libpixman-1.so:x11/pixman \ + libscenefx-0.5.so:x11-toolkits/scenefx05 \ + libwlroots-0.20.so:x11-toolkits/wlroots020 \ + libxcb-icccm.so:x11/xcb-util-wm \ + libxkbcommon.so:x11/libxkbcommon \ + libwayland-server.so:graphics/wayland + +RUN_DEPENDS= hwdata>=0.399:misc/hwdata \ + Xwayland:x11-servers/xwayland + +USES= meson pkgconfig + +USE_GITHUB= yes +GH_ACCOUNT= mangowm + +MESON_ARGS= -Dsysconfdir=${PREFIX}/etc + +SUB_FILES= pkg-message + +OPTIONS_DEFINE= DOCS + +post-patch: + @${REINPLACE_CMD} -E -e "s|(assets/(config.conf))|\1', rename : '\2.sample|1" \ + ${WRKSRC}/meson.build + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) + +.include <bsd.port.mk> diff --git a/x11-wm/mango/distinfo b/x11-wm/mango/distinfo new file mode 100644 index 0000000..cecb731 --- /dev/null +++ b/x11-wm/mango/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1784922544 +SHA256 (mangowm-mango-0.15.4_GH0.tar.gz) = 50d075e59e6dd9a4baa3eaf80985fc246d5bc1caad0de85911d567df8b2dc1ba +SIZE (mangowm-mango-0.15.4_GH0.tar.gz) = 499975 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 +} +] diff --git a/x11-wm/mango/pkg-descr b/x11-wm/mango/pkg-descr new file mode 100644 index 0000000..fae3842 --- /dev/null +++ b/x11-wm/mango/pkg-descr @@ -0,0 +1,19 @@ +Mango is a modern, lightweight, high-performance Wayland compositor built on +dwl - crafted for speed, flexibility, and a customizable desktop experience. + +Feature Highlights + + - Excellent xwayland support + - Base tags not workspaces (supports separate window layouts for each tag) + - Smooth and customizable complete animations (window open/move/close, tag + enter/leave,layer open/close/move) + - Excellent input method support (text input v2/v3) + - Flexible window layouts with easy switching (scroller, master-stack, + monocle,center-master, etc.) + - Rich window states (swallow, minimize, maximize, unglobal, global, + fakefullscreen, overlay, etc.) + - Simple yet powerful external configuration (support shortcuts hot-reload) + - Sway-like scratchpad and named scratchpad + - Ipc support (get/send message from/to compositor by external program) + - Hycov-like overview + - Window effects from scenefx (blur, shadow, corner radius, opacity) diff --git a/x11-wm/mango/pkg-plist b/x11-wm/mango/pkg-plist new file mode 100644 index 0000000..4a2609f --- /dev/null +++ b/x11-wm/mango/pkg-plist @@ -0,0 +1,37 @@ +bin/mango +bin/mmsg +%%ETCDIR%%/config.conf.sample +%%PORTDOCS%%%%DOCSDIR%%/bindings/index.mdx +%%PORTDOCS%%%%DOCSDIR%%/bindings/keys.md +%%PORTDOCS%%%%DOCSDIR%%/bindings/meta.json +%%PORTDOCS%%%%DOCSDIR%%/bindings/mouse-gestures.md +%%PORTDOCS%%%%DOCSDIR%%/configuration/basics.md +%%PORTDOCS%%%%DOCSDIR%%/configuration/index.mdx +%%PORTDOCS%%%%DOCSDIR%%/configuration/input.md +%%PORTDOCS%%%%DOCSDIR%%/configuration/meta.json +%%PORTDOCS%%%%DOCSDIR%%/configuration/miscellaneous.md +%%PORTDOCS%%%%DOCSDIR%%/configuration/monitors.md +%%PORTDOCS%%%%DOCSDIR%%/configuration/xdg-portals.md +%%PORTDOCS%%%%DOCSDIR%%/faq.md +%%PORTDOCS%%%%DOCSDIR%%/index.md +%%PORTDOCS%%%%DOCSDIR%%/installation.md +%%PORTDOCS%%%%DOCSDIR%%/ipc.md +%%PORTDOCS%%%%DOCSDIR%%/meta.json +%%PORTDOCS%%%%DOCSDIR%%/nix-options.md +%%PORTDOCS%%%%DOCSDIR%%/quick-start.md +%%PORTDOCS%%%%DOCSDIR%%/screenshot.md +%%PORTDOCS%%%%DOCSDIR%%/visuals/animations.md +%%PORTDOCS%%%%DOCSDIR%%/visuals/effects.md +%%PORTDOCS%%%%DOCSDIR%%/visuals/index.mdx +%%PORTDOCS%%%%DOCSDIR%%/visuals/meta.json +%%PORTDOCS%%%%DOCSDIR%%/visuals/status-bar.md +%%PORTDOCS%%%%DOCSDIR%%/visuals/theming.md +%%PORTDOCS%%%%DOCSDIR%%/window-management/index.mdx +%%PORTDOCS%%%%DOCSDIR%%/window-management/layouts.md +%%PORTDOCS%%%%DOCSDIR%%/window-management/meta.json +%%PORTDOCS%%%%DOCSDIR%%/window-management/overview.md +%%PORTDOCS%%%%DOCSDIR%%/window-management/rules.md +%%PORTDOCS%%%%DOCSDIR%%/window-management/scratchpad.md +share/man/man1/mmsg.1.gz +share/wayland-sessions/mango.desktop +share/xdg-desktop-portal/mango-portals.conf |
