aboutsummaryrefslogtreecommitdiffstats
path: root/audio/py-pyaudio/Makefile
blob: a0dbcf85b510362f33e2dab74e09a97bc76b7952 (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
# Created by: Jaap Akkerhuis <jaap@NLnetLabs.nl>
# $FreeBSD$

PORTNAME=   pyaudio
PORTVERSION=    0.2.11
CATEGORIES= audio python
MASTER_SITES=   CHEESESHOP
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   PyAudio-${PORTVERSION}

MAINTAINER= jaap@NLnetLabs.nl
COMMENT=    Portaudio toolkit bindings for Python

LICENSE=    MIT

LIB_DEPENDS=    libportaudio.so:audio/portaudio
BUILD_DEPENDS=  sphinx-build:textproc/py-sphinx

USES=       python gmake
USE_PYTHON= distutils autoplist

WRKSRC=     ${WRKDIR}/PyAudio-${PORTVERSION}

OPTIONS_DEFINE= DOCS
PORTDOCS=   *

post-patch:
    @${REINPLACE_CMD} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
        ${WRKSRC}/setup.py

pre-install:
    (cd ${BUILD_WRKSRC} && ${MAKE_CMD} PYTHON=${PYTHON_CMD} docs)

post-install:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/docs/*.html ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/docs/*.js ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/docs/*.inv ${STAGEDIR}${DOCSDIR}
    @cd ${WRKSRC}/docs && ${COPYTREE_SHARE} _static ${STAGEDIR}${DOCSDIR}/
    @cd ${WRKSRC}/docs && ${COPYTREE_SHARE} _sources ${STAGEDIR}${DOCSDIR}/
    @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_portaudio.so

.include <bsd.port.mk>