[gentoo-commits] repo/gentoo:master commit in: net-p2p/ctorrent/files/, net-p2p/ctorrent/

2020-03-21 Thread David Seifert
commit: af066c6b63a89f834a736181d7c892ebc453fecd
Author: David Seifert  gentoo  org>
AuthorDate: Sat Mar 21 15:01:44 2020 +
Commit: David Seifert  gentoo  org>
CommitDate: Sat Mar 21 15:01:44 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af066c6b

net-p2p/ctorrent: Add missing  include

Closes: https://bugs.gentoo.org/713752
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: David Seifert  gentoo.org>

 net-p2p/ctorrent/ctorrent-3.3.2-r4.ebuild   |  9 +
 net-p2p/ctorrent/files/ctorrent-3.3.2-sys-types_h.patch | 11 +++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/net-p2p/ctorrent/ctorrent-3.3.2-r4.ebuild 
b/net-p2p/ctorrent/ctorrent-3.3.2-r4.ebuild
index 000a6838b53..85457d846cf 100644
--- a/net-p2p/ctorrent/ctorrent-3.3.2-r4.ebuild
+++ b/net-p2p/ctorrent/ctorrent-3.3.2-r4.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 MY_P="${PN}-dnh${PV}"
 
@@ -14,16 +14,17 @@ SLOT="0"
 KEYWORDS="amd64 arm ppc ~s390 ~sh ~sparc x86"
 IUSE="libressl"
 
-S="${WORKDIR}/${MY_P}"
-
 RDEPEND="
libressl? ( dev-libs/libressl:0= )
!libressl? ( dev-libs/openssl:0= )
 "
 DEPEND="${RDEPEND}"
 
+S="${WORKDIR}/${MY_P}"
+
 PATCHES=(
"${FILESDIR}"/${PN}-CVE-2009-1759.patch
"${FILESDIR}"/${P}-negative-ints.patch
"${FILESDIR}"/${P}-empty-path-components.patch
+   "${FILESDIR}"/${P}-sys-types_h.patch
 )

diff --git a/net-p2p/ctorrent/files/ctorrent-3.3.2-sys-types_h.patch 
b/net-p2p/ctorrent/files/ctorrent-3.3.2-sys-types_h.patch
new file mode 100644
index 000..bf93cb2a3bb
--- /dev/null
+++ b/net-p2p/ctorrent/files/ctorrent-3.3.2-sys-types_h.patch
@@ -0,0 +1,11 @@
+--- a/compat.c
 b/compat.c
+@@ -8,6 +8,8 @@
+ #include 
+ #endif
+ 
++#include 
++
+ #include "compat.h"
+ 
+ #ifndef HAVE_CLOCK_GETTIME



[gentoo-commits] repo/gentoo:master commit in: net-p2p/ctorrent/files/, net-p2p/ctorrent/

2015-09-12 Thread Mike Frysinger
commit: dc985c3cb2c8094313f60553c2a488f9bd39002d
Author: Mike Frysinger  gentoo  org>
AuthorDate: Sun Sep 13 02:51:39 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Sun Sep 13 02:52:22 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc985c3c

net-p2p/ctorrent: workaround broken rTorrent files

 net-p2p/ctorrent/ctorrent-3.3.2-r3.ebuild  | 29 +
 .../ctorrent-3.3.2-empty-path-components.patch | 38 ++
 2 files changed, 67 insertions(+)

diff --git a/net-p2p/ctorrent/ctorrent-3.3.2-r3.ebuild 
b/net-p2p/ctorrent/ctorrent-3.3.2-r3.ebuild
new file mode 100644
index 000..d667683
--- /dev/null
+++ b/net-p2p/ctorrent/ctorrent-3.3.2-r3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+MY_P="${PN}-dnh${PV}"
+
+DESCRIPTION="Enhanced CTorrent is a BitTorrent console client written in C and 
C++"
+HOMEPAGE="http://www.rahul.net/dholmes/ctorrent/;
+SRC_URI="mirror://sourceforge/dtorrent/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+DEPEND="dev-libs/openssl:="
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+   epatch "${FILESDIR}"/${PN}-CVE-2009-1759.patch
+   epatch "${FILESDIR}"/${P}-negative-ints.patch
+   epatch "${FILESDIR}"/${P}-empty-path-components.patch
+}

diff --git a/net-p2p/ctorrent/files/ctorrent-3.3.2-empty-path-components.patch 
b/net-p2p/ctorrent/files/ctorrent-3.3.2-empty-path-components.patch
new file mode 100644
index 000..fce41d4
--- /dev/null
+++ b/net-p2p/ctorrent/files/ctorrent-3.3.2-empty-path-components.patch
@@ -0,0 +1,38 @@
+rTorrent sometimes creates invalid torrents which has empty path components.
+the bitorrent spec allows for "" strings, but they make no sense in paths.
+so instead of always adding a / in between, skip them.  ugh.
+
+for example:
+dict {
+   'info' => dict {
+   'name' => str = "some dir" (len = 8)
+   'files' => list [
+   dict {
+   'length' => int = 12345567
+   'path' => list [
+   str = "" (len = 0)
+   str = "foo.bin" (len = 7)
+   ]
+   }
+   ...
+   ]
+   ...
+   }
+   ...
+}
+
+ctorrent will then try to fetch the file "/some dir/foo.bin" instead of
+"some dir/foo.bin" (relative to $PWD).
+
+--- a/bencode.cpp
 b/bencode.cpp
+@@ -258,7 +258,8 @@
+ n -= r; 
+ if( 'e' == *pb ) break;
+ if( pathname >= endmax ) return 0;
+-*pathname++ = PATH_SP;
++if (q)
++  *pathname++ = PATH_SP;
+   }
+   *pathname = '\0';
+   return (pb - b + 1);