aboutsummaryrefslogtreecommitdiff
path: root/xorg/freetype-harfbuzz/build
blob: fdca407aea3cf99dd461b14dde1eb43d7ddc05ab (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
#!/bin/sh -e

build_freetype() (
    cd freetype

    CFLAGS="$CFLAGS -DDEFAULT_TT_INTERPRETER_VERSION=TT_INTERPRETER_VERSION_40" \
    ./configure \
        --prefix=/usr \
        --enable-freetype-config \
        --with-harfbuzz="$2"

    make
    make DESTDIR="$1" install
)

build_harfbuzz() (
    export DESTDIR="$1"
    export CFLAGS="$CFLAGS -I$PWD/freetype/include"
    export LIBS="-L$1/usr/lib -lfreetype"
    cd harfbuzz


    meson \
        --prefix=/usr \
        -Dglib=enabled \
        -Ddefault_library=both \
        -Dicu=disabled \
        -Dbenchmark=disabled \
        . output

    ninja -C output
    ninja -C output install
)

build_freetype "$1" no

# Point Harfbuzz to the Freetype files.
export FREETYPE_CFLAGS="-I$PWD/freetype/include"
export FREETYPE_LIBS="-L$1/usr/lib -lfreetype"

build_harfbuzz "$1"

# Point Freetype to the Harfbuzz files.
export HARFBUZZ_CFLAGS="-I$PWD/harfbuzz/src"
export HARFBUZZ_LIBS="-L$1/usr/lib -lharfbuzz"

build_freetype "$1" yes