blob: 49337dee0c832118c1b73f797b9d6f8f1d096049 (
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
# New ports collection makefile for: speech-dispatcher
# Date created: 8 December 2009
# Whom: Alberto Villa <villa.alberto@gmail.com>
#
# $FreeBSD$
PORTNAME= speech-dispatcher
PORTVERSION= 0.7
CATEGORIES= accessibility audio
MASTER_SITES= http://www.freebsoft.org/pub/projects/speechd/
MAINTAINER= avilla@FreeBSD.org
COMMENT= Common interface to speech synthesis
LICENSE= GPLv2 LGPL21
LICENSE_COMB= multi
LIB_DEPENDS= dotconf.0:${PORTSDIR}/devel/dotconf \
sndfile.1:${PORTSDIR}/audio/libsndfile
USE_GNOME= glib20 pkgconfig
MAKE_JOBS_SAFE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib"
USE_GMAKE= yes
CFLAGS+= -I${LOCALBASE}/include
USE_LDCONFIG= ${PREFIX}/lib ${PREFIX}/lib/${PORTNAME}
CONFFILES= clients/emacs.conf clients/gnome-speech.conf \
modules/cicero.conf modules/dtk-generic.conf \
modules/epos-generic.conf modules/espeak-generic.conf \
modules/espeak-mbrola-generic.conf modules/espeak.conf \
modules/festival.conf modules/flite.conf modules/ibmtts.conf \
modules/ivona.conf modules/llia_phon-generic.conf \
modules/swift-generic.conf speechd.conf
PORTDOCS= AUTHORS ChangeLog INSTALL NEWS README TODO
INFO= spd-say ${PORTNAME}-cs ${PORTNAME} ssip
OPTIONS= ALSA "ALSA support" off \
ESPEAK "eSpeak output module" on \
FESTIVAL "Festival output module" off \
FLITE "Festival Lite output module" off \
LIBAO "libao support" off \
NAS "Network Audio System support" off \
PULSEAUDIO "PulseAudio support (broken on FreeBSD 6.X)" off \
PYTHON "Python support" off
.include <bsd.port.options.mk>
.ifdef(WITH_ALSA)
LIB_DEPENDS+= asound.2:${PORTSDIR}/audio/alsa-lib
CONFIGURE_ARGS+= --with-alsa
.else
CONFIGURE_ARGS+= --without-alsa
.endif
.ifndef(WITHOUT_ESPEAK)
LIB_DEPENDS+= espeak.1:${PORTSDIR}/audio/espeak
CONFIGURE_ARGS+= --with-espeak
PLIST_SUB+= ESPEAK=""
.else
CONFIGURE_ARGS+= --without-espeak
PLIST_SUB+= ESPEAK="@comment "
.endif
.ifdef(WITH_FESTIVAL)
RUN_DEPENDS+= festival:${PORTSDIR}/audio/festival \
${LOCALBASE}/share/festival/lib/${PORTNAME}.scm:${PORTSDIR}/audio/festival-freebsoft-utils
.endif
.ifdef(WITH_FLITE)
BUILD_DEPENDS+= flite:${PORTSDIR}/audio/flite
RUN_DEPENDS+= flite:${PORTSDIR}/audio/flite
CONFIGURE_ARGS+= --with-flite
PLIST_SUB+= FLITE=""
.else
CONFIGURE_ARGS+= --without-flite
PLIST_SUB+= FLITE="@comment "
.endif
.ifdef(WITH_LIBAO)
LIB_DEPENDS+= ao.4:${PORTSDIR}/audio/libao
CONFIGURE_ARGS+= --with-libao
.else
CONFIGURE_ARGS+= --without-libao
.endif
.ifdef(WITH_NAS)
LIB_DEPENDS+= audio.2:${PORTSDIR}/audio/nas
CONFIGURE_ARGS+= --with-nas
.else
CONFIGURE_ARGS+= --without-nas
.endif
.ifdef(WITH_PYTHON)
USE_PYTHON= yes
PLIST_SUB+= PYTHON=""
.else
PLIST_SUB+= PYTHON="@comment "
.endif
.include <bsd.port.pre.mk>
.if defined(WITH_PULSEAUDIO) && ${OSVERSION} >= 700041
LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio
CONFIGURE_ARGS+= --with-pulse
PLIST_SUB+= GNOMEHIER="@comment "
.else
CONFIGURE_ARGS+= --without-pulse
PLIST_SUB+= GNOMEHIER=""
.endif
.if ${OSVERSION} < 800067
.if ${ARCH} == "amd64"
CFLAGS+= -fPIC
.endif
EXTRA_PATCHES= ${FILESDIR}/extrapatch-*
.endif
post-extract:
.if ${OSVERSION} < 800067
${CP} ${FILESDIR}/getline.h ${WRKSRC}/src
.if ${OSVERSION} < 701101
${CP} ${FILESDIR}/getline_strndup.c ${WRKSRC}/src/freebsd.c
.else
${CP} ${FILESDIR}/getline.c ${WRKSRC}/src/freebsd.c
.endif
.endif
post-patch:
${REINPLACE_CMD} -e 's/-pthread/${PTHREAD_LIBS}/g' \
${WRKSRC}/ltmain.sh
${REINPLACE_CMD} -e 's/-lpthread/${PTHREAD_LIBS}/g' \
${WRKSRC}/configure \
${WRKSRC}/src/audio/Makefile.in \
${WRKSRC}/src/c/api/Makefile.in \
${WRKSRC}/src/c/clients/spdsend/Makefile.in \
${WRKSRC}/src/modules/Makefile.in \
${WRKSRC}/src/server/Makefile.in
.ifndef(WITH_PYTHON)
${REINPLACE_CMD} -e 's/python[^ ]*//g' \
${WRKSRC}/src/Makefile.in
.endif
post-install:
.for f in ${CONFFILES}
@if [ ! -f ${ETCDIR}/${f} ]; then \
${CP} -p ${ETCDIR}/${f}.sample ${ETCDIR}/${f}; \
fi
.endfor
.ifndef(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for f in ${PORTDOCS}
${INSTALL_MAN} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.post.mk>
|