File tree Expand file tree Collapse file tree 5 files changed +76
-0
lines changed
Expand file tree Collapse file tree 5 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -ex
3+ DEPS_DIR=$( dirname ${BASH_SOURCE[0]} )
4+ cd " $DEPS_DIR "
5+ . common
6+ process_args " $@ "
7+
8+ VERSION=1.5.0
9+ FILENAME=dav1d-$VERSION .tar.gz
10+ PROJECT_DIR=dav1d-$VERSION
11+ SHA256SUM=78b15d9954b513ea92d27f39362535ded2243e1b0924fde39f37a31ebed5f76b
12+
13+ cd " $SOURCES_DIR "
14+
15+ if [[ -d " $PROJECT_DIR " ]]
16+ then
17+ echo " $PWD /$PROJECT_DIR " found
18+ else
19+ get_file " https://code.videolan.org/videolan/dav1d/-/archive/$VERSION /$FILENAME " " $FILENAME " " $SHA256SUM "
20+ tar xf " $FILENAME " # First level directory is "$PROJECT_DIR"
21+ fi
22+
23+ mkdir -p " $BUILD_DIR /$PROJECT_DIR "
24+ cd " $BUILD_DIR /$PROJECT_DIR "
25+
26+ if [[ -d " $DIRNAME " ]]
27+ then
28+ echo " '$PWD /$DIRNAME ' already exists, not reconfigured"
29+ cd " $DIRNAME "
30+ else
31+ mkdir " $DIRNAME "
32+ cd " $DIRNAME "
33+
34+ conf=(
35+ --prefix=" $INSTALL_DIR /$DIRNAME "
36+ --libdir=lib
37+ -Denable_tests=false
38+ -Denable_tools=false
39+ # Always build dav1d statically
40+ --default-library=static
41+ )
42+
43+ if [[ " $BUILD_TYPE " == cross ]]
44+ then
45+ case " $HOST " in
46+ win32)
47+ conf+=(
48+ --cross-file=" $SOURCES_DIR /$PROJECT_DIR /package/crossfiles/i686-w64-mingw32.meson"
49+ )
50+ ;;
51+
52+ win64)
53+ conf+=(
54+ --cross-file=" $SOURCES_DIR /$PROJECT_DIR /package/crossfiles/x86_64-w64-mingw32.meson"
55+ )
56+ ;;
57+
58+ * )
59+ echo " Unsupported host: $HOST " >&2
60+ exit 1
61+ esac
62+ fi
63+
64+ meson setup . " $SOURCES_DIR /$PROJECT_DIR " " ${conf[@]} "
65+ fi
66+
67+ ninja
68+ ninja install
Original file line number Diff line number Diff line change 4343 export PKG_CONFIG_PATH=" /opt/homebrew/opt/zlib/lib/pkgconfig"
4444 fi
4545
46+ export PKG_CONFIG_PATH=" $INSTALL_DIR /$DIRNAME /lib/pkgconfig:$PKG_CONFIG_PATH "
47+
4648 conf=(
4749 --prefix=" $INSTALL_DIR /$DIRNAME "
50+ --pkg-config-flags=" --static"
4851 --extra-cflags=" -O2 -fPIC"
4952 --disable-programs
5053 --disable-doc
5760 --disable-vaapi
5861 --disable-vdpau
5962 --enable-swresample
63+ --enable-libdav1d
6064 --enable-decoder=h264
6165 --enable-decoder=hevc
6266 --enable-decoder=av1
67+ --enable-decoder=libdav1d
6368 --enable-decoder=pcm_s16le
6469 --enable-decoder=opus
6570 --enable-decoder=aac
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ LINUX_BUILD_DIR="$WORK_DIR/build-linux-$ARCH"
1515
1616app/deps/adb_linux.sh
1717app/deps/sdl.sh linux native static
18+ app/deps/dav1d.sh linux native static
1819app/deps/ffmpeg.sh linux native static
1920app/deps/libusb.sh linux native static
2021
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ MACOS_BUILD_DIR="$WORK_DIR/build-macos-$ARCH"
1515
1616app/deps/adb_macos.sh
1717app/deps/sdl.sh macos native static
18+ app/deps/dav1d.sh macos native static
1819app/deps/ffmpeg.sh macos native static
1920app/deps/libusb.sh macos native static
2021
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ WINXX_BUILD_DIR="$WORK_DIR/build-$WINXX"
2222
2323app/deps/adb_windows.sh
2424app/deps/sdl.sh $WINXX cross shared
25+ app/deps/dav1d.sh $WINXX cross shared
2526app/deps/ffmpeg.sh $WINXX cross shared
2627app/deps/libusb.sh $WINXX cross shared
2728
You can’t perform that action at this time.
0 commit comments