Magellan Linux

Annotation of /branches/R11-stable/extras/speech-dispatcher/speech-dispatcher-0.8-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18024 - (hide annotations) (download)
Thu Jun 27 06:46:31 2013 UTC (10 years, 11 months ago) by niro
File size: 1944 byte(s)
-release branches/R11-stable
1 niro 17637 # $Id$
2    
3     PNAME="speech-dispatcher"
4     PVER="0.8"
5     PBUILD="r2"
6    
7     PCAT="media-sound"
8    
9     DESCRIPTION="High-level device independent layer for speech synthesis interface."
10     HOMEPAGE="http://devel.freebsoft.org/speechd"
11    
12     # todo espeak, flite support
13     DEPEND=">= dev-libs/glib2-2.36
14     >= dev-libs/dotconf-1.3
15     >= media-libs/alsa-lib-1.0.27
16     >= media-libs/libao-1.1
17     >= media-libs/nas-1.9
18     >= media-sound/libpulse-3.0"
19    
20     SDEPEND=">= virtual/sed"
21     # >= dev-lang/python-2.7
22    
23     SRCFILE="${PNAME}-${PVER}.tar.gz"
24     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
25    
26     sminclude python mbuild mtools
27    
28     SRC_URI=(
29     http://devel.freebsoft.org/pub/projects/speechd/${SRCFILE}
30     mirror://${PNAME}/${SRCFILE}
31     mirror://${PNAME}/speech-dispatcherd.service
32     )
33    
34     UP2DATE="updatecmd 'http://devel.freebsoft.org/pub/projects/speechd/?C=M;O=A' | lasttarball gz"
35    
36     src_prepare()
37     {
38     munpack ${SRCFILE} || die
39     cd ${SRCDIR}
40    
41     # multilib fix
42     sed -i 's:NAS_LIBS = -laudio -L/usr/X11R6/lib:NAS_LIBS = -laudio:' src/audio/Makefile.am || die
43     }
44    
45     src_compile()
46     {
47     cd ${SRCDIR}
48    
49     # python bindings require python3
50     mconfigure \
51     --disable-static \
52     --disable-python \
53     --with-alsa \
54     --with-pulse \
55     --with-libao \
56     --with-nas \
57     --without-espeak \
58     --without-flite \
59     || die
60    
61     mmake || die
62    
63     # python modules
64     # cd ${SRCDIR}/src/python
65     # python_docompile || die
66     }
67    
68     src_install()
69     {
70     cd ${SRCDIR}
71     mmake DESTDIR=${BINDIR} install || die
72    
73     # cd ${SRCDIR}/src/python
74     # python_doinstall || die
75    
76     # disable espeak, flite is already disabled by upstream
77     sed -i 's/^AddModule "espeak"/#AddModule "espeak"/' \
78     ${BINDIR}/etc/speech-dispatcher/speechd.conf || die
79    
80     # default to pulseaudio, but use alsa as fallback
81     sed -i 's/# AudioOutputMethod "pulse,alsa"/AudioOutputMethod "pulse,alsa"/' \
82     ${BINDIR}/etc/speech-dispatcher/speechd.conf || die
83    
84     minstallunit speech-dispatcherd.service || die
85     }
86    
87     postinstall()
88     {
89     mstartunit speech-dispatcherd.service
90     }
91    
92     postremove()
93     {
94     mstopunit speech-dispatcherd.service
95     }