* [gentoo-commits] repo/gentoo:master commit in: net-libs/rb_libtorrent/files/, net-libs/rb_libtorrent/
@ 2015-09-18 14:30 Markos Chandras
0 siblings, 0 replies; 5+ messages in thread
From: Markos Chandras @ 2015-09-18 14:30 UTC (permalink / raw
To: gentoo-commits
commit: 26ef4293ecc86d4ddae1cc156cd61beef74530e9
Author: Markos Chandras <hwoarang <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 18 14:29:29 2015 +0000
Commit: Markos Chandras <hwoarang <AT> gentoo <DOT> org>
CommitDate: Fri Sep 18 14:29:29 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26ef4293
net-libs/rb_libtorrent: Fix USE=examples build. Bug #550252
Package-Manager: portage-2.2.20.1
..._libtorrent-1.0.6-remove-parse-hash-fails.patch | 185 +++++++++++++++++++++
net-libs/rb_libtorrent/rb_libtorrent-1.0.6.ebuild | 1 +
2 files changed, 186 insertions(+)
diff --git a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.6-remove-parse-hash-fails.patch b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.6-remove-parse-hash-fails.patch
new file mode 100644
index 0000000..53ba0b8
--- /dev/null
+++ b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.6-remove-parse-hash-fails.patch
@@ -0,0 +1,185 @@
+X-Gentoo-Bug: 550252
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=550252
+Upstream report: https://github.com/arvidn/libtorrent/issues/157
+[markos]: Merge commits
+Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
+
+From 61a896035782436d5a8cceef1fc997e97ebbe019 Mon Sep 17 00:00:00 2001
+From: arvidn <arvid@libtorrent.org>
+Date: Sat, 12 Sep 2015 09:54:40 -0400
+Subject: [PATCH] remove parse_hash_fails.cpp
+
+From 21e908ed1ea661c41e836230b8cf066688038d2b Mon Sep 17 00:00:00 2001
+From: arvidn <arvid@libtorrent.org>
+Date: Sat, 12 Sep 2015 09:56:30 -0400
+Subject: [PATCH] remove parse_hash_fails from Jamfile also
+---
+ tools/Makefile.am | 2 -
+ tools/parse_hash_fails.cpp | 104 --------------------------------------------
+ tools/parse_request_log.cpp | 5 ++-
+ tools/Jamfile | 1 -
+ 4 files changed, 5 insertions(+), 108 deletions(-)
+ delete mode 100644 tools/parse_hash_fails.cpp
+
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 0e41abd..4d90a78 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -1,5 +1,4 @@
+ tool_programs = \
+- parse_hash_fails \
+ parse_request_log
+
+ if ENABLE_EXAMPLES
+@@ -25,7 +24,6 @@ EXTRA_DIST = Jamfile \
+ run_regression_tests.py\
+ run_tests.py
+
+-parse_hash_fails_SOURCES = parse_hash_fails.cpp
+ parse_request_log_SOURCES = parse_request_log.cpp
+
+ LDADD = $(top_builddir)/src/libtorrent-rasterbar.la
+diff --git a/tools/parse_hash_fails.cpp b/tools/parse_hash_fails.cpp
+deleted file mode 100644
+index f686c5e..0000000
+--- a/tools/parse_hash_fails.cpp
++++ /dev/null
+@@ -1,104 +0,0 @@
+-/*
+-
+-Copyright (c) 2012, Arvid Norberg
+-All rights reserved.
+-
+-Redistribution and use in source and binary forms, with or without
+-modification, are permitted provided that the following conditions
+-are met:
+-
+- * Redistributions of source code must retain the above copyright
+- notice, this list of conditions and the following disclaimer.
+- * Redistributions in binary form must reproduce the above copyright
+- notice, this list of conditions and the following disclaimer in
+- the documentation and/or other materials provided with the distribution.
+- * Neither the name of the author nor the names of its
+- contributors may be used to endorse or promote products derived
+- from this software without specific prior written permission.
+-
+-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+-POSSIBILITY OF SUCH DAMAGE.
+-
+-*/
+-
+-#include <stdlib.h>
+-#include <string>
+-#include <cstring>
+-#include "libtorrent/file.hpp"
+-
+-using namespace libtorrent;
+-
+-void print_usage()
+-{
+- fprintf(stderr, "usage: parse_hash_fails log-directory\n");
+- exit(1);
+-}
+-
+-int main(int argc, char* argv[])
+-{
+- if (argc != 2) print_usage();
+-
+- error_code ec;
+- directory d(argv[1], ec);
+- if (ec)
+- {
+- fprintf(stderr, "failed to open directory: %s\n%s\n"
+- , argv[1], ec.message().c_str());
+- return 1;
+- }
+-
+- for (; !d.done(); d.next(ec))
+- {
+- if (ec)
+- {
+- fprintf(stderr, "error listing directory: %s\n", ec.message().c_str());
+- return 1;
+- }
+- std::string filename = d.file();
+- char hash[41];
+- int piece;
+- int block;
+- char state[10]; // good, bad
+- if (sscanf(filename.c_str(), "%40s_%d_%d_%4s.block", hash, &piece, &block, state) != 4)
+- {
+- fprintf(stderr, "no match: %s\n", filename.c_str());
+- continue;
+- }
+-
+- if (strcmp(state, "good") != 0) continue;
+-
+- char target_filename[1024];
+- snprintf(target_filename, sizeof(target_filename), "%s_%d_%d.diff", hash, piece, block);
+-
+- fprintf(stderr, "diffing %s\n", filename.c_str());
+- char cmdline[2048];
+- snprintf(cmdline, sizeof(cmdline), "xxd %s >temp_good", combine_path(argv[1], filename).c_str());
+- system(cmdline);
+- snprintf(cmdline, sizeof(cmdline), "xxd %s/%s_%d_%d_bad.block >temp_bad", argv[1], hash, piece, block);
+- system(cmdline);
+- snprintf(cmdline, sizeof(cmdline), "diff -y temp_good temp_bad | colordiff >%s"
+- , combine_path(argv[1], target_filename).c_str());
+- system(cmdline);
+- }
+-
+- FILE* log_file = fopen(argv[1], "r");
+- if (log_file == 0)
+- {
+- fprintf(stderr, "failed to open logfile: %s\n%d: %s\n"
+- , argv[1], errno, strerror(errno));
+- return 1;
+- }
+-
+- return 0;
+-}
+-
+-
+diff --git a/tools/parse_request_log.cpp b/tools/parse_request_log.cpp
+index c719f65..8394918 100644
+--- a/tools/parse_request_log.cpp
++++ b/tools/parse_request_log.cpp
+@@ -30,13 +30,16 @@ POSSIBILITY OF SUCH DAMAGE.
+
+ */
+
+-#include "libtorrent/file.hpp"
++#include "libtorrent/config.hpp"
+ #include "libtorrent/io.hpp"
+ #include <cstring>
+ #include <boost/bind.hpp>
+ #include <stdlib.h>
+ #include <map>
+ #include <vector>
++#include <assert.h>
++#include <stdio.h>
++#include <errno.h>
+
+ using namespace libtorrent;
+ using namespace libtorrent::detail; // for write_* and read_*
+diff --git a/tools/Jamfile b/tools/Jamfile
+index 69ee424..0c156d0 100644
+--- a/tools/Jamfile
++++ b/tools/Jamfile
+@@ -33,7 +33,6 @@ project tools
+ <link>static
+ ;
+
+-exe parse_hash_fails : parse_hash_fails.cpp ;
+ exe parse_request_log : parse_request_log.cpp ;
+ exe dht : dht_put.cpp : <include>../ed25519/src ;
+
diff --git a/net-libs/rb_libtorrent/rb_libtorrent-1.0.6.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-1.0.6.ebuild
index 4508582..17935da 100644
--- a/net-libs/rb_libtorrent/rb_libtorrent-1.0.6.ebuild
+++ b/net-libs/rb_libtorrent/rb_libtorrent-1.0.6.ebuild
@@ -44,6 +44,7 @@ RESTRICT="test"
PATCHES=(
"${FILESDIR}"/${PN}-1.0.2-python.patch
"${FILESDIR}"/${P}-fix-debug-build.patch
+ "${FILESDIR}"/${P}-remove-parse-hash-fails.patch
)
AUTOTOOLS_IN_SOURCE_BUILD=1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/rb_libtorrent/files/, net-libs/rb_libtorrent/
@ 2016-03-09 17:01 Lars Wendler
0 siblings, 0 replies; 5+ messages in thread
From: Lars Wendler @ 2016-03-09 17:01 UTC (permalink / raw
To: gentoo-commits
commit: ec8fdb57666d2f8caa61ddfc6f2f86c1064aa3f6
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 9 17:00:40 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Mar 9 17:00:58 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec8fdb57
net-libs/rb_libtorrent: Removed old.
Package-Manager: portage-2.2.27
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
net-libs/rb_libtorrent/Manifest | 3 -
.../rb_libtorrent-1.0.6-fix-debug-build.patch | 26 ---
..._libtorrent-1.0.6-remove-parse-hash-fails.patch | 185 ---------------------
net-libs/rb_libtorrent/rb_libtorrent-1.0.4.ebuild | 75 ---------
net-libs/rb_libtorrent/rb_libtorrent-1.0.5.ebuild | 75 ---------
net-libs/rb_libtorrent/rb_libtorrent-1.0.6.ebuild | 80 ---------
6 files changed, 444 deletions(-)
diff --git a/net-libs/rb_libtorrent/Manifest b/net-libs/rb_libtorrent/Manifest
index 7c9bbd5..eece58d 100644
--- a/net-libs/rb_libtorrent/Manifest
+++ b/net-libs/rb_libtorrent/Manifest
@@ -1,8 +1,5 @@
DIST libtorrent-rasterbar-0.16.17.tar.gz 3018881 SHA256 67a1d29c626d991d6e39c2f9828ca70c4053d057070ce01fff9b4ad37e64aff0 SHA512 532b2438e24c3ecad239480a1bd6241a0d73d40f8d5bdcf61ddfcee1a41f1644c9004d4f234968efd50158224219b78852ec936a05b75b15f3442b594460cdd6 WHIRLPOOL 755e201741ed77cf91cb0976cbaa83c645647341d2cfe40564552599f2792ba76bd02e82a94669d80b199f1a1d6290824686d2bb52d6b0da8663d2274176f3eb
DIST libtorrent-rasterbar-0.16.19.tar.gz 3030253 SHA256 9ebd3fa8accfa27d0c81cdbbe15d7b411ea1deec34ac6325dec7197f05d82982 SHA512 8e605802cb1ae80228d253adba44da6f5af39e7d65c59f65e15444ed1122500529ee068f6d3608b1c2a249f18b4de695073f7b67772fa445618757697d779340 WHIRLPOOL 4429d07bd95f398a09f283a7cbcf6611aeb8ac5d2b8ed76d98f89d601aa6ed66e6eb8f044b351fad6cca3606351ccc67081dba7c8dd8d9c3c433eae84aedeb2c
-DIST libtorrent-rasterbar-1.0.4.tar.gz 3297242 SHA256 1f567823133b1493b9717afc8334eed691bf0ab452d4a2e0f644989f13ce9db0 SHA512 1917d1207171d23dbcbbb17f0c3afdadcec059e8e603e2009bb72a610be598f2ff5a5ebdfc5a1b0e07563a05e774b395e24e04fabb17847b6a757f47f41a2313 WHIRLPOOL acbb9658d80f42bc6fe00cbe491e58bc059b6eeb96c0e34f7c86ad549104dabc4c9e2df5c931fd719f064bff6c4d06376022cf0e221034fc5e88af88d258f8f1
-DIST libtorrent-rasterbar-1.0.5.tar.gz 3302804 SHA256 474a43da2147bec7e333c10f70b07221f4732dd67e071d5e90acc7edb8f657b0 SHA512 1ec54dfac1555ac1a843d12e239d781e940ef81ca13a943c58812b0fb62686e89bc5e0135feb94267fb624077cb0ad9971d496d8474b91f3687ef3b90a524df6 WHIRLPOOL a84f7895fdfda2020630c387eedd9b5a82ddc51af6b35fe8a2e7216495baaf9901a58ef2335c254fa3c2e0c713c7e6a1d9f976984fa5998329e47bc95ae22a63
-DIST libtorrent-rasterbar-1.0.6.tar.gz 3307491 SHA256 c97de804b77f44591801631aca3869567671df2d3e2afe7f5453d8db2478fd61 SHA512 798529f877dc94aa8eb635677a2fffb6deead3937153e78ac5344fd81422f9fd9594e227db3ec0ae954dfc59e4dd5f3b8f6dbed2e3aa1f9a710c32b0622f54ee WHIRLPOOL 250651925c4d09b6e73c3c3e4b1e1f9131b49dbf3bdbeda3d683f204d4cebbcb865b694aa5e079072a73be922a25a2378094744bf4dd3bc4e220e9b0115342b6
DIST libtorrent-rasterbar-1.0.7.tar.gz 3298005 SHA256 3e16e024b175fefada17471c659fdbcfab235f9619d4f0913faa13cb02ca8d83 SHA512 d60736af4b7c38317821810995dd9bec21688a9506e9b908394c2a1a87acd2abf23000856dedcad487b9ecc7b5680f83cfc09ff9db79af00fe21e94337daeacf WHIRLPOOL aff289e3ca85eedf688e8a898f0164a4d692e8c813b04dbae6323bc56003f5c3af862167a1d00a8bfe193dfda15d20a18a48bcbeac9313e29d6f2de35d20e621
DIST rb_libtorrent-1.0.8.tar.gz 2977324 SHA256 24498625d946b80b2269789fb666196240fe805a0b6417d83d1f4dd9ee5f9a7a SHA512 7ab98712225e19224c969fe4c6cd2f21f0aff3f5130dc1b3a0ea1b339b23b3cd303e76aeec9ac23e253c77865c60fd6623f7c8cd4e336c5a16fdf3d4627b88e2 WHIRLPOOL 23c3f84f304e642c7c25239a8a209d37afde41454f8688ef1b24c680d0d268e9163244dc06b973a49a8173f7e1cd7b7bf4f359fb89294cee5868060a64dbb2eb
DIST rb_libtorrent-1.0.9.tar.gz 2977503 SHA256 f4eadcbc779edc590d0162b0188c1b179d2cc72519c3756989ef925e376ddecd SHA512 0980ebb5567310ad6f235899770cfc7a23ef754f5a8513e1baa8bbec139ff26006a6b47a1cca62e45da496b901c6646eee3dd76ab4bb5410ce3fc119e717c072 WHIRLPOOL 7c6862d9d4fbc27d6de04cba8ac605dbffafcf1b26a3519bc94964727416655450b74cb62928f27fa568dcc163c8a599ca78f080a86171b6e1283d9b794924b8
diff --git a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.6-fix-debug-build.patch b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.6-fix-debug-build.patch
deleted file mode 100644
index 62429e7..0000000
--- a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.6-fix-debug-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
-X-Gentoo-Bug: 559728
-X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=559728
-
-From 06ce6a2d8b048c5791e2cc5acd1dfe8845680a84 Mon Sep 17 00:00:00 2001
-From: Chocobo1 <Chocobo1@users.noreply.github.com>
-Date: Sat, 1 Aug 2015 20:29:43 +0800
-Subject: [PATCH] Fix typo
-
----
- src/torrent.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/torrent.cpp b/src/torrent.cpp
-index d2da131..2e276ec 100644
---- a/src/torrent.cpp
-+++ b/src/torrent.cpp
-@@ -675,7 +675,7 @@ namespace libtorrent
- }
-
- #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
-- debug_log("*** LEAVING SEED MODE (%s)", seed ? "as seed" : "as non-seed");
-+ debug_log("*** LEAVING SEED MODE (%s)", m_seed_mode ? "as seed" : "as non-seed");
- #endif
- m_seed_mode = false;
- // seed is false if we turned out not
diff --git a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.6-remove-parse-hash-fails.patch b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.6-remove-parse-hash-fails.patch
deleted file mode 100644
index 53ba0b8..0000000
--- a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.6-remove-parse-hash-fails.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-X-Gentoo-Bug: 550252
-X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=550252
-Upstream report: https://github.com/arvidn/libtorrent/issues/157
-[markos]: Merge commits
-Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
-
-From 61a896035782436d5a8cceef1fc997e97ebbe019 Mon Sep 17 00:00:00 2001
-From: arvidn <arvid@libtorrent.org>
-Date: Sat, 12 Sep 2015 09:54:40 -0400
-Subject: [PATCH] remove parse_hash_fails.cpp
-
-From 21e908ed1ea661c41e836230b8cf066688038d2b Mon Sep 17 00:00:00 2001
-From: arvidn <arvid@libtorrent.org>
-Date: Sat, 12 Sep 2015 09:56:30 -0400
-Subject: [PATCH] remove parse_hash_fails from Jamfile also
----
- tools/Makefile.am | 2 -
- tools/parse_hash_fails.cpp | 104 --------------------------------------------
- tools/parse_request_log.cpp | 5 ++-
- tools/Jamfile | 1 -
- 4 files changed, 5 insertions(+), 108 deletions(-)
- delete mode 100644 tools/parse_hash_fails.cpp
-
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 0e41abd..4d90a78 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -1,5 +1,4 @@
- tool_programs = \
-- parse_hash_fails \
- parse_request_log
-
- if ENABLE_EXAMPLES
-@@ -25,7 +24,6 @@ EXTRA_DIST = Jamfile \
- run_regression_tests.py\
- run_tests.py
-
--parse_hash_fails_SOURCES = parse_hash_fails.cpp
- parse_request_log_SOURCES = parse_request_log.cpp
-
- LDADD = $(top_builddir)/src/libtorrent-rasterbar.la
-diff --git a/tools/parse_hash_fails.cpp b/tools/parse_hash_fails.cpp
-deleted file mode 100644
-index f686c5e..0000000
---- a/tools/parse_hash_fails.cpp
-+++ /dev/null
-@@ -1,104 +0,0 @@
--/*
--
--Copyright (c) 2012, Arvid Norberg
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions
--are met:
--
-- * Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in
-- the documentation and/or other materials provided with the distribution.
-- * Neither the name of the author nor the names of its
-- contributors may be used to endorse or promote products derived
-- from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
--AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
--IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
--ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
--LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
--CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
--SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
--INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
--CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
--ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
--POSSIBILITY OF SUCH DAMAGE.
--
--*/
--
--#include <stdlib.h>
--#include <string>
--#include <cstring>
--#include "libtorrent/file.hpp"
--
--using namespace libtorrent;
--
--void print_usage()
--{
-- fprintf(stderr, "usage: parse_hash_fails log-directory\n");
-- exit(1);
--}
--
--int main(int argc, char* argv[])
--{
-- if (argc != 2) print_usage();
--
-- error_code ec;
-- directory d(argv[1], ec);
-- if (ec)
-- {
-- fprintf(stderr, "failed to open directory: %s\n%s\n"
-- , argv[1], ec.message().c_str());
-- return 1;
-- }
--
-- for (; !d.done(); d.next(ec))
-- {
-- if (ec)
-- {
-- fprintf(stderr, "error listing directory: %s\n", ec.message().c_str());
-- return 1;
-- }
-- std::string filename = d.file();
-- char hash[41];
-- int piece;
-- int block;
-- char state[10]; // good, bad
-- if (sscanf(filename.c_str(), "%40s_%d_%d_%4s.block", hash, &piece, &block, state) != 4)
-- {
-- fprintf(stderr, "no match: %s\n", filename.c_str());
-- continue;
-- }
--
-- if (strcmp(state, "good") != 0) continue;
--
-- char target_filename[1024];
-- snprintf(target_filename, sizeof(target_filename), "%s_%d_%d.diff", hash, piece, block);
--
-- fprintf(stderr, "diffing %s\n", filename.c_str());
-- char cmdline[2048];
-- snprintf(cmdline, sizeof(cmdline), "xxd %s >temp_good", combine_path(argv[1], filename).c_str());
-- system(cmdline);
-- snprintf(cmdline, sizeof(cmdline), "xxd %s/%s_%d_%d_bad.block >temp_bad", argv[1], hash, piece, block);
-- system(cmdline);
-- snprintf(cmdline, sizeof(cmdline), "diff -y temp_good temp_bad | colordiff >%s"
-- , combine_path(argv[1], target_filename).c_str());
-- system(cmdline);
-- }
--
-- FILE* log_file = fopen(argv[1], "r");
-- if (log_file == 0)
-- {
-- fprintf(stderr, "failed to open logfile: %s\n%d: %s\n"
-- , argv[1], errno, strerror(errno));
-- return 1;
-- }
--
-- return 0;
--}
--
--
-diff --git a/tools/parse_request_log.cpp b/tools/parse_request_log.cpp
-index c719f65..8394918 100644
---- a/tools/parse_request_log.cpp
-+++ b/tools/parse_request_log.cpp
-@@ -30,13 +30,16 @@ POSSIBILITY OF SUCH DAMAGE.
-
- */
-
--#include "libtorrent/file.hpp"
-+#include "libtorrent/config.hpp"
- #include "libtorrent/io.hpp"
- #include <cstring>
- #include <boost/bind.hpp>
- #include <stdlib.h>
- #include <map>
- #include <vector>
-+#include <assert.h>
-+#include <stdio.h>
-+#include <errno.h>
-
- using namespace libtorrent;
- using namespace libtorrent::detail; // for write_* and read_*
-diff --git a/tools/Jamfile b/tools/Jamfile
-index 69ee424..0c156d0 100644
---- a/tools/Jamfile
-+++ b/tools/Jamfile
-@@ -33,7 +33,6 @@ project tools
- <link>static
- ;
-
--exe parse_hash_fails : parse_hash_fails.cpp ;
- exe parse_request_log : parse_request_log.cpp ;
- exe dht : dht_put.cpp : <include>../ed25519/src ;
-
diff --git a/net-libs/rb_libtorrent/rb_libtorrent-1.0.4.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-1.0.4.ebuild
deleted file mode 100644
index e683398..0000000
--- a/net-libs/rb_libtorrent/rb_libtorrent-1.0.4.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-PYTHON_REQ_USE="threads"
-DISTUTILS_OPTIONAL=true
-AUTOTOOLS_AUTORECONF=true
-
-inherit autotools-utils multilib distutils-r1
-
-MY_P=${P/rb_/}
-MY_P=${MY_P/torrent/torrent-rasterbar}
-S=${WORKDIR}/${MY_P}
-
-DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
-HOMEPAGE="http://libtorrent.org"
-SRC_URI="mirror://sourceforge/libtorrent/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="debug doc examples python ssl static-libs test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- >=dev-libs/boost-1.53:=[threads]
- sys-libs/zlib
- examples? ( !net-p2p/mldonkey )
- ssl? ( dev-libs/openssl:0= )
- python? (
- ${PYTHON_DEPS}
- dev-libs/boost[python,${PYTHON_USEDEP}]
- )"
-DEPEND="${RDEPEND}
- >=sys-devel/libtool-2.2"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}"/${PN}-1.0.2-python.patch )
-
-AUTOTOOLS_IN_SOURCE_BUILD=1
-
-src_configure() {
- local myeconfargs=(
- --disable-silent-rules # bug 441842
- --with-boost-libdir=/usr/$(get_libdir)
- $(use_enable debug)
- $(use_enable test tests)
- $(use_enable examples)
- $(use_enable ssl encryption)
- $(use_enable python python-binding)
- $(usex debug "--enable-logging=verbose" "")
- )
-
- use python && python_setup
-
- autotools-utils_src_configure
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_configure
-}
-
-src_compile() {
- autotools-utils_src_compile
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_compile
-}
-
-src_install() {
- use doc && HTML_DOCS=( "${S}"/docs/. )
-
- autotools-utils_src_install
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_install
-}
diff --git a/net-libs/rb_libtorrent/rb_libtorrent-1.0.5.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-1.0.5.ebuild
deleted file mode 100644
index 4d7b03a..0000000
--- a/net-libs/rb_libtorrent/rb_libtorrent-1.0.5.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-PYTHON_REQ_USE="threads"
-DISTUTILS_OPTIONAL=true
-AUTOTOOLS_AUTORECONF=true
-
-inherit autotools-utils multilib distutils-r1
-
-MY_P=${P/rb_/}
-MY_P=${MY_P/torrent/torrent-rasterbar}
-S=${WORKDIR}/${MY_P}
-
-DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
-HOMEPAGE="http://libtorrent.org"
-SRC_URI="mirror://sourceforge/libtorrent/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="debug doc examples python ssl static-libs test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- >=dev-libs/boost-1.53:=[threads]
- sys-libs/zlib
- examples? ( !net-p2p/mldonkey )
- ssl? ( dev-libs/openssl:0= )
- python? (
- ${PYTHON_DEPS}
- dev-libs/boost:=[python,${PYTHON_USEDEP}]
- )"
-DEPEND="${RDEPEND}
- >=sys-devel/libtool-2.2"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}"/${PN}-1.0.2-python.patch )
-
-AUTOTOOLS_IN_SOURCE_BUILD=1
-
-src_configure() {
- local myeconfargs=(
- --disable-silent-rules # bug 441842
- --with-boost-libdir=/usr/$(get_libdir)
- $(use_enable debug)
- $(use_enable test tests)
- $(use_enable examples)
- $(use_enable ssl encryption)
- $(use_enable python python-binding)
- $(usex debug "--enable-logging=verbose" "")
- )
-
- use python && python_setup
-
- autotools-utils_src_configure
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_configure
-}
-
-src_compile() {
- autotools-utils_src_compile
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_compile
-}
-
-src_install() {
- use doc && HTML_DOCS=( "${S}"/docs/. )
-
- autotools-utils_src_install
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_install
-}
diff --git a/net-libs/rb_libtorrent/rb_libtorrent-1.0.6.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-1.0.6.ebuild
deleted file mode 100644
index 5d8c19f..0000000
--- a/net-libs/rb_libtorrent/rb_libtorrent-1.0.6.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-PYTHON_REQ_USE="threads"
-DISTUTILS_OPTIONAL=true
-AUTOTOOLS_AUTORECONF=true
-
-inherit autotools-utils multilib distutils-r1 versionator
-
-MY_P=${P/rb_/}
-MY_P=${MY_P/torrent/torrent-rasterbar}
-MY_PV=$(replace_all_version_separators '_' )
-S=${WORKDIR}/${MY_P}
-
-DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
-HOMEPAGE="http://libtorrent.org"
-SRC_URI="https://github.com/arvidn/libtorrent/releases/download/libtorrent-${MY_PV}/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="debug doc examples python ssl static-libs test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- >=dev-libs/boost-1.53:=[threads]
- sys-libs/zlib
- examples? ( !net-p2p/mldonkey )
- ssl? ( dev-libs/openssl:0= )
- python? (
- ${PYTHON_DEPS}
- dev-libs/boost:=[python,${PYTHON_USEDEP}]
- )"
-DEPEND="${RDEPEND}
- >=sys-devel/libtool-2.2"
-
-RESTRICT="test"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.0.2-python.patch
- "${FILESDIR}"/${P}-fix-debug-build.patch
- "${FILESDIR}"/${P}-remove-parse-hash-fails.patch
-)
-
-AUTOTOOLS_IN_SOURCE_BUILD=1
-
-src_configure() {
- local myeconfargs=(
- --disable-silent-rules # bug 441842
- --with-boost-libdir=/usr/$(get_libdir)
- $(use_enable debug)
- $(use_enable test tests)
- $(use_enable examples)
- $(use_enable ssl encryption)
- $(use_enable python python-binding)
- $(usex debug "--enable-logging=verbose" "")
- )
-
- use python && python_setup
-
- autotools-utils_src_configure
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_configure
-}
-
-src_compile() {
- autotools-utils_src_compile
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_compile
-}
-
-src_install() {
- use doc && HTML_DOCS=( "${S}"/docs/. )
-
- autotools-utils_src_install
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_install
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/rb_libtorrent/files/, net-libs/rb_libtorrent/
@ 2016-08-18 20:31 Davide Pesavento
0 siblings, 0 replies; 5+ messages in thread
From: Davide Pesavento @ 2016-08-18 20:31 UTC (permalink / raw
To: gentoo-commits
commit: 9a7268d86d008c69d0f0ccbb3cda4ed455febdba
Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 18 20:24:15 2016 +0000
Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 20:30:13 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a7268d8
net-libs/rb_libtorrent: revbump with several fixes and improvements
* add libressl support (bug 574004)
* use official "prepared" tarball, saves eautoreconf call (bug 577288)
* link python bindings against the just-built library (bug 578026)
* backport patch for CVE-2016-5301 (bug 585278)
* add subslot
* use system copy of geoip library and allow disabling it via USE flag
* drop some obsolete/redundant options from econf invocation
* revise which logging options are turned on by USE=debug
* fix and unrestrict tests
* don't install .la file when not needed
Package-Manager: portage-2.3.0
net-libs/rb_libtorrent/Manifest | 1 +
.../files/rb_libtorrent-1.0.9-CVE-2016-5301.patch | 289 +++++++++++++++++++++
.../rb_libtorrent-1.0.9-test_torrent_parse.patch | 41 +++
net-libs/rb_libtorrent/metadata.xml | 3 +-
.../rb_libtorrent/rb_libtorrent-1.0.9-r2.ebuild | 114 ++++++++
5 files changed, 446 insertions(+), 2 deletions(-)
diff --git a/net-libs/rb_libtorrent/Manifest b/net-libs/rb_libtorrent/Manifest
index e13d166..dcccf65 100644
--- a/net-libs/rb_libtorrent/Manifest
+++ b/net-libs/rb_libtorrent/Manifest
@@ -1,4 +1,5 @@
DIST libtorrent-rasterbar-0.16.17.tar.gz 3018881 SHA256 67a1d29c626d991d6e39c2f9828ca70c4053d057070ce01fff9b4ad37e64aff0 SHA512 532b2438e24c3ecad239480a1bd6241a0d73d40f8d5bdcf61ddfcee1a41f1644c9004d4f234968efd50158224219b78852ec936a05b75b15f3442b594460cdd6 WHIRLPOOL 755e201741ed77cf91cb0976cbaa83c645647341d2cfe40564552599f2792ba76bd02e82a94669d80b199f1a1d6290824686d2bb52d6b0da8663d2274176f3eb
DIST libtorrent-rasterbar-0.16.19.tar.gz 3030253 SHA256 9ebd3fa8accfa27d0c81cdbbe15d7b411ea1deec34ac6325dec7197f05d82982 SHA512 8e605802cb1ae80228d253adba44da6f5af39e7d65c59f65e15444ed1122500529ee068f6d3608b1c2a249f18b4de695073f7b67772fa445618757697d779340 WHIRLPOOL 4429d07bd95f398a09f283a7cbcf6611aeb8ac5d2b8ed76d98f89d601aa6ed66e6eb8f044b351fad6cca3606351ccc67081dba7c8dd8d9c3c433eae84aedeb2c
DIST libtorrent-rasterbar-1.0.7.tar.gz 3298005 SHA256 3e16e024b175fefada17471c659fdbcfab235f9619d4f0913faa13cb02ca8d83 SHA512 d60736af4b7c38317821810995dd9bec21688a9506e9b908394c2a1a87acd2abf23000856dedcad487b9ecc7b5680f83cfc09ff9db79af00fe21e94337daeacf WHIRLPOOL aff289e3ca85eedf688e8a898f0164a4d692e8c813b04dbae6323bc56003f5c3af862167a1d00a8bfe193dfda15d20a18a48bcbeac9313e29d6f2de35d20e621
+DIST libtorrent-rasterbar-1.0.9.tar.gz 3292886 SHA256 11a93125ed49f796fca83da925ab7dc29e91d88b915f078caaddaaf559d63db6 SHA512 68558d440c8220711a410e54a28316b7b98f6dd4d0dae2d56cee3a3f0bd031f8b0623a8eb3fde312c4d1b61b4be8fc21396cb3e9fd7f6d86e3a9a693ee036b66 WHIRLPOOL 2c2f695458fe1069d4159d308def7591bc318eed30e649bc5ad4579fef1c67d3ccabc6acfb7570ae09a9b78fe8c00f975c88d48231b9db71e714672e1043d1f5
DIST rb_libtorrent-1.0.9.tar.gz 2977503 SHA256 f4eadcbc779edc590d0162b0188c1b179d2cc72519c3756989ef925e376ddecd SHA512 0980ebb5567310ad6f235899770cfc7a23ef754f5a8513e1baa8bbec139ff26006a6b47a1cca62e45da496b901c6646eee3dd76ab4bb5410ce3fc119e717c072 WHIRLPOOL 7c6862d9d4fbc27d6de04cba8ac605dbffafcf1b26a3519bc94964727416655450b74cb62928f27fa568dcc163c8a599ca78f080a86171b6e1283d9b794924b8
diff --git a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.9-CVE-2016-5301.patch b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.9-CVE-2016-5301.patch
new file mode 100644
index 0000000..19ebeeb
--- /dev/null
+++ b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.9-CVE-2016-5301.patch
@@ -0,0 +1,289 @@
+From 22099cec46741417a6fb6df560468eb64655db33 Mon Sep 17 00:00:00 2001
+From: arvidn <arvid@cs.umu.se>
+Date: Sat, 4 Jun 2016 12:49:38 -0400
+Subject: [PATCH] back-port http_parser bugfix
+
+---
+ src/http_parser.cpp | 32 +++++++
+ test/test_http_parser.cpp | 142 ++++++++++++++++++++++++------
+
+diff --git a/src/http_parser.cpp b/src/http_parser.cpp
+index 7664cad..89de739 100644
+--- a/src/http_parser.cpp
++++ b/src/http_parser.cpp
+@@ -151,6 +151,7 @@ namespace libtorrent
+ if (m_state == read_status)
+ {
+ TORRENT_ASSERT(!m_finished);
++ TORRENT_ASSERT(pos <= recv_buffer.end);
+ char const* newline = std::find(pos, recv_buffer.end, '\n');
+ // if we don't have a full line yet, wait.
+ if (newline == recv_buffer.end)
+@@ -171,6 +172,7 @@ namespace libtorrent
+
+ char const* line = pos;
+ ++newline;
++ TORRENT_ASSERT(newline >= pos);
+ int incoming = int(newline - pos);
+ m_recv_pos += incoming;
+ boost::get<1>(ret) += newline - (m_recv_buffer.begin + start_pos);
+@@ -204,6 +206,7 @@ namespace libtorrent
+ if (m_state == read_header)
+ {
+ TORRENT_ASSERT(!m_finished);
++ TORRENT_ASSERT(pos <= recv_buffer.end);
+ char const* newline = std::find(pos, recv_buffer.end, '\n');
+ std::string line;
+
+@@ -254,6 +257,12 @@ namespace libtorrent
+ if (name == "content-length")
+ {
+ m_content_length = strtoll(value.c_str(), 0, 10);
++ if (m_content_length < 0)
++ {
++ m_state = error_state;
++ error = true;
++ return ret;
++ }
+ }
+ else if (name == "connection")
+ {
+@@ -271,12 +280,24 @@ namespace libtorrent
+ if (string_begins_no_case("bytes ", ptr)) ptr += 6;
+ char* end;
+ m_range_start = strtoll(ptr, &end, 10);
++ if (m_range_start < 0)
++ {
++ m_state = error_state;
++ error = true;
++ return ret;
++ }
+ if (end == ptr) success = false;
+ else if (*end != '-') success = false;
+ else
+ {
+ ptr = end + 1;
+ m_range_end = strtoll(ptr, &end, 10);
++ if (m_range_end < 0)
++ {
++ m_state = error_state;
++ error = true;
++ return ret;
++ }
+ if (end == ptr) success = false;
+ }
+
+@@ -295,6 +316,7 @@ namespace libtorrent
+ }
+
+ TORRENT_ASSERT(m_recv_pos <= recv_buffer.left());
++ TORRENT_ASSERT(pos <= recv_buffer.end);
+ newline = std::find(pos, recv_buffer.end, '\n');
+ }
+ boost::get<1>(ret) += newline - (m_recv_buffer.begin + start_pos);
+@@ -324,6 +346,12 @@ namespace libtorrent
+ int header_size;
+ if (parse_chunk_header(buf, &chunk_size, &header_size))
+ {
++ if (chunk_size < 0)
++ {
++ m_state = error_state;
++ error = true;
++ return ret;
++ }
+ if (chunk_size > 0)
+ {
+ std::pair<size_type, size_type> chunk_range(m_cur_chunk_end + header_size
+@@ -396,6 +424,7 @@ namespace libtorrent
+ bool http_parser::parse_chunk_header(buffer::const_interval buf
+ , size_type* chunk_size, int* header_size)
+ {
++ TORRENT_ASSERT(buf.begin <= buf.end);
+ char const* pos = buf.begin;
+
+ // ignore one optional new-line. This is since each chunk
+@@ -406,6 +435,7 @@ namespace libtorrent
+ if (pos < buf.end && pos[0] == '\n') ++pos;
+ if (pos == buf.end) return false;
+
++ TORRENT_ASSERT(pos <= buf.end);
+ char const* newline = std::find(pos, buf.end, '\n');
+ if (newline == buf.end) return false;
+ ++newline;
+@@ -418,6 +448,8 @@ namespace libtorrent
+
+ // first, read the chunk length
+ *chunk_size = strtoll(pos, 0, 16);
++ if (*chunk_size < 0) return true;
++
+ if (*chunk_size != 0)
+ {
+ *header_size = newline - buf.begin;
+diff --git a/test/test_http_parser.cpp b/test/test_http_parser.cpp
+index 1385e94..0bbb038 100644
+--- a/test/test_http_parser.cpp
++++ b/test/test_http_parser.cpp
+@@ -64,10 +64,13 @@ tuple<int, int, bool> feed_bytes(http_parser& parser, char const* str)
+ ret.get<1>() += protocol;
+ ret.get<2>() |= error;
+ // std::cerr << payload << ", " << protocol << ", " << chunk_size << std::endl;
+- TORRENT_ASSERT(payload + protocol == chunk_size);
++ TORRENT_ASSERT(payload + protocol == chunk_size || error);
++ }
++ if (!ret.get<2>())
++ {
++ TEST_CHECK(prev == make_tuple(0, 0, false) || ret == prev);
++ TEST_EQUAL(ret.get<0>() + ret.get<1>(), strlen(str));
+ }
+- TEST_CHECK(prev == make_tuple(0, 0, false) || ret == prev);
+- TEST_EQUAL(ret.get<0>() + ret.get<1>(), strlen(str));
+ prev = ret;
+ }
+ return ret;
+@@ -316,29 +319,6 @@ int test_main()
+ TEST_EQUAL(parser.headers().find("test2")->second, "bar");
+ }
+
+- // test chunked encoding
+-
+- parser.reset();
+-
+- char const* chunked_input =
+- "HTTP/1.1 200 OK\r\n"
+- "Transfer-Encoding: chunked\r\n"
+- "Content-Type: text/plain\r\n"
+- "\r\n"
+- "4\r\ntest\r\n4\r\n1234\r\n10\r\n0123456789abcdef\r\n"
+- "0\r\n\r\n";
+- received = feed_bytes(parser, chunked_input);
+-
+- TEST_EQUAL(strlen(chunked_input), 24 + 94)
+- TEST_CHECK(received == make_tuple(24, 94, false));
+- TEST_CHECK(parser.finished());
+-
+- char mutable_buffer[100];
+- memcpy(mutable_buffer, parser.get_body().begin, parser.get_body().left());
+- int len = parser.collapse_chunk_headers(mutable_buffer, parser.get_body().left());
+-
+- TEST_CHECK(std::equal(mutable_buffer, mutable_buffer + len, "test12340123456789abcdef"));
+-
+ // test url parsing
+
+ error_code ec;
+@@ -392,6 +372,116 @@ int test_main()
+ TEST_EQUAL(resolve_redirect_location("http://example.com/a/b", "http://test.com/d")
+ , "http://test.com/d");
+
++ char const* chunked_input =
++ "HTTP/1.1 200 OK\r\n"
++ "Transfer-Encoding: chunked\r\n"
++ "Content-Type: text/plain\r\n"
++ "\r\n"
++ "4\r\ntest\r\n4\r\n1234\r\n10\r\n0123456789abcdef\r\n"
++ "0\r\n\r\n";
++
++{
++ http_parser parser;
++ boost::tuple<int, int, bool> const received
++ = feed_bytes(parser, chunked_input);
++
++ TEST_EQUAL(strlen(chunked_input), 24 + 94)
++ TEST_CHECK(received == make_tuple(24, 94, false));
++ TEST_CHECK(parser.finished());
++
++ char mutable_buffer[100];
++ memcpy(mutable_buffer, parser.get_body().begin, parser.get_body().left());
++ int len = parser.collapse_chunk_headers(mutable_buffer, parser.get_body().left());
++
++ TEST_CHECK(std::equal(mutable_buffer, mutable_buffer + len, "test12340123456789abcdef"));
++}
++
++{
++ char const* chunked_input =
++ "HTTP/1.1 200 OK\r\n"
++ "Transfer-Encoding: chunked\r\n"
++ "Content-Length: -45345\r\n"
++ "\r\n";
++
++ http_parser parser;
++ boost::tuple<int, int, bool> const received
++ = feed_bytes(parser, chunked_input);
++
++ TEST_CHECK(boost::get<2>(received) == true);
++}
++
++{
++ char const* chunked_input =
++ "HTTP/1.1 200 OK\r\n"
++ "Transfer-Encoding: chunked\r\n"
++ "\r\n"
++ "-53465234545\r\n"
++ "foobar";
++
++ http_parser parser;
++ boost::tuple<int, int, bool> const received
++ = feed_bytes(parser, chunked_input);
++
++ TEST_CHECK(boost::get<2>(received) == true);
++}
++
++{
++ char const* chunked_input =
++ "HTTP/1.1 206 OK\n"
++ "Content-Range: bYTes -3-4\n"
++ "\n";
++
++ http_parser parser;
++ boost::tuple<int, int, bool> const received
++ = feed_bytes(parser, chunked_input);
++
++ TEST_CHECK(boost::get<2>(received) == true);
++}
++
++{
++ char const* chunked_input =
++ "HTTP/1.1 206 OK\n"
++ "Content-Range: bYTes 3--434\n"
++ "\n";
++
++ http_parser parser;
++ boost::tuple<int, int, bool> const received
++ = feed_bytes(parser, chunked_input);
++
++ TEST_CHECK(boost::get<2>(received) == true);
++}
++
++{
++ boost::uint8_t const invalid_chunked_input[] = {
++ 0x48, 0x6f, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, // HoTP/1.1 200 OK
++ 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d, // Cont-Length: 20
++ 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x2d, 0x4c, 0x65, // Contente: tn
++ 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x32, 0x30, // Transfer-Encoding: chunked
++ 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, //
++ 0x74, 0x65, 0x3a, 0x20, 0x74, 0x6e, 0x0d, 0x0a, //
++ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, //
++ 0x2d, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, // -89abc9abcdef
++ 0x67, 0x3a, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, // �
++ 0x65, 0x64, 0x0d, 0x0a, 0x0d, 0x0d, 0x0a, 0x0d, // T����������def
++ 0x0a, 0x0a, 0x2d, 0x38, 0x39, 0x61, 0x62, 0x63, // �
++ 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x0d, // T�����������est-headyr: foobar
++ 0x0a, 0xd6, 0x0d, 0x0a, 0x54, 0xbd, 0xbd, 0xbd,
++ 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0x64,
++ 0x65, 0x66, 0x0d, 0x0a, 0xd6, 0x0d, 0x0a, 0x54,
++ 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd,
++ 0xbd, 0xbd, 0xbd, 0x65, 0x73, 0x74, 0x2d, 0x68,
++ 0x65, 0x61, 0x64, 0x79, 0x72, 0x3a, 0x20, 0x66,
++ 0x6f, 0x6f, 0x62, 0x61, 0x72, 0x0d, 0x0a, 0x0d,
++ 0x0a, 0x00
++ };
++
++ http_parser parser;
++ boost::tuple<int, int, bool> const received
++ = feed_bytes(parser, reinterpret_cast<char const*>(invalid_chunked_input));
++
++ TEST_CHECK(boost::get<2>(received) == true);
++}
++
+ return 0;
+ }
+
diff --git a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.9-test_torrent_parse.patch b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.9-test_torrent_parse.patch
new file mode 100644
index 0000000..658c0aa
--- /dev/null
+++ b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.9-test_torrent_parse.patch
@@ -0,0 +1,41 @@
+From bdd91e29225b44a1a13e670dc4cecfb58f241d28 Mon Sep 17 00:00:00 2001
+From: Davide Pesavento <pesa@gentoo.org>
+Date: Sun, 7 Aug 2016 12:14:57 +0200
+Subject: [PATCH] Disable failing torrent_parse tests
+
+For unknown reasons, some test torrents are missing from the tarball.
+Skip the corresponding test cases to avoid spurious failures.
+---
+ test/test_torrent_parse.cpp | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/test/test_torrent_parse.cpp b/test/test_torrent_parse.cpp
+index 663f341..2de6fb5 100644
+--- a/test/test_torrent_parse.cpp
++++ b/test/test_torrent_parse.cpp
+@@ -49,13 +49,10 @@ using namespace libtorrent;
+ test_torrent_t test_torrents[] =
+ {
+ { "base.torrent" },
+- { "empty_path.torrent" },
+ { "parent_path.torrent" },
+ { "hidden_parent_path.torrent" },
+ { "single_multi_file.torrent" },
+ { "slash_path.torrent" },
+- { "slash_path2.torrent" },
+- { "slash_path3.torrent" },
+ { "backslash_path.torrent" },
+ { "url_list.torrent" },
+ { "url_list2.torrent" },
+@@ -75,8 +72,6 @@ test_torrent_t test_torrents[] =
+ { "root_hash.torrent" },
+ { "empty_path_multi.torrent" },
+ { "duplicate_web_seeds.torrent" },
+- { "invalid_name3.torrent" },
+- { "symlink1.torrent" },
+ };
+
+ struct test_failing_torrent_t
+--
+2.9.2
+
diff --git a/net-libs/rb_libtorrent/metadata.xml b/net-libs/rb_libtorrent/metadata.xml
index 36ca5cc..4133516 100644
--- a/net-libs/rb_libtorrent/metadata.xml
+++ b/net-libs/rb_libtorrent/metadata.xml
@@ -11,7 +11,6 @@
<remote-id type="github">arvidn/libtorrent</remote-id>
</upstream>
<use>
- <flag name="dht">Enable DHT (distributed hash table) support for
- libtorrent</flag>
+ <flag name="dht">Enable DHT (distributed hash table) support</flag>
</use>
</pkgmetadata>
diff --git a/net-libs/rb_libtorrent/rb_libtorrent-1.0.9-r2.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-1.0.9-r2.ebuild
new file mode 100644
index 0000000..0fc1b7bb
--- /dev/null
+++ b/net-libs/rb_libtorrent/rb_libtorrent-1.0.9-r2.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
+PYTHON_REQ_USE="threads"
+DISTUTILS_OPTIONAL=true
+DISTUTILS_IN_SOURCE_BUILD=true
+
+inherit distutils-r1 eutils versionator
+
+MY_P=libtorrent-rasterbar-${PV} # TODO: rename, bug 576126
+MY_PV=$(replace_all_version_separators _)
+
+DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
+HOMEPAGE="http://libtorrent.org"
+SRC_URI="https://github.com/arvidn/libtorrent/releases/download/libtorrent-${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/8"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="debug +dht doc examples +geoip libressl python +ssl static-libs test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/boost:=[threads]
+ virtual/libiconv
+ examples? ( !net-p2p/mldonkey )
+ geoip? ( dev-libs/geoip )
+ python? (
+ ${PYTHON_DEPS}
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+"
+DEPEND="${RDEPEND}
+ sys-devel/libtool
+"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0.9-CVE-2016-5301.patch"
+ "${FILESDIR}/${PN}-1.0.9-test_torrent_parse.patch"
+)
+
+src_prepare() {
+ default
+
+ # bug 578026
+ # prepend -L${S}/... to ensure bindings link against the lib we just built
+ sed -i -e "s|^|-L${S}/src/.libs |" bindings/python/compile_flags.in || die
+
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(use_enable debug logging)
+ $(use_enable debug statistics)
+ $(use_enable debug disk-stats)
+ $(use_enable dht dht $(usex debug logging yes))
+ $(use_enable examples)
+ $(use_enable geoip)
+ $(use_with geoip libgeoip)
+ $(use_enable ssl encryption)
+ $(use_enable static-libs static)
+ $(use_enable test tests)
+ --with-libiconv
+ )
+ econf "${myeconfargs[@]}"
+
+ if use python; then
+ myeconfargs+=(
+ --enable-python-binding
+ --with-boost-python
+ )
+ python_configure() {
+ econf "${myeconfargs[@]}"
+ }
+ distutils-r1_src_configure
+ fi
+}
+
+src_compile() {
+ default
+
+ python_compile() {
+ cd "${BUILD_DIR}/../bindings/python" || die
+ distutils-r1_python_compile
+ }
+ use python && distutils-r1_src_compile
+}
+
+src_install() {
+ use doc && HTML_DOCS+=( "${S}"/docs )
+
+ default
+
+ python_install() {
+ cd "${BUILD_DIR}/../bindings/python" || die
+ distutils-r1_python_install
+ }
+ use python && distutils-r1_src_install
+
+ prune_libtool_files
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/rb_libtorrent/files/, net-libs/rb_libtorrent/
@ 2016-10-24 13:05 Pacho Ramos
0 siblings, 0 replies; 5+ messages in thread
From: Pacho Ramos @ 2016-10-24 13:05 UTC (permalink / raw
To: gentoo-commits
commit: 4ad7bbe555e8293305faf5191e22613724026890
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 12:58:03 2016 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 13:04:55 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ad7bbe5
net-libs/rb_libtorrent: Drop old
Package-Manager: portage-2.3.2
RepoMan-Options: --force
net-libs/rb_libtorrent/Manifest | 2 -
.../files/rb_libtorrent-1.0.2-python.patch | 32 ---
.../files/rb_libtorrent-1.0.9-CVE-2016-5301.patch | 289 ---------------------
net-libs/rb_libtorrent/rb_libtorrent-1.0.7.ebuild | 78 ------
.../rb_libtorrent/rb_libtorrent-1.0.9-r2.ebuild | 114 --------
5 files changed, 515 deletions(-)
diff --git a/net-libs/rb_libtorrent/Manifest b/net-libs/rb_libtorrent/Manifest
index 8a441a2..30fae05 100644
--- a/net-libs/rb_libtorrent/Manifest
+++ b/net-libs/rb_libtorrent/Manifest
@@ -1,5 +1,3 @@
DIST libtorrent-rasterbar-0.16.17.tar.gz 3018881 SHA256 67a1d29c626d991d6e39c2f9828ca70c4053d057070ce01fff9b4ad37e64aff0 SHA512 532b2438e24c3ecad239480a1bd6241a0d73d40f8d5bdcf61ddfcee1a41f1644c9004d4f234968efd50158224219b78852ec936a05b75b15f3442b594460cdd6 WHIRLPOOL 755e201741ed77cf91cb0976cbaa83c645647341d2cfe40564552599f2792ba76bd02e82a94669d80b199f1a1d6290824686d2bb52d6b0da8663d2274176f3eb
DIST libtorrent-rasterbar-0.16.19.tar.gz 3030253 SHA256 9ebd3fa8accfa27d0c81cdbbe15d7b411ea1deec34ac6325dec7197f05d82982 SHA512 8e605802cb1ae80228d253adba44da6f5af39e7d65c59f65e15444ed1122500529ee068f6d3608b1c2a249f18b4de695073f7b67772fa445618757697d779340 WHIRLPOOL 4429d07bd95f398a09f283a7cbcf6611aeb8ac5d2b8ed76d98f89d601aa6ed66e6eb8f044b351fad6cca3606351ccc67081dba7c8dd8d9c3c433eae84aedeb2c
DIST libtorrent-rasterbar-1.0.10.tar.gz 3324494 SHA256 a865ceaca8b14acdd7be56d361ce4e64361299647e157ef7b3ac7e2812ca4c3e SHA512 08976239ec12e2d67a974dadf3f16330f48e4b6de314f9d97c5fbbdbc696b76b6b1f8e20ceab6830d46d17b1bfd7e2fe4048fb1a5a97ece12c242c0cd0f7ded2 WHIRLPOOL 1e4ef2fb41eef0b825bd7c8c665638e3f689c3cefca3caa18a01c328caad9d31cd417fb49d25a7d55da6457a89e35a891427d70fb4f4d070c74be2e2e0347a60
-DIST libtorrent-rasterbar-1.0.7.tar.gz 3298005 SHA256 3e16e024b175fefada17471c659fdbcfab235f9619d4f0913faa13cb02ca8d83 SHA512 d60736af4b7c38317821810995dd9bec21688a9506e9b908394c2a1a87acd2abf23000856dedcad487b9ecc7b5680f83cfc09ff9db79af00fe21e94337daeacf WHIRLPOOL aff289e3ca85eedf688e8a898f0164a4d692e8c813b04dbae6323bc56003f5c3af862167a1d00a8bfe193dfda15d20a18a48bcbeac9313e29d6f2de35d20e621
-DIST libtorrent-rasterbar-1.0.9.tar.gz 3292886 SHA256 11a93125ed49f796fca83da925ab7dc29e91d88b915f078caaddaaf559d63db6 SHA512 68558d440c8220711a410e54a28316b7b98f6dd4d0dae2d56cee3a3f0bd031f8b0623a8eb3fde312c4d1b61b4be8fc21396cb3e9fd7f6d86e3a9a693ee036b66 WHIRLPOOL 2c2f695458fe1069d4159d308def7591bc318eed30e649bc5ad4579fef1c67d3ccabc6acfb7570ae09a9b78fe8c00f975c88d48231b9db71e714672e1043d1f5
diff --git a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.2-python.patch b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.2-python.patch
deleted file mode 100644
index e729a19..00000000
--- a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.2-python.patch
+++ /dev/null
@@ -1,32 +0,0 @@
- bindings/python/setup.py | 2 +-
- configure.ac | 4 ----
- 2 files changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/bindings/python/setup.py b/bindings/python/setup.py
-index 961395f..c38ef52 100644
---- a/bindings/python/setup.py
-+++ b/bindings/python/setup.py
-@@ -36,7 +36,7 @@ def target_specific():
-
- try:
- with open('compile_flags') as _file:
-- extra_cmd = _file.read()
-+ extra_cmd = _file.read() + '-lboost_python-%s-mt' % (platform.python_version()[:3])
-
- except:
- extra_cmd = None
-diff --git a/configure.ac b/configure.ac
-index ebb1f7e..3e07828 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -540,10 +540,6 @@ AS_CASE(["$ARG_ENABLE_PYTHON_BINDING"],
-
- AM_PATH_PYTHON([2.4], [], AC_MSG_ERROR([Python interpreter not found.]))
- AX_PYTHON_DEVEL([>= '2.4'])
-- AX_BOOST_PYTHON()
--
-- AS_IF([test -z "$BOOST_PYTHON_LIB"],
-- [AC_MSG_ERROR([Boost.Python library not found. Try using --with-boost-python=lib.])])
- ],
- ["no"], [
- AC_MSG_RESULT([no])
diff --git a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.9-CVE-2016-5301.patch b/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.9-CVE-2016-5301.patch
deleted file mode 100644
index 19ebeeb..00000000
--- a/net-libs/rb_libtorrent/files/rb_libtorrent-1.0.9-CVE-2016-5301.patch
+++ /dev/null
@@ -1,289 +0,0 @@
-From 22099cec46741417a6fb6df560468eb64655db33 Mon Sep 17 00:00:00 2001
-From: arvidn <arvid@cs.umu.se>
-Date: Sat, 4 Jun 2016 12:49:38 -0400
-Subject: [PATCH] back-port http_parser bugfix
-
----
- src/http_parser.cpp | 32 +++++++
- test/test_http_parser.cpp | 142 ++++++++++++++++++++++++------
-
-diff --git a/src/http_parser.cpp b/src/http_parser.cpp
-index 7664cad..89de739 100644
---- a/src/http_parser.cpp
-+++ b/src/http_parser.cpp
-@@ -151,6 +151,7 @@ namespace libtorrent
- if (m_state == read_status)
- {
- TORRENT_ASSERT(!m_finished);
-+ TORRENT_ASSERT(pos <= recv_buffer.end);
- char const* newline = std::find(pos, recv_buffer.end, '\n');
- // if we don't have a full line yet, wait.
- if (newline == recv_buffer.end)
-@@ -171,6 +172,7 @@ namespace libtorrent
-
- char const* line = pos;
- ++newline;
-+ TORRENT_ASSERT(newline >= pos);
- int incoming = int(newline - pos);
- m_recv_pos += incoming;
- boost::get<1>(ret) += newline - (m_recv_buffer.begin + start_pos);
-@@ -204,6 +206,7 @@ namespace libtorrent
- if (m_state == read_header)
- {
- TORRENT_ASSERT(!m_finished);
-+ TORRENT_ASSERT(pos <= recv_buffer.end);
- char const* newline = std::find(pos, recv_buffer.end, '\n');
- std::string line;
-
-@@ -254,6 +257,12 @@ namespace libtorrent
- if (name == "content-length")
- {
- m_content_length = strtoll(value.c_str(), 0, 10);
-+ if (m_content_length < 0)
-+ {
-+ m_state = error_state;
-+ error = true;
-+ return ret;
-+ }
- }
- else if (name == "connection")
- {
-@@ -271,12 +280,24 @@ namespace libtorrent
- if (string_begins_no_case("bytes ", ptr)) ptr += 6;
- char* end;
- m_range_start = strtoll(ptr, &end, 10);
-+ if (m_range_start < 0)
-+ {
-+ m_state = error_state;
-+ error = true;
-+ return ret;
-+ }
- if (end == ptr) success = false;
- else if (*end != '-') success = false;
- else
- {
- ptr = end + 1;
- m_range_end = strtoll(ptr, &end, 10);
-+ if (m_range_end < 0)
-+ {
-+ m_state = error_state;
-+ error = true;
-+ return ret;
-+ }
- if (end == ptr) success = false;
- }
-
-@@ -295,6 +316,7 @@ namespace libtorrent
- }
-
- TORRENT_ASSERT(m_recv_pos <= recv_buffer.left());
-+ TORRENT_ASSERT(pos <= recv_buffer.end);
- newline = std::find(pos, recv_buffer.end, '\n');
- }
- boost::get<1>(ret) += newline - (m_recv_buffer.begin + start_pos);
-@@ -324,6 +346,12 @@ namespace libtorrent
- int header_size;
- if (parse_chunk_header(buf, &chunk_size, &header_size))
- {
-+ if (chunk_size < 0)
-+ {
-+ m_state = error_state;
-+ error = true;
-+ return ret;
-+ }
- if (chunk_size > 0)
- {
- std::pair<size_type, size_type> chunk_range(m_cur_chunk_end + header_size
-@@ -396,6 +424,7 @@ namespace libtorrent
- bool http_parser::parse_chunk_header(buffer::const_interval buf
- , size_type* chunk_size, int* header_size)
- {
-+ TORRENT_ASSERT(buf.begin <= buf.end);
- char const* pos = buf.begin;
-
- // ignore one optional new-line. This is since each chunk
-@@ -406,6 +435,7 @@ namespace libtorrent
- if (pos < buf.end && pos[0] == '\n') ++pos;
- if (pos == buf.end) return false;
-
-+ TORRENT_ASSERT(pos <= buf.end);
- char const* newline = std::find(pos, buf.end, '\n');
- if (newline == buf.end) return false;
- ++newline;
-@@ -418,6 +448,8 @@ namespace libtorrent
-
- // first, read the chunk length
- *chunk_size = strtoll(pos, 0, 16);
-+ if (*chunk_size < 0) return true;
-+
- if (*chunk_size != 0)
- {
- *header_size = newline - buf.begin;
-diff --git a/test/test_http_parser.cpp b/test/test_http_parser.cpp
-index 1385e94..0bbb038 100644
---- a/test/test_http_parser.cpp
-+++ b/test/test_http_parser.cpp
-@@ -64,10 +64,13 @@ tuple<int, int, bool> feed_bytes(http_parser& parser, char const* str)
- ret.get<1>() += protocol;
- ret.get<2>() |= error;
- // std::cerr << payload << ", " << protocol << ", " << chunk_size << std::endl;
-- TORRENT_ASSERT(payload + protocol == chunk_size);
-+ TORRENT_ASSERT(payload + protocol == chunk_size || error);
-+ }
-+ if (!ret.get<2>())
-+ {
-+ TEST_CHECK(prev == make_tuple(0, 0, false) || ret == prev);
-+ TEST_EQUAL(ret.get<0>() + ret.get<1>(), strlen(str));
- }
-- TEST_CHECK(prev == make_tuple(0, 0, false) || ret == prev);
-- TEST_EQUAL(ret.get<0>() + ret.get<1>(), strlen(str));
- prev = ret;
- }
- return ret;
-@@ -316,29 +319,6 @@ int test_main()
- TEST_EQUAL(parser.headers().find("test2")->second, "bar");
- }
-
-- // test chunked encoding
--
-- parser.reset();
--
-- char const* chunked_input =
-- "HTTP/1.1 200 OK\r\n"
-- "Transfer-Encoding: chunked\r\n"
-- "Content-Type: text/plain\r\n"
-- "\r\n"
-- "4\r\ntest\r\n4\r\n1234\r\n10\r\n0123456789abcdef\r\n"
-- "0\r\n\r\n";
-- received = feed_bytes(parser, chunked_input);
--
-- TEST_EQUAL(strlen(chunked_input), 24 + 94)
-- TEST_CHECK(received == make_tuple(24, 94, false));
-- TEST_CHECK(parser.finished());
--
-- char mutable_buffer[100];
-- memcpy(mutable_buffer, parser.get_body().begin, parser.get_body().left());
-- int len = parser.collapse_chunk_headers(mutable_buffer, parser.get_body().left());
--
-- TEST_CHECK(std::equal(mutable_buffer, mutable_buffer + len, "test12340123456789abcdef"));
--
- // test url parsing
-
- error_code ec;
-@@ -392,6 +372,116 @@ int test_main()
- TEST_EQUAL(resolve_redirect_location("http://example.com/a/b", "http://test.com/d")
- , "http://test.com/d");
-
-+ char const* chunked_input =
-+ "HTTP/1.1 200 OK\r\n"
-+ "Transfer-Encoding: chunked\r\n"
-+ "Content-Type: text/plain\r\n"
-+ "\r\n"
-+ "4\r\ntest\r\n4\r\n1234\r\n10\r\n0123456789abcdef\r\n"
-+ "0\r\n\r\n";
-+
-+{
-+ http_parser parser;
-+ boost::tuple<int, int, bool> const received
-+ = feed_bytes(parser, chunked_input);
-+
-+ TEST_EQUAL(strlen(chunked_input), 24 + 94)
-+ TEST_CHECK(received == make_tuple(24, 94, false));
-+ TEST_CHECK(parser.finished());
-+
-+ char mutable_buffer[100];
-+ memcpy(mutable_buffer, parser.get_body().begin, parser.get_body().left());
-+ int len = parser.collapse_chunk_headers(mutable_buffer, parser.get_body().left());
-+
-+ TEST_CHECK(std::equal(mutable_buffer, mutable_buffer + len, "test12340123456789abcdef"));
-+}
-+
-+{
-+ char const* chunked_input =
-+ "HTTP/1.1 200 OK\r\n"
-+ "Transfer-Encoding: chunked\r\n"
-+ "Content-Length: -45345\r\n"
-+ "\r\n";
-+
-+ http_parser parser;
-+ boost::tuple<int, int, bool> const received
-+ = feed_bytes(parser, chunked_input);
-+
-+ TEST_CHECK(boost::get<2>(received) == true);
-+}
-+
-+{
-+ char const* chunked_input =
-+ "HTTP/1.1 200 OK\r\n"
-+ "Transfer-Encoding: chunked\r\n"
-+ "\r\n"
-+ "-53465234545\r\n"
-+ "foobar";
-+
-+ http_parser parser;
-+ boost::tuple<int, int, bool> const received
-+ = feed_bytes(parser, chunked_input);
-+
-+ TEST_CHECK(boost::get<2>(received) == true);
-+}
-+
-+{
-+ char const* chunked_input =
-+ "HTTP/1.1 206 OK\n"
-+ "Content-Range: bYTes -3-4\n"
-+ "\n";
-+
-+ http_parser parser;
-+ boost::tuple<int, int, bool> const received
-+ = feed_bytes(parser, chunked_input);
-+
-+ TEST_CHECK(boost::get<2>(received) == true);
-+}
-+
-+{
-+ char const* chunked_input =
-+ "HTTP/1.1 206 OK\n"
-+ "Content-Range: bYTes 3--434\n"
-+ "\n";
-+
-+ http_parser parser;
-+ boost::tuple<int, int, bool> const received
-+ = feed_bytes(parser, chunked_input);
-+
-+ TEST_CHECK(boost::get<2>(received) == true);
-+}
-+
-+{
-+ boost::uint8_t const invalid_chunked_input[] = {
-+ 0x48, 0x6f, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, // HoTP/1.1 200 OK
-+ 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d, // Cont-Length: 20
-+ 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x2d, 0x4c, 0x65, // Contente: tn
-+ 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x32, 0x30, // Transfer-Encoding: chunked
-+ 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, //
-+ 0x74, 0x65, 0x3a, 0x20, 0x74, 0x6e, 0x0d, 0x0a, //
-+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, //
-+ 0x2d, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, // -89abc9abcdef
-+ 0x67, 0x3a, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, // �
-+ 0x65, 0x64, 0x0d, 0x0a, 0x0d, 0x0d, 0x0a, 0x0d, // T����������def
-+ 0x0a, 0x0a, 0x2d, 0x38, 0x39, 0x61, 0x62, 0x63, // �
-+ 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x0d, // T�����������est-headyr: foobar
-+ 0x0a, 0xd6, 0x0d, 0x0a, 0x54, 0xbd, 0xbd, 0xbd,
-+ 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0x64,
-+ 0x65, 0x66, 0x0d, 0x0a, 0xd6, 0x0d, 0x0a, 0x54,
-+ 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd,
-+ 0xbd, 0xbd, 0xbd, 0x65, 0x73, 0x74, 0x2d, 0x68,
-+ 0x65, 0x61, 0x64, 0x79, 0x72, 0x3a, 0x20, 0x66,
-+ 0x6f, 0x6f, 0x62, 0x61, 0x72, 0x0d, 0x0a, 0x0d,
-+ 0x0a, 0x00
-+ };
-+
-+ http_parser parser;
-+ boost::tuple<int, int, bool> const received
-+ = feed_bytes(parser, reinterpret_cast<char const*>(invalid_chunked_input));
-+
-+ TEST_CHECK(boost::get<2>(received) == true);
-+}
-+
- return 0;
- }
-
diff --git a/net-libs/rb_libtorrent/rb_libtorrent-1.0.7.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-1.0.7.ebuild
deleted file mode 100644
index 938d680..00000000
--- a/net-libs/rb_libtorrent/rb_libtorrent-1.0.7.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-PYTHON_REQ_USE="threads"
-DISTUTILS_OPTIONAL=true
-AUTOTOOLS_AUTORECONF=true
-
-inherit autotools-utils multilib distutils-r1 versionator
-
-MY_P=${P/rb_/}
-MY_P=${MY_P/torrent/torrent-rasterbar}
-MY_PV=$(replace_all_version_separators '_' )
-S=${WORKDIR}/${MY_P}
-
-DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
-HOMEPAGE="http://libtorrent.org"
-SRC_URI="https://github.com/arvidn/libtorrent/releases/download/libtorrent-${MY_PV}/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="debug doc examples python ssl static-libs test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- >=dev-libs/boost-1.53:=[threads]
- sys-libs/zlib
- examples? ( !net-p2p/mldonkey )
- ssl? ( dev-libs/openssl:0= )
- python? (
- ${PYTHON_DEPS}
- dev-libs/boost:=[python,${PYTHON_USEDEP}]
- )"
-DEPEND="${RDEPEND}
- >=sys-devel/libtool-2.2"
-
-RESTRICT="test"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.0.2-python.patch
-)
-
-AUTOTOOLS_IN_SOURCE_BUILD=1
-
-src_configure() {
- local myeconfargs=(
- --disable-silent-rules # bug 441842
- --with-boost-libdir=/usr/$(get_libdir)
- $(use_enable debug)
- $(use_enable test tests)
- $(use_enable examples)
- $(use_enable ssl encryption)
- $(use_enable python python-binding)
- $(usex debug "--enable-logging=verbose" "")
- )
-
- use python && python_setup
-
- autotools-utils_src_configure
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_configure
-}
-
-src_compile() {
- autotools-utils_src_compile
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_compile
-}
-
-src_install() {
- use doc && HTML_DOCS=( "${S}"/docs/. )
-
- autotools-utils_src_install
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_install
-}
diff --git a/net-libs/rb_libtorrent/rb_libtorrent-1.0.9-r2.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-1.0.9-r2.ebuild
deleted file mode 100644
index 0fc1b7bb..00000000
--- a/net-libs/rb_libtorrent/rb_libtorrent-1.0.9-r2.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5} )
-PYTHON_REQ_USE="threads"
-DISTUTILS_OPTIONAL=true
-DISTUTILS_IN_SOURCE_BUILD=true
-
-inherit distutils-r1 eutils versionator
-
-MY_P=libtorrent-rasterbar-${PV} # TODO: rename, bug 576126
-MY_PV=$(replace_all_version_separators _)
-
-DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
-HOMEPAGE="http://libtorrent.org"
-SRC_URI="https://github.com/arvidn/libtorrent/releases/download/libtorrent-${MY_PV}/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0/8"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="debug +dht doc examples +geoip libressl python +ssl static-libs test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- dev-libs/boost:=[threads]
- virtual/libiconv
- examples? ( !net-p2p/mldonkey )
- geoip? ( dev-libs/geoip )
- python? (
- ${PYTHON_DEPS}
- dev-libs/boost:=[python,${PYTHON_USEDEP}]
- )
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:= )
- )
-"
-DEPEND="${RDEPEND}
- sys-devel/libtool
-"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.0.9-CVE-2016-5301.patch"
- "${FILESDIR}/${PN}-1.0.9-test_torrent_parse.patch"
-)
-
-src_prepare() {
- default
-
- # bug 578026
- # prepend -L${S}/... to ensure bindings link against the lib we just built
- sed -i -e "s|^|-L${S}/src/.libs |" bindings/python/compile_flags.in || die
-
- use python && distutils-r1_src_prepare
-}
-
-src_configure() {
- local myeconfargs=(
- $(use_enable debug)
- $(use_enable debug logging)
- $(use_enable debug statistics)
- $(use_enable debug disk-stats)
- $(use_enable dht dht $(usex debug logging yes))
- $(use_enable examples)
- $(use_enable geoip)
- $(use_with geoip libgeoip)
- $(use_enable ssl encryption)
- $(use_enable static-libs static)
- $(use_enable test tests)
- --with-libiconv
- )
- econf "${myeconfargs[@]}"
-
- if use python; then
- myeconfargs+=(
- --enable-python-binding
- --with-boost-python
- )
- python_configure() {
- econf "${myeconfargs[@]}"
- }
- distutils-r1_src_configure
- fi
-}
-
-src_compile() {
- default
-
- python_compile() {
- cd "${BUILD_DIR}/../bindings/python" || die
- distutils-r1_python_compile
- }
- use python && distutils-r1_src_compile
-}
-
-src_install() {
- use doc && HTML_DOCS+=( "${S}"/docs )
-
- default
-
- python_install() {
- cd "${BUILD_DIR}/../bindings/python" || die
- distutils-r1_python_install
- }
- use python && distutils-r1_src_install
-
- prune_libtool_files
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/rb_libtorrent/files/, net-libs/rb_libtorrent/
@ 2017-03-18 23:05 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2017-03-18 23:05 UTC (permalink / raw
To: gentoo-commits
commit: a23ccc8f8406ca9a136093270db9523465f75bd4
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 18 21:48:49 2017 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Mar 18 23:02:37 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a23ccc8f
net-libs/rb_libtorrent: Drop old
Gentoo-bug: 585278, 609750
Package-Manager: Portage-2.3.3, Repoman-2.3.1
net-libs/rb_libtorrent/Manifest | 2 -
.../files/rb_libtorrent-0.16.17-python.patch | 37 -----------
.../rb_libtorrent/rb_libtorrent-0.16.17.ebuild | 77 ----------------------
.../rb_libtorrent/rb_libtorrent-0.16.19.ebuild | 72 --------------------
4 files changed, 188 deletions(-)
diff --git a/net-libs/rb_libtorrent/Manifest b/net-libs/rb_libtorrent/Manifest
index f6618040b0c..99d34b4f775 100644
--- a/net-libs/rb_libtorrent/Manifest
+++ b/net-libs/rb_libtorrent/Manifest
@@ -1,5 +1,3 @@
-DIST libtorrent-rasterbar-0.16.17.tar.gz 3018881 SHA256 67a1d29c626d991d6e39c2f9828ca70c4053d057070ce01fff9b4ad37e64aff0 SHA512 532b2438e24c3ecad239480a1bd6241a0d73d40f8d5bdcf61ddfcee1a41f1644c9004d4f234968efd50158224219b78852ec936a05b75b15f3442b594460cdd6 WHIRLPOOL 755e201741ed77cf91cb0976cbaa83c645647341d2cfe40564552599f2792ba76bd02e82a94669d80b199f1a1d6290824686d2bb52d6b0da8663d2274176f3eb
-DIST libtorrent-rasterbar-0.16.19.tar.gz 3030253 SHA256 9ebd3fa8accfa27d0c81cdbbe15d7b411ea1deec34ac6325dec7197f05d82982 SHA512 8e605802cb1ae80228d253adba44da6f5af39e7d65c59f65e15444ed1122500529ee068f6d3608b1c2a249f18b4de695073f7b67772fa445618757697d779340 WHIRLPOOL 4429d07bd95f398a09f283a7cbcf6611aeb8ac5d2b8ed76d98f89d601aa6ed66e6eb8f044b351fad6cca3606351ccc67081dba7c8dd8d9c3c433eae84aedeb2c
DIST libtorrent-rasterbar-1.0.10.tar.gz 3324494 SHA256 a865ceaca8b14acdd7be56d361ce4e64361299647e157ef7b3ac7e2812ca4c3e SHA512 08976239ec12e2d67a974dadf3f16330f48e4b6de314f9d97c5fbbdbc696b76b6b1f8e20ceab6830d46d17b1bfd7e2fe4048fb1a5a97ece12c242c0cd0f7ded2 WHIRLPOOL 1e4ef2fb41eef0b825bd7c8c665638e3f689c3cefca3caa18a01c328caad9d31cd417fb49d25a7d55da6457a89e35a891427d70fb4f4d070c74be2e2e0347a60
DIST libtorrent-rasterbar-1.0.11.tar.gz 3325786 SHA256 828d686770346f6da2c143c5a2844c5f5e407eb4a37982e90022763508abd62f SHA512 770d16b241174ae4b121af9b2ac7bcde8b14c6ed99352b827b760a3cbdc2c0ebd0d505319762897720c5f72acdff506ee9948ac1140e6d4591805eca5439b184 WHIRLPOOL e56bfe0830cfc7776436552171b14b08913d99a2c726c9eefa828027caaa96d9c3d97e6442a3b53f315eaa3e7e0f68175d813dbab1d6de1da5937054fc6cac9c
DIST libtorrent-rasterbar-1.1.1.tar.gz 3641815 SHA256 f70c82367b0980460ef95aff3e117fd4a174477892d529beec434f74d615b31f SHA512 9d2409ee733f7579df61a63e37092d3c59a386b94031bae6a7ea64ffff617131d2c347ba0825b3d337ce2fedad3b527c8f697e3b49cea643d6543c972a1ebc12 WHIRLPOOL 36c4a007e0bf684e9603cd88b594a8ff91193b7d73447375e5651f945dba713c91daf0c625f90af6bb35c2ab017ca69da50d856ac6ce6be2e13f6d04ee7b2e35
diff --git a/net-libs/rb_libtorrent/files/rb_libtorrent-0.16.17-python.patch b/net-libs/rb_libtorrent/files/rb_libtorrent-0.16.17-python.patch
deleted file mode 100644
index 6f843204084..00000000000
--- a/net-libs/rb_libtorrent/files/rb_libtorrent-0.16.17-python.patch
+++ /dev/null
@@ -1,37 +0,0 @@
- bindings/python/setup.py.in | 6 +++---
- configure.ac | 4 ----
- 2 files changed, 3 insertions(+), 7 deletions(-)
-
-diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in
-index adc474c..3faf982 100644
---- a/bindings/python/setup.py.in
-+++ b/bindings/python/setup.py.in
-@@ -61,10 +61,10 @@ if "CFLAGS" in config_vars and "-Wstrict-prototypes" in config_vars["CFLAGS"]:
- if "OPT" in config_vars and "-Wstrict-prototypes" in config_vars["OPT"]:
- config_vars["OPT"] = config_vars["OPT"].replace("-Wstrict-prototypes", " ")
-
--source_list = os.listdir(os.path.join(os.path.dirname(__file__), "src"))
--source_list = [os.path.join("src", s) for s in source_list if s.endswith(".cpp")]
-+source_list = os.listdir(os.path.join('@srcdir@', "src"))
-+source_list = [os.path.join('@srcdir@', "src", s) for s in source_list if s.endswith(".cpp")]
-
--extra_cmd = '@COMPILETIME_OPTIONS@ @CPPFLAGS@ @LIBS@ @BOOST_SYSTEM_LIB@ @BOOST_PYTHON_LIB@ @PTHREAD_LIBS@ @OPENSSL_LIBS@ @OPENSSL_LDFLAGS@ @OPENSSL_INCLUDES@'
-+extra_cmd = '@COMPILETIME_OPTIONS@ @CPPFLAGS@ @LIBS@ @BOOST_SYSTEM_LIB@ @PTHREAD_LIBS@ @OPENSSL_LIBS@ @OPENSSL_LDFLAGS@ @OPENSSL_INCLUDES@' + '-lboost_python-%s-mt' % (platform.python_version()[:3])
-
- setup( name='python-libtorrent',
- version='@PACKAGE_VERSION@',
-diff --git a/configure.ac b/configure.ac
-index 55ee13a..bdbf2a3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -559,10 +559,6 @@ AS_CASE(["$ARG_ENABLE_PYTHON_BINDING"],
-
- AM_PATH_PYTHON([2.4], [], AC_MSG_ERROR([Python interpreter not found.]))
- AX_PYTHON_DEVEL([>= '2.4'])
-- AX_BOOST_PYTHON()
--
-- AS_IF([test -z "$BOOST_PYTHON_LIB"],
-- [AC_MSG_ERROR([Boost.Python library not found. Try using --with-boost-python=lib.])])
- ],
- ["no"], [
- AC_MSG_RESULT([no])
diff --git a/net-libs/rb_libtorrent/rb_libtorrent-0.16.17.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-0.16.17.ebuild
deleted file mode 100644
index d2472f8e7b4..00000000000
--- a/net-libs/rb_libtorrent/rb_libtorrent-0.16.17.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-PYTHON_DEPEND="python? 2:2.7"
-PYTHON_USE_WITH="threads"
-PYTHON_USE_WITH_OPT="python"
-
-inherit multilib python versionator
-
-MY_P=${P/rb_/}
-MY_P=${MY_P/torrent/torrent-rasterbar}
-S=${WORKDIR}/${MY_P}
-
-DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
-HOMEPAGE="http://libtorrent.org"
-SRC_URI="mirror://sourceforge/libtorrent/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 arm ppc ppc64 sparc x86 ~x86-fbsd"
-IUSE="debug doc examples python ssl static-libs test"
-RESTRICT="test"
-
-DEPEND=">=dev-libs/boost-1.48[python?,threads(+)]
- >=sys-devel/libtool-2.2
- sys-libs/zlib
- examples? ( !net-p2p/mldonkey )
- ssl? ( dev-libs/openssl )"
-RDEPEND="${DEPEND}"
-
-pkg_setup() {
- if use python; then
- python_set_active_version 2
- python_pkg_setup
- fi
-}
-
-src_prepare() {
- use python && python_convert_shebangs -r 2 .
-}
-
-src_configure() {
- local myconf
-
- # bug 441842
- myconf="--disable-silent-rules"
-
- # use multi-threading versions of boost libs
- if has_version '>=dev-libs/boost-1.52.0-r1'; then
- myconf+=" --with-boost-python=boost_python-${PYTHON_ABI}"
- else
- myconf+=" --with-boost-system=boost_system-mt \
- --with-boost-python=boost_python-${PYTHON_ABI}-mt"
- fi
-
- local LOGGING
- use debug && myconf+=" --enable-logging=verbose"
-
- econf $(use_enable debug) \
- $(use_enable test tests) \
- $(use_enable examples) \
- $(use_enable python python-binding) \
- $(use_enable ssl encryption) \
- $(use_enable static-libs static) \
- --with-boost-libdir=/usr/$(get_libdir) \
- ${myconf}
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- use static-libs || find "${D}" -name '*.la' -exec rm -f {} +
- dodoc ChangeLog AUTHORS NEWS README
- if use doc; then
- dohtml docs/*
- fi
-}
diff --git a/net-libs/rb_libtorrent/rb_libtorrent-0.16.19.ebuild b/net-libs/rb_libtorrent/rb_libtorrent-0.16.19.ebuild
deleted file mode 100644
index 52ce0dd3131..00000000000
--- a/net-libs/rb_libtorrent/rb_libtorrent-0.16.19.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_4 )
-PYTHON_REQ_USE="threads"
-DISTUTILS_OPTIONAL=true
-AUTOTOOLS_AUTORECONF=true
-
-inherit autotools-utils multilib distutils-r1
-
-MY_P=${P/rb_/}
-MY_P=${MY_P/torrent/torrent-rasterbar}
-S=${WORKDIR}/${MY_P}
-
-DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
-HOMEPAGE="http://libtorrent.org"
-SRC_URI="mirror://sourceforge/libtorrent/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="debug doc examples python ssl static-libs test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- >=dev-libs/boost-1.48:=[threads]
- sys-libs/zlib
- examples? ( !net-p2p/mldonkey )
- ssl? ( dev-libs/openssl:0= )
- python? (
- ${PYTHON_DEPS}
- dev-libs/boost[python,${PYTHON_USEDEP}]
- )"
-DEPEND="${RDEPEND}
- >=sys-devel/libtool-2.2"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}"/${PN}-0.16.17-python.patch )
-
-src_configure() {
- local myeconfargs=(
- --disable-silent-rules # bug 441842
- --with-boost-libdir=/usr/$(get_libdir)
- $(use_enable debug)
- $(use_enable test tests)
- $(use_enable examples)
- $(use_enable ssl encryption)
- $(use_enable python python-binding)
- $(usex debug "--enable-logging=verbose" "")
- )
-
- use python && python_setup
-
- autotools-utils_src_configure
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_configure
-}
-
-src_compile() {
- autotools-utils_src_compile
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_compile
-}
-
-src_install() {
- use doc && HTML_DOCS=( docs/. )
-
- autotools-utils_src_install
- use python && cd "${BUILD_DIR}"/bindings/python && distutils-r1_src_install
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-18 23:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18 14:30 [gentoo-commits] repo/gentoo:master commit in: net-libs/rb_libtorrent/files/, net-libs/rb_libtorrent/ Markos Chandras
-- strict thread matches above, loose matches on Subject: below --
2016-03-09 17:01 Lars Wendler
2016-08-18 20:31 Davide Pesavento
2016-10-24 13:05 Pacho Ramos
2017-03-18 23:05 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox