1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

Add compton, a compositor for X11, which was forked from Dana Jansens' fork

of xcompmgr, and then heavily refactored.

WWW: https://github.com/chjj/compton

PR:		ports/176480 (substantially modified)
Submitted by:	Chi-Hung Chang
This commit is contained in:
Alexey Dokuchaev 2013-06-25 16:22:46 +00:00
parent 9521c502ad
commit 066591fe13
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=321749
7 changed files with 155 additions and 0 deletions

View File

@ -25,6 +25,7 @@
SUBDIR += compiz-plugins-unsupported
SUBDIR += compizconfig-backend-gconf
SUBDIR += compizconfig-python
SUBDIR += compton
SUBDIR += ctwm
SUBDIR += devilspie
SUBDIR += dwm

82
x11-wm/compton/Makefile Normal file
View File

@ -0,0 +1,82 @@
# $FreeBSD$
PORTNAME= compton
PORTVERSION= 20130619
CATEGORIES= x11-wm
MAINTAINER= femc7488@gmail.com
COMMENT= Feature-rich compositing window manager for X11
LICENSE= MIT
LIB_DEPENDS= config:${PORTSDIR}/devel/libconfig
RUN_DEPENDS= xprop:${PORTSDIR}/x11/xprop \
xwininfo:${PORTSDIR}/x11/xwininfo
USE_GITHUB= yes
GH_ACCOUNT= chjj
GH_TAGNAME= ${GH_COMMIT}
GH_COMMIT= c02b3fa
USE_XORG= xcomposite xdamage xrandr xrender
USE_GMAKE= yes
USES= pkgconfig
MAKE_ARGS= COMPTON_VERSION=git-${PORTVERSION}-${GH_COMMIT} \
XDGDIR=${LOCALBASE}/etc/xdg
ALL_TARGET= ${PORTNAME}
OPTIONS_DEFINE= PCRE DRM OPENGL DBUS DOCS
OPTIONS_DEFAULT= PCRE DRM OPENGL
PCRE_DESC= Blacklist support (via libpcre)
DRM_DESC= DRM support
DOCS_DESC= Build manpages (requires AsciiDoc/DocBook)
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPCRE}
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
.else
MAKE_ARGS+= NO_REGEX_PCRE=yes
.endif
.if ${PORT_OPTIONS:MDRM}
LIB_DEPENDS+= drm:${PORTSDIR}/graphics/libdrm
.else
MAKE_ARGS+= NO_VSYNC_DRM=yes
.endif
.if ${PORT_OPTIONS:MOPENGL}
USE_GL= gl
.else
MAKE_ARGS+= NO_VSYNC_OPENGL=yes
.endif
.if ${PORT_OPTIONS:MDBUS}
LIB_DEPENDS+= dbus-1:${PORTSDIR}/devel/dbus
.else
MAKE_ARGS+= NO_DBUS=yes
.endif
.if ${PORT_OPTIONS:MDOCS}
BUILD_DEPENDS= a2x:${PORTSDIR}/textproc/asciidoc \
xsltproc:${PORTSDIR}/textproc/libxslt \
${LOCALBASE}/share/xml/docbook/4.5/docbookx.dtd:${PORTSDIR}/textproc/docbook-xml-450 \
${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
ALL_TARGET+= docs
MAKE_ARGS+= DOCDIR=${DOCSDIR} MANDIR=${MANPREFIX}/man/man1
MAN1= compton.1 compton-trans.1
PORTDOCS= README.md cdbus-driver.sh
.endif
post-patch:
# Adjust the location of configuration file
@${REINPLACE_CMD} -e '/config_system_dir/s|/etc|${LOCALBASE}/etc|' \
${WRKSRC}/src/compton.c
# Replace OpenGL 3.2+ glFramebufferTexture() with glFramebufferTexture2D()
@${REINPLACE_CMD} -e \
'/glFramebufferTexture/s|tex_scr2|GL_TEXTURE_2D, &| ; \
s|glFramebufferTexture|&2D|' ${WRKSRC}/src/opengl.c
.include <bsd.port.mk>

2
x11-wm/compton/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (compton-20130619.tar.gz) = 241d5653952d697d5a7752601e15690a824f5ee6a391739eccdd3a7b836f23ea
SIZE (compton-20130619.tar.gz) = 138921

View File

@ -0,0 +1,35 @@
--- Makefile.orig 2013-05-21 09:26:18.000000000 +0800
+++ Makefile 2013-06-25 20:53:32.000000000 +0800
@@ -112,22 +112,23 @@
$(CC) $(CFG) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
man/%.1: man/%.1.asciidoc
- a2x --format manpage $<
+ a2x -v --format manpage $<
man/%.1.html: man/%.1.asciidoc
asciidoc $<
docs: $(MANPAGES) $(MANPAGES_HTML)
-install: $(BINS) docs
- @install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(MANDIR)" "$(DESTDIR)$(APPDIR)"
- @install -m755 $(BINS) "$(DESTDIR)$(BINDIR)"/
- @install -m644 $(MANPAGES) "$(DESTDIR)$(MANDIR)"/
- @install -m644 compton.desktop "$(DESTDIR)$(APPDIR)"/
+install: $(BINS)
+ @install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(APPDIR)" "$(DESTDIR)$(XDGDIR)"
+ install -m755 $(BINS) "$(DESTDIR)$(BINDIR)"/
+ install -m644 compton.desktop "$(DESTDIR)$(APPDIR)"/
+ install -m644 compton.sample.conf "$(DESTDIR)$(XDGDIR)"/
ifneq "$(DOCDIR)" ""
- @install -d "$(DESTDIR)$(DOCDIR)"
- @install -m644 README.md compton.sample.conf "$(DESTDIR)$(DOCDIR)"/
- @install -m755 dbus-examples/cdbus-driver.sh "$(DESTDIR)$(DOCDIR)"/
+ @install -d "$(DESTDIR)$(DOCDIR)" "$(DESTDIR)$(MANDIR)"
+ install -m644 $(MANPAGES) "$(DESTDIR)$(MANDIR)"/
+ install -m644 README.md "$(DESTDIR)$(DOCDIR)"/
+ install -m755 dbus-examples/cdbus-driver.sh "$(DESTDIR)$(DOCDIR)"/
endif
uninstall:

View File

@ -0,0 +1,15 @@
--- src/c2.h.orig 2013-02-06 01:40:34.000000000 +0800
+++ src/c2.h 2013-02-06 01:40:53.000000000 +0800
@@ -35,10 +35,8 @@
/// Pointer to a condition tree.
typedef struct {
bool isbranch : 1;
- union {
- c2_b_t *b;
- c2_l_t *l;
- };
+ c2_b_t *b;
+ c2_l_t *l;
} c2_ptr_t;
/// Initializer for c2_ptr_t.

14
x11-wm/compton/pkg-descr Normal file
View File

@ -0,0 +1,14 @@
Compton is a compositor for X11, which was forked from Dana Jansens' fork
of xcompmgr, and heavily refactored.
Most prominent changes from the original xcompmgr:
- OpenGL/GLX backend in addition to the old X Render backend
- Inactive window transparency and dimming
- Titlebar/frame and menu transparency
- Shadows for ARGB windows, e.g. terminals with transparency
- Colored shadows; new fade system
- Blur of background of transparent windows, window color inversion
- Configuration file support with blacklisting
WWW: https://github.com/chjj/compton

6
x11-wm/compton/pkg-plist Normal file
View File

@ -0,0 +1,6 @@
bin/compton
bin/compton-trans
etc/xdg/compton.sample.conf
share/applications/compton.desktop
@dirrmtry share/applications
@dirrmtry etc/xdg