diff options
author | Sergio Correia | 2015-06-16 14:08:34 -0400 |
---|---|---|
committer | Sergio Correia | 2015-06-16 14:08:34 -0400 |
commit | 709bfc720f87e743565551442556947aafc3a70a (patch) | |
tree | 33d2e8d751868b6345bf5b0e4f57fcd339162641 | |
download | aur-709bfc720f87e743565551442556947aafc3a70a.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rw-r--r-- | ns-2.35-getopts.patch | 65 | ||||
-rw-r--r-- | ns-2.35-linkstate-erase.fix | 13 | ||||
-rw-r--r-- | ns-2.35-tcl86.patch | 81 |
5 files changed, 233 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f7e6f38781c5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = ns + pkgdesc = Discrete event simulator targeted at networking research + pkgver = 2.35 + pkgrel = 4 + url = http://www.isi.edu/nsnam/ns/ + arch = i686 + arch = x86_64 + license = GPL + makedepends = tclcl + depends = gcc-libs + depends = otcl + optdepends = nam: Tcl/TK based animation tool for viewing network simulation traces, + optdepends = xgraph: X-Windows application for interactive plotting and graphing + source = http://downloads.sourceforge.net/sourceforge/nsnam/ns-2/2.35/ns-src-2.35.tar.gz + source = ns-2.35-linkstate-erase.fix + source = ns-2.35-tcl86.patch + source = ns-2.35-getopts.patch + sha256sums = 2a32e831bcec7d255042a544577559d15eae67696d0e3d30881cedc1112e2387 + sha256sums = aedba646d1bc4d716031f9ea996e6d99c9bb227e7647138cccf39bdd6c069c3a + sha256sums = 7aa4a22492f2be37c81fcdc813972a6bde105e183a013d7b814a56f7bcef872c + sha256sums = 4d02ff0cf1c79d67c440c788d7163c7c873a6e4e2970bab3319cbe29f9b20c14 + +pkgname = ns + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4bf2d81764b0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Sergio Correia <sergio@correia.cc> +# Contributor: Oleg Smirnov <oleg.smirnov@gmail.com> +# Contributor: Luke McCarthy <luke@iogopro.co.uk> + +pkgname=ns +pkgver=2.35 +pkgrel=4 +pkgdesc="Discrete event simulator targeted at networking research" +url="http://www.isi.edu/nsnam/ns/" +license=('GPL') +depends=('gcc-libs' 'otcl') +makedepends=('tclcl') +arch=('i686' 'x86_64') +source=(http://downloads.sourceforge.net/sourceforge/nsnam/ns-2/"${pkgver}"/ns-src-"${pkgver}".tar.gz + ns-2.35-linkstate-erase.fix + ns-2.35-tcl86.patch + ns-2.35-getopts.patch) +sha256sums=('2a32e831bcec7d255042a544577559d15eae67696d0e3d30881cedc1112e2387' + 'aedba646d1bc4d716031f9ea996e6d99c9bb227e7647138cccf39bdd6c069c3a' + '7aa4a22492f2be37c81fcdc813972a6bde105e183a013d7b814a56f7bcef872c' + '4d02ff0cf1c79d67c440c788d7163c7c873a6e4e2970bab3319cbe29f9b20c14') + +optdepends=('nam: Tcl/TK based animation tool for viewing network simulation traces', + 'xgraph: X-Windows application for interactive plotting and graphing') + +prepare() { + cd "${srcdir}"/"${pkgname}"-"${pkgver}" + patch -uNp1 -i ../ns-2.35-linkstate-erase.fix + patch -uNp1 -i ../ns-2.35-tcl86.patch + patch -uNp1 -i ../ns-2.35-getopts.patch +} + +build() { + cd "${srcdir}"/"${pkgname}"-"${pkgver}" + ./configure --prefix=/usr --with-tclcl=/usr/lib/tclcl + make +} + +package() { + cd "${srcdir}"/"${pkgname}"-"${pkgver}" + install -d "${pkgdir}"/usr/bin + install -d "${pkgdir}"/usr/share + install -d "${pkgdir}"/usr/man/man1 + + make DESTDIR="${pkgdir}" install + # fix man dir in the package + mv "${pkgdir}"/usr/man "${pkgdir}"/usr/share +} + +# vim:set ts=2 sw=2 et: diff --git a/ns-2.35-getopts.patch b/ns-2.35-getopts.patch new file mode 100644 index 000000000000..23ede5847aee --- /dev/null +++ b/ns-2.35-getopts.patch @@ -0,0 +1,65 @@ +From 8c77a16671969e2dbfa792553435800dd83cea24 Mon Sep 17 00:00:00 2001 +From: Sergio Correia <sergio@correia.cc> +Date: Fri, 6 Dec 2013 04:19:26 -0300 +Subject: [PATCH 2/2] make tests work + +--- + bin/raw2gp | 6 ++++-- + bin/raw2xg | 6 ++++-- + bin/raw2xg-sctp | 6 ++++-- + 3 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/bin/raw2gp b/bin/raw2gp +index dd123a3..07778a0 100755 +--- a/bin/raw2gp ++++ b/bin/raw2gp +@@ -21,8 +21,10 @@ can be generated with -s 0.01 -m 90. + END + }; + +-require 'getopts.pl'; +-&Getopts('ags:m:ql') || usage; ++use Getopt::Std; ++#require 'getopts.pl'; ++#&Getopts('ags:m:ql') || usage; ++getopts('ags:m:ql') || usage; + + # calculate offsets. Do we need this? + # $offset = int($modulus / 10 + 1) * 10; +diff --git a/bin/raw2xg b/bin/raw2xg +index 02625c4..df42795 100755 +--- a/bin/raw2xg ++++ b/bin/raw2xg +@@ -34,8 +34,10 @@ END + }; + $usage = "usage: $progname [-a] [trace files...]\n"; + +-require 'getopts.pl'; +-&Getopts('acefgds:m:n:qrplvt:xy') || usage; ++use Getopt::Std; ++#require 'getopts.pl'; ++#&Getopts('acefgds:m:n:qrplvt:xy') || usage; ++getopts('acefgds:m:n:qrplvt:xy') || usage; + + $c = 0; + @p = @pc = @pg = @a = @ac = @ae = @d = @lu = @ld = (); +diff --git a/bin/raw2xg-sctp b/bin/raw2xg-sctp +index 08dcf0f..3d3f789 100644 +--- a/bin/raw2xg-sctp ++++ b/bin/raw2xg-sctp +@@ -26,8 +26,10 @@ END + }; + $usage = "usage: $progname [-a] [trace files...]\n"; + +-require 'getopts.pl'; +-&Getopts('aAfFs:m:n:qt:') || usage; ++use Getopt::Std; ++#require 'getopts.pl'; ++#&Getopts('aAfFs:m:n:qt:') || usage; ++getopts('aAfFs:m:n:qt:') || usage; + + $c = 0; + @pplus = @pminus = (); +-- +1.8.4.2 + diff --git a/ns-2.35-linkstate-erase.fix b/ns-2.35-linkstate-erase.fix new file mode 100644 index 000000000000..ea118964baaf --- /dev/null +++ b/ns-2.35-linkstate-erase.fix @@ -0,0 +1,13 @@ +diff --git a/linkstate/ls.h b/linkstate/ls.h +index 5a7800a..7b0fb53 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() { this->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/ns-2.35-tcl86.patch b/ns-2.35-tcl86.patch new file mode 100644 index 000000000000..ffd798280203 --- /dev/null +++ b/ns-2.35-tcl86.patch @@ -0,0 +1,81 @@ +diff --git a/indep-utils/webtrace-conv/dec/proxytrace2any.cc b/indep-utils/webtrace-conv/dec/proxytrace2any.cc +index 97116f5..49f9416 100644 +--- a/indep-utils/webtrace-conv/dec/proxytrace2any.cc ++++ b/indep-utils/webtrace-conv/dec/proxytrace2any.cc +@@ -76,7 +76,7 @@ int main (int argc, char* argv[]) + // Init tcl + Tcl_Interp *interp = Tcl_CreateInterp(); + if (Tcl_Init(interp) == TCL_ERROR) { +- printf("%s\n", interp->result); ++ printf("%s\n", Tcl_GetStringResult(interp)); + abort(); + } + Tcl_InitHashTable(&cidHash, TCL_ONE_WORD_KEYS); +diff --git a/indep-utils/webtrace-conv/epa/tr-stat.cc b/indep-utils/webtrace-conv/epa/tr-stat.cc +index cb8c059..00973e0 100644 +--- a/indep-utils/webtrace-conv/epa/tr-stat.cc ++++ b/indep-utils/webtrace-conv/epa/tr-stat.cc +@@ -243,7 +243,7 @@ int main(int argc, char**argv) + // Init tcl + Tcl_Interp *interp = Tcl_CreateInterp(); + if (Tcl_Init(interp) == TCL_ERROR) { +- printf("%s\n", interp->result); ++ printf("%s\n", Tcl_GetStringResult(interp)); + abort(); + } + Tcl_InitHashTable(&cidHash, TCL_STRING_KEYS); +diff --git a/indep-utils/webtrace-conv/nlanr/tr-stat.cc b/indep-utils/webtrace-conv/nlanr/tr-stat.cc +index 2701bb4..e1cc08d 100644 +--- a/indep-utils/webtrace-conv/nlanr/tr-stat.cc ++++ b/indep-utils/webtrace-conv/nlanr/tr-stat.cc +@@ -188,7 +188,7 @@ int main(int argc, char**argv) + // Init tcl + Tcl_Interp *interp = Tcl_CreateInterp(); + if (Tcl_Init(interp) == TCL_ERROR) { +- printf("%s\n", interp->result); ++ printf("%s\n", Tcl_GetStringResult(interp)); + abort(); + } + Tcl_InitHashTable(&cidHash, TCL_ONE_WORD_KEYS); +diff --git a/indep-utils/webtrace-conv/ucb/tr-stat.cc b/indep-utils/webtrace-conv/ucb/tr-stat.cc +index 2359d2c..be7d231 100644 +--- a/indep-utils/webtrace-conv/ucb/tr-stat.cc ++++ b/indep-utils/webtrace-conv/ucb/tr-stat.cc +@@ -224,7 +224,7 @@ int main(int argc, char**argv) + /* Init tcl */ + Tcl_Interp *interp = Tcl_CreateInterp(); + if (Tcl_Init(interp) == TCL_ERROR) { +- printf("%s\n", interp->result); ++ printf("%s\n", Tcl_GetStringResult(interp)); + abort(); + } + Tcl_InitHashTable(&cidHash, TCL_ONE_WORD_KEYS); +diff --git a/pushback/ident-tree.h b/pushback/ident-tree.h +index 3a4be3a..1c2a540 100644 +--- a/pushback/ident-tree.h ++++ b/pushback/ident-tree.h +@@ -83,7 +83,7 @@ class DropHashTable { + Tcl_HashSearch searchPtr; + Tcl_HashEntry * he = Tcl_FirstHashEntry(hashTable_, &searchPtr); + while (he != NULL) { +- char * key = Tcl_GetHashKey(hashTable_, he); ++ char * key = (char*)Tcl_GetHashKey(hashTable_, he); + long value = (long)Tcl_GetHashValue(he); + printf("%s = %ld\n", key, value); + he = Tcl_NextHashEntry(&searchPtr); +diff --git a/webcache/pagepool.cc b/webcache/pagepool.cc +index 384b125..d52c6e3 100644 +--- a/webcache/pagepool.cc ++++ b/webcache/pagepool.cc +@@ -658,7 +658,7 @@ int ClientPagePool::command(int argc, const char*const* argv) + for (he = Tcl_FirstHashEntry(namemap_, &hs); + he != NULL; + he = Tcl_NextHashEntry(&hs)) { +- char* retVal = Tcl_GetHashKey(namemap_, he); ++ char* retVal = (char*)Tcl_GetHashKey(namemap_, he); + // Convert name to a PageID + PageID t1; + ClientPage::split_name (retVal, t1); +-- +1.8.4.2 + |