import sysutils/moreutils: ok dcoppa@

moreutils is a growing collection of the unix tools that nobody thought
to write long ago when unix was young, including amongst others:

lckdo: execute a program with a lock held
mispipe: pipe two commands, returning the exit status of the first
pee: tee standard input to pipes
sponge: soak up standard input and write to a file
ts: timestamp standard input
vidir: edit a directory in your text editor
vipe: insert a text editor into a pipe
zrun: automatically uncompress arguments to command
This commit is contained in:
sthen 2011-05-04 14:11:59 +00:00
parent 0284ce7f93
commit d94d6330a1
7 changed files with 157 additions and 0 deletions

View File

@ -0,0 +1,35 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/05/04 14:11:59 sthen Exp $
COMMENT = miscellaneous unix tools
DISTNAME = moreutils_0.44
PKGNAME = ${DISTNAME:S/_/-/}
WRKDIST = ${WRKDIR}/moreutils
CATEGORIES = sysutils
HOMEPAGE = http://joey.kitenet.net/code/moreutils/
MAINTAINER = Stuart Henderson <sthen@openbsd.org>
# GPLv2+
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM = Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB += c
MASTER_SITES = http://ftp.de.debian.org/debian/pool/main/m/moreutils/
BUILD_DEPENDS = textproc/docbook2x
RUN_DEPENDS = devel/p5-IPC-Run \
devel/p5-Time-Duration \
devel/p5-Time-TimeDate
MAKE_FLAGS = DOCBOOK2XMAN=docbook2man
FAKE_FLAGS = PREFIX=${PREFIX}
USE_GMAKE = Yes
NO_REGRESS = Yes
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (moreutils_0.44.tar.gz) = o/sLE5PDgarojYE5QAwk3A==
RMD160 (moreutils_0.44.tar.gz) = KiOhdafp03BNut1AILnQHUKpTus=
SHA1 (moreutils_0.44.tar.gz) = c7fLOwb3TWGmE/I28AvVyB67+84=
SHA256 (moreutils_0.44.tar.gz) = U+wqlntKs5zSnl+RFrb3t17v25fnaP57GwT7aI0jZgQ=
SIZE (moreutils_0.44.tar.gz) = 44685

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2011/05/04 14:11:59 sthen Exp $
--- Makefile.orig Fri Oct 29 20:47:09 2010
+++ Makefile Sun May 1 13:41:02 2011
@@ -1,4 +1,5 @@
-BINS=isutf8 ifdata ifne pee sponge mispipe lckdo parallel
+BINS=isutf8 ifdata ifne pee sponge mispipe lckdo
+#parallel - wants waitid()
PERLSCRIPTS=vidir vipe ts combine zrun chronic
MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 chronic.1 mispipe.1 lckdo.1 parallel.1
CFLAGS=-O2 -g -Wall
@@ -17,8 +18,8 @@ install:
$(INSTALL_BIN) $(BINS) $(DESTDIR)$(PREFIX)/bin
install $(PERLSCRIPTS) $(DESTDIR)$(PREFIX)/bin
- mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
- install $(MANS) $(DESTDIR)$(PREFIX)/share/man/man1
+ mkdir -p $(DESTDIR)$(PREFIX)/man/man1
+ install $(MANS) $(DESTDIR)$(PREFIX)/man/man1
check: isutf8
./check-isutf8

View File

@ -0,0 +1,46 @@
$OpenBSD: patch-ifdata_c,v 1.1.1.1 2011/05/04 14:11:59 sthen Exp $
--- ifdata.c.orig Fri Apr 29 17:12:23 2011
+++ ifdata.c Fri Apr 29 17:19:47 2011
@@ -10,10 +10,14 @@
#include <linux/if.h>
#endif
-#if defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
#include <net/if.h>
#endif
+#ifndef s6_addr16
+#define s6_addr16 __u6_addr.__u6_addr16
+#endif
+
#include <netinet/in.h>
#include <errno.h>
#include <fcntl.h>
@@ -220,7 +224,7 @@ struct sockaddr *if_network(const char *iface) {
return saddr;
}
-int if_mtu(const char *iface) {
+int ifd_if_mtu(const char *iface) {
static struct ifreq req;
if (do_socket_ioctl(iface, SIOCGIFMTU, &req, NULL, PRINT_ERROR))
@@ -388,7 +392,7 @@ void please_do(int ndo, int *todo, const char *ifname)
print_addr(if_bcast(ifname, &req));
break;
case DO_PMTU:
- printf("%d", if_mtu(ifname));
+ printf("%d", ifd_if_mtu(ifname));
break;
case DO_PNETWORK:
print_addr(if_network(ifname));
@@ -400,7 +404,7 @@ void please_do(int ndo, int *todo, const char *ifname)
printf(" ");
print_addr(if_bcast(ifname, &req));
printf(" ");
- printf("%d", if_mtu(ifname));
+ printf("%d", ifd_if_mtu(ifname));
break;
#if defined(__linux__)
case DO_SINPACKETS:

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-ifne_c,v 1.1.1.1 2011/05/04 14:11:59 sthen Exp $
--- ifne.c.orig Sun May 1 13:12:58 2011
+++ ifne.c Sun May 1 13:13:20 2011
@@ -23,6 +23,7 @@
#include <sys/wait.h>
#include <sys/types.h>
#include <string.h>
+#include <signal.h>
#define streq(a, b) (!strcmp((a), (b)))
static void stdin_to_stream(char *buf, ssize_t r, FILE *outf) {

View File

@ -0,0 +1,11 @@
moreutils is a growing collection of the unix tools that nobody thought
to write long ago when unix was young, including amongst others:
lckdo: execute a program with a lock held
mispipe: pipe two commands, returning the exit status of the first
pee: tee standard input to pipes
sponge: soak up standard input and write to a file
ts: timestamp standard input
vidir: edit a directory in your text editor
vipe: insert a text editor into a pipe
zrun: automatically uncompress arguments to command

View File

@ -0,0 +1,28 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/05/04 14:11:59 sthen Exp $
bin/chronic
bin/combine
@bin bin/ifdata
@bin bin/ifne
@bin bin/isutf8
@bin bin/lckdo
@bin bin/mispipe
@bin bin/pee
@bin bin/sponge
bin/ts
bin/vidir
bin/vipe
bin/zrun
@man man/man1/chronic.1
@man man/man1/combine.1
@man man/man1/ifdata.1
@man man/man1/ifne.1
@man man/man1/isutf8.1
@man man/man1/lckdo.1
@man man/man1/mispipe.1
@comment @man man/man1/parallel.1
@man man/man1/pee.1
@man man/man1/sponge.1
@man man/man1/ts.1
@man man/man1/vidir.1
@man man/man1/vipe.1
@man man/man1/zrun.1