View | Details | Raw Unified | Return to bug 241216 | Differences between
and this patch

Collapse All | Expand All

(-)b/x11-wm/compton/Makefile (-41 / +47 lines)
Lines 1-68 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	compton
3
PORTNAME=	compton
4
PORTVERSION=	20160907
4
DISTVERSIONPREFIX=	v
5
PORTREVISION=	4
5
DISTVERSION=	7.4
6
PORTEPOCH=	1
6
CATEGORIES=	x11-wm
7
CATEGORIES=	x11-wm
7
8
8
MAINTAINER=	femc7488@gmail.com
9
MAINTAINER=	jbeich@FreeBSD.org
9
COMMENT=	Feature-rich compositing window manager for X11
10
COMMENT=	Feature-rich compositing window manager for X11
10
11
11
LICENSE=	MIT
12
LICENSE=	MIT MPL20
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
LICENSE_COMB=	multi
14
LICENSE_FILE_MIT=	${WRKSRC}/LICENSES/MIT
13
15
16
BUILD_DEPENDS=	${LOCALBASE}/include/uthash.h:devel/uthash
17
LIB_DEPENDS=	libev.so:devel/libev \
18
		libxcb-image.so:x11/xcb-util-image \
19
		libxcb-render-util.so:x11/xcb-util-renderutil
14
RUN_DEPENDS=	xprop:x11/xprop \
20
RUN_DEPENDS=	xprop:x11/xprop \
15
		xwininfo:x11/xwininfo
21
		xwininfo:x11/xwininfo
16
22
23
USES=		compiler:c11 meson localbase pkgconfig python:3.4+,run shebangfix
17
USE_GITHUB=	yes
24
USE_GITHUB=	yes
18
GH_ACCOUNT=	chjj
25
USE_XORG=	x11 xcb xext pixman
19
GH_TAGNAME=	b7f43ee
26
GH_ACCOUNT=	yshui
27
SHEBANG_FILES=	bin/compton-convgen.py
28
MESON_ARGS=	-Dunittest=true
29
TEST_TARGET=	test
20
30
21
USES=		gmake pkgconfig
31
OPTIONS_DEFINE=	CONFIG DBUS DOCS DRM OPENGL PCRE TEST
22
USE_XORG=	x11 xcomposite xdamage xext xfixes xrandr xrender
32
OPTIONS_DEFAULT=CONFIG DBUS OPENGL PCRE
23
33
24
MAKE_ARGS=	COMPTON_VERSION=git-${PORTVERSION}-${GH_TAGNAME} \
34
CONFIG_DESC=		Configuration file parsing support
25
		XDGDIR=${LOCALBASE}/etc/xdg
35
CONFIG_LIB_DEPENDS=	libconfig.so:devel/libconfig \
26
ALL_TARGET=	${PORTNAME}
36
			libxdg-basedir.so:x11/libxdg-basedir
27
37
CONFIG_MESON_TRUE=	config_file
28
OPTIONS_DEFINE=	CONFIG PCRE DRM OPENGL DBUS XINERAMA DOCS
29
OPTIONS_DEFAULT=	CONFIG PCRE DRM OPENGL DBUS XINERAMA
30
31
CONFIG_DESC=	Configuration file parsing support
32
PCRE_DESC=	Blacklist support (via libpcre)
33
DRM_DESC=	DRM VSync method support
34
OPENGL_DESC=	GLX backend, OpenGL VSync method, etc.
35
DOCS_DESC=	Build manpages (requires AsciiDoc/DocBook)
36
37
CONFIG_LIB_DEPENDS=	libconfig.so:devel/libconfig
38
CONFIG_MAKE_ARGS_OFF=	NO_LIBCONFIG=yes
39
38
40
PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
39
PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
41
PCRE_MAKE_ARGS_OFF=	NO_REGEX_PCRE=yes
40
PCRE_MESON_TRUE=	regex
42
41
42
DRM_DESC=		DRM VSync fallback (deprecated)
43
DRM_LIB_DEPENDS=	libdrm.so:graphics/libdrm
43
DRM_LIB_DEPENDS=	libdrm.so:graphics/libdrm
44
DRM_MAKE_ARGS_OFF=	NO_VSYNC_DRM=yes
44
DRM_MESON_TRUE=		vsync_drm
45
45
46
OPENGL_USE=		GL=gl
46
OPENGL_USE=		GL=gl
47
OPENGL_MAKE_ARGS_OFF=	NO_VSYNC_OPENGL=yes
47
OPENGL_MESON_TRUE=	opengl
48
48
49
DBUS_LIB_DEPENDS=	libdbus-1.so:devel/dbus
49
DBUS_LIB_DEPENDS=	libdbus-1.so:devel/dbus
50
DBUS_MAKE_ARGS_OFF=	NO_DBUS=yes
50
DBUS_MESON_TRUE=	dbus
51
52
XINERAMA_USE=		XORG=xinerama
53
XINERAMA_MAKE_ARGS_OFF=	NO_XINERAMA=yes
54
51
55
DOCS_BUILD_DEPENDS=	a2x:textproc/asciidoc \
52
DOCS_BUILD_DEPENDS=	a2x:textproc/asciidoc
56
			xsltproc:textproc/libxslt \
53
DOCS_MESON_TRUE=	build_docs
57
			docbook-xml>0:textproc/docbook-xml \
54
DOCS_PLIST_FILES=	man/man1/${PORTNAME}.1.gz \
58
			${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl
55
			man/man1/${PORTNAME}-trans.1.gz
59
DOCS_MAKE_ARGS=		DOCDIR=${DOCSDIR} MANDIR=${MANPREFIX}/man/man1
60
DOCS_ALL_TARGET=	docs
61
DOCS_PLIST_FILES=	man/man1/compton.1.gz man/man1/compton-trans.1.gz
62
DOCS_PORTDOCS=		README.md cdbus-driver.sh
63
56
64
post-patch:
57
post-patch:
65
	@${REINPLACE_CMD} -e '/config_system_dir/s|/etc|${LOCALBASE}&|' \
58
	@${REINPLACE_CMD} -e '/install_dir/s,share/man,man,' \
66
		${WRKSRC}/src/compton.c
59
		${WRKSRC}/man/meson.build
60
	@${REINPLACE_CMD} -e '/config_system_dir/s,/etc,${PREFIX}&,' \
61
		${WRKSRC}/src/config_libconfig.c
62
# Extract (snapshot) version from the port instead of meson.build
63
	@${REINPLACE_CMD} -i .nogit -e 's/git.found()/false/' \
64
		-e "/project_version/s/=.*/= '${DISTVERSIONFULL}'/" \
65
		${WRKSRC}/meson.build
66
67
post-install:
68
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg
69
	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.sample.conf \
70
		${STAGEDIR}${PREFIX}/etc/xdg/${PORTNAME}.conf.sample
71
72
pre-install-TEST-on:	do-test
67
73
68
.include <bsd.port.mk>
74
.include <bsd.port.mk>
(-)b/x11-wm/compton/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1473236624
1
TIMESTAMP = 1569024480
2
SHA256 (chjj-compton-20160907-b7f43ee_GH0.tar.gz) = b03a26effb26763a9a3cb48b2bef849719ab5597493e4d599053c93c33f7c358
2
SHA256 (yshui-compton-v7.4_GH0.tar.gz) = 1911aebb49f765586f655933ee016828e126bc7b2bb016b13c9a34a4865a8fd3
3
SIZE (chjj-compton-20160907-b7f43ee_GH0.tar.gz) = 163233
3
SIZE (yshui-compton-v7.4_GH0.tar.gz) = 218899
(-)a/x11-wm/compton/files/patch-Makefile (-47 lines)
Removed Link Here
1
--- Makefile.orig	2016-09-07 08:23:44 UTC
2
+++ Makefile
3
@@ -143,29 +143,31 @@ compton: $(OBJS)
4
 	$(CC) $(CFG) $(CPPFLAGS) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
5
 
6
 man/%.1: man/%.1.asciidoc
7
-	a2x --format manpage $<
8
+	a2x -v --format manpage $<
9
 
10
 man/%.1.html: man/%.1.asciidoc
11
 	asciidoc $<
12
 
13
 docs: $(MANPAGES) $(MANPAGES_HTML)
14
 
15
-install: $(BINS) docs
16
-	@install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(MANDIR)" "$(DESTDIR)$(APPDIR)"
17
-	@install -m755 $(BINS) "$(DESTDIR)$(BINDIR)"/
18
-ifneq "$(MANPAGES)" ""
19
-	@install -m644 $(MANPAGES) "$(DESTDIR)$(MANDIR)"/
20
-endif
21
+install: $(BINS)
22
+	@install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(APPDIR)" "$(DESTDIR)$(XDGDIR)"
23
+	install -m755 $(filter-out compton,$(BINS)) "$(DESTDIR)$(BINDIR)"/
24
+	$(BSD_INSTALL_PROGRAM) compton "$(DESTDIR)$(BINDIR)"/
25
 	@install -d \
26
 		"$(DESTDIR)$(ICODIR)/scalable/apps" \
27
 		"$(DESTDIR)$(ICODIR)/48x48/apps"
28
-	@install -m644 media/compton.svg "$(DESTDIR)$(ICODIR)/scalable/apps"/
29
-	@install -m644 media/icons/48x48/compton.png "$(DESTDIR)$(ICODIR)/48x48/apps"/
30
-	@install -m644 compton.desktop "$(DESTDIR)$(APPDIR)"/
31
+	install -m644 media/compton.svg "$(DESTDIR)$(ICODIR)/scalable/apps"/
32
+	install -m644 media/icons/48x48/compton.png "$(DESTDIR)$(ICODIR)/48x48/apps"/
33
+	install -m644 compton.desktop "$(DESTDIR)$(APPDIR)"/
34
+	install -m644 compton.sample.conf "$(DESTDIR)$(XDGDIR)"/compton.conf.sample
35
 ifneq "$(DOCDIR)" ""
36
-	@install -d "$(DESTDIR)$(DOCDIR)"
37
-	@install -m644 README.md compton.sample.conf "$(DESTDIR)$(DOCDIR)"/
38
-	@install -m755 dbus-examples/cdbus-driver.sh "$(DESTDIR)$(DOCDIR)"/
39
+	@install -d "$(DESTDIR)$(DOCDIR)" "$(DESTDIR)$(MANDIR)"
40
+ifneq "$(MANPAGES)" ""
41
+	install -m644 $(MANPAGES) "$(DESTDIR)$(MANDIR)"/
42
+endif
43
+	install -m644 README.md "$(DESTDIR)$(DOCDIR)"/
44
+	install -m755 dbus-examples/cdbus-driver.sh "$(DESTDIR)$(DOCDIR)"/
45
 endif
46
 
47
 uninstall:
(-)a/x11-wm/compton/files/patch-src_c2.h (-15 lines)
Removed Link Here
1
--- src/c2.h.orig	2016-09-07 08:23:44 UTC
2
+++ src/c2.h
3
@@ -35,10 +35,8 @@ typedef struct _c2_l c2_l_t;
4
 /// Pointer to a condition tree.
5
 typedef struct {
6
   bool isbranch : 1;
7
-  union {
8
-    c2_b_t *b;
9
-    c2_l_t *l;
10
-  };
11
+  c2_b_t *b;
12
+  c2_l_t *l;
13
 } c2_ptr_t;
14
 
15
 /// Initializer for c2_ptr_t.
(-)b/x11-wm/compton/files/patch-src_log.c (+21 lines)
Added Link Here
1
Drop after FreeBSD 11 EOL, other systems had timespec_get() for years.
2
3
../src/log.c:162:20: error: use of undeclared identifier 'TIME_UTC'
4
        timespec_get(&ts, TIME_UTC);
5
                          ^
6
log.c:(.text+0x1db): undefined reference to `timespec_get'
7
8
--- src/log.c.orig	2019-09-21 00:08:00 UTC
9
+++ src/log.c
10
@@ -159,7 +159,11 @@ attr_printf(4, 5) void log_printf(struct log *l, int l
11
 	}
12
 
13
 	struct timespec ts;
14
+#ifdef TIME_UTC
15
 	timespec_get(&ts, TIME_UTC);
16
+#else
17
+	clock_gettime(CLOCK_REALTIME, &ts);
18
+#endif
19
 	auto tm = localtime(&ts.tv_sec);
20
 	char time_buf[100];
21
 	strftime(time_buf, sizeof time_buf, "%x %T", tm);
(-)b/x11-wm/compton/files/patch-src_x.c (+14 lines)
Added Link Here
1
https://github.com/yshui/compton/pull/250
2
3
--- src/x.c.orig	2019-09-21 00:08:00 UTC
4
+++ src/x.c
5
@@ -14,7 +14,9 @@
6
 #include <xcb/xfixes.h>
7
 
8
 #include "atom.h"
9
+#ifdef CONFIG_OPENGL
10
 #include "backend/gl/glx.h"
11
+#endif
12
 #include "common.h"
13
 #include "compiler.h"
14
 #include "kernel.h"
(-)b/x11-wm/compton/files/patch-subprojects_test.h_test.h (+50 lines)
Added Link Here
1
https://github.com/yshui/test.h/pull/1
2
3
--- subprojects/test.h/test.h.orig	2019-09-21 00:08:00 UTC
4
+++ subprojects/test.h/test.h
5
@@ -8,6 +8,13 @@
6
 #include <stdlib.h>
7
 #include <string.h>
8
 
9
+#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||     \
10
+    defined(__NetBSD__) || defined(__OpenBSD__)
11
+#define USE_SYSCTL_FOR_ARGS 1
12
+#include <sys/sysctl.h>
13
+#include <unistd.h> // getpid
14
+#endif
15
+
16
 struct test_file_metadata;
17
 
18
 struct test_failure {
19
@@ -91,11 +98,31 @@ extern void __attribute__((weak)) (*test_h_unittest_se
20
 /// @param[out] tests_run if not NULL, set to whether tests were run
21
 static inline void __attribute__((constructor(102))) run_tests(void) {
22
 	bool should_run = false;
23
+#ifdef USE_SYSCTL_FOR_ARGS
24
+	int mib[] = {
25
+		CTL_KERN,
26
+#if defined(__NetBSD__) || defined(__OpenBSD__)
27
+		KERN_PROC_ARGS,
28
+		getpid(),
29
+		KERN_PROC_ARGV,
30
+#else
31
+		KERN_PROC,
32
+		KERN_PROC_ARGS,
33
+		getpid(),
34
+#endif
35
+	};
36
+	char *arg = NULL;
37
+	size_t arglen;
38
+	sysctl(mib, sizeof(mib)/sizeof(mib[0]), NULL, &arglen, NULL, 0);
39
+	arg = malloc(arglen);
40
+	sysctl(mib, sizeof(mib)/sizeof(mib[0]), arg, &arglen, NULL, 0);
41
+#else
42
 	FILE *cmdlinef = fopen("/proc/self/cmdline", "r");
43
 	char *arg = NULL;
44
 	int arglen;
45
 	fscanf(cmdlinef, "%ms%n", &arg, &arglen);
46
 	fclose(cmdlinef);
47
+#endif
48
 	for (char *pos = arg; pos < arg + arglen; pos += strlen(pos) + 1) {
49
 		if (strcmp(pos, "--unittest") == 0) {
50
 			should_run = true;
(-)b/x11-wm/compton/pkg-descr (-1 / +1 lines)
Lines 11-14 Most prominent changes from the original xcompmgr: Link Here
11
  - Blur of background of transparent windows, window color inversion
11
  - Blur of background of transparent windows, window color inversion
12
  - Configuration file support with blacklisting
12
  - Configuration file support with blacklisting
13
13
14
WWW: https://github.com/chjj/compton
14
WWW: https://github.com/yshui/compton
(-)b/x11-wm/compton/pkg-plist (+1 lines)
Lines 1-4 Link Here
1
bin/compton
1
bin/compton
2
bin/compton-convgen.py
2
bin/compton-trans
3
bin/compton-trans
3
@sample etc/xdg/compton.conf.sample
4
@sample etc/xdg/compton.conf.sample
4
share/applications/compton.desktop
5
share/applications/compton.desktop

Return to bug 241216