From 70ce630675e1dccbdaaac8785c5c4a57e8315c82 Mon Sep 17 00:00:00 2001 From: darcy Date: Thu, 18 Oct 2001 11:14:39 +0000 Subject: Adding py-gdchart to packages. This is a simple python interface to gdchart which is excellent for creating charts and graphs in PNG, JPEG, and GIF format. WWW: http://athani.pair.com/msteed/software/gdchart/ --- graphics/py-gdchart/Makefile | 40 +++++++++++++++++++ graphics/py-gdchart/distinfo | 6 +++ graphics/py-gdchart/patches/patch-Makefile | 63 ++++++++++++++++++++++++++++++ graphics/py-gdchart/patches/patch-gdc_py.c | 13 ++++++ graphics/py-gdchart/pkg/DESCR | 5 +++ graphics/py-gdchart/pkg/PLIST | 7 ++++ 6 files changed, 134 insertions(+) create mode 100644 graphics/py-gdchart/Makefile create mode 100644 graphics/py-gdchart/distinfo create mode 100644 graphics/py-gdchart/patches/patch-Makefile create mode 100644 graphics/py-gdchart/patches/patch-gdc_py.c create mode 100644 graphics/py-gdchart/pkg/DESCR create mode 100644 graphics/py-gdchart/pkg/PLIST (limited to 'graphics/py-gdchart') diff --git a/graphics/py-gdchart/Makefile b/graphics/py-gdchart/Makefile new file mode 100644 index 00000000000..79d04fc6379 --- /dev/null +++ b/graphics/py-gdchart/Makefile @@ -0,0 +1,40 @@ +# $NetBSD: Makefile,v 1.1 2001/10/18 11:14:39 darcy Exp $ +# FreeBSD Id: ports/graphics/py-gdchart/Makefile,v 1.2 2001/09/16 17:27:58 kevlo Exp + +DISTNAME= gdchart-py-0.6 +PKGNAME= py-gdchart-0.6 +WRKSRC= ${WRKDIR}/${DISTNAME} +CATEGORIES= graphics python +MASTER_SITES= http://athani.pair.com/msteed/software/gdchart/ + +MAINTAINER= packages@netbsd.org +HOMEPAGE= http://athani.pair.com/msteed/software/gdchart/ +COMMENT= Python interface to GDChart + +BUILD_DEPENDS= gdchart-0.10.1*:../../graphics/gdchart + +USE_PYTHON= yes +USE_GMAKE= yes +MAKE_ENV= GD_INCLUDE=${LOCALBASE}/include \ + GDCHART_INCLUDE=${LOCALBASE}/include \ + PYTHON_INCLUDE=${LOCALBASE}/include/python2.0 \ + LOCALBASE=${LOCALBASE} +PLIST_SUBST= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g} \ + EXAMPLE_DIR=${EXAMPLE_DIR:S/^${LOCALBASE}\///g} +MODULE_FILES= chart.py gdchart.so +EXAMPLE_FILES= test.html test.py CHANGES +EXAMPLE_DIR= ${PREFIX}/share/examples/py-gdchart + +do-install: +.for f in ${MODULE_FILES} + ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/lib/python2.0/site-packages +.endfor +.if !defined(NO_PKGDOCS) + #${MKDIR} ${EXAMPLE_DIR} + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/py-gdchart +.for f in ${EXAMPLE_FILES} + ${INSTALL_DATA} ${WRKSRC}/${f} ${EXAMPLE_DIR} +.endfor +.endif + +.include "../../mk/bsd.pkg.mk" diff --git a/graphics/py-gdchart/distinfo b/graphics/py-gdchart/distinfo new file mode 100644 index 00000000000..1109569b7e7 --- /dev/null +++ b/graphics/py-gdchart/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2001/10/18 11:14:39 darcy Exp $ + +SHA1 (gdchart-py-0.6.tar.gz) = 20547e8550bb8c925a3b9776739f9a5e93ce8692 +Size (gdchart-py-0.6.tar.gz) = 321891 bytes +SHA1 (patch-Makefile) = 477519d0493bd69e2b33f5861b36d1d19275ed96 +SHA1 (patch-gdc_py.c) = aeaca3dc2ca2a0ccb586b7da58e55d41b703abfc diff --git a/graphics/py-gdchart/patches/patch-Makefile b/graphics/py-gdchart/patches/patch-Makefile new file mode 100644 index 00000000000..11b75d80f77 --- /dev/null +++ b/graphics/py-gdchart/patches/patch-Makefile @@ -0,0 +1,63 @@ +$NetBSD: patch-Makefile,v 1.1 2001/10/18 11:14:39 darcy Exp $ + +--- Makefile.orig Sat Mar 17 04:08:18 2001 ++++ Makefile Mon Jun 18 16:57:12 2001 +@@ -12,10 +12,10 @@ + # SO Extension for shared libs. + + HAVE_JPEG = 1 +-PY_INCLUDE = -I/usr/local/include/python2.0 +-LIB_DIRS = -L/usr/local/lib -L/usr/lib +-GCC = gcc +-CFLAGS = -Wall -fpic -O2 ++INC_DIRS = -I${GDCHART_INCLUDE} -I$(GD_INCLUDE) -I$(PYTHON_INCLUDE) ++LIB_DIRS = -L${LOCALBASE}/lib -L/usr/lib -Wl,-R${LOCALBASE}/lib ++GCC = ${CC} ++CFLAGS ?= -Wall -fpic -O2 + + # Linux + LD = $(GCC) -shared +@@ -31,20 +31,14 @@ + + # Shouldn't need to touch anything below this point. + +-GD = gd-1.8.4 +-LIBGD = $(GD)/libgd.a +- +-GDCHART = gdchart0.10.1dev +-LIBGDCHART = $(GDCHART)/libgdchart.a +- + DEFS = + ifeq ($(HAVE_JPEG),1) + DEFS += -DHAVE_JPEG + LIBJPEG = -ljpeg + endif + +-CFLAGS += -I$(GDCHART) $(PY_INCLUDE) $(DEFS) +-LDFLAGS = -L$(GDCHART) -L$(GD) $(LIB_DIRS) ++CFLAGS += ${INC_DIRS} $(DEFS) ++LDFLAGS = $(LIB_DIRS) + LDLIBS = -lgdchart -lgd -lpng -lz $(LIBJPEG) + + TARGET = gdchart$(SO) +@@ -53,19 +47,11 @@ + + all: $(TARGET) + +-$(TARGET): $(LIBGD) $(LIBGDCHART) $(PY_OBJ) ++$(TARGET): $(PY_OBJ) + $(LD) $(PY_OBJ) $(LDFLAGS) $(LDLIBS) -o $@ + + $(PY_OBJ): $(PY_SRC) + $(GCC) -c $(CFLAGS) $< + +-$(LIBGD): +- make -C $(GD) libgd.a HAVE_JPEG=$(HAVE_JPEG) +- +-$(LIBGDCHART): +- make -C $(GDCHART) libgdchart.a HAVE_JPEG=$(HAVE_JPEG) +- + clean: +- -make -C $(GD) clean +- -make -C $(GDCHART) clean + -rm -f $(TARGET) $(PY_OBJ) diff --git a/graphics/py-gdchart/patches/patch-gdc_py.c b/graphics/py-gdchart/patches/patch-gdc_py.c new file mode 100644 index 00000000000..22ad1ec7de9 --- /dev/null +++ b/graphics/py-gdchart/patches/patch-gdc_py.c @@ -0,0 +1,13 @@ +$NetBSD: patch-gdc_py.c,v 1.1 2001/10/18 11:14:39 darcy Exp $ + +--- gdc_py.c.orig Sat Mar 17 04:06:08 2001 ++++ gdc_py.c Mon Jun 18 17:03:24 2001 +@@ -33,6 +33,8 @@ + #include + #include + #include ++#include ++#define MAXSHORT SHRT_MAX + + #include "Python.h" + #include "cStringIO.h" diff --git a/graphics/py-gdchart/pkg/DESCR b/graphics/py-gdchart/pkg/DESCR new file mode 100644 index 00000000000..3474e5d5452 --- /dev/null +++ b/graphics/py-gdchart/pkg/DESCR @@ -0,0 +1,5 @@ +This is a simple python interface to gdchart which is +excellent for creating charts and graphs in PNG, JPEG, +and GIF format. + +WWW: http://athani.pair.com/msteed/software/gdchart/ diff --git a/graphics/py-gdchart/pkg/PLIST b/graphics/py-gdchart/pkg/PLIST new file mode 100644 index 00000000000..daad7272d13 --- /dev/null +++ b/graphics/py-gdchart/pkg/PLIST @@ -0,0 +1,7 @@ +@comment $NetBSD: PLIST,v 1.1 2001/10/18 11:14:39 darcy Exp $ +lib/python2.0/site-packages/chart.py +lib/python2.0/site-packages/gdchart.so +share/examples/py-gdchart/test.html +share/examples/py-gdchart/test.py +share/examples/py-gdchart/CHANGES +@dirrm share/examples/py-gdchart -- cgit v1.2.3