2013-03-21 17:32:34 +00:00
|
|
|
# Created by: Nicola Vitale <nivit@FreeBSD.org>
|
2007-03-11 09:51:34 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= mma
|
2012-04-28 13:32:04 +00:00
|
|
|
PORTVERSION= 12.02
|
2011-02-27 13:46:17 +00:00
|
|
|
PORTREVISION= 0
|
2007-03-11 09:51:34 +00:00
|
|
|
CATEGORIES= audio
|
2012-04-28 13:32:04 +00:00
|
|
|
MASTER_SITES= http://www.mellowood.ca/${PORTNAME}/
|
|
|
|
DISTFILES= ${PORTNAME}-bin-${PORTVERSION}.tar.gz
|
2007-03-11 09:51:34 +00:00
|
|
|
|
|
|
|
MAINTAINER= nivit@FreeBSD.org
|
|
|
|
COMMENT= Musical MIDI Accompaniment generator
|
|
|
|
|
2013-11-30 22:58:44 +00:00
|
|
|
USES= shebangfix
|
2014-01-13 21:00:02 +00:00
|
|
|
USE_PYTHON= 2
|
2013-09-20 14:36:35 +00:00
|
|
|
NO_STAGE= yes
|
2007-03-11 09:51:34 +00:00
|
|
|
|
2013-11-30 22:58:44 +00:00
|
|
|
python_CMD= ${PYTHON_CMD}
|
|
|
|
python_OLD_CMD= /usr/bin/env python
|
|
|
|
SHEBANG_FILES= mma.py
|
|
|
|
|
2013-03-21 17:32:34 +00:00
|
|
|
OPTIONS_DEFINE= TIMIDITY PLAYMIDI DOCS EXAMPLES
|
|
|
|
|
|
|
|
TIMIDITY_DESC= Install timidity++ as MIDI player
|
|
|
|
PLAYMIDI_DESC= Install playmidi as MIDI player
|
2007-03-11 09:51:34 +00:00
|
|
|
|
2011-02-27 13:46:17 +00:00
|
|
|
REINPLACE_ARGS= -i.bak -e 's,%%DATADIR%%,${DATADIR},'
|
|
|
|
|
2008-04-03 13:08:55 +00:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-bin-${DISTVERSION}
|
|
|
|
WRKDOC= ${WRKDIR}/${PORTNAME}-pdf-${DISTVERSION:S,a,,}
|
2007-03-11 09:51:34 +00:00
|
|
|
|
2011-02-27 13:46:17 +00:00
|
|
|
MMABIN= ${PREFIX}/bin/mma
|
2007-03-11 09:51:34 +00:00
|
|
|
|
2008-10-03 09:39:16 +00:00
|
|
|
.if !defined (NO_INSTALL_MANPAGES)
|
2009-07-29 11:36:37 +00:00
|
|
|
MAN1= mma.1 mma-renum.1
|
|
|
|
MAN8= mma-libdoc.8
|
2008-10-03 09:39:16 +00:00
|
|
|
.endif
|
2012-04-28 13:32:04 +00:00
|
|
|
|
2013-03-21 17:32:34 +00:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2012-04-28 13:32:04 +00:00
|
|
|
DISTFILES+= ${PORTNAME}-pdf-${DISTVERSION:S,a,,}.tar.gz
|
2007-03-11 09:51:34 +00:00
|
|
|
.endif
|
|
|
|
|
2013-03-21 17:32:34 +00:00
|
|
|
.if ${PORT_OPTIONS:MTIMIDITY}
|
|
|
|
RUN_DEPENDS+= timidity:${PORTSDIR}/audio/timidity++
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MPLAYMIDI}
|
|
|
|
RUN_DEPENDS+= playmidi:${PORTSDIR}/audio/playmidi
|
|
|
|
.endif
|
|
|
|
|
2007-03-11 09:51:34 +00:00
|
|
|
post-patch:
|
2011-02-27 13:46:17 +00:00
|
|
|
@${REINPLACE_CMD} ${WRKSRC}/mma.py
|
|
|
|
|
|
|
|
do-build:
|
|
|
|
@${PYTHON_CMD} -OO -m compileall -f ${WRKSRC}/MMA
|
2007-03-11 09:51:34 +00:00
|
|
|
|
|
|
|
do-install:
|
2011-02-27 13:46:17 +00:00
|
|
|
@${MKDIR} ${DATADIR}
|
|
|
|
@${INSTALL_SCRIPT} ${WRKSRC}/mma.py ${MMABIN}
|
|
|
|
.for d in lib includes MMA
|
|
|
|
@cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${DATADIR}
|
|
|
|
.endfor
|
2013-03-21 17:32:34 +00:00
|
|
|
.if ${PORT_OPTIONS:MEXAMPLES}
|
2011-02-27 13:46:17 +00:00
|
|
|
@${MKDIR} ${EXAMPLESDIR} && cd ${WRKSRC}/egs && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
|
|
|
|
.endif
|
2013-03-21 17:32:34 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2011-02-27 13:46:17 +00:00
|
|
|
@${MKDIR} ${DOCSDIR}/pdf && ${CP} ${WRKDOC}/*.pdf ${DOCSDIR}/pdf/ && \
|
|
|
|
cd ${WRKSRC}/docs/html && ${COPYTREE_SHARE} . ${DOCSDIR}/html
|
2012-04-28 13:32:04 +00:00
|
|
|
.endif
|
|
|
|
|
2008-10-03 09:39:16 +00:00
|
|
|
.if !defined(NO_INSTALL_MANPAGES)
|
2009-07-29 11:36:37 +00:00
|
|
|
@cd ${WRKSRC}/docs/man && ${INSTALL_MAN} ${MAN1} ${MANPREFIX}/man/man1/ && ${INSTALL_MAN} ${MAN8} ${MANPREFIX}/man/man8/
|
2008-10-03 09:39:16 +00:00
|
|
|
.endif
|
2007-03-11 09:51:34 +00:00
|
|
|
|
2011-02-27 13:46:17 +00:00
|
|
|
post-install:
|
|
|
|
${MMABIN} -G
|
|
|
|
|
2013-03-21 17:32:34 +00:00
|
|
|
.include <bsd.port.mk>
|