aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis J Bezault <curtbezault@gmail.com>2019-05-23 04:42:10 -0700
committerGitHub <noreply@github.com>2019-05-23 04:42:10 -0700
commit52dfee03b570971599767e10508e54bff95dc4cd (patch)
treea9e0e5353c68923fe3994e2a7bfadc6a83b79022
parent6f1ac121e646d1116744bc967f25fe33b765aeaf (diff)
downloadvcpkg-52dfee03b570971599767e10508e54bff95dc4cd.tar.gz
vcpkg-52dfee03b570971599767e10508e54bff95dc4cd.zip
Fix linking debug bzip2 (#6570)
-rw-r--r--ports/ffmpeg/CONTROL6
-rw-r--r--ports/ffmpeg/fixed-debug-bzip2-link.patch33
-rw-r--r--ports/ffmpeg/portfile.cmake17
3 files changed, 48 insertions, 8 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL
index ce961fa55..037fcb975 100644
--- a/ports/ffmpeg/CONTROL
+++ b/ports/ffmpeg/CONTROL
@@ -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
diff --git a/ports/ffmpeg/fixed-debug-bzip2-link.patch b/ports/ffmpeg/fixed-debug-bzip2-link.patch
new file mode 100644
index 000000000..29e2913fa
--- /dev/null
+++ b/ports/ffmpeg/fixed-debug-bzip2-link.patch
@@ -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"
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake
index 786d82ea1..ed1203c1d 100644
--- a/ports/ffmpeg/portfile.cmake
+++ b/ports/ffmpeg/portfile.cmake
@@ -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(