freetts-1.2.1-r2.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils java-pkg-2 java-ant-2
  4. DESCRIPTION="A speech synthesis system written entirely in Java"
  5. SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
  6. HOMEPAGE="http://freetts.sourceforge.net/"
  7. RDEPEND=">=virtual/jre-1.4
  8. mbrola? ( >=app-accessibility/mbrola-3.0.1h-r6 ) "
  9. DEPEND=">=virtual/jdk-1.4
  10. ${RDEPEND}
  11. jsapi? ( app-arch/sharutils )
  12. app-arch/unzip"
  13. LICENSE="jsapi? ( sun-bcla-jsapi ) freetts"
  14. SLOT="0"
  15. KEYWORDS="amd64 ppc64 x86"
  16. IUSE="doc jsapi mbrola"
  17. src_unpack() {
  18. unpack ${A}
  19. cd "${S}/lib"
  20. chmod 0755 jsapi.sh
  21. epatch "${FILESDIR}/jsapi-gentoo.diff"
  22. use mbrola && echo "mbrola.base=/usr/share/mbrola/" >> "${S}/speech.properties"
  23. }
  24. src_compile() {
  25. cd "${S}/lib"
  26. if use jsapi; then
  27. ./jsapi.sh || die "jsapi.sh failed"
  28. fi
  29. cd "${S}"
  30. eant jars
  31. }
  32. # Tests dont' seem included
  33. # http://freetts.sourceforge.net/docs/index.php#how_test
  34. #src_test() {
  35. # ANT_TASKS="ant-junit" eant junit
  36. #}
  37. src_install() {
  38. java-pkg_dojar lib/*.jar mbrola/*.jar
  39. use mbrola && local jflags="--java_args -Dmbrola.base=/usr/share/mbrola"
  40. java-pkg_dolauncher ${PN} --main com.sun.speech.freetts.FreeTTS ${jflags}
  41. insinto /usr/share/${PN}
  42. doins speech.properties
  43. cp -R "${S}/demo" "${D}/usr/share/${PN}"
  44. cp -R "${S}/tools" "${D}/usr/share/${PN}"
  45. dodoc README.txt RELEASE_NOTES acknowledgments.txt || die
  46. if use doc; then
  47. insinto /usr/share/doc/${PF}/html
  48. doins -r "${S}"/docs/*
  49. java-pkg_dojavadoc "${S}/javadoc"
  50. fi
  51. }