aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorvanilla <vanilla@FreeBSD.org>2001-07-16 15:25:22 +0800
committervanilla <vanilla@FreeBSD.org>2001-07-16 15:25:22 +0800
commitb4bc2839bbcb623fe429a03f061a7fa91f8ac3ba (patch)
tree681109d242b6bdd3948bb81ae9757c8ee4eb01df /graphics
parentae0d2da4166ec9aedd9aca21854387f7f46355cb (diff)
downloadfreebsd-ports-gnome-b4bc2839bbcb623fe429a03f061a7fa91f8ac3ba.tar.gz
freebsd-ports-gnome-b4bc2839bbcb623fe429a03f061a7fa91f8ac3ba.tar.zst
freebsd-ports-gnome-b4bc2839bbcb623fe429a03f061a7fa91f8ac3ba.zip
It's pything binding of gdchart.
PR: ports/28242 Submitted by: Hye-Shik Chang <perky@python.or.kr>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/py-gdchart/Makefile41
-rw-r--r--graphics/py-gdchart/distinfo1
-rw-r--r--graphics/py-gdchart/files/patch-Makefile61
-rw-r--r--graphics/py-gdchart/files/patch-gdc_py.c11
-rw-r--r--graphics/py-gdchart/pkg-comment1
-rw-r--r--graphics/py-gdchart/pkg-descr5
-rw-r--r--graphics/py-gdchart/pkg-plist6
8 files changed, 127 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index 2945050eead7..f3c6a8f5036b 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -200,6 +200,7 @@
SUBDIR += ppmcaption
SUBDIR += pstoedit
SUBDIR += pvmpov
+ SUBDIR += py-gdchart
SUBDIR += py-imaging
SUBDIR += py-imaging-handbook
SUBDIR += py-ming
diff --git a/graphics/py-gdchart/Makefile b/graphics/py-gdchart/Makefile
new file mode 100644
index 000000000000..32026c838e73
--- /dev/null
+++ b/graphics/py-gdchart/Makefile
@@ -0,0 +1,41 @@
+# New ports collection makefile for: py-gdchart
+# Date created: 18 June 2001
+# Whom: Hye-Shik Chang <perky@python.or.kr>
+#
+# $FreeBSD$
+
+PORTNAME= gdchart
+PORTVERSION= 0.6
+CATEGORIES= graphics python
+MASTER_SITES= http://athani.pair.com/msteed/software/gdchart/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME}-${PKGNAMEPREFIX}${PORTVERSION}
+
+MAINTAINER= perky@python.or.kr
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libgdchart.a:${PORTSDIR}/graphics/gdchart
+
+USE_PYTHON= yes
+USE_GMAKE= yes
+MAKE_ENV= GD_INCLUDE=${LOCALBASE}/include/gd \
+ GDCHART_INCLUDE=${LOCALBASE}/include \
+ PYTHON_INCLUDE=${PYTHON_INCLUDEDIR} \
+ LOCALBASE=${LOCALBASE}
+PLIST_SUB= 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/${PKGNAMEPREFIX}${PORTNAME}
+
+do-install:
+.for file in ${MODULE_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${PYTHON_SITELIBDIR}
+.endfor
+.if !defined(NO_PORTDOCS)
+ ${MKDIR} ${EXAMPLE_DIR}
+.for file in ${EXAMPLE_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${EXAMPLE_DIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/graphics/py-gdchart/distinfo b/graphics/py-gdchart/distinfo
new file mode 100644
index 000000000000..a6fe4ed5daf2
--- /dev/null
+++ b/graphics/py-gdchart/distinfo
@@ -0,0 +1 @@
+MD5 (gdchart-py-0.6.tar.gz) = 210e5da85a280e2aeecff97ff4fe639b
diff --git a/graphics/py-gdchart/files/patch-Makefile b/graphics/py-gdchart/files/patch-Makefile
new file mode 100644
index 000000000000..d3a4b48a06c6
--- /dev/null
+++ b/graphics/py-gdchart/files/patch-Makefile
@@ -0,0 +1,61 @@
+--- 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
++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/files/patch-gdc_py.c b/graphics/py-gdchart/files/patch-gdc_py.c
new file mode 100644
index 000000000000..9de1d580e48e
--- /dev/null
+++ b/graphics/py-gdchart/files/patch-gdc_py.c
@@ -0,0 +1,11 @@
+--- 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-comment b/graphics/py-gdchart/pkg-comment
new file mode 100644
index 000000000000..c00837235c97
--- /dev/null
+++ b/graphics/py-gdchart/pkg-comment
@@ -0,0 +1 @@
+Python interface to GDChart
diff --git a/graphics/py-gdchart/pkg-descr b/graphics/py-gdchart/pkg-descr
new file mode 100644
index 000000000000..3474e5d54521
--- /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 000000000000..ab22ccfc3d33
--- /dev/null
+++ b/graphics/py-gdchart/pkg-plist
@@ -0,0 +1,6 @@
+%%PYTHON_SITELIBDIR%%/chart.py
+%%PYTHON_SITELIBDIR%%/gdchart.so
+%%PORTDOCS%%%%EXAMPLE_DIR%%/test.html
+%%PORTDOCS%%%%EXAMPLE_DIR%%/test.py
+%%PORTDOCS%%%%EXAMPLE_DIR%%/CHANGES
+@dirrm %%EXAMPLE_DIR%%