#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer		: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=espeak
pkgver=1.48.04
pkgrel=04
epoch=1
pkgdesc='Text to Speech engine for English, with support for other languages'
arch=(x86_64)
url='http://espeak.sourceforge.net/'
depends=('portaudio' 'libpulse')
options=('!emptydirs')
source=("https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-source.zip")

build() {
  cd "$pkgname-$pkgver-source/src"

  cp portaudio19.h portaudio.h
  make CXXFLAGS="$CXXFLAGS -w -std=c++98" AUDIO=pulseaudio
}

package() {
  cd "$pkgname-$pkgver-source/src"

  make DESTDIR="$pkgdir" install
  chmod 644 "$pkgdir/usr/lib/libespeak.a"
}

#---- license gpg-key sha256sums ----

license=('GPL')

sha256sums=(bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659) #  espeak-1.48.04-source.zip
