[ffmpeg] Fix ffmpeg[opencl, openssl, lzma] static build failed (#8797)

* [ffmpeg] Fix ffmpeg[opencl, openssl] static build failed

* [ffmpeg] Fix ffmpeg/CONTROL[lzma] static build failed

* Fix conflict

* Fix conflict

* Fix conflict

* [ffmpeg] Remove include(vcpkg_common_functions)

* Remove include(vcpkg_common_functions)

* [ffmpeg] Fix patch apply failed

* Fix conflict

* [ffmpeg] Fix conflict

* [ffmpeg] Fix patch
This commit is contained in:
Lily 2020-04-28 05:43:29 +08:00 committed by GitHub
parent 218e87ca1c
commit b7c44f9807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 20 deletions

View File

@ -1,14 +0,0 @@
diff --git a/configure b/configure
index 1c8008a..bd2de34 100755
--- a/configure
+++ b/configure
@@ -6360,7 +6360,8 @@ enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OP
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
- die "ERROR: openssl not found"; }
+ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -llibssl -llibcrypto -lws2_32 -lgdi32 -lcrypt32 ||
+ die "ERROR: openssl not found"; }
enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.7" rockchip/rk_mpi.h mpp_create &&

View File

@ -0,0 +1,20 @@
diff --git a/configure b/configure
index 3bdcfc6..00b2f13 100644
--- a/configure
+++ b/configure
@@ -6360,6 +6360,7 @@ enabled openal && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal"
enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel ||
check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
+ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -lAdvapi32 -lOle32 -lCfgmgr32||
die "ERROR: opencl not found"; } &&
{ test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
@@ -6379,6 +6380,7 @@ enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OP
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
+ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -llibssl -llibcrypto -lws2_32 -lgdi32 -lcrypt32 -lAdvapi32 -lUser32||
die "ERROR: openssl not found"; }
enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&

View File

@ -1,5 +1,5 @@
Source: ffmpeg
Version: 4.2-7
Version: 4.2-8
Build-Depends: zlib
Homepage: https://ffmpeg.org
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.

View File

@ -6,10 +6,10 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
0001-create-lib-libraries.patch
0002-detect-openssl.patch
0003-fix-windowsinclude.patch
0004-fix-debug-build.patch
0005-fix-libvpx-linking.patch
0006-fix-StaticFeatures.patch
)
if (${SOURCE_PATH} MATCHES " ")

View File

@ -1,4 +1,4 @@
Source: liblzma
Version: 5.2.4-4
Version: 5.2.4-5
Homepage: https://github.com/xz-mirror/xz
Description: Compression library with an API similar to that of zlib.

View File

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO xz-mirror/xz
@ -80,6 +78,14 @@ else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_replace_string(
"${CURRENT_PACKAGES_DIR}/include/lzma.h"
"if !defined(LZMA_API_STATIC)"
"if 0"
)
endif()
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma RENAME copyright)