mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
- 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>
This commit is contained in:
parent
7ebddf8bcc
commit
3d17564db2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=129830
5 changed files with 37 additions and 46 deletions
|
@ -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
|
||||
@${MKDIR} ${WRKSRC}
|
||||
@${CP} ${DISTDIR}/graphviz/gv.i ${FILESDIR}/Makefile ${WRKSRC}
|
||||
|
||||
pre-build:
|
||||
@cd ${WRKSRC} && ${SWIG_CMD} -python gv.i
|
||||
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>
|
||||
|
|
|
@ -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
|
||||
|
|
12
graphics/py-graphviz/files/Makefile
Normal file
12
graphics/py-graphviz/files/Makefile
Normal file
|
@ -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
|
|
@ -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)])]
|
||||
)
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue