mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-01 13:37:55 +08:00
Fix linking debug bzip2 (#6570)
This commit is contained in:
parent
6f1ac121e6
commit
52dfee03b5
@ -1,5 +1,5 @@
|
||||
Source: ffmpeg
|
||||
Version: 4.1-4
|
||||
Version: 4.1-5
|
||||
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
|
||||
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
|
||||
|
||||
@ -23,6 +23,10 @@ Feature: lzma
|
||||
Build-Depends: liblzma
|
||||
Description: lzma support in ffmpeg
|
||||
|
||||
Feature: bzip2
|
||||
Build-Depends: bzip2
|
||||
Description: bzip2 support in ffmpeg
|
||||
|
||||
Feature: x264
|
||||
Build-Depends: x264, ffmpeg[gpl]
|
||||
Description: x264 support in ffmpeg
|
||||
|
33
ports/ffmpeg/fixed-debug-bzip2-link.patch
Normal file
33
ports/ffmpeg/fixed-debug-bzip2-link.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff -urN a/configure b/configure
|
||||
--- a/configure 2018-09-08 20:53:33.556275600 +0800
|
||||
+++ b/configure 2018-09-08 20:55:46.238584400 +0800
|
||||
@@ -4753,6 +4753,8 @@
|
||||
enable $subarch
|
||||
enabled spic && enable_weak pic
|
||||
|
||||
+bzlib_name=bz2
|
||||
+
|
||||
# OS specific
|
||||
case $target_os in
|
||||
aix)
|
||||
@@ -4914,6 +4916,11 @@
|
||||
objformat="win32"
|
||||
ranlib=:
|
||||
enable dos_paths
|
||||
+ if [ -z "${extra_cflags##*-MDd*}" ] || [ -z "${extra_cflags##*-MTd*}" ]; then
|
||||
+ bzlib_name=bz2d
|
||||
+ else
|
||||
+ bzlib_name=bz2
|
||||
+ fi
|
||||
;;
|
||||
cygwin*)
|
||||
target_os=cygwin
|
||||
@@ -5734,7 +5741,7 @@
|
||||
check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwait(s,0); sem_destroy(s)"
|
||||
|
||||
disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib
|
||||
-disabled bzlib || check_lib bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
|
||||
+disabled bzlib || check_lib bzlib.h BZ2_bzlibVersion -l$bzlib_name || disable bzlib
|
||||
disabled lzma || check_lib lzma.h lzma_version_number -llzma || disable lzma
|
||||
|
||||
check_lib math.h sin -lm && LIBM="-lm"
|
@ -16,6 +16,7 @@ vcpkg_extract_source_archive_ex(
|
||||
fix_windowsinclude-in-ffmpegexe-1.patch
|
||||
fix_windowsinclude-in-ffmpegexe-2.patch
|
||||
fix_windowsinclude-in-ffmpegexe-3.patch
|
||||
fixed-debug-bzip2-link.patch
|
||||
)
|
||||
|
||||
if (${SOURCE_PATH} MATCHES " ")
|
||||
@ -43,7 +44,6 @@ else()
|
||||
endif()
|
||||
|
||||
set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}")
|
||||
set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}")
|
||||
|
||||
set(_csc_PROJECT_PATH ffmpeg)
|
||||
|
||||
@ -102,12 +102,11 @@ else()
|
||||
set(OPTIONS "${OPTIONS} --disable-lzma")
|
||||
endif()
|
||||
|
||||
# bzip2's debug library is named "bz2d", which isn't found by ffmpeg
|
||||
# if("bzip2" IN_LIST FEATURES)
|
||||
# set(OPTIONS "${OPTIONS} --enable-bzip2")
|
||||
# else()
|
||||
# set(OPTIONS "${OPTIONS} --disable-bzip2")
|
||||
# endif()
|
||||
if("bzip2" IN_LIST FEATURES)
|
||||
set(OPTIONS "${OPTIONS} --enable-bzlib")
|
||||
else()
|
||||
set(OPTIONS "${OPTIONS} --disable-bzlib")
|
||||
endif()
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\")
|
||||
@ -151,6 +150,9 @@ if(WIN32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ENV_LIB "$ENV{LIB}")
|
||||
|
||||
set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;${ENV_LIB}")
|
||||
message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
vcpkg_execute_required_process(
|
||||
@ -163,6 +165,7 @@ vcpkg_execute_required_process(
|
||||
LOGNAME build-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
|
||||
set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/debug/lib;${ENV_LIB}")
|
||||
message(STATUS "Building ${_csc_PROJECT_PATH} for Debug")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
vcpkg_execute_required_process(
|
||||
|
Loading…
x
Reference in New Issue
Block a user