summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2009-01-15 07:28:38 +0000
committerJeroen Roovers <jer@gentoo.org>2009-01-15 07:28:38 +0000
commitd2043e8cee79464e7dc080dddc3da057e2840cdd (patch)
treeeeb7b35168b28c119aa7a0f4081473ddf2605dd8 /net-analyzer/sancp
parentversion bump (diff)
downloadgentoo-2-d2043e8cee79464e7dc080dddc3da057e2840cdd.tar.gz
gentoo-2-d2043e8cee79464e7dc080dddc3da057e2840cdd.tar.bz2
gentoo-2-d2043e8cee79464e7dc080dddc3da057e2840cdd.zip
Use toolchain. Use dobin. Do not strip (bug #251984).
(Portage version: 2.2_rc22/cvs/Linux 2.6.25-gentoo-r7-JeR i686)
Diffstat (limited to 'net-analyzer/sancp')
-rw-r--r--net-analyzer/sancp/ChangeLog8
-rw-r--r--net-analyzer/sancp/files/sancp-1.6.1-compiler.patch44
-rw-r--r--net-analyzer/sancp/sancp-1.6.1-r2.ebuild15
3 files changed, 60 insertions, 7 deletions
diff --git a/net-analyzer/sancp/ChangeLog b/net-analyzer/sancp/ChangeLog
index 9e8e92831be8..a5bc6e1e085e 100644
--- a/net-analyzer/sancp/ChangeLog
+++ b/net-analyzer/sancp/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-analyzer/sancp
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sancp/ChangeLog,v 1.11 2008/08/04 19:54:06 jer Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sancp/ChangeLog,v 1.12 2009/01/15 07:28:38 jer Exp $
+
+ 15 Jan 2009; Jeroen Roovers <jer@gentoo.org>
+ +files/sancp-1.6.1-compiler.patch, sancp-1.6.1-r2.ebuild:
+ Use toolchain. Use dobin. Do not strip (bug #251984).
04 Aug 2008; Jeroen Roovers <jer@gentoo.org> metadata.xml:
Describe local USE flags for GLEP 56.
diff --git a/net-analyzer/sancp/files/sancp-1.6.1-compiler.patch b/net-analyzer/sancp/files/sancp-1.6.1-compiler.patch
new file mode 100644
index 000000000000..95f3aa32fb86
--- /dev/null
+++ b/net-analyzer/sancp/files/sancp-1.6.1-compiler.patch
@@ -0,0 +1,44 @@
+--- sancp-1.6.1/Makefile.orig 2004-01-19 23:04:56.000000000 +0100
++++ sancp-1.6.1/Makefile 2009-01-15 08:21:54.000000000 +0100
+@@ -1,26 +1,26 @@
+
+ # !!! Uncomment this CFLAGS for a small binary !!!
+-CFLAGS = -O3 -s -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2
++CFLAGS += -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2
+
+ # !!! or uncomment this CFLAGS for a large binary with symbols; use for debugging !!!
+ #CFLAGS = -O0 -g -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2
+
+ final : sancp.cc Makefile
+- if [ ! -f build_acl.o -o build_acl.cc -nt build_acl.o ]; then g++ -Wall $(CFLAGS) -c build_acl.cc -o build_acl.o; fi
+- if [ ! -f misc_functs.o -o misc_functs.cc -nt misc_functs.o ]; then g++ -Wall $(CFLAGS) -c misc_functs.cc -o misc_functs.o; fi
+- if [ ! -f outputFileHandle.o -o outputFileHandle.cc -nt outputFileHandle.o ]; then g++ -Wall $(CFLAGS) -c outputFileHandle.cc -o outputFileHandle.o; fi
+- if [ ! -f apply_rule.o -o apply_rule.cc -nt apply_rule.o ]; then g++ -Wall $(CFLAGS) -c apply_rule.cc -o apply_rule.o; fi
+- if [ ! -f decode.o -o decode.cc -nt decode.o ]; then g++ -Wall $(CFLAGS) -c decode.cc -o decode.o; fi
+- if [ ! -f fileHandle.o -o fileHandle.cc -nt fileHandle.o ]; then g++ -Wall $(CFLAGS) -c fileHandle.cc -o fileHandle.o; fi
+- if [ ! -f MemoryPool.o -o MemoryPool.cc -nt MemoryPool.o ]; then g++ -Wall $(CFLAGS) -c MemoryPool.cc -o MemoryPool.o; fi
+- if [ ! -f pcapFileHandle.o -o pcapFileHandle.cc -nt pcapFileHandle.o ]; then g++ -Wall $(CFLAGS) -c pcapFileHandle.cc -o pcapFileHandle.o; fi
+- if [ ! -f sancp.o -o sancp.cc -nt sancp.o ]; then g++ -Wall $(CFLAGS) -c sancp.cc -o sancp.o; fi
++ if [ ! -f build_acl.o -o build_acl.cc -nt build_acl.o ]; then $(CXX) -Wall $(CFLAGS) -c build_acl.cc -o build_acl.o; fi
++ if [ ! -f misc_functs.o -o misc_functs.cc -nt misc_functs.o ]; then $(CXX) -Wall $(CFLAGS) -c misc_functs.cc -o misc_functs.o; fi
++ if [ ! -f outputFileHandle.o -o outputFileHandle.cc -nt outputFileHandle.o ]; then $(CXX) -Wall $(CFLAGS) -c outputFileHandle.cc -o outputFileHandle.o; fi
++ if [ ! -f apply_rule.o -o apply_rule.cc -nt apply_rule.o ]; then $(CXX) -Wall $(CFLAGS) -c apply_rule.cc -o apply_rule.o; fi
++ if [ ! -f decode.o -o decode.cc -nt decode.o ]; then $(CXX) -Wall $(CFLAGS) -c decode.cc -o decode.o; fi
++ if [ ! -f fileHandle.o -o fileHandle.cc -nt fileHandle.o ]; then $(CXX) -Wall $(CFLAGS) -c fileHandle.cc -o fileHandle.o; fi
++ if [ ! -f MemoryPool.o -o MemoryPool.cc -nt MemoryPool.o ]; then $(CXX) -Wall $(CFLAGS) -c MemoryPool.cc -o MemoryPool.o; fi
++ if [ ! -f pcapFileHandle.o -o pcapFileHandle.cc -nt pcapFileHandle.o ]; then $(CXX) -Wall $(CFLAGS) -c pcapFileHandle.cc -o pcapFileHandle.o; fi
++ if [ ! -f sancp.o -o sancp.cc -nt sancp.o ]; then $(CXX) -Wall $(CFLAGS) -c sancp.cc -o sancp.o; fi
+ if [ ! -f pcap_functions.o -o pcap_functions.c -nt pcap_functions.o ]; then gcc -Wall $(CFLAGS) -c pcap_functions.c -o pcap_functions.o; fi
+- if [ ! -f help.o -o help.cc -nt help.o ]; then g++ -Wall $(CFLAGS) -c help.cc -o help.o ; fi
+- if [ ! -f permissions.o -o permissions.cc -nt permissions.o ]; then g++ -Wall $(CFLAGS) -c permissions.cc -o permissions.o ; fi
+- if [ ! -f check_packet.o -o check_packet.cc -nt check_packet.o ]; then g++ -Wall $(CFLAGS) -c check_packet.cc -o check_packet.o; fi
+- if [ ! -f statefull_logging.o -o statefull_logging.cc -nt statefull_logging.o ]; then g++ -Wall $(CFLAGS) -c statefull_logging.cc -o statefull_logging.o ; fi
+- g++ -Wall $(CFLAGS) -o sancp sancp.o misc_functs.o check_packet.o statefull_logging.o build_acl.o apply_rule.o decode.o pcap_functions.o pcapFileHandle.o fileHandle.o MemoryPool.o help.o permissions.o outputFileHandle.o -lpcap
++ if [ ! -f help.o -o help.cc -nt help.o ]; then $(CXX) -Wall $(CFLAGS) -c help.cc -o help.o ; fi
++ if [ ! -f permissions.o -o permissions.cc -nt permissions.o ]; then $(CXX) -Wall $(CFLAGS) -c permissions.cc -o permissions.o ; fi
++ if [ ! -f check_packet.o -o check_packet.cc -nt check_packet.o ]; then $(CXX) -Wall $(CFLAGS) -c check_packet.cc -o check_packet.o; fi
++ if [ ! -f statefull_logging.o -o statefull_logging.cc -nt statefull_logging.o ]; then $(CXX) -Wall $(CFLAGS) -c statefull_logging.cc -o statefull_logging.o ; fi
++ $(CXX) -Wall $(CFLAGS) -o sancp sancp.o misc_functs.o check_packet.o statefull_logging.o build_acl.o apply_rule.o decode.o pcap_functions.o pcapFileHandle.o fileHandle.o MemoryPool.o help.o permissions.o outputFileHandle.o -lpcap
+
+ clean :
+ rm -f *.o sancp
diff --git a/net-analyzer/sancp/sancp-1.6.1-r2.ebuild b/net-analyzer/sancp/sancp-1.6.1-r2.ebuild
index 6790d501a07c..7325ee29eda0 100644
--- a/net-analyzer/sancp/sancp-1.6.1-r2.ebuild
+++ b/net-analyzer/sancp/sancp-1.6.1-r2.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sancp/sancp-1.6.1-r2.ebuild,v 1.3 2007/05/20 08:29:47 opfer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sancp/sancp-1.6.1-r2.ebuild,v 1.4 2009/01/15 07:28:37 jer Exp $
-inherit eutils
+inherit eutils toolchain-funcs
DESCRIPTION="SANCP is a network security tool designed to collect statistical \
information regarding network traffic and collect the traffic itself in pcap format."
@@ -36,6 +36,12 @@ src_unpack() {
# bug 138337
epatch "${DISTDIR}"/${PN}-1.6.1.fix200601.c.patch
epatch "${DISTDIR}"/${PN}-1.6.1.fix200606.d.patch
+ epatch "${FILESDIR}"/${P}-compiler.patch
+}
+
+src_compile() {
+ tc-export CXX
+ emake || die "make failed"
}
src_install() {
@@ -50,8 +56,7 @@ src_install() {
doins etc/sancp/sancp.conf
fi
- exeinto /usr/bin
- doexe sancp
+ dobin sancp
newinitd "${FILESDIR}"/sancp.rc1 sancp
newconfd "${FILESDIR}"/sancp.confd sancp