It's pything binding of gdchart.
PR: ports/28242 Submitted by: Hye-Shik Chang <perky@python.or.kr>
This commit is contained in:
parent
fc652a2fca
commit
be87fe2098
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=45160
8 changed files with 127 additions and 0 deletions
|
@ -200,6 +200,7 @@
|
|||
SUBDIR += ppmcaption
|
||||
SUBDIR += pstoedit
|
||||
SUBDIR += pvmpov
|
||||
SUBDIR += py-gdchart
|
||||
SUBDIR += py-imaging
|
||||
SUBDIR += py-imaging-handbook
|
||||
SUBDIR += py-ming
|
||||
|
|
41
graphics/py-gdchart/Makefile
Normal file
41
graphics/py-gdchart/Makefile
Normal file
|
@ -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>
|
1
graphics/py-gdchart/distinfo
Normal file
1
graphics/py-gdchart/distinfo
Normal file
|
@ -0,0 +1 @@
|
|||
MD5 (gdchart-py-0.6.tar.gz) = 210e5da85a280e2aeecff97ff4fe639b
|
61
graphics/py-gdchart/files/patch-Makefile
Normal file
61
graphics/py-gdchart/files/patch-Makefile
Normal file
|
@ -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)
|
11
graphics/py-gdchart/files/patch-gdc_py.c
Normal file
11
graphics/py-gdchart/files/patch-gdc_py.c
Normal file
|
@ -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"
|
1
graphics/py-gdchart/pkg-comment
Normal file
1
graphics/py-gdchart/pkg-comment
Normal file
|
@ -0,0 +1 @@
|
|||
Python interface to GDChart
|
5
graphics/py-gdchart/pkg-descr
Normal file
5
graphics/py-gdchart/pkg-descr
Normal 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/
|
6
graphics/py-gdchart/pkg-plist
Normal file
6
graphics/py-gdchart/pkg-plist
Normal file
|
@ -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%%
|
Loading…
Reference in a new issue