From df6be709abeec697da3d3b5fdb74af34d8ad00f8 Mon Sep 17 00:00:00 2001 From: Michal Piotrowski Date: Sun, 1 Apr 2007 16:06:54 +0000 Subject: [PATCH] This patch adds support for libnet in deps/ dir to the isic test From: michal.k.k.piotrowski@gmail.com --- isic/build-fixes.patch | 26 ++++++++++++++++++++++++++ isic/isic.py | 9 ++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 isic/build-fixes.patch diff --git a/isic/build-fixes.patch b/isic/build-fixes.patch new file mode 100644 index 000000000..8a3f4edfa --- /dev/null +++ b/isic/build-fixes.patch @@ -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 diff --git a/isic/isic.py b/isic/isic.py index 54427e80c..40cac997e 100644 --- a/isic/isic.py +++ b/isic/isic.py @@ -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'):