From 98b0a17d77fd029a3295845dcc9c554a4c212c43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Mon, 29 May 2017 09:39:26 +0300
Subject: main/dahdi-tools: upgrade to 2.11.1

---
 main/dahdi-tools/APKBUILD       | 25 +++++++++++--------------
 main/dahdi-tools/fix-musl.patch | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 14 deletions(-)
 create mode 100644 main/dahdi-tools/fix-musl.patch

(limited to 'main/dahdi-tools')

diff --git a/main/dahdi-tools/APKBUILD b/main/dahdi-tools/APKBUILD
index 81c5fd5427..1129adc0ac 100644
--- a/main/dahdi-tools/APKBUILD
+++ b/main/dahdi-tools/APKBUILD
@@ -1,48 +1,45 @@
 # Contributor: Timo Teras <timo.teras@iki.fi>
 # Maintainer: Timo Teras <timo.teras@iki.fi>
 pkgname=dahdi-tools
-pkgver=2.6.1
-pkgrel=2
+pkgver=2.11.1
+pkgrel=0
 pkgdesc="Digium Asterisk Hardware Device Interface management utilities"
 url="http://www.asterisk.org"
 arch="all"
 license="GPL"
 depends=""
-depends_dev="linux-headers dahdi-linux-dev newt-dev"
+depends_dev="bsd-compat-headers linux-headers dahdi-linux-dev newt-dev"
 makedepends="perl $depends_dev"
 install=
 subpackages="$pkgname-doc $pkgname-dev"
 source="http://downloads.digium.com/pub/telephony/dahdi-tools/releases/$pkgname-$pkgver.tar.gz
+	fix-musl.patch
 	$pkgname.initd"
 
 builddir="$srcdir"/$pkgname-$pkgver
 
 build() {
 	cd "$builddir"
-	update_config_guess || return 1
+	eval local `perl -V:vendorlib`
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
 		--prefix=/usr \
 		--sysconfdir=/etc \
 		--mandir=/usr/share/man \
-		--infodir=/usr/share/info \
-		|| return 1
+		--infodir=/usr/share/infoa \
+		--with-perllib="$vendorlib"
 	sed -i -e 's/$(CC) $(LDFLAGS) -o $@ $^/$(CC) $^ $(LDFLAGS) -o $@/' \
 		Makefile
-	make || return 1
+	make
 }
 
 package() {
 	cd "$builddir"
-	eval local `perl -V:vendorlib`
-	make -j1 DESTDIR="$pkgdir" PERLLIBDIR="$vendorlib" install
+	make -j1 DESTDIR="$pkgdir" install
 	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/dahdi
 }
 
-md5sums="c2e4f476a8e7f96a5cad46dd9b648446  dahdi-tools-2.6.1.tar.gz
-37d605b72a52cc81043b9e5726ec77a3  dahdi-tools.initd"
-sha256sums="c12b542be98507915d9c2baae6b376575a11655d50750ef03d0c312171a1badb  dahdi-tools-2.6.1.tar.gz
-01648a0b78cfb1cfd749d030da989d31b30ee5060495136d4c52fec93c851b84  dahdi-tools.initd"
-sha512sums="d00707d30407952162402c0c77610b74d8e5aef73501b4f0db2a41b5e5698914725776ce6abd4a3fffc2a509245b7b0b95da8bb32112e939f3bed4d72c3b897f  dahdi-tools-2.6.1.tar.gz
+sha512sums="d13f799baeaecab4601a379fb703fc169906e873f71baa9d13d688b2a3f4490a1c59eea8bd50e1a08a0712b38e556f8a17d02a8ea5289a003ca91b570ae5b8a6  dahdi-tools-2.11.1.tar.gz
+45955caf04368ff30d60db0b3e892d940c9ac0422b337186ed251108ce25ab305d4590efff452f53f160a53fcd26a273f21d6d093307b426a3a2a6df53584daa  fix-musl.patch
 3850ab9e323ec31d676d311c97d0cde70b809379b6c01c8ff6d5a01a860eb43bf3f18f2de53e952365d17f40638c7cb0481682d96cea5b7fdb1423d3e762e2f3  dahdi-tools.initd"
diff --git a/main/dahdi-tools/fix-musl.patch b/main/dahdi-tools/fix-musl.patch
new file mode 100644
index 0000000000..01a0a302bf
--- /dev/null
+++ b/main/dahdi-tools/fix-musl.patch
@@ -0,0 +1,36 @@
+diff -ru dahdi-tools-2.11.1.orig/xpp/hexfile.h dahdi-tools-2.11.1/xpp/hexfile.h
+--- dahdi-tools-2.11.1.orig/xpp/hexfile.h	2016-03-02 00:04:19.000000000 +0200
++++ dahdi-tools-2.11.1/xpp/hexfile.h	2017-05-29 09:30:50.034438806 +0300
+@@ -26,6 +26,7 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <stdint.h>
++#include <sys/cdefs.h>
+ #include <sys/param.h>
+ #include <syslog.h>
+ #define	PACKED	__attribute__((packed))
+diff -ru dahdi-tools-2.11.1.orig/xpp/xtalk/debug.c dahdi-tools-2.11.1/xpp/xtalk/debug.c
+--- dahdi-tools-2.11.1.orig/xpp/xtalk/debug.c	2016-03-02 00:04:19.000000000 +0200
++++ dahdi-tools-2.11.1/xpp/xtalk/debug.c	2017-05-29 09:30:02.193881232 +0300
+@@ -26,7 +26,6 @@
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <syslog.h>
+-#include <execinfo.h>
+ #include <xtalk/debug.h>
+ #include <autoconfig.h>
+ 
+@@ -61,6 +60,7 @@
+ /* from glibc info(1) */
+ void print_backtrace(FILE *fp)
+ {
++#if 0
+ 	void	*array[10];
+ 	size_t	size;
+ 	char	**strings;
+@@ -71,4 +71,5 @@
+ 	for (i = 0; i < size; i++)
+ 		fprintf(fp, "%s\n", strings[i]);
+ 	free(strings);
++#endif
+ }
-- 
cgit v1.2.3