diff --git a/debian/patches/0001-install-indep-utils.diff.patch b/debian/patches/0001-install-indep-utils.diff.patch new file mode 100644 index 0000000..b79e563 --- /dev/null +++ b/debian/patches/0001-install-indep-utils.diff.patch @@ -0,0 +1,22 @@ +From: YunQiang Su +Date: Fri, 15 Jun 2012 03:01:12 +0800 +Subject: install-indep-utils.diff + +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 2e6ff5f..f53d78a 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -549,7 +549,7 @@ dirs: + done + + +-install: dirs force install-ns install-man ++install: dirs force install-ns install-man install-recursive + + install-ns: force + $(INSTALL) -m 755 ns $(DESTDIR)$(BINDEST) +-- diff --git a/debian/patches/tclcl-header-move.patch b/debian/patches/0002-tclcl-header-move.patch.patch similarity index 56% rename from debian/patches/tclcl-header-move.patch rename to debian/patches/0002-tclcl-header-move.patch.patch index d5d2244..9b284e5 100644 --- a/debian/patches/tclcl-header-move.patch +++ b/debian/patches/0002-tclcl-header-move.patch.patch @@ -1,10 +1,33 @@ -Description: tclcl's debian packages ship its headers to /usr/include/tclcl - instead of /usr/include/ -Index: ns2/configure -=================================================================== ---- ns2.orig/configure 2012-06-10 23:28:53.000000000 +0800 -+++ ns2/configure 2012-06-10 23:31:09.356606841 +0800 -@@ -6650,7 +6650,8 @@ +From: YunQiang Su +Date: Fri, 15 Jun 2012 03:01:12 +0800 +Subject: tclcl-header-move.patch + +--- + Makefile.in | 2 +- + configure | 3 ++- + indep-utils/cmu-scen-gen/setdest/Makefile.in | 2 +- + packmime/packmime_OL.h | 2 +- + tools/queue-monitor.h | 14 -------------- + 5 files changed, 5 insertions(+), 18 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index f53d78a..55800ee 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -542,7 +542,7 @@ common/ptypes2tcl: common/ptypes2tcl.o + common/ptypes2tcl.o: common/ptypes2tcl.cc common/packet.h + + dirs: +- for d in $(DESTDIR)$(MANDEST)/man1; do \ ++ for d in $(DESTDIR)$(MANDEST)/man1 $(DESTDIR)$(BINDEST); do \ + if [ ! -d $$d ]; then \ + mkdir -p $$d ;\ + fi;\ +diff --git a/configure b/configure +index 9031812..2429fad 100755 +--- a/configure ++++ b/configure +@@ -6650,7 +6650,8 @@ TCLCL_H_PLACES="\ /import/Tcl/include \ /usr/local/include \ /usr/contrib/include \ @@ -14,11 +37,24 @@ Index: ns2/configure TCLCL_H_PLACES_D="$d \ $d/include" TCLCL_LIB_PLACES="\ -Index: ns2/packmime/packmime_OL.h -=================================================================== ---- ns2.orig/packmime/packmime_OL.h 2012-06-10 23:28:53.000000000 +0800 -+++ ns2/packmime/packmime_OL.h 2012-06-10 23:31:09.356606841 +0800 -@@ -73,7 +73,7 @@ +diff --git a/indep-utils/cmu-scen-gen/setdest/Makefile.in b/indep-utils/cmu-scen-gen/setdest/Makefile.in +index 21f75c2..b69aa7d 100644 +--- a/indep-utils/cmu-scen-gen/setdest/Makefile.in ++++ b/indep-utils/cmu-scen-gen/setdest/Makefile.in +@@ -81,7 +81,7 @@ setbox: setbox.o + $(CCX) -o setbox $@.o $(LDFLAGS) $(CFLAGS) $(LIBS) + + clean: +- @rm -f setdest setbox *.o *.core ++ @rm -f setdest calcdest setbox *.o *.core + + .SUFFIXES: .cc + +diff --git a/packmime/packmime_OL.h b/packmime/packmime_OL.h +index 59dce30..d4bc037 100644 +--- a/packmime/packmime_OL.h ++++ b/packmime/packmime_OL.h +@@ -73,7 +73,7 @@ class PackMimeOpenLoop : public TrafficGenerator { void init(); int size_; int seqno_; @@ -27,11 +63,11 @@ Index: ns2/packmime/packmime_OL.h // statistics objects RandomVariable* pm_pac_ia_; -Index: ns2/tools/queue-monitor.h -=================================================================== ---- ns2.orig/tools/queue-monitor.h 2012-06-10 23:28:53.000000000 +0800 -+++ ns2/tools/queue-monitor.h 2012-06-10 23:31:09.360606868 +0800 -@@ -100,17 +100,10 @@ +diff --git a/tools/queue-monitor.h b/tools/queue-monitor.h +index 789c8db..aabb5e3 100644 +--- a/tools/queue-monitor.h ++++ b/tools/queue-monitor.h +@@ -100,17 +100,10 @@ public: int size() const { return (size_); } int pkts() const { return (pkts_); } @@ -49,7 +85,7 @@ Index: ns2/tools/queue-monitor.h int pdrops() const { return (pdrops_); } int pmarks() const { return (pmarks_); } int bdrops() const { return (bdrops_); } -@@ -136,17 +129,10 @@ +@@ -136,17 +129,10 @@ protected: int size_; // current queue size (bytes) int pkts_; // current queue size (packets) // aggregate counters bytes/packets @@ -67,29 +103,4 @@ Index: ns2/tools/queue-monitor.h int pdrops_; int pmarks_; int bdrops_; -Index: ns2/indep-utils/cmu-scen-gen/setdest/Makefile.in -=================================================================== ---- ns2.orig/indep-utils/cmu-scen-gen/setdest/Makefile.in 2012-06-10 23:28:53.000000000 +0800 -+++ ns2/indep-utils/cmu-scen-gen/setdest/Makefile.in 2012-06-10 23:31:09.360606868 +0800 -@@ -81,7 +81,7 @@ - $(CCX) -o setbox $@.o $(LDFLAGS) $(CFLAGS) $(LIBS) - - clean: -- @rm -f setdest setbox *.o *.core -+ @rm -f setdest calcdest setbox *.o *.core - - .SUFFIXES: .cc - -Index: ns2/Makefile.in -=================================================================== ---- ns2.orig/Makefile.in 2012-06-10 23:31:09.336606739 +0800 -+++ ns2/Makefile.in 2012-06-10 23:32:31.869016001 +0800 -@@ -542,7 +542,7 @@ - common/ptypes2tcl.o: common/ptypes2tcl.cc common/packet.h - - dirs: -- for d in $(DESTDIR)$(MANDEST)/man1; do \ -+ for d in $(DESTDIR)$(MANDEST)/man1 $(DESTDIR)$(BINDEST); do \ - if [ ! -d $$d ]; then \ - mkdir -p $$d ;\ - fi;\ +-- diff --git a/debian/patches/0003-fix-gcc-4.7-ftbfs.patch.patch b/debian/patches/0003-fix-gcc-4.7-ftbfs.patch.patch new file mode 100644 index 0000000..ff103a6 --- /dev/null +++ b/debian/patches/0003-fix-gcc-4.7-ftbfs.patch.patch @@ -0,0 +1,22 @@ +From: YunQiang Su +Date: Fri, 15 Jun 2012 03:01:12 +0800 +Subject: fix-gcc-4.7-ftbfs.patch + +--- + linkstate/ls.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/linkstate/ls.h b/linkstate/ls.h +index 5a7800a..ba91c3d 100644 +--- a/linkstate/ls.h ++++ b/linkstate/ls.h +@@ -134,7 +134,7 @@ public: + return ib.second ? ib.first : baseMap::end(); + } + +- void eraseAll() { erase(baseMap::begin(), baseMap::end()); } ++ void eraseAll() { baseMap::erase(baseMap::begin(), baseMap::end()); } + T* findPtr(Key key) { + iterator it = baseMap::find(key); + return (it == baseMap::end()) ? (T *)NULL : &((*it).second); +-- diff --git a/debian/patches/0004-correct-paths-in-examples.patch b/debian/patches/0004-correct-paths-in-examples.patch new file mode 100644 index 0000000..ac27fec --- /dev/null +++ b/debian/patches/0004-correct-paths-in-examples.patch @@ -0,0 +1,107 @@ +From: Aron Xu +Date: Fri, 15 Jun 2012 03:11:02 +0800 +Subject: correct paths in examples + +--- + tcl/ex/asym/asym-test-2.tcl | 2 +- + tcl/ex/tcp-fs/drop.awk | 2 +- + tcl/ex/tcp-fs/inst-thruput.awk | 2 +- + tcl/ex/tcp-fs/process.awk | 2 +- + tcl/ex/tcp-fs/resptime.awk | 2 +- + tcl/ex/tcp-fs/run-fs-asym.tcl | 2 +- + tcl/ex/tcp-fs/run.tcl | 2 +- + tcl/ex/tcp-fs/thruput.awk | 2 +- + tcl/session/scaling-tree.tcl | 2 +- + 9 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/tcl/ex/asym/asym-test-2.tcl b/tcl/ex/asym/asym-test-2.tcl +index 9db1928..912b42b 100755 +--- a/tcl/ex/asym/asym-test-2.tcl ++++ b/tcl/ex/asym/asym-test-2.tcl +@@ -1,4 +1,4 @@ +-#!../../../../ns ++#!/usr/bin/ns + #source ../../../lan/ns-lan.tcl + source ../../../ex/asym/util.tcl + +diff --git a/tcl/ex/tcp-fs/drop.awk b/tcl/ex/tcp-fs/drop.awk +index 6dbbc11..3625993 100755 +--- a/tcl/ex/tcp-fs/drop.awk ++++ b/tcl/ex/tcp-fs/drop.awk +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/gawk -f ++#!/usr/bin/gawk -f + BEGIN { + fsDrops = 0; + otherDrops = 0; +diff --git a/tcl/ex/tcp-fs/inst-thruput.awk b/tcl/ex/tcp-fs/inst-thruput.awk +index b26f626..ae081ae 100755 +--- a/tcl/ex/tcp-fs/inst-thruput.awk ++++ b/tcl/ex/tcp-fs/inst-thruput.awk +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/gawk -f ++#!/usr/bin/gawk -f + { + time = $2; + saddr = $4; +diff --git a/tcl/ex/tcp-fs/process.awk b/tcl/ex/tcp-fs/process.awk +index 48ce788..825bd4f 100755 +--- a/tcl/ex/tcp-fs/process.awk ++++ b/tcl/ex/tcp-fs/process.awk +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/gawk -f ++#!/usr/bin/gawk -f + BEGIN { + erriter = -1; + } +diff --git a/tcl/ex/tcp-fs/resptime.awk b/tcl/ex/tcp-fs/resptime.awk +index 39b74b9..cc4178b 100755 +--- a/tcl/ex/tcp-fs/resptime.awk ++++ b/tcl/ex/tcp-fs/resptime.awk +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/gawk -f ++#!/usr/bin/gawk -f + { + if (NR > 1) + sum += ($3 - $2); +diff --git a/tcl/ex/tcp-fs/run-fs-asym.tcl b/tcl/ex/tcp-fs/run-fs-asym.tcl +index aefe248..d9530c0 100755 +--- a/tcl/ex/tcp-fs/run-fs-asym.tcl ++++ b/tcl/ex/tcp-fs/run-fs-asym.tcl +@@ -1,4 +1,4 @@ +-#! /usr/sww/bin/tclsh ++#! /usr/bin/tclsh + + set burstsize 30 + set firstburstsize 0 +diff --git a/tcl/ex/tcp-fs/run.tcl b/tcl/ex/tcp-fs/run.tcl +index d0a7e1c..791447c 100755 +--- a/tcl/ex/tcp-fs/run.tcl ++++ b/tcl/ex/tcp-fs/run.tcl +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/tclsh ++#! /usr/bin/tclsh + + #set pdrop_opt {-null -null "-recn -rdrop" "-pdrop" "-recn -rdrop -pdrop"} + #set tcptype_opt {-fack -fackfs -fackfs -fackfs -fackfs} +diff --git a/tcl/ex/tcp-fs/thruput.awk b/tcl/ex/tcp-fs/thruput.awk +index 79c8e4e..e8e7911 100755 +--- a/tcl/ex/tcp-fs/thruput.awk ++++ b/tcl/ex/tcp-fs/thruput.awk +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/gawk -f ++#!/usr/bin/gawk -f + BEGIN { + s = ""; + } +diff --git a/tcl/session/scaling-tree.tcl b/tcl/session/scaling-tree.tcl +index c8c4931..310ded1 100755 +--- a/tcl/session/scaling-tree.tcl ++++ b/tcl/session/scaling-tree.tcl +@@ -1,4 +1,4 @@ +-#! ../../ns ++#!/usr/bin/ns + source scaling-defaults.tcl + + # Usage tree.tcl -rand 1.0 -det 0.05 -seed -size $max >! tmp.dat +-- diff --git a/debian/patches/fix-gcc-4.7-ftbfs.patch b/debian/patches/fix-gcc-4.7-ftbfs.patch deleted file mode 100644 index d1a981d..0000000 --- a/debian/patches/fix-gcc-4.7-ftbfs.patch +++ /dev/null @@ -1,14 +0,0 @@ -Description: fix gcc 4.7 ftbfs -Index: ns2/linkstate/ls.h -=================================================================== ---- ns2.orig/linkstate/ls.h 2012-06-03 23:28:54.364171035 +0800 -+++ ns2/linkstate/ls.h 2012-06-10 21:14:06.775662513 +0800 -@@ -134,7 +134,7 @@ - return ib.second ? ib.first : baseMap::end(); - } - -- void eraseAll() { erase(baseMap::begin(), baseMap::end()); } -+ void eraseAll() { baseMap::erase(baseMap::begin(), baseMap::end()); } - T* findPtr(Key key) { - iterator it = baseMap::find(key); - return (it == baseMap::end()) ? (T *)NULL : &((*it).second); diff --git a/debian/patches/install-indep-utils.diff b/debian/patches/install-indep-utils.diff deleted file mode 100644 index f4af186..0000000 --- a/debian/patches/install-indep-utils.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: ns2/Makefile.in -=================================================================== ---- ns2.orig/Makefile.in 2011-10-24 16:05:23.743036202 +0800 -+++ ns2/Makefile.in 2011-10-29 21:21:56.263471920 +0800 -@@ -549,7 +549,7 @@ - done - - --install: dirs force install-ns install-man -+install: dirs force install-ns install-man install-recursive - - install-ns: force - $(INSTALL) -m 755 ns $(DESTDIR)$(BINDEST) diff --git a/debian/patches/series b/debian/patches/series index 6bc0655..64b6b5e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ -install-indep-utils.diff -tclcl-header-move.patch -fix-gcc-4.7-ftbfs.patch +0001-install-indep-utils.diff.patch +0002-tclcl-header-move.patch.patch +0003-fix-gcc-4.7-ftbfs.patch.patch +0004-correct-paths-in-examples.patch