summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-04-23 20:38:09 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-04-23 20:38:09 +0000
commit260e9d01cdb68e4861f4e356f52bf2c412849ba5 (patch)
tree7375ae436ba70a6b7690d83173d0e9e6f9159fd1 /net-libs
parentFix for gcc-4.1 (diff)
downloadgentoo-2-260e9d01cdb68e4861f4e356f52bf2c412849ba5.tar.gz
gentoo-2-260e9d01cdb68e4861f4e356f52bf2c412849ba5.tar.bz2
gentoo-2-260e9d01cdb68e4861f4e356f52bf2c412849ba5.zip
Add patch from upstream for avoiding random crashes, thanks to Josu López Fernández for reporting in bug #131007.
(Portage version: 2.1_pre9-r3)
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libtorrent/ChangeLog9
-rw-r--r--net-libs/libtorrent/files/digest-libtorrent-0.9.0-r13
-rw-r--r--net-libs/libtorrent/files/libtorrent-0.9.0-crash.patch32
-rw-r--r--net-libs/libtorrent/libtorrent-0.9.0-r1.ebuild44
4 files changed, 87 insertions, 1 deletions
diff --git a/net-libs/libtorrent/ChangeLog b/net-libs/libtorrent/ChangeLog
index c1ef28c72dc0..47299fe1b704 100644
--- a/net-libs/libtorrent/ChangeLog
+++ b/net-libs/libtorrent/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-libs/libtorrent
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libtorrent/ChangeLog,v 1.52 2006/04/23 09:28:42 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libtorrent/ChangeLog,v 1.53 2006/04/23 20:38:09 flameeyes Exp $
+
+*libtorrent-0.9.0-r1 (23 Apr 2006)
+
+ 23 Apr 2006; Diego Pettenò <flameeyes@gentoo.org>
+ +files/libtorrent-0.9.0-crash.patch, +libtorrent-0.9.0-r1.ebuild:
+ Add patch from upstream for avoiding random crashes, thanks to Josu López
+ Fernández for reporting in bug #131007.
23 Apr 2006; Diego Pettenò <flameeyes@gentoo.org>
libtorrent-0.9.0.ebuild:
diff --git a/net-libs/libtorrent/files/digest-libtorrent-0.9.0-r1 b/net-libs/libtorrent/files/digest-libtorrent-0.9.0-r1
new file mode 100644
index 000000000000..f92f3fde7550
--- /dev/null
+++ b/net-libs/libtorrent/files/digest-libtorrent-0.9.0-r1
@@ -0,0 +1,3 @@
+MD5 cabdb9aa38d06dccac3ce0dbc2910d71 libtorrent-0.9.0.tar.gz 461999
+RMD160 3ad37136459bd965d73003bc7f1aa35c30c3d11e libtorrent-0.9.0.tar.gz 461999
+SHA256 2181e7550f3837735252c51db005101eabceab6a247d1cd13f451511f4d18ef7 libtorrent-0.9.0.tar.gz 461999
diff --git a/net-libs/libtorrent/files/libtorrent-0.9.0-crash.patch b/net-libs/libtorrent/files/libtorrent-0.9.0-crash.patch
new file mode 100644
index 000000000000..903d70d06564
--- /dev/null
+++ b/net-libs/libtorrent/files/libtorrent-0.9.0-crash.patch
@@ -0,0 +1,32 @@
+Index: libtorrent-0.9.0/src/protocol/peer_connection_seed.cc
+===================================================================
+--- libtorrent-0.9.0/src/protocol/peer_connection_seed.cc (revision 666)
++++ libtorrent-0.9.0/src/protocol/peer_connection_seed.cc (working copy)
+@@ -159,6 +159,11 @@
+ return true;
+
+ case ProtocolBase::BITFIELD:
++ // Bad peer, sending their bitfield after other messages have been
++ // sent.
++ if (m_peerChunks.using_counter() || !m_peerChunks.bitfield()->is_all_unset())
++ throw close_connection();
++
+ if (read_bitfield_from_buffer(length - 1)) {
+ finish_bitfield();
+ return true;
+Index: libtorrent-0.9.0/src/protocol/peer_connection_leech.cc
+===================================================================
+--- libtorrent-0.9.0/src/protocol/peer_connection_leech.cc (revision 666)
++++ libtorrent-0.9.0/src/protocol/peer_connection_leech.cc (working copy)
+@@ -200,6 +200,11 @@
+ return true;
+
+ case ProtocolBase::BITFIELD:
++ // Bad peer, sending their bitfield after other messages have been
++ // sent.
++ if (m_peerChunks.using_counter() || !m_peerChunks.bitfield()->is_all_unset())
++ throw close_connection();
++
+ if (read_bitfield_from_buffer(length - 1)) {
+ finish_bitfield();
+ return true;
diff --git a/net-libs/libtorrent/libtorrent-0.9.0-r1.ebuild b/net-libs/libtorrent/libtorrent-0.9.0-r1.ebuild
new file mode 100644
index 000000000000..4207d7b380d7
--- /dev/null
+++ b/net-libs/libtorrent/libtorrent-0.9.0-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libtorrent/libtorrent-0.9.0-r1.ebuild,v 1.1 2006/04/23 20:38:09 flameeyes Exp $
+
+inherit eutils toolchain-funcs flag-o-matic libtool
+
+DESCRIPTION="LibTorrent is a BitTorrent library written in C++ for *nix."
+HOMEPAGE="http://libtorrent.rakshasa.no/"
+SRC_URI="http://libtorrent.rakshasa.no/downloads/${P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+
+IUSE="debug"
+
+RDEPEND=">=dev-libs/libsigc++-2"
+
+DEPEND="${RDEPEND}
+ >=dev-util/pkgconfig-0.11"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-crash.patch"
+}
+
+src_compile() {
+ [[ $(tc-arch) = "x86" ]] && filter-flags -fomit-frame-pointer
+ replace-flags -Os -O2
+
+ elibtoolize
+ econf \
+ $(use_enable debug) \
+ --disable-dependency-tracking \
+ || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}