aboutsummaryrefslogtreecommitdiff
path: root/graphics/gdchart
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2002-09-15 12:10:35 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2002-09-15 12:10:35 +0000
commitadc76a287bdc4a1751c67649476e587bce30938f (patch)
tree1283f9cf4eddb68ced194da2b1514d2ba267aa35 /graphics/gdchart
parent665f0c659d4d2e70e878364d68705b9acfc6cb87 (diff)
downloadports-adc76a287bdc4a1751c67649476e587bce30938f.tar.gz
ports-adc76a287bdc4a1751c67649476e587bce30938f.zip
- Update to 0.11.2dev.
- Use a BSD Makefile rather than messing with the bundled one. Currently no shlib is provided since the library's global variables are not properly exported. (Could be fixed in future) - Take maintainership.
Notes
Notes: svn path=/head/; revision=66357
Diffstat (limited to 'graphics/gdchart')
-rw-r--r--graphics/gdchart/Makefile56
-rw-r--r--graphics/gdchart/distinfo2
-rw-r--r--graphics/gdchart/files/Makefile26
-rw-r--r--graphics/gdchart/files/patch-gdc.h11
-rw-r--r--graphics/gdchart/files/patch-gdchart.c29
-rw-r--r--graphics/gdchart/files/patch-makefile123
-rw-r--r--graphics/gdchart/pkg-plist12
7 files changed, 65 insertions, 194 deletions
diff --git a/graphics/gdchart/Makefile b/graphics/gdchart/Makefile
index c9c5712549c4..a255d7f34cab 100644
--- a/graphics/gdchart/Makefile
+++ b/graphics/gdchart/Makefile
@@ -6,44 +6,50 @@
#
PORTNAME= gdchart
-PORTVERSION= 0.10.1
-PORTREVISION= 1
+PORTVERSION= 0.11.2
CATEGORIES= graphics
MASTER_SITES= http://www.fred.net/brv/chart/ \
ftp://ftp.nuug.no/pub/anders/distfiles/
DISTNAME= ${PORTNAME}${PORTVERSION}dev
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= knu@FreeBSD.org
-LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd
+LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd \
+ jpeg:${PORTSDIR}/graphics/jpeg \
+ freetype:${PORTSDIR}/print/freetype2
USE_REINPLACE= yes
-MAKEFILE= makefile
-WRKSRC= ${WRKDIR}/${DISTNAME}
+MAKEFILE= ${FILESDIR}/Makefile
+MAKE_ARGS= PREFIX="${PREFIX}" LOCALBASE="${LOCALBASE}"
-post-patch:
- ${REINPLACE_CMD} -e 's/^#ifdef HAVE_JPEG/#ifndef NO_JPEG/' ${WRKSRC}/*.[ch]
+DOCS= README
+EXAMPLES= ft_samp.c gdc_pie_samp.c gdc_samp1.c gdc_samp2.c
-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-patch:
+ ${REINPLACE_CMD} \
+ -e 's/^#ifdef HAVE_JPEG/#ifndef NO_JPEG/' \
+ -e 's/^#ifdef HAVE_LIBFREETYPE/#ifndef NO_LIBFREETYPE/' \
+ ${WRKSRC}/*.[ch]
+# ft_samp.c and gdc_samp?.c miss #include "gdcpie.h"
+ ${REINPLACE_CMD} \
+ -e 's/^#include "gdc\.h"/#include "gdcpie.h"/' \
+ ${WRKSRC}/ft_samp.c \
+ ${WRKSRC}/gdc_samp?.c
+# gdc_pie_samp.c misses #include "gdchart.h"
+ ${REINPLACE_CMD} \
+ -e 's/^#include "gdc\.h"/#include "gdchart.h"/' \
+ ${WRKSRC}/gdc_pie_samp.c
.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}/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} "================================================================================"
+.for f in ${DOCS}
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/
+.endfor
+.for f in ${EXAMPLES}
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${EXAMPLESDIR}/
+.endfor
.endif
.include <bsd.port.mk>
diff --git a/graphics/gdchart/distinfo b/graphics/gdchart/distinfo
index 36408ba470c4..72473ea3cb6c 100644
--- a/graphics/gdchart/distinfo
+++ b/graphics/gdchart/distinfo
@@ -1 +1 @@
-MD5 (gdchart0.10.1dev.tar.gz) = d40cba84e7532508ee1637133b6179ee
+MD5 (gdchart0.11.2dev.tar.gz) = 340984a5b38821695b21b6f0f2379317
diff --git a/graphics/gdchart/files/Makefile b/graphics/gdchart/files/Makefile
new file mode 100644
index 000000000000..d95829174806
--- /dev/null
+++ b/graphics/gdchart/files/Makefile
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+LIB= gdc
+CFLAGS+= -I${LOCALBASE}/include
+LDADD= -L${LOCALBASE}/lib \
+ -lgd \
+ -ljpeg \
+ -lfreetype
+SRCS= array_alloc.c \
+ gdc.c \
+ gdc_pie.c \
+ gdchart.c \
+ gifencode.c \
+ price_conv.c
+INCS= gdc.h \
+ gdchart.h \
+ gdcpie.h \
+ gifencode.h
+NOMAN= YES
+PREFIX?= /usr/local
+LOCALBASE?= /usr/local
+LIBDIR= ${PREFIX}/lib
+INCSDIR= ${PREFIX}/include
+INCDIR= ${INCSDIR} # for pre-bsd.incs.mk API
+
+.include <bsd.lib.mk>
diff --git a/graphics/gdchart/files/patch-gdc.h b/graphics/gdchart/files/patch-gdc.h
deleted file mode 100644
index 1143a8acac6c..000000000000
--- a/graphics/gdchart/files/patch-gdc.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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/files/patch-gdchart.c b/graphics/gdchart/files/patch-gdchart.c
deleted file mode 100644
index 24e151a02e6b..000000000000
--- a/graphics/gdchart/files/patch-gdchart.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- 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/files/patch-makefile b/graphics/gdchart/files/patch-makefile
deleted file mode 100644
index 5386685462af..000000000000
--- a/graphics/gdchart/files/patch-makefile
+++ /dev/null
@@ -1,123 +0,0 @@
---- 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
-+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-plist b/graphics/gdchart/pkg-plist
index 1995c922cd22..9a925c1d07e8 100644
--- a/graphics/gdchart/pkg-plist
+++ b/graphics/gdchart/pkg-plist
@@ -1,10 +1,12 @@
-lib/libgdchart.a
-include/gdchart.h
include/gdc.h
+include/gdchart.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
+lib/libgdc.a
%%PORTDOCS%%share/doc/gdchart/README
%%PORTDOCS%%@dirrm share/doc/gdchart
+%%PORTDOCS%%share/examples/gdchart/ft_samp.c
+%%PORTDOCS%%share/examples/gdchart/gdc_samp1.c
+%%PORTDOCS%%share/examples/gdchart/gdc_samp2.c
+%%PORTDOCS%%share/examples/gdchart/gdc_pie_samp.c
+%%PORTDOCS%%@dirrm share/examples/gdchart