summaryrefslogtreecommitdiff
path: root/graphics/gdchart/patches
diff options
context:
space:
mode:
authordarcy <darcy>2001-10-18 11:13:56 +0000
committerdarcy <darcy>2001-10-18 11:13:56 +0000
commit723cf577b1d467b9abd51318191c5d6587dc7944 (patch)
treedc59df5e8ce6a51109634726f7656d4890f33222 /graphics/gdchart/patches
parentcd3fdda1f3e8f626016a4bfd62363a74bc74d6c9 (diff)
downloadpkgsrc-723cf577b1d467b9abd51318191c5d6587dc7944.tar.gz
Adding new package gdchart.
GDChart is an easy to use, high performance library/C API for creating charts and graphs in GIF, PNG, JPEG and WBMP format. WWW: http://www.fred.net/brv/chart/ - Anders Nordby <anders@fix.no>
Diffstat (limited to 'graphics/gdchart/patches')
-rw-r--r--graphics/gdchart/patches/patch-gdc.h13
-rw-r--r--graphics/gdchart/patches/patch-gdchart.c31
-rw-r--r--graphics/gdchart/patches/patch-makefile125
3 files changed, 169 insertions, 0 deletions
diff --git a/graphics/gdchart/patches/patch-gdc.h b/graphics/gdchart/patches/patch-gdc.h
new file mode 100644
index 00000000000..813935168cf
--- /dev/null
+++ b/graphics/gdchart/patches/patch-gdc.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-gdc.h,v 1.1 2001/10/18 11:13:56 darcy Exp $
+
+--- gdc.h.orig Mon Jun 18 00:51:01 2001
++++ gdc.h Mon Jun 18 00:51:16 2001
+@@ -9,7 +9,7 @@
+ #define _GDC_H
+
+ #include <math.h>
+-#include <values.h>
++#include <limits.h>
+ #ifdef GDC_INCL
+ #include "gd.h"
+ #include "gdfonts.h"
diff --git a/graphics/gdchart/patches/patch-gdchart.c b/graphics/gdchart/patches/patch-gdchart.c
new file mode 100644
index 00000000000..8ee62235e51
--- /dev/null
+++ b/graphics/gdchart/patches/patch-gdchart.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-gdchart.c,v 1.1 2001/10/18 11:13:56 darcy Exp $
+
+--- gdchart.c.orig Sat Nov 4 02:49:46 2000
++++ gdchart.c Mon Jun 18 00:56:42 2001
+@@ -664,7 +664,7 @@
+
+ if( GDC_xaxis && xlbl )
+ {
+- int biggest = -MAXINT;
++ int biggest = -INT_MAX;
+
+ for( i=0; i<num_points; ++i )
+ {
+@@ -1196,7 +1196,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 );
+@@ -1226,7 +1226,7 @@
+ /* labeled points */
+ if( (!GDC_xlabel_ctl && ( (i%(1+num_points/num_xlbls) == 0) || // # x labels are regulated
+ num_xlbls >= num_points ||
+- GDC_xlabel_spacing == MAXSHORT ))
++ GDC_xlabel_spacing == SHRT_MAX ))
+ ||
+ (GDC_xlabel_ctl && xi>=0 && *(GDC_xlabel_ctl+xi)) )
+ {
diff --git a/graphics/gdchart/patches/patch-makefile b/graphics/gdchart/patches/patch-makefile
new file mode 100644
index 00000000000..ede1b623d88
--- /dev/null
+++ b/graphics/gdchart/patches/patch-makefile
@@ -0,0 +1,125 @@
+$NetBSD: patch-makefile,v 1.1 2001/10/18 11:13:56 darcy Exp $
+
+--- makefile.orig Sat Nov 4 02:49:46 2000
++++ makefile Tue Jul 17 01:42:30 2001
+@@ -2,8 +2,8 @@
+ GDC_LIB = .
+
+ # GDChart requires the gd library - www.boutell.com/gd/
+-GD_INCL = ../gd-1.8.3
+-GD_LIB = ../gd-1.8.3
++GD_INCL = $(LOCALBASE)/include
++GD_LIB = $(LOCALBASE)/lib
+
+ # libgd requires libpng
+ # PNG_INCL = ../libpng-1.0.8
+@@ -23,6 +23,8 @@
+ # if not installed in standard paths (/lib, /usr/lib), or LD_LIBRARY_PATH
+ # LIB_PATHS = -L$(GD_LIB) -L$(PNG_LIB) -L$(ZLIB_LIB) -L$(JPEG_LIB)
+
++LIB_OBJS = gdc.o gdc_pie.o gdchart.o price_conv.o gifencode.o
++
+ # NOTE:
+ # libpng, libz, etc. are usually linked in as dynamic libs
+ # either use a link line similar to one of these, or set environment LD_LIBRARY_PATH
+@@ -30,62 +32,66 @@
+ # LIB_PATHS = $(LIB_PATHS) -R$(PNG_LIB) -R$(ZLIB_LIB)
+ # LIB_PATHS = $(LIB_PATHS) -Xlinker -rpath -Xlinker $(PNG_LIB) -Xlinker -rpath -Xlinker $(ZLIB_LIB)
+
+-CC=gcc
+-
+-all: gdc_samp1 gdc_samp2 gdc_pie_samp
++all: libgdchart.a
+
+ # --- compile the samples ---
+-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
++#gdc_pie_samp.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdcpie.h gdc_pie_samp.c
++# $(CC) $(CFLAGS) -I$(GDC_INCL) -c gdc_pie_samp.c
+
+-gdc_samp1.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp1.c
+- $(CC) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp1.c
++#gdc_samp1.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp1.c
++# $(CC) $(CFLAGS) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp1.c
+
+-gdc_samp2.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp2.c
+- $(CC) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp2.c
++#gdc_samp2.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp2.c
++# $(CC) $(CFLAGS) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_samp2.c
+
+ # --- link the samples ---
+-gdc_samp1: gdc.o gdchart.o price_conv.o gdc_samp1.o gifencode.o $(GD_LIB)/libgd.a
+- $(CC) -o gdc_samp1 \
+- gdc.o gdchart.o price_conv.o gifencode.o \
+- gdc_samp1.o \
+- $(LIB_PATHS) \
+- -lgd -lz -lpng $(JPEG_LK) -lm
+-
+-gdc_samp2: gdc.o gdchart.o price_conv.o gdc_samp2.o gifencode.o $(GD_LIB)/libgd.a
+- $(CC) -o gdc_samp2 \
+- gdc.o gdchart.o price_conv.o gifencode.o \
+- gdc_samp2.o \
+- $(LIB_PATHS) \
+- -lgd -lz -lpng $(JPEG_LK) -lm
+-
+-gdc_pie_samp: gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o gifencode.o $(GD_LIB)/libgd.a
+- $(CC) -o gdc_pie_samp \
+- gdc.o gdc_pie.o price_conv.o gifencode.o \
+- gdc_pie_samp.o \
+- $(LIB_PATHS) \
+- -lgd -lz -lpng $(JPEG_LK) -lm
++#gdc_samp1: gdc.o gdchart.o price_conv.o gdc_samp1.o gifencode.o $(GD_LIB)/libgd.a
++# $(CC) $(CFLAGS) -o gdc_samp1 \
++# gdc.o gdchart.o price_conv.o gifencode.o \
++# gdc_samp1.o \
++# $(LIB_PATHS) \
++# -lgd -lz -lpng $(JPEG_LK) -lm
++
++#gdc_samp2: gdc.o gdchart.o price_conv.o gdc_samp2.o gifencode.o $(GD_LIB)/libgd.a
++# $(CC) $(CFLAGS) -o gdc_samp2 \
++# gdc.o gdchart.o price_conv.o gifencode.o \
++# gdc_samp2.o \
++# $(LIB_PATHS) \
++# -lgd -lz -lpng $(JPEG_LK) -lm
++
++#gdc_pie_samp: gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o gifencode.o $(GD_LIB)/libgd.a
++# $(CC) $(CFLAGS) -o gdc_pie_samp \
++# gdc.o gdc_pie.o price_conv.o gifencode.o \
++# gdc_pie_samp.o \
++# $(LIB_PATHS) \
++# -lgd -lz -lpng $(JPEG_LK) -lm
+
+ # --- compile the lib ---
+ gifencode.o: gifencode.c gifencode.h
+- $(CC) -I$(GD_INCL) -c gifencode.c
++ $(CC) $(CFLAGS) -I$(GD_INCL) -c gifencode.c
+
+ price_conv.o: price_conv.c
+- $(CC) -c price_conv.c
++ $(CC) $(CFLAGS) -c price_conv.c
+
+ gdc.o: gdc.c $(GDC_INCL)/gdc.h $(GDC_INCL)/gifencode.h
+- $(CC) -I$(GD_INCL) -I$(GDC_INCL) $(JPEG_DEF) -c gdc.c
++ $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(JPEG_DEF) -c gdc.c
+
+ gdc_pie.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gifencode.h $(GDC_INCL)/gdcpie.h gdc_pie.c
+- $(CC) -I$(GD_INCL) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_pie.c
++ $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(JPEG_DEF) -c gdc_pie.c
+
+ gdchart.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gifencode.h $(GDC_INCL)/gdchart.h gdchart.c
+- $(CC) -I$(GD_INCL) -I$(GDC_INCL) $(JPEG_DEF) -c gdchart.c
++ $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(JPEG_DEF) -c gdchart.c
+
+ # --- supporting libraries ---
+ # should be compile & installed separately
+ # $(GD_LIB)/libgd.a:
+ # cd $(GD_LIB) ; make -f Makefile libgd.a
++
++libgdchart.a: $(LIB_OBJS)
++ $(AR) rc libgdchart.a $(LIB_OBJS)
++ @if [ -x $(RANLIB) ] ; then \
++ $(RANLIB) libgdchart.a; \
++ fi;
+
+ # --- clean ---
+ clean: