aboutsummaryrefslogtreecommitdiffstats
path: root/math/pygist/Makefile
blob: 46ba62d92d517a704c30e666df24a35cfe485726 (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:    pygist
# Date created:     30 May 1998
# Whom:         Thomas Gellekum <tg@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   gist
PORTVERSION=    1.5
CATEGORIES= math python
MASTER_SITES=   ftp://ftp-icf.llnl.gov/pub/python/OLD/
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   LLNLDistribution11
EXTRACT_SUFX=   .tgz

MAINTAINER= tg@FreeBSD.org

BUILD_DEPENDS=  ${LOCALBASE}/lib/yorick/1.4/lib/libgist.a:${PORTSDIR}/lang/yorick \
        ${NUMPYDIR}/Numeric.py:${PORTSDIR}/math/py-numeric \
        ${RNGDIR}/RNG.so:${PORTSDIR}/math/py-numeric
RUN_DEPENDS=    ${NUMPYDIR}/Numeric.py:${PORTSDIR}/math/py-numeric \
        ${RNGDIR}/RNG.so:${PORTSDIR}/math/py-numeric

WRKSRC=     ${WRKDIR}/${DISTNAME}/Graphics
USE_PYTHON= yes
CONFIGURE_ENV=  PREFIX=${PREFIX} PYTHON=${PYTHON_CMD}
ALL_TARGET= sharedmods
MAKE_FLAGS= 'OPT=${CFLAGS}'

GISTDIR=    ${PYTHON_SITELIBDIR}/PyGist
NUMPYDIR=   ${PYTHON_SITELIBDIR}/Numeric
RNGDIR=     ${PYTHON_SITELIBDIR}/RNG
EXAMPLEDIR= ${PREFIX}/share/examples/PyGist

post-patch:
.for file in Gist3D/Demo/demo5.py Gist3D/Demo/gistmeshtest.py \
        Narcisse/Demo/meshtest.py OOG/Demo/eztest.py \
        OOG/Demo/surftest3d.py OOG/Demo/surftest4d.py
    @${PERL} -pi -e 's/from Ranf import/from RNG import/' ${WRKSRC}/${file}
.endfor

do-configure:
    @(cd ${WRKSRC} && ${CONFIGURE_ENV} ${PYTHON_CMD} makethis.py)

post-install:
    @${MKDIR} ${GISTDIR}
    ${INSTALL_DATA} ${WRKSRC}/*/Lib/* ${GISTDIR}
    @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${GISTDIR}
    @${ECHO_CMD} "PyGist" > ${GISTDIR}/../PyGist.pth
    ${MKDIR} ${EXAMPLEDIR}
    ${INSTALL_DATA} ${WRKSRC}/*/Demo/* ${EXAMPLEDIR}

.include <bsd.port.mk>