Link against SDL 2.0.10 and reduce dependencies

This commit is contained in:
Cameron Gutman
2020-02-11 00:21:39 -08:00
parent 6a317b7cfc
commit 0ccf234904
7 changed files with 28 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
set -e
BASE_FFMPEG_ARGS="--enable-pic --enable-static --disable-shared --disable-all --enable-avcodec --enable-decoder=h264 --enable-decoder=hevc --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau"
BASE_FFMPEG_ARGS="--enable-pic --enable-static --disable-shared --disable-all --enable-avcodec --enable-decoder=h264 --enable-decoder=hevc"
ARCH=`uname -m`
echo "Building dependencies for $ARCH"
@@ -19,13 +19,24 @@ elif [ "$ARCH" == "x86_64" ]; then
cd /opt/nv-codec-headers
make install
# Enable NVDEC decoders
EXTRA_FFMPEG_ARGS="--enable-nvdec --enable-hwaccel=h264_nvdec --enable-hwaccel=hevc_nvdec"
# Enable VAAPI, VDPAU, and NVDEC decoders
EXTRA_FFMPEG_ARGS="--enable-nvdec --enable-hwaccel=h264_nvdec --enable-hwaccel=hevc_nvdec --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau"
else
echo "Unrecognized architecture: $ARCH"
exit 1
fi
# Remove the existing SDL2 library (but not SDL_ttf)
find /usr/include/SDL2 -type f -not -name 'SDL_ttf.h' -delete
rm -fv /usr/lib/*-linux-*/libSDL2-*
rm -fv /usr/lib/*-linux-*/libSDL2.*
rm -fv /usr/lib/*-linux-*/pkgconfig/sdl2.pc
cd /opt/SDL2
./configure --enable-static --disable-shared --enable-video-kmsdrm
make -j$(nproc)
make install
cd /opt/FFmpeg
./configure $BASE_FFMPEG_ARGS $EXTRA_FFMPEG_ARGS
make -j$(nproc)