diff options
-rw-r--r-- | wm/i3/Makefile | 23 | ||||
-rw-r--r-- | wm/i3/PLIST | 9 | ||||
-rw-r--r-- | wm/i3/distinfo | 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 | 79 |
6 files changed, 60 insertions, 144 deletions
diff --git a/wm/i3/Makefile b/wm/i3/Makefile index ba5fd6433c9..33c3a9333d0 100644 --- a/wm/i3/Makefile +++ b/wm/i3/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.2 2013/05/31 12:42:30 wiz Exp $ +# $NetBSD: Makefile,v 1.3 2013/10/17 22:41:12 tonnerre Exp $ # -DISTNAME= i3-4.4 -PKGREVISION= 1 +DISTNAME= i3-4.6 CATEGORIES= wm MASTER_SITES= http://i3wm.org/downloads/ EXTRACT_SUFX= .tar.bz2 @@ -28,27 +27,33 @@ MAKE_ENV+= SYSCONFDIR=${PKG_SYSCONFDIR:C/\/i3//} MAKE_ENV+= DEBUG=0 MAKE_ENV+= SHM_SUPPORT=0 +REPLACE_INTERPRETER+= perl +REPLACE.perl.old= /usr/bin/env perl +REPLACE.perl.new= ${TOOLS_PATH.perl} +REPLACE_FILES.perl= i3-dmenu-desktop i3-migrate-config-to-v4 + 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/ +.for i in i3 i3-dmenu-desktop i3-migrate-config-to-v4 i3-sensible-editor \ + i3-sensible-pager i3-sensible-terminal + ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${DESTDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${WRKSRC}/man/${i}.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ .endfor -.for i in i3-config-wizard +.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 ${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/pango/buildlink3.mk" .include "../../devel/pcre/buildlink3.mk" +.include "../../graphics/cairo/buildlink3.mk" .include "../../x11/xcb-util/buildlink3.mk" .include "../../x11/xcb-util-wm/buildlink3.mk" .include "../../x11/xcb-util-keysyms/buildlink3.mk" diff --git a/wm/i3/PLIST b/wm/i3/PLIST index b0aabedaa0b..3faeb5182b0 100644 --- a/wm/i3/PLIST +++ b/wm/i3/PLIST @@ -1,7 +1,9 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ +@comment $NetBSD: PLIST,v 1.2 2013/10/17 22:41:12 tonnerre Exp $ bin/i3 bin/i3-config-wizard +bin/i3-dmenu-desktop bin/i3-input +bin/i3-migrate-config-to-v4 bin/i3-msg bin/i3-nagbar bin/i3-sensible-editor @@ -10,9 +12,14 @@ bin/i3-sensible-terminal bin/i3bar include/i3/ipc.h man/man1/i3-config-wizard.1 +man/man1/i3-dmenu-desktop.1 man/man1/i3-input.1 +man/man1/i3-migrate-config-to-v4.1 man/man1/i3-msg.1 man/man1/i3-nagbar.1 +man/man1/i3-sensible-editor.1 +man/man1/i3-sensible-pager.1 +man/man1/i3-sensible-terminal.1 man/man1/i3.1 man/man1/i3bar.1 share/examples/i3/config diff --git a/wm/i3/distinfo b/wm/i3/distinfo index c004008014c..bb4f7440434 100644 --- a/wm/i3/distinfo +++ b/wm/i3/distinfo @@ -1,10 +1,8 @@ -$NetBSD: distinfo,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ +$NetBSD: distinfo,v 1.2 2013/10/17 22:41:12 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 (i3-4.6.tar.bz2) = b393eb6e57f5d6e11eb98691d8b392a639c3b516 +RMD160 (i3-4.6.tar.bz2) = 7f25c3b700e5255ad916b4348b22f3569d1f8c8d +Size (i3-4.6.tar.bz2) = 891862 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_log.c) = d555354ee2200ffcaa61c52f498de7e689084d90 SHA1 (patch-src_main.c) = c03fcb12d404fcdfd14c1892b771ee0c7a86b39d diff --git a/wm/i3/patches/patch-common.mk b/wm/i3/patches/patch-common.mk deleted file mode 100644 index 457986a6b74..00000000000 --- a/wm/i3/patches/patch-common.mk +++ /dev/null @@ -1,30 +0,0 @@ -$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 deleted file mode 100644 index db91fc9e7e1..00000000000 --- a/wm/i3/patches/patch-libi3_ipc_send_message.c +++ /dev/null @@ -1,51 +0,0 @@ -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 index f809e50bffb..cb00ea695d3 100644 --- a/wm/i3/patches/patch-src_log.c +++ b/wm/i3/patches/patch-src_log.c @@ -1,48 +1,35 @@ -$NetBSD: patch-src_log.c,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ +$NetBSD: patch-src_log.c,v 1.2 2013/10/17 22:41:12 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); +NetBSD does not support shm_open (3), disable the code in this case + +--- src/log.c.orig 2013-08-07 18:50:24.000000000 +0000 ++++ src/log.c 2013-10-06 16:45:34.000000000 +0000 +@@ -108,6 +108,7 @@ + * For 512 MiB of RAM this will lead to a 5 MiB log buffer. + * At the moment (2011-12-10), no testcase leads to an i3 log + * of more than ~ 600 KiB. */ ++#if !defined(__NetBSD__) + long long physical_mem_bytes; + #if defined(__APPLE__) + int mib[2] = { CTL_HW, HW_MEMSIZE }; +@@ -157,6 +158,7 @@ + logwalk = logbuffer + sizeof(i3_shmlog_header); + loglastwrap = logbuffer + logbuffer_size; + store_log_markers(); ++#endif /* !defined(__NetBSD__) */ + } + + /* +@@ -164,10 +166,12 @@ + * + */ + void close_logbuffer(void) { ++#if !defined(__NetBSD__) + close(logbuffer_shm); + shm_unlink(shmlogname); + logbuffer = NULL; + shmlogname = ""; ++#endif } + + /* |