Commit 6fda81a8 authored by Francesco Colista's avatar Francesco Colista

community/sngrep: upgrade to 1.4.6, switch to openssl

parent 2c6d6191
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
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/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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment