Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 775411A9239 for ; Wed, 22 Dec 2021 16:16:32 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 9529984EF8; Wed, 22 Dec 2021 16:16:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id CFF6484D3A for ; Wed, 22 Dec 2021 16:16:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id L9oGoZC8VMaL for ; Wed, 22 Dec 2021 16:16:30 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 26EDB84D0E for ; Wed, 22 Dec 2021 16:16:30 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 1AE25FAEC; Wed, 22 Dec 2021 16:16:30 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1640189790156630" MIME-Version: 1.0 Date: Wed, 22 Dec 2021 16:16:30 +0000 From: "Amitai Schleier" Subject: CVS commit: pkgsrc/net/prettyping To: pkgsrc-changes@NetBSD.org Reply-To: schmonz@netbsd.org X-Mailer: log_accum Message-Id: <20211222161630.1AE25FAEC@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1640189790156630 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: schmonz Date: Wed Dec 22 16:16:30 UTC 2021 Added Files: pkgsrc/net/prettyping: DESCR Makefile PLIST distinfo pkgsrc/net/prettyping/patches: patch-prettyping Log Message: Add prettyping, a wrapper to colorize and simplify ping's output. `prettyping` runs the standard `ping` in the background and parses its output, showing the ping responses in a *graphical* way at the terminal (by using colors and Unicode characters). `prettyping` is written in `bash` and `awk`, and is reported to work on many different systems and different versions of `awk`. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 pkgsrc/net/prettyping/DESCR \ pkgsrc/net/prettyping/Makefile pkgsrc/net/prettyping/PLIST \ pkgsrc/net/prettyping/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/net/prettyping/patches/patch-prettyping Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1640189790156630 Content-Disposition: inline Content-Length: 3643 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Added files: Index: pkgsrc/net/prettyping/DESCR diff -u /dev/null pkgsrc/net/prettyping/DESCR:1.1 --- /dev/null Wed Dec 22 16:16:30 2021 +++ pkgsrc/net/prettyping/DESCR Wed Dec 22 16:16:29 2021 @@ -0,0 +1,10 @@ +`prettyping` is a wrapper around the standard `ping` tool with the +objective of making the output prettier, more colorful, more compact, +and easier to read. + +`prettyping` runs the standard `ping` in the background and parses its +output, showing the ping responses in a *graphical* way at the terminal +(by using colors and Unicode characters). + +`prettyping` is written in `bash` and `awk`, and is reported to work on +many different systems and different versions of `awk`. Index: pkgsrc/net/prettyping/Makefile diff -u /dev/null pkgsrc/net/prettyping/Makefile:1.1 --- /dev/null Wed Dec 22 16:16:30 2021 +++ pkgsrc/net/prettyping/Makefile Wed Dec 22 16:16:29 2021 @@ -0,0 +1,29 @@ +# $NetBSD: Makefile,v 1.1 2021/12/22 16:16:29 schmonz Exp $ + +GITHUB_TAG= refs/tags/v${PKGVERSION_NOREV} +DISTNAME= prettyping-1.0.1 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_GITHUB:=denilsonsa/} + +MAINTAINER= schmonz@NetBSD.org +HOMEPAGE= https://github.com/denilsonsa/prettyping/ +COMMENT= Wrapper to colorize and simplify ping's output +LICENSE= mit + +WRKSRC= ${WRKDIR}/${DISTNAME} + +USE_LANGUAGES= # none +NO_BUILD= yes + +USE_TOOLS+= bash:run +REPLACE_INTERPRETER+= bash +REPLACE.bash.old= /usr/bin/env bash +REPLACE.bash.new= ${BASH} +REPLACE_FILES.bash= ${PKGBASE} + +INSTALLATION_DIRS= bin + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/${PKGBASE} ${DESTDIR}${PREFIX}/bin + +.include "../../mk/bsd.pkg.mk" Index: pkgsrc/net/prettyping/PLIST diff -u /dev/null pkgsrc/net/prettyping/PLIST:1.1 --- /dev/null Wed Dec 22 16:16:30 2021 +++ pkgsrc/net/prettyping/PLIST Wed Dec 22 16:16:29 2021 @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1 2021/12/22 16:16:29 schmonz Exp $ +bin/prettyping Index: pkgsrc/net/prettyping/distinfo diff -u /dev/null pkgsrc/net/prettyping/distinfo:1.1 --- /dev/null Wed Dec 22 16:16:30 2021 +++ pkgsrc/net/prettyping/distinfo Wed Dec 22 16:16:29 2021 @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2021/12/22 16:16:29 schmonz Exp $ + +BLAKE2s (prettyping-1.0.1.tar.gz) = 0bb8630087e703943d0d0c42b3b2b997bee0749a4a8cf5a3b30df3f4906dfb8b +SHA512 (prettyping-1.0.1.tar.gz) = 967626f11cd58fd9a0ce91a320caf6b6a296681ed809e04188f0cfe00d03c80a3620bf4d3ec86e855be363810763ff3ccd8bb0a959d03e62b31edba2cfae7f79 +Size (prettyping-1.0.1.tar.gz) = 10104 bytes +SHA1 (patch-prettyping) = 1ebd90dd1a7691eb02b64f789ee472c61d82a2ee Index: pkgsrc/net/prettyping/patches/patch-prettyping diff -u /dev/null pkgsrc/net/prettyping/patches/patch-prettyping:1.1 --- /dev/null Wed Dec 22 16:16:30 2021 +++ pkgsrc/net/prettyping/patches/patch-prettyping Wed Dec 22 16:16:29 2021 @@ -0,0 +1,24 @@ +$NetBSD: patch-prettyping,v 1.1 2021/12/22 16:16:29 schmonz Exp $ + +Borrow IPv6 fixes for BSD and macOS from Homebrew. + +--- prettyping.orig 2017-04-03 07:49:23.000000000 +0000 ++++ prettyping +@@ -742,7 +742,7 @@ BEGIN { + ############################################################ + # Main loop + { +- if ( $0 ~ /^[0-9]+ bytes from .*: icmp_[rs]eq=[0-9]+ ttl=[0-9]+ time=[0-9.]+ *ms/ ) { ++ if ( $0 ~ /^[0-9]+ bytes from .*[:,] icmp_[rs]eq=[0-9]+ (ttl|hlim)=[0-9]+ time=[0-9.]+ *ms/ ) { + # Sample line from ping: + # 64 bytes from 8.8.8.8: icmp_seq=1 ttl=49 time=184 ms + if ( other_line_times >= 2 ) { +@@ -751,7 +751,7 @@ BEGIN { + + # $1 = useless prefix string + # $2 = icmp_seq +- # $3 = ttl ++ # $3 = ttl/hlim + # $4 = time + + # This must be called before incrementing the last_seq variable! --_----------=_1640189790156630--