aboutsummaryrefslogtreecommitdiffstats
path: root/math/py-gato/Makefile
blob: e9a50a33ac810a44f12f0e35ddd1c4948d4b843c (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
# New ports collection makefile for:    py-gato
# Date created:     31 August 2001
# Whom:             Johann Visagie <wjv@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   gato
PORTVERSION=    0.99D
CATEGORIES= math python
MASTER_SITES=   http://gato.sourceforge.net/Download/
MASTER_SITE_SUBDIR= gato
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   Gato-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    A Python-based toolbox to visualise algorithms on graphs

RUN_DEPENDS=    ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter

USE_PYTHON= yes
WRKSRC=     ${WRKDIR}/Gato
GATO_DIR=   ${PREFIX}/lib/${PYTHON_VERSION}/site-packages/Gato
EXAMPLESDIR=    ${PREFIX}/share/examples/${PORTNAME}

post-patch:
    @ ${REINPLACE_CMD} -e 's,^.*__future__.*$$,,' ${WRKSRC}/DataStructures.py

pre-build:
    @ ${TOUCH} ${WRKSRC}/__init__.py

do-build:
    @ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}
    @ ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}

do-install:
    @ ${MKDIR} ${GATO_DIR}
    @ cd ${WRKSRC} && ${FIND} *.py *.pyc *.pyo \
      -name Gato.py\* -o -print \
      | ${CPIO} --verbose -pdum -R ${BINOWN}:${BINGRP} ${GATO_DIR}
.for script in Gato Gred
    @ ${INSTALL_SCRIPT} ${WRKSRC}/${script}.py ${PREFIX}/bin/${script}
.endfor

post-install:
.if !defined(NOPORTEXAMPLES)
    @ ${MKDIR} ${EXAMPLESDIR}
.for egfile in *.alg *.pro *.cat
    @ ${INSTALL_DATA} ${WRKSRC}/${egfile} ${EXAMPLESDIR}
.endfor
.endif

.include <bsd.port.mk>