ports/78069: [PATCH] graphics/py24-graphviz: fix unfetchable, improve build
Sam Lawrance
boris at brooknet.com.au
Fri Feb 25 13:40:12 UTC 2005
>Number: 78069
>Category: ports
>Synopsis: [PATCH] graphics/py24-graphviz: fix unfetchable, improve build
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 25 13:40:11 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Sam Lawrance
>Release: FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD dirk.no.domain 5.3-STABLE FreeBSD 5.3-STABLE #3: Wed Feb 9 00:12:24 EST
>Description:
- 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.
I'm no python programmer, but a quick test showed the calls
through to the native library to be working.
(the graphviz tarball was the unfetchable item)
>How-To-Repeat:
>Fix:
--- py24-graphviz-0.1_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/FreeBSD/ports/graphics/py-graphviz/Makefile,v
retrieving revision 1.6
diff -u -u -r1.6 Makefile
--- Makefile 31 Mar 2003 04:18:46 -0000 1.6
+++ Makefile 25 Feb 2005 13:31:58 -0000
@@ -8,35 +8,42 @@
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 at 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>
Index: distinfo
===================================================================
RCS file: /home/ncvs/FreeBSD/ports/graphics/py-graphviz/distinfo,v
retrieving revision 1.3
diff -u -u -r1.3 distinfo
--- distinfo 29 Jan 2004 07:24:29 -0000 1.3
+++ distinfo 25 Feb 2005 11:40:46 -0000
@@ -2,5 +2,3 @@
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
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/FreeBSD/ports/graphics/py-graphviz/pkg-plist,v
retrieving revision 1.2
diff -u -u -r1.2 pkg-plist
--- pkg-plist 23 Aug 2002 11:30:21 -0000 1.2
+++ pkg-plist 25 Feb 2005 13:05:04 -0000
@@ -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
--- py24-graphviz-0.1_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list