Download raw body.
[UPDATE] New version for x11/picom v11.1
Hello everyone!
In picom upstream, they have accepted certain PRs that I made in order
to compile picom v11 on OpenBSD. All of this is being carried out in
the next and libepoxy branches.
This update has a small backport of the patches (maintaining
consistency with upstream code) and applies them to compile picom-v11.1.
Tested on my machine without problems (amdgpu, RX580, OpenGL backend).
Feedback is welcome.
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/picom/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile 24 Apr 2023 11:42:49 -0000 1.11
+++ Makefile 10 Feb 2024 22:54:54 -0000
@@ -1,19 +1,16 @@
COMMENT = lightweight compositor for X11
-GH_ACCOUNT = yshui
-GH_PROJECT = picom
-GH_TAGNAME = v10.2
-REVISION = 0
+DIST_TUPLE = github yshui picom v11.1 .
CATEGORIES = x11
# MPL 2.0
PERMIT_PACKAGE = Yes
-WANTLIB += EGL GL X11 X11-xcb c config dbus-1 ev m pcre pixman-1
-WANTLIB += xcb-composite xcb-damage xcb-glx xcb-image xcb-present
+WANTLIB += EGL GL X11 X11-xcb c config dbus-1 ev m pcre2-8 pixman-1
+WANTLIB += pthread xcb-composite xcb-damage xcb-glx xcb-image xcb-present
WANTLIB += xcb-randr xcb-render-util xcb-render xcb-shape xcb-sync
-WANTLIB += xcb-xfixes xcb-xinerama xcb
+WANTLIB += xcb-xfixes xcb-util xcb epoxy
MODULES = devel/meson
@@ -29,7 +26,7 @@ RUN_DEPENDS = x11/gtk+4,-guic \
LIB_DEPENDS = devel/libconfig \
devel/libev \
- devel/pcre \
+ devel/pcre2 \
x11/dbus
CONFIGURE_ARGS += -Dwith_docs=true \
@@ -50,3 +47,4 @@ post-install:
${PREFIX}/share/examples/picom
.include <bsd.port.mk>
+# DO NOT DELETE
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/picom/distinfo,v
retrieving revision 1.7
diff -u -p -r1.7 distinfo
--- distinfo 24 Dec 2022 16:35:26 -0000 1.7
+++ distinfo 10 Feb 2024 22:54:54 -0000
@@ -1,2 +1,2 @@
-SHA256 (picom-10.2.tar.gz) = l0FXffATbYor5IAFyiuT7cFZE1KOGbzreYU1ykaDNBw=
-SIZE (picom-10.2.tar.gz) = 287166
+SHA256 (yshui-picom-v11.1.tar.gz) = lvKjOpMGSnS1V5QtAwCirHeshT9Q77v2RmhJ/MdULsg=
+SIZE (yshui-picom-v11.1.tar.gz) = 308617
Index: patches/patch-src_backend_gl_gl_common_c
===================================================================
RCS file: patches/patch-src_backend_gl_gl_common_c
diff -N patches/patch-src_backend_gl_gl_common_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_backend_gl_gl_common_c 10 Feb 2024 22:54:54 -0000
@@ -0,0 +1,13 @@
+Index: src/backend/gl/gl_common.c
+--- src/backend/gl/gl_common.c.orig
++++ src/backend/gl/gl_common.c
+@@ -1,7 +1,7 @@
+ // SPDX-License-Identifier: MPL-2.0
+ // Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
+-#include <GL/gl.h>
+-#include <GL/glext.h>
++#include <epoxy/gl.h>
++#include <epoxy/glx.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+ #include <string.h>
Index: patches/patch-src_meson_build
===================================================================
RCS file: patches/patch-src_meson_build
diff -N patches/patch-src_meson_build
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_meson_build 10 Feb 2024 22:54:54 -0000
@@ -0,0 +1,12 @@
+Index: src/meson.build
+--- src/meson.build.orig
++++ src/meson.build
+@@ -23,7 +23,7 @@ required_xcb_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', 'epoxy'
+ ]
+
+ foreach i : required_packages
Index: patches/patch-src_picom_c
===================================================================
RCS file: patches/patch-src_picom_c
diff -N patches/patch-src_picom_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_picom_c 10 Feb 2024 22:54:54 -0000
@@ -0,0 +1,41 @@
+Index: src/picom.c
+--- src/picom.c.orig
++++ src/picom.c
+@@ -17,6 +17,7 @@
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <math.h>
++#include <pthread.h>
+ #include <sched.h>
+ #include <stddef.h>
+ #include <stdio.h>
+@@ -2557,19 +2558,24 @@ 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);
++ log_info("Failed to set real-time scheduling priority to %d. Consider "
++ "giving picom the CAP_SYS_NICE capability or equivalent "
++ "support.",
++ priority);
+ return;
+ }
++
+ log_info("Set real-time scheduling priority to %d", priority);
+ }
+
+
[UPDATE] New version for x11/picom v11.1