diff options
author | leot <leot@pkgsrc.org> | 2017-09-04 09:44:41 +0000 |
---|---|---|
committer | leot <leot@pkgsrc.org> | 2017-09-04 09:44:41 +0000 |
commit | 39c41f0dd911b3b620b6cf5615af7748546ef986 (patch) | |
tree | fdd4abefe1d9f8fd8f26457b9ddb3015e4231323 /misc | |
parent | 2bf0c17dfd96817775b2089e427ee71caf2b4801 (diff) | |
download | pkgsrc-39c41f0dd911b3b620b6cf5615af7748546ef986.tar.gz |
Import moreutils-0.60 as misc/moreutils
moreutils is a growing collection of the unix tools that nobody
thought to write long ago when unix was young.
It consists of these tools:
- chronic: runs a command quietly unless it fails
- combine: combine the lines in two files using boolean operations
- errno: look up errno names and descriptions
- ifdata: get network interface info without parsing ifconfig output
- isutf8: check if a file or standard input is utf-8
- ifne: run a command if the standard input is not empty
- lckdo: execute a program with a lock held (deprecated)
- mispipe: pipe two commands, returning the exit status of the first
- parallel: run multiple jobs at once
- 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
Originally packaged in pkgsrc-wip by myself and <wiz>.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/moreutils/DESCR | 20 | ||||
-rw-r--r-- | misc/moreutils/Makefile | 45 | ||||
-rw-r--r-- | misc/moreutils/PLIST | 31 | ||||
-rw-r--r-- | misc/moreutils/distinfo | 9 | ||||
-rw-r--r-- | misc/moreutils/patches/patch-Makefile | 30 | ||||
-rw-r--r-- | misc/moreutils/patches/patch-ifdata.c | 15 | ||||
-rw-r--r-- | misc/moreutils/patches/patch-is__utf8_Makefile | 19 |
7 files changed, 169 insertions, 0 deletions
diff --git a/misc/moreutils/DESCR b/misc/moreutils/DESCR new file mode 100644 index 00000000000..7b250a8bc15 --- /dev/null +++ b/misc/moreutils/DESCR @@ -0,0 +1,20 @@ +moreutils is a growing collection of the unix tools that nobody +thought to write long ago when unix was young. + +It consists of these tools: + + - chronic: runs a command quietly unless it fails + - combine: combine the lines in two files using boolean operations + - errno: look up errno names and descriptions + - ifdata: get network interface info without parsing ifconfig output + - isutf8: check if a file or standard input is utf-8 + - ifne: run a command if the standard input is not empty + - lckdo: execute a program with a lock held (deprecated) + - mispipe: pipe two commands, returning the exit status of the first + - parallel: run multiple jobs at once + - 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 diff --git a/misc/moreutils/Makefile b/misc/moreutils/Makefile new file mode 100644 index 00000000000..b2ab9705292 --- /dev/null +++ b/misc/moreutils/Makefile @@ -0,0 +1,45 @@ +# $NetBSD: Makefile,v 1.1 2017/09/04 09:44:41 leot Exp $ + +DISTNAME= moreutils_0.60.orig +PKGNAME= ${DISTNAME:S/_/-/:S/.orig//} +CATEGORIES= misc +MASTER_SITES= ${MASTER_SITE_DEBIAN:=pool/main/m/moreutils/} +EXTRACT_SUFX= .tar.xz + +MAINTAINER= leot@NetBSD.org +HOMEPAGE= https://joeyh.name/code/moreutils/ +COMMENT= Additional Unix utilities +LICENSE= gnu-gpl-v2 + +BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl +BUILD_DEPENDS+= libxml2-[0-9]*:../../textproc/libxml2 +BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt + +DEPENDS+= p5-IPC-Run-[0-9]*:../../devel/p5-IPC-Run + +USE_TOOLS+= gmake pod2man perl:run +WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} + +REPLACE_PERL+= chronic +REPLACE_PERL+= combine +REPLACE_PERL+= ts +REPLACE_PERL+= vidir +REPLACE_PERL+= vipe +REPLACE_PERL+= zrun + +SUBST_CLASSES+= pkgmandir +SUBST_STAGE.pkgmandir= pre-configure +SUBST_FILES.pkgmandir= Makefile +SUBST_MESSAGE.pkgmandir= Fixing man page installation. +SUBST_SED.pkgmandir= -e 's,share/man,${PKGMANDIR},' + +MAKE_ENV+= \ + PREFIX=${PREFIX} \ + CFLAGS=${CFLAGS:Q} \ + LDFLAGS=${LDFLAGS:Q} \ + DOCBOOKXSL=${PREFIX}/share/xsl/docbook \ + INSTALL_BIN=${INSTALL_PROGRAM:Q} \ + INSTALL_MAN=${INSTALL_MAN:Q} \ + INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} + +.include "../../mk/bsd.pkg.mk" diff --git a/misc/moreutils/PLIST b/misc/moreutils/PLIST new file mode 100644 index 00000000000..d7b32d3e7f5 --- /dev/null +++ b/misc/moreutils/PLIST @@ -0,0 +1,31 @@ +@comment $NetBSD: PLIST,v 1.1 2017/09/04 09:44:41 leot Exp $ +bin/chronic +bin/combine +bin/errno +bin/ifdata +bin/ifne +bin/isutf8 +bin/lckdo +bin/mispipe +bin/parallel +bin/pee +bin/sponge +bin/ts +bin/vidir +bin/vipe +bin/zrun +man/man1/chronic.1 +man/man1/combine.1 +man/man1/errno.1 +man/man1/ifdata.1 +man/man1/ifne.1 +man/man1/isutf8.1 +man/man1/lckdo.1 +man/man1/mispipe.1 +man/man1/parallel.1 +man/man1/pee.1 +man/man1/sponge.1 +man/man1/ts.1 +man/man1/vidir.1 +man/man1/vipe.1 +man/man1/zrun.1 diff --git a/misc/moreutils/distinfo b/misc/moreutils/distinfo new file mode 100644 index 00000000000..1f1ba82a7a1 --- /dev/null +++ b/misc/moreutils/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1 2017/09/04 09:44:41 leot Exp $ + +SHA1 (moreutils_0.60.orig.tar.xz) = 3af60490f763ece48b2fcba968903673c3e63495 +RMD160 (moreutils_0.60.orig.tar.xz) = aa3700e114f51513bf52123eae19d3f9625d7052 +SHA512 (moreutils_0.60.orig.tar.xz) = 3fb5d8e140a90d805c4cd0de74248a5ea830ba8f90c56afdeb537391c32984cbb9701d4d9caf187a5f9284dfe791d1f7a333af3aac2a4860e2041c414e5cb788 +Size (moreutils_0.60.orig.tar.xz) = 79360 bytes +SHA1 (patch-Makefile) = 757f0d98eaa43537dfaadcda87346562e3a2137c +SHA1 (patch-ifdata.c) = 5c0d9737657354ad1877f2efc6ff08e76ca7bc62 +SHA1 (patch-is__utf8_Makefile) = 8feacdc8a0a0939aefd7f647be8196bdfdbda66c diff --git a/misc/moreutils/patches/patch-Makefile b/misc/moreutils/patches/patch-Makefile new file mode 100644 index 00000000000..b8930fddffc --- /dev/null +++ b/misc/moreutils/patches/patch-Makefile @@ -0,0 +1,30 @@ +$NetBSD: patch-Makefile,v 1.1 2017/09/04 09:44:41 leot Exp $ + +Instruct Makefile to properly handle also man pages and scripts via +corresponding INSTALL_{MAN,SCRIPT} in a similar vein of INSTALL_BIN. + +--- Makefile.orig 2016-08-13 13:58:21.000000000 +0000 ++++ Makefile +@@ -3,6 +3,8 @@ PERLSCRIPTS=vidir vipe ts combine zrun c + 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 errno.1 + CFLAGS?=-O2 -g -Wall + INSTALL_BIN?=install -s ++INSTALL_MAN?=install ++INSTALL_SCRIPT?=install + PREFIX?=/usr + + ifneq (,$(findstring CYGWIN,$(shell uname))) +@@ -25,10 +27,10 @@ isutf8: is_utf8/*.c is_utf8/*.h + install: + mkdir -p $(DESTDIR)$(PREFIX)/bin + $(INSTALL_BIN) $(BINS) $(DESTDIR)$(PREFIX)/bin +- install $(PERLSCRIPTS) $(DESTDIR)$(PREFIX)/bin ++ $(INSTALL_SCRIPT) $(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_MAN) $(MANS) $(DESTDIR)$(PREFIX)/man/man1 + + check: isutf8 + ./is_utf8/test.sh diff --git a/misc/moreutils/patches/patch-ifdata.c b/misc/moreutils/patches/patch-ifdata.c new file mode 100644 index 00000000000..f4027b8bc2f --- /dev/null +++ b/misc/moreutils/patches/patch-ifdata.c @@ -0,0 +1,15 @@ +$NetBSD: patch-ifdata.c,v 1.1 2017/09/04 09:44:41 leot Exp $ + +Add NetBSD support. + +--- ifdata.c.orig 2016-08-13 13:58:21.000000000 +0000 ++++ ifdata.c +@@ -18,7 +18,7 @@ + #include <net/if.h> + #endif + +-#if defined(__APPLE__) || defined(__OpenBSD__) ++#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) + #define s6_addr16 __u6_addr.__u6_addr16 + #include <net/if.h> + #endif diff --git a/misc/moreutils/patches/patch-is__utf8_Makefile b/misc/moreutils/patches/patch-is__utf8_Makefile new file mode 100644 index 00000000000..6eefcacf0ee --- /dev/null +++ b/misc/moreutils/patches/patch-is__utf8_Makefile @@ -0,0 +1,19 @@ +$NetBSD: patch-is__utf8_Makefile,v 1.1 2017/09/04 09:44:41 leot Exp $ + +Honor LDFLAGS for RELRO builds. + +--- is_utf8/Makefile.orig 2016-08-13 13:58:21.000000000 +0000 ++++ is_utf8/Makefile +@@ -41,10 +41,10 @@ CC = gcc + CFLAGS = -O3 -Wextra -Wall -ansi -Wstrict-prototypes + + $(NAME): $(OBJ) +- $(CC) $(CFLAGS) -o $(NAME) $(OBJ) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(NAME) $(OBJ) + + IS_UTF8_LIB: +- $(CC) --shared -fPIC $(CFLAGS) $(LIB_SRC) -o $(LINKERNAME) ++ $(CC) --shared -fPIC $(CFLAGS) $(LDFLAGS) $(LIB_SRC) -o $(LINKERNAME) + + all: + @make $(NAME) |