pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/fdtools Initial import of fdtools, to manipul...
details: https://anonhg.NetBSD.org/pkgsrc/rev/06c0015d5c37
branches: trunk
changeset: 369691:06c0015d5c37
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Tue Oct 03 00:43:22 2017 +0000
description:
Initial import of fdtools, to manipulate file descriptors from shell scripts.
fdtools is a set of utilities for working with file descriptors. With
these tools, you can examine and manipulate file descriptor properties
from shell scripts, where without them you might have resorted to a
different language. These tools can rewind file descriptors, switch them
between blocking and nonblocking mode, and examine their inode
information. On some systems (currently only Linux, as far as I know)
they can also allocate, lock, and switch virtual consoles.
diffstat:
sysutils/fdtools/DESCR | 7 ++
sysutils/fdtools/Makefile | 32 ++++++++++
sysutils/fdtools/PLIST | 12 +++
sysutils/fdtools/distinfo | 10 +++
sysutils/fdtools/patches/patch-conf-compile_defaults_host__compile.sh | 13 ++++
sysutils/fdtools/patches/patch-conf-compile_defaults_host__link.sh | 12 +++
sysutils/fdtools/patches/patch-src_recvfd.c | 16 +++++
sysutils/fdtools/patches/patch-src_sigsched.c | 21 ++++++
8 files changed, 123 insertions(+), 0 deletions(-)
diffs (155 lines):
diff -r 62d5780e2ea6 -r 06c0015d5c37 sysutils/fdtools/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/fdtools/DESCR Tue Oct 03 00:43:22 2017 +0000
@@ -0,0 +1,7 @@
+fdtools is a set of utilities for working with file descriptors. With
+these tools, you can examine and manipulate file descriptor properties
+from shell scripts, where without them you might have resorted to a
+different language. These tools can rewind file descriptors, switch them
+between blocking and nonblocking mode, and examine their inode
+information. On some systems (currently only Linux, as far as I know)
+they can also allocate, lock, and switch virtual consoles.
diff -r 62d5780e2ea6 -r 06c0015d5c37 sysutils/fdtools/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/fdtools/Makefile Tue Oct 03 00:43:22 2017 +0000
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+DISTNAME= fdtools-2015.03.28
+CATEGORIES= sysutils
+MASTER_SITES= http://code.dogmap.org/fdtools/releases/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= schmonz%NetBSD.org@localhost
+HOMEPAGE= http://code.dogmap.org/fdtools/
+COMMENT= Manipulate file descriptor properties from shell scripts
+LICENSE= gnu-gpl-v2
+
+DJB_RESTRICTED= no
+
+WRKSRC= ${WRKDIR}/misc/${PKGNAME_NOREV}
+DJB_SLASHPACKAGE= YES
+
+INSTALLATION_DIRS+= bin
+
+do-configure:
+ ${ECHO} ${PREFIX} > ${WRKSRC}/conf-compile/defaults/package_home
+ ${ECHO} ${PREFIX}/lib/skalibs/sysdeps > ${WRKSRC}/conf-compile/defaults/depend_skalibs_sysdeps
+
+do-install:
+ cd ${WRKSRC}/command; \
+ for i in *; do \
+ ${INSTALL_PROGRAM} $${i} ${DESTDIR}${PREFIX}/bin; \
+ done
+
+.include "../../devel/skalibs/buildlink3.mk"
+.include "../../mk/djbware.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 62d5780e2ea6 -r 06c0015d5c37 sysutils/fdtools/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/fdtools/PLIST Tue Oct 03 00:43:22 2017 +0000
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+bin/grabconsole
+bin/multitee
+bin/pipecycle
+bin/recvfd
+bin/seek0
+bin/sendfd
+bin/setblock
+bin/statfile
+bin/vc-get
+bin/vc-lock
+bin/vc-switch
diff -r 62d5780e2ea6 -r 06c0015d5c37 sysutils/fdtools/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/fdtools/distinfo Tue Oct 03 00:43:22 2017 +0000
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+SHA1 (fdtools-2015.03.28.tar.bz2) = 7bd1c9e067df8297e1f4bc430c33903899585aee
+RMD160 (fdtools-2015.03.28.tar.bz2) = d1bfed8c1718b5ec178cc763416f677f4cc26f0d
+SHA512 (fdtools-2015.03.28.tar.bz2) = e6b5665869538758edd90876c1696d753aa5859e9dc2ceffbcac98ea682e730424ea972126d20d90945d554a833278059558d85ce5290c09b3f339d0191f565c
+Size (fdtools-2015.03.28.tar.bz2) = 40057 bytes
+SHA1 (patch-conf-compile_defaults_host__compile.sh) = 07d7dcb943e664f838c7b1a72f8bb92d4ad994a0
+SHA1 (patch-conf-compile_defaults_host__link.sh) = d7e2ba5574885e4f09158678681f58e457a14732
+SHA1 (patch-src_recvfd.c) = 4fe086cae8fa9623e29954cb03ee5a63a72d25af
+SHA1 (patch-src_sigsched.c) = ed4cf2111ab65fb80f5cbcfd6aa0c49db12a845a
diff -r 62d5780e2ea6 -r 06c0015d5c37 sysutils/fdtools/patches/patch-conf-compile_defaults_host__compile.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/fdtools/patches/patch-conf-compile_defaults_host__compile.sh Tue Oct 03 00:43:22 2017 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-conf-compile_defaults_host__compile.sh,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+Find skalibs.
+
+--- conf-compile/defaults/host_compile.sh.orig 2015-03-28 22:14:58.000000000 +0000
++++ conf-compile/defaults/host_compile.sh
+@@ -4,5 +4,5 @@
+ # create, respectively. The arguments are -I search directives; make sure to
+ # include them in the compilation command.
+
+-gcc -O2 ${1+"$@"} -c "${input?}" -o "${output?}" \
++gcc -O2 -I ${PREFIX}/include ${1+"$@"} -c "${input?}" -o "${output?}" \
+ -Wall -W -Wpointer-arith -Wcast-align -Wwrite-strings
diff -r 62d5780e2ea6 -r 06c0015d5c37 sysutils/fdtools/patches/patch-conf-compile_defaults_host__link.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/fdtools/patches/patch-conf-compile_defaults_host__link.sh Tue Oct 03 00:43:22 2017 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-conf-compile_defaults_host__link.sh,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+Find skalibs.
+
+--- conf-compile/defaults/host_link.sh.orig 2015-03-28 22:14:58.000000000 +0000
++++ conf-compile/defaults/host_link.sh
+@@ -3,4 +3,4 @@
+ # variable $output names the library file to create. The arguments are -L
+ # search directives and the input object files and libraries.
+
+-gcc -o "${output?}" -s ${1+"$@"}
++gcc -o "${output?}" -s -L ${PREFIX}/lib/skalibs ${1+"$@"}
diff -r 62d5780e2ea6 -r 06c0015d5c37 sysutils/fdtools/patches/patch-src_recvfd.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/fdtools/patches/patch-src_recvfd.c Tue Oct 03 00:43:22 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_recvfd.c,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+Avoid "invalid operands to binary expression" with clang.
+
+--- src/recvfd.c.orig 2015-03-16 06:02:40.000000000 +0000
++++ src/recvfd.c
+@@ -65,7 +65,8 @@ int main(int argc, char** argv) {
+ if (named_fd<10) {
+ type_fd duped=fcntl(named_fd, F_DUPFD, 10);
+ if (duped<0) DIE0(dup);
+- if (fd_close(named_fd)!=0) DIE1(close, "descriptor");
++ //if (fd_close(named_fd)!=0) DIE1(close, "descriptor");
++ fd_close(named_fd);
+ named_fd=duped;
+ }
+ buf[int_fmt(buf, named_fd)]='\0';
diff -r 62d5780e2ea6 -r 06c0015d5c37 sysutils/fdtools/patches/patch-src_sigsched.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/fdtools/patches/patch-src_sigsched.c Tue Oct 03 00:43:22 2017 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_sigsched.c,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+Provide a default definition, needed on at least OS X.
+
+--- src/sigsched.c.orig 2015-03-16 03:55:56.000000000 +0000
++++ src/sigsched.c
+@@ -36,11 +36,9 @@ XXX: how well do we clean up upon ss_exe
+ #define sigc_block(x) (sigblock(*(x)))
+ */
+
+-/*
+-//#ifndef NSIG
+-//#define NSIG 64 / * it's not as if any sane system has more than 32 * /
+-//#endif
+-*/
++#ifndef NSIG
++#define NSIG 64 /* it's not as if any sane system has more than 32 */
++#endif
+
+ #define NUMSIGS NSIG
+
Home |
Main Index |
Thread Index |
Old Index