diff options
author | William Hubbs <williamh@gentoo.org> | 2008-01-24 05:37:32 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2008-01-24 05:37:32 +0000 |
commit | 82e9940bcf8002b2bbe8897550d32019a7745ef8 (patch) | |
tree | 094bc12f27cc762725a57fca2e40cf057d527d4a /app-accessibility | |
parent | whitespace (diff) | |
download | historical-82e9940bcf8002b2bbe8897550d32019a7745ef8.tar.gz historical-82e9940bcf8002b2bbe8897550d32019a7745ef8.tar.bz2 historical-82e9940bcf8002b2bbe8897550d32019a7745ef8.zip |
Version bump.
Package-Manager: portage-2.1.4
Diffstat (limited to 'app-accessibility')
-rw-r--r-- | app-accessibility/flite/ChangeLog | 11 | ||||
-rw-r--r-- | app-accessibility/flite/Manifest | 24 | ||||
-rw-r--r-- | app-accessibility/flite/files/digest-flite-1.3 | 3 | ||||
-rw-r--r-- | app-accessibility/flite/files/flite-1.3-alsa-support.patch | 333 | ||||
-rw-r--r-- | app-accessibility/flite/files/flite-1.3-shared-libs.patch | 170 | ||||
-rw-r--r-- | app-accessibility/flite/flite-1.3.ebuild | 65 |
6 files changed, 601 insertions, 5 deletions
diff --git a/app-accessibility/flite/ChangeLog b/app-accessibility/flite/ChangeLog index 4789ffcd3c45..a10838da5cd4 100644 --- a/app-accessibility/flite/ChangeLog +++ b/app-accessibility/flite/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-accessibility/flite # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-accessibility/flite/ChangeLog,v 1.20 2008/01/11 15:42:15 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-accessibility/flite/ChangeLog,v 1.21 2008/01/24 05:37:31 williamh Exp $ + +*flite-1.3 (24 Jan 2008) + + 24 Jan 2008; William Hubbs <williamh@gentoo.org> + +files/flite-1.3-alsa-support.patch, +files/flite-1.3-shared-libs.patch, + +flite-1.3.ebuild: + Version bump. + The patches for alsa support and shared libraries were retrieved from + http://dialogpalette.sourceforge.net/extras.html. 11 Jan 2008; Jeroen Roovers <jer@gentoo.org> flite-1.2-r1.ebuild: Stable for HPPA (bug #204504). diff --git a/app-accessibility/flite/Manifest b/app-accessibility/flite/Manifest index 26df998df17f..8d4ffd20e7ab 100644 --- a/app-accessibility/flite/Manifest +++ b/app-accessibility/flite/Manifest @@ -2,16 +2,29 @@ AUX const.patch 466 RMD160 1e904127dbd32b3de46c224022330b9406dd79b5 SHA1 91d4f78 MD5 ef87fb0bdde5622c0ee9200d14bc683c files/const.patch 466 RMD160 1e904127dbd32b3de46c224022330b9406dd79b5 files/const.patch 466 SHA256 31df1356f8ada98927f786903c3f69ca45c46d810cb6c1971a029296ccbff4f3 files/const.patch 466 +AUX flite-1.3-alsa-support.patch 11007 RMD160 bfa1bcc6c9ff713f289944ff7b5400cd1ef07ff3 SHA1 a8a90225fb9f5cfded5943c8ab22a92208b0b07f SHA256 f43266bc5c70c12512be6a8e1980d5d5551d7624bd27a678431d53df695cf01d +MD5 f63d34673c98df4fb8c7b92f4c124ed7 files/flite-1.3-alsa-support.patch 11007 +RMD160 bfa1bcc6c9ff713f289944ff7b5400cd1ef07ff3 files/flite-1.3-alsa-support.patch 11007 +SHA256 f43266bc5c70c12512be6a8e1980d5d5551d7624bd27a678431d53df695cf01d files/flite-1.3-alsa-support.patch 11007 +AUX flite-1.3-shared-libs.patch 7663 RMD160 d5b73272ed794b3b8b1a83d041eb6c3d9f81178c SHA1 b07a01729607805dea2c13c3990adc31be866600 SHA256 b7cc0a8fe5f4e71a8bc83dd6e4442d641fb909fd812826dc66e9c3749c65027b +MD5 35966beb0d89d5b19c20d7fae915678b files/flite-1.3-shared-libs.patch 7663 +RMD160 d5b73272ed794b3b8b1a83d041eb6c3d9f81178c files/flite-1.3-shared-libs.patch 7663 +SHA256 b7cc0a8fe5f4e71a8bc83dd6e4442d641fb909fd812826dc66e9c3749c65027b files/flite-1.3-shared-libs.patch 7663 DIST flite-1.2-release.tar.bz2 7817919 RMD160 e261cda8212590d1c3edb66826d404e5ad0f4c2f SHA1 ed80430a2098f780b0fd145555ce8f437d7415b2 SHA256 10ff42ce08a628c7fd84d26b5228d549e9eecb1eb03cb158e87d8be66bc58ae2 +DIST flite-1.3-release.tar.gz 10663835 RMD160 a908acfd196754783ee4665ac84ea860d54bcf80 SHA1 233144a772de72741ae1aa2292f672c30224afb3 SHA256 922225f7001e57a0fbace8833b0a48790a68f6c7b491f2d47c78ad537ab78a8b DIST flite_lexfix.tar.gz 2857920 RMD160 fea1ad471b22d47f802951824f28b79baa6b16fd SHA1 8647b3925b1d2340394f15c712fb28576934f4ff SHA256 caa81ffa962b31dbbc0211bc20506a2bb02c707695b286f072c8ec264e32252c EBUILD flite-1.2-r1.ebuild 1732 RMD160 f46cefaf6175cf6f59d479d251f7a331b7d8b9e6 SHA1 a16ac345a83fbde90bf7a3f60623a77003bd5b7e SHA256 c16d88946d8d78405081cac6a0fa97e490e12609813ba98d0d60541863235e4c MD5 3fdf47396abb735ea3f7a617e6ee4086 flite-1.2-r1.ebuild 1732 RMD160 f46cefaf6175cf6f59d479d251f7a331b7d8b9e6 flite-1.2-r1.ebuild 1732 SHA256 c16d88946d8d78405081cac6a0fa97e490e12609813ba98d0d60541863235e4c flite-1.2-r1.ebuild 1732 -MISC ChangeLog 2547 RMD160 0ab83353414d31db1bad1b46c690c4c97a19a225 SHA1 10bc9b2cc446cdb20112eab1f26c6ee4f0d6de33 SHA256 b83aadf9af121648605f4bebc8dd492d4ada376505b296bc15973aeb61223db8 -MD5 911862aa68f683b71a082262acb174a4 ChangeLog 2547 -RMD160 0ab83353414d31db1bad1b46c690c4c97a19a225 ChangeLog 2547 -SHA256 b83aadf9af121648605f4bebc8dd492d4ada376505b296bc15973aeb61223db8 ChangeLog 2547 +EBUILD flite-1.3.ebuild 1558 RMD160 630cbfd2ce66297a4bacd623300f296f51362318 SHA1 ca74e8e3e2b6d31246bad6d13ea604b237749907 SHA256 2bca6061f8736c0ab8b74d31d47e221a95c4322a37e8f36aa173dd3bf34f56d9 +MD5 e317c4c9e84c6ce00507f6b8234de797 flite-1.3.ebuild 1558 +RMD160 630cbfd2ce66297a4bacd623300f296f51362318 flite-1.3.ebuild 1558 +SHA256 2bca6061f8736c0ab8b74d31d47e221a95c4322a37e8f36aa173dd3bf34f56d9 flite-1.3.ebuild 1558 +MISC ChangeLog 2866 RMD160 8bd625e93a69926aca7d79eb0789c38fab020013 SHA1 0475a16beb14a4dc368ce7d3c9a1f68089a3d8e4 SHA256 99774778428fe030858b22c9190841edec8d93ae38f884c07a5b4c9e64eca2aa +MD5 afb6d9021709bac6879dad80816a0cce ChangeLog 2866 +RMD160 8bd625e93a69926aca7d79eb0789c38fab020013 ChangeLog 2866 +SHA256 99774778428fe030858b22c9190841edec8d93ae38f884c07a5b4c9e64eca2aa ChangeLog 2866 MISC metadata.xml 185 RMD160 75382db82e4c69d70f2d53f63363adec302720e5 SHA1 90563c269eff265fbd369095c606bc383cc07232 SHA256 b6de40518e01d3ef5447352b3f476c1f5b8e6ae53d5e654a2fb9e4ee7fdbe135 MD5 4f5d797c455932135181f0c31b5e71b2 metadata.xml 185 RMD160 75382db82e4c69d70f2d53f63363adec302720e5 metadata.xml 185 @@ -19,3 +32,6 @@ SHA256 b6de40518e01d3ef5447352b3f476c1f5b8e6ae53d5e654a2fb9e4ee7fdbe135 metadata MD5 ee5b0a5b8f020bbb6784528a82dcda05 files/digest-flite-1.2-r1 500 RMD160 643519c28d1dd40f2f50c0969bc632f090e9073f files/digest-flite-1.2-r1 500 SHA256 d4585fd100d1791369b742c85e7c912ba127cdbd16a63282c5dfe73a3f719280 files/digest-flite-1.2-r1 500 +MD5 a2cdb9cb72942d82df191459d44d7418 files/digest-flite-1.3 259 +RMD160 6f71db022c81264ee9f4b28ee90e58078a21aa8d files/digest-flite-1.3 259 +SHA256 e3ecbf92f20f7a247302fa64fba02088e0feccad788a37492016b0671bc50e29 files/digest-flite-1.3 259 diff --git a/app-accessibility/flite/files/digest-flite-1.3 b/app-accessibility/flite/files/digest-flite-1.3 new file mode 100644 index 000000000000..a240bc3eaefe --- /dev/null +++ b/app-accessibility/flite/files/digest-flite-1.3 @@ -0,0 +1,3 @@ +MD5 ae0aca1cb7b4801f4372f3a75a9e52b5 flite-1.3-release.tar.gz 10663835 +RMD160 a908acfd196754783ee4665ac84ea860d54bcf80 flite-1.3-release.tar.gz 10663835 +SHA256 922225f7001e57a0fbace8833b0a48790a68f6c7b491f2d47c78ad537ab78a8b flite-1.3-release.tar.gz 10663835 diff --git a/app-accessibility/flite/files/flite-1.3-alsa-support.patch b/app-accessibility/flite/files/flite-1.3-alsa-support.patch new file mode 100644 index 000000000000..9d3415e3fe4b --- /dev/null +++ b/app-accessibility/flite/files/flite-1.3-alsa-support.patch @@ -0,0 +1,333 @@ +diff -uNr flite-1.3-release/configure.in flite-1.3-release-mod/configure.in +--- flite-1.3-release/configure.in 2005-08-13 13:43:21.000000000 +0200 ++++ flite-1.3-release-mod/configure.in 2006-11-13 21:16:27.000000000 +0200 +@@ -206,10 +206,10 @@ + AC_CHECK_HEADER(sys/audioio.h, + [AUDIODRIVER="sun" + AUDIODEFS=-DCST_AUDIO_SUNOS]) +-dnl AC_CHECK_HEADER(sys/asoundlib.h, +-dnl [AUDIODRIVER="alsa" +-dnl AUDIODEFS=-DCST_AUDIO_ALSA +-dnl AUDIOLIBS=-lasound]) ++AC_CHECK_HEADER(alsa/asoundlib.h, ++ [AUDIODRIVER="alsa" ++ AUDIODEFS=-DCST_AUDIO_ALSA ++ AUDIOLIBS=-lasound]) + AC_CHECK_HEADER(mmsystem.h, + [AUDIODRIVER="wince" + AUDIODEFS=-DCST_AUDIO_WINCE +diff -uNr flite-1.3-release/src/audio/au_alsa.c flite-1.3-release-mod/src/audio/au_alsa.c +--- flite-1.3-release/src/audio/au_alsa.c 1970-01-01 02:00:00.000000000 +0200 ++++ flite-1.3-release-mod/src/audio/au_alsa.c 2006-11-13 21:16:54.000000000 +0200 +@@ -0,0 +1,311 @@ ++/*************************************************************************/ ++/* */ ++/* Language Technologies Institute */ ++/* Carnegie Mellon University */ ++/* Copyright (c) 2000 */ ++/* All Rights Reserved. */ ++/* */ ++/* Permission is hereby granted, free of charge, to use and distribute */ ++/* this software and its documentation without restriction, including */ ++/* without limitation the rights to use, copy, modify, merge, publish, */ ++/* distribute, sublicense, and/or sell copies of this work, and to */ ++/* permit persons to whom this work is furnished to do so, subject to */ ++/* the following conditions: */ ++/* 1. The code must retain the above copyright notice, this list of */ ++/* conditions and the following disclaimer. */ ++/* 2. Any modifications must be clearly marked as such. */ ++/* 3. Original authors' names are not deleted. */ ++/* 4. The authors' names are not used to endorse or promote products */ ++/* derived from this software without specific prior written */ ++/* permission. */ ++/* */ ++/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */ ++/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */ ++/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */ ++/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */ ++/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */ ++/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */ ++/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */ ++/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */ ++/* THIS SOFTWARE. */ ++/* */ ++/*********************************************************************** */ ++/* Author: Lukas Loehrer ( */ ++/* Date: January 2005 */ ++/*************************************************************************/ ++/* */ ++/* Native access to alsa audio devices on Linux */ ++/* Tested with libasound version 1.0.10 */ ++/*************************************************************************/ ++ ++#include <stdlib.h> ++#include <unistd.h> ++#include <sys/types.h> ++#include <assert.h> ++#include <errno.h> ++ ++#include "cst_string.h" ++#include "cst_wave.h" ++#include "cst_audio.h" ++ ++#include <alsa/asoundlib.h> ++ ++ ++/*static char *pcm_dev_name = "hw:0,0"; */ ++static char *pcm_dev_name ="default"; ++ ++static inline void print_pcm_state(snd_pcm_t *handle, char *msg) ++{ ++ fprintf(stderr, "PCM state at %s = %s\n", msg, ++ snd_pcm_state_name(snd_pcm_state(handle))); ++} ++ ++cst_audiodev *audio_open_alsa(int sps, int channels, cst_audiofmt fmt) ++{ ++ cst_audiodev *ad; ++ unsigned int real_rate; ++ int err; ++ ++ /* alsa specific stuff */ ++ snd_pcm_t *pcm_handle; ++ snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK; ++ snd_pcm_hw_params_t *hwparams; ++ snd_pcm_format_t format; ++ snd_pcm_access_t access = SND_PCM_ACCESS_RW_INTERLEAVED; ++ ++ /* Allocate the snd_pcm_hw_params_t structure on the stack. */ ++ snd_pcm_hw_params_alloca(&hwparams); ++ ++ /* Open pcm device */ ++ err = snd_pcm_open(&pcm_handle, pcm_dev_name, stream, 0); ++ if (err < 0) ++ { ++ cst_errmsg("audio_open_alsa: failed to open audio device %s. %s\n", ++ pcm_dev_name, snd_strerror(err)); ++ return NULL; ++ } ++ ++ /* Init hwparams with full configuration space */ ++ err = snd_pcm_hw_params_any(pcm_handle, hwparams); ++ if (err < 0) ++ { ++ snd_pcm_close(pcm_handle); ++ cst_errmsg("audio_open_alsa: failed to get hardware parameters from audio device. %s\n", snd_strerror(err)); ++ return NULL; ++ } ++ ++ /* Set access mode */ ++ err = snd_pcm_hw_params_set_access(pcm_handle, hwparams, access); ++ if (err < 0) ++ { ++ snd_pcm_close(pcm_handle); ++ cst_errmsg("audio_open_alsa: failed to set access mode. %s.\n", snd_strerror(err)); ++ return NULL; ++ } ++ ++ /* Determine matching alsa sample format */ ++ /* This could be implemented in a more */ ++ /* flexible way (byte order conversion). */ ++ switch (fmt) ++ { ++ case CST_AUDIO_LINEAR16: ++ if (CST_LITTLE_ENDIAN) ++ format = SND_PCM_FORMAT_S16_LE; ++ else ++ format = SND_PCM_FORMAT_S16_BE; ++ break; ++ case CST_AUDIO_LINEAR8: ++ format = SND_PCM_FORMAT_U8; ++ break; ++ case CST_AUDIO_MULAW: ++ format = SND_PCM_FORMAT_MU_LAW; ++ break; ++ default: ++ snd_pcm_close(pcm_handle); ++ cst_errmsg("audio_open_alsa: failed to find suitable format.\n"); ++ return NULL; ++ break; ++ } ++ ++ /* Set samble format */ ++ err = snd_pcm_hw_params_set_format(pcm_handle, hwparams, format); ++ if (err <0) ++ { ++ snd_pcm_close(pcm_handle); ++ cst_errmsg("audio_open_alsa: failed to set format. %s.\n", snd_strerror(err)); ++ return NULL; ++ } ++ ++ /* Set sample rate near the disired rate */ ++ real_rate = sps; ++ err = snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &real_rate, 0); ++ if (err < 0) ++ { ++ snd_pcm_close(pcm_handle); ++ cst_errmsg("audio_open_alsa: failed to set sample rate near %d. %s.\n", sps, snd_strerror(err)); ++ return NULL; ++ } ++ /*FIXME: This is probably too strict */ ++ assert(sps == real_rate); ++ ++ /* Set number of channels */ ++ assert(channels >0); ++ err = snd_pcm_hw_params_set_channels(pcm_handle, hwparams, channels); ++ if (err < 0) ++ { ++ snd_pcm_close(pcm_handle); ++ cst_errmsg("audio_open_alsa: failed to set number of channels to %d. %s.\n", channels, snd_strerror(err)); ++ return NULL; ++ } ++ ++ /* Commit hardware parameters */ ++ err = snd_pcm_hw_params(pcm_handle, hwparams); ++ if (err < 0) ++ { ++ snd_pcm_close(pcm_handle); ++ cst_errmsg("audio_open_alsa: failed to set hw parameters. %s.\n", snd_strerror(err)); ++ return NULL; ++ } ++ ++ /* Make sure the device is ready to accept data */ ++ assert(snd_pcm_state(pcm_handle) == SND_PCM_STATE_PREPARED); ++ ++ /* Write hardware parameters to flite audio device data structure */ ++ ad = cst_alloc(cst_audiodev, 1); ++ assert(ad != NULL); ++ ad->real_sps = ad->sps = sps; ++ ad->real_channels = ad->channels = channels; ++ ad->real_fmt = ad->fmt = fmt; ++ ad->platform_data = (void *) pcm_handle; ++ ++ return ad; ++} ++ ++int audio_close_alsa(cst_audiodev *ad) ++{ ++ int result; ++ snd_pcm_t *pcm_handle; ++ ++ if (ad == NULL) ++ return 0; ++ ++ pcm_handle = (snd_pcm_t *) ad->platform_data; ++ result = snd_pcm_close(pcm_handle); ++ if (result < 0) ++ { ++ cst_errmsg("audio_close_alsa: Error: %s.\n", snd_strerror(result)); ++ } ++ cst_free(ad); ++ return result; ++} ++ ++/* Returns zero if recovery was successful. */ ++static int recover_from_error(snd_pcm_t *pcm_handle, ssize_t res) ++{ ++ if (res == -EPIPE) /* xrun */ ++ { ++ res = snd_pcm_prepare(pcm_handle); ++ if (res < 0) ++ { ++ /* Failed to recover from xrun */ ++ cst_errmsg("recover_from_write_error: failed to recover from xrun. %s\n.", snd_strerror(res)); ++ return res; ++ } ++ } ++ else if (res == -ESTRPIPE) /* Suspend */ ++ { ++ while ((res = snd_pcm_resume(pcm_handle)) == -EAGAIN) ++ { ++ snd_pcm_wait(pcm_handle, 1000); ++ } ++ if (res < 0) ++ { ++ res = snd_pcm_prepare(pcm_handle); ++ if (res <0) ++ { ++ /* Resume failed */ ++ cst_errmsg("audio_recover_from_write_error: failed to resume after suspend. %s\n.", snd_strerror(res)); ++ return res; ++ } ++ } ++ } ++ else if (res < 0) ++ { ++ /* Unknown failure */ ++ cst_errmsg("audio_recover_from_write_error: %s.\n", snd_strerror(res)); ++ return res; ++ } ++ return 0; ++} ++ ++int audio_write_alsa(cst_audiodev *ad, void *samples, int num_bytes) ++{ ++ size_t frame_size; ++ ssize_t num_frames, res; ++ snd_pcm_t *pcm_handle; ++ char *buf = (char *) samples; ++ ++ /* Determine frame size in bytes */ ++ frame_size = audio_bps(ad->real_fmt) * ad->real_channels; ++ /* Require that only complete frames are handed in */ ++ assert((num_bytes % frame_size) == 0); ++ num_frames = num_bytes / frame_size; ++ pcm_handle = (snd_pcm_t *) ad->platform_data; ++ ++ while (num_frames > 0) ++ { ++ res = snd_pcm_writei(pcm_handle, buf, num_frames); ++ if (res != num_frames) ++ { ++ if (res == -EAGAIN || (res > 0 && res < num_frames)) ++ { ++ snd_pcm_wait(pcm_handle, 100); ++ } ++ else if (recover_from_error(pcm_handle, res) < 0) ++ { ++ return -1; ++ } ++ } ++ ++ if (res >0) ++ { ++ num_frames -= res; ++ buf += res * frame_size; ++ } ++ } ++ return num_bytes; ++} ++ ++int audio_flush_alsa(cst_audiodev *ad) ++{ ++ int result; ++ result = snd_pcm_drain((snd_pcm_t *) ad->platform_data); ++ if (result < 0) ++ { ++ cst_errmsg("audio_flush_alsa: Error: %s.\n", snd_strerror(result)); ++ } ++ /* Prepare device for more data */ ++ result = snd_pcm_prepare((snd_pcm_t *) ad->platform_data); ++if (result < 0) ++ { ++ cst_errmsg("audio_flush_alsa: Error: %s.\n", snd_strerror(result)); ++ } ++ return result; ++} ++ ++int audio_drain_alsa(cst_audiodev *ad) ++{ ++ int result; ++ result = snd_pcm_drop((snd_pcm_t *) ad->platform_data); ++ if (result < 0) ++ { ++ cst_errmsg("audio_drain_alsa: Error: %s.\n", snd_strerror(result)); ++ } ++/* Prepare device for more data */ ++ result = snd_pcm_prepare((snd_pcm_t *) ad->platform_data); ++if (result < 0) ++ { ++ cst_errmsg("audio_drain_alsa: Error: %s.\n", snd_strerror(result)); ++ } ++ return result; ++} diff --git a/app-accessibility/flite/files/flite-1.3-shared-libs.patch b/app-accessibility/flite/files/flite-1.3-shared-libs.patch new file mode 100644 index 000000000000..ffab92551f30 --- /dev/null +++ b/app-accessibility/flite/files/flite-1.3-shared-libs.patch @@ -0,0 +1,170 @@ +diff -uNr flite-1.3-release/config/common_make_rules flite-1.3-release-mod/config/common_make_rules +--- flite-1.3-release/config/common_make_rules 2004-12-20 00:20:43.000000000 +0200 ++++ flite-1.3-release-mod/config/common_make_rules 2006-11-12 12:17:25.000000000 +0200 +@@ -59,27 +59,35 @@ + endif + OBJDIR=$(BUILDDIR)/obj/$(DIRNAME) + BINDIR=$(BUILDDIR)/bin ++LIBDIR=$(BUILDDIR)/lib + ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM)) + BINDIR=$(TOP)/bin ++LIBDIR=$(TOP)/lib + endif + +-LIBDIR=$(BUILDDIR)/lib + BUILDDIRS=$(OBJDIR) $(BINDIR) $(LIBDIR) + +-FLITELIBS = $(BUILDDIR)/lib/libflite.a +-LDFLAGS += -L$(BUILDDIR)/lib -lflite -lm $(AUDIOLIBS) $(OTHERLIBS) ++ifdef SHFLAGS ++FLITELIBS = $(LIBDIR)/libflite.so ++LDFLAGS += -L$(LIBDIR) -lflite $(OTHERLIBS) ++else ++FLITELIBS = $(LIBDIR)/libflite.a ++LDFLAGS += -L$(LIBDIR) -lflite -lm $(AUDIOLIBS) $(OTHERLIBS) ++endif + + FULLOBJS = $(OBJS:%=$(OBJDIR)/%) + ifdef SHFLAGS + SOOBJS = $(OBJS:.o=.os) +-FULLSHOBJS = $(SOOBJS:%=$(OBJDIR)/%) ++FULLSOOBJS = $(SOOBJS:%=$(OBJDIR)/%) + ifdef LIBNAME + ALL += $(OBJDIR)/.build_so + endif +-endif ++else + ifdef LIBNAME + ALL += $(OBJDIR)/.build_lib + endif ++endif ++ + # Only do some directories when you are not cross compiling + ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM)) + OTHER_BUILD_DIRS = $(HOST_ONLY_DIRS) +@@ -117,14 +125,14 @@ + @ touch $(OBJDIR)/.build_so + + # Used in the lib/ directory and in building new voices +-$(OBJDIR)/%.so: %.shared.a ++%.so: %.shared.a + @ echo making $@ + @ rm -rf shared_os && mkdir shared_os +- @ rm -f $@ $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} ++ @ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION} + @ (cd shared_os && ar x ../$<) +- @ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os) +- @ ln -s $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} +- @ ln -s $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} $(LIBDIR)/$@ ++ @ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os -L../ $($(@:%.so=%_LDLIBS))) ++ @ ln -s $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION} ++ @ ln -s $@.${PROJECT_SHLIB_VERSION} $@ + @ rm -rf shared_os + + $(OBJDIR)/.make_build_dirs: +diff -uNr flite-1.3-release/lib/Makefile flite-1.3-release-mod/lib/Makefile +--- flite-1.3-release/lib/Makefile 1970-01-01 02:00:00.000000000 +0200 ++++ flite-1.3-release-mod/lib/Makefile 2006-11-12 12:17:40.000000000 +0200 +@@ -0,0 +1,73 @@ ++########################################################################### ++## ## ++## Language Technologies Institute ## ++## Carnegie Mellon University ## ++## Copyright (c) 1999 ## ++## All Rights Reserved. ## ++## ## ++## Permission is hereby granted, free of charge, to use and distribute ## ++## this software and its documentation without restriction, including ## ++## without limitation the rights to use, copy, modify, merge, publish, ## ++## distribute, sublicense, and/or sell copies of this work, and to ## ++## permit persons to whom this work is furnished to do so, subject to ## ++## the following conditions: ## ++## 1. The code must retain the above copyright notice, this list of ## ++## conditions and the following disclaimer. ## ++## 2. Any modifications must be clearly marked as such. ## ++## 3. Original authors' names are not deleted. ## ++## 4. The authors' names are not used to endorse or promote products ## ++## derived from this software without specific prior written ## ++## permission. ## ++## ## ++## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ## ++## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ## ++## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ## ++## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ## ++## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ## ++## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ## ++## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ## ++## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ## ++## THIS SOFTWARE. ## ++## ## ++########################################################################### ++## ## ++## FLITE libraries ## ++## ## ++########################################################################### ++TOP=.. ++DIRNAME=lib ++BUILD_DIRS = ++ALL_DIRS= ++FILES = Makefile ++LIBNAMES = flite flite_cmulex flite_usenglish \ ++ flite_cmu_us_kal flite_cmu_us_kal16 flite_cmu_time_awb ++ ++STATICLIBS= $(LIBNAMES:%=lib%.a) ++SHAREDARLIBS= $(LIBNAMES:%=lib%.shared.a) ++#SHAREDLIBS = $(LIBNAMES:%=lib%.so) ++SHAREDLIBS = $(SHAREDARLIBS:%.shared.a=%.so) ++VERSIONSHAREDLIBS = $(SHAREDLIBS:%=%.${PROJECT_VERSION}) \ ++ $(SHAREDLIBS:%=%.${PROJECT_SHLIB_VERSION}) ++ALL_LIBS = $(SHAREDLIBS) $(VERSIONSHAREDLIBS) ++ ++ALL = shared_libs ++ ++LOCAL_CLEAN=*.a *.so *.so.${PROJECT_VERSION} *.so.${PROJECT_SHLIB_VERSION} ++ ++include $(TOP)/config/common_make_rules ++ ++ifdef SHFLAGS ++shared_libs: $(SHAREDLIBS) ++libflite_LDLIBS = -lm $(AUDIOLIBS) ++libflite_cmulex_LDLIBS = -lflite ++libflite_usenglish_LDLIBS = -lflite ++libflite_cmu_us_kal_LDLIBS = -lflite_cmulex -lflite_usenglish ++libflite_cmu_us_kal16_LDLIBS = -lflite_cmulex -lflite_usenglish ++libflite_cmu_time_awb_LDLIBS = -lflite -lflite_cmulex -lflite_usenglish ++else ++shared_libs: nothing ++endif ++ ++install: ++ @ tar cvf - $(ALL_LIBS) | ( cd $(INSTALLLIBDIR) && tar xf -) ++ +diff -uNr flite-1.3-release/main/Makefile flite-1.3-release-mod/main/Makefile +--- flite-1.3-release/main/Makefile 2005-08-08 00:38:42.000000000 +0200 ++++ flite-1.3-release-mod/main/Makefile 2006-11-12 11:44:46.000000000 +0200 +@@ -50,11 +50,11 @@ + + flite_LIBS = flite_$(FL_VOX) flite_$(FL_LANG) flite_$(FL_LEX) + flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%) +-flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a) ++flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.so) + + flite_time_LIBS = flite_cmu_time_awb flite_$(FL_LANG) flite_$(FL_LEX) + flite_time_LIBS_flags = -L$(LIBDIR) $(flite_time_LIBS:%=-l%) +-flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.a) ++flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.so) + + include $(TOP)/config/common_make_rules + +diff -uNr flite-1.3-release/Makefile flite-1.3-release-mod/Makefile +--- flite-1.3-release/Makefile 2005-11-01 15:40:45.000000000 +0200 ++++ flite-1.3-release-mod/Makefile 2006-11-12 11:44:46.000000000 +0200 +@@ -41,7 +41,7 @@ + ########################################################################### + TOP=. + DIRNAME= +-BUILD_DIRS = include src lang doc ++BUILD_DIRS = include src lang lib doc + ALL_DIRS=config $(BUILD_DIRS) testsuite sapi palm tools main + CONFIG=configure configure.in config.sub config.guess \ + missing install-sh mkinstalldirs diff --git a/app-accessibility/flite/flite-1.3.ebuild b/app-accessibility/flite/flite-1.3.ebuild new file mode 100644 index 000000000000..ab3841347866 --- /dev/null +++ b/app-accessibility/flite/flite-1.3.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-accessibility/flite/flite-1.3.ebuild,v 1.1 2008/01/24 05:37:31 williamh Exp $ + +inherit eutils + +DESCRIPTION="Flite text to speech engine" +HOMEPAGE="http://www.speech.cs.cmu.edu/flite/index.html" +SRC_URI="http://www.speech.cs.cmu.edu/flite/packed/${P}/${P}-release.tar.gz" + +LICENSE="BSD as-is" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="alsa static" + +S=${WORKDIR}/${P}-release + +src_unpack() { + unpack ${P}-release.tar.gz + if use alsa; then + epatch "${FILESDIR}"/${P}-alsa-support.patch + fi + epatch "${FILESDIR}"/${P}-shared-libs.patch +} + +src_compile() { + local myconf + if ! use static ; then + myconf="--enable-shared" + fi + myconf="${myconf} --with-vox=cmu_us_kal16" + + econf ${myconf} || die "Failed configuration" + emake || die "Failed compilation" +} + +src_install() { + dobin bin/* || die + dodoc ACKNOWLEDGEMENTS README + + if use static ; then + dolib.a lib/*.a + else + for lib in lib/*.so*; do + if [ -f ${lib} ]; then + dolib.so ${lib} + lib=`basename ${lib}` + majlib=`echo ${lib} | sed 's:\(\.so\.[0-9]\)\(\.[0-9]*\)*$:\1:'` + noverlib=`echo ${lib} | sed 's:\(\.so\)\(\.[0-9]*\)*$:\1:'` + + dosym ${lib} /usr/lib/${majlib} + dosym ${lib} /usr/lib/${noverlib} + fi + done + fi + + insinto /usr/include/flite + cd "${S}"/include + for file in *.h; do + doins ${file} + dosed 's:#include "\(.*\)":#include <flite/\1>:g' /usr/include/flite/${file} + done + + dosym flite/flite.h /usr/include/flite.h +} |