diff options
author | Hye-Shik Chang <perky@FreeBSD.org> | 2002-07-18 05:55:53 +0000 |
---|---|---|
committer | Hye-Shik Chang <perky@FreeBSD.org> | 2002-07-18 05:55:53 +0000 |
commit | 1f9a05157f75bb9f807b980ba33caaae84d99037 (patch) | |
tree | c4fb49f80c0eae516ee89bf7cf13c367ad6912cf | |
parent | ad51c902f6d83f3ed5627521fddcd696705bd8fd (diff) | |
download | ports-1f9a05157f75bb9f807b980ba33caaae84d99037.tar.gz ports-1f9a05157f75bb9f807b980ba33caaae84d99037.zip |
Notes
-rw-r--r-- | graphics/py-gdchart/Makefile | 30 | ||||
-rw-r--r-- | graphics/py-gdchart/distinfo | 2 | ||||
-rw-r--r-- | graphics/py-gdchart/files/patch-Makefile | 61 | ||||
-rw-r--r-- | graphics/py-gdchart/files/patch-gdc_py.c | 7 | ||||
-rw-r--r-- | graphics/py-gdchart/files/setup.py | 14 | ||||
-rw-r--r-- | graphics/py-gdchart/pkg-plist | 9 |
6 files changed, 37 insertions, 86 deletions
diff --git a/graphics/py-gdchart/Makefile b/graphics/py-gdchart/Makefile index cc5f3be93652..4941aed87a00 100644 --- a/graphics/py-gdchart/Makefile +++ b/graphics/py-gdchart/Makefile @@ -5,33 +5,29 @@ # $FreeBSD$ PORTNAME= gdchart -PORTVERSION= 0.6 -PORTREVISION= 2 +PORTVERSION= 0.6.1 CATEGORIES= graphics python MASTER_SITES= http://www.nullcube.com/software/pygdchart/source/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -DISTNAME= ${PORTNAME}-py-${PORTVERSION} +DISTNAME= pygdchart-${PORTVERSION} MAINTAINER= perky@FreeBSD.org 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} +USE_PYDISTUTILS=yes +EXAMPLE_FILES= test.html test.py +EXAMPLE_DIR= ${PREFIX}/share/examples/py-gdchart -do-install: -.for file in ${MODULE_FILES} - ${INSTALL_DATA} ${WRKSRC}/${file} ${PYTHON_SITELIBDIR} -.endfor +post-extract: + ${SED} -e 's,%%PORTVERSION%%,${PORTVERSION},g' \ + -e 's,%%GD_INCLUDE%%,${LOCALBASE}/include/gd,g' \ + -e 's,%%GDCHART_INCLUDE%%,${LOCALBASE}/include,g' \ + -e 's,%%LOCALLIB%%,${LOCALBASE}/lib,g' \ + ${FILESDIR}/setup.py > ${WRKSRC}/setup.py + +post-install: .if !defined(NO_PORTDOCS) ${MKDIR} ${EXAMPLE_DIR} .for file in ${EXAMPLE_FILES} diff --git a/graphics/py-gdchart/distinfo b/graphics/py-gdchart/distinfo index 2cde96c25137..6ee4f4124d50 100644 --- a/graphics/py-gdchart/distinfo +++ b/graphics/py-gdchart/distinfo @@ -1 +1 @@ -MD5 (gdchart-py-0.6.tar.gz) = 35cd2f09cc584767b479392167e6a9fb +MD5 (pygdchart-0.6.1.tar.gz) = 198d16c3620bd5c8585746e14d26c2b3 diff --git a/graphics/py-gdchart/files/patch-Makefile b/graphics/py-gdchart/files/patch-Makefile deleted file mode 100644 index d3a4b48a06c6..000000000000 --- a/graphics/py-gdchart/files/patch-Makefile +++ /dev/null @@ -1,61 +0,0 @@ ---- 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 index 9de1d580e48e..ac1a1c7ee65b 100644 --- a/graphics/py-gdchart/files/patch-gdc_py.c +++ b/graphics/py-gdchart/files/patch-gdc_py.c @@ -1,11 +1,12 @@ ---- 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 @@ +--- gdc_py.c.orig Mon Feb 25 19:36:07 2002 ++++ gdc_py.c Thu Jul 18 14:52:48 2002 +@@ -26,6 +26,9 @@ #include <stdio.h> #include <string.h> #include <assert.h> +#include <limits.h> +#define MAXSHORT SHRT_MAX ++#define HAVE_JPEG 1 #include "Python.h" #include "cStringIO.h" diff --git a/graphics/py-gdchart/files/setup.py b/graphics/py-gdchart/files/setup.py new file mode 100644 index 000000000000..046d2901a852 --- /dev/null +++ b/graphics/py-gdchart/files/setup.py @@ -0,0 +1,14 @@ +from distutils.core import setup, Extension + +setup( + name = 'gdchart', + version = "%%PORTVERSION%%", + py_modules = ["chart"], + ext_modules = [ + Extension("gdchart", ["gdc_py.c"], + include_dirs=["%%GD_INCLUDE%%", "%%GDCHART_INCLUDE%%"], + libraries=["gdchart", "gd", "png", "z", "jpeg"], + library_dirs=["%%LOCALLIB%%"] + ) + ] +) diff --git a/graphics/py-gdchart/pkg-plist b/graphics/py-gdchart/pkg-plist index ab22ccfc3d33..5823a1db6619 100644 --- a/graphics/py-gdchart/pkg-plist +++ b/graphics/py-gdchart/pkg-plist @@ -1,6 +1,7 @@ %%PYTHON_SITELIBDIR%%/chart.py +%%PYTHON_SITELIBDIR%%/chart.pyc +%%PYTHON_SITELIBDIR%%/chart.pyo %%PYTHON_SITELIBDIR%%/gdchart.so -%%PORTDOCS%%%%EXAMPLE_DIR%%/test.html -%%PORTDOCS%%%%EXAMPLE_DIR%%/test.py -%%PORTDOCS%%%%EXAMPLE_DIR%%/CHANGES -@dirrm %%EXAMPLE_DIR%% +%%PORTDOCS%%share/examples/py-gdchart/test.html +%%PORTDOCS%%share/examples/py-gdchart/test.py +%%PORTDOCS%%@dirrm share/examples/py-gdchart |