aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2005-01-12 18:19:49 +0800
committerlioux <lioux@FreeBSD.org>2005-01-12 18:19:49 +0800
commitec752876a16f785b831c9927ab1b19b8f4a9c8cf (patch)
tree939ac390435189a2dafe02dc5b5c4c4265fed2c3 /net
parent414aab4a07746ef71fc25bbee5a000695df25b55 (diff)
downloadfreebsd-ports-gnome-ec752876a16f785b831c9927ab1b19b8f4a9c8cf.tar.gz
freebsd-ports-gnome-ec752876a16f785b831c9927ab1b19b8f4a9c8cf.tar.zst
freebsd-ports-gnome-ec752876a16f785b831c9927ab1b19b8f4a9c8cf.zip
New port libtorrent version 0.4.5: BitTorrent Library written in
C++ PR: 76033 Submitted by: Florent Thoumie <flz@xbsd.org>
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/libtorrent/Makefile62
-rw-r--r--net/libtorrent/distinfo2
-rw-r--r--net/libtorrent/files/patch-client::rtorrent.cc14
-rw-r--r--net/libtorrent/files/patch-src::data::file.cc13
-rw-r--r--net/libtorrent/files/patch-src::torrent::torrent.h11
-rw-r--r--net/libtorrent/pkg-descr8
-rw-r--r--net/libtorrent/pkg-plist13
8 files changed, 124 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index c5c6da8e6346..146539aef882 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -302,6 +302,7 @@
SUBDIR += libsocket++
SUBDIR += libsocketcpp
SUBDIR += libtcp4u
+ SUBDIR += libtorrent
SUBDIR += libunp
SUBDIR += libunpipc
SUBDIR += libvncserver
diff --git a/net/libtorrent/Makefile b/net/libtorrent/Makefile
new file mode 100644
index 000000000000..71c238f82794
--- /dev/null
+++ b/net/libtorrent/Makefile
@@ -0,0 +1,62 @@
+# New ports collection makefile for: libtorrent
+# Date created: Jan 07 2005
+# Whom: Florent Thoumie <flz@xbsd.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libtorrent
+PORTVERSION= 0.4.5
+CATEGORIES= net
+MASTER_SITES= http://libtorrent.rakshasa.no/downloads/
+
+MAINTAINER= flz@xbsd.org
+COMMENT= BitTorrent Library written in C++
+
+LIB_DEPENDS= curl.3:${PORTSDIR}/ftp/curl \
+ sigc-2.0.0:${PORTSDIR}/devel/libsigc++20
+
+USE_REINPLACE= yes
+INSTALLS_SHLIB= yes
+USE_LIBTOOL_VER= 15
+CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+USE_GCC= 3.4
+.endif
+
+pre-everything::
+.if !defined(WITH_CLIENT) && ${OSVERSION} >= 500000
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> Define WITH_CLIENT to build libtorrent client'
+ @${ECHO_MSG} '===>'
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e "s#\(pkgconfigdir =\).*#\1 ${PREFIX}/libexec/pkgconfig#" \
+ ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e "s#-Wall -O3 -g#${CFLAGS} -fpermissive#" \
+ ${WRKSRC}/client/Makefile2
+# uphold CXXFLAGS
+ @${REINPLACE_CMD} -E \
+ -e 's#^(CXXFLAGS[[:space:]]*=[[:space:]]*).*-O.*$$#\1${CXXFLAGS}#' \
+ -e 's#^(CFLAGS[[:space:]]*=[[:space:]]*).*-O.*$$#\1${CFLAGS}#' \
+ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+
+.if defined(WITH_CLIENT)
+.if ${OSVERSION} < 500000
+BROKEN= "Client doesn't compile on 4.x"
+.endif
+
+PLIST_FILES= bin/rtorrent
+
+post-build:
+ @(cd ${WRKSRC}/client; make -f Makefile2)
+
+post-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/client/rtorrent ${PREFIX}/bin
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net/libtorrent/distinfo b/net/libtorrent/distinfo
new file mode 100644
index 000000000000..b567a2ff7b7e
--- /dev/null
+++ b/net/libtorrent/distinfo
@@ -0,0 +1,2 @@
+MD5 (libtorrent-0.4.5.tar.gz) = 86c38d9036e083c9c2b21b88f7d847fa
+SIZE (libtorrent-0.4.5.tar.gz) = 401624
diff --git a/net/libtorrent/files/patch-client::rtorrent.cc b/net/libtorrent/files/patch-client::rtorrent.cc
new file mode 100644
index 000000000000..c4f107aa91db
--- /dev/null
+++ b/net/libtorrent/files/patch-client::rtorrent.cc
@@ -0,0 +1,14 @@
+--- client/rtorrent.cc.old Fri Jan 7 15:04:15 2005
++++ client/rtorrent.cc Fri Jan 7 15:04:57 2005
+@@ -19,9 +19,9 @@
+ #include "curl_get.h"
+
+ // Uncomment this if your system doesn't have execinfo.h
+-#define USE_EXECINFO
++//#define USE_EXECINFO
+
+-#ifdef USE_EXECINFO
++#ifdef USE_EXECINFO
+ #include <execinfo.h>
+ #endif
+
diff --git a/net/libtorrent/files/patch-src::data::file.cc b/net/libtorrent/files/patch-src::data::file.cc
new file mode 100644
index 000000000000..e0b3abd2b8fa
--- /dev/null
+++ b/net/libtorrent/files/patch-src::data::file.cc
@@ -0,0 +1,13 @@
+--- src/data/file.cc.old Fri Jan 7 14:35:43 2005
++++ src/data/file.cc Fri Jan 7 14:36:35 2005
+@@ -19,8 +19,9 @@
+ (flags & in && flags & out ? O_RDWR :
+ (flags & in ? O_RDONLY : 0) |
+ (flags & out ? O_WRONLY : 0)) |
+-
++#if defined(Linux)
+ (flags & largefile ? O_LARGEFILE : 0) |
++#endif
+ (flags & create ? O_CREAT : 0) |
+ (flags & truncate ? O_TRUNC : 0) |
+ (flags & nonblock ? O_NONBLOCK : 0),
diff --git a/net/libtorrent/files/patch-src::torrent::torrent.h b/net/libtorrent/files/patch-src::torrent::torrent.h
new file mode 100644
index 000000000000..bb7f00317f7e
--- /dev/null
+++ b/net/libtorrent/files/patch-src::torrent::torrent.h
@@ -0,0 +1,11 @@
+--- src/torrent/torrent.h.old Fri Jan 7 22:34:09 2005
++++ src/torrent/torrent.h Fri Jan 7 22:51:03 2005
+@@ -4,6 +4,8 @@
+ #include <list>
+ #include <torrent/common.h>
+ #include <torrent/download.h>
++#include <sys/types.h>
++#include <sys/select.h>
+
+ namespace torrent {
+
diff --git a/net/libtorrent/pkg-descr b/net/libtorrent/pkg-descr
new file mode 100644
index 000000000000..1c077a0e3a46
--- /dev/null
+++ b/net/libtorrent/pkg-descr
@@ -0,0 +1,8 @@
+LibTorrent is a BitTorrent library written in C++ for *nix. It is
+designed to avoid redundant copying and storing of data that other
+clients and libraries suffer from. Licensed under the GPL.
+
+WWW: http://libtorrent.rakshasa.no/
+
+- Florent Thoumie
+flz@xbsd.org
diff --git a/net/libtorrent/pkg-plist b/net/libtorrent/pkg-plist
new file mode 100644
index 000000000000..4913b88c876e
--- /dev/null
+++ b/net/libtorrent/pkg-plist
@@ -0,0 +1,13 @@
+include/torrent/common.h
+include/torrent/download.h
+include/torrent/exceptions.h
+include/torrent/entry.h
+include/torrent/http.h
+include/torrent/peer.h
+include/torrent/torrent.h
+lib/libtorrent.a
+lib/libtorrent.so
+lib/libtorrent.so.2
+libexec/pkgconfig/libtorrent.pc
+@dirrm include/torrent
+@unexec rmdir %D/libexec/pkgconfig 2> /dev/null || true