1
0
forked from pool/libtorrent

Accepting request 120544 from devel:libraries:c_c++

resubmit after SR#106185 was turned down due to merge conflicts

OBS-URL: https://build.opensuse.org/request/show/120544
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libtorrent?expand=0&rev=1
This commit is contained in:
Stephan Kulow 2012-05-10 12:33:20 +00:00 committed by Git OBS Bridge
commit bffe8fa7b5
7 changed files with 316 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:310a3d42b828cabd8cdb8fcfb1c737feba26a7e7bd3da0ed9145c04239a5c9b9
size 411023

87
libtorrent-decls.diff Normal file
View File

@ -0,0 +1,87 @@
From: Jan Engelhardt <jengelh@medozas.de>
Date: 2012-01-31 11:09:58.559664592 +0100
Fix build errors regarding unknown snprintf, std::scanf,
ptrdiff_t, NULL.
---
src/data/memory_chunk.cc | 1 +
src/protocol/extensions.cc | 1 +
src/torrent/data/block.h | 1 +
src/torrent/data/block_transfer.h | 1 +
src/tracker/tracker_dht.cc | 1 +
src/tracker/tracker_udp.cc | 1 +
6 files changed, 6 insertions(+)
Index: libtorrent-0.12.2/src/data/memory_chunk.cc
===================================================================
--- libtorrent-0.12.2.orig/src/data/memory_chunk.cc
+++ libtorrent-0.12.2/src/data/memory_chunk.cc
@@ -36,6 +36,7 @@
#include "config.h"
+#include <cstddef>
#include <algorithm>
#include <unistd.h>
Index: libtorrent-0.12.2/src/protocol/extensions.cc
===================================================================
--- libtorrent-0.12.2.orig/src/protocol/extensions.cc
+++ libtorrent-0.12.2/src/protocol/extensions.cc
@@ -36,6 +36,7 @@
#include "config.h"
+#include <cstdio>
#include <limits>
#include <sstream>
Index: libtorrent-0.12.2/src/torrent/data/block.h
===================================================================
--- libtorrent-0.12.2.orig/src/torrent/data/block.h
+++ libtorrent-0.12.2/src/torrent/data/block.h
@@ -37,6 +37,7 @@
#ifndef LIBTORRENT_BLOCK_H
#define LIBTORRENT_BLOCK_H
+#include <cstdlib>
#include <vector>
#include <torrent/common.h>
#include <torrent/data/block_transfer.h>
Index: libtorrent-0.12.2/src/torrent/data/block_transfer.h
===================================================================
--- libtorrent-0.12.2.orig/src/torrent/data/block_transfer.h
+++ libtorrent-0.12.2/src/torrent/data/block_transfer.h
@@ -37,6 +37,7 @@
#ifndef LIBTORRENT_BLOCK_TRANSFER_H
#define LIBTORRENT_BLOCK_TRANSFER_H
+#include <cstdlib>
#include <torrent/common.h>
#include <torrent/data/piece.h>
Index: libtorrent-0.12.2/src/tracker/tracker_dht.cc
===================================================================
--- libtorrent-0.12.2.orig/src/tracker/tracker_dht.cc
+++ libtorrent-0.12.2/src/tracker/tracker_dht.cc
@@ -36,6 +36,7 @@
#include "config.h"
+#include <cstdio>
#include <sstream>
#include "dht/dht_router.h"
Index: libtorrent-0.12.2/src/tracker/tracker_udp.cc
===================================================================
--- libtorrent-0.12.2.orig/src/tracker/tracker_udp.cc
+++ libtorrent-0.12.2/src/tracker/tracker_udp.cc
@@ -36,6 +36,7 @@
#include "config.h"
+#include <cstdio>
#include <sigc++/adaptors/bind.h>
#include <torrent/connection_manager.h>

View File

@ -0,0 +1,97 @@
Index: rak/functional.h
===================================================================
--- rak/functional.h.orig 2008-05-07 14:19:14.000000000 +0200
+++ rak/functional.h 2009-05-09 17:00:38.000000000 +0200
@@ -37,6 +37,7 @@
#ifndef RAK_FUNCTIONAL_H
#define RAK_FUNCTIONAL_H
+#include <cstddef>
#include <functional>
namespace rak {
Index: src/data/chunk.cc
===================================================================
--- src/data/chunk.cc.orig 2008-05-07 14:19:13.000000000 +0200
+++ src/data/chunk.cc 2009-05-09 17:00:24.000000000 +0200
@@ -36,6 +36,7 @@
#include "config.h"
+#include <cstring>
#include <algorithm>
#include <functional>
Index: src/data/chunk_list.h
===================================================================
--- src/data/chunk_list.h.orig 2008-05-07 14:19:13.000000000 +0200
+++ src/data/chunk_list.h 2009-05-09 17:01:02.000000000 +0200
@@ -38,6 +38,7 @@
#define LIBTORRENT_DATA_CHUNK_LIST_H
#include <vector>
+#include <string>
#include <rak/error_number.h>
#include <rak/functional.h>
Index: src/net/address_list.cc
===================================================================
--- src/net/address_list.cc.orig 2008-05-07 14:19:12.000000000 +0200
+++ src/net/address_list.cc 2009-05-09 17:01:29.000000000 +0200
@@ -36,6 +36,8 @@
#include "config.h"
+#include <algorithm>
+
#include <rak/functional.h>
#include "download/download_info.h" // for SocketAddressCompact
Index: src/torrent/data/file_list_iterator.h
===================================================================
--- src/torrent/data/file_list_iterator.h.orig 2008-05-07 14:19:13.000000000 +0200
+++ src/torrent/data/file_list_iterator.h 2009-05-09 17:02:03.000000000 +0200
@@ -37,6 +37,7 @@
#ifndef LIBTORRENT_FILE_LIST_ITERATOR_H
#define LIBTORRENT_FILE_LIST_ITERATOR_H
+#include <cstdlib>
#include <torrent/common.h>
#include <torrent/data/file_list.h>
Index: src/torrent/exceptions.cc
===================================================================
--- src/torrent/exceptions.cc.orig 2008-05-07 14:19:13.000000000 +0200
+++ src/torrent/exceptions.cc 2009-05-09 17:02:28.000000000 +0200
@@ -37,6 +37,7 @@
#include "config.h"
#include <cerrno>
+#include <cstring>
#include "exceptions.h"
Index: src/torrent/tracker_list.h
===================================================================
--- src/torrent/tracker_list.h.orig 2008-05-07 14:19:13.000000000 +0200
+++ src/torrent/tracker_list.h 2009-05-09 17:02:51.000000000 +0200
@@ -38,6 +38,7 @@
#define LIBTORRENT_TRACKER_LIST_H
#include <algorithm>
+#include <string>
#include <vector>
#include <torrent/common.h>
Index: src/utils/diffie_hellman.cc
===================================================================
--- src/utils/diffie_hellman.cc.orig 2008-05-07 14:19:12.000000000 +0200
+++ src/utils/diffie_hellman.cc 2009-05-09 17:03:16.000000000 +0200
@@ -36,6 +36,7 @@
#include "config.h"
+#include <cstring>
#include <string>
#ifdef USE_OPENSSL

25
libtorrent.changes Normal file
View File

@ -0,0 +1,25 @@
-------------------------------------------------------------------
Wed Mar 7 09:29:56 UTC 2012 - cfarrell@suse.com
- license update: SUSE-GPL-2.0+-with-openssl-exception
Package allows linking against openSSL. Use the SUSE- proprietary prefix
until upstream spdx.org accepts the linking exception
-------------------------------------------------------------------
Tue Feb 21 01:23:04 UTC 2012 - jengelh@medozas.de
- Run format_spec_file to please the automatic factory
pre-checkin checker scripts
-------------------------------------------------------------------
Tue Jan 31 09:59:10 UTC 2012 - jengelh@medozas.de
- Remove redundant tags/sections per specfile guideline suggestions
- Parallel building using %_smp_mflags
- New patch libtorrent-decls.diff: add missing includes to
fix build errors
-------------------------------------------------------------------
Sat May 9 00:00:00 UTC 2009 - bitshuffler#suse@irc.freenode.org
- Initial RPM

80
libtorrent.spec Normal file
View File

@ -0,0 +1,80 @@
#
# spec file for package libtorrent
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define soname 9
Name: libtorrent
Version: 0.12.2
Release: 1.0
Url: http://libtorrent.rakshasa.no/
Source: %{name}-%{version}.tar.bz2
Patch1: libtorrent-gcc4.3-0.12.2.patch
Patch2: libtorrent-decls.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: libsigc++2-devel
BuildRequires: openssl-devel
BuildRequires: pkg-config
Summary: A BitTorrent library written in C++ for *nix
License: SUSE-GPL-2.0+-with-openssl-exception
Group: Productivity/Networking/File Sharing
%description
LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code. The library differentiates itself from other implementations by transfering directly from file pages to the network stack. On high-bandwidth connections it is able to seed at 3 times the speed of the official client.
%package -n %{name}%{soname}
Summary: A BitTorrent library written in C++ for *nix
Group: System/Libraries
%description -n %{name}%{soname}
LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code. The library differentiates itself from other implementations by transfering directly from file pages to the network stack. On high-bandwidth connections it is able to seed at 3 times the speed of the official client.
%package -n %{name}-devel
Requires: %{name}%{soname} = %{version}
Summary: A BitTorrent library written in C++ for *nix
Group: Development/Libraries/C and C++
%description -n %{name}-devel
LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code. The library differentiates itself from other implementations by transfering directly from file pages to the network stack. On high-bandwidth connections it is able to seed at 3 times the speed of the official client.
%prep
%setup -q
%patch -P 1 -p0
%patch -P 2 -p1
%build
%configure --enable-ipv6 --with-posix-fallocate
make %{?_smp_mflags}
%install
%makeinstall
find "%{buildroot}" -type f -name "*.la" -delete
%post -n %{name}%{soname} -p /sbin/ldconfig
%postun -n %{name}%{soname} -p /sbin/ldconfig
%files -n %{name}%{soname}
%defattr(-,root,root)
%{_libdir}/%{name}.so.%{soname}*
%files -n %{name}-devel
%defattr(-,root,root)
%{_includedir}/torrent
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/libtorrent.pc
%changelog