summaryrefslogtreecommitdiff
blob: 9c5fd5515850632d8b3561f36f6cce79e41afc93 (plain)
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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-accessibility/mbrola/mbrola-3.0.1h-r2.ebuild,v 1.3 2005/07/24 02:23:41 eradicator Exp $

IUSE=""

S=${WORKDIR}

DESCRIPTION="Speech synthesizer based on the concatenation of diphones. Includes sample voices."
HOMEPAGE="http://tcts.fpms.ac.be/synthesis/mbrola.html"
MY_PV=${PV//./}
TCTS="http://tcts.fpms.ac.be/synthesis"
SRC_URI="${TCTS}/${PN}/bin/pclinux/mbr${MY_PV}.zip
	${TCTS}/mbrola/dba/us1/us1-980512.zip
	${TCTS}/mbrola/dba/us1/us2-980812.zip
	${TCTS}/mbrola/dba/us3/us3-990208.zip
	linguas_de? ( ${TCTS}/mbrola/dba/de1/de1-980227.zip
		${TCTS}/mbrola/dba/de2/de2-990106.zip
		${TCTS}/mbrola/dba/de3/de3-000307.zip
		${TCTS}/mbrola/dba/de4/de4.zip
		${TCTS}/mbrola/dba/de5/de5.zip
		${TCTS}/mbrola/dba/de8/de8.zip )
	linguas_es? ( ${TCTS}/mbrola/dba/es1/es1-980610.zip
		${TCTS}/mbrola/dba/es2/es2-989825.zip
		${TCTS}/mbrola/dba/es4/es4.zip )
	linguas_fr? ( ${TCTS}/mbrola/dba/fr1/fr1-990204.zip
		${TCTS}/mbrola/dba/fr2/fr2-980806.zip
		${TCTS}/mbrola/dba/fr3/fr3-990324.zip
		${TCTS}/mbrola/dba/fr6/fr6-010330.zip )"

DEPEND="app-arch/unzip
	amd64? ( app-emulation/emul-linux-x86-glibc )"

SLOT="0"
LICENSE="MBROLA"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"

src_unpack () {
	if [ "${A}" != "" ]; then
		unpack ${A}

		case ${ARCH} in
			x86|amd64)
				cp mbrola-linux-i386 mbrola || die
				;;
			ppc)
				cp mbrola206a-linux-ppc mbrola || die
				;;
			sparc)
				cp mbrola-SuSElinux-ultra1.dat mbrola || die
				;;
			alpha)
				cp mbrola-linux-alpha mbrola || die
				;;
			*)
				einfo "mbrola binary not available on this architecture.  Still installing voices."
		esac
	fi
}

src_install () {
	exeinto /opt/${PN}/bin

	# Take care of main binary
	[ -f mbrola ] && doexe mbrola

	dodoc readme.txt

	for voice in ??[0-9]; do
		insinto /opt/${PN}/${voice}
		[ -f ${voice}/license.txt ] && doins ${voice}/license.txt
		[ -f ${voice}/${voice} ] && doins ${voice}/${voice}
		[ -f ${voice}/${voice}mrpa ] && doins ${voice}/${voice}mrpa

		if [ -d ${voice}/TEST ]; then
			insinto /opt/${PN}/${voice}/TEST
			doins ${voice}/TEST/*
		fi

		[ -f ${voice}/${voice}.txt ] && dodoc ${voice}/${voice}.txt
	done

	dodir /opt/bin
	dosym /opt/${PN}/bin/mbrola /opt/bin/mbrola
}