### this file is sourced not run
PKGVER=2024.08 # pull date
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=flite-bard-$PKGVER.tar.gz
MD5SUM=96dcdd86127236070819ac43ea00d3b2
SRC_URL=https://github.com/festvox/bard/archive/d2b5b3330c646897a886381144975b63afce045a.tar.gz
BUNDLE=

SLACKREQ='libSDL libSDL-ttf libSDL-image libSDL-gfx libSDL-mixer libzip'
SLACKDESC="flite-bard: flite-bard $PKGVER (Text reader)
flite-bard: 
flite-bard: Bard Storyteller is a text reader. Bard not only allows a user to 
flite-bard: read books, but can also read books to the user using text-to-speech. 
flite-bard: It supports txt, epub and (x)html files.
flite-bard: 
flite-bard: https://github.com/festvox/bard
flite-bard: 
flite-bard: 
flite-bard: 
flite-bard:
"

### default pkg_download
### default pkg_prepare
pkg_packageb() {
	rm -r ./usr/include
}

### build
pkg_build() {
	# temporarily link all flite headers to /usr/include
	for p in /usr/include/flite/*; do ln -s $p /usr/include; done &&

	# because we don't have fonts installed by default, auto-detect will fail
	# so define it ourselves
	export DEFAULTFONT=/usr/share/fonts/X11/TTF/DejaVuSans.ttf

	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	mv /usr/bin/{,flite-}bard
}
