aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/py-graph-dot/Makefile
blob: 79754b5ec2efd2d0a8a502efecab5e5b6db493d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# New ports collection makefile for:    py-graph
# Date created:     2008-08-29
# Whom:         Yi-Jheng Lin <yzlin@cs.nctu.edu.tw>
#
# $FreeBSD$
#

PORTNAME=   graph
PORTVERSION=    1.5.0
CATEGORIES= graphics python
MASTER_SITES=   ${MASTER_SITE_GOOGLE_CODE}
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   python-graph-${PORTVERSION}

MAINTAINER= yzlin@cs.nctu.edu.tw
COMMENT=    A library for working with graphs in Python

RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}pydot>=0:${PORTSDIR}/graphics/py-pydot

PROJECTHOST=    python-graph
USE_PYTHON= yes
USE_PYDISTUTILS=    easy_install
PYDISTUTILS_PKGNAME=    python-graph

WRKSRC=     ${WRKDIR}/${PYDISTUTILS_PKGNAME}

USE_BZIP2=  yes

DOCSDIR=    ${PREFIX}/share/doc/py-${PORTNAME}
EXAMPLESDIR=    ${PREFIX}/share/examples/py-${PORTNAME}

TESTFILES=  unittests-accessibility.py \
        unittests-cycles.py \
        unittests-digraph.py \
        unittests-filters.py \
        unittests-graph.py \
        unittests-heuristics.py \
        unittests-readwrite.py \
        unittests-searching.py \
        unittests-sorting.py \

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for f in COPYING Changelog README
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
    ${INSTALL_DATA} ${WRKSRC}/docs/* ${DOCSDIR}
.endif
.if !defined(NOPORTEXAMPLES)
    @${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
.endif

#  This target is only meant to be used by the port maintainer.
x-regression-test:  install
.for f in ${TESTFILES}
    @${ECHO} "" >> ${WRKSRC}/tests/${f}
    @${ECHO} "if __name__ == '__main__':" >> ${WRKSRC}/tests/${f}
    @${ECHO} "    unittest.main()" >> ${WRKSRC}/tests/${f}
    @${ECHO} "Unit-testing ${f}..."
    @(cd ${WRKSRC}/tests && ${PYTHON_CMD} ${f})
.endfor

.include <bsd.port.mk>