Link with system tommath, drop bundled one

This commit is contained in:
Ville Skyttä 2015-10-17 13:30:09 +03:00
parent 50c9a837e8
commit 1e3c6f77b6
2 changed files with 126 additions and 1 deletions

View File

@ -0,0 +1,118 @@
diff --git a/include/libtorrent/Makefile.am b/include/libtorrent/Makefile.am
index 1dc2866..c7a9f2b 100644
--- a/include/libtorrent/Makefile.am
+++ b/include/libtorrent/Makefile.am
@@ -123,9 +123,6 @@ nobase_include_HEADERS = \
xml_parse.hpp \
\
$(GEOIP_H) \
- tommath.h \
- tommath_class.h \
- tommath_superclass.h \
\
aux_/session_impl.hpp \
\
diff --git a/include/libtorrent/Makefile.in b/include/libtorrent/Makefile.in
index fd47a89..3bc5dce 100644
--- a/include/libtorrent/Makefile.in
+++ b/include/libtorrent/Makefile.in
@@ -153,7 +153,7 @@ am__nobase_include_HEADERS_DIST = address.hpp add_torrent_params.hpp \
udp_tracker_connection.hpp union_endpoint.hpp upnp.hpp \
utp_socket_manager.hpp utp_stream.hpp utf8.hpp version.hpp \
web_connection_base.hpp web_peer_connection.hpp xml_parse.hpp \
- GeoIP.h tommath.h tommath_class.h tommath_superclass.h \
+ GeoIP.h \
aux_/session_impl.hpp extensions/logger.hpp \
extensions/lt_trackers.hpp extensions/metadata_transfer.hpp \
extensions/smart_ban.hpp extensions/ut_metadata.hpp \
@@ -491,9 +491,6 @@ nobase_include_HEADERS = \
xml_parse.hpp \
\
$(GEOIP_H) \
- tommath.h \
- tommath_class.h \
- tommath_superclass.h \
\
aux_/session_impl.hpp \
\
diff --git a/src/Makefile.am b/src/Makefile.am
index a285470..ac378b6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -81,7 +81,6 @@ libtorrent_rasterbar_la_SOURCES = \
lt_trackers.cpp \
magnet_uri.cpp \
metadata_transfer.cpp \
- mpi.c \
natpmp.cpp \
parse_url.cpp \
pe_crypto.cpp \
@@ -129,7 +128,7 @@ libtorrent_rasterbar_la_SOURCES = \
libtorrent_rasterbar_la_LDFLAGS = -version-info $(INTERFACE_VERSION_INFO)
#libtorrent_rasterbar_la_LIBADD = @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ @BOOST_THREAD_LIB@ @OPENSSL_LIBS@
-libtorrent_rasterbar_la_LIBADD = @BOOST_SYSTEM_LIB@ @OPENSSL_LIBS@
+libtorrent_rasterbar_la_LIBADD = @BOOST_SYSTEM_LIB@ @OPENSSL_LIBS@ -ltommath
#AM_CXXFLAGS= -ftemplate-depth-100 -I$(top_srcdir)/include @DEBUGFLAGS@ @OPENSSL_INCLUDES@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/ed25519/src @DEBUGFLAGS@ @OPENSSL_INCLUDES@
diff --git a/src/Makefile.in b/src/Makefile.in
index 2a467f2..4d251cd 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -143,7 +143,7 @@ am__libtorrent_rasterbar_la_SOURCES_DIST = web_connection_base.cpp \
http_stream.cpp http_tracker_connection.cpp i2p_stream.cpp \
identify_client.cpp instantiate_connection.cpp ip_filter.cpp \
ip_voter.cpp lazy_bdecode.cpp logger.cpp lsd.cpp \
- lt_trackers.cpp magnet_uri.cpp metadata_transfer.cpp mpi.c \
+ lt_trackers.cpp magnet_uri.cpp metadata_transfer.cpp \
natpmp.cpp parse_url.cpp pe_crypto.cpp peer_connection.cpp \
piece_picker.cpp packet_buffer.cpp policy.cpp puff.cpp \
random.cpp rss.cpp session.cpp session_impl.cpp settings.cpp \
@@ -196,7 +196,7 @@ am_libtorrent_rasterbar_la_OBJECTS = web_connection_base.lo alert.lo \
http_tracker_connection.lo i2p_stream.lo identify_client.lo \
instantiate_connection.lo ip_filter.lo ip_voter.lo \
lazy_bdecode.lo logger.lo lsd.lo lt_trackers.lo magnet_uri.lo \
- metadata_transfer.lo mpi.lo natpmp.lo parse_url.lo \
+ metadata_transfer.lo natpmp.lo parse_url.lo \
pe_crypto.lo peer_connection.lo piece_picker.lo \
packet_buffer.lo policy.lo puff.lo random.lo rss.lo session.lo \
session_impl.lo settings.lo sha1.lo smart_ban.lo socket_io.lo \
@@ -526,7 +526,6 @@ libtorrent_rasterbar_la_SOURCES = \
lt_trackers.cpp \
magnet_uri.cpp \
metadata_transfer.cpp \
- mpi.c \
natpmp.cpp \
parse_url.cpp \
pe_crypto.cpp \
@@ -575,7 +574,7 @@ libtorrent_rasterbar_la_SOURCES = \
libtorrent_rasterbar_la_LDFLAGS = -version-info $(INTERFACE_VERSION_INFO)
#libtorrent_rasterbar_la_LIBADD = @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ @BOOST_THREAD_LIB@ @OPENSSL_LIBS@
-libtorrent_rasterbar_la_LIBADD = @BOOST_SYSTEM_LIB@ @OPENSSL_LIBS@
+libtorrent_rasterbar_la_LIBADD = @BOOST_SYSTEM_LIB@ @OPENSSL_LIBS@ -ltommath
#AM_CXXFLAGS= -ftemplate-depth-100 -I$(top_srcdir)/include @DEBUGFLAGS@ @OPENSSL_INCLUDES@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/ed25519/src @DEBUGFLAGS@ @OPENSSL_INCLUDES@
@@ -778,7 +777,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lt_trackers.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/magnet_uri.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metadata_transfer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/natpmp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet_buffer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_url.Plo@am__quote@
diff --git a/src/pe_crypto.cpp b/src/pe_crypto.cpp
index d758b5a..9371a48 100644
--- a/src/pe_crypto.cpp
+++ b/src/pe_crypto.cpp
@@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/random.hpp"
#elif defined TORRENT_USE_TOMMATH
extern "C" {
-#include "libtorrent/tommath.h"
+#include <tommath.h>
}
#include "libtorrent/random.hpp"
#endif

View File

@ -5,7 +5,7 @@
Name: rb_libtorrent
Version: 1.0.6
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A C++ BitTorrent library aiming to be the best alternative
Group: System Environment/Libraries
@ -16,9 +16,11 @@ Source1: %{name}-README-renames.Fedora
Source2: %{name}-COPYING.Boost
Source3: %{name}-COPYING.zlib
Patch0: %{name}-1.0.1-boost_noncopyable.patch
Patch1: %{name}-1.0.6-system-tommath.patch
BuildRequires: asio-devel
BuildRequires: boost-devel
BuildRequires: libtommath-devel
BuildRequires: pkgconfig(geoip)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(python2)
@ -88,6 +90,8 @@ Python applications.
%prep
%setup -q -n "libtorrent-rasterbar-%{version}"
%patch0 -p1
%patch1 -p1
rm include/libtorrent/tommath* src/mpi.c
## The RST files are the sources used to create the final HTML files; and are
## not needed.
@ -176,6 +180,9 @@ rm -fv %{buildroot}%{_libdir}/lib*.a
%{python_sitearch}/libtorrent.so
%changelog
* Sat Oct 17 2015 Ville Skyttä <ville.skytta@iki.fi> - 1.0.6-3
- Link with system tommath, drop bundled one
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 1.0.6-2
- Rebuilt for Boost 1.59