aboutsummaryrefslogtreecommitdiff
path: root/graphics/gdchart
diff options
context:
space:
mode:
authorAlexander Langer <alex@FreeBSD.org>2001-06-16 15:03:06 +0000
committerAlexander Langer <alex@FreeBSD.org>2001-06-16 15:03:06 +0000
commit007223ee3e2b81b7727225f9acc8275c5e53e648 (patch)
tree0a971001285113ff3eeaee4d8f4c00ec860c0fe4 /graphics/gdchart
parentb36af6e963cb1d1b8b1e21f79dc361ee97ee7f81 (diff)
downloadports-007223ee3e2b81b7727225f9acc8275c5e53e648.tar.gz
ports-007223ee3e2b81b7727225f9acc8275c5e53e648.zip
Notes
Diffstat (limited to 'graphics/gdchart')
-rw-r--r--graphics/gdchart/Makefile47
-rw-r--r--graphics/gdchart/distinfo1
-rw-r--r--graphics/gdchart/files/patch-gdc.c11
-rw-r--r--graphics/gdchart/files/patch-gdc_pie.c20
-rw-r--r--graphics/gdchart/files/patch-gdc_pie_samp.c11
-rw-r--r--graphics/gdchart/files/patch-gdc_samp1.c11
-rw-r--r--graphics/gdchart/files/patch-gdc_samp2.c11
-rw-r--r--graphics/gdchart/files/patch-gdchart.c56
-rw-r--r--graphics/gdchart/files/patch-makefile67
-rw-r--r--graphics/gdchart/pkg-comment1
-rw-r--r--graphics/gdchart/pkg-descr6
-rw-r--r--graphics/gdchart/pkg-plist11
12 files changed, 253 insertions, 0 deletions
diff --git a/graphics/gdchart/Makefile b/graphics/gdchart/Makefile
new file mode 100644
index 000000000000..492281cd514f
--- /dev/null
+++ b/graphics/gdchart/Makefile
@@ -0,0 +1,47 @@
+# New ports collection makefile for: gdchart
+# Date created: 4 June 2001
+# Whom: Anders Nordby <anders@fix.no>
+#
+# $FreeBSD$
+#
+
+PORTNAME= gdchart
+PORTVERSION= 0.9.4b
+CATEGORIES= graphics
+MASTER_SITES= http://www.fred.net/brv/chart/ \
+ ftp://ftp.nuug.no/pub/anders/distfiles/
+DISTNAME= ${PORTNAME}0.94b
+
+MAINTAINER= anders@fix.no
+
+LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd
+
+MAKEFILE= makefile
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/libgdchart.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/gdchart.h ${PREFIX}/include
+ ${INSTALL_DATA} ${WRKSRC}/gdc.h ${PREFIX}/include
+ ${INSTALL_DATA} ${WRKSRC}/gdcpie.h ${PREFIX}/include
+
+.if !defined(NOPORTDOCS)
+post-install:
+ @${INSTALL} -d -m 0755 ${PREFIX}/share/doc/gdchart
+ ${INSTALL_DATA} ${WRKSRC}/gdc_samp1.c ${PREFIX}/share/doc/gdchart
+ ${INSTALL_DATA} ${WRKSRC}/gdc_samp2.c ${PREFIX}/share/doc/gdchart
+ ${INSTALL_DATA} ${WRKSRC}/README.txt ${PREFIX}/share/doc/gdchart
+ ${INSTALL_DATA} ${WRKSRC}/NOTES-092b.txt ${PREFIX}/share/doc/gdchart
+ ${INSTALL_DATA} ${WRKSRC}/NOTES-093b.txt ${PREFIX}/share/doc/gdchart
+ ${INSTALL_DATA} ${WRKSRC}/NOTES-094b.txt ${PREFIX}/share/doc/gdchart
+ @${ECHO} "================================================================================"
+ @${ECHO} "Have a look at the sample code and README(s) in ${PREFIX}/share/doc/${PORTNAME}."
+ @${ECHO} "To compile gdc_samp1, try something like:"
+ @${ECHO}
+ @${ECHO} "gcc -I${PREFIX}/include -o gdc_samp1 gdc_samp1.c -L${PREFIX}/lib -lgdchart -lgd"
+ @${ECHO}
+ @${ECHO} "NB: gdchart will produce PNGs, not GIFs, as newer versions of gd stopped"
+ @${ECHO} "supporting GIFs."
+ @${ECHO} "================================================================================"
+.endif
+
+.include <bsd.port.mk>
diff --git a/graphics/gdchart/distinfo b/graphics/gdchart/distinfo
new file mode 100644
index 000000000000..1fce917cfabf
--- /dev/null
+++ b/graphics/gdchart/distinfo
@@ -0,0 +1 @@
+MD5 (gdchart0.94b.tar.gz) = 261e0a1527f4a50f0eaae7171275a0ee
diff --git a/graphics/gdchart/files/patch-gdc.c b/graphics/gdchart/files/patch-gdc.c
new file mode 100644
index 000000000000..cd1fa0e5fe4e
--- /dev/null
+++ b/graphics/gdchart/files/patch-gdc.c
@@ -0,0 +1,11 @@
+--- gdc.c.orig Mon Jun 4 02:41:42 2001
++++ gdc.c Mon Jun 4 02:41:51 2001
+@@ -158,7 +158,7 @@
+ if( GDC_generate_gif )
+ {
+ fflush(fptr); // clear anything buffered
+- gdImageGif(im, fptr);
++ gdImagePng(im, fptr);
+ }
+
+ if( GDC_hold_img & GDC_EXPOSE_IMAGE )
diff --git a/graphics/gdchart/files/patch-gdc_pie.c b/graphics/gdchart/files/patch-gdc_pie.c
new file mode 100644
index 000000000000..85f77d27ef96
--- /dev/null
+++ b/graphics/gdchart/files/patch-gdc_pie.c
@@ -0,0 +1,20 @@
+--- gdc_pie.c.orig Fri Nov 13 05:00:55 1998
++++ gdc_pie.c Mon Jun 4 02:42:16 2001
+@@ -1,7 +1,7 @@
+ /* GDCHART 0.94b GDC_PIE.C 12 Nov 1998 */
+
+ #include <stdio.h>
+-#include <values.h>
++#include <limits.h>
+ #include <math.h>
+
+ #define GDC_INCL
+@@ -610,7 +610,7 @@
+ rad -= GDCPIE_label_dist;
+ }
+
+- gdImageGif(im, gif_fptr);
++ gdImagePng(im, gif_fptr);
+
+ gdImageDestroy(im);
+ return;
diff --git a/graphics/gdchart/files/patch-gdc_pie_samp.c b/graphics/gdchart/files/patch-gdc_pie_samp.c
new file mode 100644
index 000000000000..e436c53d4452
--- /dev/null
+++ b/graphics/gdchart/files/patch-gdc_pie_samp.c
@@ -0,0 +1,11 @@
+--- gdc_pie_samp.c.orig Mon Jun 4 01:25:29 2001
++++ gdc_pie_samp.c Mon Jun 4 01:25:51 2001
+@@ -4,7 +4,7 @@
+ /* vi: :set tabstop=4 */
+
+ #include <stdio.h>
+-#include <values.h>
++#include <limits.h>
+ #include <math.h>
+
+ #include "gdc.h"
diff --git a/graphics/gdchart/files/patch-gdc_samp1.c b/graphics/gdchart/files/patch-gdc_samp1.c
new file mode 100644
index 000000000000..89e509e10545
--- /dev/null
+++ b/graphics/gdchart/files/patch-gdc_samp1.c
@@ -0,0 +1,11 @@
+--- gdc_samp1.c.orig Mon Jun 4 01:22:38 2001
++++ gdc_samp1.c Mon Jun 4 01:23:00 2001
+@@ -9,7 +9,7 @@
+ /* for CGI use un-comment the "Content-Type" line */
+
+ #include <stdio.h>
+-#include <values.h>
++#include <limits.h>
+
+ #include "gdc.h"
+ #include "gdchart.h"
diff --git a/graphics/gdchart/files/patch-gdc_samp2.c b/graphics/gdchart/files/patch-gdc_samp2.c
new file mode 100644
index 000000000000..284c84ce0835
--- /dev/null
+++ b/graphics/gdchart/files/patch-gdc_samp2.c
@@ -0,0 +1,11 @@
+--- gdc_samp2.c.orig Mon Jun 4 01:24:03 2001
++++ gdc_samp2.c Mon Jun 4 01:24:22 2001
+@@ -13,7 +13,7 @@
+ */
+
+ #include <stdio.h>
+-#include <values.h>
++#include <limits.h>
+
+ #include "gdc.h"
+ #include "gdchart.h"
diff --git a/graphics/gdchart/files/patch-gdchart.c b/graphics/gdchart/files/patch-gdchart.c
new file mode 100644
index 000000000000..4f105010fa87
--- /dev/null
+++ b/graphics/gdchart/files/patch-gdchart.c
@@ -0,0 +1,56 @@
+--- gdchart.c.orig Mon Apr 19 00:37:46 1999
++++ gdchart.c Mon Jun 4 02:40:16 2001
+@@ -3,7 +3,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <values.h>
++#include <limits.h>
+ #include <math.h>
+ #include <string.h>
+ #include <stdarg.h>
+@@ -517,7 +517,7 @@
+
+ if( GDC_xaxis && xlbl )
+ {
+- int biggest = -MAXINT;
++ int biggest = -INT_MAX;
+
+ for( i=0; i<num_points; ++i )
+ {
+@@ -727,7 +727,7 @@
+ }
+ else
+ {
+- if( bg_img = gdImageCreateFromGif(in) ) // =
++ if( bg_img = gdImageCreateFromPng(in) ) // =
+ {
+ int bgxpos = gdImageSX(bg_img)<GIFWIDTH? GIFWIDTH/2 - gdImageSX(bg_img)/2: 0,
+ bgypos = gdImageSY(bg_img)<GIFHEIGHT? GIFHEIGHT/2 - gdImageSY(bg_img)/2: 0;
+@@ -1028,7 +1028,7 @@
+ int num_xlbls = /* maximum x lables that'll fit */
+ /* each xlbl + avg due to num_lf_xlbls */
+ graphwidth /
+- ( (GDC_xlabel_spacing==MAXSHORT?0:GDC_xlabel_spacing)+GDC_fontc[GDC_xaxisfont_size].h +
++ ( (GDC_xlabel_spacing==SHRT_MAX?0:GDC_xlabel_spacing)+GDC_fontc[GDC_xaxisfont_size].h +
+ (num_lf_xlbls*(GDC_fontc[GDC_xaxisfont_size].h-1))/num_points );
+ int labelcolor = GDC_XLabelColor==GDC_DFLTCOLOR?
+ LineColor: clrallocate( im, GDC_XLabelColor );
+@@ -1036,7 +1036,7 @@
+ for( i=0; i<num_points+(do_bar?2:0); ++i )
+ if( (i%(1+num_points/num_xlbls) == 0) || // # x labels are regulated
+ (num_xlbls >= num_points) ||
+- GDC_xlabel_spacing == MAXSHORT )
++ GDC_xlabel_spacing == SHRT_MAX )
+ {
+ int xi = do_bar? i-1: i;
+
+@@ -1817,7 +1817,7 @@
+ if( GDC_generate_gif )
+ {
+ fflush(gif_fptr); // clear anything buffered
+- gdImageGif( im, gif_fptr );
++ gdImagePng( im, gif_fptr );
+ }
+
+ if( bg_img )
diff --git a/graphics/gdchart/files/patch-makefile b/graphics/gdchart/files/patch-makefile
new file mode 100644
index 000000000000..6a2c01c7eb91
--- /dev/null
+++ b/graphics/gdchart/files/patch-makefile
@@ -0,0 +1,67 @@
+--- makefile.orig Mon Apr 19 01:22:38 1999
++++ makefile Mon Jun 4 02:25:37 2001
+@@ -1,45 +1,49 @@
+ GDC_INCL = .
+-GD_INCL = gd1.3
+-GD_LIB = gd1.3
++GD_INCL = $(PREFIX)/include/gd
++GD_LIB = $(PREFIX)/lib
+
+-CC=gcc
+-
+-all: gdc_samp1 gdc_samp2 gdc_pie_samp
++all: libgdchart.a
+
+ # compile the samples
+ gdc_samp1: gdc.o gdchart.o price_conv.o gdc_samp1.o $(GD_LIB)/libgd.a
+- $(CC) -o gdc_samp1 gdc.o gdchart.o price_conv.o gdc_samp1.o -L$(GD_LIB) -lgd -lm
++ $(CC) $(CFLAGS) -o gdc_samp1 gdc.o gdchart.o price_conv.o gdc_samp1.o -L$(GD_LIB) -lgd -lm
+
+ gdc_samp1.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp1.c
+- $(CC) -I$(GDC_INCL) -c gdc_samp1.c
++ $(CC) $(CFLAGS) -I$(GDC_INCL) -c gdc_samp1.c
+
+ gdc_samp2: gdc.o gdchart.o price_conv.o gdc_samp2.o $(GD_LIB)/libgd.a
+- $(CC) -o gdc_samp2 gdc.o gdchart.o price_conv.o gdc_samp2.o -L$(GD_LIB) -lgd -lm
++ $(CC) $(CFLAGS) -o gdc_samp2 gdc.o gdchart.o price_conv.o gdc_samp2.o -L$(GD_LIB) -lgd -lm
+
+ gdc_samp2.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp2.c
+- $(CC) -I$(GDC_INCL) -c gdc_samp2.c
++ $(CC) $(CFLAGS) -I$(GDC_INCL) -c gdc_samp2.c
+
+ gdc_pie_samp: gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o $(GD_LIB)/libgd.a
+- $(CC) -o gdc_pie_samp gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o -L$(GD_LIB) -lgd -lm
++ $(CC) $(CFLAGS) -o gdc_pie_samp gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o -L$(GD_LIB) -lgd -lm
+
+ gdc_pie_samp.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdcpie.h gdc_pie_samp.c
+- $(CC) -I$(GDC_INCL) -c gdc_pie_samp.c
++ $(CC) $(CFLAGS) -I$(GDC_INCL) -c gdc_pie_samp.c
+
+ # --- compile the lib ---
+ price_conv.o: price_conv.c
+- $(CC) -c price_conv.c
++ $(CC) $(CFLAGS) -c price_conv.c
+
+ gdc.o: gdc.c gdc.h
+- $(CC) -I$(GD_INCL) -I$(GDC_INCL) -c gdc.c
++ $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) -c gdc.c
+
+ gdc_pie.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdcpie.h gdc_pie.c
+- $(CC) -I$(GD_INCL) -I$(GDC_INCL) -c gdc_pie.c
++ $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) -c gdc_pie.c
+
+ gdchart.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdchart.c
+- $(CC) -I$(GD_INCL) -I$(GDC_INCL) -c gdchart.c
++ $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) -c gdchart.c
+
+ $(GD_LIB)/libgd.a:
+ cd $(GD_LIB) ; make -f Makefile libgd.a
++
++libgdchart.a: gdc.o gdc_pie.o gdchart.o price_conv.o
++ $(AR) rc libgdchart.a gdc.o gdc_pie.o gdchart.o price_conv.o
++ @if [ -x $(RANLIB) ] ; then \
++ $(RANLIB) libgdchart.a; \
++ fi;
+
+ # --- clean ---
+ clean:
diff --git a/graphics/gdchart/pkg-comment b/graphics/gdchart/pkg-comment
new file mode 100644
index 000000000000..994cff3855af
--- /dev/null
+++ b/graphics/gdchart/pkg-comment
@@ -0,0 +1 @@
+Easy to use, fast C API for creating charts and graphs
diff --git a/graphics/gdchart/pkg-descr b/graphics/gdchart/pkg-descr
new file mode 100644
index 000000000000..fb70f8f5354c
--- /dev/null
+++ b/graphics/gdchart/pkg-descr
@@ -0,0 +1,6 @@
+GDChart is an easy to use, high performance library/C API for creating charts
+and graphs in PNG format.
+
+WWW: http://www.fred.net/brv/chart/
+
+- Anders Nordby <anders@fix.no>
diff --git a/graphics/gdchart/pkg-plist b/graphics/gdchart/pkg-plist
new file mode 100644
index 000000000000..fb8ea813f160
--- /dev/null
+++ b/graphics/gdchart/pkg-plist
@@ -0,0 +1,11 @@
+lib/libgdchart.a
+include/gdchart.h
+include/gdc.h
+include/gdcpie.h
+%%PORTDOCS%%share/doc/gdchart/gdc_samp1.c
+%%PORTDOCS%%share/doc/gdchart/gdc_samp2.c
+%%PORTDOCS%%share/doc/gdchart/README.txt
+%%PORTDOCS%%share/doc/gdchart/NOTES-092b.txt
+%%PORTDOCS%%share/doc/gdchart/NOTES-093b.txt
+%%PORTDOCS%%share/doc/gdchart/NOTES-094b.txt
+%%PORTDOCS%%@dirrm share/doc/gdchart