diff options
author | tonnerre <tonnerre@pkgsrc.org> | 2013-02-12 23:25:35 +0000 |
---|---|---|
committer | tonnerre <tonnerre@pkgsrc.org> | 2013-02-12 23:25:35 +0000 |
commit | f99db238c0e26154dcada1009d55855decbf897f (patch) | |
tree | 04b4d398a21b279b3795744e98626aff732a65c4 /wm | |
parent | c4bd0e69374a39d67444f88c01f97a37ba07b74d (diff) | |
download | pkgsrc-f99db238c0e26154dcada1009d55855decbf897f.tar.gz |
Initial import of the i3 window manager, version 4.4.
This package contains the i3 window manager, a small tiling window
manager aimed at providing helpful modern features like Xinerama
multi-screen support while still being completely keyboard
controlled. It is mainly aimed at engineers and people who
love to get their work done without switching between keyboard and
mouse.
Diffstat (limited to 'wm')
-rw-r--r-- | wm/i3/DESCR | 8 | ||||
-rw-r--r-- | wm/i3/Makefile | 59 | ||||
-rw-r--r-- | wm/i3/PLIST | 20 | ||||
-rw-r--r-- | wm/i3/distinfo | 10 | ||||
-rw-r--r-- | wm/i3/patches/patch-Makefile | 12 | ||||
-rw-r--r-- | wm/i3/patches/patch-common.mk | 30 | ||||
-rw-r--r-- | wm/i3/patches/patch-libi3_ipc_send_message.c | 51 | ||||
-rw-r--r-- | wm/i3/patches/patch-src_log.c | 48 | ||||
-rw-r--r-- | wm/i3/patches/patch-src_main.c | 27 |
9 files changed, 265 insertions, 0 deletions
diff --git a/wm/i3/DESCR b/wm/i3/DESCR new file mode 100644 index 00000000000..0996ded4a95 --- /dev/null +++ b/wm/i3/DESCR @@ -0,0 +1,8 @@ +Key features of i3 are correct implementation of Xinerama (workspaces are +assigned to virtual screens, i3 does the right thing when attaching new +monitors), XrandR support (not done yet), horizontal and vertical columns +(think of a table) in tiling. Also, special focus is on writing clean, +readable and well documented code. i3 uses xcb for asynchronous +communication with X11, and has several measures to be very fast. + +Please be aware i3 is primarily targeted at advanced users and developers. diff --git a/wm/i3/Makefile b/wm/i3/Makefile new file mode 100644 index 00000000000..d9b3bba9dd6 --- /dev/null +++ b/wm/i3/Makefile @@ -0,0 +1,59 @@ +# $NetBSD: Makefile,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ +# + +DISTNAME= i3-4.4 +CATEGORIES= wm +MASTER_SITES= http://i3wm.org/downloads/ +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= tonnerre@NetBSD.org +HOMEPAGE= http://i3wm.org/ +COMMENT= Improved dynamic tiling window manager +LICENSE= modified-bsd + +USE_TOOLS+= gmake bison lex yacc pkg-config perl +USE_LANGUAGES= c99 +MAKE_JOBS_SAFE= no + +PKG_SYSCONFSUBDIR= i3 +INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 share/examples/i3 +INSTALLATION_DIRS+= share/xsessions include/i3 + +EGDIR= ${PREFIX}/share/examples/i3 +CONF_FILES= ${EGDIR}/config ${PKG_SYSCONFDIR}/config +CONF_FILES+= ${EGDIR}/config.keycodes ${PKG_SYSCONFDIR}/config.keycodes + +MAKE_ENV+= SYSCONFDIR=${PKG_SYSCONFDIR:C/\/i3//} +MAKE_ENV+= DEBUG=0 +MAKE_ENV+= SHM_SUPPORT=0 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/i3 ${DESTDIR}${PREFIX}/bin/ + ${INSTALL_MAN} ${WRKSRC}/man/i3.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ +.for i in i3bar i3-config-wizard i3-input i3-msg i3-nagbar + ${INSTALL_PROGRAM} ${WRKSRC}/${i}/${i} ${DESTDIR}${PREFIX}/bin/ + ${INSTALL_MAN} ${WRKSRC}/man/${i}.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ +.endfor +.for i in i3-config-wizard + ${INSTALL_PROGRAM} ${WRKSRC}/${i}/${i} ${DESTDIR}${PREFIX}/bin/ +.endfor + ${INSTALL_DATA} ${WRKSRC}/i3.config ${DESTDIR}${EGDIR}/config + ${INSTALL_DATA} ${WRKSRC}/i3.config.keycodes ${DESTDIR}${EGDIR}/config.keycodes + ${INSTALL_DATA} ${WRKSRC}/i3.xsession.desktop ${DESTDIR}${PREFIX}/share/xsessions/ + ${INSTALL_DATA} ${WRKSRC}/include/i3/ipc.h ${DESTDIR}${PREFIX}/include/i3/ + ${INSTALL_SCRIPT} ${WRKSRC}/i3-sensible-editor ${DESTDIR}${PREFIX}/bin/ + ${INSTALL_SCRIPT} ${WRKSRC}/i3-sensible-pager ${DESTDIR}${PREFIX}/bin/ + ${INSTALL_SCRIPT} ${WRKSRC}/i3-sensible-terminal ${DESTDIR}${PREFIX}/bin/ + +.include "../../devel/libev/buildlink3.mk" +.include "../../devel/yajl/buildlink3.mk" +.include "../../devel/pcre/buildlink3.mk" +.include "../../x11/xcb-util/buildlink3.mk" +.include "../../x11/xcb-util-wm/buildlink3.mk" +.include "../../x11/xcb-util-keysyms/buildlink3.mk" +.include "../../x11/libxcb/buildlink3.mk" +.include "../../x11/libX11/buildlink3.mk" +.include "../../x11/libXcursor/buildlink3.mk" +.include "../../x11/startup-notification/buildlink3.mk" + +.include "../../mk/bsd.pkg.mk" diff --git a/wm/i3/PLIST b/wm/i3/PLIST new file mode 100644 index 00000000000..b0aabedaa0b --- /dev/null +++ b/wm/i3/PLIST @@ -0,0 +1,20 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ +bin/i3 +bin/i3-config-wizard +bin/i3-input +bin/i3-msg +bin/i3-nagbar +bin/i3-sensible-editor +bin/i3-sensible-pager +bin/i3-sensible-terminal +bin/i3bar +include/i3/ipc.h +man/man1/i3-config-wizard.1 +man/man1/i3-input.1 +man/man1/i3-msg.1 +man/man1/i3-nagbar.1 +man/man1/i3.1 +man/man1/i3bar.1 +share/examples/i3/config +share/examples/i3/config.keycodes +share/xsessions/i3.xsession.desktop diff --git a/wm/i3/distinfo b/wm/i3/distinfo new file mode 100644 index 00000000000..c004008014c --- /dev/null +++ b/wm/i3/distinfo @@ -0,0 +1,10 @@ +$NetBSD: distinfo,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ + +SHA1 (i3-4.4.tar.bz2) = bc66bdf492e9596dbd48991c7bfcfd025281001c +RMD160 (i3-4.4.tar.bz2) = 6a5f2f84da32337a991cb85fd1dc4992bf9a72e2 +Size (i3-4.4.tar.bz2) = 884182 bytes +SHA1 (patch-Makefile) = 919f0e87efa951bde531b9172b74589d3e1c474a +SHA1 (patch-common.mk) = ccb5c045ea45f693dcffec972ada0dd28375f485 +SHA1 (patch-libi3_ipc_send_message.c) = 93fa47c2f2bb299819b2e470e5175bffadefaf1a +SHA1 (patch-src_log.c) = ff40c08e36416748d4a5a3d19c15fd99c732bb72 +SHA1 (patch-src_main.c) = c03fcb12d404fcdfd14c1892b771ee0c7a86b39d diff --git a/wm/i3/patches/patch-Makefile b/wm/i3/patches/patch-Makefile new file mode 100644 index 00000000000..4e6434b1a9e --- /dev/null +++ b/wm/i3/patches/patch-Makefile @@ -0,0 +1,12 @@ +$NetBSD: patch-Makefile,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ + +--- Makefile.orig 2012-11-25 16:04:42.000000000 +0000 ++++ Makefile +@@ -18,7 +18,6 @@ include i3-msg/i3-msg.mk + include i3-input/i3-input.mk + include i3-nagbar/i3-nagbar.mk + include i3bar/i3bar.mk +-include i3-dump-log/i3-dump-log.mk + include docs/docs.mk + include man/man.mk + diff --git a/wm/i3/patches/patch-common.mk b/wm/i3/patches/patch-common.mk new file mode 100644 index 00000000000..457986a6b74 --- /dev/null +++ b/wm/i3/patches/patch-common.mk @@ -0,0 +1,30 @@ +$NetBSD: patch-common.mk,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ + +--- common.mk.orig 2012-09-19 16:08:09.000000000 +0000 ++++ common.mk +@@ -1,5 +1,7 @@ + UNAME=$(shell uname) +-DEBUG=1 ++ifndef DEBUG ++ DEBUG=1 ++endif + COVERAGE=0 + INSTALL=install + FLEX=flex +@@ -137,11 +139,11 @@ LIBSN_CFLAGS := $(call cflags_for_lib, l + LIBSN_LIBS := $(call ldflags_for_lib, libstartup-notification-1.0,startup-notification-1) + + # Pango +-PANGO_CFLAGS := $(call cflags_for_lib, cairo) +-PANGO_CFLAGS += $(call cflags_for_lib, pangocairo) +-I3_CPPFLAGS += -DPANGO_SUPPORT=1 +-PANGO_LIBS := $(call ldflags_for_lib, cairo) +-PANGO_LIBS += $(call ldflags_for_lib, pangocairo) ++#PANGO_CFLAGS := $(call cflags_for_lib, cairo) ++#PANGO_CFLAGS += $(call cflags_for_lib, pangocairo) ++I3_CPPFLAGS += -DPANGO_SUPPORT=0 ++#PANGO_LIBS := $(call ldflags_for_lib, cairo) ++#PANGO_LIBS += $(call ldflags_for_lib, pangocairo) + + # libi3 + LIBS = -L$(TOPDIR) -li3 diff --git a/wm/i3/patches/patch-libi3_ipc_send_message.c b/wm/i3/patches/patch-libi3_ipc_send_message.c new file mode 100644 index 00000000000..db91fc9e7e1 --- /dev/null +++ b/wm/i3/patches/patch-libi3_ipc_send_message.c @@ -0,0 +1,51 @@ +commit f5b7bfb12ef74ddbf250e5076bbfaafd0027474c +Author: Michael Stapelberg <michael@stapelberg.de> +Date: Wed Jan 9 18:11:03 2013 +0100 + + Bugfix: fix IPC messages writes with low buffer sizes (Thanks jasper, dcoppa) + + Use the following command to reproduce this bug: + + echo 4096 | sudo tee /proc/sys/net/core/wmem_default + + Then just switch workspaces with some windows on it and i3bar would + exit due to malformed IPC messages. + + This bug hits OpenBSD users (and possibly other BSDs) due to their lower + default buffer size. + + fixes #896 + +diff --git a/libi3/ipc_send_message.c b/libi3/ipc_send_message.c +index 850fbdd..88d87a6 100644 +--- libi3/ipc_send_message.c ++++ libi3/ipc_send_message.c +@@ -10,6 +10,7 @@ + #include <unistd.h> + #include <stdint.h> + #include <err.h> ++#include <errno.h> + + #include <i3/ipc.h> + +@@ -38,14 +39,15 @@ int ipc_send_message(int sockfd, uint32_t message_size, + memcpy(walk, payload, message_size); + + int sent_bytes = 0; +- int bytes_to_go = buffer_size; +- while (sent_bytes < bytes_to_go) { +- int n = write(sockfd, msg + sent_bytes, bytes_to_go); +- if (n == -1) ++ while (sent_bytes < buffer_size) { ++ int n = write(sockfd, msg + sent_bytes, buffer_size - sent_bytes); ++ if (n == -1) { ++ if (errno == EAGAIN) ++ continue; + return -1; ++ } + + sent_bytes += n; +- bytes_to_go -= n; + } + + return 0; diff --git a/wm/i3/patches/patch-src_log.c b/wm/i3/patches/patch-src_log.c new file mode 100644 index 00000000000..f809e50bffb --- /dev/null +++ b/wm/i3/patches/patch-src_log.c @@ -0,0 +1,48 @@ +$NetBSD: patch-src_log.c,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ + +--- src/log.c.orig 2012-12-11 23:08:17.000000000 +0000 ++++ src/log.c +@@ -108,42 +108,7 @@ void init_logging(void) { + #endif + logbuffer_size = min(physical_mem_bytes * 0.01, shmlog_size); + sasprintf(&shmlogname, "/i3-log-%d", getpid()); +- logbuffer_shm = shm_open(shmlogname, O_RDWR | O_CREAT, S_IREAD | S_IWRITE); +- if (logbuffer_shm == -1) { +- ELOG("Could not shm_open SHM segment for the i3 log: %s\n", strerror(errno)); +- return; +- } +- +- if (ftruncate(logbuffer_shm, logbuffer_size) == -1) { +- close(logbuffer_shm); +- shm_unlink("/i3-log-"); +- ELOG("Could not ftruncate SHM segment for the i3 log: %s\n", strerror(errno)); +- return; +- } +- +- logbuffer = mmap(NULL, logbuffer_size, PROT_READ | PROT_WRITE, MAP_SHARED, logbuffer_shm, 0); +- if (logbuffer == MAP_FAILED) { +- close(logbuffer_shm); +- shm_unlink("/i3-log-"); +- ELOG("Could not mmap SHM segment for the i3 log: %s\n", strerror(errno)); +- logbuffer = NULL; +- return; +- } +- +- /* Initialize with 0-bytes, just to be sureā¦ */ +- memset(logbuffer, '\0', logbuffer_size); +- +- header = (i3_shmlog_header*)logbuffer; +- +- pthread_condattr_t cond_attr; +- pthread_condattr_init(&cond_attr); +- if (pthread_condattr_setpshared(&cond_attr, PTHREAD_PROCESS_SHARED) != 0) +- ELOG("pthread_condattr_setpshared() failed, i3-dump-log -f will not work!\n"); +- pthread_cond_init(&(header->condvar), &cond_attr); +- +- logwalk = logbuffer + sizeof(i3_shmlog_header); +- loglastwrap = logbuffer + logbuffer_size; +- store_log_markers(); ++ return; + } + atexit(purge_zerobyte_logfile); + } diff --git a/wm/i3/patches/patch-src_main.c b/wm/i3/patches/patch-src_main.c new file mode 100644 index 00000000000..7e6eea7137e --- /dev/null +++ b/wm/i3/patches/patch-src_main.c @@ -0,0 +1,27 @@ +$NetBSD: patch-src_main.c,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ + +--- src/main.c.orig 2012-12-11 23:08:17.000000000 +0000 ++++ src/main.c +@@ -218,12 +218,6 @@ static void i3_exit(void) { + #if EV_VERSION_MAJOR >= 4 + ev_loop_destroy(main_loop); + #endif +- +- if (*shmlogname != '\0') { +- fprintf(stderr, "Closing SHM log \"%s\"\n", shmlogname); +- fflush(stderr); +- shm_unlink(shmlogname); +- } + } + + /* +@@ -233,9 +227,6 @@ static void i3_exit(void) { + * + */ + static void handle_signal(int sig, siginfo_t *info, void *data) { +- if (*shmlogname != '\0') { +- shm_unlink(shmlogname); +- } + raise(sig); + } + |