aboutsummaryrefslogtreecommitdiffstats
path: root/testing/i3wm/musl.patch
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2015-10-06 23:07:28 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2015-10-06 23:13:55 +0200
commit90678d9ab803b9eeb095c97fdc5c00d6aa1617bc (patch)
tree4f203cdc3a6d8c97b6bd463bbfb974e9ce2c1b5a /testing/i3wm/musl.patch
parent9062e978a8ed8fdebee6f3122e38f6b148d26700 (diff)
downloadaports-90678d9ab803b9eeb095c97fdc5c00d6aa1617bc.tar.bz2
aports-90678d9ab803b9eeb095c97fdc5c00d6aa1617bc.tar.xz
testing/i3wm: upgrade to 4.11
Diffstat (limited to 'testing/i3wm/musl.patch')
-rw-r--r--testing/i3wm/musl.patch125
1 files changed, 41 insertions, 84 deletions
diff --git a/testing/i3wm/musl.patch b/testing/i3wm/musl.patch
index 47a0f23316..56feaa9814 100644
--- a/testing/i3wm/musl.patch
+++ b/testing/i3wm/musl.patch
@@ -1,94 +1,51 @@
-diff -urw i3-4.7.2/common.mk i3-4.7.2-musl/common.mk
---- i3-4.7.2/common.mk 2014-01-23 21:52:24.000000000 +0000
-+++ i3-4.7.2-musl/common.mk 2014-05-15 18:42:55.620000001 +0000
-@@ -136,6 +136,7 @@
- LIBSN_LIBS := $(call ldflags_for_lib, libstartup-notification-1.0,startup-notification-1)
-
- # Pango
-+PANGO_CFLAGS := $(call cflags_for_lib, pango)
- PANGO_CFLAGS := $(call cflags_for_lib, cairo)
- PANGO_CFLAGS += $(call cflags_for_lib, pangocairo)
- I3_CPPFLAGS += -DPANGO_SUPPORT=1
-diff -urw i3-4.7.2/i3-config-wizard/main.c i3-4.7.2-musl/i3-config-wizard/main.c
---- i3-4.7.2/i3-config-wizard/main.c 2014-01-23 21:52:24.000000000 +0000
-+++ i3-4.7.2-musl/i3-config-wizard/main.c 2014-05-15 18:42:55.646666668 +0000
-@@ -448,6 +448,8 @@
- * or multiple matches are found, it just returns a copy of path as given.
- *
- */
-+
-+#ifdef GLOB_TILDE
- static char *resolve_tilde(const char *path) {
- static glob_t globbuf;
- char *head, *tail, *result;
-@@ -473,6 +475,11 @@
-
- return result;
- }
-+#else // glob-tilde is a glibc gnuism
-+static char *resolve_tilde(const char *path) {
-+ return strdup(path);
-+}
-+#endif
-
- /*
- * Handles expose events, that is, draws the window contents.
-diff -urw i3-4.7.2/i3bar/src/main.c i3-4.7.2-musl/i3bar/src/main.c
---- i3-4.7.2/i3bar/src/main.c 2014-01-23 21:52:24.000000000 +0000
-+++ i3-4.7.2-musl/i3bar/src/main.c 2014-05-15 18:42:55.520000001 +0000
-@@ -44,6 +44,7 @@
- * Glob path, i.e. expand ~
+diff -upr i3-4.11.orig/i3bar/src/main.c i3-4.11/i3bar/src/main.c
+--- i3-4.11.orig/i3bar/src/main.c 2015-10-06 22:45:01.791199587 +0200
++++ i3-4.11/i3bar/src/main.c 2015-10-06 22:45:52.921029327 +0200
+@@ -45,14 +45,7 @@ void debuglog(char *fmt, ...) {
*
*/
-+#ifdef GLOB_TILDE
char *expand_path(char *path) {
- static glob_t globbuf;
- if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0) {
-@@ -54,6 +55,11 @@
- globfree(&globbuf);
- return result;
+- static glob_t globbuf;
+- if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0) {
+- ELOG("glob() failed\n");
+- exit(EXIT_FAILURE);
+- }
+- char *result = sstrdup(globbuf.gl_pathc > 0 ? globbuf.gl_pathv[0] : path);
+- globfree(&globbuf);
+- return result;
++ return sstrdup(path);
}
-+#else
-+char *expand_path(char *path) {
-+ return strdup(path);
-+}
-+#endif
void print_usage(char *elf_name) {
- printf("Usage: %s -b bar_id [-s sock_path] [-h] [-v]\n", elf_name);
-diff -urw i3-4.7.2/libi3/libi3.mk i3-4.7.2-musl/libi3/libi3.mk
---- i3-4.7.2/libi3/libi3.mk 2014-01-23 21:52:24.000000000 +0000
-+++ i3-4.7.2-musl/libi3/libi3.mk 2014-05-15 18:42:55.653333335 +0000
-@@ -10,7 +10,7 @@
-
- libi3/%.o: libi3/%.c $(libi3_HEADERS)
- echo "[libi3] CC $<"
-- $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(libi3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
-+ $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(libi3_CFLAGS) $(I3_CFLAGS) $(PANGO_CFLAGS) $(CFLAGS) -c -o $@ $<
-
- libi3.a: $(libi3_OBJECTS)
- echo "[libi3] AR libi3.a"
-diff -urw i3-4.7.2/src/util.c i3-4.7.2-musl/src/util.c
---- i3-4.7.2/src/util.c 2014-01-23 21:52:24.000000000 +0000
-+++ i3-4.7.2-musl/src/util.c 2014-05-15 18:42:55.490000000 +0000
-@@ -125,6 +125,7 @@
- * or multiple matches are found, it just returns a copy of path as given.
+diff -upr i3-4.11.orig/libi3/resolve_tilde.c i3-4.11/libi3/resolve_tilde.c
+--- i3-4.11.orig/libi3/resolve_tilde.c 2015-10-06 22:45:01.801199553 +0200
++++ i3-4.11/libi3/resolve_tilde.c 2015-10-06 22:46:32.874229612 +0200
+@@ -19,27 +19,5 @@
*
*/
-+#ifdef GLOB_TILDE
char *resolve_tilde(const char *path) {
- static glob_t globbuf;
- char *head, *tail, *result;
-@@ -150,6 +151,12 @@
-
- return result;
+- static glob_t globbuf;
+- char *head, *tail, *result;
+-
+- 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));
+- }
+- globfree(&globbuf);
+-
+- return result;
++ return sstrdup(path);
}
-+#else
-+// libc like musl does not support this gnuism
-+char *resolve_tilde(const char *path) {
-+ return sstrdup(path);
-+}
-+#endif
-
- /*
- * Checks if the given path exists by calling stat().