On 2022/11/18 14:41:23 +0000, Klemens Nanni <[email protected]> wrote:
> This seems OK to me, although I'd like to hear from someone using a
> destkop environment/whatever that makes use of /etc/xdg/autostart/
> as to whether that works and/or it conflicts with how such setups handle
> ~/.xsession.
> 
> I don't know this is supposed to work outside of a xenodm plus window
> manager setup (usually relying on ~/.xsession to start picom and such).
> 
> A new picom update simply should cause it to be started or even run
> twice... I guess if ensuring this seems to much work, we can simply not
> @sample the .desktop file and thus stick to whatever mechanism users
> have now.

you can't end up with two X11 compositor running AFAIK, when you try
to run the second one it would just complain that there's already one
running.

However, depending on when DEs run the autostarts picom may be started
before the DE' compositor and maybe even cause issues.  just
speculating.

I won't object dropping the @sample autostart, but I'd prefer to not
deviate from upstream without a good reason.  A quick look at repology
make it seems like most other repos are packaging the xdg/autostart
thingy, so maybe we should do that too.


The printf patch was merged upstream; I asked about our hack for
glEGLImageTargetTexStorageEXT too but no reply still.


ok?

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/x11/picom/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile    11 Mar 2022 20:16:55 -0000      1.7
+++ Makefile    18 Nov 2022 08:08:28 -0000
@@ -2,14 +2,14 @@ COMMENT =     lightweight compositor for X11
 
 GH_ACCOUNT =   yshui
 GH_PROJECT =   picom
-GH_TAGNAME =   v9.1
+GH_TAGNAME =   v10
 
 CATEGORIES =   x11
 
 # MPL 2.0
 PERMIT_PACKAGE =       Yes
 
-WANTLIB += GL X11 X11-xcb c config dbus-1 ev m pcre pixman-1
+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 += xcb-randr xcb-render-util xcb-render xcb-shape xcb-sync
 WANTLIB += xcb-xfixes xcb-xinerama xcb
@@ -34,6 +34,7 @@ LIB_DEPENDS =         devel/libconfig \
 CONFIGURE_ARGS +=      -Dwith_docs=true \
                        -Dunittest=true \
                        -Dcompton=false
+
 CONFIGURE_ENV  +=      CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
                        LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
 
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/x11/picom/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo    14 Feb 2022 13:04:05 -0000      1.4
+++ distinfo    17 Nov 2022 15:49:57 -0000
@@ -1,2 +1,2 @@
-SHA256 (picom-9.1.tar.gz) = hwCscb1JbJEmLIV24pyzrs8rTvSMBDlKkpUJ08s3uH0=
-SIZE (picom-9.1.tar.gz) = 263924
+SHA256 (picom-10.tar.gz) = 6EAwTDKfB5cgWWMwKJTFXhHXfPUaIsCnIINEzm/Qojg=
+SIZE (picom-10.tar.gz) = 286728
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/x11/picom/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   11 Mar 2022 20:16:55 -0000      1.3
+++ pkg/PLIST   17 Nov 2022 15:49:57 -0000
@@ -3,6 +3,7 @@ bin/picom-trans
 @man man/man1/picom-trans.1
 @man man/man1/picom.1
 share/applications/picom.desktop
+@sample ${SYSCONFDIR}/xdg/autostart/picom.desktop
 share/examples/picom/
 share/examples/picom/picom.sample.conf
 share/icons/hicolor/48x48/apps/picom.png
Index: patches/patch-meson_build
===================================================================
RCS file: patches/patch-meson_build
diff -N patches/patch-meson_build
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-meson_build   22 Nov 2022 10:16:37 -0000
@@ -0,0 +1,24 @@
+- ignore git
+- autostart file in /etc/ needs PLIST @sample
+
+Index: meson.build
+--- meson.build.orig
++++ meson.build
+@@ -7,8 +7,7 @@ cc = meson.get_compiler('c')
+ version = 'v'+meson.project_version()
+ 
+ # use git describe if that's available
+-git = find_program('git', required: false)
+-if git.found()
++if false
+       gitv = run_command('git', 'rev-parse', '--short=5', 'HEAD', check: 
false)
+       if gitv.returncode() == 0
+               version = 'vgit-'+gitv.stdout().strip()
+@@ -73,7 +72,6 @@ subdir('man')
+ 
+ install_data('bin/picom-trans', install_dir: get_option('bindir'))
+ install_data('picom.desktop', install_dir: 'share/applications')
+-install_data('picom.desktop', install_dir: get_option('sysconfdir') / 'xdg' / 
'autostart')
+ 
+ if get_option('compton')
+       install_data('compton.desktop', install_dir: 'share/applications')
Index: patches/patch-src_backend_gl_egl_c
===================================================================
RCS file: patches/patch-src_backend_gl_egl_c
diff -N patches/patch-src_backend_gl_egl_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_backend_gl_egl_c  22 Nov 2022 10:16:37 -0000
@@ -0,0 +1,42 @@
+glEGLImageTargetTexStorageEXT fails to link because its pointer should
+be retrieved via eglGetProcAddress.
+
+Index: src/backend/gl/egl.c
+--- src/backend/gl/egl.c.orig
++++ src/backend/gl/egl.c
+@@ -36,6 +36,8 @@ struct egl_data {
+       EGLContext ctx;
+ };
+ 
++static void (*imageTargetTexStorageFn)(GLenum, GLeglImageOES, const GLint *);
++
+ /**
+  * Free a glx_texture_t.
+  */
+@@ -215,6 +217,17 @@ static backend_t *egl_init(session_t *ps) {
+ 
+       success = true;
+ 
++      /* 
++       * should always succeed since if we reach this point
++       * it's ensured we have the GL_EXT_EGL_image_storage
++       * extension.
++       */
++      imageTargetTexStorageFn = 
eglGetProcAddress("glEGLImageTargetTexStorageEXT");
++      if (imageTargetTexStorageFn == NULL) {
++              log_error("don't have glEGLImageTargetTexStorageEXT!");
++              success = false;
++      }
++
+ end:
+       if (!success) {
+               egl_deinit(&gd->gl.base);
+@@ -270,7 +283,7 @@ egl_bind_pixmap(backend_t *base, xcb_pixmap_t pixmap, 
+       wd->dim = 0;
+       wd->inner->refcount = 1;
+       glBindTexture(GL_TEXTURE_2D, inner->texture);
+-      glEGLImageTargetTexStorageEXT(GL_TEXTURE_2D, eglpixmap->image, NULL);
++      imageTargetTexStorageFn(GL_TEXTURE_2D, eglpixmap->image, NULL);
+       glBindTexture(GL_TEXTURE_2D, 0);
+ 
+       gl_check_err();
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   22 Nov 2022 10:16:37 -0000
@@ -0,0 +1,16 @@
+fix uint64_t printing
+
+Index: src/picom.c
+--- src/picom.c.orig
++++ src/picom.c
+@@ -539,8 +539,8 @@ static bool initialize_backend(session_t *ps) {
+                               } else {
+                                       shader->attributes = 0;
+                               }
+-                              log_debug("Shader %s has attributes %ld", 
shader->key,
+-                                        shader->attributes);
++                              log_debug("Shader %s has attributes %"PRIu64,
++                                        shader->key, shader->attributes);
+                       }
+               }
+ 

Reply via email to