aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/py-opengl/Makefile
blob: 62aac11b074313a74994c745eccb7145b461c395 (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
# New ports collection makefile for:    PyOpenGL
# Date created:     Wed Aug 18 18:49:17 EDT 1999
# Whom:         Randall Hopper <aa8vb@ipass.net>
#
# $FreeBSD$
#

PORTNAME=   opengl
PORTVERSION=    2.0.1.07
CATEGORIES= graphics python
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= py${PORTNAME}
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   PyOpenGL-${PORTVERSION:S/.b/b/}

MAINTAINER= ports@FreeBSD.org
COMMENT=    An OpenGL (and related library) interface for Python

BUILD_DEPENDS=  ${PYNUMERIC} \
        ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter \
        ${PYTHON_SITELIBDIR}/PIL.pth:${PORTSDIR}/graphics/py-imaging \
        swig:${PORTSDIR}/devel/swig11
RUN_DEPENDS=    ${PYNUMERIC} \
        ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter \
        ${PYTHON_SITELIBDIR}/PIL.pth:${PORTSDIR}/graphics/py-imaging

USE_REINPLACE=  yes
USE_GL=     yes
USE_MESA=   yes
USE_PYTHON= yes
USE_PYDISTUTILS=    yes

post-patch:
    @${FIND} ${WRKSRC} -name '*.[ch]' | ${XARGS} ${REINPLACE_CMD} -e \
        's|<malloc\.h>|<stdlib.h>|g'
    @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
        -e 's|%%X11BASE%%|${X11BASE}|g' \
        ${WRKSRC}/config/freebsd.cfg ${WRKSRC}/Tkinter.py

post-install:
    @${FIND} ${PYTHON_SITELIBDIR}/OpenGL -type f | \
        ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
    @${FIND} ${PYTHON_SITELIBDIR}/OpenGL -type d | ${SORT} -r | \
        ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}

.include <bsd.port.mk>