summaryrefslogtreecommitdiff
path: root/user/i3wm
diff options
context:
space:
mode:
Diffstat (limited to 'user/i3wm')
-rw-r--r--user/i3wm/APKBUILD49
-rw-r--r--user/i3wm/i3wm-musl-glob-tilde.patch73
-rw-r--r--user/i3wm/i3wm-test-disable-branch-check.patch10
-rw-r--r--user/i3wm/i3wm-test-fix-off_t.patch26
4 files changed, 158 insertions, 0 deletions
diff --git a/user/i3wm/APKBUILD b/user/i3wm/APKBUILD
new file mode 100644
index 000000000..197cbd45f
--- /dev/null
+++ b/user/i3wm/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Dan Theisen <djt@hxx.in>
+pkgname=i3wm
+pkgver=4.15
+pkgrel=0
+pkgdesc="Improved dynamic tiling window manager"
+url="http://i3wm.org"
+arch="all"
+license="BSD-3-Clause"
+options="!check" # The test suite requires X
+makedepends="bison flex libxcb-dev xcb-util-cursor-dev xcb-util-keysyms-dev
+ xcb-util-wm-dev libev-dev pango-dev cairo-dev yajl-dev
+ startup-notification-dev pcre-dev libxkbcommon-dev xcb-util-xrm-dev"
+checkdepends="perl-x11-xcb perl-anyevent perl-json-xs perl-ipc-run
+ perl-inline-c perl-dev libxcb-dev xcb-util-dev xorg-server-xephyr"
+subpackages="$pkgname-doc"
+source="http://i3wm.org/downloads/i3-$pkgver.tar.bz2
+ i3wm-musl-glob-tilde.patch
+ i3wm-test-fix-off_t.patch
+ i3wm-test-disable-branch-check.patch"
+builddir="$srcdir/i3-$pkgver"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --prefix="/usr" \
+ --disable-builddir \
+ --sysconfdir="/etc"
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir/" install
+
+ install -d "$pkgdir/usr/share/man/man1"
+ install -m644 man/*.1 "$pkgdir"/usr/share/man/man1/
+}
+
+sha512sums="60ab61b7e380342126bea12fb4371f98fcf18f6435f79a9519d3f59cfabdb170634366036e1aa20c5592da0832b03140ad1f0c72bad3cfaace0b7c57ad01dfc4 i3-4.15.tar.bz2
+8ce7d00371c43b93dabbe0dadf9caf7c58a68f4a0079f5a9b9552c15c55bfa0df16d7e87a281595af2ac5254632ba28ccf82a467cea16159b41490f6f2910299 i3wm-musl-glob-tilde.patch
+77224b994397b2e2487ae28dfd5781b3630654191813eb3c685f05ebf446e65c36e53a665ff3cc8323ea67e87f7cf977044025dade0a6ed22cbd84f0e6b4cbc7 i3wm-test-fix-off_t.patch
+a80384965dff62c51ce77e2baa3cf1b0b6db1df68994ce98383f96554bd296b4b59527fb5b1cb24b08c123699e294ba9b3baaa52afe88d87e7a76f0629194b1f i3wm-test-disable-branch-check.patch"
diff --git a/user/i3wm/i3wm-musl-glob-tilde.patch b/user/i3wm/i3wm-musl-glob-tilde.patch
new file mode 100644
index 000000000..82ad6195b
--- /dev/null
+++ b/user/i3wm/i3wm-musl-glob-tilde.patch
@@ -0,0 +1,73 @@
+diff -urp i3-4.11/i3bar/src/main.c i3-4.11.new/i3bar/src/main.c
+--- i3-4.11/i3bar/src/main.c 2015-09-30 07:55:10.000000000 +0100
++++ i3-4.11.new/i3bar/src/main.c 2016-02-08 20:03:41.777392482 +0000
+@@ -45,14 +45,20 @@ void debuglog(char *fmt, ...) {
+ *
+ */
+ char *expand_path(char *path) {
+- static glob_t globbuf;
+- if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0) {
+- ELOG("glob() failed\n");
+- exit(EXIT_FAILURE);
++ char *home, *expanded;
++
++ if (strncmp(path, "~/", 2) == 0) {
++ home = getenv("HOME");
++ if (home != NULL) {
++ /* new length: sum - 1 (omit '~') + 1 (for '\0') */
++ expanded = scalloc(strlen(home)+strlen(path), 1);
++ strcpy(expanded, home);
++ strcat(expanded, path+1);
++ return expanded;
++ }
+ }
+- char *result = sstrdup(globbuf.gl_pathc > 0 ? globbuf.gl_pathv[0] : path);
+- globfree(&globbuf);
+- return result;
++
++ return sstrdup(path);
+ }
+
+ void print_usage(char *elf_name) {
+diff -urp i3-4.11/libi3/resolve_tilde.c i3-4.11.new/libi3/resolve_tilde.c
+--- i3-4.11/libi3/resolve_tilde.c 2015-09-30 07:55:10.000000000 +0100
++++ i3-4.11.new/libi3/resolve_tilde.c 2016-02-08 20:03:47.849230953 +0000
+@@ -19,27 +19,18 @@
+ *
+ */
+ char *resolve_tilde(const char *path) {
+- static glob_t globbuf;
+- char *head, *tail, *result;
++ char *home, *expanded;
+
+- tail = strchr(path, '/');
+- head = sstrndup(path, tail ? (size_t)(tail - path) : strlen(path));
+-
+- int res = glob(head, GLOB_TILDE, NULL, &globbuf);
+- free(head);
+- /* no match, or many wildcard matches are bad */
+- if (res == GLOB_NOMATCH || globbuf.gl_pathc != 1)
+- result = sstrdup(path);
+- else if (res != 0) {
+- err(EXIT_FAILURE, "glob() failed");
+- } else {
+- head = globbuf.gl_pathv[0];
+- result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1, 1);
+- strncpy(result, head, strlen(head));
+- if (tail)
+- strncat(result, tail, strlen(tail));
++ if (strncmp(path, "~/", 2) == 0) {
++ home = getenv("HOME");
++ if (home != NULL) {
++ /* new length: sum - 1 (omit '~') + 1 (for '\0') */
++ expanded = scalloc(strlen(home)+strlen(path), 1);
++ strcpy(expanded, home);
++ strcat(expanded, path+1);
++ return expanded;
++ }
+ }
+- globfree(&globbuf);
+
+- return result;
++ return sstrdup(path);
+ }
diff --git a/user/i3wm/i3wm-test-disable-branch-check.patch b/user/i3wm/i3wm-test-disable-branch-check.patch
new file mode 100644
index 000000000..ac3572e9b
--- /dev/null
+++ b/user/i3wm/i3wm-test-disable-branch-check.patch
@@ -0,0 +1,10 @@
+--- i3-4.15/testcases/t/193-ipc-version.t.old 2018-03-10 09:29:14.000000000 -0800
++++ i3-4.15/testcases/t/193-ipc-version.t 2018-09-27 16:49:56.599257224 -0700
+@@ -32,6 +32,6 @@
+
+ is(int($version->{minor}), $version->{minor}, 'minor version is an integer');
+ is(int($version->{patch}), $version->{patch}, 'patch version is an integer');
+-like($version->{human_readable}, qr/branch/, 'human readable version contains branch name');
++#like($version->{human_readable}, qr/branch/, 'human readable version contains branch name');
+
+ done_testing;
diff --git a/user/i3wm/i3wm-test-fix-off_t.patch b/user/i3wm/i3wm-test-fix-off_t.patch
new file mode 100644
index 000000000..1aeb69be6
--- /dev/null
+++ b/user/i3wm/i3wm-test-fix-off_t.patch
@@ -0,0 +1,26 @@
+--- i3-4.15/testcases/lib/i3test/XTEST.pm.old 2018-09-27 16:18:59.682101063 -0700
++++ i3-4.15/testcases/lib/i3test/XTEST.pm 2018-09-27 16:20:33.723493893 -0700
+@@ -39,6 +39,7 @@
+ my %sn_config;
+ BEGIN {
+ %sn_config = ExtUtils::PkgConfig->find('xcb-xkb xcb-xtest xcb-util');
++ $sn_config{cflags} .= ' -D_GNU_SOURCE';
+ }
+
+ use Inline C => Config => LIBS => $sn_config{libs}, CCFLAGS => $sn_config{cflags};
+--- i3-4.15/testcases/t/175-startup-notification.t.old 2018-09-27 16:24:17.546808884 -0700
++++ i3-4.15/testcases/t/175-startup-notification.t 2018-09-27 16:24:55.587372292 -0700
+@@ -31,11 +31,13 @@
+ my %sn_config;
+ BEGIN {
+ %sn_config = ExtUtils::PkgConfig->find('libstartup-notification-1.0');
++ $sn_config{cflags} .= ' -D_GNU_SOURCE';
+ }
+
+ use Inline C => Config => LIBS => $sn_config{libs}, CCFLAGS => $sn_config{cflags};
+ use Inline C => <<'END_OF_C_CODE';
+
++#include <sys/types.h>
+ #include <xcb/xcb.h>
+
+ #define SN_API_NOT_YET_FROZEN 1