[alsa,fdk-aac,ffmpeg,libsrt,snappy,x265] Code cleanup, fix and use pkg-config (#39077)

- Setup and use pkg-config for ffmpeg dependencies.
https://github.com/microsoft/vcpkg/pull/38011#discussion_r1623174355.
- Export actual c++ link libraries for fdk-aac via pkg-config. (Same
pattern as lerc, geos.)
- Rectify link libraries in pkg-config  for alsa, libsrt, snappy, x265.
- Burn-in dllimport for libsrt and x265.
- Pass detected STRIP to ffmpeg. Fixes
https://github.com/microsoft/vcpkg/issues/36852.
This commit is contained in:
Kai Pastor 2024-06-06 09:48:31 +02:00 committed by GitHub
parent 2b991341ca
commit 2017886818
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
36 changed files with 304 additions and 290 deletions

12
ports/alsa/libdl.diff Normal file
View File

@ -0,0 +1,12 @@
diff --git a/configure.ac b/configure.ac
index 7a152a4..324adf8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -261,6 +261,7 @@ HAVE_LIBDL=
if test "$have_libdl" = "yes"; then
AC_SEARCH_LIBS([dlsym], [dl], [HAVE_LIBDL="yes"])
if test "$HAVE_LIBDL" = "yes" ; then
+ ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl"
AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
fi
else

View File

@ -25,6 +25,7 @@ vcpkg_from_github(
HEAD_REF master HEAD_REF master
PATCHES PATCHES
fix-plugin-dir.patch fix-plugin-dir.patch
libdl.diff
${ALSA_VERSION_SCRIPT_PATCH} ${ALSA_VERSION_SCRIPT_PATCH}
) )

View File

@ -1,7 +1,7 @@
{ {
"name": "alsa", "name": "alsa",
"version": "1.2.11", "version": "1.2.11",
"port-version": 1, "port-version": 2,
"description": "The Advanced Linux Sound Architecture (ALSA) - library", "description": "The Advanced Linux Sound Architecture (ALSA) - library",
"homepage": "https://www.alsa-project.org/", "homepage": "https://www.alsa-project.org/",
"license": "LGPL-2.1-or-later", "license": "LGPL-2.1-or-later",

View File

@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4db8c7e..da3297c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -528,6 +528,15 @@ if(FDK_AAC_INSTALL_PKGCONFIG_MODULE)
set(LIBS_PUBLIC "-lm")
endif()
endif()
+ foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES)
+ if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
+ continue()
+ elseif(EXISTS "${lib}")
+ string(APPEND LIBS_PRIVATE " ${CMAKE_LINK_LIBRARY_FILE_FLAG}${lib}")
+ else()
+ string(APPEND LIBS_PRIVATE " ${CMAKE_LINK_LIBRARY_FLAG}${lib}")
+ endif()
+ endforeach()
configure_file(fdk-aac.pc.in fdk-aac.pc @ONLY)
install(
FILES

View File

@ -3,6 +3,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES
he-aac HE_AAC he-aac HE_AAC
) )
set(legal_notes "NOTICE")
if(HE_AAC) if(HE_AAC)
vcpkg_from_github( vcpkg_from_github(
REPO mstorsjo/fdk-aac REPO mstorsjo/fdk-aac
@ -10,27 +11,35 @@ if(HE_AAC)
SHA512 616207e85035d1659a2b7808ca6ec02ef53c1c4b39eb280fe861f82a4cf548e5db2ac381c496bad37dfc2b8c6677fe704d9fd8449e43d1f93d3e636239e0191b SHA512 616207e85035d1659a2b7808ca6ec02ef53c1c4b39eb280fe861f82a4cf548e5db2ac381c496bad37dfc2b8c6677fe704d9fd8449e43d1f93d3e636239e0191b
HEAD_REF master HEAD_REF master
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
PATCHES
cxx-linkage-pkgconfig.patch
) )
else() else()
list(PREPEND legal_notes "README.fedora")
vcpkg_from_gitlab( vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org/ GITLAB_URL https://gitlab.freedesktop.org/
REPO wtaymans/fdk-aac-stripped REPO wtaymans/fdk-aac-stripped
REF 585981a49f2186b0d2e47c64bf6b5abf539395f8 # corresponds to v2.0.2 tag in mstorsjo/fdk-aac GitHub repository REF 529b87452cd33d45e1d0a5066d20b64f10b38845 # corresponds to v2.0.2 tag in mstorsjo/fdk-aac GitHub repository
HEAD_REF stripped4 HEAD_REF stripped4
SHA512 e0e56396ed0be427302ed4b54fc6e8dc522a172c288b7c1ec40cc3a9ceb13518ca7bbb874bc71b88b2a91e0bbbe4ad0bab6910efa1db63d91e6370976641bac4 SHA512 0c37f8fd1bd0e817d2b3970138bef5b2a7a3150ab1a772273c8f5cba09be04afa2f31780f0ea063dd786a71844aa4cb5821349a4bcc5ebe70e827c3561eda2a9
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
PATCHES
cxx-linkage-pkgconfig.patch
) )
endif() endif()
vcpkg_cmake_configure( vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_RELEASE -DBUILD_PROGRAMS=OFF OPTIONS
-DBUILD_PROGRAMS=OFF
) )
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/NOTICE")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
list(TRANSFORM legal_notes PREPEND "${SOURCE_PATH}/")
vcpkg_install_copyright(FILE_LIST ${legal_notes})

View File

@ -1,7 +1,7 @@
{ {
"name": "fdk-aac", "name": "fdk-aac",
"version-semver": "2.0.2", "version-semver": "2.0.2",
"port-version": 3, "port-version": 4,
"description": "A standalone Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android. Uses a fork without HE-AAC, HE-AACv2, or xHE-AAC support to avoid patent licensing and GPL compatibility issues when built without the he-aac option.", "description": "A standalone Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android. Uses a fork without HE-AAC, HE-AACv2, or xHE-AAC support to avoid patent licensing and GPL compatibility issues when built without the he-aac option.",
"homepage": "https://gitlab.freedesktop.org/wtaymans/fdk-aac-stripped", "homepage": "https://gitlab.freedesktop.org/wtaymans/fdk-aac-stripped",
"license": "FDK-AAC", "license": "FDK-AAC",

View File

@ -1,8 +1,15 @@
diff --git a/configure b/configure diff --git a/configure b/configure
index 6d3f31fc95..f5f4a769cc 100644 index 3243e23021..6d3f31fc95 100755
--- a/configure @@ -6630,7 +6630,7 @@ fi
+++ b/configure
@@ -6761,7 +6761,8 @@ if enabled libmfx; then enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion ||
check_lib zlib zlib.h zlibVersion -lz; }
-enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2
+enabled bzlib && require_pkg_config bzlib bzip2 bzlib.h BZ2_bzlibVersion
enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma
enabled zlib && test_exec $zlib_extralibs <<EOF && enable zlib_gzip
@@ -6757,7 +6757,8 @@ if enabled libmfx; then
fi fi
enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
@ -12,16 +19,18 @@ index 6d3f31fc95..f5f4a769cc 100644
enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine || enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine ||
require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; } require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; }
enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif || enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif ||
@@ -6805,7 +6806,7 @@ if enabled debug_configure; then @@ -6793,8 +6794,8 @@ enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019.
else enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
fi require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
-enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
-enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr -enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
+enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr -lm +enabled libsnappy && require_pkg_config libsnappy snappy snappy-c.h snappy_compress
+enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr $libm_extralibs
enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/sftp.h sftp_init enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
@@ -6888,6 +6889,8 @@ enabled openal && { check_pkg_config openal "openal >= 1.1" "AL/al.h" @@ -6884,6 +6885,8 @@ enabled openal && { check_pkg_config openal "openal >= 1.1" "AL/al.h"
enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel || enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel ||
check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL || 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 ||
@ -30,20 +39,16 @@ index 6d3f31fc95..f5f4a769cc 100644
die "ERROR: opencl not found"; } && die "ERROR: opencl not found"; } &&
{ test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" || { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" || test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
@@ -6914,6 +6917,7 @@ enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" ope @@ -7208,10 +7211,10 @@ enabled amf &&
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x00010004001d0000"
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 || # Funny iconv installations are not unusual, so check it after all flags have been set
+ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -llibssl -llibcrypto -lws2_32 -lgdi32 -lcrypt32 -lAdvapi32 -lUser32|| -if enabled libc_iconv; then
die "ERROR: openssl not found"; } +if enabled libc_iconv && disabled iconv; then
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 &&
@@ -7215,7 +7219,7 @@ enabled amf &&
if enabled libc_iconv; then
check_func_headers iconv.h iconv check_func_headers iconv.h iconv
elif enabled iconv; then elif enabled iconv; then
- check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv - check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv
+ check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv || check_lib iconv iconv.h iconv -liconv -llibcharset + check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv || check_lib iconv iconv.h iconv -liconv -lcharset
fi fi
enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel" enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"

View File

@ -1,40 +0,0 @@
diff --git a/configure b/configure
index 3243e23021..6d3f31fc95 100644
--- a/configure
+++ b/configure
@@ -4284,6 +4284,9 @@ for opt do
--libfuzzer=*)
libfuzzer_path="$optval"
;;
+ --debug)
+ enable debug_configure
+ ;;
*)
optname="${opt%%=*}"
optname="${optname#--}"
@@ -6630,7 +6633,11 @@ fi
enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion ||
check_lib zlib zlib.h zlibVersion -lz; }
-enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2
+if enabled debug_configure; then
+ enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2d
+else
+ enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2
+fi
enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma
enabled zlib && test_exec $zlib_extralibs <<EOF && enable zlib_gzip
@@ -6793,7 +6800,11 @@ enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019.
enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
-enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
+if enabled debug_configure; then
+ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
+else
+ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
+fi
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init

View File

@ -2,15 +2,11 @@ diff --git a/configure b/configure
index d6c4388..75b96c3 100644 index d6c4388..75b96c3 100644
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -4378,6 +4378,11 @@ msvc_common_flags(){ @@ -4378,6 +4378,7 @@ msvc_common_flags(){
-march=*) ;; -march=*) ;;
-lz) echo zlib.lib ;; -lz) echo zlib.lib ;;
-lx264) echo libx264.lib ;; -lx264) echo libx264.lib ;;
+ -lx265) echo libx265.lib ;;
+ -lmp3lame) echo libmp3lame.lib ;; + -lmp3lame) echo libmp3lame.lib ;;
+ -liconv) echo iconv.lib ;;
+ -llibcharset) echo charset.lib ;;
+ -lm) ;;
-lstdc++) ;; -lstdc++) ;;
-l*) echo ${flag#-l}.lib ;; -l*) echo ${flag#-l}.lib ;;
-LARGEADDRESSAWARE) echo $flag ;; -LARGEADDRESSAWARE) echo $flag ;;

View File

@ -1,14 +0,0 @@
diff --git a/configure b/configure
index b137669dd3..34c92230f4 100755
--- a/configure
+++ b/configure
@@ -6331,7 +6331,7 @@ enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
- { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
+ { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac -lm -lstdc++ &&
warn "using libfdk without pkg-config"; } }
flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs

View File

@ -1,15 +0,0 @@
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -6730,7 +6730,10 @@
[ "$toolchain" != "msvc" ] ||
require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; } &&
check_cpp_condition libx262 x264.h "X264_MPEG2"
-enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
+enabled libx265 && { check_pkg_config libx265 x265 x265.h x265_api_get ||
+ { { check_lib libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++ -lgcc_s -lgcc -lrt -lnuma" ||
+ require libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++"; } &&
+ warn "using libx265 without pkg-config"; } } &&
require_cpp_condition libx265 x265.h "X265_BUILD >= 89"
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get

View File

@ -1,17 +0,0 @@
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 900505756b..8d1388a347 100755
--- a/configure
+++ b/configure
@@ -6476,7 +6476,7 @@ enabled libzmq && require_pkg_config libzmq "libzmq >= 4.2.1" zmq.h z
enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
{ test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" ||
enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; }
-enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion
+enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml/xmlversion.h xmlCheckVersion
enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init ||
check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init ||
check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||

View File

@ -1,14 +0,0 @@
diff --git a/configure b/configure
index 2829d79..697a504 100755
--- a/configure
+++ b/configure
@@ -4221,9 +4221,6 @@
if disabled autodetect; then
- # Unless iconv is explicitely disabled by the user, we still want to probe
- # for the iconv from the libc.
- disabled iconv || enable libc_iconv
disable_weak $EXTERNAL_AUTODETECT_LIBRARY_LIST
disable_weak $HWACCEL_AUTODETECT_LIBRARY_LIST
fi

View File

@ -1,22 +0,0 @@
Subject: [PATCH] fix d3d11
---
Index: qsv.c
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -383,7 +383,11 @@
int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs,
const char *load_plugins, int gpu_copy)
{
+#if CONFIG_D3D11VA
+ mfxIMPL impl = MFX_IMPL_AUTO_ANY | MFX_IMPL_VIA_D3D11;
+#else
mfxIMPL impl = MFX_IMPL_AUTO_ANY;
+#endif
mfxVersion ver = { { QSV_VERSION_MINOR, QSV_VERSION_MAJOR } };
mfxInitParam init_par = { MFX_IMPL_AUTO_ANY };

View File

@ -8,17 +8,12 @@ vcpkg_from_github(
0001-create-lib-libraries.patch 0001-create-lib-libraries.patch
0002-fix-msvc-link.patch #upstreamed in future version 0002-fix-msvc-link.patch #upstreamed in future version
0003-fix-windowsinclude.patch 0003-fix-windowsinclude.patch
0004-fix-debug-build.patch 0004-dependencies.patch
0005-fix-nasm.patch #upstreamed in future version 0005-fix-nasm.patch #upstreamed in future version
0006-fix-StaticFeatures.patch
0007-fix-lib-naming.patch 0007-fix-lib-naming.patch
0009-Fix-fdk-detection.patch
0011-Fix-x265-detection.patch
0012-Fix-ssl-110-detection.patch 0012-Fix-ssl-110-detection.patch
0013-define-WINVER.patch 0013-define-WINVER.patch
0015-Fix-xml2-detection.patch
0020-fix-aarch64-libswscale.patch 0020-fix-aarch64-libswscale.patch
0022-fix-iconv.patch
0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch # Do not remove this patch. It is required by chromium 0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch # Do not remove this patch. It is required by chromium
0041-add-const-for-opengl-definition.patch 0041-add-const-for-opengl-definition.patch
) )
@ -154,10 +149,18 @@ if(VCPKG_DETECTED_CMAKE_RANLIB)
list(APPEND prog_env "${RANLIB_path}") list(APPEND prog_env "${RANLIB_path}")
endif() endif()
if(VCPKG_DETECTED_CMAKE_STRIP)
get_filename_component(STRIP_path "${VCPKG_DETECTED_CMAKE_STRIP}" DIRECTORY)
get_filename_component(STRIP_filename "${VCPKG_DETECTED_CMAKE_STRIP}" NAME)
set(ENV{STRIP} "${STRIP_filename}")
string(APPEND OPTIONS " --strip=${STRIP_filename}")
list(APPEND prog_env "${STRIP_path}")
endif()
list(REMOVE_DUPLICATES prog_env) list(REMOVE_DUPLICATES prog_env)
vcpkg_add_to_path(PREPEND ${prog_env}) vcpkg_add_to_path(PREPEND ${prog_env})
# More? OBJCC STRIP BIN2C # More? OBJCC BIN2C
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
@ -256,11 +259,6 @@ else()
set(ENABLE_SWSCALE OFF) set(ENABLE_SWSCALE OFF)
endif() endif()
set(STATIC_LINKAGE OFF)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(STATIC_LINKAGE ON)
endif()
if ("alsa" IN_LIST FEATURES) if ("alsa" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-alsa") set(OPTIONS "${OPTIONS} --enable-alsa")
else() else()
@ -599,7 +597,7 @@ if(VCPKG_TARGET_IS_UWP)
string(APPEND OPTIONS " --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") string(APPEND OPTIONS " --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib")
endif() endif()
set(OPTIONS_DEBUG "--debug --disable-optimizations") set(OPTIONS_DEBUG "--disable-optimizations")
set(OPTIONS_RELEASE "--enable-optimizations") set(OPTIONS_RELEASE "--enable-optimizations")
set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}") set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}")
@ -614,6 +612,8 @@ elseif(VCPKG_TARGET_IS_WINDOWS)
set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0") set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0")
endif() endif()
vcpkg_find_acquire_program(PKGCONFIG)
set(OPTIONS "${OPTIONS} --pkg-config=${PKGCONFIG}")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(OPTIONS "${OPTIONS} --pkg-config-flags=--static") set(OPTIONS "${OPTIONS} --pkg-config-flags=--static")
endif() endif()
@ -653,12 +653,16 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY) configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY)
z_vcpkg_setup_pkgconfig_path(CONFIG RELEASE)
vcpkg_execute_required_process( vcpkg_execute_required_process(
COMMAND "${SHELL}" ./build.sh COMMAND "${SHELL}" ./build.sh
WORKING_DIRECTORY "${BUILD_DIR}" WORKING_DIRECTORY "${BUILD_DIR}"
LOGNAME "build-${TARGET_TRIPLET}-rel" LOGNAME "build-${TARGET_TRIPLET}-rel"
SAVE_LOG_FILES ffbuild/config.log SAVE_LOG_FILES ffbuild/config.log
) )
z_vcpkg_restore_pkgconfig_path()
endif() endif()
# Debug build # Debug build
@ -692,12 +696,16 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY) configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY)
z_vcpkg_setup_pkgconfig_path(CONFIG DEBUG)
vcpkg_execute_required_process( vcpkg_execute_required_process(
COMMAND "${SHELL}" ./build.sh COMMAND "${SHELL}" ./build.sh
WORKING_DIRECTORY "${BUILD_DIR}" WORKING_DIRECTORY "${BUILD_DIR}"
LOGNAME "build-${TARGET_TRIPLET}-dbg" LOGNAME "build-${TARGET_TRIPLET}-dbg"
SAVE_LOG_FILES ffbuild/config.log SAVE_LOG_FILES ffbuild/config.log
) )
z_vcpkg_restore_pkgconfig_path()
endif() endif()
if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_IS_WINDOWS)

View File

@ -1,7 +1,7 @@
{ {
"name": "ffmpeg", "name": "ffmpeg",
"version": "6.1.1", "version": "6.1.1",
"port-version": 6, "port-version": 7,
"description": [ "description": [
"a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.", "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." "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."

View File

@ -1,39 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1492306..3f08b6a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1133,6 +1133,7 @@ set (INSTALL_SHARED_DIR ${CMAKE_INSTALL_LIBDIR})
if (CYGWIN)
set (INSTALL_SHARED_DIR ${CMAKE_INSTALL_BINDIR})
endif()
+set(CMAKE_INSTALL_INCLUDEDIR include)
message(STATUS "INSTALL DIRS: bin=${CMAKE_INSTALL_BINDIR} lib=${CMAKE_INSTALL_LIBDIR} shlib=${INSTALL_SHARED_DIR} include=${CMAKE_INSTALL_INCLUDEDIR}")
if (NEED_DESTINATION)
@@ -1228,7 +1229,7 @@ macro(srt_add_program name)
if(NOT NEED_DESTINATION)
install(TARGETS ${name} RUNTIME)
elseif (DEFINED CMAKE_INSTALL_BINDIR)
- install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(TARGETS ${name} RUNTIME DESTINATION tools)
else()
message(WARNING "No location to install program ${name}")
endif()
@@ -1273,7 +1274,7 @@ macro(srt_add_application name) # ARGN=sources...
if(NOT NEED_DESTINATION)
install(TARGETS ${name} RUNTIME)
elseif (DEFINED CMAKE_INSTALL_BINDIR)
- install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(TARGETS ${name} RUNTIME DESTINATION tools)
else()
message(WARNING "No location to install program ${name}")
endif()
@@ -1483,7 +1484,7 @@ endif()
if(NOT NEED_DESTINATION)
install(PROGRAMS scripts/srt-ffplay TYPE BIN)
elseif (DEFINED CMAKE_INSTALL_BINDIR)
- install(PROGRAMS scripts/srt-ffplay DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(PROGRAMS scripts/srt-ffplay DESTINATION tools)
else()
message(WARNING "No location to install scripts/srt-ffplay")
endif()

View File

@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1492306..69287ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1182,7 +1182,11 @@ endif()
# if your build requires it, you'd probably remove -lstdc++ from the list
# obtained by `pkg-config --libs`.
if(ENABLE_CXX_DEPS)
+ cmake_policy(SET CMP0057 NEW)
foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
+ if(LIB IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
+ continue()
+ endif()
if((IS_ABSOLUTE ${LIB} AND EXISTS ${LIB}) OR (${LIB} MATCHES "^-l"))
set(SRT_LIBS_PRIVATE ${SRT_LIBS_PRIVATE} ${LIB})
else()

View File

@ -5,8 +5,8 @@ vcpkg_from_github(
SHA512 5b576d6fd325515e05074e4568e3b65d1ae265e3e971db6e6242e5138243fc1594df1e3a7d90962385dac38abc34c4c4b0a567439050f8c0ff818b3b3d497efc SHA512 5b576d6fd325515e05074e4568e3b65d1ae265e3e971db6e6242e5138243fc1594df1e3a7d90962385dac38abc34c4c4b0a567439050f8c0ff818b3b3d497efc
HEAD_REF master HEAD_REF master
PATCHES PATCHES
fix-dependency-install.patch
fix-static.patch fix-static.patch
pkgconfig.diff
) )
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC)
@ -33,10 +33,24 @@ vcpkg_cmake_install()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") if(ENABLE_APPS)
if(NOT MINGW)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_copy_tools(TOOL_NAMES srt-tunnel AUTO_CLEAN)
endif()
vcpkg_copy_tools(TOOL_NAMES srt-file-transmit srt-live-transmit AUTO_CLEAN)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/srt-ffplay" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/srt-ffplay")
endif()
if(KEYSTONE_BUILD_STATIC OR NOT VCPKG_TARGET_IS_WINDOWS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
else()
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/srt-ffplay" "${CURRENT_PACKAGES_DIR}/debug/bin/srt-ffplay")
endif() endif()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/srt/srt.h" "#ifdef SRT_DYNAMIC" "#if 1")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,6 +1,7 @@
{ {
"name": "libsrt", "name": "libsrt",
"version": "1.5.3", "version": "1.5.3",
"port-version": 1,
"description": "Secure Reliable Transport (SRT) is an open source transport technology that optimizes streaming performance across unpredictable networks, such as the Internet.", "description": "Secure Reliable Transport (SRT) is an open source transport technology that optimizes streaming performance across unpredictable networks, such as the Internet.",
"homepage": "https://github.com/Haivision/srt", "homepage": "https://github.com/Haivision/srt",
"license": "MPL-2.0", "license": "MPL-2.0",

View File

@ -0,0 +1,23 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3062e2..05477e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -417,4 +417,18 @@ if(SNAPPY_INSTALL)
"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
+
+ cmake_policy(SET CMP0057 NEW)
+ set(LIBS_PRIVATE "")
+ foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES)
+ if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
+ continue()
+ elseif(EXISTS "${lib}")
+ string(APPEND LIBS_PRIVATE " ${CMAKE_LINK_LIBRARY_FILE_FLAG}${lib}")
+ else()
+ string(APPEND LIBS_PRIVATE " ${CMAKE_LINK_LIBRARY_FLAG}${lib}")
+ endif()
+ endforeach()
+ configure_file(snappy.pc.in "${CMAKE_CURRENT_BINARY_DIR}/snappy.pc" @ONLY)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/snappy.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif(SNAPPY_INSTALL)

View File

@ -1,16 +1,15 @@
file(READ "${CURRENT_PORT_DIR}/vcpkg.json" manifest)
string(JSON version GET "${manifest}" version)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO google/snappy REPO google/snappy
REF ${version} REF ${VERSION}
SHA512 3578597f1d4ec09104ce0296b825b013590351230dfe56c635081fd282ce7a13a34caf2c283ac77bd24065e2d27af6db068d1f84b98cec2fd39a0e37a0d77070 SHA512 3578597f1d4ec09104ce0296b825b013590351230dfe56c635081fd282ce7a13a34caf2c283ac77bd24065e2d27af6db068d1f84b98cec2fd39a0e37a0d77070
HEAD_REF master HEAD_REF master
PATCHES PATCHES
fix_clang-cl_build.patch fix_clang-cl_build.patch
no-werror.patch no-werror.patch
pkgconfig.diff
) )
file(COPY "${CURRENT_PORT_DIR}/snappy.pc.in" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure( vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}" SOURCE_PATH "${SOURCE_PATH}"
@ -29,16 +28,7 @@ vcpkg_cmake_configure(
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Snappy) vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Snappy)
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
string(JSON description GET "${manifest}" description)
set(name "${PORT}")
configure_file("${CURRENT_PORT_DIR}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" @ONLY)
if(NOT VCPKG_BUILD_TYPE)
configure_file("${CURRENT_PORT_DIR}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" @ONLY)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" "/include" "/../include")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

View File

@ -3,8 +3,9 @@ exec_prefix=${prefix}
libdir=${prefix}/lib libdir=${prefix}/lib
includedir=${prefix}/include includedir=${prefix}/include
Name: @name@ Name: snappy
Description: @description@ Description: A fast compressor/decompressor.
Version: @version@ Version: @PROJECT_VERSION@
Libs: -L${libdir} -l@name@ Libs: -L${libdir} -lsnappy
Cflags: -I${includedir} Cflags: -I${includedir}
Libs.private: @LIBS_PRIVATE@

View File

@ -1,6 +1,7 @@
{ {
"name": "snappy", "name": "snappy",
"version": "1.1.10", "version": "1.1.10",
"port-version": 1,
"description": "A fast compressor/decompressor.", "description": "A fast compressor/decompressor.",
"homepage": "https://github.com/google/snappy", "homepage": "https://github.com/google/snappy",
"license": null, "license": null,

View File

@ -1,22 +1,13 @@
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 33b6523..06e3193 100644 index 11512ff..9ac8057 100755
--- a/source/CMakeLists.txt --- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt +++ b/source/CMakeLists.txt
@@ -580,13 +580,13 @@ endif() @@ -603,7 +603,7 @@ if(SVTHEVC_FOUND)
install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
if(MSVC_IDE)
- install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
- install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
+ #install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
+ #install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
install(FILES "${PROJECT_BINARY_DIR}/Debug/libx265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug OPTIONAL NAMELINK_ONLY)
install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/libx265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo OPTIONAL NAMELINK_ONLY)
else()
- install(FILES "${PROJECT_BINARY_DIR}/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
- install(FILES "${PROJECT_BINARY_DIR}/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
+ #install(FILES "${PROJECT_BINARY_DIR}/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
+ #install(FILES "${PROJECT_BINARY_DIR}/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
install(FILES "${PROJECT_BINARY_DIR}/libx265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug OPTIONAL NAMELINK_ONLY)
install(FILES "${PROJECT_BINARY_DIR}/libx265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo OPTIONAL NAMELINK_ONLY)
endif() endif()
install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
-if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
+if(0)
if(MSVC_IDE)
install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)

18
ports/x265/linkage.diff Normal file
View File

@ -0,0 +1,18 @@
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index d6f0e3e..11512ff 100755
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -582,9 +582,13 @@ endif()
if(SVTHEVC_FOUND)
target_link_libraries(x265-static ${SVT_HEVC_LIBRARY})
endif()
+if(ENABLE_SHARED)
+ set_target_properties(x265-static PROPERTIES EXCLUDE_FROM_ALL 1)
+else()
install(TARGETS x265-static
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+endif()
if(ENABLE_HDR10_PLUS)
install(TARGETS hdr10plus-static

58
ports/x265/pkgconfig.diff Normal file
View File

@ -0,0 +1,58 @@
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index a407271..a575642 100755
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -572,6 +572,9 @@ else()
endif()
if(NOT MSVC)
set_target_properties(x265-static PROPERTIES OUTPUT_NAME x265)
+ set(X265_LIB x265)
+else()
+ set(X265_LIB x265-static)
endif()
if(EXTRA_LIB)
target_link_libraries(x265-static ${EXTRA_LIB})
@@ -655,8 +658,10 @@ if(ENABLE_SHARED)
endif(SVTHEVC_FOUND)
if(MSVC)
set_target_properties(x265-shared PROPERTIES OUTPUT_NAME libx265)
+ set(X265_LIB libx265)
else()
set_target_properties(x265-shared PROPERTIES OUTPUT_NAME x265)
+ set(X265_LIB x265)
endif()
if(UNIX)
set_target_properties(x265-shared PROPERTIES VERSION ${X265_BUILD})
@@ -693,7 +698,11 @@ endif()
if(X265_LATEST_TAG)
# convert lists of link libraries into -lstdc++ -lm etc..
+ cmake_policy(SET CMP0057 NEW)
foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS})
+ if(LIB IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
+ continue()
+ endif()
if(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
list(APPEND PLIBLIST "${LIB}")
else()
@@ -702,7 +711,7 @@ if(X265_LATEST_TAG)
endforeach()
if(PLIBLIST)
# blacklist of libraries that should not be in Libs.private
- list(REMOVE_ITEM PLIBLIST "-lc" "-lpthread" "-lmingwex" "-lmingwthrd"
+ list(REMOVE_ITEM PLIBLIST "-lc" "-lmingwex" "-lmingwthrd"
"-lmingw32" "-lmoldname" "-lmsvcrt" "-ladvapi32" "-lshell32"
"-luser32" "-lkernel32")
string(REPLACE ";" " " PRIVATE_LIBS "${PLIBLIST}")
diff --git a/source/x265.pc.in b/source/x265.pc.in
index 0bf99e9..fe76d20 100644
--- a/source/x265.pc.in
+++ b/source/x265.pc.in
@@ -6,6 +6,6 @@ includedir=${prefix}/include
Name: @CMAKE_PROJECT_NAME@
Description: H.265/HEVC video encoder
Version: @X265_LATEST_TAG@
-Libs: -L${libdir} -lx265
+Libs: -L${libdir} -l@X265_LIB@
Libs.private: @PRIVATE_LIBS@
Cflags: -I${includedir}

View File

@ -7,6 +7,8 @@ vcpkg_from_bitbucket(
PATCHES PATCHES
disable-install-pdb.patch disable-install-pdb.patch
version.patch version.patch
linkage.diff
pkgconfig.diff
) )
set(ASSEMBLY_OPTIONS "-DENABLE_ASSEMBLY=OFF") set(ASSEMBLY_OPTIONS "-DENABLE_ASSEMBLY=OFF")
@ -32,36 +34,14 @@ vcpkg_cmake_configure(
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_copy_tools(TOOL_NAMES x265 AUTO_CLEAN) vcpkg_copy_tools(TOOL_NAMES x265 AUTO_CLEAN)
if(VCPKG_TARGET_IS_MINGW AND ENABLE_SHARED) if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libx265.a") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/x265.h" "#ifdef X265_API_IMPORTS" "#if 1")
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libx265.a")
endif() endif()
vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND ENABLE_SHARED)
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/x265-static.lib")
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/x265-static.lib")
endif()
vcpkg_list(SET pc_files "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc")
if(NOT VCPKG_BUILD_TYPE)
vcpkg_list(APPEND pc_files "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc")
endif()
foreach(FILE IN LISTS pc_files)
file(READ "${FILE}" _contents)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
if (NOT ENABLE_SHARED)
string(REPLACE "-lx265" "-lx265-static" _contents "${_contents}")
endif()
else()
string(REPLACE " -lgcc_s" "" _contents "${_contents}")
string(REPLACE " -lgcc" "" _contents "${_contents}")
endif()
file(WRITE "${FILE}" "${_contents}")
endforeach()
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@ -1,6 +1,7 @@
{ {
"name": "x265", "name": "x265",
"version": "3.5", "version": "3.5",
"port-version": 1,
"description": "x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.", "description": "x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.",
"homepage": "https://github.com/videolan/x265", "homepage": "https://github.com/videolan/x265",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "7ca33fd13a8aadfd37ec4696181eb98d0226a738",
"version": "1.2.11",
"port-version": 2
},
{ {
"git-tree": "78ad470e54eac71113219036519aa55ff3489294", "git-tree": "78ad470e54eac71113219036519aa55ff3489294",
"version": "1.2.11", "version": "1.2.11",

View File

@ -94,7 +94,7 @@
}, },
"alsa": { "alsa": {
"baseline": "1.2.11", "baseline": "1.2.11",
"port-version": 1 "port-version": 2
}, },
"amd-adl-sdk": { "amd-adl-sdk": {
"baseline": "17.1", "baseline": "17.1",
@ -2674,7 +2674,7 @@
}, },
"fdk-aac": { "fdk-aac": {
"baseline": "2.0.2", "baseline": "2.0.2",
"port-version": 3 "port-version": 4
}, },
"fdlibm": { "fdlibm": {
"baseline": "5.3", "baseline": "5.3",
@ -2682,7 +2682,7 @@
}, },
"ffmpeg": { "ffmpeg": {
"baseline": "6.1.1", "baseline": "6.1.1",
"port-version": 6 "port-version": 7
}, },
"ffnvcodec": { "ffnvcodec": {
"baseline": "12.1.14.0", "baseline": "12.1.14.0",
@ -5006,7 +5006,7 @@
}, },
"libsrt": { "libsrt": {
"baseline": "1.5.3", "baseline": "1.5.3",
"port-version": 0 "port-version": 1
}, },
"libsrtp": { "libsrtp": {
"baseline": "2.5.0", "baseline": "2.5.0",
@ -8206,7 +8206,7 @@
}, },
"snappy": { "snappy": {
"baseline": "1.1.10", "baseline": "1.1.10",
"port-version": 0 "port-version": 1
}, },
"sndfile": { "sndfile": {
"baseline": "0", "baseline": "0",
@ -9438,7 +9438,7 @@
}, },
"x265": { "x265": {
"baseline": "3.5", "baseline": "3.5",
"port-version": 0 "port-version": 1
}, },
"x86-simd-sort": { "x86-simd-sort": {
"baseline": "4.0", "baseline": "4.0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "83ef7219dea393b1777a14abff792d146e0f39fe",
"version-semver": "2.0.2",
"port-version": 4
},
{ {
"git-tree": "557cf019e07ef3e1c865204c7509bb7920301a89", "git-tree": "557cf019e07ef3e1c865204c7509bb7920301a89",
"version-semver": "2.0.2", "version-semver": "2.0.2",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "43a794215eb84acb9f6e49f2aee3a3ee1ac1af92",
"version": "6.1.1",
"port-version": 7
},
{ {
"git-tree": "bad8797d669a583736212969fbbf6298497880b2", "git-tree": "bad8797d669a583736212969fbbf6298497880b2",
"version": "6.1.1", "version": "6.1.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "0ef5c07af28fb2b9c3ea49b40716593f14c48b8b",
"version": "1.5.3",
"port-version": 1
},
{ {
"git-tree": "6e18c5142063f271c53bf008d8421192743f968e", "git-tree": "6e18c5142063f271c53bf008d8421192743f968e",
"version": "1.5.3", "version": "1.5.3",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "52d0b0f59c6f6e765c7f8df9e075ff7b90552c1e",
"version": "1.1.10",
"port-version": 1
},
{ {
"git-tree": "674abac6de71455f63c6649f436ff0801545ae00", "git-tree": "674abac6de71455f63c6649f436ff0801545ae00",
"version": "1.1.10", "version": "1.1.10",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "93b9b05210a7eeeb11abdf3f09ad3f949047ed20",
"version": "3.5",
"port-version": 1
},
{ {
"git-tree": "b234c25f697f72c031c5d243a78be3dbb98c93c2", "git-tree": "b234c25f697f72c031c5d243a78be3dbb98c93c2",
"version": "3.5", "version": "3.5",