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/
This commit is contained in:
darcy 2001-10-18 11:14:39 +00:00
parent 3efe7a9482
commit 70ce630675
6 changed files with 134 additions and 0 deletions

View file

@ -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"

View file

@ -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

View file

@ -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)

View file

@ -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 <stdio.h>
#include <string.h>
#include <assert.h>
+#include <limits.h>
+#define MAXSHORT SHRT_MAX
#include "Python.h"
#include "cStringIO.h"

View file

@ -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/

View file

@ -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