aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/py-fltk/Makefile
blob: 29e5e40b2c87afe581117633c25cdadf3393fcb1 (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
# New ports collection makefile for:    py-fltk
# Date created:     6 Apr 2004
# Whom:         Radim Kolar
#
# $FreeBSD$
#

PORTNAME=   fltk
PORTVERSION=    1.1.5
CATEGORIES= x11-toolkits python
#MASTER_SITES=  SF/py${PORTNAME}/py${PORTNAME}/py${PORTNAME}-${PORTVERSION}
MASTER_SITES=   SF/py${PORTNAME}/py${PORTNAME}/${DISTNAME}
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   pyFltk-${PORTVERSION:S/.b/b/}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Python interface to FLTK window toolkit

LIB_DEPENDS=    fltk.1:${PORTSDIR}/x11-toolkits/fltk

USE_PYTHON= 2.5+
USE_PYDISTUTILS=    yes
USE_XORG=   x11

PYDISTUTILS_PKGNAME=    pyFltk
PYDISTUTILS_PKGVERSION= 1.1.5

MAKE_ENV+=  FLTK_HOME=${LOCALBASE}/bin
DOCSDIR=    ${PREFIX}/share/doc/py-${PORTNAME}
EXAMPLESDIR=    ${PREFIX}/share/examples/py-${PORTNAME}
XTRADOCS=   CHANGES README TODO

post-patch:
    @${REINPLACE_CMD} -e "s|/usr/X11R6|${LOCALBASE}|g;s|package_data.*},||g;s|sunos5|freebsd8', 'freebsd9|g" ${WRKSRC}/setup.py
    @${REINPLACE_CMD} -e 's|>mininum|>minimum|g;s|>maxinum|>maximum|g;s|int size_buffer|Py_ssize_t size_buffer|g' ${WRKSRC}/python/fltk_wrap.cpp

post-build:
    ${REINPLACE_CMD} -e "s|\.\./docs|${DOCSDIR}/html|g" ${WRKSRC}/fltk/test/help.py

do-install:
    @(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} install ${PYDISTUTILS_INSTALLARGS})
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}/html
    ${INSTALL_DATA} ${WRKSRC}/fltk/docs/*.html ${DOCSDIR}/html
    ${INSTALL_DATA} ${WRKSRC}/fltk/docs/*.jpg ${DOCSDIR}/html
    ${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/fltk/test/*.py ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/fltk/test/HelpDialog.html ${EXAMPLESDIR}
.for i in ${XTRADOCS}
    ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>