git: 1e1d8134114d - main - x11-wm/mangowc: Add new port

From: Nicola Vitale <nivit_at_FreeBSD.org>
Date: Sat, 13 Dec 2025 10:11:32 UTC
The branch main has been updated by nivit:

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

commit 1e1d8134114d80763a910b5d99849ab79e209102
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2025-12-13 10:07:31 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2025-12-13 10:07:31 +0000

    x11-wm/mangowc: Add new port
    
    MangoWC 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)
    
    https://mangowc.vercel.app
---
 x11-wm/Makefile                        |  1 +
 x11-wm/mangowc/Makefile                | 50 ++++++++++++++++++++++++++++++++++
 x11-wm/mangowc/distinfo                |  3 ++
 x11-wm/mangowc/files/patch-src_mango.c | 14 ++++++++++
 x11-wm/mangowc/files/pkg-message.in    | 20 ++++++++++++++
 x11-wm/mangowc/pkg-descr               | 19 +++++++++++++
 6 files changed, 107 insertions(+)

diff --git a/x11-wm/Makefile b/x11-wm/Makefile
index 1ef776b4dfe5..cb692b1c819e 100644
--- a/x11-wm/Makefile
+++ b/x11-wm/Makefile
@@ -68,6 +68,7 @@
     SUBDIR += lxqt-wayland-session
     SUBDIR += lxsession
     SUBDIR += magpie
+    SUBDIR += mangowc
     SUBDIR += marco
     SUBDIR += mcwm
     SUBDIR += metacity
diff --git a/x11-wm/mangowc/Makefile b/x11-wm/mangowc/Makefile
new file mode 100644
index 000000000000..dcd843bdddc5
--- /dev/null
+++ b/x11-wm/mangowc/Makefile
@@ -0,0 +1,50 @@
+PORTNAME=	mangowc
+DISTVERSION=	0.10.7
+CATEGORIES=	x11-wm
+
+MAINTAINER=	nivit@FreeBSD.org
+COMMENT=	Lightweight, high-performance Wayland compositor built on dwl
+WWW=		https://mangowc.vercel.app
+
+LICENSE=	CC0-1.0 GPLv3 MIT
+LICENSE_COMB=	multi
+LICENSE_FILE_CC0-1.0=	${WRKSRC}/LICENSE.tinywl
+LICENSE_FILE_GPLv3=	${WRKSRC}/LICENSE.dwl
+LICENSE_FILE_MIT=	${WRKSRC}/LICENSE.wlroots
+
+BUILD_DEPENDS=	git:devel/git \
+		hwdata>=0.399:misc/hwdata \
+		wayland-protocols>=1.24:graphics/wayland-protocols
+LIB_DEPENDS=	libdisplay-info.so:sysutils/libdisplay-info \
+		libdrm.so:graphics/libdrm \
+		libevdev.so:devel/libevdev \
+		libinput.so:x11/libinput \
+		libjson-c.so:devel/json-c \
+		libliftoff.so:graphics/libliftoff \
+		libpcre2-8.so:devel/pcre2 \
+		libpixman-1.so:x11/pixman \
+		libscenefx-0.4.so:x11-toolkits/scenefx04 \
+		libseat.so:sysutils/seatd \
+		libudev.so:devel/libudev-devd \
+		libwayland-egl.so:graphics/wayland \
+		libwlroots-0.19.so:x11-toolkits/wlroots019 \
+		libxcb-icccm.so:x11/xcb-util-wm \
+		libxcb.so:x11/libxcb \
+		libxkbcommon.so:x11/libxkbcommon
+
+RUN_DEPENDS=	hwdata>=0.399:misc/hwdata \
+		Xwayland:x11-servers/xwayland
+
+USES=		meson pkgconfig
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	DreamMaoMao
+
+SUB_FILES=	pkg-message
+
+PLIST_FILES=	bin/mango \
+		bin/mmsg \
+		etc/mango/config.conf \
+		share/wayland-sessions/mango.desktop
+
+.include <bsd.port.mk>
diff --git a/x11-wm/mangowc/distinfo b/x11-wm/mangowc/distinfo
new file mode 100644
index 000000000000..f28849e93b35
--- /dev/null
+++ b/x11-wm/mangowc/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1765528170
+SHA256 (DreamMaoMao-mangowc-0.10.7_GH0.tar.gz) = 6ef7ffe1ea0093675c526422f1e905ec1d0fa90219615b8f4b00ee0f37e1f60c
+SIZE (DreamMaoMao-mangowc-0.10.7_GH0.tar.gz) = 405169
diff --git a/x11-wm/mangowc/files/patch-src_mango.c b/x11-wm/mangowc/files/patch-src_mango.c
new file mode 100644
index 000000000000..3c03410bec14
--- /dev/null
+++ b/x11-wm/mangowc/files/patch-src_mango.c
@@ -0,0 +1,14 @@
+--- src/mango.c.orig	2025-12-03 10:15:56 UTC
++++ src/mango.c
+@@ -6,7 +6,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/mangowc/files/pkg-message.in b/x11-wm/mangowc/files/pkg-message.in
new file mode 100644
index 000000000000..4fc2cdddbd53
--- /dev/null
+++ b/x11-wm/mangowc/files/pkg-message.in
@@ -0,0 +1,20 @@
+[
+{ type: install
+  message: <<EOM
+Before using MangoWC run the following commands as user:
+
+    mkdir -p ~/.config/mangowc
+    cp %%PREFIX%%/etc/mango/config.conf ~/.config/mangowc/
+
+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
+}
+]
diff --git a/x11-wm/mangowc/pkg-descr b/x11-wm/mangowc/pkg-descr
new file mode 100644
index 000000000000..484e300f15b8
--- /dev/null
+++ b/x11-wm/mangowc/pkg-descr
@@ -0,0 +1,19 @@
+MangoWC 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)