summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 21c2c1dc447fcc4039067a68bca0fb5cac6e1224 (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
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

# This is an improved package for flite version 1 (flite1).
#
# flite version 1 is an old software from 2009. Since there, many issues
# have been discovered, including the security issue CVE-2014-0027. There
# are patches out there that addresses many of the discovered issues,
# and also adds some fixes and enhancements.
#
# Another notable issue that is also worth to be mentioned is a linking
# problem. This linking issue was exposed by upstream ffmpeg git commit
# 6dfcbd8. Without the propper patch, ffmpeg versions 3.5 and later will
# not compile, failing to detect libflite.

pkgname=flite1-patched
pkgver=1.4
pkgrel=4
pkgdesc='A lighweight speech synthesis engine (version 1, patched with fixes and improvements)'
arch=('x86_64')
url='http://www.speech.cs.cmu.edu/flite/'
license=('custom')
depends=('glibc')
makedepends=('texlive-core' 'texinfo' 'ed')
provides=("flite=${pkgver}")
conflicts=('flite')
source=("http://www.festvox.org/flite/packed/flite-${pkgver}/flite-${pkgver}-release.tar.bz2"
        '010-flite1-tempfile-CVE-2014-0027.patch'
        '020-flite1-fix-parallel-builds.patch'
        '030-flite1-respect-destdir.patch'
        '040-flite1-ldflags.patch'
        '050-flite1-audio-interface.patch'
        '060-flite1-texi.patch'
        '070-flite1-texi2html-to-texi2any-migration.patch'
        '080-flite1-no-rpath.patch'
        '090-flite1-rename-conflicting-variable.patch')
sha256sums=('45c662160aeca6560589f78daf42ab62c6111dd4d244afc28118c4e6f553cd0c'
            '597f1516060917faab008819e3ceb5bb487f5b3948e97eef1020dc10b62c6edf'
            'bfd51888ea533bb9ee74cadb68b2e507cb715ab5043aa679b7f42ab52336a7a1'
            '093538c3a7cd2b9b9edd1f0956a34c4261c3ccdd4feb55e8ecedc338562495f3'
            'ff43e11241c9aea26483865c672c20421d12c688ae8b59b39471bafb52c1463e'
            '405320984e098c3d788b7751935b2774972ee7970dbe0fef0718ce1e5cc725c9'
            'd38fa5dfd4fef71970d904622ec106b9ac18ece002c671b14bc1ce9b342b56b6'
            '1b51d528e3927b80159c6f6c2155fc022f807db7a0cf19c50e9a5e5831086efb'
            '462b9ecdb3e4992cb2fc026b6483ec83d883ece530a3fa0794a00e4f6fbfbb1a'
            '9ad072d57d7b3d6a623f4885cf90a6548d6c5091cd00a7c0c8ff317f4fc0f7f1')

prepare() {
    patch -d "flite-${pkgver}-release" -Np1 -i "${srcdir}/010-flite1-tempfile-CVE-2014-0027.patch"
    patch -d "flite-${pkgver}-release" -Np1 -i "${srcdir}/020-flite1-fix-parallel-builds.patch"
    patch -d "flite-${pkgver}-release" -Np1 -i "${srcdir}/030-flite1-respect-destdir.patch"
    patch -d "flite-${pkgver}-release" -Np1 -i "${srcdir}/040-flite1-ldflags.patch"
    patch -d "flite-${pkgver}-release" -N   -i "${srcdir}/050-flite1-audio-interface.patch"
    patch -d "flite-${pkgver}-release" -Np1 -i "${srcdir}/060-flite1-texi.patch"
    patch -d "flite-${pkgver}-release" -Np1 -i "${srcdir}/070-flite1-texi2html-to-texi2any-migration.patch"
    patch -d "flite-${pkgver}-release" -Np1 -i "${srcdir}/080-flite1-no-rpath.patch"
    patch -d "flite-${pkgver}-release" -Np1 -i "${srcdir}/090-flite1-rename-conflicting-variable.patch"
}

build() {
    cd "flite-${pkgver}-release"
    ./configure \
        --prefix='/usr' \
        --enable-shared \
        --disable-static \
        --with-vox='cmu_us_kal16'
    make
    make -C doc flite.{html,pdf}
}

package() {
    make -C "flite-${pkgver}-release" DESTDIR="$pkgdir" install
    install -D -m644 "flite-${pkgver}-release/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -D -m644 "flite-${pkgver}-release/doc/flite.pdf" -t "${pkgdir}/usr/share/doc/flite1"
    cp -dr --no-preserve='ownership' "flite-${pkgver}-release/doc/html" "${pkgdir}/usr/share/doc/flite1"
}