vcpkg/ports/ffmpeg/0005-fix-libvpx-linking.patch

54 lines
3.0 KiB
Diff
Raw Normal View History

diff --git a/configure b/configure
index fba948a..50eea9b 100755
--- a/configure
+++ b/configure
@@ -5207,6 +5207,8 @@ case "$arch" in
2019-06-11 00:07:18 +08:00
;;
esac
+libvpx_name=vpx
+
# OS specific
case $target_os in
aix)
@@ -5379,6 +5381,15 @@ case $target_os in
2019-06-11 00:07:18 +08:00
enabled x86_64 && objformat="win64" || objformat="win32"
ranlib=:
enable dos_paths
+ if [ -z "${extra_cflags##*-MDd*}" ]; then
+ libvpx_name=vpxmdd
+ elif [ -z "${extra_cflags##*-MD*}" ]; then
+ libvpx_name=vpxmd
+ elif [ -z "${extra_cflags##*-MTd*}" ]; then
+ libvpx_name=vpxmtd
+ elif [ -z "${extra_cflags##*-MT*}" ]; then
+ libvpx_name=vpxmt
+ fi
;;
cygwin*)
target_os=cygwin
@@ -6290,19 +6301,19 @@ enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h
2019-06-11 00:07:18 +08:00
enabled libvpx && {
enabled libvpx_vp8_decoder && {
check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx ||
- check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
+ check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs"
2019-06-11 00:07:18 +08:00
}
enabled libvpx_vp8_encoder && {
check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx ||
- check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
+ check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs"
2019-06-11 00:07:18 +08:00
}
enabled libvpx_vp9_decoder && {
check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx ||
- check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
+ check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs"
2019-06-11 00:07:18 +08:00
}
enabled libvpx_vp9_encoder && {
check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx ||
- check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
+ check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs"
2019-06-11 00:07:18 +08:00
}
if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
die "libvpx enabled but no supported decoders found"