diff options
author | Kacper Kowalik <xarthisius@gentoo.org> | 2010-10-12 15:32:45 +0000 |
---|---|---|
committer | Kacper Kowalik <xarthisius@gentoo.org> | 2010-10-12 15:32:45 +0000 |
commit | 9ff3b8e356fd3594173a2518c03845d6ab039728 (patch) | |
tree | 421dceb586a4f9597dc59de3a3cf7b1027901105 | |
parent | ia64/s390/sparc stable wrt #320733 (diff) | |
download | gentoo-2-9ff3b8e356fd3594173a2518c03845d6ab039728.tar.gz gentoo-2-9ff3b8e356fd3594173a2518c03845d6ab039728.tar.bz2 gentoo-2-9ff3b8e356fd3594173a2518c03845d6ab039728.zip |
Respect LDFLAGS wrt bug 339742. Thanks to Diego for the report. Respect CC, fix implicits, add missing dies. Drop old. Add explicit RDEPEND. Shorten description.
(Portage version: 2.2_rc90/cvs/Linux x86_64)
-rw-r--r-- | sci-misc/gt-itm/ChangeLog | 13 | ||||
-rw-r--r-- | sci-misc/gt-itm/files/gt-itm-implicits.patch | 111 | ||||
-rw-r--r-- | sci-misc/gt-itm/gt-itm-19961004-r1.ebuild | 75 | ||||
-rw-r--r-- | sci-misc/gt-itm/gt-itm-19961004.ebuild | 56 |
4 files changed, 197 insertions, 58 deletions
diff --git a/sci-misc/gt-itm/ChangeLog b/sci-misc/gt-itm/ChangeLog index 2fef47c78957..eb6fce878d6d 100644 --- a/sci-misc/gt-itm/ChangeLog +++ b/sci-misc/gt-itm/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sci-misc/gt-itm -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-misc/gt-itm/ChangeLog,v 1.5 2009/09/28 22:00:09 robbat2 Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-misc/gt-itm/ChangeLog,v 1.6 2010/10/12 15:32:45 xarthisius Exp $ + +*gt-itm-19961004-r1 (12 Oct 2010) + + 12 Oct 2010; Kacper Kowalik <xarthisius@gentoo.org> + -gt-itm-19961004.ebuild, +gt-itm-19961004-r1.ebuild, + +files/gt-itm-implicits.patch: + Respect LDFLAGS wrt bug 339742. Thanks to Diego for the report. Respect + CC, fix implicits, add missing dies. Drop old. Add explicit RDEPEND. + Shorten description. 28 Sep 2009; Robin H. Johnson <robbat2@gentoo.org> gt-itm-19961004.ebuild: Fixup to more modern standards, and confirmed to build against amd64 as 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..5597b3641750 --- /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: gt-itm-implicits.patch,v 1.1 2010/10/12 15:32:45 xarthisius Exp $"; + ++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-r1.ebuild b/sci-misc/gt-itm/gt-itm-19961004-r1.ebuild new file mode 100644 index 000000000000..316d164f3f42 --- /dev/null +++ b/sci-misc/gt-itm/gt-itm-19961004-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-misc/gt-itm/gt-itm-19961004-r1.ebuild,v 1.1 2010/10/12 15:32:45 xarthisius Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="Routines to generate and analyze graphs using different 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="as-is BSD" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="dev-util/sgb" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}" +S2="${WORKDIR}/sgb2ns" + +src_unpack() { + unpack sgb2ns.tar.gz + + mkdir "${S}" + cd "${S}" + unpack gt-itm.tar.gz + + sed -r -e '/^[[:alnum:]]+\.o:/d' \ + -e 's|LIBS = -lm -lgb.*|LIBS = -lm -lgb|' \ + -e 's/\$\(CC\)/& \$\(LDFLAGS\)/g' \ + -i "${S}"/src/Makefile || die + sed -r -e '/^SYS = -DSYSV/d' \ + -e 's|LIBS = -lm -lgb.*|LIBS = -lm -lgb|' \ + -e 's/\$\(CC\)/& \$\(LDFLAGS\)/g' \ + -i ${S2}/Makefile || die + + rm -f "${S}"/lib/* + + find "${S}"/sample-graphs/ -perm +111 -type f -name 'Run*' \ + | xargs -r -n1 sed -re 's|(\.\./)+bin/||g' -i || die + + sed -e 's|sys/types.h|sys/param.h|' -i "${S}"/src/geog.c || die + sed -e '162 s/connected $/connected \\/' -i "${S}"/src/eval.c || die + + # fix implicit function declarations + sed -e '/stdio.h/ a\#include <stdlib.h>' \ + -i "${S2}/sgb2comns.c" "${S2}/sgb2hierns.c" || die + sed -e "s/<strings.h>/<string.h>/g" \ + -i "${S2}/sgb2hierns.c" || die + epatch "${FILESDIR}"/${PN}-implicits.patch +} + +src_compile() { + cd "${S}"/src + emake CFLAGS="${CFLAGS} -I../include" LDFLAGS="${LDFLAGS}" \ + CC="$(tc-getCC)" || die + + cd "${S2}" + emake CFLAGS="${CFLAGS} -I\$(IDIR) -L\$(LDIR)" LDFLAGS="${LDFLAGS}" \ + CC="$(tc-getCC)" || die +} + +src_install() { + dobin "${S}"/bin/* || die + dodoc "${S}"/README "${S}"/docs/* || die + cp -pPR "${S}"/sample-graphs "${D}"/usr/share/doc/${PF} || die + + cd "${S2}" + dodoc *.tcl *.gb || die + newdoc README README.sgb2ns || die + +} diff --git a/sci-misc/gt-itm/gt-itm-19961004.ebuild b/sci-misc/gt-itm/gt-itm-19961004.ebuild deleted file mode 100644 index 29db9fffb1c5..000000000000 --- a/sci-misc/gt-itm/gt-itm-19961004.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-misc/gt-itm/gt-itm-19961004.ebuild,v 1.3 2009/09/28 22:00:09 robbat2 Exp $ - -DESCRIPTION="A collection of routines to generate and analyze graphs using a wide variety of 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="as-is BSD" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="" - -DEPEND="dev-util/sgb" -S="${WORKDIR}/${PN}" -S2="${WORKDIR}/sgb2ns" - -src_unpack() { - unpack sgb2ns.tar.gz - - mkdir "${S}" - cd "${S}" - unpack gt-itm.tar.gz - - sed -r -e '/^[[:alnum:]]+\.o:/d' -e 's|LIBS = -lm -lgb.*|LIBS = -lm -lgb|' -i "${S}"/src/Makefile - sed -r -e '/^SYS = -DSYSV/d' -e 's|LIBS = -lm -lgb.*|LIBS = -lm -lgb|' -i ${S2}/Makefile || die - - rm -f "${S}"/lib/* - - find "${S}"/sample-graphs/ -perm +111 -type f -name 'Run*' \ - | xargs -r -n1 sed -re 's|(\.\./)+bin/||g' -i || die - - sed -e 's|sys/types.h|sys/param.h|' -i "${S}"/src/geog.c - sed -e '162 s/connected $/connected \\/' -i "${S}"/src/eval.c -} - -src_compile() { - cd "${S}"/src - emake CFLAGS="${CFLAGS} -I../include" || die - - cd "${S2}" - emake CFLAGS="${CFLAGS} -I\$(IDIR) -L\$(LDIR)" || die -} - -src_install() { - dobin "${S}"/bin/* - dodoc "${S}"/README "${S}"/docs/* - cp -pPR "${S}"/sample-graphs "${D}"/usr/share/doc/${PF} - - cd "${S2}" - dodoc *.tcl *.gb - newdoc README README.sgb2ns - -} |