summaryrefslogtreecommitdiff
path: root/net-analyzer
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2016-04-24 21:38:55 +0200
committerJeroen Roovers <jer@gentoo.org>2016-04-24 21:40:11 +0200
commite84fb684085eec755093c510efab2900e9af9f4d (patch)
tree8f36a1d6e2dec6e094e2ab012cd10c8f56e2d95b /net-analyzer
parente9a26a543cfd3471dc9ce529c887b50c27310982 (diff)
downloadgentoo-e84fb684085eec755093c510efab2900e9af9f4d.tar.gz
gentoo-e84fb684085eec755093c510efab2900e9af9f4d.tar.xz
net-analyzer/ntop: Fix building against net-analyzer/rrdtool-1.6.0 (bug #581046).
Package-Manager: portage-2.2.28
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ntop/files/ntop-5.0.1-librrd.patch31
-rw-r--r--net-analyzer/ntop/ntop-5.0.1-r1.ebuild17
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 00000000000..db2530c8a5e
--- /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 78932816491..49b8f207aba 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)
}