blob: edaecb11c2b8d6015a98642411d215188c0d8e96 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Created by: Nicola Vitale <nivit@FreeBSD.org>
# $FreeBSD$
PORTNAME= mma
PORTVERSION= 12.02
PORTREVISION= 0
CATEGORIES= audio
MASTER_SITES= http://www.mellowood.ca/${PORTNAME}/
DISTFILES= ${PORTNAME}-bin-${PORTVERSION}.tar.gz
MAINTAINER= nivit@FreeBSD.org
COMMENT= Musical MIDI Accompaniment generator
USES= shebangfix
USE_PYTHON= 2
NO_STAGE= yes
python_CMD= ${PYTHON_CMD}
python_OLD_CMD= /usr/bin/env python
SHEBANG_FILES= mma.py
OPTIONS_DEFINE= TIMIDITY PLAYMIDI DOCS EXAMPLES
TIMIDITY_DESC= Install timidity++ as MIDI player
PLAYMIDI_DESC= Install playmidi as MIDI player
REINPLACE_ARGS= -i.bak -e 's,%%DATADIR%%,${DATADIR},'
WRKSRC= ${WRKDIR}/${PORTNAME}-bin-${DISTVERSION}
WRKDOC= ${WRKDIR}/${PORTNAME}-pdf-${DISTVERSION:S,a,,}
MMABIN= ${PREFIX}/bin/mma
.if !defined (NO_INSTALL_MANPAGES)
MAN1= mma.1 mma-renum.1
MAN8= mma-libdoc.8
.endif
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
DISTFILES+= ${PORTNAME}-pdf-${DISTVERSION:S,a,,}.tar.gz
.endif
.if ${PORT_OPTIONS:MTIMIDITY}
RUN_DEPENDS+= timidity:${PORTSDIR}/audio/timidity++
.endif
.if ${PORT_OPTIONS:MPLAYMIDI}
RUN_DEPENDS+= playmidi:${PORTSDIR}/audio/playmidi
.endif
post-patch:
@${REINPLACE_CMD} ${WRKSRC}/mma.py
do-build:
@${PYTHON_CMD} -OO -m compileall -f ${WRKSRC}/MMA
do-install:
@${MKDIR} ${DATADIR}
@${INSTALL_SCRIPT} ${WRKSRC}/mma.py ${MMABIN}
.for d in lib includes MMA
@cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${DATADIR}
.endfor
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${EXAMPLESDIR} && cd ${WRKSRC}/egs && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
.endif
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}/pdf && ${CP} ${WRKDOC}/*.pdf ${DOCSDIR}/pdf/ && \
cd ${WRKSRC}/docs/html && ${COPYTREE_SHARE} . ${DOCSDIR}/html
.endif
.if !defined(NO_INSTALL_MANPAGES)
@cd ${WRKSRC}/docs/man && ${INSTALL_MAN} ${MAN1} ${MANPREFIX}/man/man1/ && ${INSTALL_MAN} ${MAN8} ${MANPREFIX}/man/man8/
.endif
post-install:
${MMABIN} -G
.include <bsd.port.mk>
|