void-packages/srcpkgs/i3/patches/musl.patch
2015-05-13 08:02:01 +02:00

89 lines
2.6 KiB
Diff

--- common.mk 2014-01-23 21:52:24.000000000 +0000
+++ 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
--- i3-config-wizard/main.c 2014-01-23 21:52:24.000000000 +0000
+++ 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.
--- i3bar/src/main.c 2014-01-23 21:52:24.000000000 +0000
+++ i3bar/src/main.c 2014-05-15 18:42:55.520000001 +0000
@@ -44,6 +44,7 @@
* Glob path, i.e. expand ~
*
*/
+#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;
}
+#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);
--- libi3/libi3.mk 2014-01-23 21:52:24.000000000 +0000
+++ 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"
--- src/util.c 2014-01-23 21:52:24.000000000 +0000
+++ 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.
*
*/
+#ifdef GLOB_TILDE
char *resolve_tilde(const char *path) {
static glob_t globbuf;
char *head, *tail, *result;
@@ -150,6 +151,12 @@
return result;
}
+#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().