Revision: 98260 http://trac.macports.org//changeset/98260 Author: ryandesign@macports.org Date: 2012-09-30 22:38:09 -0700 (Sun, 30 Sep 2012) Log Message: ----------- jgraph: maintainer update to fix compilation with clang (#36397); update maintainer email address Modified Paths: -------------- trunk/dports/graphics/jgraph/Portfile trunk/dports/graphics/jgraph/files/patch-jgraph.h.diff trunk/dports/graphics/jgraph/files/patch-list.c.diff trunk/dports/graphics/jgraph/files/patch-makefile.diff trunk/dports/graphics/jgraph/files/patch-token.c.diff Modified: trunk/dports/graphics/jgraph/Portfile =================================================================== --- trunk/dports/graphics/jgraph/Portfile 2012-10-01 05:34:33 UTC (rev 98259) +++ trunk/dports/graphics/jgraph/Portfile 2012-10-01 05:38:09 UTC (rev 98260) @@ -10,7 +10,7 @@ license GPL homepage \ http://www.cs.utk.edu/~plank/plank/jgraph/jgraph.html -maintainers cs.ucsd.edu:s +maintainers pahtak.org:s description A Filter for Plotting Graphs in PostScript long_description Jgraph is a program that takes the description \ a graph or graphs as input, and produces a \ @@ -29,10 +29,20 @@ rmd160 b575acd5fa8f99c8433e81128619a7247881c306 supported_archs ppc i386 -patchfiles patch-jgraph.h.diff \ +patchfiles patch-draw.c.diff \ + patch-edit.c.diff \ + patch-jgraph.c.diff \ + patch-jgraph.h.diff \ patch-list.c.diff \ + patch-list.h.diff \ patch-makefile.diff \ + patch-printline.c.diff \ + patch-prio_list.c.diff \ + patch-prio_list.h.diff \ + patch-process.c.diff \ + patch-show.c.diff \ patch-token.c.diff + post-patch { reinplace s|@@CC@@|${configure.cc}| ${worksrcpath}/makefile } Modified: trunk/dports/graphics/jgraph/files/patch-jgraph.h.diff =================================================================== --- trunk/dports/graphics/jgraph/files/patch-jgraph.h.diff 2012-10-01 05:34:33 UTC (rev 98259) +++ trunk/dports/graphics/jgraph/files/patch-jgraph.h.diff 2012-10-01 05:38:09 UTC (rev 98260) @@ -1,10 +1,92 @@ ---- jgraph.h.orig 2008-09-09 19:25:48.000000000 -0700 -+++ jgraph.h 2008-09-09 19:06:47.000000000 -0700 -@@ -9,6 +9,7 @@ - #include "prio_list.h" - #ifdef LCC - #include <stdlib.h> -+#include <string.h> - #endif +--- jgraph.h.orig 2012-10-01 00:08:42.000000000 -0400 ++++ jgraph.h 2012-10-01 00:04:09.000000000 -0400 +@@ -214,25 +214,27 @@ typedef struct graphs { + int page; + } *Graphs; - #define PPI 120 +-extern float ctop(); +-extern float disttop(); +-extern float intop(); +-extern float ptoc(); +-extern float ptodist(); +- +-extern char *getlabel(); +-extern char *getmultiline(); +- +-/* Stuff defined in jgraph.c */ +- +-extern Curve new_line(); +-extern Curve new_curve(); +-extern Curve get_curve(); +-extern Graph new_graph(); +-extern Graph get_graph(); +-extern String new_string(); +-extern String get_string(); +-extern Label new_label(); ++/* Defined in draw.c */ ++extern float ctop(float, Axis); ++extern float disttop(float, Axis); ++extern float intop(float); ++extern void draw_graphs(Graphs, int, int); ++extern void draw_axis(Axis, Axis); ++ ++/* Defined in edit.c */ ++extern void copy_label(Label, Label); ++extern void edit_graphs(Graphs); ++ ++/* Defined in jgraph.c */ ++extern void new_graphs(Graphs); ++extern Curve new_line(Curve, int); ++extern Curve new_curve(Curve, int); ++extern Curve get_curve(Curve, int); ++extern Graph new_graph(Graph, int); ++extern Graph get_graph(Graph, int); ++extern String new_string(String, int); ++extern String get_string(String, int); ++extern Label new_label(void); + extern char *MARKTYPESTRS[]; + extern char MARKTYPES[]; + extern int NMARKTYPES; +@@ -240,3 +242,42 @@ extern int NORMALMARKTYPES; + extern char *PATTERNS[]; + extern char PTYPES[]; + extern int NPATTERNS; ++ ++/* Defined in printline.c */ ++extern void gsave(void); ++extern void grestore(void); ++extern void setfont(char *, float); ++extern void setfill(float, float, char, float *, char, float); ++extern void setgray(char, float*); ++extern void print_ebar(float, float, float, float, char); ++extern void start_line(float, float, Curve); ++extern void cont_line(float, float); ++extern void end_line(void); ++extern void bezier_control(float, float); ++extern void bezier_end(float, float); ++extern void start_poly(float, float); ++extern void cont_poly(float, float); ++extern void end_poly(float, float, char, float *, char, float); ++extern void printellipse(float, float, float, float, char, float *, char, float); ++extern void set_comment(int); ++extern void comment(const char *); ++extern void print_label(Label); ++extern void setlinewidth(float); ++extern void setlinestyle(char, Flist); ++extern void printline(float, float, float, float, char); ++ ++/* Defined in process.c */ ++extern void process_graphs(Graphs); ++ ++/* Defined in show.c */ ++extern void show_graphs(Graphs); ++ ++/* Defined in token.c */ ++extern void set_input_file(const char *); ++extern void error_header(void); ++extern int getstring(char *); ++extern int getint(int *); ++extern int getfloat(float *); ++extern char *getmultiline(void); ++extern char *getlabel(void); ++extern void rejecttoken(void); Modified: trunk/dports/graphics/jgraph/files/patch-list.c.diff =================================================================== --- trunk/dports/graphics/jgraph/files/patch-list.c.diff 2012-10-01 05:34:33 UTC (rev 98259) +++ trunk/dports/graphics/jgraph/files/patch-list.c.diff 2012-10-01 05:38:09 UTC (rev 98260) @@ -1,5 +1,5 @@ ---- list.c.orig 2008-09-09 19:25:59.000000000 -0700 -+++ list.c 2008-09-09 19:07:37.000000000 -0700 +--- list.c.orig 2012-10-01 00:08:42.000000000 -0400 ++++ list.c 2012-09-30 22:25:24.000000000 -0400 @@ -6,6 +6,7 @@ */ @@ -8,3 +8,62 @@ #include "list.h" #define boolean int +@@ -32,10 +33,10 @@ typedef struct int_list { /* Informatio + List free_list; + } *Int_list; + +-insert(item, list) /* Inserts to the end of a list */ +-List item; +-List list; ++void insert(void *item_, void *list_) /* Inserts to the end of a list */ + { ++ List item = item_; ++ List list = list_; + List last_node; + + last_node = list->blink; +@@ -46,15 +47,14 @@ List list; + item->flink = list; + } + +-delete_item(item) /* Deletes an arbitrary iterm */ +-List item; ++void delete_item(void *item_) /* Deletes an arbitrary iterm */ + { ++ List item = item_; + item->flink->blink = item->blink; + item->blink->flink = item->flink; + } + +-List make_list(size) /* Creates a new list */ +-int size; ++List make_list(int size) /* Creates a new list */ + { + Int_list l; + +@@ -67,9 +67,9 @@ int size; + return (List) l; + } + +-List get_node(list) /* Allocates a node to be inserted into the list */ +-List list; ++List get_node(void *list_) /* Allocates a node to be inserted into the list */ + { ++ List list = list_; + Int_list l; + List to_return; + +@@ -83,10 +83,10 @@ List list; + } + } + +-free_node(node, list) /* Deallocates a node from the list */ +-List node; +-List list; ++void free_node(void *node_, void *list_) /* Deallocates a node from the list */ + { ++ List node = node_; ++ List list = list_; + Int_list l; + + l = (Int_list) list; Modified: trunk/dports/graphics/jgraph/files/patch-makefile.diff =================================================================== --- trunk/dports/graphics/jgraph/files/patch-makefile.diff 2012-10-01 05:34:33 UTC (rev 98259) +++ trunk/dports/graphics/jgraph/files/patch-makefile.diff 2012-10-01 05:38:09 UTC (rev 98260) @@ -1,11 +1,52 @@ ---- makefile.orig 2008-09-09 19:26:44.000000000 -0700 -+++ makefile 2008-09-09 19:08:06.000000000 -0700 -@@ -6,7 +6,7 @@ +--- makefile.orig 2012-10-01 00:08:42.000000000 -0400 ++++ makefile 2012-10-01 00:20:06.000000000 -0400 +@@ -6,7 +6,8 @@ # Also, before installing, you should change the string "JGRAPH_DIR" in # jgraph.1 to be the directory containing the example jgraphs. -CC = gcc -LCC -+CC = @@CC@@ -DLCC -O3 -m32 ++CC := @@CC@@ ++CFLAGS = -DLCC -O3 -Wall OBJS = draw.o \ edit.o \ +@@ -49,23 +50,22 @@ examples: $(EXAMPLES) + + .SUFFIXES: .c .o .h .jgr .jps .eps .tex .dvi + +-.jgr.jps: +- jgraph -P < $*.jgr > $*.jps ++%.jps: %.jgr ++ jgraph -P <$< >$@ + +-.jgr.eps: +- jgraph < $*.jgr > $*.eps +- +-.tex.dvi: +- latex $*.tex +-.c.o: +- $(CC) -c -g $*.c ++%.eps: %.jgr ++ jgraph <$< >$@ + ++%.dvi: %.tex ++ latex $* ++%.o: %.c ++ $(CC) -c -o $@ $(CFLAGS) $< + + jgraph: $(OBJS) +- $(CC) -g $(OBJS) -lm -o jgraph ++ $(CC) $(OBJS) -o $@ + + sin: sin.o +- cc -o sin sin.o -lm ++ $(CC) $^ -o $@ + + ad.jps: cube.eps disk.eps + bailey.jps: bailey.pts +@@ -93,4 +93,4 @@ process.o: process.c jgraph.h list.h pri + show.o: show.c jgraph.h list.h prio_list.h + token.o: token.c list.h + clean: +- rm -f *.o a.out *.jps ++ $(RM) *.o a.out *.jps jgraph Modified: trunk/dports/graphics/jgraph/files/patch-token.c.diff =================================================================== --- trunk/dports/graphics/jgraph/files/patch-token.c.diff 2012-10-01 05:34:33 UTC (rev 98259) +++ trunk/dports/graphics/jgraph/files/patch-token.c.diff 2012-10-01 05:38:09 UTC (rev 98260) @@ -1,10 +1,195 @@ ---- token.c.orig 2008-09-09 19:26:17.000000000 -0700 -+++ token.c 2008-09-09 19:07:18.000000000 -0700 -@@ -10,6 +10,7 @@ +--- token.c.orig 2012-10-01 00:08:42.000000000 -0400 ++++ token.c 2012-09-30 22:27:14.000000000 -0400 +@@ -7,6 +7,7 @@ + #include <math.h> + #include <stdio.h> ++#include <string.h> + #ifdef LCC #include <stdlib.h> -+#include <string.h> - #endif +@@ -35,7 +36,7 @@ typedef struct iostack { + static char INPUT[1000]; + static int getnew = 1; + static char oldchar = '\0'; +-static oldcharvalid = 0; ++static int oldcharvalid = 0; + static char pipe = 0; + static int eof = 0; + static int init = 0; +@@ -46,24 +47,22 @@ static FILE *IOSTREAM; + static char FILENAME[300]; + static int line = 1; - #ifdef VMS ++static int getsystemstring(void); ++ + #ifdef VMS + /* On VMS, there are no popen() and pclose(), so we provide dummies here. */ +-FILE *popen(command, type) +-char *command, *type; ++FILE *popen(const char *command, const char *type) + { + return(NULL); + } +-int pclose(stream) +-FILE *stream; ++int pclose(FILE *stream) + { + return(-1); + } + #endif /*VMS*/ + +-set_input_file(s) +-char *s; ++void set_input_file(const char *s) + { +- FILE *f; + Iostack n; + + if (init == 0) { +@@ -93,12 +92,12 @@ char *s; + } + } + +-error_header() ++void error_header() + { + fprintf(stderr, "%s,%d: ", FILENAME, line); + } + +-int gettokenchar() ++static int gettokenchar() + { + if (oldcharvalid == 0) oldchar = getc(IOSTREAM); + oldcharvalid = 0; +@@ -106,14 +105,13 @@ int gettokenchar() + return oldchar; + } + +-ungettokenchar() ++static void ungettokenchar() + { + oldcharvalid = 1; + if (oldchar == '\n') line--; + } + +-int gettoken(s) +-char *s; ++static int gettoken(char *s) + { + int i; + char c; +@@ -131,7 +129,7 @@ char *s; + return i; + } + +-get_comment() ++static void get_comment() + { + if (eof) return; + while (1) { +@@ -148,8 +146,7 @@ static int iostackempty() + return (first(stack) == nil(stack)); + } + +-static push_iostack(p) +-int p; ++static void push_iostack(int p) + { + Iostack n; + +@@ -177,7 +174,7 @@ int p; + strcpy(FILENAME, INPUT); + } + +-static pop_iostack() ++static void pop_iostack() + { + Iostack n; + +@@ -195,7 +192,7 @@ static pop_iostack() + if (n->stream == NULL) { + n->stream = fopen(n->filename, "r"); + if (n->stream == NULL) { +- fprintf(stderr, "Error: cannot open file \"%s\"\n", n->stream); ++ fprintf(stderr, "Error: cannot open file \"%s\"\n", n->filename); + exit(1); + } + } +@@ -210,7 +207,7 @@ static pop_iostack() + free_node(n, stack); + } + +-static nexttoken() ++static void nexttoken() + { + if (eof) return; + if (getnew) { +@@ -258,8 +255,7 @@ static nexttoken() + return; + } + +-int getstring(s) +-char *s; ++int getstring(char *s) + { + nexttoken(); + if (eof) return 0; +@@ -267,8 +263,7 @@ char *s; + return 1; + } + +-int getint(i) +-int *i; ++int getint(int *i) + { + int j; + +@@ -282,8 +277,7 @@ int *i; + return 1; + } + +-int getfloat(f) +-float *f; ++int getfloat(float *f) + { + int j; + +@@ -304,8 +298,7 @@ float *f; + } else return 1; + } + +-static char *new_printable_text(s) +-char *s; ++static char *new_printable_text(const char *s) + { + char *new_s; + int to_pad, i, j; +@@ -334,7 +327,7 @@ char *s; + char *getmultiline() + { + char c; +- int i, j, done, len, started; ++ int i, done, len, started; + char *out_str; + + if (getnew == 0) return CNULL; +@@ -374,9 +367,7 @@ char *getmultiline() + + char *getlabel() + { +- char c; + char *txt, *new; +- int i; + + txt = getmultiline(); + if (txt == CNULL) return CNULL; +@@ -415,7 +406,7 @@ int getsystemstring() + return 1; + } + +-rejecttoken() ++void rejecttoken() + { + getnew = 0; + }