aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstef <l0ls0fo2i@ctrlc.hu>2014-05-15 19:36:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-05-19 14:22:26 +0000
commit8b54d81b531409bc70d0db26c91586e64468ca59 (patch)
treefffa517d282075f33f2838d40351f94e43ec48e8
parent2d63e01e5c8bf15d0025705e537ff54362a9ee29 (diff)
downloadaports-8b54d81b531409bc70d0db26c91586e64468ca59.tar.bz2
aports-8b54d81b531409bc70d0db26c91586e64468ca59.tar.xz
initial packeting of i3 wm
-rw-r--r--testing/i3wm/APKBUILD56
-rw-r--r--testing/i3wm/musl.patch94
2 files changed, 150 insertions, 0 deletions
diff --git a/testing/i3wm/APKBUILD b/testing/i3wm/APKBUILD
new file mode 100644
index 0000000000..386d7a9474
--- /dev/null
+++ b/testing/i3wm/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor:
+# Maintainer:
+pkgname=i3wm
+pkgver=4.7.2
+pkgrel=1
+pkgdesc="A tiling window manager"
+url="http://i3wm.org"
+arch="all"
+license="BSD"
+depends="xcb-util-cursor xcb-util-keysyms xcb-util-wm libev yajl pango cairo startup-notification pcre"
+depends_dev=""
+makedepends="$depends_dev 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"
+install=""
+subpackages="$pkgname-doc"
+source="http://i3wm.org/downloads/i3-${pkgver}.tar.bz2 musl.patch"
+
+_builddir="$srcdir/i3-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir/" install
+ install -Dm644 man/i3.1 "$pkgdir/usr/share/man/man1/i3.1"
+ install -Dm644 man/i3bar.1 "$pkgdir/usr/share/man/man1/i3bar.1"
+ install -Dm644 man/i3-config-wizard.1 "$pkgdir/usr/share/man/man1/i3-config-wizard.1"
+ install -Dm644 man/i3-input.1 "$pkgdir/usr/share/man/man1/i3-input.1"
+ install -Dm644 man/i3-msg.1 "$pkgdir/usr/share/man/man1/i3-msg.1"
+ install -Dm644 man/i3-migrate-config-to-v4.1 "$pkgdir/usr/share/man/man1/i3-migrate-config-to-v4.1"
+ install -Dm644 man/i3-nagbar.1 "$pkgdir/usr/share/man/man1/i3-nagbar.1"
+ install -Dm644 man/i3-dmenu-desktop.1 "$pkgdir/usr/share/man/man1/i3-dmenu-desktop.1"
+ install -Dm644 man/i3-dump-log.1 "$pkgdir/usr/share/man/man1/i3-dump-log.1"
+ install -Dm644 man/i3-sensible-editor.1 "$pkgdir/usr/share/man/man1/i3-sensible-editor.1"
+ install -Dm644 man/i3-sensible-pager.1 "$pkgdir/usr/share/man/man1/i3-sensible-pager.1"
+ install -Dm644 man/i3-sensible-terminal.1 "$pkgdir/usr/share/man/man1/i3-sensible-terminal.1"
+ make clean
+}
+
+md5sums="64141f7c23f97cd1e52c52918476c1c8 i3-4.7.2.tar.bz2
+f4baffffe55d83deb61bfe880c248794 musl.patch"
+sha256sums="6fe4565e364a5017eb6a89ce104d6bb21afcdb4bb0b3bee9526781fa64b1f393 i3-4.7.2.tar.bz2
+bcbecf73b63715b88264e5a1628a1267ce996431b57a3fc2db336b42e08626b9 musl.patch"
+sha512sums="eae646b97c46e464824f62cb95ce2e80298d5432abb9c8f94dba87dcaf1f05e00e9d4bd23d62ba332e0a408203d8b31709de04073f954578a0ee3d353ed74402 i3-4.7.2.tar.bz2
+860b2c3d3977652e81781bf30319b22dd9f3285ed2ca9474d2dd23e4787d9e19954ca7de6f320f1c6c326ee776cbf475d5aa6d861c49e59af6a831f601ba17a9 musl.patch"
diff --git a/testing/i3wm/musl.patch b/testing/i3wm/musl.patch
new file mode 100644
index 0000000000..47a0f23316
--- /dev/null
+++ b/testing/i3wm/musl.patch
@@ -0,0 +1,94 @@
+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 ~
+ *
+ */
++#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);
+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.
+ *
+ */
++#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().