commit:     2d473b12ad24cbcd94edc07dcbbb5a0f57d6d8a8
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  2 13:15:58 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jul  2 13:15:58 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d473b12

net-libs/libtorrent: [QA] update EAPI 6 -> 8

Closes: https://bugs.gentoo.org/740698
Closes: https://bugs.gentoo.org/836085
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/libtorrent-0.13.8-sysroot.patch          | 33 ++++++++++++++++++++++
 ....13.8-r1.ebuild => libtorrent-0.13.8-r2.ebuild} | 30 +++++++++++---------
 2 files changed, 49 insertions(+), 14 deletions(-)

diff --git a/net-libs/libtorrent/files/libtorrent-0.13.8-sysroot.patch 
b/net-libs/libtorrent/files/libtorrent-0.13.8-sysroot.patch
new file mode 100644
index 000000000000..9f696c01ef61
--- /dev/null
+++ b/net-libs/libtorrent/files/libtorrent-0.13.8-sysroot.patch
@@ -0,0 +1,33 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,7 +43,6 @@
+ TORRENT_ENABLE_INTERRUPT_SOCKET
+ 
+ TORRENT_ENABLE_ARCH
+-TORRENT_WITH_SYSROOT
+ 
+ dnl TORRENT_WITH_XFS
+ TORRENT_WITHOUT_KQUEUE
+@@ -59,8 +58,7 @@
+ CC_ATTRIBUTE_VISIBILITY
+ 
+ AX_PTHREAD
+-AX_CHECK_ZLIB
+-
++PKG_CHECK_MODULES([ZLIB], [zlib])
+ PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit="yes"])
+ 
+ CFLAGS="$PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CFLAGS"
+--- a/src/torrent/utils/Makefile.am
++++ b/src/torrent/utils/Makefile.am
+@@ -23,8 +23,9 @@
+       thread_interrupt.h \
+       uri_parser.cc \
+       uri_parser.h
++libsub_torrentutils_la_LIBADD = $(ZLIB_LIBS)
+ 
+-AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. -I$(top_srcdir)
++AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. -I$(top_srcdir) 
$(ZLIB_CFLAGS)
+ 
+ libtorrentincludedir = $(includedir)/torrent/utils
+ libtorrentinclude_HEADERS = \

diff --git a/net-libs/libtorrent/libtorrent-0.13.8-r1.ebuild 
b/net-libs/libtorrent/libtorrent-0.13.8-r2.ebuild
similarity index 80%
rename from net-libs/libtorrent/libtorrent-0.13.8-r1.ebuild
rename to net-libs/libtorrent/libtorrent-0.13.8-r2.ebuild
index 5d3d38cc3667..5bb36208d46b 100644
--- a/net-libs/libtorrent/libtorrent-0.13.8-r1.ebuild
+++ b/net-libs/libtorrent/libtorrent-0.13.8-r2.ebuild
@@ -1,35 +1,37 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
 
-inherit toolchain-funcs
+inherit autotools toolchain-funcs
 
 DESCRIPTION="BitTorrent library written in C++ for *nix"
 HOMEPAGE="https://rakshasa.github.io/rtorrent/";
 SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz";
 
 LICENSE="GPL-2"
-
 # The README says that the library ABI is not yet stable and dependencies on
 # the library should be an explicit, syncronized version until the library
 # has had more time to mature. Until it matures we should not include a soname
 # subslot.
 SLOT="0"
-
 KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc x86 
~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris"
-IUSE="debug ssl test"
-RESTRICT="!test? ( test )"
+IUSE="debug ssl"
 
 # cppunit dependency - https://github.com/rakshasa/libtorrent/issues/182
 RDEPEND="
        dev-util/cppunit:=
        sys-libs/zlib
-       ssl? (
-               dev-libs/openssl:0=
-       )"
-DEPEND="${RDEPEND}
-       virtual/pkgconfig"
+       ssl? ( dev-libs/openssl:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.13.8-sysroot.patch )
+
+src_prepare() {
+       default
+       eautoreconf
+}
 
 src_configure() {
        # bug 518582
@@ -37,6 +39,7 @@ src_configure() {
        echo -e "#include <inttypes.h>\nint main(){ int64_t var = 7; 
__sync_add_and_fetch(&var, 1); return 0;}" > "${T}/sync_add_and_fetch.c" || die
        $(tc-getCC) ${CFLAGS} -o /dev/null -x c "${T}/sync_add_and_fetch.c" 
>/dev/null 2>&1
        if [[ $? -ne 0 ]]; then
+               einfo "Disabling instrumentation"
                disable_instrumentation="--disable-instrumentation"
        fi
 
@@ -46,12 +49,11 @@ src_configure() {
                $(use_enable debug) \
                $(use_enable ssl openssl) \
                ${disable_instrumentation} \
-               --with-posix-fallocate \
-               --with-zlib="${EROOT%/}/usr/"
+               --with-posix-fallocate
 }
 
 src_install() {
        default
 
-       find "${D}" -name '*.la' -delete
+       find "${ED}" -type f -name '*.la' -delete || die
 }

Reply via email to