1
0
Alexei Sorokin 2016-07-15 17:26:15 +00:00 committed by Git OBS Bridge
parent 557bb86598
commit b8f41fb803
3 changed files with 64 additions and 4 deletions

View File

@ -0,0 +1,50 @@
--- a/bindings/python/src/session.cpp
+++ b/bindings/python/src/session.cpp
@@ -106,7 +106,7 @@ namespace
std::string key = extract<std::string>(iterkeys[i]);
int sett = setting_by_name(key);
- if (sett == 0) continue;
+ if (sett < 0) continue;
TORRENT_TRY
{
@@ -810,7 +810,7 @@ void bind_session()
#ifndef TORRENT_NO_DEPRECATE
.def("add_feed", &add_feed)
.def("status", allow_threads(&lt::session::status))
- .def("settings", &session_get_settings)
+ .def("settings", &lt::session::settings)
.def("set_settings", &session_set_settings)
#endif
.def("get_settings", &session_get_settings)
--- a/bindings/python/src/torrent_handle.cpp
+++ b/bindings/python/src/torrent_handle.cpp
@@ -193,9 +193,9 @@ void dict_to_announce_entry(dict d, anno
if (d.has_key("source"))
ae.source = extract<int>(d["source"]);
if (d.has_key("verified"))
- ae.verified = extract<int>(d["verified"]);
+ ae.verified = extract<bool>(d["verified"]);
if (d.has_key("send_stats"))
- ae.send_stats = extract<int>(d["send_stats"]);
+ ae.send_stats = extract<bool>(d["send_stats"]);
}
void replace_trackers(torrent_handle& h, object trackers)
--- a/bindings/python/src/torrent_info.cpp
+++ b/bindings/python/src/torrent_info.cpp
@@ -113,10 +113,10 @@ namespace
int get_tier(announce_entry const& ae) { return ae.tier; }
void set_tier(announce_entry& ae, int v) { ae.tier = v; }
- bool get_fail_limit(announce_entry const& ae) { return ae.fail_limit; }
+ int get_fail_limit(announce_entry const& ae) { return ae.fail_limit; }
void set_fail_limit(announce_entry& ae, int l) { ae.fail_limit = l; }
- bool get_fails(announce_entry const& ae) { return ae.fails; }
- bool get_source(announce_entry const& ae) { return ae.source; }
+ int get_fails(announce_entry const& ae) { return ae.fails; }
+ int get_source(announce_entry const& ae) { return ae.source; }
bool get_verified(announce_entry const& ae) { return ae.verified; }
bool get_updating(announce_entry const& ae) { return ae.updating; }
bool get_start_sent(announce_entry const& ae) { return ae.start_sent; }

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Jul 15 13:02:12 UTC 2016 - sor.alexei@meowr.ru
- Add libtorrent-rasterbar-1.1.0-python-fixes.patch from upstream:
fixes for Python bindings (commits e4fd45e, 80710ab, f01ac8f,
42c6376) (boo#988986).
-------------------------------------------------------------------
Sun Jul 3 16:21:16 UTC 2016 - sor.alexei@meowr.ru

View File

@ -30,8 +30,10 @@ Url: http://libtorrent.org/
Source: https://github.com/arvidn/%{_name}/releases/download/%{_name}-%{_version}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM libtorrent-rasterbar-1.1.0-remove-x86-only-flag.patch -- Remove -msse4.2 flag (commit 680eddf).
Patch0: %{name}-1.1.0-remove-x86-only-flag.patch
# PATCH-FIX-UPSTREAM libtorrent-rasterbar-1.1.0-python-fixes.patch boo#988986 -- Fixes for Python bindings (commits e4fd45e, 80710ab, f01ac8f, 42c6376).
Patch1: %{name}-1.1.0-python-fixes.patch
# PATCH-FIX-UPSTREAM libtorrent-rasterbar-1.1.0-fix-invalid-input-crash.patch boo#983228 -- Fix crash on invalid input in http_parser (commit 3624ce6).
Patch1: %{name}-1.1.0-fix-invalid-input-crash.patch
Patch2: %{name}-1.1.0-fix-invalid-input-crash.patch
BuildRequires: boost-devel >= 1.54
BuildRequires: gcc-c++
BuildRequires: pkgconfig
@ -131,6 +133,7 @@ Documentation for the libtorrent-rasterbar package.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
@ -153,10 +156,10 @@ for py in python; do
pushd "build-$py"
export PYTHON="$py"
%configure \
--disable-static \
--disable-silent-rules \
--disable-static \
--disable-silent-rules \
%if %{with examples}
--enable-examples \
--enable-examples \
%endif
--with-boost-python="libboost_$py" \
--enable-python-binding