You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-accessibility/flite/flite-1.4-r4.ebuild

76 lines
1.7 KiB

# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: c789fbb61ca76267581f98c2457d2c2d09a2fe10 $
EAPI=5
inherit autotools eutils multilib-minimal
DESCRIPTION="Flite text to speech engine"
HOMEPAGE="http://www.speech.cs.cmu.edu/flite/index.html"
SRC_URI=" http://www.speech.cs.cmu.edu/${PN}/packed/${P}/${P}-release.tar.bz2"
LICENSE="BSD freetts public-domain regexp-UofT BSD-2"
SLOT="0"
KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86"
IUSE="alsa oss static-libs"
DEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )"
RDEPEND="${DEPEND}"
S=${WORKDIR}/${P}-release
get_audio() {
if use alsa; then
echo alsa
elif use oss; then
echo oss
else
echo none
fi
}
src_prepare() {
epatch "${FILESDIR}"/${P}-tempfile.patch
epatch "${FILESDIR}"/${P}-fix-parallel-builds.patch
epatch "${FILESDIR}"/${P}-respect-destdir.patch
epatch "${FILESDIR}"/${P}-ldflags.patch
epatch "${FILESDIR}"/${P}-audio-interface.patch
sed -i main/Makefile \
-e '/-rpath/s|$(LIBDIR)|$(INSTALLLIBDIR)|g' \
|| die
eautoreconf
# custom makefiles
multilib_copy_sources
}
multilib_src_configure() {
local myconf=()
if ! use static-libs; then
myconf+=( --enable-shared )
fi
myconf+=( --with-audio=$(get_audio) )
econf "${myconf[@]}"
}
multilib_src_compile() {
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
}
multilib_src_install_all() {
dodoc ACKNOWLEDGEMENTS README
if ! use static-libs; then
rm -rf "${D}"/usr/lib*/*.a
fi
}
pkg_postinst() {
if [[ "$(get_audio)" = "none" ]]; then
ewarn "you have built flite without audio support."
ewarn "If you want audio support, re-emerge"
ewarn "flite with alsa or oss in your use flags."
fi
}