summaryrefslogtreecommitdiff
path: root/sci-misc/gt-itm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-24 21:52:37 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-24 21:52:37 +0100
commit7ae4e1d32a98b596d483a19ed94a21b560eb595d (patch)
tree1c68a1258f5017984a7878d5e913d95d72544f59 /sci-misc/gt-itm
parent145ac95c683ecda55a9b2cafc84dced2e9c29e03 (diff)
gentoo auto-resync : 24:10:2022 - 21:52:37
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-19961004-Fix-build-with-Clang-16.patch326
-rw-r--r--sci-misc/gt-itm/files/gt-itm-19961004-Fix-musl-build.patch69
-rw-r--r--sci-misc/gt-itm/files/gt-itm-19961004-gentoo.patch201
-rw-r--r--sci-misc/gt-itm/files/gt-itm-implicits.patch28
-rw-r--r--sci-misc/gt-itm/gt-itm-19961004-r3.ebuild (renamed from sci-misc/gt-itm/gt-itm-19961004-r2.ebuild)45
6 files changed, 633 insertions, 43 deletions
diff --git a/sci-misc/gt-itm/Manifest b/sci-misc/gt-itm/Manifest
index 4c256aa734d3..b14c07897d02 100644
--- a/sci-misc/gt-itm/Manifest
+++ b/sci-misc/gt-itm/Manifest
@@ -1,5 +1,8 @@
-AUX gt-itm-implicits.patch 2731 BLAKE2B b8aaea5e6016d9c3e6badc3a5f02f83188830bbe79501183dbfea9453d3af51479d46e83a7053eb86241a203c3a808f8e9a0d78cb350c01eb9d6c6483be4bc91 SHA512 64dc41be9d914e1df68780576300c54aa8091862b37ae44b5530312b8eaafbda76d97021f62544bce7c57e447959eea5a83c72074a714b4894bf4fddc79b5fe7
+AUX gt-itm-19961004-Fix-build-with-Clang-16.patch 7513 BLAKE2B 9b4be914570a254041be29b123c5d9300eec49d4cf374f3206d310af373b6344f7eb26cee593f4cdc92b2c611ccd7edb0fdd1eb14acb4f60b2b9e9c2985d58e9 SHA512 37f8d381a0a0df4f55d13e4670d01c461883966ab1b2398b5232fc409e3e199515749731e13d70b1f67dbd60cf218bc129cadb388176a7b045ec34c28c21d695
+AUX gt-itm-19961004-Fix-musl-build.patch 1980 BLAKE2B 9ffa9c0f0153bd085a4d79512b4be4348571c4e8251e8e04e686d7d9b32e86e1160786922d53ae1fff3bf32daf1637e3b7512b7c2f6855f35258355d93e5e6aa SHA512 6b9f15bf1d475f60c8fb163a9f4bd6f5f0ec285e26f1ecaec55a8564aea0058b3a33115f8bb237faa72412d17702f3c9f7e98338cb96fa789cdbbb1dde9d89c6
+AUX gt-itm-19961004-gentoo.patch 4963 BLAKE2B 868fe349939591b7632ee1162a98d40bf1aa98e759f56660a8b685a8ff05b94a0ab7c368145ad1f8fdb003fc367dba3b9feec28b1ec8280aa2f40281d0f87cc1 SHA512 da4ee372c6337169539a63d3d6d3975c7847af44dcf6f57fee2e6e5c71c541f7239146b8f27a044168c83cf5b0f8d84e8efa94afadcdf9c1674fc2ca964ce4c3
+AUX gt-itm-implicits.patch 2687 BLAKE2B 8c86224a94152919c18d6743dd8049c6b8261f816459e3fd218fbd268bfb5245031737f2741880639c4d714c2cd606d32160bc8836a12153742d8583bbfb6dc6 SHA512 4a47a552efadb6dfaf1d5f7030c51c8cb94793cd8cd0fc0e80bb79c71ab60db501e06cb01247b1ec35c61af66199671f2a5e65d501a78c0bcc3eb7acc5de6dca
DIST gt-itm-19961004.tar.gz 623345 BLAKE2B e9cf712d6a4411cbb66faf9bbd803bb3753ebbbd05174c02581c9b606e02f1c7132b0b96f483e3f273a28aebd64a8ede046de7397ddb9606efccad59ba137524 SHA512 e775ac475d40fc753a27fb619f262d701818190fa3be90d587f95e215610918b56b9d67783d4e7e2f55d0064e5b2d2ce911042353b29bce1e4dbcf407ff9fabc
DIST sgb2ns-19961004.tar.gz 50635 BLAKE2B b669d9def20c7e149de33072467183190f85b7fb30662cad83c53c1d9317532a1bd95174498eebd13b98eccf2ac693159793a40b667cdc97a6f15fbd027e0975 SHA512 77ec6fdad61f43bf078851852aa03dfea02df235a78853e477dacc8e2b94c0d8bda9772fc00d18fdaeabc419b2780c016b7a64a1a06ac0be2c8c2aa6608c06cf
-EBUILD gt-itm-19961004-r2.ebuild 2122 BLAKE2B b61ca4dfe47cdf2aea1f16ff6f1dba4a675df22fac8dd8c64591416353df63b97a77c244045949b4108930ff29d0c24ee33ff9559eda2307293f430c9abb9689 SHA512 ff636d79efa007527027e5edae75610ce26e436f3ac1a0bb0c2df03a8c5770bd5ef70e1036d0c8f8a10e457dee89eaf9e5e5d83874baa08ea2c3af86daae4bdd
+EBUILD gt-itm-19961004-r3.ebuild 1586 BLAKE2B 2f142c67389bfe0d82ee882b6e402a8449b16c71452cd1ad60d2e9253e46d530a009070855bd647693f37f882c4908ac514f7ee80011410e2747d26f414d2129 SHA512 b855b16c1ca7c7290dff67403bfd93d4c2913db31a25cd6f439ecb35871bf6c84044cb36cf431dea6c889c7691d7071da410866092383de41a64a4d41b7902ce
MISC metadata.xml 250 BLAKE2B 53ce4a2ec047c91819ecc665bad106707e80e4fbd9bd20cca22843c536beea3d124922de22b9c7986e39d232fb8b1f4752d4c8ee09933fe16383b475db861126 SHA512 667b310c205f016e11407f3e3fb0ad6fb1e530651b32da15e034523b0138e5fdf93b29d64311146bfdfa5bc5108f75e238136641f366e1e0b01e995ddae36aa5
diff --git a/sci-misc/gt-itm/files/gt-itm-19961004-Fix-build-with-Clang-16.patch b/sci-misc/gt-itm/files/gt-itm-19961004-Fix-build-with-Clang-16.patch
new file mode 100644
index 000000000000..e13a035e1950
--- /dev/null
+++ b/sci-misc/gt-itm/files/gt-itm-19961004-Fix-build-with-Clang-16.patch
@@ -0,0 +1,326 @@
+From 960d73fb2149340e39acc23741ede9dee52b8778 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 24 Oct 2022 18:47:48 +0100
+Subject: [PATCH 1/2] Fix build with Clang 16
+
+Bug: https://bugs.gentoo.org/741582
+--- a/gt-itm/src/dfs.c
++++ b/gt-itm/src/dfs.c
+@@ -23,7 +23,7 @@ int dfs(Graph *G,int n,u_char *vis);
+
+ /* check connectivity of graph g */
+ /* uses depth-first search. */
+-isconnected(Graph *G)
++int isconnected(Graph *G)
+ {
+ u_char *vis;
+ Vertex *vp;
+--- a/gt-itm/src/edriver.c
++++ b/gt-itm/src/edriver.c
+@@ -51,9 +51,7 @@
+ } \
+ }\
+
+-main(argc,argv)
+- int argc;
+- char *argv[];
++int main(int argc, char **argv)
+ {
+ int i;
+ int min, max, sum, bins, *ddist;
+@@ -63,14 +61,14 @@ main(argc,argv)
+ char outfile[MAXF];
+ char *dstr = "-nd";
+ int plen, idx;
+- FILE *ddf, *evf, *pdf, *fp, *fopen();
++ FILE *ddf, *evf, *pdf, *fp;
+ int prdist = 1;
+ enum Field f0, f1;
+ int first = 1;
+
+ if (argc == 1) {
+ printf("Usage: edriver <filestem> [-nd] [-<f0><f1>]*\n\n");
+- return;
++ return 1;
+ }
+ /* determine whether to print distributions */
+ /* determine where in argv the field pairs begin */
+--- a/gt-itm/src/eval.c
++++ b/gt-itm/src/eval.c
+@@ -201,10 +201,7 @@ int bicomp(Graph *g,int verbose)
+ }
+
+
+-void twofield_sptree(g,u,f0,f1)
+-Graph*g;
+-Vertex*u;
+-enum Field f0,f1;
++void twofield_sptree(Graph *g, Vertex *u, enum Field f0, enum Field f1)
+ {
+ Vertex *v, *t;
+ Arc *r;
+--- a/gt-itm/src/geog.c
++++ b/gt-itm/src/geog.c
+@@ -33,7 +33,7 @@
+ static char geogId[]="$Id: geog.c,v 1.1 1996/10/04 13:36:46 calvert Exp $";
+
+ long fdiam(Graph *g);
+-void die(s);
++void die(char* errstr);
+
+ double
+ distance(Vertex *u, Vertex *v)
+@@ -75,7 +75,7 @@ printparms(char *buf,geo_parms *pp)
+ void
+ randomize(long* a, long size, long mean, int iters)
+ {
+-register i,indx;
++int i,indx;
+
+ for (i=0; i<size; i++) /* initialize */
+ a[i] = mean;
+@@ -149,11 +149,11 @@ geo(long seed, geo_parms *pp)
+ {
+ double p,d,L,radius,r;
+ u_char *occ;
+-register int scale;
++int scale;
+ unsigned nbytes, index, x, y;
+ u_long units,pertrange;
+ int mallocd;
+-register i,j;
++int i,j;
+ Graph *G;
+ Vertex *up,*vp;
+ char namestr[128];
+@@ -319,7 +319,7 @@ int
+ edge_level(Vertex *u, Vertex *v, int nlev)
+ {
+ char ss[MAXNAMELEN], tt[MAXNAMELEN];
+-register char *s=ss, *t=tt, *b, *c;
++char *s=ss, *t=tt, *b, *c;
+
+ nlev -= 1;
+
+@@ -359,7 +359,7 @@ geo_hier(long seed,
+ Graph *newG, *tG, *GG, *srcG, *dstG;
+ long *numv; /* array of sizes of lower-level graphs */
+ geo_parms *curparms, workparms[MAXLEVEL];
+-register i,k,indx;
++int i,k,indx;
+ long dst;
+ int temp,total,lowsize,otherend,blen,level;
+ long maxP[MAXLEVEL], maxDiam[MAXLEVEL], wt[MAXLEVEL];
+@@ -614,7 +614,7 @@ char vnamestr[MAXNAMELEN];
+ */
+ {
+ char buf[ID_FIELD_SIZE+1];
+- register char *cp;
++ char *cp;
+ int len, nextlen, left;
+
+ strcpy(tG->util_types,GEO_UTIL); /* same for all geo graphs, */
+--- a/gt-itm/src/itm.c
++++ b/gt-itm/src/itm.c
+@@ -56,7 +56,7 @@
+ char *delim = " \t\n", *nonestr = "<none>";
+ static char errstr[256];
+
+-void die(s);
++void die(char* errstr);
+
+ char *
+ get_geoparms(FILE * f, geo_parms * pp)
+@@ -298,7 +298,7 @@ geo_parms parmsbuf[MAXLEVEL]; /* make sure MAXLEVEL >= 3 */
+ return NULL;
+ }
+
+-main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ FILE *infile;
+ char *rv;
+@@ -306,7 +306,7 @@ main(int argc, char **argv)
+
+ if (argc == 1) {
+ printf("itm <spec-file0> <spec-file1> ....\n\n");
+- return;
++ return 1;
+ }
+ while (--argc) {
+
+--- a/gt-itm/src/sgb2alt.c
++++ b/gt-itm/src/sgb2alt.c
+@@ -24,7 +24,7 @@
+ #include "gb_save.h"
+ #include "geog.h"
+
+-main(argc,argv)
++int main(argc,argv)
+ int argc;
+ char *argv[];
+ {
+@@ -36,14 +36,14 @@ main(argc,argv)
+
+ if (argc != 3) {
+ printf("sgb2old <sgfile> <altfile>\n\n");
+- return;
++ return 1;
+ }
+ fout = fopen(argv[2],"w");
+
+ g = restore_graph(argv[1]);
+ if (g == NULL) {
+ printf("%s does not contain a correct SGB graph\n",argv[1]);
+- return;
++ return 1;
+ }
+
+ fprintf(fout,"GRAPH (#nodes #edges id uu vv ww xx yy zz):\n");
+--- a/gt-itm/src/ts.c
++++ b/gt-itm/src/ts.c
+@@ -76,7 +76,7 @@ int stubs_OK(Vertex *snp0,Vertex *snp1);
+ long
+ fdiam(Graph *g)
+ {
+-register i,j,k;
++int i,j,k;
+ long **dist, **ldist;
+ int changed,mallocd;
+ long diam, ldiam, newdist = 0, otherend;
+@@ -174,7 +174,7 @@ Arc *a;
+ } /* fdiam */
+
+ void
+-die(s)
++die(char* s)
+ {
+ fprintf(stderr,"Fatal error %s\n",s);
+ exit(1);
+@@ -187,7 +187,7 @@ exit(1);
+ void
+ copyedges(Graph *fromG, Graph *toG, long base)
+ {
+-register i, indx;
++int i, indx;
+ Vertex *np, *vp, *basep;
+ Arc *ap;
+
+@@ -245,7 +245,7 @@ long i,j,k;
+ long indx, diam, totalnodes, base, dom;
+ char dnodename[ID_FIELD_SIZE], snodename[ID_FIELD_SIZE];
+ int dnamelen, numtries=0;
+-register Vertex *v,*dnp, *snp, /* domain node and stub node pointers */
++Vertex *v,*dnp, *snp, /* domain node and stub node pointers */
+ *ddnp, *fp, *tp, *tmp;
+
+ Arc *a;
+--- a/gt-itm/src/sgb2alt.c
++++ b/gt-itm/src/sgb2alt.c
+@@ -32,7 +32,7 @@ int main(argc,argv)
+ Vertex *v;
+ Arc *a;
+ Graph *g;
+- FILE *fopen(), *fout;
++ FILE *fout;
+
+ if (argc != 3) {
+ printf("sgb2old <sgfile> <altfile>\n\n");
+--- a/sgb2ns/sgb2comns.c
++++ b/sgb2ns/sgb2comns.c
+@@ -80,9 +80,7 @@ void print_flat_nodes(FILE *fout, Graph *g);
+ void print_edges(FILE *fout, Graph *g);
+ void print_hdr(FILE *fout, Graph *g);
+
+-main(argc,argv)
+- int argc;
+- char *argv[];
++int main(int argc, char *argv[])
+ {
+
+ int hier_flag=0;
+@@ -102,7 +100,7 @@ main(argc,argv)
+ g = restore_graph(argv[1]);
+ if (g == NULL) {
+ printf("%s does not contain a correct SGB graph\n",argv[1]);
+- return;
++ return 1;
+ }
+
+ if (hier_flag)
+--- a/sgb2ns/sgb2hierns.c
++++ b/sgb2ns/sgb2hierns.c
+@@ -47,9 +47,7 @@
+ #define HUGE 655536
+
+
+-main(argc,argv)
+- int argc;
+- char *argv[];
++int main(int argc, char *argv[])
+ {
+
+ int i,
+@@ -89,7 +87,7 @@ main(argc,argv)
+ /* for the purpose of scenario generator, need to return a list of transits
+ & stubs and num of nodes in each - hence the optional third arg topofile */
+ printf("sgb2hierns <sgfile> <outfile> ?<topofile>?\n\n");
+- return;
++ return 1;
+ }
+
+ fout = fopen(argv[2],"w");
+@@ -101,7 +99,7 @@ main(argc,argv)
+ g = restore_graph(argv[1]);
+ if (g == NULL) {
+ printf("%s does not contain a correct SGB graph\n",argv[1]);
+- return;
++ return 1;
+ }
+
+ fprintf(fout,"# Generated by sgb2hier-ns,sgb2hier-ns generated from sgb2ns\n");
+--- a/sgb2ns/sgb2ns.c
++++ b/sgb2ns/sgb2ns.c
+@@ -41,27 +41,25 @@
+ #include "gb_save.h"
+ #include "geog.h"
+
+-main(argc,argv)
+- int argc;
+- char *argv[];
++int main(int argc,char *argv[])
+ {
+ int i, j, nlink;
+ Vertex *v;
+ Arc *a;
+ Graph *g;
+- FILE *fopen(), *fout;
++ FILE *fout;
+ char m[420];
+
+ if (argc != 3) {
+ printf("sgb2ns <sgfile> <nsfile>\n\n");
+- return;
++ return 1;
+ }
+ fout = fopen(argv[2],"w");
+
+ g = restore_graph(argv[1]);
+ if (g == NULL) {
+ printf("%s does not contain a correct SGB graph\n",argv[1]);
+- return;
++ return 1;
+ }
+
+ fprintf(fout, "# Generated by sgb2ns, created by Polly Huang\n");
+--- a/sgb2ns/ts2ns.c
++++ b/sgb2ns/ts2ns.c
+@@ -55,7 +55,7 @@ main(argc,argv)
+ Vertex *v;
+ Arc *a;
+ Graph *g;
+- FILE *fopen(), *fout;
++ FILE *fout;
+ char m[420], name[40];
+ int transits[HUGE];
+ int p,q, total_transits;
diff --git a/sci-misc/gt-itm/files/gt-itm-19961004-Fix-musl-build.patch b/sci-misc/gt-itm/files/gt-itm-19961004-Fix-musl-build.patch
new file mode 100644
index 000000000000..3826661bd9f1
--- /dev/null
+++ b/sci-misc/gt-itm/files/gt-itm-19961004-Fix-musl-build.patch
@@ -0,0 +1,69 @@
+From 15670744cc6a182cf0d2a4ed16748255ac1ff5c8 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 24 Oct 2022 18:48:48 +0100
+Subject: [PATCH 2/2] Fix musl build
+
+Bug: https://bugs.gentoo.org/832835
+--- a/gt-itm/src/dfs.c
++++ b/gt-itm/src/dfs.c
+@@ -19,22 +19,22 @@ static char dfsID[]="$Id: dfs.c,v 1.1 1996/10/04 13:36:32 calvert Exp $";
+
+ #define NBBY 8
+
+-int dfs(Graph *G,int n,u_char *vis);
++int dfs(Graph *G,int n,unsigned char *vis);
+
+ /* check connectivity of graph g */
+ /* uses depth-first search. */
+ int isconnected(Graph *G)
+ {
+-u_char *vis;
++unsigned char *vis;
+ Vertex *vp;
+ int i,nbytes;
+
+ nbytes = (G->n/NBBY)+ (G->n%NBBY?1:0);
+
+ if (nbytes < STACKMAX) { /* for small amounts we use stack frame */
+- vis = (u_char *) alloca(nbytes);
++ vis = (unsigned char *) alloca(nbytes);
+ } else {
+- vis = (u_char *) malloc(nbytes);
++ vis = (unsigned char *) malloc(nbytes);
+ }
+
+ for (i=0; i<nbytes; i++) vis[i]=0;
+@@ -54,7 +54,7 @@ int i,nbytes;
+ /* trivial depth-first search. */
+ /* Returns number of newly-visited nodes in subtree rooted at node n. */
+ int
+-dfs(Graph *G,int n,u_char *vis)
++dfs(Graph *G,int n,unsigned char *vis)
+ {
+ int nvis, i, nextn;
+ Vertex *vp;
+--- a/gt-itm/src/geog.c
++++ b/gt-itm/src/geog.c
+@@ -148,7 +148,7 @@ Graph *
+ geo(long seed, geo_parms *pp)
+ {
+ double p,d,L,radius,r;
+-u_char *occ;
++unsigned char *occ;
+ int scale;
+ unsigned nbytes, index, x, y;
+ u_long units,pertrange;
+@@ -189,10 +189,10 @@ char namestr[128];
+ nbytes = ((scale*scale)%NBBY ? (scale*scale/NBBY)+1 : (scale*scale)/NBBY);
+
+ if (nbytes < STACKMAX) { /* small amount - just do it in the stack */
+- occ = (u_char *) alloca(nbytes);
++ occ = (unsigned char *) alloca(nbytes);
+ mallocd = 0;
+ } else {
+- occ = (u_char *) malloc(nbytes);
++ occ = (unsigned char *) malloc(nbytes);
+ mallocd = 1;
+ }
+
+
diff --git a/sci-misc/gt-itm/files/gt-itm-19961004-gentoo.patch b/sci-misc/gt-itm/files/gt-itm-19961004-gentoo.patch
new file mode 100644
index 000000000000..12b8579ece95
--- /dev/null
+++ b/sci-misc/gt-itm/files/gt-itm-19961004-gentoo.patch
@@ -0,0 +1,201 @@
+--- a/gt-itm/sample-graphs/rand/r10/Runconvert
++++ b/gt-itm/sample-graphs/rand/r10/Runconvert
+@@ -1,5 +1,5 @@
+ #!/bin/csh
+
+ foreach i (0 1 2)
+- ../../../bin/sgb2alt r10-$i.gb r10-$i.alt
++ sgb2alt r10-$i.gb r10-$i.alt
+ end
+--- a/gt-itm/sample-graphs/rand/r10/Runeval
++++ b/gt-itm/sample-graphs/rand/r10/Runeval
+@@ -1,5 +1,5 @@
+ #!/bin/csh
+
+ foreach i (0 1 2)
+- ../../../bin/edriver r10-$i -nd -hh -ll -hl
++ edriver r10-$i -nd -hh -ll -hl
+ end
+--- a/gt-itm/sample-graphs/rand/r100/Runconvert
++++ b/gt-itm/sample-graphs/rand/r100/Runconvert
+@@ -1,5 +1,5 @@
+ #!/bin/csh
+
+ foreach i (0 1 2 3 4 5 6 7 8 9)
+- ../../../bin/sgb2alt r100-$i.gb r100-$i.alt
++ sgb2alt r100-$i.gb r100-$i.alt
+ end
+--- a/gt-itm/sample-graphs/rand/r100/Runeval
++++ b/gt-itm/sample-graphs/rand/r100/Runeval
+@@ -1,5 +1,5 @@
+ #!/bin/csh
+
+ foreach i (0 1 2 3 4 5 6 7 8 9)
+- ../../../bin/edriver r100-$i -nd -hh -ll -hl
++ edriver r100-$i -nd -hh -ll -hl
+ end
+--- a/gt-itm/sample-graphs/ts/ts100/Runconvert
++++ b/gt-itm/sample-graphs/ts/ts100/Runconvert
+@@ -1,5 +1,5 @@
+ #!/bin/csh
+
+ foreach i (0 1 2 3 4 5 6 7 8 9)
+- ../../bin/sgb2alt ts100-$i.gb ts100-$i.alt
++ sgb2alt ts100-$i.gb ts100-$i.alt
+ end
+--- a/gt-itm/sample-graphs/ts/ts100/Runeval
++++ b/gt-itm/sample-graphs/ts/ts100/Runeval
+@@ -1,5 +1,5 @@
+ #!/bin/csh
+
+ foreach i (0 1 2 3 4 5 6 7 8 9)
+- ../../../bin/edriver ts100-$i -nd -hh -ll -hl
++ edriver ts100-$i -nd -hh -ll -hl
+ end
+--- a/gt-itm/sample-graphs/ts/ts600/Runconvert
++++ b/gt-itm/sample-graphs/ts/ts600/Runconvert
+@@ -1,5 +1,5 @@
+ #!/bin/csh
+
+ foreach i (0 1 2 3 4 5 6 7 8 9)
+- ../../bin/sgb2alt ts600-$i.gb ts600-$i.alt
++ sgb2alt ts600-$i.gb ts600-$i.alt
+ end
+--- a/gt-itm/sample-graphs/ts/ts600/Runeval
++++ b/gt-itm/sample-graphs/ts/ts600/Runeval
+@@ -1,5 +1,5 @@
+ #!/bin/csh
+
+ foreach i (0 1 2 3 4 5 6 7 8 9)
+- ../../../bin/edriver ts600-$i -nd -hh -ll -hl
++ edriver ts600-$i -nd -hh -ll -hl
+ end
+--- a/gt-itm/src/Makefile
++++ b/gt-itm/src/Makefile
+@@ -9,10 +9,10 @@
+ #
+ # For Solaris: uncomment the next two lines
+ #SYS = -DSYSV
+-#LIBS = -lm -lgb5
++#LIBS = -lm -lgb
+
+ # For SunOS: uncomment the next line
+-LIBS = -lm -lgb4
++LIBS = -lm -lgb
+
+
+ IDIR = ../include
+@@ -35,29 +35,22 @@ EH = $(IDIR)/gb_graph.h $(IDIR)/gb_save.h $(IDIR)/gb_dijk.h \
+ all: itm sgb2alt edriver
+
+ itm: $(GO)
+- $(CC) $(CFLAGS) -o $(BDIR)/itm $(GO) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $(BDIR)/itm $(GO) $(LIBS)
+
+-itm.o: $(GH)
+
+-geog.o: $(GH)
+
+-ts.o: $(GH)
+
+-dfs.o: $(GH)
+
+
+ sgb2alt: $(CO)
+- $(CC) $(CFLAGS) -o $(BDIR)/sgb2alt $(CO) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $(BDIR)/sgb2alt $(CO) $(LIBS)
+
+-sgb2alt.o: $(CH)
+
+
+ edriver: $(EO)
+- $(CC) $(CFLAGS) -o $(BDIR)/edriver $(EO) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $(BDIR)/edriver $(EO) $(LIBS)
+
+-edriver.o: $(EH)
+
+-eval.o: $(IDIR)/gb_graph.h $(IDIR)/gb_dijk.h $(IDIR)/eval.h
+
+
+ clean:
+--- a/gt-itm/src/eval.c
++++ b/gt-itm/src/eval.c
+@@ -159,7 +159,7 @@ int bicomp(Graph *g,int verbose)
+ if (u == &dummy) {
+ if (verbose) {
+ if (artic_pt)
+- printf(" and %d (this ends a connected
++ printf(" and %d (this ends a connected \
+ component of the graph)\n", idx(g, artic_pt));
+ else
+ printf("Isolated vertex %d\n", idx(g, v));
+--- a/gt-itm/src/geog.c
++++ b/gt-itm/src/geog.c
+@@ -6,7 +6,7 @@
+ */
+
+ #include <stdio.h>
+-#include <sys/types.h> /* for NBBY */
++#include <sys/param.h> /* for NBBY */
+ #include <alloca.h>
+ #include <assert.h>
+ #include <string.h> /* for strchr() */
+--- a/sgb2ns/Makefile
++++ b/sgb2ns/Makefile
+@@ -8,11 +8,10 @@
+ # uncomment the two Solaris lines below, and comment the SunOS line.
+ #
+ # For Solaris: uncomment the next two lines
+-SYS = -DSYSV
+-LIBS = -lm -lgb5
++LIBS = -lm -lgb
+
+ # For SunOS: uncomment the next line
+-#LIBS = -lm -lgb4
++#LIBS = -lm -lgb
+
+ GT_ITM = ../gt-itm
+ IDIR = $(GT_ITM)/include
+@@ -33,16 +32,16 @@ CH = $(IDIR)/geog.h $(IDIR)/gb_graph.h $(IDIR)/gb_save.h
+ all: sgb2comns sgb2hierns sgb2ns ts2ns
+
+ sgb2ns: $(CN)
+- $(CC) $(CFLAGS) -o $(BDIR)/sgb2ns $(CN) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $(BDIR)/sgb2ns $(CN) $(LIBS)
+
+ ts2ns: $(CN)
+- $(CC) $(CFLAGS) -o $(BDIR)/ts2ns $(CN) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $(BDIR)/ts2ns $(CN) $(LIBS)
+
+ sgb2hierns: $(HN)
+- $(CC) $(CFLAGS) -o $(BDIR)/sgb2hierns $(HN) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $(BDIR)/sgb2hierns $(HN) $(LIBS)
+
+ sgb2comns: $(COM)
+- $(CC) $(CFLAGS) -o $(BDIR)/sgb2comns $(COM) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $(BDIR)/sgb2comns $(COM) $(LIBS)
+
+ sgb2ns.o: $(CH)
+ sgb2hierns.o: $(CH)
+--- a/sgb2ns/sgb2comns.c
++++ b/sgb2ns/sgb2comns.c
+@@ -49,6 +49,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <strings.h>
+ #include <string.h>
+ #include "gb_graph.h"
+--- a/sgb2ns/sgb2hierns.c
++++ b/sgb2ns/sgb2hierns.c
+@@ -34,7 +34,8 @@
+ */
+
+ #include <stdio.h>
+-#include <strings.h>
++#include <stdlib.h>
++#include <string.h>
+ #include "gb_graph.h"
+ #include "gb_save.h"
+ #include "geog.h"
diff --git a/sci-misc/gt-itm/files/gt-itm-implicits.patch b/sci-misc/gt-itm/files/gt-itm-implicits.patch
index 7618354469ff..70da0f568c65 100644
--- a/sci-misc/gt-itm/files/gt-itm-implicits.patch
+++ b/sci-misc/gt-itm/files/gt-itm-implicits.patch
@@ -1,5 +1,5 @@
---- gt-itm/src/geog.c
-+++ gt-itm/src/geog.c
+--- a/gt-itm/src/geog.c
++++ b/gt-itm/src/geog.c
@@ -6,6 +6,7 @@
*/
@@ -18,8 +18,8 @@
double
distance(Vertex *u, Vertex *v)
{
---- gt-itm/src/ts.c
-+++ gt-itm/src/ts.c
+--- a/gt-itm/src/ts.c
++++ b/gt-itm/src/ts.c
@@ -8,6 +8,7 @@
*/
@@ -39,8 +39,8 @@
/* 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
+--- a/gt-itm/include/geog.h
++++ b/gt-itm/include/geog.h
@@ -74,3 +74,8 @@
geo_parms* toppp, /* params for transit connectivity */
geo_parms* transpp, /* " " transit domains */
@@ -50,8 +50,8 @@
+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
+--- a/gt-itm/src/edriver.c
++++ b/gt-itm/src/edriver.c
@@ -35,6 +35,8 @@
*/
@@ -61,8 +61,8 @@
#include "gb_graph.h"
#include "gb_save.h"
#include "gb_dijk.h"
---- gt-itm/include/eval.h
-+++ gt-itm/include/eval.h
+--- a/gt-itm/include/eval.h
++++ b/gt-itm/include/eval.h
@@ -8,4 +8,7 @@
enum Field {Len, A, B, Hops};
@@ -72,8 +72,8 @@
+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
+--- a/gt-itm/src/dfs.c
++++ b/gt-itm/src/dfs.c
@@ -6,6 +6,7 @@
*/
@@ -91,8 +91,8 @@
/* 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
+--- a/gt-itm/src/itm.c.orig
++++ b/gt-itm/src/itm.c
@@ -42,6 +42,7 @@
#include <stdlib.h> /* for calloc(),atoi(),etc. */
#include <string.h> /* for strtok() */
diff --git a/sci-misc/gt-itm/gt-itm-19961004-r2.ebuild b/sci-misc/gt-itm/gt-itm-19961004-r3.ebuild
index 295139f5bfc9..fb3284587034 100644
--- a/sci-misc/gt-itm/gt-itm-19961004-r2.ebuild
+++ b/sci-misc/gt-itm/gt-itm-19961004-r3.ebuild
@@ -1,15 +1,17 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
-inherit toolchain-funcs
+inherit flag-o-matic 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 -> ${P}.tar.gz
http://www.isi.edu/nsnam/dist/sgb2ns.tar.gz -> sgb2ns-${PV}.tar.gz"
+S="${WORKDIR}/${PN}"
+S2="${WORKDIR}/sgb2ns"
LICENSE="all-rights-reserved sgb2ns"
SLOT="0"
@@ -20,10 +22,13 @@ IUSE="doc"
DEPEND="dev-util/sgb"
RDEPEND="${DEPEND}"
-S="${WORKDIR}/${PN}"
-S2="${WORKDIR}/sgb2ns"
+PATCHES=(
+ "${FILESDIR}"/${PN}-19961004-gentoo.patch
+ "${FILESDIR}"/${PN}-implicits.patch
+ "${FILESDIR}"/${PN}-19961004-Fix-build-with-Clang-16.patch
+ "${FILESDIR}"/${PN}-19961004-Fix-musl-build.patch
+)
-PATCHES=( "${FILESDIR}"/${PN}-implicits.patch )
DOCS=( README docs/. )
src_unpack() {
@@ -35,32 +40,16 @@ src_unpack() {
}
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
+ cd "${WORKDIR}" || die
default
+ cd "${S}" || die
}
src_compile() {
+ append-cflags -std=gnu89
+
emake -C src CFLAGS="${CFLAGS} -I../include" LDFLAGS="${LDFLAGS}" \
CC="$(tc-getCC)"
@@ -70,11 +59,13 @@ src_compile() {
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"
+ docompress -x /usr/share/doc/${PF}/sample-graphs
fi
}