diff --git a/x11-wm/picom/Makefile b/x11-wm/picom/Makefile index 8b2d0921f66b..ed8eae9867b1 100644 --- a/x11-wm/picom/Makefile +++ b/x11-wm/picom/Makefile @@ -1,73 +1,74 @@ PORTNAME= picom DISTVERSIONPREFIX= v DISTVERSION= 11.1 +PORTREVISION= 1 CATEGORIES= x11-wm MAINTAINER= jbeich@FreeBSD.org COMMENT= Lightweight X11 compositor WWW= https://github.com/yshui/picom LICENSE= MIT MPL20 LICENSE_COMB= multi LICENSE_FILE_MIT= ${WRKSRC}/LICENSES/MIT BUILD_DEPENDS= ${LOCALBASE}/include/uthash.h:devel/uthash LIB_DEPENDS= libev.so:devel/libev \ libxcb-image.so:x11/xcb-util-image \ libxcb-render-util.so:x11/xcb-util-renderutil RUN_DEPENDS= xprop:x11/xprop \ xwininfo:x11/xwininfo USES= compiler:c11 meson localbase pkgconfig xorg USE_GITHUB= yes USE_XORG= x11 xcb xext pixman GH_ACCOUNT= yshui MESON_ARGS= -Dcompton=false -Dunittest=true TEST_TARGET= test PLIST_FILES= bin/${PORTNAME} \ bin/${PORTNAME}-trans \ etc/xdg/autostart/${PORTNAME}.desktop \ "@sample etc/xdg/${PORTNAME}.conf.sample" \ share/applications/${PORTNAME}.desktop OPTIONS_DEFINE= CONFIG DBUS DOCS DRM OPENGL PCRE OPTIONS_DEFAULT=CONFIG DBUS OPENGL PCRE CONFIG_DESC= Configuration file parsing support CONFIG_LIB_DEPENDS= libconfig.so:devel/libconfig CONFIG_MESON_TRUE= config_file PCRE_LIB_DEPENDS= libpcre2-8.so:devel/pcre2 PCRE_MESON_TRUE= regex DRM_DESC= DRM VSync fallback (deprecated) DRM_LIB_DEPENDS= libdrm.so:graphics/libdrm DRM_MESON_TRUE= vsync_drm OPENGL_USES= gl OPENGL_USE= GL=egl,gl OPENGL_MESON_TRUE= opengl DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DBUS_MESON_TRUE= dbus DOCS_BUILD_DEPENDS= a2x:textproc/asciidoc DOCS_MESON_TRUE= with_docs DOCS_PLIST_FILES= share/man/man1/${PORTNAME}.1.gz \ share/man/man1/${PORTNAME}-trans.1.gz post-patch: @${REINPLACE_CMD} -e 's,/etc,${PREFIX}&,' \ ${WRKSRC}/man/${PORTNAME}.1.asciidoc \ ${WRKSRC}/src/config.c # Extract (snapshot) version from the port instead of meson.build @${REINPLACE_CMD} -i .nogit -e 's/git.found()/false/' \ -e "/project_version/s/=.*/= '${DISTVERSIONFULL}'/" \ ${WRKSRC}/meson.build post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.sample.conf \ ${STAGEDIR}${PREFIX}/etc/xdg/${PORTNAME}.conf.sample .include diff --git a/x11-wm/picom/files/patch-rtprio b/x11-wm/picom/files/patch-rtprio new file mode 100644 index 000000000000..e4d20a12c732 --- /dev/null +++ b/x11-wm/picom/files/patch-rtprio @@ -0,0 +1,54 @@ +https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276962 +https://github.com/yshui/picom/commit/023103c62074 +https://github.com/yshui/picom/commit/dff77aae27cf + +--- src/meson.build.orig 2024-01-28 18:17:19 UTC ++++ src/meson.build +@@ -23,7 +23,7 @@ required_packages = [ + # Some XCB packages are here because their versioning differs (see check below). + required_packages = [ + 'pixman-1', 'x11', 'x11-xcb', 'xcb-image', 'xcb-renderutil', 'xcb-util', +- 'xext' ++ 'xext', 'threads', + ] + + foreach i : required_packages +@@ -59,7 +59,7 @@ if get_option('opengl') + + if get_option('opengl') + cflags += ['-DCONFIG_OPENGL', '-DGL_GLEXT_PROTOTYPES'] +- deps += [dependency('gl', required: true), dependency('egl', required: true), dependency('threads', required:true)] ++ deps += [dependency('gl', required: true), dependency('egl', required: true)] + srcs += [ 'opengl.c' ] + endif + +--- src/picom.c.orig 2024-01-28 18:17:19 UTC ++++ src/picom.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -2557,15 +2558,16 @@ void set_rr_scheduling(void) { + + int ret; + struct sched_param param; +- +- ret = sched_getparam(0, ¶m); ++ int old_policy; ++ ret = pthread_getschedparam(pthread_self(), &old_policy, ¶m); + if (ret != 0) { + log_debug("Failed to get old scheduling priority"); + return; + } + + param.sched_priority = priority; +- ret = sched_setscheduler(0, SCHED_RR, ¶m); ++ ++ ret = pthread_setschedparam(pthread_self(), SCHED_RR, ¶m); + if (ret != 0) { + log_info("Failed to set real-time scheduling priority to %d.", priority); + return; diff --git a/x11-wm/picom/pkg-message b/x11-wm/picom/pkg-message new file mode 100644 index 000000000000..aa9a233ab840 --- /dev/null +++ b/x11-wm/picom/pkg-message @@ -0,0 +1,7 @@ +[ +{ type: install + message: <