-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-78-32.sh
More file actions
executable file
·61 lines (48 loc) · 1.7 KB
/
setup-78-32.sh
File metadata and controls
executable file
·61 lines (48 loc) · 1.7 KB
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
#!/bin/sh
set -eu
set -o pipefail
: "${AGREE_CODEC_PATENTS:=0}"
if [ "$AGREE_CODEC_PATENTS" != "1" ]; then
CODECS="all_free"
cat <<'EOF'
WARNING: Patent-encumbered video codecs are disabled.
Only non-patent-encumbered codecs will be built.
To enable all codecs (including patent-encumbered ones), set:
AGREE_CODEC_PATENTS=1 ./setup-78-32.sh
Proceeding with free codecs only...
EOF
else
CODECS="all"
fi
# Configurable vars
CROSS_FILE="meson-cross-i386.ini"
BUILD_DIR="build-32"
PREFIX="/usr/local"
LIBDIR="lib32"
INCLUDEDIR="include32"
MESON_ARGS="-Dbuildtype=debugoptimized -Dgallium-drivers=crocus -Dmesa-clc=system -Dvulkan-drivers=intel_hasvk -Dvideo-codecs=${CODECS}"
export CFLAGS="-m32 ${CFLAGS:-}"
export CXXFLAGS="-m32 ${CXXFLAGS:-}"
export LDFLAGS="-m32 ${LDFLAGS:-}"
export PKG_CONFIG_PATH="/usr/local/${LIBDIR}/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:${PKG_CONFIG_PATH:-}"
export PATH=/usr/local/bin32:/usr/bin32:/usr/bin/32:$PATH
command -v meson >/dev/null 2>&1 || { echo "meson not found; install meson and retry." >&2; exit 2; }
command -v ninja >/dev/null 2>&1 || { echo "ninja not found; install ninja and retry." >&2; exit 2; }
cat <<EOF
Using:
cross file: $CROSS_FILE
build dir : $BUILD_DIR
prefix : $PREFIX
libdir : $LIBDIR
includedir: $INCLUDEDIR
Environment:
PKG_CONFIG_PATH: $PKG_CONFIG_PATH
CFLAGS: $CFLAGS
CXXFLAGS: $CXXFLAGS
LDFLAGS: $LDFLAGS
Meson command about to run:
meson setup --cross-file=$CROSS_FILE --prefix $PREFIX --libdir $LIBDIR --includedir $INCLUDEDIR --wipe $BUILD_DIR $MESON_ARGS
EOF
sleep 2
meson setup --cross-file="$CROSS_FILE" --prefix "$PREFIX" --libdir "$LIBDIR" --includedir "$INCLUDEDIR" --wipe $BUILD_DIR $MESON_ARGS
ninja -C build-32