-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
66 lines (52 loc) · 1.89 KB
/
build.sh
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
#!/bin/sh
set -e
# Build from autotools(-like) tarballs
tarball_build() (
if [ "$#" -lt 3 ] ; then
echo "Usage: tarball_build <name> <url-format> <version> [configure_options...]"
exit 2
fi
url="$(printf "$2" "$3")"
filename="tmp-${url##*/}"
name="$1"
version="$3"
shift 3
# Cosmetic print to make logs easier to read
txt="$(printf 'Building %s' "$name")"
txtlen="$(printf '%s' "$txt" | wc -m)"
printf '\n\n%s\n%.*s\n' "$txt" "$txtlen" \
"================================================================================"
# Add --insecure if installed certs become too old, to ignore verification errors
curl --location "$url" > "$filename"
tar xf "$filename"
rm "$filename"
cd "$name"-"$version"
./configure "$@"
make -j "$(nproc)"
sudo make install
make clean
)
mkdir -p /tmp/build
cd /tmp/build
## GNU FriBidi
### 0.19.7 is the first version being thread-safe by default
urlfmt='https://github.com/fribidi/fribidi/releases/download/0.19.7/fribidi-%s.tar.bz2'
tarball_build fribidi "$urlfmt" "0.19.7"
## FreeType2 (without HarfBuzz)
### Internal version 9.17.3 == external version 2.3.6
urlfmt='https://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-%s.tar.bz2'
tarball_build freetype "$urlfmt" "2.3.6"
## HarfBuzz
urlfmt='https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-%s.tar.bz2'
tarball_build harfbuzz "$urlfmt" "1.2.3"
## Fontconfig
urlfmt='https://www.freedesktop.org/software/fontconfig/release/fontconfig-%s.tar.bz2'
tarball_build fontconfig "$urlfmt" "2.10.92"
## libunibreak
### libunibreak moved to GitHub with version 3.0. All prior release tarballs are only on sourceforge
urlfmt="https://sourceforge.net/projects/vimgadgets/files/libunibreak/1.1/libunibreak-%s.tar.gz/download"
tarball_build libunibreak "$urlfmt" "1.1"
# Clean up
cd /
rm -fr /tmp/build
sudo ldconfig