From cf7cf50a7ee27e8398f3354be3328561b624d60e08c94746948caa88f066b906 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Mon, 16 May 2016 22:40:57 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libtorrent-rasterbar?expand=0&rev=56 --- fix-sse-only-on-x86.patch | 36 ---------- ...rasterbar-1.1.0-remove-x86-only-flag.patch | 11 +++ libtorrent-rasterbar.changes | 9 +++ libtorrent-rasterbar.spec | 72 +++++++++++-------- 4 files changed, 62 insertions(+), 66 deletions(-) delete mode 100644 fix-sse-only-on-x86.patch create mode 100644 libtorrent-rasterbar-1.1.0-remove-x86-only-flag.patch diff --git a/fix-sse-only-on-x86.patch b/fix-sse-only-on-x86.patch deleted file mode 100644 index 5072a31..0000000 --- a/fix-sse-only-on-x86.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index efa1943..945d2bc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -159,10 +159,20 @@ AC_CHECK_FUNCS([clock_gettime], [], - [AC_MSG_WARN([clock_gettime function not found.])])])] - ) - -+case "$host" in -+ i?86-* | k?-* | athlon-* | pentium*-) -+ ARCH_SPECIFIC_CFLAGS="-msse4.2" -+ ;; -+ x86_64-*) -+ ARCH_SPECIFIC_CFLAGS="-msse4.2" -+ ;; -+ *) -+ AC_MSG_NOTICE([No architecture specific optimization]) -+ ;; -+esac - - dnl Pass some build options to .pc file --COMPILETIME_OPTIONS="" -- -+COMPILETIME_OPTIONS="$ARCH_SPECIFIC_CFLAGS " - - ############################################################################### - # Setting configure options -@@ -536,8 +546,6 @@ AM_CONDITIONAL([WITH_OPENSSL], [test "x$ARG_ENABLE_ENCRYPTION" = "xyes" -o "x$AR - AC_DEFINE([BOOST_ASIO_HASH_MAP_BUCKETS],[1021],[Define to fix a wrong behavior in boost 1.39.]) - COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 " - --COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -msse4.2 " -- - AC_DEFINE([BOOST_EXCEPTION_DISABLE],[1],[Define to disable the boost.exception features.]) - COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -DBOOST_EXCEPTION_DISABLE " - diff --git a/libtorrent-rasterbar-1.1.0-remove-x86-only-flag.patch b/libtorrent-rasterbar-1.1.0-remove-x86-only-flag.patch new file mode 100644 index 0000000..ea14eb3 --- /dev/null +++ b/libtorrent-rasterbar-1.1.0-remove-x86-only-flag.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -20267,8 +20267,6 @@ $as_echo "#define BOOST_ASIO_HASH_MAP_BU + + COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 " + +-COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -msse4.2 " +- + + $as_echo "#define BOOST_EXCEPTION_DISABLE 1" >>confdefs.h + diff --git a/libtorrent-rasterbar.changes b/libtorrent-rasterbar.changes index eeb454a..16c8d3b 100644 --- a/libtorrent-rasterbar.changes +++ b/libtorrent-rasterbar.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon May 16 13:26:12 UTC 2016 - sor.alexei@meowr.ru + +- Build Python3 bindings. +- Remove GeoIP support remnants, was removed in 1.1.0. +- Replace fix-sse-only-on-x86.patch with + libtorrent-rasterbar-1.1.0-remove-x86-only-flag.patch + (commit 680eddf) and apply unconditionally. + ------------------------------------------------------------------- Fri Apr 15 16:26:36 UTC 2016 - rpm@fthiessen.de diff --git a/libtorrent-rasterbar.spec b/libtorrent-rasterbar.spec index 76638f7..8d5d45f 100644 --- a/libtorrent-rasterbar.spec +++ b/libtorrent-rasterbar.spec @@ -26,22 +26,18 @@ Release: 0 Summary: Libtorrent is a C++ implementation of the BitTorrent protocol License: BSD-3-Clause Group: Development/Libraries/C and C++ -Url: http://rasterbar.com/products/libtorrent +Url: http://libtorrent.org/ Source: https://github.com/arvidn/%{_name}/releases/download/%{_name}-%{_version}/%{name}-%{version}.tar.gz -%ifnarch x86_64 amd64 %{ix86} -Patch0: fix-sse-only-on-x86.patch -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -%endif +# 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 BuildRequires: boost-devel >= 1.36 BuildRequires: gcc-c++ BuildRequires: pkg-config BuildRequires: python-devel -BuildRequires: pkgconfig(geoip) +BuildRequires: python3-devel BuildRequires: pkgconfig(openssl) -# For quadmath.h we need gcc-fortran on openSUSE < Factory (<= 42.1) -%if 0%{?suse_version} <=1320 +%if 0%{?suse_version} <= 1320 +# For quadmath.h we need gcc-fortran on openSUSE Leap 42.x and older. BuildRequires: gcc-fortran %endif @@ -81,6 +77,13 @@ Group: Development/Libraries/Python %description -n python-%{name} Python Bindings for the libtorrent-rasterbar package. +%package -n python3-%{name} +Summary: Python Bindings for libtorrent-rasterbar +Group: Development/Libraries/Python + +%description -n python3-%{name} +Python Bindings for the libtorrent-rasterbar package. + %if %{with examples} %package tools Summary: Example tools from libtorrent-rasterbar @@ -96,7 +99,7 @@ Group: Development/Libraries/C and C++ Requires: %{name}%{sover} = %{version} Requires: boost-devel >= 1.36 Requires: gcc-c++ -Requires: pkgconfig(geoip) +Requires: pkg-config Requires: pkgconfig(openssl) %description devel @@ -121,40 +124,44 @@ Documentation for the libtorrent-rasterbar package. %prep %setup -q - -%ifnarch x86_64 amd64 %{ix86} %patch0 -p1 -autoreconf -vi -%endif %build export CFLAGS="%{optflags} -fno-strict-aliasing" export CXXFLAGS="$CFLAGS" export LDFLAGS="%{optflags} -lrt" -%configure \ - --disable-static \ - --disable-silent-rules \ - --with-libgeoip \ - --with-boost-libdir=%{_libdir} \ +%global _configure ../configure +for py in python python3; do + mkdir -p "build-$py" + pushd "build-$py" + export PYTHON="$py" + %configure \ + --disable-static \ + --disable-silent-rules \ %if %{with examples} - --enable-examples \ + --enable-examples \ %endif - --enable-python-binding \ - --enable-encryption -make %{?_smp_mflags} + --with-boost-python="libboost_$py" \ + --enable-python-binding + make %{?_smp_mflags} + popd +done %install -%make_install +%make_install -C build-python +%make_install -C build-python3 + find %{buildroot} -type f -name "*.la" -delete -print # Move doc to a separate package. mkdir -p %{buildroot}%{_docdir}/%{name}/ cp -r docs/* %{buildroot}%{_docdir}/%{name}/ %if %{with examples} -# Drop tests binaries from -tools subpackage. -rm -v %{buildroot}%{_bindir}/{client_test,connection_tester,enum_if,fragmentation_test} \ - %{buildroot}%{_bindir}/{parse_hash_fails,parse_request_log,rss_reader,upnp_test,utp_test} +# Drop tests binaries from the libtorrent-rasterbar-tools subpackage. +rm -v %{buildroot}%{_bindir}/{client_test,connection_tester,enum_if} \ + %{buildroot}%{_bindir}/{fragmentation_test,parse_hash_fails} \ + %{buildroot}%{_bindir}/{parse_request_log,rss_reader,upnp_test,utp_test} %endif %post -n %{name}%{sover} -p /sbin/ldconfig @@ -176,8 +183,13 @@ rm -v %{buildroot}%{_bindir}/{client_test,connection_tester,enum_if,fragmentatio %files -n python-%{name} %defattr(-,root,root) -%{py_sitedir}/%{_name}.so -%{py_sitedir}/python_%{_name}-%{version}-py%{py_ver}.egg-info +%{python_sitearch}/%{_name}*.so +%{python_sitearch}/python_%{_name}-* + +%files -n python3-%{name} +%defattr(-,root,root) +%{python3_sitearch}/%{_name}*.so +%{python3_sitearch}/python_%{_name}-* %files devel %defattr(-,root,root)