Update unworkable from 0.51 to 0.53
Changes from previous version: Changes (from 0.51 to 0.53): * Bug fixes Update provided by Leonardo Taccari in PR/pkg 48124 - thanks!
This commit is contained in:
parent
95318a0ac5
commit
120cd71674
5 changed files with 38 additions and 100 deletions
|
@ -1,13 +1,13 @@
|
|||
# $NetBSD: Makefile,v 1.11 2013/05/23 15:01:05 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.12 2013/08/22 00:59:33 agc Exp $
|
||||
|
||||
DISTNAME= unworkable-0.51
|
||||
PKGREVISION= 7
|
||||
DISTNAME= unworkable-0.53
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= # http://p2presearch.com/unworkable/dist/
|
||||
MASTER_SITES= http://unworkable.googlecode.com/files/
|
||||
|
||||
MAINTAINER= agc@NetBSD.org
|
||||
HOMEPAGE= http://p2presearch.com/unworkable/
|
||||
HOMEPAGE= http://code.google.com/p/unworkable/
|
||||
COMMENT= BSD-licensed command-line torrent client
|
||||
LICENSE= isc
|
||||
|
||||
USE_TOOLS+= yacc
|
||||
WRKSRC= ${WRKDIR}/unworkable
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
$NetBSD: distinfo,v 1.2 2013/05/23 15:01:05 christos Exp $
|
||||
$NetBSD: distinfo,v 1.3 2013/08/22 00:59:33 agc 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
|
||||
SHA1 (unworkable-0.53.tar.gz) = 546dee5844fcbac42fe7ae51bc5344537e9b769d
|
||||
RMD160 (unworkable-0.53.tar.gz) = a361bff35856f255be85256f9d74c3dfb11fb60e
|
||||
Size (unworkable-0.53.tar.gz) = 72053 bytes
|
||||
SHA1 (patch-BSDMakefile) = 722124fc797d751cb4402132a1f662553ddce0ec
|
||||
|
|
28
net/unworkable/patches/patch-BSDMakefile
Normal file
28
net/unworkable/patches/patch-BSDMakefile
Normal file
|
@ -0,0 +1,28 @@
|
|||
$NetBSD: patch-BSDMakefile,v 1.1 2013/08/22 00:59:33 agc Exp $
|
||||
|
||||
generalise for pkgsrc
|
||||
|
||||
--- BSDmakefile.orig 2008-10-05 16:56:25.000000000 -0700
|
||||
+++ BSDmakefile 2013-08-21 13:26:08.000000000 -0700
|
||||
@@ -21,6 +21,7 @@
|
||||
CFLAGS+= -Wmissing-declarations
|
||||
CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual
|
||||
CFLAGS+= -Wsign-compare -g -ggdb
|
||||
+CFLAGS+= -Iopenbsd-compat
|
||||
# Uncomment when building shared library
|
||||
#CFLAGS+= -fPIC
|
||||
LDFLAGS+= -L.
|
||||
@@ -35,10 +36,12 @@
|
||||
|
||||
PROG= unworkable
|
||||
|
||||
-SRCS= announce.c bencode.c buf.c ctl_server.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 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}: libunworkable.a main.o
|
|
@ -1,28 +0,0 @@
|
|||
$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}
|
|
@ -1,61 +0,0 @@
|
|||
$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);
|
Loading…
Reference in a new issue