diff options
author | darcy <darcy> | 2001-10-18 11:13:56 +0000 |
---|---|---|
committer | darcy <darcy> | 2001-10-18 11:13:56 +0000 |
commit | 723cf577b1d467b9abd51318191c5d6587dc7944 (patch) | |
tree | dc59df5e8ce6a51109634726f7656d4890f33222 /graphics | |
parent | cd3fdda1f3e8f626016a4bfd62363a74bc74d6c9 (diff) | |
download | pkgsrc-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')
-rw-r--r-- | graphics/gdchart/Makefile | 42 | ||||
-rw-r--r-- | graphics/gdchart/distinfo | 7 | ||||
-rw-r--r-- | graphics/gdchart/patches/patch-gdc.h | 13 | ||||
-rw-r--r-- | graphics/gdchart/patches/patch-gdchart.c | 31 | ||||
-rw-r--r-- | graphics/gdchart/patches/patch-makefile | 125 | ||||
-rw-r--r-- | graphics/gdchart/pkg/DESCR | 6 | ||||
-rw-r--r-- | graphics/gdchart/pkg/PLIST | 11 |
7 files changed, 235 insertions, 0 deletions
diff --git a/graphics/gdchart/Makefile b/graphics/gdchart/Makefile new file mode 100644 index 00000000000..3cd051c27ce --- /dev/null +++ b/graphics/gdchart/Makefile @@ -0,0 +1,42 @@ +# $NetBSD: Makefile,v 1.1 2001/10/18 11:13:56 darcy Exp $ +# FreeBSD Id: ports/graphics/gdchart/Makefile,v 1.5 2001/10/07 02:03:41 petef Exp + +DISTNAME= gdchart0.10.1dev +PKGNAME= gdchart-0.10.1 +CATEGORIES= graphics +MASTER_SITES= http://www.fred.net/brv/chart/ \ + ftp://ftp.nuug.no/pub/anders/distfiles/ + +MAINTAINER= packages@netbsd.org +HOMEPAGE= http://www.fred.net/brv/chart/ +COMMENT= Easy to use, fast C API for creating charts and graphs + +DEPENDS= gd-1.8*:../../graphics/gd + +MAKEFILE= makefile +WRKSRC= ${WRKDIR}/${DISTNAME} + +post-patch: + ${PERL5} -i -pe 's/^#ifdef HAVE_JPEG/#ifndef NO_JPEG/' ${WRKSRC}/*.[ch] + +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 + ${INSTALL_DATA} ${WRKSRC}/gifencode.h ${PREFIX}/include + +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}/gdc_pie_samp.c ${PREFIX}/share/doc/gdchart + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/gdchart + @${ECHO} "================================================================================" + @${ECHO} "Have a look at the sample code and README 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} "================================================================================" + +.include "../../mk/bsd.pkg.mk" diff --git a/graphics/gdchart/distinfo b/graphics/gdchart/distinfo new file mode 100644 index 00000000000..1aea453202f --- /dev/null +++ b/graphics/gdchart/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2001/10/18 11:13:56 darcy Exp $ + +SHA1 (gdchart0.10.1dev.tar.gz) = 52edc97cb45fc441afc4728c812cd33ddab9ef5c +Size (gdchart0.10.1dev.tar.gz) = 40708 bytes +SHA1 (patch-gdc.h) = 21876306acb359b4487cf35bf871b67e68778f0e +SHA1 (patch-gdchart.c) = b64571899b38ef026af076c6876af20c74b98ab8 +SHA1 (patch-makefile) = 5988ea7896ac6cb6aad87c7a42626b9a0c68c400 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: diff --git a/graphics/gdchart/pkg/DESCR b/graphics/gdchart/pkg/DESCR new file mode 100644 index 00000000000..bafa0eb1a89 --- /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 GIF, PNG, JPEG and WBMP 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 00000000000..cb4ffcbb4f3 --- /dev/null +++ b/graphics/gdchart/pkg/PLIST @@ -0,0 +1,11 @@ +@comment $NetBSD: PLIST,v 1.1 2001/10/18 11:13:57 darcy Exp $ +lib/libgdchart.a +include/gdchart.h +include/gdc.h +include/gdcpie.h +include/gifencode.h +${PORTDOCS}share/doc/gdchart/gdc_samp1.c +${PORTDOCS}share/doc/gdchart/gdc_samp2.c +${PORTDOCS}share/doc/gdchart/gdc_pie_samp.c +${PORTDOCS}share/doc/gdchart/README +${PORTDOCS}@dirrm share/doc/gdchart |