summaryrefslogtreecommitdiff
path: root/sci-misc/gt-itm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-misc/gt-itm
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-misc/gt-itm')
-rw-r--r--sci-misc/gt-itm/Manifest7
-rw-r--r--sci-misc/gt-itm/files/gt-itm-implicits.patch111
-rw-r--r--sci-misc/gt-itm/gt-itm-19961004-r2.ebuild79
-rw-r--r--sci-misc/gt-itm/metadata.xml8
4 files changed, 205 insertions, 0 deletions
diff --git a/sci-misc/gt-itm/Manifest b/sci-misc/gt-itm/Manifest
new file mode 100644
index 000000000000..ab7ce4bc8028
--- /dev/null
+++ b/sci-misc/gt-itm/Manifest
@@ -0,0 +1,7 @@
+AUX gt-itm-implicits.patch 2731 SHA256 1f09e133a702f57081e5f3e0f58fc108f1a33abac398305e9cca960f33cff985 SHA512 64dc41be9d914e1df68780576300c54aa8091862b37ae44b5530312b8eaafbda76d97021f62544bce7c57e447959eea5a83c72074a714b4894bf4fddc79b5fe7 WHIRLPOOL d9252b0a26c1f603df92edeb623e35fadee058d73b5dacb76353b998a4513cc3b89616f4af9110f0bdc9b40ed5588b89cb3c12bdf59436b1f9e4a7c2edb9527c
+DIST gt-itm.tar.gz 623345 SHA256 0719947bb6e3a82d0054b6d4c74f5b3615c5583d326c32e11a848dcfed861538 SHA512 e775ac475d40fc753a27fb619f262d701818190fa3be90d587f95e215610918b56b9d67783d4e7e2f55d0064e5b2d2ce911042353b29bce1e4dbcf407ff9fabc WHIRLPOOL c447323fe98b7bef85d5fda86cfa3b559208694519be17ead0d5792dc8b27349a1c2b0bbde4d8a571f609c1c1a66b33b30888165215d332e64ee28b748328bab
+DIST sgb2ns.tar.gz 50635 SHA256 902f1a3d1a57e87387dd3bd22b8fda7c1ee2830f87fa468ab775aa8feb2a22cb SHA512 77ec6fdad61f43bf078851852aa03dfea02df235a78853e477dacc8e2b94c0d8bda9772fc00d18fdaeabc419b2780c016b7a64a1a06ac0be2c8c2aa6608c06cf WHIRLPOOL ae6a0d2701c0a98eb7b059acc8760acc444ca086b4eb60e46cce4df1491012c9b1853cb1acc35c709938103a94f005c379c5bad9630b4a464af7460a3b9e3bfb
+EBUILD gt-itm-19961004-r2.ebuild 2077 SHA256 fa24025910530e93dcf99f7142dbd0380b877df15de48eb5c99c6f2a958b1835 SHA512 eb9a4a175782790a4d473ed74721b3aa13df0fba4fca34831cdca7474059e596e8081fc92ff16024f49d05d8ef40ebad4f88b836145999bf2c9d79b4f6c54e02 WHIRLPOOL 285d46457038dbc321a5928d3618ff03576dfd5eacdb2a4cb920320dae3eb1d3fc68b13e4baf54afffd3f9d9dcf90525ff6ebce005ed1253bbcdd05a5fc4f295
+MISC ChangeLog 2868 SHA256 60cfa52eb37b3b1bd9ec0020dd9cc04fa6a52557756f3c04154657df74d53073 SHA512 2e22dee65e78131ad9ebce4f884ba96cb47d38e471ff0926a975900d9647c4d2238ab39e2ab42ebe800110071a3f57ccaefd892602eac4d635a0ab2d3f478dd2 WHIRLPOOL d46644bac71041a5ab8b26e313c51a85cb80dd2d195fce2798f89da31746b5112f36dc7b67fb5f5751f79ba71b4c65d8cfa365c25c725b4fe29fa9da7a46f04e
+MISC ChangeLog-2015 1526 SHA256 01486300ddfad6e88ecfd28ecaf615406c6205f72b0061b8798404c21080d90a SHA512 ff4df2c61a9568417f6b6ff452a078909588319cd84b9a2e8afdad16145665bba581dc74bb356de14b8ef9f235b92c6539b419f63e5174eb197a50e455b6a485 WHIRLPOOL 3f2f28497a4ab8ca1f39cd0bfedc8469ce9a832356b621649cbc93a68a51935f0c3ca489ab86fdb01d1b1e4c9d90dc7e394fd28341d48109350adcd46d1a2390
+MISC metadata.xml 249 SHA256 d92f4663e317d15aa310d71020356d744cc23e6d8bc8a52ef44a2331a3c37adb SHA512 29a9c1817fd4299246d5fa995b73b9f1996b112b70f468139cf9cd8f07077d831e0788d3b93aaba67bb38dce5850830c27543fccbddbac02b0da4ff899def519 WHIRLPOOL b995ffbeda7d1119f53cf016f0ed502521258c348735fe3b362dc082e0f76cf1a09c0848bcfd8b8bc97d6afc6104628f9c3d116a1a8f4c393b1fcc2471f6ddfe
diff --git a/sci-misc/gt-itm/files/gt-itm-implicits.patch b/sci-misc/gt-itm/files/gt-itm-implicits.patch
new file mode 100644
index 000000000000..7618354469ff
--- /dev/null
+++ b/sci-misc/gt-itm/files/gt-itm-implicits.patch
@@ -0,0 +1,111 @@
+--- gt-itm/src/geog.c
++++ gt-itm/src/geog.c
+@@ -6,6 +6,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/param.h> /* for NBBY */
+ #include <alloca.h>
+ #include <assert.h>
+@@ -31,6 +32,9 @@
+
+ static char geogId[]="$Id$";
+
++long fdiam(Graph *g);
++void die(s);
++
+ double
+ distance(Vertex *u, Vertex *v)
+ {
+--- gt-itm/src/ts.c
++++ gt-itm/src/ts.c
+@@ -8,6 +8,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h> /* for NBBY */
+ #include <alloca.h>
+ #include "gb_graph.h"
+@@ -64,6 +65,10 @@
+ return (x); }
+ */
+
++int td_OK(Vertex *snp,Vertex *dnp);
++long random(void);
++int stubs_OK(Vertex *snp0,Vertex *snp1);
++
+ /* fast diameter computation using Floyd-Warshall
+ * Returns the HOP diameter of the graph, i.e. each edge given UNIT wt.
+ * Leaves the LENGTH diameter of the graph in g->Gldiam.
+--- gt-itm/include/geog.h
++++ gt-itm/include/geog.h
+@@ -74,3 +74,8 @@
+ geo_parms* toppp, /* params for transit connectivity */
+ geo_parms* transpp, /* " " transit domains */
+ geo_parms* stubpp); /* " " stub domains */
++
++void randomize(long* a, long size, long mean, int iters);
++long idist(Vertex *u, Vertex *v);
++int printparms(char *buf,geo_parms *pp);
++int isconnected(Graph *G);
+--- gt-itm/src/edriver.c
++++ gt-itm/src/edriver.c
+@@ -35,6 +35,8 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include "gb_graph.h"
+ #include "gb_save.h"
+ #include "gb_dijk.h"
+--- gt-itm/include/eval.h
++++ gt-itm/include/eval.h
+@@ -8,4 +8,7 @@
+ enum Field {Len, A, B, Hops};
+
+ void twofield_sptree(Graph*, Vertex*, enum Field, enum Field);
+-
++int finddegdist(Graph *g, int** degdist);
++void dopaths(Graph *g, enum Field f0, enum Field f1, int *rmin, int *rmax, float *ravg);
++void dodepthdist(Graph *g, int** ddist);
++int bicomp(Graph *g,int verbose);
+--- gt-itm/src/dfs.c
++++ gt-itm/src/dfs.c
+@@ -6,6 +6,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <alloca.h>
+ #include <sys/types.h>
+ #include "gb_graph.h"
+@@ -18,6 +19,8 @@
+
+ #define NBBY 8
+
++int dfs(Graph *G,int n,u_char *vis);
++
+ /* check connectivity of graph g */
+ /* uses depth-first search. */
+ isconnected(Graph *G)
+--- gt-itm/src/itm.c.orig 2010-10-12 17:11:25.748461793 +0200
++++ gt-itm/src/itm.c 2010-10-12 17:13:09.237165705 +0200
+@@ -42,6 +42,7 @@
+ #include <stdlib.h> /* for calloc(),atoi(),etc. */
+ #include <string.h> /* for strtok() */
+ #include "gb_graph.h"
++#include "gb_save.h"
+ #include "geog.h"
+
+ #define LINE 512
+@@ -55,6 +56,7 @@
+ char *delim = " \t\n", *nonestr = "<none>";
+ static char errstr[256];
+
++void die(s);
+
+ char *
+ get_geoparms(FILE * f, geo_parms * pp)
diff --git a/sci-misc/gt-itm/gt-itm-19961004-r2.ebuild b/sci-misc/gt-itm/gt-itm-19961004-r2.ebuild
new file mode 100644
index 000000000000..36c7552cf47e
--- /dev/null
+++ b/sci-misc/gt-itm/gt-itm-19961004-r2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Routines to generate / analyze graphs using models for internetwork topology"
+HOMEPAGE="http://www.cc.gatech.edu/fac/Ellen.Zegura/graphs.html
+ http://www.isi.edu/nsnam/ns/ns-topogen.html#gt-itm"
+SRC_URI="http://www.cc.gatech.edu/fac/Ellen.Zegura/gt-itm/gt-itm.tar.gz
+ http://www.isi.edu/nsnam/dist/sgb2ns.tar.gz"
+
+LICENSE="all-rights-reserved sgb2ns"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="mirror bindist"
+IUSE="doc"
+
+DEPEND="dev-util/sgb"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+S2="${WORKDIR}/sgb2ns"
+
+PATCHES=( "${FILESDIR}"/${PN}-implicits.patch )
+DOCS=( README docs/. )
+
+src_unpack() {
+ unpack sgb2ns.tar.gz
+
+ mkdir "$S" || die
+ cd "$S" || die
+ unpack gt-itm.tar.gz
+}
+src_prepare() {
+ sed -ri -e '/^[[:alnum:]]+\.o:/d' \
+ -e 's|LIBS = -lm -lgb.*|LIBS = -lm -lgb|' \
+ -e 's/\$\(CC\)/& \$\(LDFLAGS\)/g' \
+ src/Makefile || die
+ sed -ri -e '/^SYS = -DSYSV/d' \
+ -e 's|LIBS = -lm -lgb.*|LIBS = -lm -lgb|' \
+ -e 's/\$\(CC\)/& \$\(LDFLAGS\)/g' \
+ "${S2}"/Makefile || die
+
+ rm -f lib/* || die
+
+ while IFS="" read -d $'\0' -r file; do
+ sed -i -re 's|(\.\./)+bin/||g' "$file" || die
+ done < <(find sample-graphs/ -perm /a+x -type f -name 'Run*' -print0)
+
+ sed -i -e 's|sys/types.h|sys/param.h|' src/geog.c || die
+ sed -i -e '162 s/connected $/connected \\/' src/eval.c || die
+
+ # fix implicit function declarations
+ sed -i -e '/stdio.h/ a\#include <stdlib.h>' \
+ "${S2}/sgb2comns.c" "${S2}/sgb2hierns.c" || die
+ sed -i -e "s/<strings.h>/<string.h>/g" "${S2}/sgb2hierns.c" || die
+ default
+}
+
+src_compile() {
+ emake -C src CFLAGS="${CFLAGS} -I../include" LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)"
+
+ emake -C "${S2}" CFLAGS="${CFLAGS} -I\$(IDIR) -L\$(LDIR)" LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin bin/*
+ einstalldocs
+ newdoc "${S2}"/README README.sgb2ns
+ if use doc; then
+ dodoc -r sample-graphs
+ dodoc "${S2}"/*.{tcl,gb}
+ docompress -x "/usr/share/doc/${PF}/sample-graphs"
+ fi
+}
diff --git a/sci-misc/gt-itm/metadata.xml b/sci-misc/gt-itm/metadata.xml
new file mode 100644
index 000000000000..0c6991d7902b
--- /dev/null
+++ b/sci-misc/gt-itm/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+</maintainer>
+</pkgmetadata>