aboutsummaryrefslogtreecommitdiffstats
path: root/audio/timidity/Makefile
blob: 5920aefaeaef4f74a632cbdafc72a7b4faad0c0e (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
# $FreeBSD$

PORTNAME=   timidity
PORTVERSION=    0.2i
PORTREVISION=   1
CATEGORIES= audio
MASTER_SITES+=  http://www.onicos.com/staff/iz/timidity/dist/:timidity
DISTFILES+= ${DISTNAME}.tar.gz:timidity

MAINTAINER= ports@FreeBSD.org
COMMENT=    MIDI to PCM software synthesizer

LICENSE=    GPLv2+
LICENSE_FILE=   ${WRKSRC}/COPYING

CONFLICTS_INSTALL=  timidity++-2.*

USES=       alias ncurses
INSTALL_TARGET= install.all

OPTIONS_SINGLE= FONTS
OPTIONS_SINGLE_FONTS=   GOEMON GUSPAT
OPTIONS_DEFAULT=GOEMON
OPTIONS_SUB=    yes

FONTS_DESC=     Default sound fonts

GUSPAT_DESC=        Use from audio/guspat port
GUSPAT_RUN_DEPENDS= ${LOCALBASE}/share/guspat/power.cfg:audio/guspat
GUSPAT_VARS=        TDIR="${LOCALBASE}/share/timidity" \
            TCONFIG=timidity.cfg-guspat

GOEMON_DESC=        Bundle from Goemon's patchkit #'
GOEMON_MASTER_SITES=    http://www.anime.net/~goemon/timidity/:tiins
GOEMON_DISTFILES=   goemon.tgz:tiins
GOEMON_VARS=        TDIR="${PREFIX}/lib/timidity" \
            TCONFIG=goemon.cfg

post-patch:
    ${REINPLACE_CMD} -e 's,machine/soundcard.h,sys/soundcard.h,' \
        ${WRKSRC}/linux_a.c
    ${REINPLACE_CMD} -e 's|%%TDIR%%|${TDIR}| ; s|%%TCONFIG%%|${TCONFIG}|' \
        ${WRKSRC}/timidity.cfg

post-patch-GOEMON-on:
    ${REINPLACE_CMD} -i '' -e '/^dir/s,goemon,${TDIR}/&,' \
        ${WRKDIR}/${TCONFIG}

post-install-GOEMON-on:
    (cd ${WRKDIR} && ${COPYTREE_SHARE} "goemon*" ${STAGEDIR}${TDIR})

.include <bsd.port.mk>