aboutsummaryrefslogtreecommitdiffstats
path: root/audio/espeak/Makefile
blob: 91b1ce83bafa6ffd9d309b4246e27dc80dffebee (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
# Created by: Nicola Vitale <nivit@email.it>
# $FreeBSD$

PORTNAME=   espeak
PORTVERSION=    1.47.11
PORTREVISION=   0
CATEGORIES= audio
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION:R}
DISTNAME=   ${PORTNAME}-${PORTVERSION}-source

MAINTAINER= nivit@FreeBSD.org
COMMENT=    A software speech synthesizer

LICENSE=    GPLv3

# default is runtime audio detection
LIB_DEPENDS=    ${PORTAUDIOLIB} \
        ${PULSEAUDIOLIB}

OPTIONS_DEFAULT=    PORTAUDIO
OPTIONS_RADIO=  AUDIO_SYSTEM
OPTIONS_RADIO_AUDIO_SYSTEM= PORTAUDIO PULSEAUDIO RUNTIME
RUNTIME_DESC=   Sound interface selected at runtime

PORTAUDIOLIB=   portaudio:${PORTSDIR}/audio/portaudio
PULSEAUDIOLIB=  pulse:${PORTSDIR}/audio/pulseaudio

CONFLICTS=  speak-1.[0-9]

MAKE_ENV+=  PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
        PTHREAD_LIBS="${PTHREAD_LIBS}" \
        AUDIO="${AUDIO}"

CXXFLAGS+=  -I${LOCALBASE}/include
USES=       gmake
USE_LDCONFIG=   yes
USE_ZIP=    yes

WRKSRC= ${WRKDIR}/${DISTNAME}
BUILD_WRKSRC=   ${WRKSRC}/src
INSTALL_WRKSRC= ${WRKSRC}/src

REINPLACE_FILES=    Makefile speech.h
REINPLACE_ARGS= -i.bak -e "s|%%DATADIR%%|${DATADIR}|g"

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MRUNTIME}
AUDIO=  "runtime"
.endif
.if ${PORT_OPTIONS:MPULSEAUDIO}
AUDIO=  "pulseaudio"
PORTAUDIOLIB=
.endif
.if ${PORT_OPTIONS:MPORTAUDIO}
AUDIO=  "portaudio"
PULSEAUDIOLIB=
.endif

post-patch:
    cd ${BUILD_WRKSRC} && ${REINPLACE_CMD} ${REINPLACE_FILES}

.if ${PORT_OPTIONS:MDOCS}
post-install:
    ${MKDIR} ${DOCSDIR}
    cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${DOCSDIR}
.endif

.include <bsd.port.pre.mk>

.if ${ARCH} == "sparc64"
BROKEN=     Does not compile on sparc64
.endif

.include <bsd.port.post.mk>