Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

6
net/unworkable/DESCR Normal file
View File

@@ -0,0 +1,6 @@
Unworkable is a BSD-licensed BitTorrent implementation written by
Niall O'Higgins <niallo@p2presearch.com>. Goals of this project
include efficiency, simplicity and high code quality.
Unworkable is single threaded and asynchronous, written in portable
ANSI C using libevent and mmap() for performance.

29
net/unworkable/Makefile Normal file
View File

@@ -0,0 +1,29 @@
# $NetBSD: Makefile,v 1.11 2013/05/23 15:01:05 christos Exp $
DISTNAME= unworkable-0.51
PKGREVISION= 7
CATEGORIES= net
MASTER_SITES= # http://p2presearch.com/unworkable/dist/
MAINTAINER= agc@NetBSD.org
HOMEPAGE= http://p2presearch.com/unworkable/
COMMENT= BSD-licensed command-line torrent client
USE_TOOLS+= yacc
WRKSRC= ${WRKDIR}/unworkable
MAKE_FILE= BSDmakefile
INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/cat1
post-configure:
cp ${WRKSRC}/openbsd-compat/sha1.c ${WRKSRC}
cp ${WRKSRC}/openbsd-compat/strtonum.c ${WRKSRC}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/unworkable ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/unworkable.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.include "../../devel/libevent/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

3
net/unworkable/PLIST Normal file
View File

@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.2 2012/03/08 01:08:41 joerg Exp $
bin/unworkable
${PKGMANDIR}/man1/unworkable.1

7
net/unworkable/distinfo Normal file
View File

@@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.2 2013/05/23 15:01:05 christos Exp $
SHA1 (unworkable-0.51.tar.gz) = 0a179f7d84aa95df3fe30bd49806776826f8e4c6
RMD160 (unworkable-0.51.tar.gz) = 72174941df30ab63101f334f0a657e1357f7309b
Size (unworkable-0.51.tar.gz) = 71020 bytes
SHA1 (patch-aa) = c792177339cf79341c24cf9a12032ee98d564eaa
SHA1 (patch-main.c) = d25ddad279f8143c4f15733f86c12f1074e43f0e

View File

@@ -0,0 +1,28 @@
$NetBSD: patch-aa,v 1.1.1.1 2009/01/19 05:40:39 agc Exp $
Just add the sources we need to to get it to compile on most hosts
--- BSDmakefile 2008-09-08 10:46:30.000000000 -0700
+++ BSDmakefile 2009-01-18 21:16:38.000000000 -0800
@@ -21,6 +21,7 @@
CFLAGS+= -Wmissing-declarations
CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual
CFLAGS+= -Wsign-compare -g -ggdb
+CFLAGS+= -Iopenbsd-compat
#
# Uncomment if you like to use Boehm's garbage collector (/usr/ports/devel/boehm-gc).
@@ -32,10 +33,12 @@
PROG= unworkable
-SRCS= announce.c bencode.c buf.c ctl_server.c main.c network.c parse.y progressmeter.c scheduler.c torrent.c trace.c util.c xmalloc.c
+SRCS= announce.c bencode.c buf.c ctl_server.c main.c network.c parse.y progressmeter.c scheduler.c torrent.c trace.c util.c xmalloc.c sha1.c strtonum.c
OBJS= ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
MAN= unworkable.1
+.PATH: ${.CURDIR}:${.CURDIR}/openbsd-compat
+
all: ${PROG} unworkable.cat1
${PROG}: ${OBJS}

View File

@@ -0,0 +1,61 @@
$NetBSD: patch-main.c,v 1.1 2013/05/23 15:01:05 christos Exp $
Replace event_gotsig and event_sigcb with proper signal access
--- main.c.orig 2008-09-27 16:35:43.000000000 -0400
+++ main.c 2013-05-23 10:58:29.000000000 -0400
@@ -40,13 +40,11 @@
#define MESSAGE "hash check"
#define METER "|/-\\"
-static void sighandler(int);
+static void addhandler(int);
void usage(void);
extern char *optarg;
extern int optind;
-extern int event_gotsig;
-extern int (*event_sigcb)(void);
void
usage(void)
@@ -56,9 +54,14 @@
}
static void
-sighandler(int sig)
+addhandler(int sig)
{
- event_gotsig = 1;
+ struct event sig_ev;
+ int got;
+
+ evsignal_set(&sig_ev, sig,
+ (void (*)(evutil_socket_t, short, void *))terminate_handler, &got);
+ evsignal_add(&sig_ev, NULL);
}
int
@@ -76,10 +79,10 @@
GC_INIT();
#endif
- signal(SIGHUP, sighandler);
- signal(SIGABRT, sighandler);
- signal(SIGINT, sighandler);
- signal(SIGQUIT, sighandler);
+ addhandler(SIGHUP);
+ addhandler(SIGABRT);
+ addhandler(SIGINT);
+ addhandler(SIGQUIT);
/* don't die on sigpipe */
signal(SIGPIPE, SIG_IGN);
#if defined(__SVR4) && defined(__sun)
@@ -160,7 +163,7 @@
srandom(time(NULL));
network_init();
- event_sigcb = terminate_handler;
+
network_start_torrent(torrent, rlp.rlim_cur);
exit(0);