aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorperky <perky@FreeBSD.org>2002-07-18 13:55:53 +0800
committerperky <perky@FreeBSD.org>2002-07-18 13:55:53 +0800
commit25aac3f8a422a75b5d413cb50e062ae74ba709b2 (patch)
treee9b4cedaf2d60c6be0bf1d2f0a59ad5c565edbbc
parentbc439a4db9b044ff7504765fb7fe252fa0e5e593 (diff)
downloadfreebsd-ports-graphics-25aac3f8a422a75b5d413cb50e062ae74ba709b2.tar.gz
freebsd-ports-graphics-25aac3f8a422a75b5d413cb50e062ae74ba709b2.tar.zst
freebsd-ports-graphics-25aac3f8a422a75b5d413cb50e062ae74ba709b2.zip
Update to 0.6.1
-rw-r--r--graphics/py-gdchart/Makefile30
-rw-r--r--graphics/py-gdchart/distinfo2
-rw-r--r--graphics/py-gdchart/files/patch-Makefile61
-rw-r--r--graphics/py-gdchart/files/patch-gdc_py.c7
-rw-r--r--graphics/py-gdchart/files/setup.py14
-rw-r--r--graphics/py-gdchart/pkg-plist9
6 files changed, 37 insertions, 86 deletions
diff --git a/graphics/py-gdchart/Makefile b/graphics/py-gdchart/Makefile
index cc5f3be9365..4941aed87a0 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 2cde96c2513..6ee4f4124d5 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 d3a4b48a06c..00000000000
--- 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 9de1d580e48..ac1a1c7ee65 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 00000000000..046d2901a85
--- /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 ab22ccfc3d3..5823a1db661 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