OK

On 2022/02/14 11:40, Omar Polo wrote:
> Stuart Henderson <s...@spacehopper.org> writes:
> 
> > On 2022/02/14 10:44, Omar Polo wrote:
> >> Sorry, I should have explained it better.  picom.desktop has
> >> 
> >>    Icon=picom
> >> 
> >> but the only icons in the repo are a copy of the compton logo, which
> >> doesn't even get installed to avoid a conflict with x11/compton.
> >
> > They icons are installed in the in-tree version of the port, it's just
> > that the port renames them but doesn't patch the .desktop file to
> > actually use them.
> >
> >> I personally find ugly to have menu entries without a corresponding icon
> >> and picom doesn't have any sort of gui anyway afaik; I'm also expecting
> >> all the users to run it from their .xsession.  However, this is just my
> >> preference and wont push for it if we prefer to ship the desktop file.
> >
> > With some desktop environments these can be used by symlinking into
> > .config/autostart so perhaps better to keep them and fix the icon name?
> 
> Right, I forgot about .config/autostart.  i don't want to break existing
> setups, so let's keep it and fix the icon names.
> 
> the alternative to the post-install bit is to specify -Dcompton=true
> and then patch the desktop file + remove/@comment compton.desktop
> 
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/x11/picom/Makefile,v
> retrieving revision 1.5
> diff -u -p -r1.5 Makefile
> --- Makefile  19 Feb 2021 17:16:28 -0000      1.5
> +++ Makefile  14 Feb 2022 10:38:11 -0000
> @@ -4,8 +4,7 @@ COMMENT =     lightweight compositor for X11
>  
>  GH_ACCOUNT = yshui
>  GH_PROJECT = picom
> -GH_TAGNAME = v8.2
> -REVISION =   0
> +GH_TAGNAME = v9.1
>  
>  CATEGORIES = x11
>  
> @@ -35,12 +34,19 @@ LIB_DEPENDS =             devel/libconfig \
>                       x11/dbus
>  
>  CONFIGURE_ARGS       +=      -Dwith_docs=true \
> -                     -Dunittest=true
> +                     -Dunittest=true \
> +                     -Dcompton=false
>  CONFIGURE_ENV        +=      CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
>                       LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
>  
> -pre-patch:
> -     cd ${WRKSRC}/media && mv compton.svg picom.svg
> -     cd ${WRKSRC}/media/icons/48x48 && mv compton.png picom.png
> +post-install:
> +     ${INSTALL_DATA_DIR} ${PREFIX}/share/icons/hicolor/{48x48,scalable}/apps
> +     ${INSTALL_DATA} ${WRKSRC}/media/icons/48x48/compton.png \
> +             ${PREFIX}/share/icons/hicolor/48x48/apps/picom.png
> +     ${INSTALL_DATA} ${WRKSRC}/media/compton.svg \
> +             ${PREFIX}/share/icons/hicolor/scalable/apps/picom.svg
> +     ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/picom
> +     ${INSTALL_DATA} ${WRKSRC}/picom.sample.conf \
> +             ${PREFIX}/share/examples/picom
>  
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /home/cvs/ports/x11/picom/distinfo,v
> retrieving revision 1.3
> diff -u -p -r1.3 distinfo
> --- distinfo  6 Nov 2020 19:40:34 -0000       1.3
> +++ distinfo  14 Feb 2022 09:29:13 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (picom-8.2.tar.gz) = nQwlM5helnD/F15xekK1vxoqAMzeXKweEAn11u55Euw=
> -SIZE (picom-8.2.tar.gz) = 242653
> +SHA256 (picom-9.1.tar.gz) = hwCscb1JbJEmLIV24pyzrs8rTvSMBDlKkpUJ08s3uH0=
> +SIZE (picom-9.1.tar.gz) = 263924
> Index: patches/patch-man_meson_build
> ===================================================================
> RCS file: patches/patch-man_meson_build
> diff -N patches/patch-man_meson_build
> --- patches/patch-man_meson_build     27 Jul 2020 08:52:44 -0000      1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,13 +0,0 @@
> -$OpenBSD: patch-man_meson_build,v 1.1.1.1 2020/07/27 08:52:44 kirby Exp $
> -
> -Index: man/meson.build
> ---- man/meson.build.orig
> -+++ man/meson.build
> -@@ -7,6 +7,6 @@ if get_option('with_docs')
> -                                     'picom-version='+version,
> -                                     '--format', 'manpage', '@INPUT@', '-D',
> -                                     meson.current_build_dir()],
> --                          install: true, install_dir: 'share/man/man1/')
> -+                          install: true, install_dir: 'man/man1/')
> -     endforeach
> - endif
> Index: patches/patch-meson_build
> ===================================================================
> RCS file: patches/patch-meson_build
> diff -N patches/patch-meson_build
> --- patches/patch-meson_build 27 Jul 2020 08:52:44 -0000      1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,21 +0,0 @@
> -$OpenBSD: patch-meson_build,v 1.1.1.1 2020/07/27 08:52:44 kirby Exp $
> -
> -Don't install files that could conflict with x11/compton
> -
> -Index: meson.build
> ---- meson.build.orig
> -+++ meson.build
> -@@ -70,11 +70,10 @@ subdir('src')
> - subdir('man')
> - 
> - install_data('bin/picom-trans', install_dir: get_option('bindir'))
> --install_data('compton.desktop', install_dir: 'share/applications')
> - install_data('picom.desktop', install_dir: 'share/applications')
> --install_data('media/icons/48x48/compton.png',
> -+install_data('media/icons/48x48/picom.png',
> -              install_dir: 'share/icons/hicolor/48x48/apps')
> --install_data('media/compton.svg',
> -+install_data('media/picom.svg',
> -              install_dir: 'share/icons/hicolor/scalable/apps')
> - 
> - meson.add_install_script('meson/install.sh')
> Index: patches/patch-meson_install_sh
> ===================================================================
> RCS file: patches/patch-meson_install_sh
> diff -N patches/patch-meson_install_sh
> --- patches/patch-meson_install_sh    27 Jul 2020 08:52:44 -0000      1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,19 +0,0 @@
> -$OpenBSD: patch-meson_install_sh,v 1.1.1.1 2020/07/27 08:52:44 kirby Exp $
> -
> -Don't install files that could conflict with x11/compton
> -
> -Index: meson/install.sh
> ---- meson/install.sh.orig
> -+++ meson/install.sh
> -@@ -1,11 +1 @@
> - #!/bin/sh
> --
> --if [ ! -e "${MESON_INSTALL_DESTDIR_PREFIX}/bin/compton" ]; then
> --    echo "Linking picom to ${MESON_INSTALL_DESTDIR_PREFIX}/bin/compton"
> --    ln -s picom "${MESON_INSTALL_DESTDIR_PREFIX}/bin/compton"
> --fi
> --
> --if [ ! -e "${MESON_INSTALL_DESTDIR_PREFIX}/bin/compton-trans" ]; then
> --    echo "Linking picom-trans to 
> ${MESON_INSTALL_DESTDIR_PREFIX}/bin/compton-trans"
> --    ln -s picom-trans "${MESON_INSTALL_DESTDIR_PREFIX}/bin/compton-trans"
> --fi
> Index: patches/patch-src_meson_build
> ===================================================================
> RCS file: patches/patch-src_meson_build
> diff -N patches/patch-src_meson_build
> --- patches/patch-src_meson_build     27 Jul 2020 08:52:44 -0000      1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,16 +0,0 @@
> -$OpenBSD: patch-src_meson_build,v 1.1.1.1 2020/07/27 08:52:44 kirby Exp $
> -
> -Index: src/meson.build
> ---- src/meson.build.orig
> -+++ src/meson.build
> -@@ -81,8 +81,8 @@ endif
> - host_system = host_machine.system()
> - if host_system == 'linux'
> -     cflags += ['-DHAS_INOTIFY']
> --elif host_system == 'freebsd' or host_system == 'netbsd' or
> --     host_system == 'dragonfly' or host_system == 'openbsd'
> -+elif (host_system == 'freebsd' or host_system == 'netbsd' or
> -+      host_system == 'dragonfly' or host_system == 'openbsd')
> -     cflags += ['-DHAS_KQUEUE']
> - endif
> - 
> Index: patches/patch-src_picom_c
> ===================================================================
> RCS file: patches/patch-src_picom_c
> diff -N patches/patch-src_picom_c
> --- patches/patch-src_picom_c 6 Nov 2020 19:40:34 -0000       1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,14 +0,0 @@
> -$OpenBSD: patch-src_picom_c,v 1.1 2020/11/06 19:40:34 jasper Exp $
> -
> -Index: src/picom.c
> ---- src/picom.c.orig
> -+++ src/picom.c
> -@@ -99,7 +99,7 @@ const char *const BACKEND_STRS[] = {[BKEND_XRENDER] = 
> - session_t *ps_g = NULL;
> - 
> - void set_root_flags(session_t *ps, uint64_t flags) {
> --    log_debug("Setting root flags: %lu", flags);
> -+    log_debug("Setting root flags: %llu", flags);
> -     ps->root_flags |= flags;
> -     ps->pending_updates = true;
> - }
> Index: patches/patch-src_win_c
> ===================================================================
> RCS file: patches/patch-src_win_c
> diff -N patches/patch-src_win_c
> --- patches/patch-src_win_c   6 Nov 2020 19:40:34 -0000       1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,23 +0,0 @@
> -$OpenBSD: patch-src_win_c,v 1.1 2020/11/06 19:40:34 jasper Exp $
> -
> -Index: src/win.c
> ---- src/win.c.orig
> -+++ src/win.c
> -@@ -2343,7 +2343,7 @@ win_is_fullscreen_xcb(xcb_connection_t *c, const struc
> - 
> - /// Set flags on a window. Some sanity checks are performed
> - void win_set_flags(struct managed_win *w, uint64_t flags) {
> --    log_debug("Set flags %lu to window %#010x (%s)", flags, w->base.id, 
> w->name);
> -+    log_debug("Set flags %llu to window %#010x (%s)", flags, w->base.id, 
> w->name);
> -     if (unlikely(w->state == WSTATE_DESTROYING)) {
> -             log_error("Flags set on a destroyed window %#010x (%s)", 
> w->base.id, w->name);
> -             return;
> -@@ -2354,7 +2354,7 @@ void win_set_flags(struct managed_win *w, uint64_t fla
> - 
> - /// Clear flags on a window. Some sanity checks are performed
> - void win_clear_flags(struct managed_win *w, uint64_t flags) {
> --    log_debug("Clear flags %lu from window %#010x (%s)", flags, w->base.id, 
> w->name);
> -+    log_debug("Clear flags %llu from window %#010x (%s)", flags, 
> w->base.id, w->name);
> -     if (unlikely(w->state == WSTATE_DESTROYING)) {
> -             log_warn("Flags cleared on a destroyed window %#010x (%s)", 
> w->base.id,
> -                      w->name);
> Index: pkg/PLIST
> ===================================================================
> RCS file: /home/cvs/ports/x11/picom/pkg/PLIST,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 PLIST
> --- pkg/PLIST 27 Jul 2020 08:52:44 -0000      1.1.1.1
> +++ pkg/PLIST 14 Feb 2022 10:38:59 -0000
> @@ -4,6 +4,8 @@ bin/picom-trans
>  @man man/man1/picom-trans.1
>  @man man/man1/picom.1
>  share/applications/picom.desktop
> +share/examples/picom/
> +share/examples/picom/picom.sample.conf
>  share/icons/hicolor/48x48/apps/picom.png
>  share/icons/hicolor/scalable/apps/picom.svg
>  @tag update-desktop-database

Reply via email to