summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarcy <darcy@pkgsrc.org>2001-10-18 11:14:39 +0000
committerdarcy <darcy@pkgsrc.org>2001-10-18 11:14:39 +0000
commit70ce630675e1dccbdaaac8785c5c4a57e8315c82 (patch)
treee390169e01ac8f179c60b56543ebc21e8e1cacca
parent3efe7a9482fdf7a4cbf98e44c68a9087b6522f50 (diff)
downloadpkgsrc-70ce630675e1dccbdaaac8785c5c4a57e8315c82.tar.gz
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/
-rw-r--r--graphics/py-gdchart/Makefile40
-rw-r--r--graphics/py-gdchart/distinfo6
-rw-r--r--graphics/py-gdchart/patches/patch-Makefile63
-rw-r--r--graphics/py-gdchart/patches/patch-gdc_py.c13
-rw-r--r--graphics/py-gdchart/pkg/DESCR5
-rw-r--r--graphics/py-gdchart/pkg/PLIST7
6 files changed, 134 insertions, 0 deletions
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 <stdio.h>
+ #include <string.h>
+ #include <assert.h>
++#include <limits.h>
++#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