summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 30a261e2ce0907c1b7f9332a298062ae67441874 (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
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Maintainer: Mario Finelli <mario at finel dot li>
# Contributor: Arthur Titeica <arthur dot titeica at gmail dot com>

pkgname=ttfautohint-git
pkgver=1.8.3.r16.g701aa67
pkgrel=3
pkgdesc='Provides automated hinting process for web fonts'
arch=('i686' 'x86_64')
url="http://www.freetype.org/${pkgname%-git}"
license=('GPL' 'custom')
depends=('freetype2' 'harfbuzz' 'qt5-base')
makedepends=('pandoc'
             'inkscape'
             'imagemagick'
             'noto-fonts'
             # 'noto-fonts-alpha'
             'texlive-core'
             'xorg-xwininfo')
provides=("${pkgname/%-git}")
conflicts=("${provides[@]}")
source=("git://repo.or.cz/${pkgname/-/.}"
        "git://git.sv.gnu.org/gnulib.git")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
    cd "${pkgname%-git}"
    git describe --tags --abbrev=7 --match="v*" HEAD |
        sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare(){
    cd "${pkgname%-git}"
    git submodule init
    git config submodule.gnulib.url "$srcdir/gnulib"
    git submodule update
    echo "GNULIB_URL='$srcdir/gnulib'" > bootstrap.conf
    sed -i -e '400s/yes/no/' bootstrap
    ./bootstrap --force
}

build() {
    cd "${pkgname%-git}"
    export QMAKE='/usr/bin/qmake'
    export MOC='/usr/bin/moc'
    export UIC='/usr/bin/uic'
    export RCC='/usr/bin/rcc'
    export TTFONTS='/usr/share/fonts/noto'
    ./configure \
        --prefix=/usr \
        --with-qt=/usr/lib/qt \
        --with-freetype-config="pkg-config freetype2"
    make
}

check() {
    cd "${pkgname%-git}"
    make -k check
}

package() {
    cd "${pkgname%-git}"
    make DESTDIR="$pkgdir" install
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING FTL.TXT
}