Changeset 98260


Ignore:
Timestamp:
Oct 1, 2012, 5:38:09 AM (12 years ago)
Author:
ryandesign@…
Message:

jgraph: maintainer update to fix compilation with clang (#36397); update maintainer email address

Location:
trunk/dports/graphics/jgraph
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/graphics/jgraph/Portfile

    r98258 r98260  
    1111homepage \
    1212    http://www.cs.utk.edu/~plank/plank/jgraph/jgraph.html
    13 maintainers         cs.ucsd.edu:s
     13maintainers         pahtak.org:s
    1414description         A Filter for Plotting Graphs in PostScript
    1515long_description    Jgraph is a program that takes the description \
     
    3030
    3131supported_archs     ppc i386
    32 patchfiles          patch-jgraph.h.diff \
     32patchfiles          patch-draw.c.diff \
     33                    patch-edit.c.diff \
     34                    patch-jgraph.c.diff \
     35                    patch-jgraph.h.diff \
    3336                    patch-list.c.diff \
     37                    patch-list.h.diff \
    3438                    patch-makefile.diff \
     39                    patch-printline.c.diff \
     40                    patch-prio_list.c.diff \
     41                    patch-prio_list.h.diff \
     42                    patch-process.c.diff \
     43                    patch-show.c.diff \
    3544                    patch-token.c.diff
     45
    3646post-patch {
    3747    reinplace s|@@CC@@|${configure.cc}| ${worksrcpath}/makefile
  • trunk/dports/graphics/jgraph/files/patch-jgraph.h.diff

    r39881 r98260  
    1 --- jgraph.h.orig       2008-09-09 19:25:48.000000000 -0700
    2 +++ jgraph.h    2008-09-09 19:06:47.000000000 -0700
    3 @@ -9,6 +9,7 @@
    4  #include "prio_list.h"
    5  #ifdef LCC
    6  #include <stdlib.h>
    7 +#include <string.h>
    8  #endif
     1--- jgraph.h.orig       2012-10-01 00:08:42.000000000 -0400
     2+++ jgraph.h    2012-10-01 00:04:09.000000000 -0400
     3@@ -214,25 +214,27 @@ typedef struct graphs {
     4   int page;
     5 } *Graphs;
    96 
    10  #define PPI 120
     7-extern float ctop();
     8-extern float disttop();
     9-extern float intop();
     10-extern float ptoc();
     11-extern float ptodist();
     12-
     13-extern char *getlabel();
     14-extern char *getmultiline();
     15-
     16-/* Stuff defined in jgraph.c */
     17-
     18-extern Curve new_line();
     19-extern Curve new_curve();
     20-extern Curve get_curve();
     21-extern Graph new_graph();
     22-extern Graph get_graph();
     23-extern String new_string();
     24-extern String get_string();
     25-extern Label new_label();
     26+/* Defined in draw.c */
     27+extern float ctop(float, Axis);
     28+extern float disttop(float, Axis);
     29+extern float intop(float);
     30+extern void draw_graphs(Graphs, int, int);
     31+extern void draw_axis(Axis, Axis);
     32+
     33+/* Defined in edit.c */
     34+extern void copy_label(Label, Label);
     35+extern void edit_graphs(Graphs);
     36+
     37+/* Defined in jgraph.c */
     38+extern void new_graphs(Graphs);
     39+extern Curve new_line(Curve, int);
     40+extern Curve new_curve(Curve, int);
     41+extern Curve get_curve(Curve, int);
     42+extern Graph new_graph(Graph, int);
     43+extern Graph get_graph(Graph, int);
     44+extern String new_string(String, int);
     45+extern String get_string(String, int);
     46+extern Label new_label(void);
     47 extern char *MARKTYPESTRS[];
     48 extern char MARKTYPES[];
     49 extern int NMARKTYPES;
     50@@ -240,3 +242,42 @@ extern int NORMALMARKTYPES;
     51 extern char *PATTERNS[];
     52 extern char PTYPES[];
     53 extern int NPATTERNS;
     54+
     55+/* Defined in printline.c */
     56+extern void gsave(void);
     57+extern void grestore(void);
     58+extern void setfont(char *, float);
     59+extern void setfill(float, float, char, float *, char, float);
     60+extern void setgray(char, float*);
     61+extern void print_ebar(float, float, float, float, char);
     62+extern void start_line(float, float, Curve);
     63+extern void cont_line(float, float);
     64+extern void end_line(void);
     65+extern void bezier_control(float, float);
     66+extern void bezier_end(float, float);
     67+extern void start_poly(float, float);
     68+extern void cont_poly(float, float);
     69+extern void end_poly(float, float, char, float *, char, float);
     70+extern void printellipse(float, float, float, float, char, float *, char, float);
     71+extern void set_comment(int);
     72+extern void comment(const char *);
     73+extern void print_label(Label);
     74+extern void setlinewidth(float);
     75+extern void setlinestyle(char, Flist);
     76+extern void printline(float, float, float, float, char);
     77+
     78+/* Defined in process.c */
     79+extern void process_graphs(Graphs);
     80+
     81+/* Defined in show.c */
     82+extern void show_graphs(Graphs);
     83+
     84+/* Defined in token.c */
     85+extern void set_input_file(const char *);
     86+extern void error_header(void);
     87+extern int getstring(char *);
     88+extern int getint(int *);
     89+extern int getfloat(float *);
     90+extern char *getmultiline(void);
     91+extern char *getlabel(void);
     92+extern void rejecttoken(void);
  • trunk/dports/graphics/jgraph/files/patch-list.c.diff

    r39881 r98260  
    1 --- list.c.orig 2008-09-09 19:25:59.000000000 -0700
    2 +++ list.c      2008-09-09 19:07:37.000000000 -0700
     1--- list.c.orig 2012-10-01 00:08:42.000000000 -0400
     2+++ list.c      2012-09-30 22:25:24.000000000 -0400
    33@@ -6,6 +6,7 @@
    44  */
     
    99 
    1010 #define boolean int
     11@@ -32,10 +33,10 @@ typedef struct int_list {  /* Informatio
     12   List free_list;
     13 } *Int_list;
     14 
     15-insert(item, list)     /* Inserts to the end of a list */
     16-List item;
     17-List list;
     18+void insert(void *item_, void *list_)  /* Inserts to the end of a list */
     19 {
     20+  List item = item_;
     21+  List list = list_;
     22   List last_node;
     23 
     24   last_node = list->blink;
     25@@ -46,15 +47,14 @@ List list;
     26   item->flink = list;
     27 }
     28 
     29-delete_item(item)              /* Deletes an arbitrary iterm */
     30-List item;
     31+void delete_item(void *item_)          /* Deletes an arbitrary iterm */
     32 {
     33+  List item = item_;
     34   item->flink->blink = item->blink;
     35   item->blink->flink = item->flink;
     36 }
     37 
     38-List make_list(size)   /* Creates a new list */
     39-int size;
     40+List make_list(int size)       /* Creates a new list */
     41 {
     42   Int_list l;
     43 
     44@@ -67,9 +67,9 @@ int size;
     45   return (List) l;
     46 }
     47   
     48-List get_node(list)   /* Allocates a node to be inserted into the list */
     49-List list;
     50+List get_node(void *list_)   /* Allocates a node to be inserted into the list */
     51 {
     52+  List list = list_;
     53   Int_list l;
     54   List to_return;
     55 
     56@@ -83,10 +83,10 @@ List list;
     57   }
     58 }
     59 
     60-free_node(node, list)    /* Deallocates a node from the list */
     61-List node;
     62-List list;
     63+void free_node(void *node_, void *list_)    /* Deallocates a node from the list */
     64 {
     65+  List node = node_;
     66+  List list = list_;
     67   Int_list l;
     68   
     69   l = (Int_list) list;
  • trunk/dports/graphics/jgraph/files/patch-makefile.diff

    r69729 r98260  
    1 --- makefile.orig       2008-09-09 19:26:44.000000000 -0700
    2 +++ makefile    2008-09-09 19:08:06.000000000 -0700
    3 @@ -6,7 +6,7 @@
     1--- makefile.orig       2012-10-01 00:08:42.000000000 -0400
     2+++ makefile    2012-10-01 00:20:06.000000000 -0400
     3@@ -6,7 +6,8 @@
    44 # Also, before installing, you should change the string "JGRAPH_DIR" in
    55 # jgraph.1 to be the directory containing the example jgraphs.
    66 
    77-CC = gcc -LCC
    8 +CC = @@CC@@ -DLCC -O3 -m32
     8+CC := @@CC@@
     9+CFLAGS = -DLCC -O3 -Wall
    910 
    1011 OBJS = draw.o \
    1112                edit.o \
     13@@ -49,23 +50,22 @@ examples: $(EXAMPLES)
     14 
     15 .SUFFIXES: .c .o .h .jgr .jps .eps .tex .dvi
     16 
     17-.jgr.jps:
     18-       jgraph -P < $*.jgr > $*.jps
     19+%.jps: %.jgr
     20+       jgraph -P <$< >$@
     21 
     22-.jgr.eps:
     23-       jgraph < $*.jgr > $*.eps
     24-
     25-.tex.dvi:
     26-       latex $*.tex
     27-.c.o:
     28-       $(CC)  -c -g $*.c
     29+%.eps: %.jgr
     30+       jgraph <$< >$@
     31 
     32+%.dvi: %.tex
     33+       latex $*
     34+%.o: %.c
     35+       $(CC) -c -o $@ $(CFLAGS) $<
     36 
     37 jgraph: $(OBJS)
     38-       $(CC) -g $(OBJS) -lm -o jgraph
     39+       $(CC) $(OBJS) -o $@
     40 
     41 sin:   sin.o
     42-       cc -o sin sin.o -lm
     43+       $(CC) $^ -o $@
     44 
     45 ad.jps: cube.eps disk.eps
     46 bailey.jps: bailey.pts
     47@@ -93,4 +93,4 @@ process.o: process.c jgraph.h list.h pri
     48 show.o: show.c jgraph.h list.h prio_list.h
     49 token.o: token.c list.h
     50 clean:
     51-       rm -f *.o a.out *.jps
     52+       $(RM) *.o a.out *.jps jgraph
  • trunk/dports/graphics/jgraph/files/patch-token.c.diff

    r39881 r98260  
    1 --- token.c.orig        2008-09-09 19:26:17.000000000 -0700
    2 +++ token.c     2008-09-09 19:07:18.000000000 -0700
    3 @@ -10,6 +10,7 @@
     1--- token.c.orig        2012-10-01 00:08:42.000000000 -0400
     2+++ token.c     2012-09-30 22:27:14.000000000 -0400
     3@@ -7,6 +7,7 @@
     4 
     5 #include <math.h>
     6 #include <stdio.h>
     7+#include <string.h>
    48 
    59 #ifdef LCC
    610 #include <stdlib.h>
    7 +#include <string.h>
    8  #endif
     11@@ -35,7 +36,7 @@ typedef struct iostack {
     12 static char INPUT[1000];
     13 static int getnew = 1;
     14 static char oldchar = '\0';
     15-static oldcharvalid = 0;
     16+static int oldcharvalid = 0;
     17 static char pipe = 0;
     18 static int eof = 0;
     19 static int init = 0;
     20@@ -46,24 +47,22 @@ static FILE *IOSTREAM;
     21 static char FILENAME[300];
     22 static int line = 1;
    923 
    10  #ifdef VMS
     24+static int getsystemstring(void);
     25+
     26 #ifdef VMS
     27 /* On VMS, there are no popen() and pclose(), so we provide dummies here. */
     28-FILE *popen(command, type)
     29-char *command, *type;
     30+FILE *popen(const char *command, const char *type)
     31 {
     32     return(NULL);
     33 }
     34-int pclose(stream)
     35-FILE *stream;
     36+int pclose(FILE *stream)
     37 {
     38     return(-1);
     39 }
     40 #endif /*VMS*/
     41 
     42-set_input_file(s)
     43-char *s;
     44+void set_input_file(const char *s)
     45 {
     46-  FILE *f;
     47   Iostack n;
     48 
     49   if (init == 0) {
     50@@ -93,12 +92,12 @@ char *s;
     51   }
     52 }
     53 
     54-error_header()
     55+void error_header()
     56 {
     57   fprintf(stderr, "%s,%d: ", FILENAME, line);
     58 }
     59   
     60-int gettokenchar()
     61+static int gettokenchar()
     62 {
     63   if (oldcharvalid == 0) oldchar = getc(IOSTREAM);
     64   oldcharvalid = 0;
     65@@ -106,14 +105,13 @@ int gettokenchar()
     66   return oldchar;
     67 }
     68 
     69-ungettokenchar()
     70+static void ungettokenchar()
     71 {
     72   oldcharvalid = 1;
     73   if (oldchar == '\n') line--;
     74 }
     75 
     76-int gettoken(s)
     77-char *s;
     78+static int gettoken(char *s)
     79 {
     80   int i;
     81   char c;
     82@@ -131,7 +129,7 @@ char *s;
     83   return i;
     84 }
     85 
     86-get_comment()
     87+static void get_comment()
     88 {
     89   if (eof) return;
     90   while (1) {
     91@@ -148,8 +146,7 @@ static int iostackempty()
     92   return (first(stack) == nil(stack));
     93 }
     94 
     95-static push_iostack(p)
     96-int p;
     97+static void push_iostack(int p)
     98 {
     99   Iostack n;
     100 
     101@@ -177,7 +174,7 @@ int p;
     102   strcpy(FILENAME, INPUT);
     103 }
     104 
     105-static pop_iostack()
     106+static void pop_iostack()
     107 {
     108   Iostack n;
     109 
     110@@ -195,7 +192,7 @@ static pop_iostack()
     111   if (n->stream == NULL) {
     112     n->stream = fopen(n->filename, "r");
     113     if (n->stream == NULL) {
     114-      fprintf(stderr, "Error: cannot open file \"%s\"\n", n->stream);
     115+      fprintf(stderr, "Error: cannot open file \"%s\"\n", n->filename);
     116       exit(1);
     117     }
     118   }
     119@@ -210,7 +207,7 @@ static pop_iostack()
     120   free_node(n, stack);
     121 }
     122 
     123-static nexttoken()
     124+static void nexttoken()
     125 {
     126   if (eof) return;
     127   if (getnew) {
     128@@ -258,8 +255,7 @@ static nexttoken()
     129   return;
     130 }
     131 
     132-int getstring(s)
     133-char *s;
     134+int getstring(char *s)
     135 {
     136   nexttoken();
     137   if (eof) return 0;
     138@@ -267,8 +263,7 @@ char *s;
     139   return 1;
     140 }
     141 
     142-int getint(i)
     143-int *i;
     144+int getint(int *i)
     145 {
     146   int j;
     147 
     148@@ -282,8 +277,7 @@ int *i;
     149   return 1;
     150 }
     151 
     152-int getfloat(f)
     153-float *f;
     154+int getfloat(float *f)
     155 {
     156   int j;
     157 
     158@@ -304,8 +298,7 @@ float *f;
     159   } else return 1;
     160 }
     161 
     162-static char *new_printable_text(s)
     163-char *s;
     164+static char *new_printable_text(const char *s)
     165 {
     166   char *new_s;
     167   int to_pad, i, j;
     168@@ -334,7 +327,7 @@ char *s;
     169 char *getmultiline()
     170 {
     171   char c;
     172-  int i, j, done, len, started;
     173+  int i, done, len, started;
     174   char *out_str;
     175 
     176   if (getnew == 0) return CNULL;
     177@@ -374,9 +367,7 @@ char *getmultiline()
     178 
     179 char *getlabel()
     180 {
     181-  char c;
     182   char *txt, *new;
     183-  int i;
     184 
     185   txt = getmultiline();
     186   if (txt == CNULL) return CNULL;
     187@@ -415,7 +406,7 @@ int getsystemstring()
     188   return 1;
     189 }
     190 
     191-rejecttoken()
     192+void rejecttoken()
     193 {
     194   getnew = 0;
     195 }
Note: See TracChangeset for help on using the changeset viewer.