commit:     e9423224749658cd38c46397c046ec89afd57d7d
Author:     Stephen Shkardoon <ss23 <AT> ss23 <DOT> geek <DOT> nz>
AuthorDate: Mon Jun 18 23:46:37 2018 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Tue Jun 19 05:37:49 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9423224

net-p2p/rtorrent: resolve ncurses compile failure

Adds a patch to ensure tinfo is correctly linked.
This only occurs when ncurses is built with the "tinfo" useflag.
Closes: https://bugs.gentoo.org/658390
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 net-p2p/rtorrent/files/rtorrent-0.9.7-tinfo.patch | 31 +++++++++++++++++++++++
 net-p2p/rtorrent/rtorrent-0.9.7.ebuild            |  4 +++
 2 files changed, 35 insertions(+)

diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.7-tinfo.patch 
b/net-p2p/rtorrent/files/rtorrent-0.9.7-tinfo.patch
new file mode 100644
index 00000000000..8bb009eb676
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.7-tinfo.patch
@@ -0,0 +1,31 @@
+--- a/configure.ac     2018-06-06 23:25:24.000000000 -0500
++++ b/configure.ac     2018-06-18 15:19:52.398995740 -0500
+@@ -32,17 +32,23 @@
+ TORRENT_WITHOUT_STATFS
+ 
+ AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
+-AX_WITH_CURSES
+-
+-if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
+-      AC_MSG_ERROR([requires either NcursesW or Ncurses library])
+-fi
++PKG_CHECK_MODULES([CURSES],[ncursesw],[
++       AC_DEFINE(HAVE_NCURSESW_CURSES_H, 1)
++       ],
++       [PKG_CHECK_MODULES([CURSES],[ncurses],[
++               AC_DEFINE(HAVE_NCURSES_H, 1)
++               ],
++               [AX_WITH_CURSES()
++               if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" 
!= xyes; then
++                       AC_MSG_ERROR([requires either NcursesW or Ncurses 
library])
++               fi])
++       ])
+ 
+ PKG_CHECK_MODULES([LIBCURL], [libcurl], , [LIBCURL_CHECK_CONFIG])
+ PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit="yes"])
+ PKG_CHECK_MODULES([DEPENDENCIES], [libtorrent >= 0.13.7])
+ 
+-LIBS="$PTHREAD_LIBS $CURSES_LIB $CPPUNIT_LIBS $LIBCURL $LIBCURL_LIBS 
$DEPENDENCIES_LIBS $LIBS"
++LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $CPPUNIT_LIBS $LIBCURL 
$LIBCURL_LIBS $DEPENDENCIES_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $LIBCURL_CPPFLAGS 
$LIBCURL_CFLAGS $DEPENDENCIES_CFLAGS $CURSES_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $LIBCURL_CPPFLAGS 
$LIBCURL_CFLAGS $DEPENDENCIES_CFLAGS $CURSES_CFLAGS"

diff --git a/net-p2p/rtorrent/rtorrent-0.9.7.ebuild 
b/net-p2p/rtorrent/rtorrent-0.9.7.ebuild
index f621ce1a181..3b1b5da0040 100644
--- a/net-p2p/rtorrent/rtorrent-0.9.7.ebuild
+++ b/net-p2p/rtorrent/rtorrent-0.9.7.ebuild
@@ -29,6 +29,10 @@ DEPEND="${COMMON_DEPEND}
 
 DOCS=( doc/rtorrent.rc )
 
+PATCHES=(
+       "${FILESDIR}/${PN}-0.9.7-tinfo.patch"
+)
+
 pkg_setup() {
        if ! linux_config_exists || ! linux_chkconfig_present IPV6; then
                ewarn "rtorrent will not start without IPv6 support in your 
kernel"

Reply via email to