commit: e84fb684085eec755093c510efab2900e9af9f4d Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> AuthorDate: Sun Apr 24 19:38:55 2016 +0000 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> CommitDate: Sun Apr 24 19:40:11 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e84fb684
net-analyzer/ntop: Fix building against net-analyzer/rrdtool-1.6.0 (bug #581046). Package-Manager: portage-2.2.28 net-analyzer/ntop/files/ntop-5.0.1-librrd.patch | 31 +++++++++++++++++++++++++ net-analyzer/ntop/ntop-5.0.1-r1.ebuild | 17 ++++++++++---- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/net-analyzer/ntop/files/ntop-5.0.1-librrd.patch b/net-analyzer/ntop/files/ntop-5.0.1-librrd.patch new file mode 100644 index 0000000..db2530c --- /dev/null +++ b/net-analyzer/ntop/files/ntop-5.0.1-librrd.patch @@ -0,0 +1,31 @@ +--- a/configure.in ++++ b/configure.in +@@ -887,28 +887,6 @@ + fi + fi + +-RRD_LIB="-L${RRD_HOME}/lib -lrrd_th" +- +-if test -f "$RRD_HOME/lib/librrd_th.so"; then +- AC_MSG_RESULT(checking for rrdtool... yes) +-else +- if test -f "$RRD_HOME/lib/librrd_th.dylib"; then # OSX +- AC_MSG_RESULT(checking for rrdtool... yes) +- else +- if test -f "$RRD_HOME/lib/librrd_th.a"; then +- AC_MSG_RESULT(checking for rrdtool... yes) +- else +- AC_CHECK_LIB([rrd_th], [main]) +- if test ".${ac_cv_lib_rrd_th_main}" != ".yes"; then +- AC_MSG_ERROR(Unable to find RRD at $RRD_HOME: please use --with-rrd-home=DIR); +- AC_MSG_ERROR(RRD source can be downloaded from http://www.rrdtool.org/); +- else +- RRD_LIB= +- fi +- fi +- fi +-fi +- + RRD_INC= + if test -d "${RRD_HOME}/include"; then + RRD_INC="-I${RRD_HOME}/include" diff --git a/net-analyzer/ntop/ntop-5.0.1-r1.ebuild b/net-analyzer/ntop/ntop-5.0.1-r1.ebuild index 7893281..49b8f20 100644 --- a/net-analyzer/ntop/ntop-5.0.1-r1.ebuild +++ b/net-analyzer/ntop/ntop-5.0.1-r1.ebuild @@ -5,7 +5,7 @@ EAPI=5 PYTHON_COMPAT=( python2_7 ) -inherit autotools eutils user python-single-r1 +inherit autotools eutils multilib user python-single-r1 DESCRIPTION="Network traffic analyzer with web interface" HOMEPAGE="http://www.ntop.org/products/ntop/" @@ -50,8 +50,11 @@ pkg_setup() { } src_prepare() { - epatch "${FILESDIR}"/${P}-gentoo.patch - epatch "${FILESDIR}"/${P}-includes.patch + epatch \ + "${FILESDIR}"/${P}-gentoo.patch \ + "${FILESDIR}"/${P}-includes.patch \ + "${FILESDIR}"/${P}-librrd.patch + cp /usr/share/aclocal/libtool.m4 libtool.m4.in cat acinclude.m4.in libtool.m4.in acinclude.m4.ntop > acinclude.m4 eautoreconf @@ -77,10 +80,16 @@ src_configure() { econf popd &>/dev/null || die + if has_version '<net-analyzer/rrdtool-1.6'; then + export RRD_LIB=-lrrd_th + else + export RRD_LIB=-lrrd + fi + econf \ $(use_enable snmp) \ $(use_with ssl) \ - --with-rrd-home=/usr/lib + --with-rrd-home=/usr/$(get_libdir) }