--- /dev/null
+--- 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"
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/"
}
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
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)
}