Skip to content

Commit

Permalink
This patch adds support for libnet in deps/ dir to the isic test
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Piotrowski committed Apr 1, 2007
1 parent 3d20aa1 commit df6be70
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
26 changes: 26 additions & 0 deletions isic/build-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
--- src/Makefile.in2 2004-11-06 21:39:55.000000000 +0100
+++ src/Makefile.in 2007-03-31 16:36:06.000000000 +0200
@@ -5,9 +5,9 @@
PREFIX ?= /usr/local

CC = @CC@
-DEFS = @DEFS@ `libnet-config --defines`
-CFLAGS = @CFLAGS@ `libnet-config --cflags`
-LIBS = @LIBS@ `libnet-config --libs`
+DEFS = @DEFS@ `../../../deps/libnet/src/libnet-config --defines`
+CFLAGS = @CFLAGS@ `../../../deps/libnet/src/libnet-config --cflags`
+LIBS = @LIBS@ `../../../deps/libnet/src/libnet-config --libs`
LDFLAGS = @LDFLAGS@

INSTALL = @INSTALL@
--- src/configure2 2007-03-31 16:40:35.000000000 +0200
+++ src/configure 2007-03-31 16:37:37.000000000 +0200
@@ -828,7 +828,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'


-PREFIX=/usr/local
+#PREFIX=/usr/local

ac_safe=`echo "$PREFIX/lib/libnet.a" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $PREFIX/lib/libnet.a""... $ac_c" 1>&6
9 changes: 6 additions & 3 deletions isic/isic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
from autotest_utils import *

class isic(test.test):
version = 1
version = 2

# http://www.packetfactory.net/Projects/ISIC/isic-0.06.tgz
# + http://www.stardust.webpages.pl/files/crap/isic-gcc41-fix.patch

def initialize(self):
self.job.setup_dep(['libnet'])

def setup(self, tarball = 'isic-0.06.tar.bz2'):
tarball = unmap_url(self.bindir, tarball, self.tmpdir)
extract_tarball_to_dir(tarball, self.srcdir)
os.chdir(self.srcdir)

os_dep.library('libnet.so')
system('./configure')
system('patch -p1 < ../build-fixes.patch')
system('PREFIX=' + self.autodir + '/deps/libnet/libnet/ ./configure')
system('make')

def execute(self, args = '-s rand -d 127.0.0.1 -p 10000000'):
Expand Down

0 comments on commit df6be70

Please sign in to comment.