From e7122c820dd6bdd87962fb092a31ca2d020274d8 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Thu, 31 May 2018 10:40:15 -0500 Subject: [PATCH] Add ffmpeg submodule at 4.0 and ship it This is needed for WMA support in Wine's xaudio2. --- .gitmodules | 3 ++ build_proton.sh | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ ffmpeg | 1 + wine | 2 +- 4 files changed, 85 insertions(+), 1 deletion(-) create mode 160000 ffmpeg diff --git a/.gitmodules b/.gitmodules index e44d957f..5b63a8e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ [submodule "MoltenVK"] path = MoltenVK url = https://github.com/KhronosGroup/MoltenVK.git +[submodule "ffmpeg"] + path = ffmpeg + url = https://git.ffmpeg.org/ffmpeg.git diff --git a/build_proton.sh b/build_proton.sh index 7544d8db..014b0505 100755 --- a/build_proton.sh +++ b/build_proton.sh @@ -472,6 +472,86 @@ git submodule status -- dxvk > "$DST_DIR"/lib/wine/dxvk/version #cp -a dxvk/dist.win64/bin/dxgi.dll "$DST_DIR"/lib64/wine/dxvk/ #cp -a dxvk/dist.win64/bin/d3d11.dll "$DST_DIR"/lib64/wine/dxvk/ +#build ffmpeg +function build_ffmpeg +{ + if [ ! '(' -e "$TOOLS_DIR64/lib/libavcodec.so" -o -e "$TOOLS_DIR64/lib/libavcodec.dylib" ')' ]; then + #ffmpeg 32-bit + cd "$TOP" + mkdir -p build/ffmpeg.win32 + cd build/ffmpeg.win32 + $I386_WRAPPER "$TOP"/ffmpeg/configure --prefix="$TOOLS_DIR32" \ + --disable-static \ + --enable-shared \ + --disable-programs \ + --disable-doc \ + --disable-avdevice \ + --disable-avformat \ + --disable-swresample \ + --disable-swscale \ + --disable-postproc \ + --disable-avfilter \ + --disable-alsa \ + --disable-iconv \ + --disable-libxcb_shape \ + --disable-libxcb_shm \ + --disable-libxcb_xfixes \ + --disable-sdl2 \ + --disable-xlib \ + --disable-zlib \ + --disable-bzlib \ + --disable-libxcb \ + --disable-vaapi \ + --disable-vdpau \ + --disable-everything \ + --enable-decoder=wmav2 \ + --enable-decoder=adpcm_ms + $I386_WRAPPER make $JOBS + $I386_WRAPPER make install + + + #ffmpeg 64-bit + cd "$TOP" + mkdir -p build/ffmpeg.win64 + cd build/ffmpeg.win64 + $AMD64_WRAPPER "$TOP"/ffmpeg/configure --prefix="$TOOLS_DIR64" \ + --disable-static \ + --enable-shared \ + --disable-programs \ + --disable-doc \ + --disable-avdevice \ + --disable-avformat \ + --disable-swresample \ + --disable-swscale \ + --disable-postproc \ + --disable-avfilter \ + --disable-alsa \ + --disable-iconv \ + --disable-libxcb_shape \ + --disable-libxcb_shm \ + --disable-libxcb_xfixes \ + --disable-sdl2 \ + --disable-xlib \ + --disable-zlib \ + --disable-bzlib \ + --disable-libxcb \ + --disable-vaapi \ + --disable-vdpau \ + --disable-everything \ + --enable-decoder=wmav2 \ + --enable-decoder=adpcm_ms + $AMD64_WRAPPER make $JOBS + $AMD64_WRAPPER make install + fi + + cp -L "$TOOLS_DIR32"/lib/libavcodec* "$DST_DIR"/lib/ + cp -L "$TOOLS_DIR32"/lib/libavutil* "$DST_DIR"/lib/ + cp -L "$TOOLS_DIR64"/lib/libavcodec* "$DST_DIR"/lib64/ + cp -L "$TOOLS_DIR64"/lib/libavutil* "$DST_DIR"/lib64/ +} + +build_ffmpeg + case "$BUILD_COMPONENTS" in "all") build_wine64 diff --git a/ffmpeg b/ffmpeg new file mode 160000 index 00000000..ace829cb --- /dev/null +++ b/ffmpeg @@ -0,0 +1 @@ +Subproject commit ace829cb45cff530b8a0aed6adf18f329d7a98f6 diff --git a/wine b/wine index baaa4941..785f3213 160000 --- a/wine +++ b/wine @@ -1 +1 @@ -Subproject commit baaa4941bdf01dc700b81dc7723b72592c8a4ea4 +Subproject commit 785f32130fd66c297961492328a93c669e4c5535