aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-02-26 21:23:05 +0800
committerpav <pav@FreeBSD.org>2005-02-26 21:23:05 +0800
commitfc71b2886c7f172a27478eb6ee5444b23a8c8923 (patch)
treef1f72d78b01a020348b78029993afd79e2704f8f /graphics
parent04771e13dac46b900e774fb34733ef52ea22ebfe (diff)
downloadfreebsd-ports-gnome-fc71b2886c7f172a27478eb6ee5444b23a8c8923.tar.gz
freebsd-ports-gnome-fc71b2886c7f172a27478eb6ee5444b23a8c8923.tar.zst
freebsd-ports-gnome-fc71b2886c7f172a27478eb6ee5444b23a8c8923.zip
- Remove files/setup.py
- Add files/Makefile - Rather than build from port's own download of graphviz, depend on the graphviz port and use its shared objects. (Fixes fetch problem) PR: ports/78069 Submitted by: Sam Lawrance <boris@brooknet.com.au>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/py-graphviz/Makefile39
-rw-r--r--graphics/py-graphviz/distinfo2
-rw-r--r--graphics/py-graphviz/files/Makefile12
-rw-r--r--graphics/py-graphviz/files/setup.py27
-rw-r--r--graphics/py-graphviz/pkg-plist5
5 files changed, 38 insertions, 47 deletions
diff --git a/graphics/py-graphviz/Makefile b/graphics/py-graphviz/Makefile
index 6664ce9b7194..af7f1bc0d660 100644
--- a/graphics/py-graphviz/Makefile
+++ b/graphics/py-graphviz/Makefile
@@ -8,35 +8,42 @@ PORTNAME= graphviz
PORTVERSION= 0.1
PORTREVISION= 1
CATEGORIES= graphics python
-MASTER_SITES= http://www.cs.brown.edu/~er/software/Agraph.py/ \
- http://www.graphviz.org/pub/graphviz/ARCHIVE/:gv
+MASTER_SITES= http://www.cs.brown.edu/~er/software/Agraph.py/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
-DISTFILES= ${MODFILES} ${PORTNAME}-${GV_VERSION}.tar.gz:gv
+DISTFILES= gv.i __init__.py
DIST_SUBDIR= ${PORTNAME}
-EXTRACT_ONLY= ${PORTNAME}-${GV_VERSION}.tar.gz
+EXTRACT_ONLY=
MAINTAINER= ports@FreeBSD.org
COMMENT= Python interface to GraphViz agraph
-BUILD_DEPENDS= ${SWIG_CMD}:${PORTSDIR}/devel/swig13
+BUILD_DEPENDS= ${SWIG_CMD}:${PORTSDIR}/devel/swig13 \
+ ${LOCALBASE}/lib/graphviz/libagraph.so:${PORTSDIR}/graphics/graphviz
NO_CDROM= "Can't be included in a commercial product"
-MODFILES= gv.i __init__.py
-WRKSRC= ${WRKDIR}/graphviz-${GV_VERSION}/agraph
-GV_VERSION?= 1.9
-
USE_PYTHON= yes
-USE_PYDISTUTILS= yes
SWIG_CMD= ${LOCALBASE}/bin/swig1.3
PLIST_SUB= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S,^${LOCALBASE}/,,g}
+GV_PORT= ${PORTSDIR}/graphics/graphviz
+MAKE_ENV= PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR} \
+ GRAPHVIZ_INCLUDEDIR=${LOCALBASE}/include/graphviz \
+ SWIG_CMD=${SWIG_CMD}
post-patch:
- @${CP} ${DISTDIR}/graphviz/gv.i ${FILESDIR}/setup.py ${WRKSRC}
- @${MKDIR} ${WRKSRC}/graphviz
- @${CP} ${DISTDIR}/graphviz/__init__.py ${WRKSRC}/graphviz
-
-pre-build:
- @cd ${WRKSRC} && ${SWIG_CMD} -python gv.i
+ @${MKDIR} ${WRKSRC}
+ @${CP} ${DISTDIR}/graphviz/gv.i ${FILESDIR}/Makefile ${WRKSRC}
+
+do-install:
+ ${MKDIR} ${PYTHON_SITELIBDIR}/${PORTNAME}
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/__init__.py \
+ ${WRKSRC}/_graphviz.so ${WRKSRC}/graphviz.py \
+ ${PYTHON_SITELIBDIR}/${PORTNAME}
+
+post-install:
+ ${PYTHON_CMD} ${PYTHON_LIBDIR}/py_compile.py \
+ ${PYTHON_SITELIBDIR}/${PORTNAME}/__init__.py
+ ${PYTHON_CMD} ${PYTHON_LIBDIR}/py_compile.py \
+ ${PYTHON_SITELIBDIR}/${PORTNAME}/graphviz.py
.include <bsd.port.mk>
diff --git a/graphics/py-graphviz/distinfo b/graphics/py-graphviz/distinfo
index ddee67c15880..93af1a0338df 100644
--- a/graphics/py-graphviz/distinfo
+++ b/graphics/py-graphviz/distinfo
@@ -2,5 +2,3 @@ MD5 (graphviz/gv.i) = 97e21a6cd9a797851cad815e68a6c81d
SIZE (graphviz/gv.i) = 5246
MD5 (graphviz/__init__.py) = aaad44b12a9db8876c18bcb7edcfc28b
SIZE (graphviz/__init__.py) = 8880
-MD5 (graphviz/graphviz-1.9.tar.gz) = 5f8d1e1f15594f4869fc9c68f32e7dbb
-SIZE (graphviz/graphviz-1.9.tar.gz) = 3173162
diff --git a/graphics/py-graphviz/files/Makefile b/graphics/py-graphviz/files/Makefile
new file mode 100644
index 000000000000..50e3f8f254f2
--- /dev/null
+++ b/graphics/py-graphviz/files/Makefile
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+all: _graphviz.so
+
+_graphviz.so: gv_wrap.o
+ ${CC} -shared ${LOCALBASE}/lib/graphviz/libagraph.so ${LOCALBASE}/lib/graphviz/libcdt.so gv_wrap.o -o _graphviz.so
+
+gv_wrap.o: gv_wrap.c
+ ${CC} -fno-strict-aliasing -DNDEBUG -O -pipe -DTHREAD_STACK_SIZE=0x20000 -fPIC -Dulong=u_long -DVERSION="py-agraph 1.0" -I${GRAPHVIZ_INCLUDEDIR} -I${PYTHON_INCLUDEDIR} ${CFLAGS} -c gv_wrap.c
+
+gv_wrap.c:
+ ${SWIG_CMD} -python gv.i
diff --git a/graphics/py-graphviz/files/setup.py b/graphics/py-graphviz/files/setup.py
deleted file mode 100644
index 8ffd3cea8a0a..000000000000
--- a/graphics/py-graphviz/files/setup.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# $FreeBSD$
-
-from distutils.core import setup, Extension
-
-VERSION = '"py-agraph 1.0"'
-agraph_srcs = [
- 'apply.c', 'attr.c', 'edge.c', 'agerror.c', 'flatten.c',
- 'grammar.c', 'graph.c', 'id.c', 'imap.c', 'io.c', 'mem.c',
- 'node.c', 'obj.c', 'pend.c', 'rec.c', 'refstr.c', 'scan.c',
- 'subg.c', 'utils.c', 'write.c'
-]
-cdt_srcs = [
- 'dtclose.c', 'dtdisc.c', 'dtflatten.c', 'dthash.c', 'dtmethod.c',
- 'dtopen.c', 'dtsize.c', 'dtextract.c', 'dtrestore.c', 'dtlist.c',
- 'dtstat.c', 'dttree.c', 'dtview.c', 'dtrenew.c', 'dtwalk.c', 'dtstrhash.c'
-]
-cdt_srcs = ['../cdt/'+f for f in cdt_srcs]
-
-setup(name = 'graphviz',
- version = '0.1',
- description = 'Python Interface to GraphViz',
- author = 'Manos Renieris',
- packages = ['graphviz'],
- ext_modules = [Extension('graphviz.graphviz', ['gv_wrap.c'] + cdt_srcs + agraph_srcs,
- include_dirs=['../cdt', '.'],
- define_macros=[('ulong','u_long'), ('VERSION', VERSION)])]
-)
diff --git a/graphics/py-graphviz/pkg-plist b/graphics/py-graphviz/pkg-plist
index c2f4a3bf7cdf..4703e9104894 100644
--- a/graphics/py-graphviz/pkg-plist
+++ b/graphics/py-graphviz/pkg-plist
@@ -1,5 +1,6 @@
%%PYTHON_SITELIBDIR%%/graphviz/__init__.py
%%PYTHON_SITELIBDIR%%/graphviz/__init__.pyc
-%%PYTHON_SITELIBDIR%%/graphviz/__init__.pyo
-%%PYTHON_SITELIBDIR%%/graphviz/graphviz.so
+%%PYTHON_SITELIBDIR%%/graphviz/graphviz.py
+%%PYTHON_SITELIBDIR%%/graphviz/graphviz.pyc
+%%PYTHON_SITELIBDIR%%/graphviz/_graphviz.so
@dirrm %%PYTHON_SITELIBDIR%%/graphviz