From 6fda81a869761a53ccc2d0c048c5ece0c4e46391 Mon Sep 17 00:00:00 2001 From: Francesco Colista Date: Sun, 7 Apr 2019 07:08:10 +0000 Subject: community/sngrep: upgrade to 1.4.6, switch to openssl --- community/sngrep/APKBUILD | 15 +++++++++------ community/sngrep/stdin-reopen-musl.patch | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 community/sngrep/stdin-reopen-musl.patch diff --git a/community/sngrep/APKBUILD b/community/sngrep/APKBUILD index c7820f9594c..7dd01e95ed6 100644 --- a/community/sngrep/APKBUILD +++ b/community/sngrep/APKBUILD @@ -1,17 +1,18 @@ # Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=sngrep -pkgver=1.4.5 +pkgver=1.4.6 pkgrel=0 pkgdesc="A tool for displaying SIP call message flows from a terminal" url="https://github.com/irontec/sngrep" arch="all" -license="GPL" +license="GPL-3.0" depends="sed" makedepends="autoconf automake ncurses-dev libpcap-dev - pcre-dev gnutls-dev libgcrypt-dev" + pcre-dev libgcrypt-dev openssl-dev" subpackages="$pkgname-doc" -source="$pkgname-$pkgver.zip::https://github.com/irontec/$pkgname/archive/v$pkgver.zip" +source="$pkgname-$pkgver.zip::https://github.com/irontec/$pkgname/archive/v$pkgver.zip + stdin-reopen-musl.patch" builddir="$srcdir"/$pkgname-$pkgver prepare() { @@ -24,8 +25,9 @@ build() { cd "$builddir" ./configure \ --prefix=/usr \ - --with-gnutls \ + --with-openssl \ --with-pcre \ + --disable-logo \ --enable-ipv6 make } @@ -40,4 +42,5 @@ package() { make DESTDIR="$pkgdir/" install } -sha512sums="2b5ce618ff6f876ec340361c5d674524eb8f56fc84325a13d714bd96b4e249ac7fa56cfd442654ea57aef489f07862260896fcfb16955c759a7cf91e6654c8af sngrep-1.4.5.zip" +sha512sums="94139511d12bd8ce9b133670f8e5850759be91207a659e69601c9811f07b7ad6eded567490f109736d0a6cf5b29f89e910c880ee7d5509cd2f18397b5ea1fdc9 sngrep-1.4.6.zip +ce23fa094bb8905325fde8ffa6d8713c170e30c953a5d452ffe6d9e8e21bfbb53e48e0af776d19c3ed97baee7798d5ee90ec7c4557d49c3bd6754edbcec93625 stdin-reopen-musl.patch" diff --git a/community/sngrep/stdin-reopen-musl.patch b/community/sngrep/stdin-reopen-musl.patch new file mode 100644 index 00000000000..f9f1750254d --- /dev/null +++ b/community/sngrep/stdin-reopen-musl.patch @@ -0,0 +1,20 @@ +diff --git a/src/capture.c b/src/capture.c +index 911c35f..2bcfc56 100644 +--- a/src/capture.c ++++ b/src/capture.c +@@ -190,13 +190,14 @@ capture_offline(const char *infile, const char *outfile) + } + + // Reopen tty for ncurses after pcap have used stdin ++ #ifdef __GLIBC__ + if (!strncmp(infile, "/dev/stdin", 10)) { + if (!(stdin = freopen("/dev/tty", "r", stdin))) { + fprintf(stderr, "Failed to reopen tty while using stdin for capture."); + return 1; + } + } +- ++ #endif + // Get datalink to parse packets correctly + capinfo->link = pcap_datalink(capinfo->handle); + -- cgit v1.2.3