Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2004 19:23:12 +0100 (CET)
From:      Florent Thoumie <flz@xbsd.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/63404: New port: net/libbt - C library implementing the core BitTorrent protocol
Message-ID:  <20040226182312.A8EEF925@gw.xbsd.org>
Resent-Message-ID: <200402261830.i1QIUGXi079139@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         63404
>Category:       ports
>Synopsis:       New port: net/libbt - C library implementing the core BitTorrent protocol
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 26 10:30:15 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Florent Thoumie
>Release:        FreeBSD 4.9-RC i386
>Organization:
Xbsd.org
>Environment:

System: FreeBSD gw 4.9-RC FreeBSD 4.9-RC #4: Sun Oct 5 14:25:09 CEST 2003 rf@gw:/usr/src/sys/compile/GW i386

>Description:

LIBBT is a C library implementing the core BitTorrent protocol.

>How-To-Repeat:

N/A

>Fix:

--- libbt-0.02.shar begins here ---

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	libbt
#	libbt/distinfo
#	libbt/pkg-descr
#	libbt/Makefile
#	libbt/files
#	libbt/files/patch-src::Makefile.in
#	libbt/files/patch-src::bitset.c
#	libbt/files/patch-include::bterror.h
#	libbt/files/patch-src::bterror.c
#	libbt/files/patch-src::peer.c
#	libbt/files/patch-src::stream.c
#	libbt/pkg-plist
#
echo c - libbt
mkdir -p libbt > /dev/null 2>&1
echo x - libbt/distinfo
sed 's/^X//' >libbt/distinfo << 'END-of-libbt/distinfo'
XMD5 (libbt-0.02.tgz) = a954666cb53b7a35f1793b531a6430bd
XSIZE (libbt-0.02.tgz) = 333463
END-of-libbt/distinfo
echo x - libbt/pkg-descr
sed 's/^X//' >libbt/pkg-descr << 'END-of-libbt/pkg-descr'
XLIBBT is a C library implementing the core BitTorrent protocol.
X
XWWW: http://libbt.sourceforge.net/
X
X- Florent Thoumie
Xflz@xbsd.org
END-of-libbt/pkg-descr
echo x - libbt/Makefile
sed 's/^X//' >libbt/Makefile << 'END-of-libbt/Makefile'
X# New ports collection makefile for:	libbt
X# Date created:				Feb 26 2004
X# Whom:					Florent Thoumie <flz@xbsd.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	libbt
XPORTVERSION=	0.02
XCATEGORIES=	net devel
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	flz@xbsd.org
XCOMMENT=	C library implementing the core BitTorrent protocol
X
XLIB_DEPENDS=	uuid.1:${PORTSDIR}/sysutils/e2fsprogs \
X		curl.2:${PORTSDIR}/ftp/curl
X
XWRKSRC=		${WRKDIR}/${PORTNAME}
X
XGNU_CONFIGURE=	yes
X
XCONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
X		LDFLAGS="-L${LOCALBASE}/lib"
X
Xdo-install:
X	${INSTALL_DATA} ${WRKSRC}/src/libbt.a ${PREFIX}/lib
X	${MKDIR} ${PREFIX}/include/libbt
X.for i in benc.h bitset.h bterror.h bts.h context.h peer.h random.h segmenter.h strbuf.h stream.h types.h util.h
X	${INSTALL_DATA} ${WRKSRC}/include/${i} ${PREFIX}/include/libbt
X.endfor
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${INSTALL_MAN} ${WRKSRC}/docs/protocol.txt ${DOCSDIR}
X.endif
X
X.include <bsd.port.mk>
END-of-libbt/Makefile
echo c - libbt/files
mkdir -p libbt/files > /dev/null 2>&1
echo x - libbt/files/patch-src::Makefile.in
sed 's/^X//' >libbt/files/patch-src::Makefile.in << 'END-of-libbt/files/patch-src::Makefile.in'
X--- src/Makefile.in.old	Thu Feb 26 18:27:14 2004
X+++ src/Makefile.in	Thu Feb 26 18:28:04 2004
X@@ -1,8 +1,8 @@
X-OBJS=benc.o bts.o types.o random.o strbuf.o stream.o peer.o segmenter.o util.o bitset.o context.o
X-CFLAGS=-Wall -g -I../include 
X+OBJS=bterror.o benc.o bts.o types.o random.o strbuf.o stream.o peer.o segmenter.o util.o bitset.o context.o
X+CFLAGS=@CFLAGS@ -Wall -I../include -I${PREFIX}/include
X LIBS=@LIBS@ `curl-config --libs`
X 
X-all: btlist btget btcheck
X+all: libbt.a
X btcheck: btcheck.c libbt.a
X 	gcc ${CFLAGS} btcheck.c ${LIBS} -lbt -L. -o btcheck
X 
X@@ -20,3 +20,4 @@
X 
X libbt.a: ${OBJS}
X 	ar rc $@ ${OBJS}
X+	ranlib libbt.a
END-of-libbt/files/patch-src::Makefile.in
echo x - libbt/files/patch-src::bitset.c
sed 's/^X//' >libbt/files/patch-src::bitset.c << 'END-of-libbt/files/patch-src::bitset.c'
X--- src/bitset.c.old	Thu Feb 26 15:21:52 2004
X+++ src/bitset.c	Thu Feb 26 15:22:14 2004
X@@ -1,8 +1,6 @@
X #include "config.h"
X 
X-#if HAVE_MALLOC_H
X-#include <malloc.h>
X-#endif
X+#include <stdlib.h>
X #include <assert.h>
X #include <stdio.h>
X #include "bitset.h"
END-of-libbt/files/patch-src::bitset.c
echo x - libbt/files/patch-include::bterror.h
sed 's/^X//' >libbt/files/patch-include::bterror.h << 'END-of-libbt/files/patch-include::bterror.h'
X--- include/bterror.h.old	Thu Feb 26 17:38:32 2004
X+++ include/bterror.h	Thu Feb 26 17:38:53 2004
X@@ -15,15 +15,6 @@
X     BTERR_LAST
X };
X 
X-#ifdef BTERROR_BODY
X-char *bterror_string[] = {
X-    "Bad protocol ID on peer connection",
X-    "Unrecognized Flags in peer protocol handshake",
X-    "Peer hash value doesn't match my hash value",
X-    "Peer disconnected after repeated errors"
X-};
X-#else
X extern char *bterror_string[];
X-#endif
X 
X #endif 
END-of-libbt/files/patch-include::bterror.h
echo x - libbt/files/patch-src::bterror.c
sed 's/^X//' >libbt/files/patch-src::bterror.c << 'END-of-libbt/files/patch-src::bterror.c'
X--- src/bterror.c.old	Thu Feb 26 17:39:15 2004
X+++ src/bterror.c	Thu Feb 26 17:39:54 2004
X@@ -1,3 +1,9 @@
X /* bterror.c */
X-#define BTERROR_BODY
X #include "bterror.h"
X+
X+char *bterror_string[] = {
X+    "Bad protocol ID on peer connection",
X+    "Unrecognized Flags in peer protocol handshake",
X+    "Peer hash value doesn't match my hash value",
X+    "Peer disconnected after repeated errors"
X+};
END-of-libbt/files/patch-src::bterror.c
echo x - libbt/files/patch-src::peer.c
sed 's/^X//' >libbt/files/patch-src::peer.c << 'END-of-libbt/files/patch-src::peer.c'
X--- src/peer.c.old	Thu Feb 26 17:34:55 2004
X+++ src/peer.c	Thu Feb 26 17:35:21 2004
X@@ -1,5 +1,6 @@
X #include "config.h"
X 
X+#include <sys/types.h>
X #if WIN32
X //	#include <winsock2.h>
X #else
X@@ -13,7 +14,6 @@
X 	#include <fcntl.h>
X     #endif
X #endif
X-#include <sys/types.h>
X #include <string.h>
X #include <errno.h>
X #include <time.h>
END-of-libbt/files/patch-src::peer.c
echo x - libbt/files/patch-src::stream.c
sed 's/^X//' >libbt/files/patch-src::stream.c << 'END-of-libbt/files/patch-src::stream.c'
X--- src/stream.c.old	Thu Feb 26 17:34:48 2004
X+++ src/stream.c	Thu Feb 26 17:35:11 2004
X@@ -1,4 +1,5 @@
X #include "config.h"
X+#include <sys/types.h>
X #include <errno.h>
X #include <string.h>
X #include <stdarg.h>
X@@ -14,7 +15,6 @@
X 	#include <unistd.h>
X     #endif
X #endif
X-#include <sys/types.h>
X #include "bterror.h"
X #include "stream.h"
X #undef DEBUG_STREAM
END-of-libbt/files/patch-src::stream.c
echo x - libbt/pkg-plist
sed 's/^X//' >libbt/pkg-plist << 'END-of-libbt/pkg-plist'
Xinclude/libbt/benc.h
Xinclude/libbt/bitset.h
Xinclude/libbt/bterror.h
Xinclude/libbt/bts.h
Xinclude/libbt/context.h
Xinclude/libbt/peer.h
Xinclude/libbt/random.h
Xinclude/libbt/segmenter.h
Xinclude/libbt/strbuf.h
Xinclude/libbt/stream.h
Xinclude/libbt/types.h
Xinclude/libbt/util.h
Xlib/libbt.a
X%%PORTDOCS%%%%DOCSDIR%%/protocol.txt
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X@dirrm include/libbt
END-of-libbt/pkg-plist
exit


--- libbt-0.02.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040226182312.A8EEF925>