rpms/espeak/devel compiledict-amd64_sizeof.patch, NONE, 1.1 espeak.spec, NONE, 1.1 espeak_program_name.patch, NONE, 1.1 makefile_install_target.patch, NONE, 1.1 makefile_lpthread.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Francois Aucamp (faucamp) fedora-extras-commits at redhat.com
Thu Nov 9 17:28:49 UTC 2006


Author: faucamp

Update of /cvs/extras/rpms/espeak/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11252/devel

Modified Files:
	.cvsignore sources 
Added Files:
	compiledict-amd64_sizeof.patch espeak.spec 
	espeak_program_name.patch makefile_install_target.patch 
	makefile_lpthread.patch 
Log Message:
auto-import espeak-1.16-4 on branch devel from espeak-1.16-4.src.rpm

compiledict-amd64_sizeof.patch:

--- NEW FILE compiledict-amd64_sizeof.patch ---
# Modified version of patch provided by Nigel Rowe
# Original patch available at https://sourceforge.net/tracker/download.php?group_id=159649&atid=812677&file_id=201024&aid=1588938
--- espeak-1.16-source/src/compiledict.cpp~	2006-10-03 08:51:13.000000000 +1000
+++ espeak-1.16-source/src/compiledict.cpp	2006-11-02 08:46:10.000000000 +1100
@@ -442,9 +442,9 @@
 	
 		while(p != NULL)
 		{
-			length = *(p+4);
-			fwrite(p+4,length,1,f_out);
-			memcpy(&p,p,4);
+			length = *(p+sizeof(char *));
+			fwrite(p+sizeof(char *),length,1,f_out);
+			memcpy(&p,p,sizeof(char *));
 		}
 		fputc(0,f_out);
 	}


--- NEW FILE espeak.spec ---
Name:           espeak
Version:        1.16
Release:        4%{?dist}
Summary:        Software speech synthesizer (text-to-speech)

Group:          Applications/Multimedia
License:        GPL
URL:            http://espeak.sourceforge.net
Source0:        http://kent.dl.sourceforge.net/sourceforge/espeak/espeak-1.16-source.zip
Patch0:         makefile_lpthread.patch
Patch1:         makefile_install_target.patch
Patch2:         compiledict-amd64_sizeof.patch
Patch3:         espeak_program_name.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  portaudio-devel


%description
eSpeak is a software speech synthesizer for English and other languages.

eSpeak produces good quality English speech. It uses a different synthesis
method from other open source TTS engines, and sounds quite different.
It's perhaps not as natural or "smooth", but some people may find the
articulation clearer and easier to listen to for long periods. eSpeak supports
several languages, however in most cases these are initial drafts and need more
work to improve them.

It can run as a command line program to speak text from a file or from stdin.


%package devel
Summary: Development files for espeak
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}


%description devel
Development files for eSpeak, a software speech synthesizer.


%prep
%setup -q -n espeak-%{version}-source
chmod 0644 src/* 
%patch0 -p1 -b .pthread
%patch1 -p1 -b .install_target
%patch2 -p1 -b .amd64sizeof
%patch3 -p1 -b .espeak_name
# Prepare documentation
mv docs html
sed -i 's/\r//' License.txt



%build
cd src
make %{?_smp_mflags} BIN_NAME=espeak CXXFLAGS="${RPM_OPT_FLAGS}"


%install
rm -rf %{buildroot}
rmdir --ignore-fail-on-non-empty espeak-data/soundicons
# Remove backup files in documentation created by espeak_program_name patch
rm -f html/*.espeak_name
cd src
make install DESTDIR=%{buildroot} BINDIR=%{_bindir} INCDIR=%{_includedir}/espeak LIBDIR=%{_libdir}


%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc ReadMe ChangeLog License.txt html/
%{_bindir}/espeak
%{_datadir}/espeak-data
%{_libdir}/libespeak.so.*


%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_includedir}/espeak


%changelog
* Tue Nov 07 2006 Francois Aucamp <faucamp at csir.co.za> - 1.16-4
- Modified patch steps to create backups with different suffixes
- Renamed patch file extensions to .patch
- Added step in %%install to remove patch backup files in documentation

* Sat Nov 04 2006 Francois Aucamp <faucamp at csir.co.za> - 1.16-3
- Fixed source file permissions for -debuginfo package in %%prep
- Added RPM_OPT_FLAGS to "make" command in %%build; removed RPM_OPT_FLAGS makefile patch
- Modified makefile install target patch to include general support for setting compiler optimization flags via CXXFLAGS
- Removed creation of .orig backup files during patching
- Modified patch files to have different suffixes

* Thu Nov 02 2006 Francois Aucamp <faucamp at csir.co.za> - 1.16-2
- Added "install" target to makefile (makefile_install_target.patch)
- Added patch to fix AMD64 sizeof(char *) assumption bug (upstream request ID 1588938)
- Changed "portaudio" BuildRequires to "portaudio-devel"
- Added patch to makefile to allow RPM_OPT_FLAGS
- Added patch to replace all references to "speak" binary with "espeak"
- Moved header files to /usr/include/espeak
- Added rmdir command to "install" to remove empty soundicons directory

* Wed Oct 04 2006 Francois Aucamp <faucamp at csir.co.za> - 1.16-1
- Initial RPM build


espeak_program_name.patch:

--- NEW FILE espeak_program_name.patch ---
diff -uNr espeak-1.16-source/docs/add_language.html espeak-1.16-source-mod/docs/add_language.html
--- espeak-1.16-source/docs/add_language.html	2006-09-21 12:38:29.000000000 +0200
+++ espeak-1.16-source-mod/docs/add_language.html	2006-11-02 20:05:44.000000000 +0200
@@ -77,7 +77,7 @@
 of two source files: <B>en_rules</B> (the spelling to phoneme rules) and
 <B>en_list</B> (an exceptions list, and attributes of certain words). The corresponding compiled data
 file is <B>espeak-data/en_dict</B> which is produced from <B>en_rules</B>
-and <B>en_list</B> sources by the command: <B>speak  --compile=en</B>.</P>
+and <B>en_list</B> sources by the command: <B>espeak  --compile=en</B>.</P>
 <P STYLE="font-weight: medium">Details of the contents of the
 dictionary files are given in <A href="dictionary.html">dictionary.html</A>.</P>
 <P STYLE="font-weight: medium">The <B>en_list</B> file contains not
@@ -110,7 +110,7 @@
 voices file.</P>
 <HR>
 <H3>6.5 Program Code</H3>
-<P STYLE="font-weight: medium">The behaviour of the speak program is
+<P STYLE="font-weight: medium">The behaviour of the espeak program is
 controlled by various options (eg. whether words are stressed on the first,
 last, or penultimate syllable). The function <B>SetTranslator()</B> at the
 start of the <B>tr_languages.cpp</B> file recognizes the language
@@ -129,4 +129,4 @@
 <hr>
 
 </BODY>
-</HTML>
\ No newline at end of file
+</HTML>
diff -uNr espeak-1.16-source/docs/commands.html espeak-1.16-source-mod/docs/commands.html
--- espeak-1.16-source/docs/commands.html	2006-09-21 12:38:47.000000000 +0200
+++ espeak-1.16-source-mod/docs/commands.html	2006-11-02 20:01:50.000000000 +0200
@@ -11,47 +11,47 @@
 <hr>
 <h2>2.1 INSTALLATION</h2>
 <hr>
-Place the "<strong>speak</strong>" executable file in the command path, eg in <strong>/usr/local/bin</strong>
+Place the "<strong>espeak</strong>" executable file in the command path, eg in <strong>/usr/local/bin</strong>
 <p>
 Place the "<strong>espeak-data</strong>" directory in /usr/share as <strong>/usr/share/espeak-data</strong>.<br>
 Alternatively if it is placed in the user's home directory (i.e. <strong>/home/<user>/espeak-data</strong>)
 then that will be used instead.
 <p>
 <h4>Dependencies</h4>
-<strong>speak</strong> uses the PortAudio sound library (version 18), so you will need to have the <strong>libportaudio0</strong> library package installed.  It may be already, since it's used by other software, such as OpenOffice.org and the Audacity sound editor.<p>
-Some Linux distrubitions (eg. SuSe 10) have version 19 of PortAudio which has a slightly different API. The speak program can be compiled to use version 19 of PortAudio by copying the file portaudio19.h to portaudio.h before compiling.<p>
- The speak program may be compiled without using PortAudio, by removing the line<pre>   #define USE_PORTAUDIO
+<strong>espeak</strong> uses the PortAudio sound library (version 18), so you will need to have the <strong>libportaudio0</strong> library package installed.  It may be already, since it's used by other software, such as OpenOffice.org and the Audacity sound editor.<p>
+Some Linux distrubitions (eg. SuSe 10) have version 19 of PortAudio which has a slightly different API. The espeak program can be compiled to use version 19 of PortAudio by copying the file portaudio19.h to portaudio.h before compiling.<p>
+ The espeak program may be compiled without using PortAudio, by removing the line<pre>   #define USE_PORTAUDIO
 </pre>in the file speech.h. 
 <p> <hr>
 <h2>2.2 COMMAND OPTIONS</h2>
 <hr>
 <h3>2.2.1 Examples</h3>
 To use at the command line, type:<br>
-   <strong>speak "This is a test"</strong><br>
+   <strong>espeak "This is a test"</strong><br>
 or<br>
-   <strong>speak -f <text file></strong>
+   <strong>espeak -f <text file></strong>
 <p>
 Or just type<br>
-   <strong>speak</strong><br>
+   <strong>espeak</strong><br>
 followed by text on subsequent lines. Each line is spoken when
-RETURN is pressed.<br>Use <strong>speak -x</strong> to see the corresponding phoneme codes.
+RETURN is pressed.<br>Use <strong>espeak -x</strong> to see the corresponding phoneme codes.
 <p> <hr>
 <h3>2.2.2 Use with KDE Text-to-Speech (KTTS)</h3>
 To add to KDE-Text-to-Speech Manager (KTTSMgr), use it as a "Command" talker
 with "command for speaking texts" set to:<br>
-   <strong>cat %f | speak --stdin -w %w</strong>
+   <strong>cat %f | espeak --stdin -w %w</strong>
 <p>
 Note:
 <ul>
-<li>When used by the KTTS system, I noticed a slight background hiss with the speech, which is not present when I use <strong>speak</strong> directly from the command line. This was because KDE sound default was set to "8 bits" rather than 16 bits.
-<li>KTTSMgr breaks the text into sentences to pass to the speech engine, but it mistakenly assumes sentence breaks when dots follow abbreviations and therefore pauses after the dots in "eg. Mr. John B. Smith etc."  Speaking a text file directly with <strong>speak</strong> gives better results in this respect.
-<li>Speaking text from a web page using KTTS often causes headings and image captions to be run together with the following text as a single sentence.  Speaking the HTML directly  with the <strong>-m</strong> option set (i.e. using <strong>speak -m -f text.html</strong>), may help if this is a problem. 
+<li>When used by the KTTS system, I noticed a slight background hiss with the speech, which is not present when I use <strong>espeak</strong> directly from the command line. This was because KDE sound default was set to "8 bits" rather than 16 bits.
+<li>KTTSMgr breaks the text into sentences to pass to the speech engine, but it mistakenly assumes sentence breaks when dots follow abbreviations and therefore pauses after the dots in "eg. Mr. John B. Smith etc."  Speaking a text file directly with <strong>espeak</strong> gives better results in this respect.
+<li>Speaking text from a web page using KTTS often causes headings and image captions to be run together with the following text as a single sentence.  Speaking the HTML directly  with the <strong>-m</strong> option set (i.e. using <strong>espeak -m -f text.html</strong>), may help if this is a problem. 
 </ul>
 <p> <hr>
 <h3>2.2.3 The Command Line Options</h3>
 <dl>
 <dt>
-<strong>speak [options] ["words"]</strong><br>
+<strong>espeak [options] ["words"]</strong><br>
 <dd>Text input can be taken either from a file, from a string in the command, or from stdin.
 <p>
 <dt>
@@ -118,7 +118,7 @@
 <p>
 <dt><strong>--compile[=<voice name>]</strong><br>
 <dd>
-Compile the pronunciation rule and dictionary lookup data from their source files in the current directory.  The Voice determines which language's files are compiled.  For example, if it's an English voice, then <em>en_rules</em>, <em>en_list</em>, and <em>en_extra</em> (if present), are compiled to replace <em>en_dict</em>  in the <em>speak-data</em> directory.  If no Voice is specified then the default Voice is used.
+Compile the pronunciation rule and dictionary lookup data from their source files in the current directory.  The Voice determines which language's files are compiled.  For example, if it's an English voice, then <em>en_rules</em>, <em>en_list</em>, and <em>en_extra</em> (if present), are compiled to replace <em>en_dict</em>  in the <em>espeak-data</em> directory.  If no Voice is specified then the default Voice is used.
 <p>
 <dt><strong>--punct[="<characters>"]</strong><br>
 <dd>
@@ -134,7 +134,7 @@
 <h3>2.2.4 The Input Text</h3>
 If the -m option is used to indicate marked-up text, then HTML can be spoken directly.
 <p>
-As well as plain text, phoneme mnemonics can be used in the text input to <strong>speak</strong>.  They are enclosed within double square brackets.  Spaces are used to separate words and all stressed syllables must be marked explicitly.<br>
+As well as plain text, phoneme mnemonics can be used in the text input to <strong>espeak</strong>.  They are enclosed within double square brackets.  Spaces are used to separate words and all stressed syllables must be marked explicitly.<br>
    eg: [[D,Is Iz sVm f at n'EtIk t'Ekst 'InpUt]]
 <hr>
 
diff -uNr espeak-1.16-source/docs/index.html espeak-1.16-source-mod/docs/index.html
--- espeak-1.16-source/docs/index.html	2006-09-21 12:27:13.000000000 +0200
+++ espeak-1.16-source-mod/docs/index.html	2006-11-02 19:59:19.000000000 +0200
@@ -57,7 +57,7 @@
 <hr>
 <strong>speak</strong> was originally written for Acorn/RISC_OS computers starting in 1995. This version is an update and re-write, including a relaxation of the original memory and processing power constraints, and with support for additional languages if anyone is interested in doing so.
 <p>
-The project name <strong>speak</strong> had already been taken by another project on SourceForge (for a Windows TTS front-end) so I added a letter 'e' to the front to make <strong>eSpeak</strong>.  For now, the program executable remains <strong>speak</strong> and is referred to as such in the documentation.
+The project name <strong>speak</strong> had already been taken by another project on SourceForge (for a Windows TTS front-end) so I added a letter 'e' to the front to make <strong>espeak</strong>.
 </td>
     </tr>
   </tbody>
diff -uNr espeak-1.16-source/docs/languages.html espeak-1.16-source-mod/docs/languages.html
--- espeak-1.16-source/docs/languages.html	2006-09-21 12:40:37.000000000 +0200
+++ espeak-1.16-source-mod/docs/languages.html	2006-11-02 20:03:17.000000000 +0200
@@ -27,8 +27,8 @@
 
 A number of Voice files are provided in the <code>espeak-data/voices</code> directory.
 You can select one of these with the <strong>-v <voice filename></strong> parameter to the
-speak command, eg:
-<pre>   speak -vaf</pre>
+espeak command, eg:
+<pre>   espeak -vaf</pre>
 to speak using the Afrikaans voice.
 <p>
 For details of the voice files see <a href="voices.html">Voices</a>.
@@ -37,7 +37,7 @@
 <dl>
 <dt>
 <strong>default</strong><br>
-<dd>   This voice is used if none is specified in the speak command.  Copy your preferred voice to "default" so you can use the speak command without the need to specify a voice.</dd>
+<dd>   This voice is used if none is specified in the espeak command.  Copy your preferred voice to "default" so you can use the espeak command without the need to specify a voice.</dd>
 </dl>
 </ul>
 <h3>3.2 English Voices</h3>
diff -uNr espeak-1.16-source/docs/phonemes.html espeak-1.16-source-mod/docs/phonemes.html
--- espeak-1.16-source/docs/phonemes.html	2006-09-21 12:40:52.000000000 +0200
+++ espeak-1.16-source-mod/docs/phonemes.html	2006-11-02 20:06:23.000000000 +0200
@@ -23,7 +23,7 @@
 <p>
 The phoneme mnemonics are based on the scheme by Kirschenbaum: <a href="http://www.kirshenbaum.net/IPA/ascii-ipa.pdf">www.kirshenbaum.net/IPA/ascii-ipa.pdf</a>, which gives the International Phonetic Alphabet equivalents.
 <p>
-Phoneme mnemonics can be used directly in the text input to <strong>speak</strong>.  They are enclosed within double square brackets.  Spaces are used to separate words and all stressed syllables must be marked explicitly. eg:<br>
+Phoneme mnemonics can be used directly in the text input to <strong>espeak</strong>.  They are enclosed within double square brackets.  Spaces are used to separate words and all stressed syllables must be marked explicitly. eg:<br>
 [[D,Is Iz sVm f at n'EtIk t'Ekst 'InpUt]]
 <ul>
 <pre><table>
diff -uNr espeak-1.16-source/docs/phontab.html espeak-1.16-source-mod/docs/phontab.html
--- espeak-1.16-source/docs/phontab.html	2006-09-21 12:05:22.000000000 +0200
+++ espeak-1.16-source-mod/docs/phontab.html	2006-11-02 20:07:04.000000000 +0200
@@ -36,7 +36,7 @@
 <parent> Is the name of a previously defined phoneme table whose phoneme definitions are inherited by this one.  The name <strong>base</strong> indicates the first (base) phoneme table.
 <p>
 <dt><strong>phonemenumber</strong> <integer>
-<dd>This statement is used at the start of the master <strong>phonemes</strong> file to define some specific code numbers for various phonemes which are used directly within the <strong>speak</strong> program.
+<dd>This statement is used at the start of the master <strong>phonemes</strong> file to define some specific code numbers for various phonemes which are used directly within the <strong>espeak</strong> program.
 </dl>
 <p> <hr>
 <h3>Phoneme definitions</h3>
@@ -149,7 +149,7 @@
 <dd>Change to this if the next phoneme is <strong>not</strong> a vowel.
 <p>
 <dt><strong>lengthmod</strong> <integer>
-<dd>(C) Determines how this consonant affects the length of the previous vowel. This value is used as index into the <code>length_mods</code> table in the <code>CalcLengths()</code> function in the speak program.
+<dd>(C) Determines how this consonant affects the length of the previous vowel. This value is used as index into the <code>length_mods</code> table in the <code>CalcLengths()</code> function in the espeak program.
 <p>
 <dt><strong>vowelin</strong> <vowel transition data>
 <dd>(C) Specifies the effects of this consonant on the formants of a following vowel. See "vowel transitions", below.
@@ -180,7 +180,7 @@
 A <em><sound spec></em> in the phoneme table can refer to a WAV file, a formant sequence, or a mixture of both. It can also include a numeric value to adjust the length of the sound.
 <p> <hr>
 <h3>Vowel Transitions</h3>
-These specify how a consonant affects an adjacent vowel.  A consonant may cause a transition in the vowel's formants as the mouth changes shape between the consonant and the vowel.  The following attributes may be specified.  Note that the maximum rate of change of formant frequencies is limited by the speak program.<p>
+These specify how a consonant affects an adjacent vowel.  A consonant may cause a transition in the vowel's formants as the mouth changes shape between the consonant and the vowel.  The following attributes may be specified.  Note that the maximum rate of change of formant frequencies is limited by the espeak program.<p>
 <ul><dl>
 <dt><strong>len=<integer></strong>
 <dd>Nominal length of the transition in mS.  If omitted a default value is used.
diff -uNr espeak-1.16-source/docs/voices.html espeak-1.16-source-mod/docs/voices.html
--- espeak-1.16-source/docs/voices.html	2006-09-21 12:41:22.000000000 +0200
+++ espeak-1.16-source-mod/docs/voices.html	2006-11-02 20:04:35.000000000 +0200
@@ -15,9 +15,9 @@
 A Voice file specifies a language (and possibly a language variant or dialect) together with various attributes that affect the characteristics of the voice quality and how the language is spoken.<p>
 Voice files are placed in the <code>espeak-data/voices</code> directory, or within subdirectories in there.<p>
 The available voice files can be listed by:<pre>
-   speak --voices
+   espeak --voices
 or
-   speak --voices=<language></pre>
+   espeak --voices=<language></pre>
 <hr>
 <h3>5.2 Contents of Voice Files</h3>
 The <strong>language</strong> attribute is mandatory.  All the other attributes are optional.
@@ -109,7 +109,7 @@
 <dt>
 <strong>dictionary  <name></strong><br>
 <dd>   Specifies which pair of dictionary files to use.  eg. "english"
-   indicates that <em>speak-data/en_dict</em> should
+   indicates that <em>espeak-data/en_dict</em> should
    be used to translate from words to phonemes.  This parameter is usually
    not needed as it is set by default to the first two letters of "language" parameter.</dd>
 <p>
@@ -217,12 +217,12 @@
 <h3>5.3 Voice Files Provided</h3>
 A number of Voice files are provided in the <code>espeak-data/voices</code> directory.
 You can select one of these with the <strong>-v <voice filename></strong> parameter to the
-speak command.
+espeak command.
 <p>
 <dl>
 <dt>
 <strong>default</strong><br>
-<dd>   This voice is used if none is specified in the speak command.  Copy your preferred voice to "default" so you can use the speak command without the need to specify a voice.</dd>
+<dd>   This voice is used if none is specified in the espeak command.  Copy your preferred voice to "default" so you can use the espeak command without the need to specify a voice.</dd>
 </dl>
 For a list of voices provided for English and other languages see <a href="languages.html">Languages</a>.
 
diff -uNr espeak-1.16-source/ReadMe espeak-1.16-source-mod/ReadMe
--- espeak-1.16-source/ReadMe	2006-09-20 23:19:41.000000000 +0200
+++ espeak-1.16-source-mod/ReadMe	2006-11-02 19:57:40.000000000 +0200
@@ -6,9 +6,9 @@
 =========
 
 The  src  directory contains a simple  makefile  that compiles all the
-source files in the directory and produces a  "speak"  binary.
+source files in the directory and produces an  "espeak"  binary.
 
-When run, the "speak" program expects to find the  espeak-data  directory
+When run, the "espeak" program expects to find the  espeak-data  directory
 either in the user's home directory, or if not there, in /use/share.
 
 
@@ -17,7 +17,7 @@
 
 The makefile also compiles a shared library version of eSpeak and creates a
 file:  libespeak.so.1.xx  where xx is the version number.  This is not
-currently used by the "speak" program, but is available for use by other
+currently used by the "espeak" program, but is available for use by other
 software (eg. the next version of Speech Dispatcher).
 
 The API is described in the file:  speak_lib.h.
@@ -26,7 +26,7 @@
 Portaudio.
 ========== 
 
-The "speak" program uses the PortAudio sound interface library.  There are two
+The "espeak" program uses the PortAudio sound interface library.  There are two
 versions, V18 and V19 and their APIs are different.  Some Linux distributions
 use V18 (eg. Debian, Ubuntu) others (eg. SuSe) use V19.
 
diff -uNr espeak-1.16-source/src/Makefile espeak-1.16-source-mod/src/Makefile
--- espeak-1.16-source/src/Makefile	2006-11-02 20:09:34.000000000 +0200
+++ espeak-1.16-source-mod/src/Makefile	2006-11-02 19:55:45.000000000 +0200
@@ -6,7 +6,7 @@
 DATADIR=/usr/share/espeak-data
 
 RELEASE = 1.16
-BIN_NAME = speak
+BIN_NAME = espeak
 LIB_NAME = libespeak.so
 LIB_VERSION = 1
 LIBTAG = $(LIB_VERSION).$(RELEASE)

makefile_install_target.patch:

--- NEW FILE makefile_install_target.patch ---
diff -uNr espeak-1.16-source/src/Makefile espeak-1.16-source-mod/src/Makefile
--- espeak-1.16-source/src/Makefile	2006-10-03 00:59:36.000000000 +0200
+++ espeak-1.16-source-mod/src/Makefile	2006-11-04 18:29:51.000000000 +0200
@@ -1,3 +1,18 @@
+BINDIR=/usr/local/bin
+INCDIR=/usr/include/espeak
+LIBDIR=/usr/lib
+DATADIR=/usr/share/espeak-data
+
+RELEASE = 1.16
+BIN_NAME = speak
+LIB_NAME = libespeak.so
+LIB_VERSION = 1
+LIBTAG = $(LIB_VERSION).$(RELEASE)
+
+INSTALL = /usr/bin/install
+LN_SF = /bin/ln -sf
+MKDIR = mkdir -p
+
 speak_SOURCES = speak.cpp compiledict.cpp dictionary.cpp intonation.cpp \
 	readclause.cpp setlengths.cpp \
 	synthdata.cpp synthesize.cpp translate.cpp tr_english.cpp \
@@ -17,29 +32,48 @@
 OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))
 LIBS2=-lstdc++
 
+CXXFLAGS=-O2
 
 
-all: speak libespeak.so
-	mv libespeak.so libespeak.so.1.1.16
+all: $(BIN_NAME) $(LIB_NAME)
+	mv $(LIB_NAME) $(LIB_NAME).$(LIBTAG)
 
 .cpp.o:
-	$(CXX) $(CXXFLAGS) -O2 -Wall -pedantic -I. -c -fno-exceptions $<
+	$(CXX) $(CXXFLAGS) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -pedantic -I. -c -fno-exceptions $<
 
-speak: $(OBJS1)
+$(BIN_NAME): $(OBJS1)
 	$(CXX) -o $@ $(OBJS1) $(LIBS1)
 
 
 
 x_%.o: %.cpp
-	$(CXX) $(CXXFLAGS) -O2 -Wall -fpic -fvisibility=hidden -pedantic \
+	$(CXX) $(CXXFLAGS) -Wall -fpic -fvisibility=hidden -pedantic \
 	-I. -D LIBRARY -c -fno-exceptions $<  -o x_$*.o
 
-libespeak.so: $(OBJS2)
-	$(CXX) -shared -Wl,-soname,libespeak.so.1 -o $@ $(OBJS2) $(LIBS2)
-
+$(LIB_NAME): $(OBJS2)
+	$(CXX) -shared -Wl,-soname,$(LIB_NAME).$(LIB_VERSION) -o $@ $(OBJS2) $(LIBS2)
+  
 clean:
 	rm -f *.o *~
 
 distclean: clean
-	rm -f speak
-	rm -f libespeak.so*
+	rm -f $(BIN_NAME)
+	rm -f $(LIB_NAME)*
+
+install: all
+	# Create directories
+	$(MKDIR) $(DESTDIR)$(BINDIR)
+	$(MKDIR) $(DESTDIR)$(LIBDIR)
+	$(MKDIR) $(DESTDIR)$(INCDIR)
+	$(MKDIR) $(DESTDIR)$(DATADIR)
+	# Install executable
+	$(INSTALL) -m 755 $(BIN_NAME) $(DESTDIR)$(BINDIR)
+	# Install shared library
+	$(INSTALL) -m 755 $(LIB_NAME).$(LIBTAG) $(DESTDIR)$(LIBDIR)
+	$(LN_SF) $(LIB_NAME).$(LIBTAG) $(DESTDIR)$(LIBDIR)/$(LIB_NAME).$(LIB_VERSION)
+	$(LN_SF) $(LIB_NAME).$(LIB_VERSION) $(DESTDIR)$(LIBDIR)/$(LIB_NAME)
+	# Install development headers
+	$(INSTALL) -pm 644 speak_lib.h $(DESTDIR)$(INCDIR)
+	# Install data files
+	cp -prf ../espeak-data/* $(DESTDIR)$(DATADIR)
+
diff -uNr espeak-1.16-source/src/speech.h espeak-1.16-source-mod/src/speech.h
--- espeak-1.16-source/src/speech.h	2006-10-03 00:51:13.000000000 +0200
+++ espeak-1.16-source-mod/src/speech.h	2006-11-04 18:27:02.000000000 +0200
@@ -36,7 +36,10 @@
 #endif
 
 // will look for espeak_data directory here, and also in user's home directory
-#define PATH_ESPEAK_DATA  "/usr/share/espeak-data"
+#ifndef PATH_ESPEAK_DATA
+   #define PATH_ESPEAK_DATA  "/usr/share/espeak-data"
+#endif
+
 
 typedef unsigned short USHORT;
 typedef unsigned char  UCHAR;

makefile_lpthread.patch:

--- NEW FILE makefile_lpthread.patch ---
diff -uNr espeak-1.16-source/src/Makefile espeak-1.16-source-mod/src/Makefile
--- espeak-1.16-source/src/Makefile	2006-10-03 00:59:36.000000000 +0200
+++ espeak-1.16-source-mod/src/Makefile	2006-10-04 15:35:34.000000000 +0200
@@ -11,7 +11,7 @@
 
 SRCS1=$(speak_SOURCES)
 OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
-LIBS1=-lstdc++ -lportaudio
+LIBS1=-lstdc++ -lportaudio -lpthread
 
 SRCS2=$(libespeak_SOURCES)
 OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/espeak/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	9 Nov 2006 17:26:33 -0000	1.1
+++ .cvsignore	9 Nov 2006 17:28:19 -0000	1.2
@@ -0,0 +1 @@
+espeak-1.16-source.zip


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/espeak/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	9 Nov 2006 17:26:33 -0000	1.1
+++ sources	9 Nov 2006 17:28:19 -0000	1.2
@@ -0,0 +1 @@
+c376ea94cddda90b093f231926f7ba44  espeak-1.16-source.zip




More information about the fedora-extras-commits mailing list