Skip to content

Commit

Permalink
net-analyzer/argus-clients: Use net-libs/libtirpc.
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.20, Repoman-2.3.6
  • Loading branch information
Jeroen Roovers committed Jan 31, 2018
1 parent fc5311c commit 2321dd5
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 2 deletions.
73 changes: 73 additions & 0 deletions net-analyzer/argus-clients/argus-clients-3.0.8.2-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
inherit autotools toolchain-funcs

DESCRIPTION="Clients for net-analyzer/argus"
HOMEPAGE="http://www.qosient.com/argus/"
SRC_URI="http://qosient.com/argus/dev/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="debug ft geoip mysql sasl tcpd"

ARGUS_CDEPEND="
net-analyzer/rrdtool[perl]
net-libs/libpcap
net-libs/libtirpc:=
sys-libs/ncurses:=
sys-libs/readline:=
sys-libs/zlib
ft? ( net-analyzer/flow-tools )
geoip? ( dev-libs/geoip )
mysql? ( virtual/mysql )
sasl? ( dev-libs/cyrus-sasl )
"
RDEPEND="
${ARGUS_CDEPEND}
"
DEPEND="
${ARGUS_CDEPEND}
sys-devel/bison
sys-devel/flex
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-3.0.4.1-disable-tcp-wrappers-automagic.patch
"${FILESDIR}"/${PN}-3.0.7.21-curses-readline.patch
"${FILESDIR}"/${PN}-3.0.8.2-rpc.patch
"${FILESDIR}"/${PN}-3.0.8.2-ar.patch
)

src_prepare() {
default

eautoreconf
}

src_configure() {
tc-export AR RANLIB

use debug && touch .debug
econf \
$(use_with ft libft) \
$(use_with geoip GeoIP /usr/) \
$(use_with sasl) \
$(use_with tcpd wrappers) \
$(use_with mysql)
}

src_compile() {
emake \
CCOPT="${CFLAGS} ${LDFLAGS}" \
RANLIB=$(tc-getRANLIB) \
CURSESLIB="$( $(tc-getPKG_CONFIG) --libs ncurses)"
}

src_install() {
dobin bin/ra*
dodoc ChangeLog CREDITS README CHANGES
doman man/man{1,5}/*
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- configure.ac.org 2011-01-28 18:26:54.000000000 +0100
+++ configure.ac 2011-04-20 00:09:37.000000000 +0200
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,12 @@
esac

Expand Down
31 changes: 31 additions & 0 deletions net-analyzer/argus-clients/files/argus-clients-3.0.8.2-ar.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- a/common/Makefile.in
+++ b/common/Makefile.in
@@ -113,23 +113,23 @@
all: $(LIBS)

@INSTALL_LIB@/argus_common.a: $(COMMONOBJ)
- rm -f $@; ar qc $@ $(COMMONOBJ)
+ rm -f $@; $(AR) qc $@ $(COMMONOBJ)
-$(RANLIB) $@

@INSTALL_LIB@/argus_parse.a: $(PARSEOBJ)
- rm -f $@; ar qc $@ $(PARSEOBJ)
+ rm -f $@; $(AR) qc $@ $(PARSEOBJ)
-$(RANLIB) $@

@INSTALL_LIB@/argus_client.a: $(CLIENTOBJ)
- rm -f $@; ar qc $@ $(CLIENTOBJ)
+ rm -f $@; $(AR) qc $@ $(CLIENTOBJ)
-$(RANLIB) $@

@INSTALL_LIB@/argus_output.a: $(OUTPUTOBJ)
- rm -f $@; ar qc $@ $(OUTPUTOBJ)
+ rm -f $@; $(AR) qc $@ $(OUTPUTOBJ)
-$(RANLIB) $@

@INSTALL_LIB@/argus_event.a: $(EVENTOBJ)
- rm -f $@; ar qc $@ $(EVENTOBJ)
+ rm -f $@; $(AR) qc $@ $(EVENTOBJ)
-$(RANLIB) $@

scanner.c: scanner.l
34 changes: 34 additions & 0 deletions net-analyzer/argus-clients/files/argus-clients-3.0.8.2-rpc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,7 @@
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_YACC
+PKG_PROG_PKG_CONFIG

AC_CHECK_PROGS(V_RANLIB, ranlib, @true)
AC_QOSIENT_LEX_AND_YACC(V_LEX, V_YACC, argus_)
@@ -82,6 +83,12 @@
AC_CHECK_HEADERS([stdlib.h stddef.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h])
AC_CHECK_HEADERS([sys/mount.h sys/time.h sys/vfs.h syslog.h termios.h unistd.h values.h ifaddrs.h])

+PKG_CHECK_MODULES(libtirpc, libtirpc,
+ [LIBS="${LIBS} ${libtirpc_LIBS}"],
+[AC_CHECK_HEADER([rpc/types.h],,
+ [AC_MSG_ERROR([Cannot find <rpc/types.h>])])]
+)
+
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
--- a/common/Makefile.in
+++ b/common/Makefile.in
@@ -48,7 +48,7 @@

CC = @CC@
CCOPT = @V_CCOPT@
-INCLS = -I. -I../include @V_INCLS@ @MYSQL_INCLS@
+INCLS = -I. -I../include @V_INCLS@ @MYSQL_INCLS@ @libtirpc_CFLAGS@
DEFS = @DEFS@ -DARGUS_SYSLOG

# Standard CFLAGS

0 comments on commit 2321dd5

Please sign in to comment.