diff --git a/x11-wm/mango/Makefile b/x11-wm/mango/Makefile index 1da8c60af88c..7f60b446a4ef 100644 --- a/x11-wm/mango/Makefile +++ b/x11-wm/mango/Makefile @@ -1,60 +1,50 @@ PORTNAME= mango -DISTVERSION= 0.13.1 +DISTVERSION= 0.14.2 PORTREVISION= 0 CATEGORIES= x11-wm MAINTAINER= nivit@FreeBSD.org COMMENT= Lightweight, high-performance Wayland compositor built on dwl WWW= https://mangowm.github.io/ 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= 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 \ +LIB_DEPENDS= libcjson.so:devel/libcjson \ 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 + 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 -PLIST_FILES= bin/mango \ - bin/mmsg \ - "@sample etc/mango/config.conf.sample" \ - share/wayland-sessions/mango.desktop \ - share/xdg-desktop-portal/mango-portals.conf +OPTIONS_DEFINE= DOCS post-patch: -# Fix C flags -# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275328 - @${REINPLACE_CMD} -E -e 's|_POSIX_C_SOURCE=200809L|_XOPEN_SOURCE=700|' \ - -e "s|(assets/(config.conf))|\1', rename : '\2.sample|1" \ + @${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 index 034515569f97..07f55c4b91d2 100644 --- a/x11-wm/mango/distinfo +++ b/x11-wm/mango/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1779123263 -SHA256 (mangowm-mango-0.13.1_GH0.tar.gz) = bc23d06834e1a5222b8ce1f3ee3d68937e1321ef5446640a4f3dac53639569d8 -SIZE (mangowm-mango-0.13.1_GH0.tar.gz) = 497057 +TIMESTAMP = 1780906758 +SHA256 (mangowm-mango-0.14.2_GH0.tar.gz) = c0ac17979d8024d332955b47a54e7fbf058359fdbeaf903f0a64a56e06bd2b33 +SIZE (mangowm-mango-0.14.2_GH0.tar.gz) = 505978 diff --git a/x11-wm/mango/files/patch-meson.build b/x11-wm/mango/files/patch-meson.build index 69f9787894de..8aec00d03050 100644 --- a/x11-wm/mango/files/patch-meson.build +++ b/x11-wm/mango/files/patch-meson.build @@ -1,30 +1,32 @@ ---- meson.build.orig 2026-02-18 05:26:24 UTC +--- 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' + # this fails with: Unknown method "length" in object <[OptionStringHolder] holds [OptionString] + # sysconfdir = sysconfdir.substring(prefix.length()) + sysconfdir = sysconfdir.replace(prefix, '') # 确保 sysconfdir 是绝对路径 if not sysconfdir.startswith('/') sysconfdir = '/' + sysconfdir -@@ -72,7 +76,7 @@ c_args = [ +@@ -72,9 +76,8 @@ c_args = [ + '-g', + '-Wno-unused-function', '-DWLR_USE_UNSTABLE', - '-D_POSIX_C_SOURCE=200809L', +- '-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 index 3c03410bec14..140092f4865f 100644 --- a/x11-wm/mango/files/patch-src_mango.c +++ b/x11-wm/mango/files/patch-src_mango.c @@ -1,14 +1,14 @@ ---- src/mango.c.orig 2025-12-03 10:15:56 UTC +--- src/mango.c.orig 2026-05-29 13:04:35 UTC +++ src/mango.c -@@ -6,7 +6,11 @@ +@@ -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 index c26711c2d8da..07378ce37e8b 100644 --- a/x11-wm/mango/files/pkg-message.in +++ b/x11-wm/mango/files/pkg-message.in @@ -1,20 +1,36 @@ [ { type: install message: <