From d6006f8824595c06e23a4976068c6e9362a7aa5a Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Jan 24 2019 13:24:38 +0000 Subject: [PATCH 1/2] Flatpak adjustments --- diff --git a/rb_libtorrent.spec b/rb_libtorrent.spec index 984c1b5..a9ff551 100644 --- a/rb_libtorrent.spec +++ b/rb_libtorrent.spec @@ -164,6 +164,9 @@ pushd build --disable-static \ --enable-examples \ --enable-python-binding \ +%if 0%{?flatpak} + --with-boost=/app \ +%endif --with-boost-system=boost_system \ --with-boost-python=boost_python \ --with-libiconv \ @@ -184,6 +187,9 @@ pushd build-python3 --disable-static \ --enable-examples \ --enable-python-binding \ +%if 0%{?flatpak} + --with-boost=/app \ +%endif --with-boost-system=boost_system \ --with-boost-python=boost_python3 \ --with-libiconv \ From bdb234a36e78f0329db8b0330c11779670ee6c67 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Jan 24 2019 14:43:55 +0000 Subject: [PATCH 2/2] Use bundled libtommath for flatpak builds --- diff --git a/rb_libtorrent.spec b/rb_libtorrent.spec index a9ff551..00eb26c 100644 --- a/rb_libtorrent.spec +++ b/rb_libtorrent.spec @@ -27,7 +27,9 @@ Source1: %{name}-README-renames.Fedora Source2: %{name}-COPYING.Boost Source3: %{name}-COPYING.zlib Patch0: %{name}-1.0.1-boost_noncopyable.patch +%if !0%{?flatpak} Patch1: %{name}-1.1.9-system-tommath.patch +%endif Patch2: disable_failed_test.patch %if 0%{?rhel} @@ -39,7 +41,9 @@ BuildRequires: asio-devel BuildRequires: automake BuildRequires: boost-devel BuildRequires: gcc-c++ +%if !0%{?flatpak} BuildRequires: libtommath-devel +%endif BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(python2) BuildRequires: libtool @@ -127,9 +131,13 @@ Python applications. %prep %setup -q -n "libtorrent-rasterbar-%{version}" #patch0 -p1 +%if !0%{?flatpak} %patch1 -p1 +%endif %patch2 -p1 +%if !0%{?flatpak} rm include/libtorrent/tommath* src/mpi.cpp +%endif sed -i -e 's|include/libtorrent/version.hpp|../include/libtorrent/version.hpp|' configure configure.ac autoreconf -fiv