x11: Add picom. Replaces compton.
A lightweight compositor for X11 (previously a compton fork)
This commit is contained in:
parent
30cee1254c
commit
6c7bdd23f6
15 changed files with 121 additions and 197 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.867 2019/11/26 09:07:16 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.868 2019/12/15 14:05:47 nia Exp $
|
||||
#
|
||||
|
||||
COMMENT= Packages to support the X window system
|
||||
|
@ -28,7 +28,6 @@ SUBDIR+= clipit
|
|||
SUBDIR+= clisp-gtk2
|
||||
SUBDIR+= clisp-mit-clx
|
||||
SUBDIR+= clisp-new-clx
|
||||
SUBDIR+= compton
|
||||
SUBDIR+= deforaos-integration
|
||||
SUBDIR+= deforaos-keyboard
|
||||
SUBDIR+= deforaos-libdesktop
|
||||
|
@ -306,6 +305,7 @@ SUBDIR+= p5-Wx
|
|||
SUBDIR+= p5-Wx-Perl-ProcessStream
|
||||
SUBDIR+= p5-X11-Protocol
|
||||
SUBDIR+= p5-gtk2
|
||||
SUBDIR+= picom
|
||||
SUBDIR+= pixman
|
||||
SUBDIR+= plasma-framework
|
||||
SUBDIR+= py-Pmw
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
Compton is a compositor for X, and a fork of xcompmgr-dana.
|
||||
|
||||
Changes from xcompmgr:
|
||||
|
||||
OpenGL backend (--backend glx), in addition to the old X Render backend.
|
||||
Inactive window transparency (-i) / dimming (--inactive-dim).
|
||||
Titlebar/frame transparency (-e).
|
||||
Menu transparency (-m, thanks to Dana).
|
||||
shadows are now enabled for argb windows, e.g. terminals with transparency
|
||||
removed serverside shadows (and simple compositing) to clean the code,
|
||||
the only option that remains is clientside shadows
|
||||
configuration files (see the man page for more details)
|
||||
colored shadows (--shadow-[red/green/blue])
|
||||
a new fade system
|
||||
VSync support (not always working)
|
||||
Blur of background of transparent windows, window color inversion (bad in
|
||||
performance)
|
||||
Some more options...
|
|
@ -1,11 +0,0 @@
|
|||
$NetBSD: distinfo,v 1.8 2019/11/20 23:04:23 tnn Exp $
|
||||
|
||||
SHA1 (compton-7.3.tar.gz) = c899bb76dd5e2eecce3e99ea5386e07f52448491
|
||||
RMD160 (compton-7.3.tar.gz) = c8c0a608e2327f2fda773ee18f1e629150fb1555
|
||||
SHA512 (compton-7.3.tar.gz) = 5a8fd294a8f39fd926029e872f0c8c998ccc105cb408b058539659f74446ea94862fb6b8d88b370576c73d8b18d846a12d9c0240348c6b758eec4e8550945aac
|
||||
Size (compton-7.3.tar.gz) = 218892 bytes
|
||||
SHA1 (patch-man_meson.build) = c00a05f1e5a609fc768a7cb7a29737c690ab4250
|
||||
SHA1 (patch-meson.build) = c39a4e0da8b7e6e5d3af38ea005e7915cd5e10ab
|
||||
SHA1 (patch-src_backend_gl_gl__common.c) = e702435b89018fd59d5a48f336c6cfdae644dca6
|
||||
SHA1 (patch-src_compiler.h) = 0b853c6d864a3e5ad78e1b494725aa5b19d331b8
|
||||
SHA1 (patch-src_utils.h) = 386a7fea89e12b966b9ac38df428b689ad2b63f3
|
|
@ -1,31 +0,0 @@
|
|||
# $NetBSD: options.mk,v 1.2 2019/10/21 15:56:53 pho Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.compton
|
||||
PKG_SUPPORTED_OPTIONS= dbus libdrm opengl pcre
|
||||
PKG_SUGGESTED_OPTIONS= dbus libdrm opengl pcre
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mdbus)
|
||||
.include "../../sysutils/dbus/buildlink3.mk"
|
||||
.else
|
||||
MESON_ARGS+= -Ddbus=false
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mlibdrm)
|
||||
.include "../../x11/libdrm/buildlink3.mk"
|
||||
.else
|
||||
MESON_ARGS+= -Dvsync_drm=false
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mopengl)
|
||||
.include "../../graphics/MesaLib/buildlink3.mk"
|
||||
.else
|
||||
MESON_ARGS+= -Dopengl=false
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mpcre)
|
||||
.include "../../devel/pcre/buildlink3.mk"
|
||||
.else
|
||||
MESON_ARGS+= -Dregex=false
|
||||
.endif
|
|
@ -1,21 +0,0 @@
|
|||
$NetBSD: patch-man_meson.build,v 1.1 2019/10/21 15:56:53 pho Exp $
|
||||
|
||||
Don't hardcode the man path.
|
||||
|
||||
--- man/meson.build.orig 2019-08-18 21:40:33.000000000 +0000
|
||||
+++ man/meson.build
|
||||
@@ -1,12 +1,13 @@
|
||||
mans = ['compton.1', 'compton-trans.1']
|
||||
if get_option('build_docs')
|
||||
a2x = find_program('a2x')
|
||||
+ mandir = get_option('mandir')
|
||||
foreach m : mans
|
||||
custom_target(m, output: [m], input: [m+'.asciidoc'],
|
||||
command: [a2x, '-a',
|
||||
'compton-version='+version,
|
||||
'--format', 'manpage', '@INPUT@', '-D',
|
||||
meson.current_build_dir()],
|
||||
- install: true, install_dir: 'share/man/man1/')
|
||||
+ install: true, install_dir: mandir+'/man1')
|
||||
endforeach
|
||||
endif
|
|
@ -1,17 +0,0 @@
|
|||
$NetBSD: patch-meson.build,v 1.1 2019/09/17 11:43:29 tnn Exp $
|
||||
|
||||
Use libc popcountl if present.
|
||||
|
||||
--- meson.build.orig 2019-08-18 21:40:33.000000000 +0000
|
||||
+++ meson.build
|
||||
@@ -53,6 +53,10 @@ if cc.has_header('stdc-predef.h')
|
||||
add_global_arguments('-DHAS_STDC_PREDEF_H', language: 'c')
|
||||
endif
|
||||
|
||||
+if cc.has_function('popcountl', prefix : '#include <strings.h>')
|
||||
+ add_global_arguments('-DHAS_POPCOUNTL', language: 'c')
|
||||
+endif
|
||||
+
|
||||
warns = [ 'all', 'extra', 'no-unused-parameter', 'nonnull', 'shadow', 'no-type-limits',
|
||||
'implicit-fallthrough', 'no-unknown-warning-option', 'no-missing-braces', 'conversion' ]
|
||||
foreach w : warns
|
|
@ -1,42 +0,0 @@
|
|||
$NetBSD: patch-src_backend_gl_gl__common.c,v 1.1 2019/11/20 23:04:23 tnn Exp $
|
||||
|
||||
Parentheses are required around macro argument containing braced initializer
|
||||
list.
|
||||
memcpy(3) is a macro when using e.g. -D_FORTIFY_SOURCE=2.
|
||||
|
||||
--- src/backend/gl/gl_common.c.orig 2019-08-18 21:40:33.000000000 +0000
|
||||
+++ src/backend/gl/gl_common.c
|
||||
@@ -316,7 +316,7 @@ static void x_rect_to_coords(int nrects,
|
||||
// ri, rx, ry, rxe, rye, rdx, rdy, rdxe, rdye);
|
||||
|
||||
memcpy(&coord[i * 16],
|
||||
- (GLint[][2]){
|
||||
+ ((GLint[][2]){
|
||||
{vx1, vy1},
|
||||
{texture_x1, texture_y1},
|
||||
{vx2, vy1},
|
||||
@@ -325,11 +325,11 @@ static void x_rect_to_coords(int nrects,
|
||||
{texture_x2, texture_y2},
|
||||
{vx1, vy2},
|
||||
{texture_x1, texture_y2},
|
||||
- },
|
||||
+ }),
|
||||
sizeof(GLint[2]) * 8);
|
||||
|
||||
GLuint u = (GLuint)(i * 4);
|
||||
- memcpy(&indices[i * 6], (GLuint[]){u + 0, u + 1, u + 2, u + 2, u + 3, u + 0},
|
||||
+ memcpy(&indices[i * 6], ((GLuint[]){u + 0, u + 1, u + 2, u + 2, u + 3, u + 0}),
|
||||
sizeof(GLuint) * 6);
|
||||
}
|
||||
}
|
||||
@@ -673,8 +673,8 @@ _gl_fill(backend_t *base, struct color c
|
||||
GLint y1 = y_inverted ? height - rect[i].y2 : rect[i].y1,
|
||||
y2 = y_inverted ? height - rect[i].y1 : rect[i].y2;
|
||||
memcpy(&coord[i * 8],
|
||||
- (GLint[][2]){
|
||||
- {rect[i].x1, y1}, {rect[i].x2, y1}, {rect[i].x2, y2}, {rect[i].x1, y2}},
|
||||
+ ((GLint[][2]){
|
||||
+ {rect[i].x1, y1}, {rect[i].x2, y1}, {rect[i].x2, y2}, {rect[i].x1, y2}}),
|
||||
sizeof(GLint[2]) * 4);
|
||||
indices[i * 6 + 0] = (GLuint)i * 4 + 0;
|
||||
indices[i * 6 + 1] = (GLuint)i * 4 + 1;
|
|
@ -1,24 +0,0 @@
|
|||
$NetBSD: patch-src_compiler.h,v 1.2 2019/09/17 11:43:29 tnn Exp $
|
||||
|
||||
Fix build for NetBSD
|
||||
|
||||
--- src/compiler.h.orig 2019-08-18 21:40:33.000000000 +0000
|
||||
+++ src/compiler.h
|
||||
@@ -94,6 +94,7 @@
|
||||
# define unreachable do {} while(0)
|
||||
#endif
|
||||
|
||||
+#ifndef __NetBSD__
|
||||
#ifndef __STDC_NO_THREADS__
|
||||
# include <threads.h>
|
||||
#elif __STDC_VERSION__ >= 201112L
|
||||
@@ -103,6 +104,9 @@
|
||||
#else
|
||||
# define thread_local _Pragma("GCC error \"No thread local storage support\"") __error__
|
||||
#endif
|
||||
+#else
|
||||
+# define thread_local __thread
|
||||
+#endif
|
||||
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned int uint;
|
1
x11/picom/DESCR
Normal file
1
x11/picom/DESCR
Normal file
|
@ -0,0 +1 @@
|
|||
A lightweight compositor for X11 (previously a compton fork)
|
|
@ -1,46 +1,44 @@
|
|||
# $NetBSD: Makefile,v 1.11 2019/10/21 15:56:53 pho Exp $
|
||||
# $NetBSD: Makefile,v 1.1 2019/12/15 14:05:47 nia Exp $
|
||||
|
||||
DISTNAME= compton-7.3
|
||||
PKGREVISION= 1
|
||||
CATEGORIES= x11 wm
|
||||
DISTNAME= picom-7.5
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=yshui/}
|
||||
GITHUB_TAG= v${PKGVERSION_NOREV}
|
||||
|
||||
MAINTAINER= nia@NetBSD.org
|
||||
HOMEPAGE= https://github.com/yshui/compton
|
||||
COMMENT= Configurable compositing manager for X11
|
||||
LICENSE= mit AND mpl-2.0
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= https://github.com/yshui/picom
|
||||
COMMENT= Lightweight compositor for X11 (fork of Compton)
|
||||
LICENSE= mpl-2.0 AND mit
|
||||
|
||||
BUILD_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc
|
||||
|
||||
REPLACE_PYTHON= bin/compton-convgen.py
|
||||
EXTRACT_USING= bsdtar
|
||||
USE_TOOLS+= pkg-config
|
||||
USE_LANGUAGES= c c++
|
||||
|
||||
CONFLICTS+= compton-[0-9]*
|
||||
SUPERSEDES+= compton-[0-9]*
|
||||
|
||||
TOOL_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc
|
||||
|
||||
MESON_ARGS+= -Dbuild_docs=true
|
||||
|
||||
# Needs a patch to meson_options.txt and meson.build. Probably not worth it.
|
||||
#MAKE_FLAGS+= COMPTON_VERSION=${PKGVERSION}
|
||||
|
||||
# compton uses __auto_type which is only available as of GCC 4.9.
|
||||
GCC_REQD+= 4.9
|
||||
|
||||
INSTALLATION_DIRS+= share/examples/compton
|
||||
REPLACE_PYTHON+= bin/compton-convgen.py
|
||||
REPLACE_SH+= bin/picom-trans
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/compton.sample.conf \
|
||||
${DESTDIR}${PREFIX}/share/examples/compton
|
||||
${MV} ${DESTDIR}${PREFIX}/share/man ${DESTDIR}${PREFIX}/${PKGMANDIR} || ${TRUE}
|
||||
|
||||
.include "options.mk"
|
||||
.include "../../devel/meson/build.mk"
|
||||
.include "../../devel/libconfig/buildlink3.mk"
|
||||
.include "../../devel/libev/buildlink3.mk"
|
||||
.include "../../devel/pcre/buildlink3.mk"
|
||||
.include "../../devel/uthash/buildlink3.mk"
|
||||
.include "../../graphics/MesaLib/buildlink3.mk"
|
||||
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
|
||||
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
|
||||
.include "../../x11/libxcb/buildlink3.mk"
|
||||
.include "../../x11/libXext/buildlink3.mk"
|
||||
.include "../../x11/libX11/buildlink3.mk"
|
||||
.include "../../x11/libxdg-basedir/buildlink3.mk"
|
||||
.include "../../x11/libX11/buildlink3.mk"
|
||||
.include "../../x11/libXext/buildlink3.mk"
|
||||
.include "../../x11/pixman/buildlink3.mk"
|
||||
.include "../../x11/xcb-util-image/buildlink3.mk"
|
||||
.include "../../x11/xcb-util-renderutil/buildlink3.mk"
|
|
@ -1,10 +1,12 @@
|
|||
@comment $NetBSD: PLIST,v 1.3 2019/10/21 15:56:53 pho Exp $
|
||||
@comment $NetBSD: PLIST,v 1.1 2019/12/15 14:05:47 nia Exp $
|
||||
bin/compton
|
||||
bin/compton-convgen.py
|
||||
bin/compton-trans
|
||||
man/man1/compton-trans.1
|
||||
man/man1/compton.1
|
||||
bin/picom
|
||||
bin/picom-trans
|
||||
man/man1/picom-trans.1
|
||||
man/man1/picom.1
|
||||
share/applications/compton.desktop
|
||||
share/examples/compton/compton.sample.conf
|
||||
share/applications/picom.desktop
|
||||
share/icons/hicolor/48x48/apps/compton.png
|
||||
share/icons/hicolor/scalable/apps/compton.svg
|
8
x11/picom/distinfo
Normal file
8
x11/picom/distinfo
Normal file
|
@ -0,0 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.1 2019/12/15 14:05:47 nia Exp $
|
||||
|
||||
SHA1 (picom-7.5.tar.gz) = 60f3700cb4c728e801caf6981a7bcdfcee0fa45e
|
||||
RMD160 (picom-7.5.tar.gz) = e1c889539b6d414c5a7f45b48abc7bd8a6a4ddef
|
||||
SHA512 (picom-7.5.tar.gz) = 6535e5eab1a243bbee62448bc48830b7ea3566f94b2c45d9ca76fd8b8056e1f00e55f0e4b58110364d2c4f56652cc005622d644c1db1db41d2811ecc19e6d44a
|
||||
Size (picom-7.5.tar.gz) = 219456 bytes
|
||||
SHA1 (patch-src_backend_gl_gl__common.c) = 6b42dc1a4dd061046d23d123ccc4df4dea2ab48f
|
||||
SHA1 (patch-src_utils.h) = 31f422592b5f9d232d26f437808b64dc2fb4c0f2
|
21
x11/picom/options.mk
Normal file
21
x11/picom/options.mk
Normal file
|
@ -0,0 +1,21 @@
|
|||
# $NetBSD: options.mk,v 1.1 2019/12/15 14:05:47 nia Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.picom
|
||||
PKG_SUPPORTED_OPTIONS= dbus opengl
|
||||
PKG_SUGGESTED_OPTIONS= dbus opengl
|
||||
#PKG_SUGGESTED_OPTIONS= dbus
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mdbus)
|
||||
MESON_ARGS+= -Ddbus=true
|
||||
. include "../../sysutils/dbus/buildlink3.mk"
|
||||
.else
|
||||
MESON_ARGS+= -Ddbus=false
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mopengl)
|
||||
MESON_ARGS+= -Dopengl=true
|
||||
.else
|
||||
MESON_ARGS+= -Dopengl=false
|
||||
.endif
|
58
x11/picom/patches/patch-src_backend_gl_gl__common.c
Normal file
58
x11/picom/patches/patch-src_backend_gl_gl__common.c
Normal file
|
@ -0,0 +1,58 @@
|
|||
$NetBSD: patch-src_backend_gl_gl__common.c,v 1.1 2019/12/15 14:05:47 nia Exp $
|
||||
|
||||
error: macro "memcpy" passed 19 arguments, but takes just 3
|
||||
|
||||
--- src/backend/gl/gl_common.c.orig 2019-11-18 21:59:30.000000000 +0000
|
||||
+++ src/backend/gl/gl_common.c
|
||||
@@ -315,22 +315,23 @@ static void x_rect_to_coords(int nrects,
|
||||
// log_trace("Rect %d: %f, %f, %f, %f -> %d, %d, %d, %d",
|
||||
// ri, rx, ry, rxe, rye, rdx, rdy, rdxe, rdye);
|
||||
|
||||
- memcpy(&coord[i * 16],
|
||||
- (GLint[][2]){
|
||||
- {vx1, vy1},
|
||||
- {texture_x1, texture_y1},
|
||||
- {vx2, vy1},
|
||||
- {texture_x2, texture_y1},
|
||||
- {vx2, vy2},
|
||||
- {texture_x2, texture_y2},
|
||||
- {vx1, vy2},
|
||||
- {texture_x1, texture_y2},
|
||||
- },
|
||||
- sizeof(GLint[2]) * 8);
|
||||
+ GLint temp1[8][2] = {
|
||||
+ {vx1, vy1},
|
||||
+ {texture_x1, texture_y1},
|
||||
+ {vx2, vy1},
|
||||
+ {texture_x2, texture_y1},
|
||||
+ {vx2, vy2},
|
||||
+ {texture_x2, texture_y2},
|
||||
+ {vx1, vy2},
|
||||
+ {texture_x1, texture_y2},
|
||||
+ };
|
||||
+
|
||||
+ memcpy(&coord[i * 16], temp1, sizeof(GLint[2]) * 8);
|
||||
|
||||
GLuint u = (GLuint)(i * 4);
|
||||
- memcpy(&indices[i * 6], (GLuint[]){u + 0, u + 1, u + 2, u + 2, u + 3, u + 0},
|
||||
- sizeof(GLuint) * 6);
|
||||
+ GLuint temp2[] = {u + 0, u + 1, u + 2, u + 2, u + 3, u + 0};
|
||||
+
|
||||
+ memcpy(&indices[i * 6], temp2, sizeof(GLuint) * 6);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -672,10 +673,9 @@ _gl_fill(backend_t *base, struct color c
|
||||
for (int i = 0; i < nrects; i++) {
|
||||
GLint y1 = y_inverted ? height - rect[i].y2 : rect[i].y1,
|
||||
y2 = y_inverted ? height - rect[i].y1 : rect[i].y2;
|
||||
- memcpy(&coord[i * 8],
|
||||
- (GLint[][2]){
|
||||
- {rect[i].x1, y1}, {rect[i].x2, y1}, {rect[i].x2, y2}, {rect[i].x1, y2}},
|
||||
- sizeof(GLint[2]) * 4);
|
||||
+ GLint temp1[4][2] = {
|
||||
+ {rect[i].x1, y1}, {rect[i].x2, y1}, {rect[i].x2, y2}, {rect[i].x1, y2}};
|
||||
+ memcpy(&coord[i * 8], temp1, sizeof(GLint[2]) * 4);
|
||||
indices[i * 6 + 0] = (GLuint)i * 4 + 0;
|
||||
indices[i * 6 + 1] = (GLuint)i * 4 + 1;
|
||||
indices[i * 6 + 2] = (GLuint)i * 4 + 2;
|
|
@ -1,14 +1,14 @@
|
|||
$NetBSD: patch-src_utils.h,v 1.1 2019/09/17 11:43:29 tnn Exp $
|
||||
$NetBSD: patch-src_utils.h,v 1.1 2019/12/15 14:05:47 nia Exp $
|
||||
|
||||
Use libc popcountl if present.
|
||||
Conflicting type definition with libc popcountl
|
||||
|
||||
--- src/utils.h.orig 2019-08-18 21:40:33.000000000 +0000
|
||||
--- src/utils.h.orig 2019-11-18 21:59:30.000000000 +0000
|
||||
+++ src/utils.h
|
||||
@@ -114,9 +114,11 @@ static inline int attr_const normalize_i
|
||||
/// clamp `val` into interval [min, max]
|
||||
#define clamp(val, min, max) max2(min2(val, max), min)
|
||||
|
||||
+#ifndef HAS_POPCOUNTL
|
||||
+#ifndef __NetBSD__
|
||||
static inline int attr_const popcountl(unsigned long a) {
|
||||
return __builtin_popcountl(a);
|
||||
}
|
Loading…
Reference in a new issue