Subject: [alpine-aports] [PATCH v2] testing/babeltrace: new aport

From: Michael Jeanson <[email-masked]>
Date: Fri, 27 May 2016 10:05:30 -0500

https://www.efficios.com/babeltrace
a trace converter and read/write library
---
 testing/babeltrace/APKBUILD                        | 54 ++++++++++++++++++++++
 .../babeltrace/add-sys-param-h-for-maxnamlen.patch | 10 ++++
 testing/babeltrace/glibc-strerr-r.patch            | 11 +++++
 3 files changed, 75 insertions(+)
 create mode 100644 testing/babeltrace/APKBUILD
 create mode 100644 testing/babeltrace/add-sys-param-h-for-maxnamlen.patch
 create mode 100644 testing/babeltrace/glibc-strerr-r.patch

diff --git a/testing/babeltrace/APKBUILD b/testing/babeltrace/APKBUILD
new file mode 100644
index 0000000..c0ba788
--- /dev/null
+++ b/testing/babeltrace/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Michael Jeanson <[email-masked]>
+# Maintainer: Michael Jeanson <[email-masked]>
+pkgname=babeltrace
+pkgver=1.3.2
+pkgrel=0
+pkgdesc="a trace converter and read/write library"
+url="https://www.efficios.com/babeltrace"
+arch="all"
+license="MIT"
+depends=""
+depends_dev="glib-dev"
+makedepends="$depends_dev popt-dev util-linux-dev bash perl"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://www.efficios.com/files/$pkgname/$pkgname-$pkgver.tar.bz2
+	add-sys-param-h-for-maxnamlen.patch
+	glibc-strerr-r.patch"
+
+_builddir="$srcdir"/$pkgname-$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"
+	./configure \
+		--prefix=/usr \
+		|| return 1
+	make || return 1
+	make check || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+md5sums="db01b68d4ccf5648fd754d0166942685  babeltrace-1.3.2.tar.bz2
+4c007de33fd8f1ee9004bc8c0bda204d  add-sys-param-h-for-maxnamlen.patch
+04e05950fafc383a45b4bfc6760cfa4b  glibc-strerr-r.patch"
+sha256sums="d22d77be79f30fd0769a093b8b5a336ea0d45486ab429358ac5deaced00feb23  babeltrace-1.3.2.tar.bz2
+42b609e44dceae72b324d4954f0e607b49668b2734e835194ed74f1360e3e94d  add-sys-param-h-for-maxnamlen.patch
+02fe0271996d38018d462b30730d94c090beaa3543ca06eec2b4768ff1faf08d  glibc-strerr-r.patch"
+sha512sums="3195e3a888f8c20016f5a564bc9468aea8d637c10b486d4858a3c3fcaf0098014fcf94d9b8e29b9f1a7dec8b97dd0c58b6bc1d7e8a76eb12bc923ed5ed7066b3  babeltrace-1.3.2.tar.bz2
+701979e2020c83379aea2dbfa11e1a90268c497001854ad052f9e11ae3db4cbee37df279993cfa02a0d68261fe47cf70c4337f1ef5df71d62dfd78473c845305  add-sys-param-h-for-maxnamlen.patch
+3375818d253b79a4f6bcbd6408f54dcef4a69723309a77408aa8b4fa9e11422500d9f5aec77b8c3f4c25ff39ecbcc26bcdc0f2abe80414860451cb1d8a2eeb62  glibc-strerr-r.patch"
diff --git a/testing/babeltrace/add-sys-param-h-for-maxnamlen.patch b/testing/babeltrace/add-sys-param-h-for-maxnamlen.patch
new file mode 100644
index 0000000..aac67e9
--- /dev/null
+++ b/testing/babeltrace/add-sys-param-h-for-maxnamlen.patch
@@ -0,0 +1,10 @@
+--- babeltrace-1.3.2.orig/formats/lttng-live/lttng-live.h
++++ babeltrace-1.3.2/formats/lttng-live/lttng-live.h
+@@ -25,6 +25,7 @@
+  */
+ 
+ #include <stdint.h>
++#include <sys/param.h>
+ #include "lttng-viewer-abi.h"
+ 
+ #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT	5344
diff --git a/testing/babeltrace/glibc-strerr-r.patch b/testing/babeltrace/glibc-strerr-r.patch
new file mode 100644
index 0000000..be442c3
--- /dev/null
+++ b/testing/babeltrace/glibc-strerr-r.patch
@@ -0,0 +1,11 @@
+--- babeltrace-1.3.2.orig/include/babeltrace/compat/string.h
++++ babeltrace-1.3.2/include/babeltrace/compat/string.h
+@@ -26,7 +26,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ 
+-#if !defined(__linux__) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE))
++#if !defined(__GLIBC__) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE))
+ 
+ /* XSI-compliant strerror_r */
+ static inline
-- 
2.8.3

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---