Update gdchart to 0.11.4. Bug fixes and performance improvements in PIE charts.

This commit is contained in:
adam 2003-06-23 10:19:32 +00:00
parent f12fd11698
commit 28b6e8e2b5
7 changed files with 88 additions and 156 deletions

View file

@ -1,14 +1,13 @@
# $NetBSD: Makefile,v 1.7 2003/06/02 01:19:29 jschauma Exp $
# $NetBSD: Makefile,v 1.8 2003/06/23 10:19:32 adam Exp $
#
DISTNAME= gdchart0.10.1dev
PKGNAME= gdchart-0.10.1
PKGREVISION= 3
DISTNAME= gdchart0.11.4dev
PKGNAME= gdchart-0.11.4
CATEGORIES= graphics
MASTER_SITES= http://www.fred.net/brv/chart/ \
ftp://ftp.nuug.no/pub/anders/distfiles/
MAINTAINER= tech-pkg@netbsd.org
MAINTAINER= adam@netbsd.org
HOMEPAGE= http://www.fred.net/brv/chart/
COMMENT= Easy to use, fast C API for creating charts and graphs

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.2 2003/01/17 13:49:07 jmmv Exp $
@comment $NetBSD: PLIST,v 1.3 2003/06/23 10:19:32 adam Exp $
include/gdc.h
include/gdchart.h
include/gdcpie.h
@ -7,7 +7,7 @@ lib/libgdchart.a
lib/libgdchart.la
lib/libgdchart.so
lib/libgdchart.so.0
lib/libgdchart.so.0.10
lib/libgdchart.so.0.11
share/doc/gdchart/README
share/examples/gdchart/gdc_pie_samp.c
share/examples/gdchart/gdc_samp1.c

View file

@ -1,11 +1,11 @@
# $NetBSD: buildlink2.mk,v 1.4 2003/01/24 12:41:18 jlam Exp $
# $NetBSD: buildlink2.mk,v 1.5 2003/06/23 10:19:32 adam Exp $
#
.if !defined(GDCHART_BUILDLINK2_MK)
GDCHART_BUILDLINK2_MK= # defined
BUILDLINK_PACKAGES+= gdchart
BUILDLINK_DEPENDS.gdchart?= gdchart>=0.10.1nb3
BUILDLINK_DEPENDS.gdchart?= gdchart>=0.11.4
BUILDLINK_PKGSRCDIR.gdchart?= ../../graphics/gdchart
EVAL_PREFIX+= BUILDLINK_PREFIX.gdchart=gdchart

View file

@ -1,7 +1,5 @@
$NetBSD: distinfo,v 1.4 2003/01/24 12:41:18 jlam Exp $
$NetBSD: distinfo,v 1.5 2003/06/23 10:19:33 adam Exp $
SHA1 (gdchart0.10.1dev.tar.gz) = 52edc97cb45fc441afc4728c812cd33ddab9ef5c
Size (gdchart0.10.1dev.tar.gz) = 40708 bytes
SHA1 (patch-aa) = 6755bc77ee3e5bfb4dc92459d41f6ad4f8f76e75
SHA1 (patch-ab) = 100c284c8f9400785ef9eff42c81a9f13d73c1e5
SHA1 (patch-ac) = ca0cd60f726854bcaa405a99aefeb523d2f38f28
SHA1 (gdchart0.11.4dev.tar.gz) = 639a04061c92f36140e877bc307b76878ee3f6d7
Size (gdchart0.11.4dev.tar.gz) = 52031 bytes
SHA1 (patch-ac) = 7fe4edb0dcf19b735918850089b1edf54f4638c9

View file

@ -1,13 +0,0 @@
$NetBSD: patch-aa,v 1.1 2001/10/18 11:39:24 wiz Exp $
--- gdc.h.orig Sat Nov 4 02:49:46 2000
+++ gdc.h
@@ -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"

View file

@ -1,31 +0,0 @@
$NetBSD: patch-ab,v 1.1 2001/10/18 11:39:24 wiz Exp $
--- gdchart.c.orig Sat Nov 4 02:49:46 2000
+++ gdchart.c
@@ -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)) )
{

View file

@ -1,115 +1,94 @@
$NetBSD: patch-ac,v 1.3 2003/01/24 12:41:19 jlam Exp $
$NetBSD: patch-ac,v 1.4 2003/06/23 10:19:34 adam Exp $
--- makefile.orig Sat Nov 4 02:49:46 2000
+++ makefile
@@ -23,6 +23,8 @@ LIB_PATHS = -L$(GD_LIB)
# 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,67 @@ LIB_PATHS = -L$(GD_LIB)
# LIB_PATHS = $(LIB_PATHS) -R$(PNG_LIB) -R$(ZLIB_LIB)
# LIB_PATHS = $(LIB_PATHS) -Xlinker -rpath -Xlinker $(PNG_LIB) -Xlinker -rpath -Xlinker $(ZLIB_LIB)
--- makefile.orig 2003-03-11 04:03:06.000000000 +0100
+++ makefile 2003-06-20 15:22:12.000000000 +0200
@@ -1,4 +1,4 @@
-CC=gcc
-
-all: gdc_samp1 gdc_samp2 gdc_pie_samp
+LIB_OBJS= gifencode.o price_conv.o gdc.o gdc_pie.o gdchart.o array_alloc.o
# gcc 2.7.1 or better is required
# CFLAGS=
# CFLAGS=-g -ansi -pedantic
@@ -6,11 +6,11 @@
# ----- build path -----
GDC_INCL=./
GDC_LD=./
-GDC_LIB=libgdc.a
+GDC_LIB=libgdchart.a
# ----- install locations -----
-PREFIX_INC = /usr/local/include
-PREFIX_LIB = /usr/local/lib
+PREFIX_INC = ${PREFIX}/include
+PREFIX_LIB = ${PREFIX}/lib
# INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
@@ -18,9 +18,9 @@
# GDChart requires the gd library - www.boutell.com/gd/
# libgd 1.8.4 or better is required. Don't use 2.0.0
# if it's not installed in a standard location edit these lines for your installation
-GD_INCL=../gd-1.8.4/
-GD_LD=../gd-1.8.4/
-GD_LIB=libgd.a
+GD_INCL=${BUILDLINK_PREFIX.gd}/include
+GD_LD=${BUILDLINK_PREFIX.gd}/lib
+GD_LIB=libgd.so
# if you're using gd2.x, use these lines
# (it's typically built as a shared lib)
# GD_INCL = ../gd-2.0.0/
@@ -66,7 +66,7 @@
# LIB_PATHS = $(LIB_PATHS) -Xlinker -rpath -Xlinker $(PNG_LD) -Xlinker -rpath -Xlinker $(ZLIB_LD)
-all: libgdc.a gdc_samp1 gdc_samp2 gdc_pie_samp ft_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_pie_samp.o: $(GDC_INCL)gdc.h $(GDC_INCL)gdcpie.h gdc_pie_samp.c
@@ -113,26 +113,25 @@
gdc.h: $(GD_INCL)gd.h $(GD_INCL)gdfonts.h $(GD_INCL)gdfontt.h $(GD_INCL)gdfontmb.h $(GD_INCL)gdfontg.h $(GD_INCL)gdfontl.h $(GDC_INCL)gifencode.h $(GDC_INCL)array_alloc.h
-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
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c gifencode.c
gifencode.o: gifencode.c gifencode.h $(GDC_INCL)gdc.h
- $(CC) $(CFLAGS) -I$(GD_INCL) -c gifencode.c
+ $(LIBTOOL) --mode=compile $(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
+ $(LIBTOOL) --mode=compile $(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
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(JPEG_DEF) -c gdc.c
gdc.o: gdc.c $(GDC_INCL)gdc.h
- $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -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
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(JPEG_DEF) -c gdc_pie.c
gdc_pie.o: $(GDC_INCL)gdc.h $(GDC_INCL)gdcpie.h gdc_pie.c
- $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc_pie.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -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
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(JPEG_DEF) -c gdchart.c
gdchart.o: $(GDC_INCL)gdc.h $(GDC_INCL)gdchart.h gdchart.c
- $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdchart.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdchart.c
array_alloc.o: array_alloc.c array_alloc.h
- $(CC) $(CFLAGS) -c array_alloc.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c array_alloc.c
-libgdc.a: gifencode.o price_conv.o gdc.o gdc_pie.o gdchart.o array_alloc.o
- ar cr libgdc.a gdc.o gdchart.o gdc_pie.o price_conv.o gifencode.o array_alloc.o
- ranlib libgdc.a
+libgdchart.a: $(LIB_OBJS)
+ $(LIBTOOL) --mode=link $(CC) -o libgdchart.la $(LIB_OBJS:.o=.lo) $(LDFLAGS) -lgd -version-info 0:11 -rpath $(PREFIX)
# --- 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;
+ $(LIBTOOL) --mode=link $(CC) -o libgdchart.la $(LIB_OBJS:.o=.lo) $(LDFLAGS) -lgd -version-info 0:10:0 -rpath $(PREFIX)
@@ -140,9 +139,9 @@
# cd $(GD_LD) ; make -f Makefile $(GD_LIB)
# ----- install -----
-install: gdc.h gdchart.h gdcpie.h gifencode.h libgdc.a
+install: gdc.h gdchart.h gdcpie.h gifencode.h libgdchart.a
cp gdc.h gdchart.h gdcpie.h gifencode.h $(PREFIX_INC)/
- cp libgdc.a $(PREFIX_LIB)/
+ $(LIBTOOL) --mode=install ${BSD_INSTALL_DATA} libgdchart.la ${PREFIX}/lib
# --- clean ---
clean: