Hi
here is the new version 3.d of i3, it is still young (verbose and debug output
is still there - it should be configurable by next release) most of the patches
has been integrated upstream.
Hope the patch is ok
regards,
Bapt
diff -Nrau i3.orig/Makefile i3/Makefile
--- i3.orig/Makefile Mon Sep 14 19:19:29 2009
+++ i3/Makefile Tue Nov 10 08:14:51 2009
@@ -2,8 +2,8 @@
COMMENT = improved dynamic tiling window manager
-DISTNAME = i3-3.c
-PKGNAME = i3-3.3p0
+DISTNAME = i3-3.d
+PKGNAME = i3-3.4p0
CATEGORIES = x11
EXTRACT_SUFX = .tar.bz2
@@ -21,6 +21,7 @@
xcb-icccm xcb-keysyms xcb-property xcb-xinerama
MODULES = converters/libiconv
+BUILD_DEPENDS = ::devel/bison
LIB_DEPENDS = ev::devel/libev
RUN_DEPENDS = ::x11/dmenu
diff -Nrau i3.orig/distinfo i3/distinfo
--- i3.orig/distinfo Wed Sep 2 21:26:17 2009
+++ i3/distinfo Tue Nov 10 08:14:51 2009
@@ -1,5 +1,5 @@
-MD5 (i3-3.c.tar.bz2) = jjpMN4S+7lxQNMdXC8/xyA==
-RMD160 (i3-3.c.tar.bz2) = lNfn7XDI1dVymFkJ2+aEtDw7B98=
-SHA1 (i3-3.c.tar.bz2) = QgH86kbiPnXqpwv/W9K9Cr6auhk=
-SHA256 (i3-3.c.tar.bz2) = kXJqpPuVj/flfOTwdMCGtzjqzCMb40vGDZ0xaT5JMVU=
-SIZE (i3-3.c.tar.bz2) = 110076
+MD5 (i3-3.d.tar.bz2) = 3GSMC79xHWaRyYH2ZcfFTA==
+RMD160 (i3-3.d.tar.bz2) = piK0U7G/PC6essJ3Fw0u9i6P12I=
+SHA1 (i3-3.d.tar.bz2) = jOSdbCSH6heZx/8/abcqLYaU0NI=
+SHA256 (i3-3.d.tar.bz2) = pki+iCy1eLP3O985a6yr+u9lCparxnZBKmXOFrKKSSs=
+SIZE (i3-3.d.tar.bz2) = 156205
diff -Nrau i3.orig/patches/patch-Makefile i3/patches/patch-Makefile
--- i3.orig/patches/patch-Makefile Wed Sep 2 22:05:34 2009
+++ i3/patches/patch-Makefile Tue Nov 10 08:14:51 2009
@@ -1,20 +1,31 @@
-$OpenBSD: patch-Makefile,v 1.2 2009/09/02 20:05:34 bernd Exp $
---- Makefile.orig Wed Aug 19 14:39:09 2009
-+++ Makefile Wed Sep 2 21:23:16 2009
-@@ -8,24 +8,20 @@ HEADERS=$(wildcard include/*.h)
+--- Makefile.orig Mon Nov 9 22:37:11 2009
++++ Makefile Tue Nov 10 07:59:39 2009
+@@ -10,37 +10,33 @@
# Depend on the specific file (.c for each .o) and on all headers
src/%.o: src/%.c ${HEADERS}
- echo "CC $<"
$(CC) $(CFLAGS) -c -o $@ $<
- all: ${FILES}
+ all: src/cfgparse.y.o src/cfgparse.yy.o ${FILES}
- echo "LINK i3"
- $(CC) -o i3 ${FILES} $(LDFLAGS)
+ $(CC) -o i3 ${FILES} src/cfgparse.y.o src/cfgparse.yy.o $(LDFLAGS)
- echo ""
- echo "SUBDIR i3-msg"
$(MAKE) TOPDIR=$(TOPDIR) -C i3-msg
+- echo "SUBDIR i3-input"
+ $(MAKE) TOPDIR=$(TOPDIR) -C i3-input
+ src/cfgparse.yy.o: src/cfgparse.l
+- echo "LEX $<"
+ flex -i -o$(@:.o=.c) $<
+ $(CC) $(CFLAGS) -c -o $@ $(@:.o=.c)
+
+ src/cfgparse.y.o: src/cfgparse.y
+- echo "YACC $<"
+ bison --debug --verbose -b $(basename $< .y) -d $<
+ $(CC) $(CFLAGS) -c -o $@ $(<:.y=.tab.c)
+
install: all
- echo "INSTALL"
- $(INSTALL) -d -m 0755 $(DESTDIR)/usr/bin
@@ -22,14 +33,19 @@
- $(INSTALL) -d -m 0755 $(DESTDIR)/usr/share/xsessions
- $(INSTALL) -m 0755 i3 $(DESTDIR)/usr/bin/
- test -e $(DESTDIR)/etc/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)/etc/i3/config
+- $(INSTALL) -m 0644 i3.welcome $(DESTDIR)/etc/i3/welcome
- $(INSTALL) -m 0644 i3.desktop $(DESTDIR)/usr/share/xsessions/
+ $(INSTALL) -d -m 0755 $(PREFIX)/bin
++ $(INSTALL) -d -m 0755 $(PREFIX)/etc/i3
+ $(INSTALL) -d -m 0755 $(PREFIX)/share/examples/i3
+ $(INSTALL) -d -m 0755 $(PREFIX)/share/xsessions
+ $(INSTALL) -m 0755 i3 $(PREFIX)/bin/
++ $(INSTALL) -m 0644 i3.config $(PREFIX)/share/examples/i3/config
+ $(INSTALL) -m 0444 man/i3.1 $(PREFIX)/man/man1/
-+ test -e $(PREFIX)/etc/i3/config || $(INSTALL) -m 0644 i3.config $(PREFIX)/share/examples/i3/config
++ $(INSTALL) -m 0444 man/i3-msg.1 $(PREFIX)/man/man1/
++ $(INSTALL) -m 0444 man/i3-input.1 $(PREFIX)/man/man1/
++ $(INSTALL) -m 0644 i3.welcome $(PREFIX)/etc/i3/welcome
+ $(INSTALL) -m 0644 i3.desktop $(PREFIX)/share/xsessions/
$(MAKE) TOPDIR=$(TOPDIR) -C i3-msg install
+ $(MAKE) TOPDIR=$(TOPDIR) -C i3-input install
- dist: distclean
diff -Nrau i3.orig/patches/patch-common_mk i3/patches/patch-common_mk
--- i3.orig/patches/patch-common_mk Wed Sep 2 21:26:17 2009
+++ i3/patches/patch-common_mk Tue Nov 10 08:14:51 2009
@@ -1,45 +1,12 @@
-$OpenBSD: patch-common_mk,v 1.1.1.1 2009/09/02 19:26:17 landry Exp $
---- common.mk.orig Wed Aug 19 14:39:09 2009
-+++ common.mk Wed Sep 2 21:23:04 2009
-@@ -9,7 +9,7 @@ CFLAGS += -pipe
- CFLAGS += -Wall
- CFLAGS += -Wunused
- CFLAGS += -Iinclude
--CFLAGS += -I/usr/local/include
-+CFLAGS += -I${LOCALBASE}/include
- CFLAGS += -DI3_VERSION=\"${GIT_VERSION}\"
-
- # Check if pkg-config is installed, because without pkg-config, the following
-@@ -38,7 +38,7 @@ LDFLAGS += -lxcb-icccm
- LDFLAGS += -lxcb-xinerama
- LDFLAGS += -lX11
- LDFLAGS += -lev
--LDFLAGS += -L/usr/local/lib -L/usr/pkg/lib
-+LDFLAGS += -L${LOCALBASE}/lib -L/usr/pkg/lib
-
- ifeq ($(UNAME),NetBSD)
- # We need -idirafter instead of -I to prefer the system’s iconv over GNU libiconv
-@@ -50,6 +50,13 @@ ifeq ($(UNAME),FreeBSD)
- LDFLAGS += -liconv
- endif
-
-+ifeq ($(UNAME),OpenBSD)
-+CFLAGS += -ftrampolines
-+CFLAGS += -I${X11BASE}/include
-+LDFLAGS += -liconv
-+LDFLAGS += -L${X11BASE}/lib
-+endif
-+
- ifeq ($(UNAME),Linux)
- CFLAGS += -D_GNU_SOURCE
- endif
-@@ -61,9 +68,6 @@ CFLAGS += -g3
- else
+--- common.mk.orig Tue Nov 10 00:04:07 2009
++++ common.mk Tue Nov 10 00:04:13 2009
+@@ -70,9 +70,6 @@
CFLAGS += -O2
endif
--
+
-# Don’t print command lines which are run
-.SILENT:
-
+-
# Always remake the following targets
.PHONY: install clean dist distclean
+
diff -Nrau i3.orig/patches/patch-i3-msg_Makefile i3/patches/patch-i3-msg_Makefile
--- i3.orig/patches/patch-i3-msg_Makefile Wed Sep 2 21:26:17 2009
+++ i3/patches/patch-i3-msg_Makefile Tue Nov 10 08:14:51 2009
@@ -1,7 +1,6 @@
-$OpenBSD: patch-i3-msg_Makefile,v 1.1.1.1 2009/09/02 19:26:17 landry Exp $
---- i3-msg/Makefile.orig Wed Aug 19 14:39:09 2009
-+++ i3-msg/Makefile Mon Aug 31 20:33:37 2009
-@@ -9,17 +9,14 @@ HEADERS=$(wildcard *.h)
+--- i3-msg/Makefile.orig Mon Nov 9 22:37:11 2009
++++ i3-msg/Makefile Mon Nov 9 23:27:34 2009
+@@ -9,17 +9,14 @@
# Depend on the specific file (.c for each .o) and on all headers
%.o: %.c ${HEADERS}
diff -Nrau i3.orig/patches/patch-i3_config i3/patches/patch-i3_config
--- i3.orig/patches/patch-i3_config Wed Sep 2 21:26:17 2009
+++ i3/patches/patch-i3_config Tue Nov 10 08:14:51 2009
@@ -1,21 +1,20 @@
-$OpenBSD: patch-i3_config,v 1.1.1.1 2009/09/02 19:26:17 landry Exp $
---- i3.config.orig Wed Aug 19 14:39:09 2009
-+++ i3.config Wed Sep 2 21:23:04 2009
+--- i3.config.orig Tue Nov 10 08:09:27 2009
++++ i3.config Tue Nov 10 08:11:18 2009
@@ -4,7 +4,7 @@
# Tell i3 about your preferred terminal. You can refer to this as $terminal
# later. It is recommended to set this option to allow i3 to open a terminal
# containing the introduction on first start.
-terminal /usr/bin/urxvt
-+terminal ${X11BASE}/bin/xterm
++terminal ${X11BASE}/bin/urxvt
# ISO 10646 = Unicode
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
-@@ -83,14 +83,14 @@ bind Mod1+Shift+18 m9
+@@ -106,14 +106,14 @@
bind Mod1+Shift+19 m10
# Mod1+Enter starts a new terminal
-bind Mod1+36 exec /usr/bin/urxvt
-+bind Mod1+36 exec ${X11BASE}/bin/xterm
++bind Mod1+36 exec ${X11BASE}/bin/urxvt
# Mod1+Shift+q kills the current client
bind Mod1+Shift+24 kill
@@ -27,3 +26,9 @@
# Mod1+Shift+e exits i3
bind Mod1+Shift+26 exit
+@@ -124,4 +124,4 @@
+ #############################################################
+ # DELETE THE FOLLOWING LINES TO DISABLE THE WELCOME MESSAGE #
+ #############################################################
+-exec xmessage -file /etc/i3/welcome
++exec xmessage -file ${LOCALBASE}/etc/i3/welcome
diff -Nrau i3.orig/patches/patch-include_util_h i3/patches/patch-include_util_h
--- i3.orig/patches/patch-include_util_h Wed Sep 2 21:26:17 2009
+++ i3/patches/patch-include_util_h Thu Jan 1 01:00:00 1970
@@ -1,15 +0,0 @@
-$OpenBSD: patch-include_util_h,v 1.1.1.1 2009/09/02 19:26:17 landry Exp $
---- include/util.h.orig Wed Aug 19 14:39:09 2009
-+++ include/util.h Mon Aug 31 14:01:38 2009
-@@ -161,4 +161,11 @@ void switch_layout_mode(xcb_connection_t *conn, Contai
- Client *get_matching_client(xcb_connection_t *conn,
- const char *window_classtitle, Client *specific);
-
-+/*
-+ * Add a copy of memmem for OpenBSD
-+ */
-+#if defined(__OpenBSD__)
-+void * memmem(const void *l, size_t l_len, const void *s, size_t s_len);
-+#endif
-+
- #endif
diff -Nrau i3.orig/patches/patch-src_config_c i3/patches/patch-src_config_c
--- i3.orig/patches/patch-src_config_c Wed Sep 2 21:26:17 2009
+++ i3/patches/patch-src_config_c Thu Jan 1 01:00:00 1970
@@ -1,33 +0,0 @@
-$OpenBSD: patch-src_config_c,v 1.1.1.1 2009/09/02 19:26:17 landry Exp $
---- src/config.c.orig Wed Aug 19 14:39:09 2009
-+++ src/config.c Mon Aug 31 20:30:32 2009
-@@ -226,8 +226,8 @@ void load_configuration(xcb_connection_t *conn, const
- /* We first check for ~/.i3/config, then for /etc/i3/config */
- char *globbed = glob_path("~/.i3/config");
- if ((handle = fopen(globbed, "r")) == NULL)
-- if ((handle = fopen("/etc/i3/config", "r")) == NULL)
-- die("Neither \"%s\" nor /etc/i3/config could be opened\n", globbed);
-+ if ((handle = fopen("${SYSCONFDIR}/i3/config", "r")) == NULL)
-+ die("Neither \"%s\" nor ${SYSCONFDIR}/i3/config could be opened\n", globbed);
- free(globbed);
- }
- char key[512], value[512], buffer[1026];
-@@ -312,7 +312,17 @@ void load_configuration(xcb_connection_t *conn, const
- rest++;
- if (*rest != ' ')
- die("Invalid binding (keysym)\n");
-- new->symbol = strndup(sym, (rest - sym));
-+#if defined(__OpenBSD__)
-+ size_t len = strlen(sym);
-+ if( len > (rest - sym))
-+ len = (rest - sym);
-+ new->symbol = malloc(len + 1);
-+ memcpy(new->symbol,sym,len+1);
-+ new->symbol[len]='\0';
-+#else
-+ new->symbol = strndup(sym, (rest - sym));
-+#endif
-+
- }
- rest++;
- LOG("keycode = %d, symbol = %s, modifiers = %d, command = *%s*\n", new->keycode, new->symbol, modifiers, rest);
diff -Nrau i3.orig/patches/patch-src_util_c i3/patches/patch-src_util_c
--- i3.orig/patches/patch-src_util_c Mon Sep 14 19:19:29 2009
+++ i3/patches/patch-src_util_c Thu Jan 1 01:00:00 1970
@@ -1,66 +0,0 @@
-$OpenBSD: patch-src_util_c,v 1.2 2009/09/14 17:19:29 naddy Exp $
---- src/util.c.orig Wed Aug 19 14:39:09 2009
-+++ src/util.c Mon Sep 14 19:15:36 2009
-@@ -15,6 +15,9 @@
- #include <unistd.h>
- #include <string.h>
- #include <sys/wait.h>
-+#if defined(__OpenBSD__)
-+#include <sys/cdefs.h>
-+#endif
- #include <stdarg.h>
- #include <assert.h>
- #include <iconv.h>
-@@ -145,7 +148,7 @@ void start_application(const char *command) {
- shell = "/bin/sh";
-
- /* This is the child */
-- execl(shell, shell, "-c", command, NULL);
-+ execl(shell, shell, "-c", command, (void *)NULL);
- /* not reached */
- }
- exit(0);
-@@ -466,3 +469,43 @@ done:
- FREE(to_title_ucs);
- return matching;
- }
-+
-+
-+#if defined(__OpenBSD__)
-+
-+/*
-+ * Taken from FreeBSD
-+ * Find the first occurrence of the byte string s in byte string l.
-+ */
-+
-+void *
-+memmem(const void *l, size_t l_len, const void *s, size_t s_len)
-+{
-+ register char *cur, *last;
-+ const char *cl = (const char *)l;
-+ const char *cs = (const char *)s;
-+
-+ /* we need something to compare */
-+ if (l_len == 0 || s_len == 0)
-+ return NULL;
-+
-+ /* "s" must be smaller or equal to "l" */
-+ if (l_len < s_len)
-+ return NULL;
-+
-+ /* special case where s_len == 1 */
-+ if (s_len == 1)
-+ return memchr(l, (int)*cs, l_len);
-+
-+ /* the last position where its possible to find "s" in "l" */
-+ last = (char *)cl + l_len - s_len;
-+
-+ for (cur = (char *)cl; cur <= last; cur++)
-+ if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0)
-+ return cur;
-+
-+ return NULL;
-+}
-+
-+#endif
-+
diff -Nrau i3.orig/pkg/PLIST i3/pkg/PLIST
--- i3.orig/pkg/PLIST Wed Sep 2 21:26:17 2009
+++ i3/pkg/PLIST Tue Nov 10 08:14:51 2009
@@ -1,7 +1,11 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2009/09/02 19:26:17 landry Exp $
@bin bin/i3
@bin bin/i3-msg
+@bin bin/i3-input
@man man/man1/i3.1
+@man man/man1/i3-msg.1
+@man man/man1/i3-input.1
+etc/i3/welcome
share/examples/i3/
@sample ${SYSCONFDIR}/i3/
share/examples/i3/config