-
-
Notifications
You must be signed in to change notification settings - Fork 134
/
20-libiconv.sh
executable file
·55 lines (44 loc) · 1006 Bytes
/
20-libiconv.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
#!/bin/bash
SCRIPT_REPO="https://skia.googlesource.com/third_party/libiconv"
SCRIPT_COMMIT="v1.17"
SCRIPT_TAGFILTER="v?.*"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
# iconv is macOS built-in
[[ $TARGET == mac* ]] && return 0
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" iconv
cd iconv
cat <<EOF > ./.gitmodules
[subcheckout "gnulib"]
url = https://github.com/coreutils/gnulib.git
path = gnulib
EOF
./gitsub.sh pull
local myconf=(
--prefix="$FFBUILD_PREFIX"
--enable-extra-encodings
--disable-shared
--enable-static
--with-pic
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
echo "Unknown target"
return -1
fi
./autogen.sh
./configure "${myconf[@]}"
make -j$(nproc)
make install
}
ffbuild_configure() {
echo --enable-iconv
}
ffbuild_unconfigure() {
echo --disable-iconv
}