From 8132c06bf78e2ed39deb917fd9e96823e40b7b42 Mon Sep 17 00:00:00 2001 From: cashmere Date: Sat, 25 Jul 2026 13:54:52 +0200 Subject: add sunshine, i3bar-river, mango and scenefx05 ports --- x11-wm/mango/Makefile | 47 ++++++++++++++++++++++++++++++++++++ x11-wm/mango/distinfo | 3 +++ x11-wm/mango/files/patch-meson.build | 30 +++++++++++++++++++++++ x11-wm/mango/files/patch-src_mango.c | 14 +++++++++++ x11-wm/mango/files/pkg-message.in | 36 +++++++++++++++++++++++++++ x11-wm/mango/pkg-descr | 19 +++++++++++++++ x11-wm/mango/pkg-plist | 37 ++++++++++++++++++++++++++++ 7 files changed, 186 insertions(+) create mode 100644 x11-wm/mango/Makefile create mode 100644 x11-wm/mango/distinfo create mode 100644 x11-wm/mango/files/patch-meson.build create mode 100644 x11-wm/mango/files/patch-src_mango.c create mode 100644 x11-wm/mango/files/pkg-message.in create mode 100644 x11-wm/mango/pkg-descr create mode 100644 x11-wm/mango/pkg-plist (limited to 'x11-wm/mango') 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 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 + #include + #include ++#ifdef __FreeBSD__ ++#include ++#else + #include ++#endif + #include + #include + #include 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: <