aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Isaksen <d@duniel.no>2017-09-27 01:40:37 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-09-28 10:40:07 +0000
commitae7fb669b2b01c6039e0f8a3990a0f8989813f1f (patch)
tree351c80b3d5d26f4ddafb4579264a681106d042dc
parent1045482631eefea65f4e7198d531949ddb5e5b09 (diff)
downloadaports-ae7fb669b2b01c6039e0f8a3990a0f8989813f1f.tar.bz2
aports-ae7fb669b2b01c6039e0f8a3990a0f8989813f1f.tar.xz
testing/tmate: new aport
-rw-r--r--testing/tmate/APKBUILD51
-rw-r--r--testing/tmate/remove-backtrace-musl.patch28
2 files changed, 79 insertions, 0 deletions
diff --git a/testing/tmate/APKBUILD b/testing/tmate/APKBUILD
new file mode 100644
index 0000000000..82e4bdf021
--- /dev/null
+++ b/testing/tmate/APKBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Daniel Isaksen <d@duniel.no>
+pkgname=tmate
+pkgver=2.2.1
+pkgrel=0
+pkgdesc="Instant Terminal Sharing"
+url="https://tmate.io/"
+arch="all"
+license="ISC"
+depends="ncurses-terminfo"
+makedepends="ncurses-dev libevent-dev autoconf automake bsd-compat-headers
+ libtool zlib-dev libssh-dev msgpack-c-dev libexecinfo-dev"
+install=
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname-io/$pkgname/archive/$pkgver.tar.gz
+ remove-backtrace-musl.patch"
+
+builddir="$srcdir/"$pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+
+ ./autogen.sh || return 1
+
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 example_tmux.conf \
+ "$pkgdir"/usr/share/doc/$pkgname/examples/$pkgname.conf
+ for file in CHANGES FAQ README TODO; do
+ install -m644 "$file" "$pkgdir"/usr/share/doc/$pkgname/
+ done
+}
+
+sha512sums="3d4ce7510cd8da39bc4fe63f2a64179846a813bb3560ca811d9e1e2a28b06d95a9033047a900d76bda069c249d7ebbe1143daa082b23212c5d32a50bf1819d2d tmate-2.2.1.tar.gz
+530f17f86688980fb3e0d48adaff70cc413efafda7025be4f1dfaaf5a3d71ab21ee923a1d658d30691464e375aea73ba1b06a4b5545998c4a7df9dc19fc91561 remove-backtrace-musl.patch"
diff --git a/testing/tmate/remove-backtrace-musl.patch b/testing/tmate/remove-backtrace-musl.patch
new file mode 100644
index 0000000000..650634855b
--- /dev/null
+++ b/testing/tmate/remove-backtrace-musl.patch
@@ -0,0 +1,28 @@
+This is a quite ugly hack to make it compile.
+
+TODO: use libunwind instead.
+
+---
+--- a/tmate-debug.c
++++ b/tmate-debug.c
+@@ -60,18 +60,17 @@ void tmate_print_stack_trace(void)
+ char **strings;
+ size_t i;
+
++#if 0
+ size = backtrace (array, 20);
+ strings = backtrace_symbols (array, size);
+
+ tmate_info ("============ %zd stack frames ============", size);
+
+ for (i = 1; i < size; i++) {
+-#if DEBUG
+ if (print_resolved_stack_frame(strings[i]) < 0)
+-#endif
+ tmate_info("%s", strings[i]);
+ }
+-
++#endif
+ free (strings);
+ }
+