summaryrefslogtreecommitdiffstats
path: root/audio/boodler/Makefile
blob: d5b50727828d35d7b9e288ab58ec59b116c536bc (plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Created by: Dan Pelleg <daniel+boodler@pelleg.org>
# $FreeBSD$

PORTNAME=	boodler
PORTVERSION=	1.5.3
PORTREVISION=	5
CATEGORIES=	audio
MASTER_SITES=	http://www.eblong.com/zarf/boodler/
DISTFILES=	boodler-153.tar.gz boodler-snd-021902.tar.gz

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Programmable soundscape tool

LICENSE=	LGPL20 # Main program only, sounds have various copyrights

RESTRICTED=	Not for commercial use
RESTRICTED_FILES=	boodler-snd-021902.tar.gz

USES=		python:2 shebangfix

HAS_CONFIGURE=	yes
CONFIGURE_SCRIPT=	configure.py
CONFIGURE_ARGS=	--include ${LOCALBASE}/include --lib ${LOCALBASE}/lib
WRKSRC=		${WRKDIR}/${PORTNAME}

SHEBANG_FILES=	${CONFIGURE_SCRIPT} boodler.py
python_CMD=	${PYTHON_CMD}
SUB_FILES=	boodler-wrapper
SUB_LIST=	PYTHON_CMD=${PYTHON_CMD}

OPTIONS_DEFINE=		DOCS
OPTIONS_SINGLE=		AUDIO
OPTIONS_SINGLE_AUDIO=	ESOUND FILE OSS
OPTIONS_DEFAULT=	OSS

AUDIO_DESC=		Audio backend

ESOUND_LIB_DEPENDS=	libesd.so:${PORTSDIR}/audio/esound
ESOUND_CONFIGURE_ON=	--driver esd

FILE_DESC=		Write raw PCM data to a file
FILE_CONFIGURE_ON=	--driver file

OSS_CONFIGURE_ON=	--driver oss

.include <bsd.port.pre.mk>

.if ${ARCH} == "amd64" || ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
CONFIGURE_ARGS+=	--PIC
.endif

post-patch:
	${REINPLACE_CMD} -e "s|python|${PYTHON_CMD}|" \
		-e "s|make |${MAKE_CMD} |g" ${WRKSRC}/Makefile
	${RMDIR} ${WRKDIR}/boodler-snd/string

post-build:
	${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/effects ${WRKSRC}/boodle
	${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/effects ${WRKSRC}/boodle

do-install:
	(cd ${WRKDIR} && ${COPYTREE_SHARE} boodler-snd ${STAGEDIR}${DATADIR})
	(cd ${WRKSRC} && ${COPYTREE_SHARE} "boodle effects" ${STAGEDIR}${DATADIR})
	${INSTALL_SCRIPT} ${WRKDIR}/boodler-wrapper ${STAGEDIR}${PREFIX}/bin/boodler
	${INSTALL_SCRIPT} ${WRKSRC}/boodler.py ${STAGEDIR}${DATADIR}
	${RM} ${STAGEDIR}${DATADIR}/boodle/cboodle.so
	${INSTALL_PROGRAM} ${WRKSRC}/boodle/cboodle.so ${STAGEDIR}${DATADIR}/boodle/cboodle.so
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/doc/*.html ${STAGEDIR}${DOCSDIR}

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud