Techt3o commited on
Commit
438204d
·
verified ·
1 Parent(s): 000a6e1

f041795d06d03b17bd55380f78823af9f53e3c04a24213bb4ab478745a986922

Browse files
Files changed (50) hide show
  1. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fbgemm/portfile.cmake +29 -0
  2. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fbgemm/vcpkg.json +21 -0
  3. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fbthrift/portfile.cmake +64 -0
  4. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fbthrift/vcpkg.json +33 -0
  5. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fcl/portfile.cmake +41 -0
  6. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fcl/vcpkg.json +20 -0
  7. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdk-aac/portfile.cmake +36 -0
  8. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdk-aac/vcpkg.json +22 -0
  9. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdlibm/CMakeLists.txt +28 -0
  10. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdlibm/libm5.def +88 -0
  11. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdlibm/portfile.cmake +22 -0
  12. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdlibm/vcpkg.json +6 -0
  13. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0001-create-lib-libraries.patch +25 -0
  14. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0003-fix-windowsinclude.patch +13 -0
  15. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0004-fix-debug-build.patch +40 -0
  16. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0006-fix-StaticFeatures.patch +49 -0
  17. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0007-fix-lib-naming.patch +15 -0
  18. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0009-Fix-fdk-detection.patch +14 -0
  19. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0010-Fix-x264-detection.patch +14 -0
  20. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0011-Fix-x265-detection.patch +17 -0
  21. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0012-Fix-ssl-110-detection.patch +13 -0
  22. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0013-define-WINVER.patch +15 -0
  23. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0014-avfilter-dependency-fix.patch +23 -0
  24. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0015-Fix-xml2-detection.patch +17 -0
  25. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0016-configure-dnn-needs-avformat.patch +25 -0
  26. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0017-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch +44 -0
  27. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0018-libaom-Dont-use-aom_codec_av1_dx_algo.patch +26 -0
  28. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0019-libx264-Do-not-explicitly-set-X264_API_IMPORTS.patch +46 -0
  29. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/FindFFMPEG.cmake.in +165 -0
  30. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/build.sh.in +126 -0
  31. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/portfile.cmake +810 -0
  32. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/usage +6 -0
  33. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/vcpkg-cmake-wrapper.cmake +8 -0
  34. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/vcpkg.json +643 -0
  35. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/LICENSE.txt +169 -0
  36. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/build.sh +18 -0
  37. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/copyright +26 -0
  38. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/portfile.cmake +57 -0
  39. third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/vcpkg.json +8 -0
  40. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/aligned_malloc.patch +38 -0
  41. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/fftw3_arch_fix.patch +39 -0
  42. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/omp_test.patch +17 -0
  43. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/patch_targets.patch +41 -0
  44. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/portfile.cmake +74 -0
  45. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/vcpkg.json +37 -0
  46. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftwpp/portfile.cmake +34 -0
  47. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftwpp/vcpkg.json +10 -0
  48. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fixed-string/portfile.cmake +27 -0
  49. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fixed-string/vcpkg.json +7 -0
  50. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fizz/0001-fix-libsodium.patch +35 -0
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fbgemm/portfile.cmake ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # The project's CMakeLists.txt uses Python to select source files. Check if it is available in advance.
2
+ vcpkg_find_acquire_program(PYTHON3)
3
+
4
+ vcpkg_from_github(
5
+ OUT_SOURCE_PATH SOURCE_PATH
6
+ REPO pytorch/fbgemm
7
+ REF 51bc2ecc7086980fd9e6190163b04486cd37ac2a
8
+ SHA512 43e59ff25ec9365061be6a8db7ec592f096e74897e338dd3e17401f2188986cf3b7e26f82f7c1e2adf34496fb32cb4b50d40731bee3bf9fa5b1f2ac92a09e671
9
+ PATCHES
10
+ fix-cmakelists.patch
11
+ )
12
+
13
+ vcpkg_cmake_configure(
14
+ SOURCE_PATH "${SOURCE_PATH}"
15
+ OPTIONS
16
+ -DUSE_SANITIZER=OFF
17
+ -DFBGEMM_BUILD_TESTS=OFF
18
+ -DFBGEMM_BUILD_BENCHMARKS=OFF
19
+ -DPYTHON_EXECUTABLE=${PYTHON3} # inject the path instead of find_package(Python)
20
+ )
21
+ vcpkg_cmake_install()
22
+ vcpkg_copy_pdbs()
23
+ vcpkg_cmake_config_fixup(PACKAGE_NAME fbgemmLibrary CONFIG_PATH share/cmake/${PORT})
24
+
25
+ # this internal header is required by pytorch
26
+ file(INSTALL "${SOURCE_PATH}/src/RefImplementations.h"
27
+ DESTINATION "${CURRENT_PACKAGES_DIR}/include/fbgemm/src")
28
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
29
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fbgemm/vcpkg.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fbgemm",
3
+ "version-date": "2021-03-18",
4
+ "port-version": 4,
5
+ "description": "FB (Facebook) + GEMM (General Matrix-Matrix Multiplication)",
6
+ "homepage": "https://code.fb.com/ml-applications/fbgemm/",
7
+ "license": "BSD-3-Clause",
8
+ "supports": "!(x86 | uwp)",
9
+ "dependencies": [
10
+ "asmjit",
11
+ "cpuinfo",
12
+ {
13
+ "name": "vcpkg-cmake",
14
+ "host": true
15
+ },
16
+ {
17
+ "name": "vcpkg-cmake-config",
18
+ "host": true
19
+ }
20
+ ]
21
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fbthrift/portfile.cmake ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_find_acquire_program(FLEX)
2
+ vcpkg_find_acquire_program(BISON)
3
+
4
+ vcpkg_from_github(
5
+ OUT_SOURCE_PATH SOURCE_PATH
6
+ REPO facebook/fbthrift
7
+ REF v2022.03.21.00
8
+ SHA512 8d2d9430dc3a4ecc23042cd9bcf4eee888824449d05d98baec408aef806b934d643e578d3876169f69966c846aeddbe0aa84416c4e020cba028a49d2fccfe7ab
9
+ HEAD_REF master
10
+ )
11
+
12
+ vcpkg_cmake_configure(
13
+ SOURCE_PATH "${SOURCE_PATH}"
14
+ OPTIONS
15
+ "-DBISON_EXECUTABLE=${BISON}"
16
+ "-DFLEX_EXECUTABLE=${FLEX}"
17
+ )
18
+
19
+ vcpkg_cmake_install()
20
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fbthrift)
21
+
22
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
23
+
24
+ # There should be no empty directories in vcpkg/packages/fbthrift_x64-linux
25
+ file(REMOVE_RECURSE
26
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/transport/test"
27
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/test"
28
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/util/test"
29
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/server/test"
30
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/common/test"
31
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/test"
32
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/core/test"
33
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/inmemory/test"
34
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/protocol/test"
35
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/extensions/test"
36
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/test"
37
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/test"
38
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/frozen/test"
39
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/reflection/docs"
40
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/util/test"
41
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/visitation/test"
42
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/server/test"
43
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/test"
44
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/benchmark"
45
+ "${CURRENT_PACKAGES_DIR}/include/thrift/lib/thrift/annotation"
46
+ )
47
+
48
+ vcpkg_copy_tools(TOOL_NAMES thrift1 AUTO_CLEAN)
49
+ vcpkg_copy_pdbs()
50
+
51
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake")
52
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake"
53
+ "${PACKAGE_PREFIX_DIR}/lib/cmake/fbthrift" "${PACKAGE_PREFIX_DIR}/share/fbthrift")
54
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake"
55
+ "${PACKAGE_PREFIX_DIR}/bin/thrift1.exe" "${PACKAGE_PREFIX_DIR}/tools/fbthrift/thrift1.exe")
56
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake"
57
+ "${PACKAGE_PREFIX_DIR}/bin/thrift1" "${PACKAGE_PREFIX_DIR}/tools/fbthrift/thrift1")
58
+ endif()
59
+
60
+ # Only used internally and removed in master
61
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftTargets.cmake" "LOCATION_HH=\\\"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/thrift/compiler/location.hh\\\"" "")
62
+
63
+ # Handle copyright
64
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fbthrift/vcpkg.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fbthrift",
3
+ "version-string": "2022.03.21.00",
4
+ "description": "Facebook's branch of Apache Thrift, including a new C++ server.",
5
+ "homepage": "https://github.com/facebook/fbthrift",
6
+ "license": "Apache-2.0",
7
+ "supports": "x64 & static",
8
+ "dependencies": [
9
+ "boost-context",
10
+ "boost-filesystem",
11
+ "boost-program-options",
12
+ "boost-regex",
13
+ "boost-system",
14
+ "boost-thread",
15
+ "fizz",
16
+ "fmt",
17
+ "folly",
18
+ "gflags",
19
+ "glog",
20
+ "openssl",
21
+ {
22
+ "name": "vcpkg-cmake",
23
+ "host": true
24
+ },
25
+ {
26
+ "name": "vcpkg-cmake-config",
27
+ "host": true
28
+ },
29
+ "wangle",
30
+ "zlib",
31
+ "zstd"
32
+ ]
33
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fcl/portfile.cmake ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2
+
3
+ vcpkg_from_github(
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO flexible-collision-library/fcl
6
+ REF 0.7.0
7
+ SHA512 95612476f4706fcd60812204ec7495a956c4e318cc6ace9526ac93dc765605ddf73b2d0d9ff9f4c9c739e43c5f8e24670113c86e02868a2949ab234c3bf82374
8
+ HEAD_REF master
9
+ )
10
+
11
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FCL_STATIC_LIBRARY)
12
+
13
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
14
+ set(FCL_USE_X64_SSE ON)
15
+ else()
16
+ set(FCL_USE_X64_SSE OFF)
17
+ endif()
18
+
19
+ vcpkg_cmake_configure(
20
+ SOURCE_PATH "${SOURCE_PATH}"
21
+ OPTIONS
22
+ -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=1
23
+ -DFCL_STATIC_LIBRARY=${FCL_STATIC_LIBRARY}
24
+ -DFCL_BUILD_TESTS=OFF
25
+ -DFCL_USE_X64_SSE=${FCL_USE_X64_SSE}
26
+ )
27
+
28
+ vcpkg_cmake_install()
29
+ vcpkg_copy_pdbs()
30
+
31
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/CMake")
32
+ vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
33
+ else()
34
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fcl)
35
+ endif()
36
+
37
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
38
+
39
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
40
+
41
+ vcpkg_fixup_pkgconfig()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fcl/vcpkg.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fcl",
3
+ "version": "0.7.0",
4
+ "port-version": 3,
5
+ "description": "a library for performing three types of proximity queries on a pair of geometric models composed of triangles",
6
+ "homepage": "https://github.com/flexible-collision-library/fcl",
7
+ "dependencies": [
8
+ "ccd",
9
+ "eigen3",
10
+ "octomap",
11
+ {
12
+ "name": "vcpkg-cmake",
13
+ "host": true
14
+ },
15
+ {
16
+ "name": "vcpkg-cmake-config",
17
+ "host": true
18
+ }
19
+ ]
20
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdk-aac/portfile.cmake ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES
2
+ FEATURES
3
+ he-aac HE_AAC
4
+ )
5
+
6
+ if(HE_AAC)
7
+ vcpkg_from_github(
8
+ REPO mstorsjo/fdk-aac
9
+ REF v2.0.2
10
+ SHA512 616207e85035d1659a2b7808ca6ec02ef53c1c4b39eb280fe861f82a4cf548e5db2ac381c496bad37dfc2b8c6677fe704d9fd8449e43d1f93d3e636239e0191b
11
+ HEAD_REF master
12
+ OUT_SOURCE_PATH SOURCE_PATH
13
+ )
14
+ else()
15
+ vcpkg_from_gitlab(
16
+ GITLAB_URL https://gitlab.freedesktop.org/
17
+ REPO wtaymans/fdk-aac-stripped
18
+ REF 585981a49f2186b0d2e47c64bf6b5abf539395f8 # corresponds to v2.0.2 tag in mstorsjo/fdk-aac GitHub repository
19
+ HEAD_REF stripped4
20
+ SHA512 e0e56396ed0be427302ed4b54fc6e8dc522a172c288b7c1ec40cc3a9ceb13518ca7bbb874bc71b88b2a91e0bbbe4ad0bab6910efa1db63d91e6370976641bac4
21
+ OUT_SOURCE_PATH SOURCE_PATH
22
+ )
23
+ endif()
24
+
25
+ vcpkg_cmake_configure(
26
+ SOURCE_PATH ${SOURCE_PATH}
27
+ OPTIONS_RELEASE -DBUILD_PROGRAMS=OFF
28
+ )
29
+
30
+ vcpkg_cmake_install()
31
+ vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
32
+ vcpkg_fixup_pkgconfig()
33
+ vcpkg_copy_pdbs()
34
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
35
+ file(INSTALL "${SOURCE_PATH}/NOTICE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
36
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdk-aac/vcpkg.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fdk-aac",
3
+ "version-semver": "2.0.2",
4
+ "port-version": 1,
5
+ "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.",
6
+ "homepage": "https://gitlab.freedesktop.org/wtaymans/fdk-aac-stripped",
7
+ "dependencies": [
8
+ {
9
+ "name": "vcpkg-cmake",
10
+ "host": true
11
+ },
12
+ {
13
+ "name": "vcpkg-cmake-config",
14
+ "host": true
15
+ }
16
+ ],
17
+ "features": {
18
+ "he-aac": {
19
+ "description": "Support patent-encumbered HE-AAC, HE-AACv2, and xHE-AAC codec profiles. Do not distribute binaries with this option without the relevant patent licenses if you are in a jurisdiction that recognizes software patents. Might not be compatible with the GPL depending on legal interpretation. Refer to https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112"
20
+ }
21
+ }
22
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdlibm/CMakeLists.txt ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.8)
2
+ project(fdlibm C)
3
+
4
+ file(GLOB fdlibm_SOURCES "*.c")
5
+
6
+ include_directories(".")
7
+
8
+ if(WIN32)
9
+ set(fdlibm_SOURCES ${fdlibm_SOURCES} libm5.def)
10
+ endif()
11
+
12
+
13
+ add_library(fdlibm ${fdlibm_SOURCES})
14
+
15
+ install(
16
+ TARGETS fdlibm
17
+ RUNTIME DESTINATION bin
18
+ LIBRARY DESTINATION lib/manual-link
19
+ ARCHIVE DESTINATION lib/manual-link
20
+ )
21
+
22
+ if(NOT DISABLE_INSTALL_HEADERS)
23
+ install(
24
+ FILES
25
+ fdlibm.h
26
+ DESTINATION include
27
+ )
28
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdlibm/libm5.def ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ EXPORTS
2
+ __ieee754_acos @ 1 ;
3
+ __ieee754_acosh @ 2 ;
4
+ __ieee754_asin @ 3 ;
5
+ __ieee754_atan2 @ 4 ;
6
+ __ieee754_atanh @ 5 ;
7
+ __ieee754_cosh @ 6 ;
8
+ __ieee754_exp @ 7 ;
9
+ __ieee754_fmod @ 8 ;
10
+ __ieee754_gamma @ 9 ;
11
+ __ieee754_gamma_r @ 10 ;
12
+ __ieee754_hypot @ 11 ;
13
+ __ieee754_j0 @ 12 ;
14
+ __ieee754_j1 @ 13 ;
15
+ __ieee754_jn @ 14 ;
16
+ __ieee754_lgamma @ 15 ;
17
+ __ieee754_lgamma_r @ 16 ;
18
+ __ieee754_log @ 17 ;
19
+ __ieee754_log10 @ 18 ;
20
+ __ieee754_pow @ 19 ;
21
+ __ieee754_rem_pio2 @ 20 ;
22
+ __ieee754_remainder @ 21 ;
23
+ __ieee754_scalb @ 22 ;
24
+ __ieee754_sinh @ 23 ;
25
+ __ieee754_sqrt @ 24 ;
26
+ __ieee754_y0 @ 25 ;
27
+ __ieee754_y1 @ 26 ;
28
+ __ieee754_yn @ 27 ;
29
+ __kernel_cos @ 28 ;
30
+ __kernel_rem_pio2 @ 29 ;
31
+ __kernel_sin @ 30 ;
32
+ __kernel_standard @ 31 ;
33
+ __kernel_tan @ 32 ;
34
+ _fdlib_version @ 33 DATA ;
35
+ acos @ 34 ;
36
+ acosh @ 35 ;
37
+ asin @ 36 ;
38
+ asinh @ 37 ;
39
+ atan @ 38 ;
40
+ atan2 @ 39 ;
41
+ atanh @ 40 ;
42
+ cbrt @ 41 ;
43
+ ceil @ 42 ;
44
+ copysign @ 43 ;
45
+ cos @ 44 ;
46
+ cosh @ 45 ;
47
+ erf @ 46 ;
48
+ erfc @ 47 ;
49
+ exp @ 48 ;
50
+ expm1 @ 49 ;
51
+ fabs @ 50 ;
52
+ ieee_finite @ 51 ;
53
+ floor @ 52 ;
54
+ fmod @ 53 ;
55
+ frexp @ 54 ;
56
+ ieee_gamma @ 55 ;
57
+ ieee_gamma_r @ 56 ;
58
+ hypot @ 57 ;
59
+ ilogb @ 58 ;
60
+ ieee_isnan @ 59 ;
61
+ j0 @ 60 ;
62
+ j1 @ 61 ;
63
+ jn @ 62 ;
64
+ ldexp @ 63 ;
65
+ ieee_lgamma @ 64 ;
66
+ ieee_lgamma_r @ 65 ;
67
+ log @ 66 ;
68
+ log10 @ 67 ;
69
+ log1p @ 68 ;
70
+ logb @ 69 ;
71
+ ieee_matherr @ 70 ;
72
+ modf @ 71 ;
73
+ nextafter @ 72 ;
74
+ pow @ 73 ;
75
+ remainder @ 74 ;
76
+ rint @ 75 ;
77
+ ieee_scalb @ 76 ;
78
+ scalbn @ 77 ;
79
+ signgam @ 78 DATA ;
80
+ ieee_significand @ 79 ;
81
+ sin @ 80 ;
82
+ sinh @ 81 ;
83
+ sqrt @ 82 ;
84
+ tan @ 83 ;
85
+ tanh @ 84 ;
86
+ y0 @ 85 ;
87
+ y1 @ 86 ;
88
+ yn @ 87 ;
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdlibm/portfile.cmake ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_git(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ URL https://android.googlesource.com/platform/external/fdlibm
4
+ REF 59f7335e4dd8275a7dc2f8aeb4fd00758fde37ac
5
+ )
6
+
7
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
8
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/libm5.def DESTINATION ${SOURCE_PATH})
9
+
10
+ vcpkg_configure_cmake(
11
+ SOURCE_PATH ${SOURCE_PATH}
12
+ PREFER_NINJA
13
+ OPTIONS_DEBUG
14
+ -DDISABLE_INSTALL_HEADERS=ON
15
+ )
16
+
17
+ vcpkg_install_cmake()
18
+ vcpkg_copy_pdbs()
19
+
20
+ # Handle copyright
21
+ configure_file(${SOURCE_PATH}/NOTICE ${CURRENT_PACKAGES_DIR}/share/fdlibm/copyright COPYONLY)
22
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fdlibm/vcpkg.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fdlibm",
3
+ "version-string": "5.3",
4
+ "port-version": 5,
5
+ "description": "FDLIBM (Freely Distributable LIBM) is a C math library for machines that support IEEE 754 floating-point arithmetic"
6
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0001-create-lib-libraries.patch ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure b/configure
2
+ index 34c2adb..1c8008a 100755
3
+ --- a/configure
4
+ +++ b/configure
5
+ @@ -5352,15 +5352,17 @@ case $target_os in
6
+ ;;
7
+ win32|win64)
8
+ disable symver
9
+ - if enabled shared; then
10
+ +# if enabled shared; then
11
+ # Link to the import library instead of the normal static library
12
+ # for shared libs.
13
+ LD_LIB='%.lib'
14
+ # Cannot build both shared and static libs with MSVC or icl.
15
+ - disable static
16
+ - fi
17
+ +# disable static
18
+ +# fi
19
+ enabled x86_32 && check_ldflags -LARGEADDRESSAWARE
20
+ shlibdir_default="$bindir_default"
21
+ + LIBPREF=""
22
+ + LIBSUF=".lib"
23
+ SLIBPREF=""
24
+ SLIBSUF=".dll"
25
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0003-fix-windowsinclude.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
2
+ index 9cfbc45..e3447e6 100644
3
+ --- a/fftools/cmdutils.c
4
+ +++ b/fftools/cmdutils.c
5
+ @@ -63,6 +63,8 @@
6
+ #include <sys/resource.h>
7
+ #endif
8
+ #ifdef _WIN32
9
+ +#define _WIN32_WINNT 0x0502
10
+ +#define WIN32_LEAN_AND_MEAN
11
+ #include <windows.h>
12
+ #endif
13
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0004-fix-debug-build.patch ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure b/configure
2
+ index bd2de34..fba948a 100755
3
+ --- a/configure
4
+ +++ b/configure
5
+ @@ -3993,6 +3993,9 @@ for opt do
6
+ --libfuzzer=*)
7
+ libfuzzer_path="$optval"
8
+ ;;
9
+ + --debug)
10
+ + enable debug_configure
11
+ + ;;
12
+ *)
13
+ optname="${opt%%=*}"
14
+ optname="${optname#--}"
15
+ @@ -6152,7 +6153,11 @@
16
+
17
+ enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion ||
18
+ check_lib zlib zlib.h zlibVersion -lz; }
19
+ -enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2
20
+ +if enabled debug_configure; then
21
+ + enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2d
22
+ +else
23
+ + enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2
24
+ +fi
25
+ enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma
26
+
27
+ # On some systems dynamic loading requires no extra linker flags
28
+ @@ -6350,7 +6350,11 @@ enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8
29
+ enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
30
+ enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
31
+ require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
32
+ -enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
33
+ +if enabled debug_configure; then
34
+ + enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappyd -lstdc++
35
+ +else
36
+ + enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
37
+ +fi
38
+ enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
39
+ enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
40
+ enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0006-fix-StaticFeatures.patch ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure b/configure
2
+ index 3bdcfc6..00b2f13 100644
3
+ --- a/configure
4
+ +++ b/configure
5
+ @@ -6351,7 +6351,8 @@ if enabled libmfx; then
6
+ fi
7
+
8
+ enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
9
+ -enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs
10
+ +enabled libmp3lame && { check_lib libmp3lame lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs ||
11
+ + require libmp3lame lame/lame.h lame_set_VBR_quality -llibmp3lame-static -llibmpghip-static $libm_extralibs; }
12
+ enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine ||
13
+ require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; }
14
+ enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei ||
15
+ @@ -6392,7 +6393,7 @@ if enabled debug_configure; then
16
+ else
17
+ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
18
+ fi
19
+ -enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
20
+ +enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr -lm
21
+ enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
22
+ enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
23
+ enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
24
+ @@ -6460,6 +6461,8 @@ enabled openal && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal"
25
+ enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel ||
26
+ check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
27
+ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
28
+ + check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -lAdvapi32 -lOle32 -lCfgmgr32||
29
+ + check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -pthread -ldl ||
30
+ die "ERROR: opencl not found"; } &&
31
+ { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
32
+ test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
33
+ @@ -6479,6 +6482,7 @@ enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OP
34
+ check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
35
+ check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
36
+ check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
37
+ + check_lib openssl openssl/ssl.h OPENSSL_init_ssl -llibssl -llibcrypto -lws2_32 -lgdi32 -lcrypt32 -lAdvapi32 -lUser32||
38
+ die "ERROR: openssl not found"; }
39
+ enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
40
+ enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
41
+ @@ -6707,7 +6711,7 @@ enabled amf &&
42
+ if enabled libc_iconv; then
43
+ check_func_headers iconv.h iconv
44
+ elif enabled iconv; then
45
+ - check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv
46
+ + check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv || check_lib iconv iconv.h iconv -liconv -llibcharset
47
+ fi
48
+
49
+ enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0007-fix-lib-naming.patch ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure b/configure
2
+ index d6c4388..75b96c3 100644
3
+ --- a/configure
4
+ +++ b/configure
5
+ @@ -4378,6 +4378,10 @@ msvc_common_flags(){
6
+ -march=*) ;;
7
+ -lz) echo zlib.lib ;;
8
+ -lx264) echo libx264.lib ;;
9
+ + -lx265) echo libx265.lib ;;
10
+ + -lmp3lame) echo libmp3lame.lib ;;
11
+ + -liconv) echo iconv.lib ;;
12
+ + -lm) ;;
13
+ -lstdc++) ;;
14
+ -l*) echo ${flag#-l}.lib ;;
15
+ -LARGEADDRESSAWARE) echo $flag ;;
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0009-Fix-fdk-detection.patch ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure b/configure
2
+ index b137669dd3..34c92230f4 100755
3
+ --- a/configure
4
+ +++ b/configure
5
+ @@ -6331,7 +6331,7 @@ enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.
6
+ enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
7
+ enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
8
+ enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
9
+ - { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
10
+ + { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac -lm -lstdc++ &&
11
+ warn "using libfdk without pkg-config"; } }
12
+ 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"
13
+ enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
14
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0010-Fix-x264-detection.patch ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure b/configure
2
+ index b137669dd3..34a2e644c4 100755
3
+ --- a/configure
4
+ +++ b/configure
5
+ @@ -6443,7 +6443,7 @@ enabled libwebp && {
6
+ enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
7
+ enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
8
+ enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode ||
9
+ - { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" &&
10
+ + { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs -ldl" &&
11
+ warn "using libx264 without pkg-config"; } } &&
12
+ require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
13
+ check_cpp_condition libx262 x264.h "X264_MPEG2"
14
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0011-Fix-x265-detection.patch ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure b/configure
2
+ index 34a2e644c4..0ea64bd306 100755
3
+ --- a/configure
4
+ +++ b/configure
5
+ @@ -6447,7 +6447,10 @@ enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x
6
+ warn "using libx264 without pkg-config"; } } &&
7
+ require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
8
+ check_cpp_condition libx262 x264.h "X264_MPEG2"
9
+ -enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
10
+ +enabled libx265 && { check_pkg_config libx265 x265 x265.h x265_api_get ||
11
+ + { { check_lib libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++ -lgcc_s -lgcc -lrt -lnuma" ||
12
+ + require libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++"; } &&
13
+ + warn "using libx265 without pkg-config"; } } &&
14
+ require_cpp_condition libx265 x265.h "X265_BUILD >= 70"
15
+ enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
16
+ enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get
17
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0012-Fix-ssl-110-detection.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure b/configure
2
+ index 2be953f7e7..e075949ffc 100755
3
+ --- a/configure
4
+ +++ b/configure
5
+ @@ -6497,6 +6497,7 @@ enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR
6
+ enabled omx && require_headers OMX_Core.h
7
+ enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
8
+ check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
9
+ + check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto $pthreads_extralibs -ldl ||
10
+ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
11
+ check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
12
+ check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
13
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0013-define-WINVER.patch ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --color -Naur src_old/libavcodec/mf_utils.c src/libavcodec/mf_utils.c
2
+ --- src_old/libavcodec/mf_utils.c 2020-07-11 05:26:17.000000000 +0700
3
+ +++ src/libavcodec/mf_utils.c 2020-11-13 12:55:57.226976400 +0700
4
+ @@ -22,6 +22,11 @@
5
+ #define _WIN32_WINNT 0x0602
6
+ #endif
7
+
8
+ +#if !defined(WINVER) || WINVER < 0x0602
9
+ +#undef WINVER
10
+ +#define WINVER 0x0602
11
+ +#endif
12
+ +
13
+ #include "mf_utils.h"
14
+ #include "libavutil/pixdesc.h"
15
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0014-avfilter-dependency-fix.patch ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure b/configure
2
+ index a092a6b457..41e55b4101 100755
3
+ --- a/configure
4
+ +++ b/configure
5
+ @@ -3666,6 +3666,18 @@ vpp_qsv_filter_select="qsvvpp"
6
+ xfade_opencl_filter_deps="opencl"
7
+ yadif_cuda_filter_deps="ffnvcodec"
8
+ yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
9
+ +ametadata_filter_deps="avformat"
10
+ +metadata_filter_deps="avformat"
11
+ +headphone_filter_deps="avcodec"
12
+ +headphone_filter_select="fft"
13
+ +showspatial_filter_deps="avcodec"
14
+ +showspatial_filter_select="fft"
15
+ +superequalizer_filter_deps="avcodec"
16
+ +superequalizer_filter_select="rdft"
17
+ +surround_filter_deps="avcodec"
18
+ +surround_filter_select="rdft"
19
+ +sinc_filter_deps="avcodec"
20
+ +sinc_filter_select="rdft"
21
+
22
+ # examples
23
+ avio_list_dir_deps="avformat avutil"
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0015-Fix-xml2-detection.patch ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ configure | 2 +-
2
+ 1 file changed, 1 insertion(+), 1 deletion(-)
3
+
4
+ diff --git a/configure b/configure
5
+ index 900505756b..8d1388a347 100755
6
+ --- a/configure
7
+ +++ b/configure
8
+ @@ -6476,7 +6476,7 @@ enabled libzmq && require_pkg_config libzmq "libzmq >= 4.2.1" zmq.h z
9
+ enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
10
+ { test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" ||
11
+ enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; }
12
+ -enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion
13
+ +enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml/xmlversion.h xmlCheckVersion
14
+ enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init ||
15
+ check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init ||
16
+ check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||
17
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0016-configure-dnn-needs-avformat.patch ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 7ca15b7f337b00a71384f748d05fce89fcf15a8d Mon Sep 17 00:00:00 2001
2
+ From: "Matthias C. M. Troffaes" <[email protected]>
3
+ Date: Tue, 4 May 2021 13:03:17 +0100
4
+ Subject: [PATCH] configure: dnn needs avformat
5
+
6
+ ---
7
+ configure | 2 +-
8
+ 1 file changed, 1 insertion(+), 1 deletion(-)
9
+
10
+ diff --git a/configure b/configure
11
+ index 9e45c0822c..8725a94f8a 100755
12
+ --- a/configure
13
+ +++ b/configure
14
+ @@ -2660,7 +2660,7 @@ cbs_vp9_select="cbs"
15
+ dct_select="rdft"
16
+ dirac_parse_select="golomb"
17
+ dnn_suggest="libtensorflow libopenvino"
18
+ -dnn_deps="swscale"
19
+ +dnn_deps="avformat swscale"
20
+ error_resilience_select="me_cmp"
21
+ faandct_deps="faan"
22
+ faandct_select="fdctdsp"
23
+ --
24
+ 2.25.1
25
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0017-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 6dd12a7210fb4cf2e69b6c83628021d83ba132c3 Mon Sep 17 00:00:00 2001
2
+ From: "Don C. Bigler" <[email protected]>
3
+ Date: Fri, 4 Dec 2020 12:39:55 -0500
4
+ Subject: [PATCH] Patch for ticket #9019 CUDA Compile Broken Using MSVC
5
+
6
+ Signed-off-by: Don C. Bigler <[email protected]>
7
+ ---
8
+ compat/cuda/ptx2c.sh | 7 ++++---
9
+ configure | 1 +
10
+ 2 files changed, 5 insertions(+), 3 deletions(-)
11
+
12
+ diff --git a/compat/cuda/ptx2c.sh b/compat/cuda/ptx2c.sh
13
+ index 48452379c2..1c486dc30e 100755
14
+ --- a/compat/cuda/ptx2c.sh
15
+ +++ b/compat/cuda/ptx2c.sh
16
+ @@ -26,9 +26,10 @@ OUT="$1"
17
+ IN="$2"
18
+ NAME="$(basename "$IN" | sed 's/\..*//')"
19
+
20
+ -printf "const char %s_ptx[] = \\" "$NAME" > "$OUT"
21
+ +printf "const char %s_ptx[] = {\\" "$NAME" > "$OUT"
22
+ echo >> "$OUT"
23
+ -sed -e "$(printf 's/\r//g')" -e 's/["\\]/\\&/g' -e "$(printf 's/^/\t"/')" -e 's/$/\\n"/' < "$IN" >> "$OUT"
24
+ -echo ";" >> "$OUT"
25
+ +xxd -i < "$IN" >> "$OUT"
26
+ +echo " ,0x00" >> "$OUT"
27
+ +echo "};" >> "$OUT"
28
+
29
+ exit 0
30
+ diff --git a/configure b/configure
31
+ index 1b1b140d6f..048e02355f 100755
32
+ --- a/configure
33
+ +++ b/configure
34
+ @@ -1050,6 +1050,7 @@ test_nvcc(){
35
+ tmpo_=$TMPO
36
+ [ -x "$(command -v cygpath)" ] && tmpcu_=$(cygpath -m $tmpcu_) && tmpo_=$(cygpath -m $tmpo_)
37
+ test_cmd $nvcc $nvccflags "$@" $NVCC_C $(nvcc_o $tmpo_) $tmpcu_
38
+ + test_cmd xxd
39
+ }
40
+
41
+ check_nvcc() {
42
+ --
43
+ 2.26.2.windows.1
44
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0018-libaom-Dont-use-aom_codec_av1_dx_algo.patch ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 6ff9f56f2b0bface43c6b0810cfda458695600f3 Mon Sep 17 00:00:00 2001
2
+ From: Matt Oliver <[email protected]>
3
+ Date: Wed, 20 Oct 2021 06:55:48 +1100
4
+ Subject: [PATCH] libaom: Dont use aom_codec_av1_dx_algo.
5
+
6
+ This fixes linking errors where variables cannot be correctly linked in from an external shared library such as with msvc.
7
+ ---
8
+ libavcodec/libaomdec.c | 2 +-
9
+ 1 file changed, 1 insertion(+), 1 deletion(-)
10
+
11
+ diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c
12
+ index 75ecc08970..d6b822fda2 100644
13
+ --- a/libavcodec/libaomdec.c
14
+ +++ b/libavcodec/libaomdec.c
15
+ @@ -223,7 +223,7 @@ static av_cold int aom_free(AVCodecContext *avctx)
16
+
17
+ static av_cold int av1_init(AVCodecContext *avctx)
18
+ {
19
+ - return aom_init(avctx, &aom_codec_av1_dx_algo);
20
+ + return aom_init(avctx, aom_codec_av1_dx());
21
+ }
22
+
23
+ AVCodec ff_libaom_av1_decoder = {
24
+ --
25
+ 2.33.1.windows.1
26
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/0019-libx264-Do-not-explicitly-set-X264_API_IMPORTS.patch ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From d5fca748d76602a912590b64022560283db6fae6 Mon Sep 17 00:00:00 2001
2
+ From: Matt Oliver <[email protected]>
3
+ Date: Sat, 30 Oct 2021 14:09:29 +1100
4
+ Subject: [PATCH] libx264: Do not explicitly set X264_API_IMPORTS
5
+
6
+ ---
7
+ configure | 8 +++-----
8
+ libavcodec/libx264.c | 4 ----
9
+ 2 files changed, 3 insertions(+), 9 deletions(-)
10
+
11
+ diff --git a/configure b/configure
12
+ index ede8f9777b..b35728aace 100755
13
+ --- a/configure
14
+ +++ b/configure
15
+ @@ -6535,11 +6535,8 @@ enabled libvpx && {
16
+ enabled libwebp && {
17
+ enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
18
+ enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
19
+ -enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode ||
20
+ - { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs -ldl" &&
21
+ - warn "using libx264 without pkg-config"; } } &&
22
+ - require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
23
+ - check_cpp_condition libx262 x264.h "X264_MPEG2"
24
+ +enabled libx264 && check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode &&
25
+ + require_cpp_condition libx264 x264.h "X264_BUILD >= 158"
26
+ enabled libx265 && { check_pkg_config libx265 x265 x265.h x265_api_get ||
27
+ { { check_lib libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++ -lgcc_s -lgcc -lrt -lnuma" ||
28
+ require libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++"; } &&
29
+ diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
30
+ index 21f434d06d..efbc9608c7 100644
31
+ --- a/libavcodec/libx264.c
32
+ +++ b/libavcodec/libx264.c
33
+ @@ -34,10 +34,6 @@
34
+ #include "packet_internal.h"
35
+ #include "atsc_a53.h"
36
+
37
+ -#if defined(_MSC_VER)
38
+ -#define X264_API_IMPORTS 1
39
+ -#endif
40
+ -
41
+ #include <x264.h>
42
+ #include <float.h>
43
+ #include <math.h>
44
+ --
45
+ 2.33.1.windows.1
46
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/FindFFMPEG.cmake.in ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Distributed under the OSI-approved BSD 3-Clause License.
2
+ #
3
+ #.rst:
4
+ # FindFFMPEG
5
+ # --------
6
+ #
7
+ # Find the FFPMEG libraries
8
+ #
9
+ # Result Variables
10
+ # ^^^^^^^^^^^^^^^^
11
+ #
12
+ # The following variables will be defined:
13
+ #
14
+ # ``FFMPEG_FOUND``
15
+ # True if FFMPEG found on the local system
16
+ #
17
+ # ``FFMPEG_INCLUDE_DIRS``
18
+ # Location of FFMPEG header files
19
+ #
20
+ # ``FFMPEG_LIBRARY_DIRS``
21
+ # Location of FFMPEG libraries
22
+ #
23
+ # ``FFMPEG_LIBRARIES``
24
+ # List of the FFMPEG libraries found
25
+ #
26
+ #
27
+
28
+ include(FindPackageHandleStandardArgs)
29
+ include(SelectLibraryConfigurations)
30
+ include(CMakeFindDependencyMacro)
31
+
32
+ if(NOT FFMPEG_FOUND)
33
+
34
+ # Compute the installation path relative to this file.
35
+ get_filename_component(SEARCH_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
36
+ get_filename_component(SEARCH_PATH "${SEARCH_PATH}" PATH)
37
+ get_filename_component(SEARCH_PATH "${SEARCH_PATH}" PATH)
38
+ if(SEARCH_PATH STREQUAL "/")
39
+ set(SEARCH_PATH "")
40
+ endif()
41
+
42
+ set(FFMPEG_VERSION "@FFMPEG_VERSION@")
43
+
44
+ function(append_dependencies out)
45
+ cmake_parse_arguments(PARSE_ARGV 1 "arg" "DEBUG" "NAMES" "")
46
+ if(${arg_DEBUG})
47
+ set(config DEBUG)
48
+ set(path "${CURRENT_INSTALLED_DIR}/debug/lib/")
49
+ else()
50
+ set(config RELEASE)
51
+ set(path "${CURRENT_INSTALLED_DIR}/lib/")
52
+ endif()
53
+ foreach(lib_name ${arg_NAMES})
54
+ if("${lib_name}" STREQUAL "-pthread")
55
+ list(APPEND ${out} "-pthread")
56
+ elseif("${lib_name}" STREQUAL "-pthreads")
57
+ list(APPEND ${out} "-pthreads")
58
+ elseif("${lib_name}" STREQUAL "gcc")
59
+ list(APPEND ${out} "-lgcc")
60
+ elseif("${lib_name}" STREQUAL "gcc_s")
61
+ list(APPEND ${out} "-lgcc_s")
62
+ elseif("${lib_name}" STREQUAL "stdc++")
63
+ list(APPEND ${out} "-lstdc++")
64
+ else()
65
+ # first look in ${path} specifically to ensure we find the right release/debug variant
66
+ find_library(FFMPEG_DEPENDENCY_${lib_name}_${config} NAMES "${lib_name}" PATHS "${path}" NO_DEFAULT_PATH)
67
+ # if not found there, must be a system dependency, so look elsewhere
68
+ find_library(FFMPEG_DEPENDENCY_${lib_name}_${config} NAMES "${lib_name}" REQUIRED)
69
+ list(APPEND ${out} "${FFMPEG_DEPENDENCY_${lib_name}_${config}}")
70
+ endif()
71
+ endforeach()
72
+ set("${out}" "${${out}}" PARENT_SCOPE)
73
+ endfunction()
74
+
75
+ macro(FFMPEG_FIND varname shortname headername)
76
+ if(NOT FFMPEG_${varname}_INCLUDE_DIRS)
77
+ find_path(FFMPEG_${varname}_INCLUDE_DIRS NAMES lib${shortname}/${headername} ${headername} PATHS ${SEARCH_PATH}/include NO_DEFAULT_PATH)
78
+ endif()
79
+ if(NOT FFMPEG_${varname}_LIBRARY)
80
+ find_library(FFMPEG_${varname}_LIBRARY_RELEASE NAMES ${shortname} PATHS ${SEARCH_PATH}/lib/ NO_DEFAULT_PATH)
81
+ find_library(FFMPEG_${varname}_LIBRARY_DEBUG NAMES ${shortname}d ${shortname} PATHS ${SEARCH_PATH}/debug/lib/ NO_DEFAULT_PATH)
82
+ get_filename_component(FFMPEG_${varname}_LIBRARY_RELEASE_DIR ${FFMPEG_${varname}_LIBRARY_RELEASE} DIRECTORY)
83
+ get_filename_component(FFMPEG_${varname}_LIBRARY_DEBUG_DIR ${FFMPEG_${varname}_LIBRARY_DEBUG} DIRECTORY)
84
+ select_library_configurations(FFMPEG_${varname})
85
+ set(FFMPEG_${varname}_LIBRARY ${FFMPEG_${varname}_LIBRARY} CACHE STRING "")
86
+ endif()
87
+ if (FFMPEG_${varname}_LIBRARY AND FFMPEG_${varname}_INCLUDE_DIRS)
88
+ set(FFMPEG_${varname}_FOUND TRUE BOOL)
89
+ list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_${varname}_INCLUDE_DIRS})
90
+ list(APPEND FFMPEG_LIBRARIES ${FFMPEG_${varname}_LIBRARY})
91
+ list(APPEND FFMPEG_LIBRARY_DIRS ${FFMPEG_${varname}_LIBRARY_RELEASE_DIR} ${FFMPEG_${varname}_LIBRARY_DEBUG_DIR})
92
+ endif()
93
+ endmacro(FFMPEG_FIND)
94
+
95
+ if(@ENABLE_AVDEVICE@)
96
+ FFMPEG_FIND(libavdevice avdevice avdevice.h)
97
+ endif()
98
+ if(@ENABLE_AVFILTER@)
99
+ FFMPEG_FIND(libavfilter avfilter avfilter.h)
100
+ endif()
101
+ if(@ENABLE_AVFORMAT@)
102
+ FFMPEG_FIND(libavformat avformat avformat.h)
103
+ endif()
104
+ if(@ENABLE_AVCODEC@)
105
+ FFMPEG_FIND(libavcodec avcodec avcodec.h)
106
+ endif()
107
+ if(@ENABLE_AVRESAMPLE@)
108
+ FFMPEG_FIND(libavresample avresample avresample.h)
109
+ endif()
110
+ if(@ENABLE_POSTPROC@)
111
+ FFMPEG_FIND(libpostproc postproc postprocess.h)
112
+ endif()
113
+ if(@ENABLE_SWRESAMPLE@)
114
+ FFMPEG_FIND(libswresample swresample swresample.h)
115
+ endif()
116
+ if(@ENABLE_SWSCALE@)
117
+ FFMPEG_FIND(libswscale swscale swscale.h)
118
+ endif()
119
+ FFMPEG_FIND(libavutil avutil avutil.h)
120
+
121
+ if (FFMPEG_libavutil_FOUND)
122
+ list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
123
+ list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS)
124
+ set(FFMPEG_libavutil_VERSION "@LIBAVUTIL_VERSION@" CACHE STRING "")
125
+
126
+ if(FFMPEG_libavcodec_FOUND)
127
+ set(FFMPEG_libavcodec_VERSION "@LIBAVCODEC_VERSION@" CACHE STRING "")
128
+ endif()
129
+ if(FFMPEG_libavdevice_FOUND)
130
+ set(FFMPEG_libavdevice_VERSION "@LIBAVDEVICE_VERSION@" CACHE STRING "")
131
+ endif()
132
+ if(FFMPEG_libavfilter_FOUND)
133
+ set(FFMPEG_libavfilter_VERSION "@LIBAVFILTER_VERSION@" CACHE STRING "")
134
+ endif()
135
+ if(FFMPEG_libavformat_FOUND)
136
+ set(FFMPEG_libavformat_VERSION "@LIBAVFORMAT_VERSION@" CACHE STRING "")
137
+ endif()
138
+ if(FFMPEG_libavresample_FOUND)
139
+ set(FFMPEG_libavresample_VERSION "@LIBAVRESAMPLE_VERSION@" CACHE STRING "")
140
+ endif()
141
+ if(FFMPEG_libswresample_FOUND)
142
+ set(FFMPEG_libswresample_VERSION "@LIBSWRESAMPLE_VERSION@" CACHE STRING "")
143
+ endif()
144
+ if(FFMPEG_libswscale_FOUND)
145
+ set(FFMPEG_libswscale_VERSION "@LIBSWSCALE_VERSION@" CACHE STRING "")
146
+ endif()
147
+
148
+ append_dependencies(FFMPEG_DEPS_LIBRARY_RELEASE NAMES "@FFMPEG_DEPENDENCIES_RELEASE@")
149
+ append_dependencies(FFMPEG_DEPS_LIBRARY_DEBUG NAMES "@FFMPEG_DEPENDENCIES_DEBUG@" DEBUG)
150
+ if(FFMPEG_DEPS_LIBRARY_RELEASE OR FFMPEG_DEPS_LIBRARY_DEBUG)
151
+ select_library_configurations(FFMPEG_DEPS)
152
+ list(APPEND FFMPEG_LIBRARIES ${FFMPEG_DEPS_LIBRARY})
153
+ endif()
154
+
155
+ set(FFMPEG_LIBRARY ${FFMPEG_LIBRARIES})
156
+
157
+ set(FFMPEG_FOUND TRUE CACHE BOOL "")
158
+ set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "")
159
+ set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "")
160
+ set(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBRARY_DIRS} CACHE STRING "")
161
+ endif()
162
+
163
+ find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_LIBRARY_DIRS FFMPEG_INCLUDE_DIRS)
164
+
165
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/build.sh.in ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ export PATH="/usr/bin:$PATH"
6
+
7
+ command -v cygpath >/dev/null && have_cygpath=1
8
+
9
+ cygpath() {
10
+ if [ -n "$have_cygpath" ]; then
11
+ command cygpath "$@"
12
+ else
13
+ eval _p='$'$#
14
+ printf '%s\n' "$_p"
15
+ fi
16
+ }
17
+
18
+ move_binary() {
19
+ SOURCE=$1
20
+ TARGET=$2
21
+ BINARY=$3
22
+
23
+ # run lipo over the command to check whether it really
24
+ # is a binary that we need to merge architectures
25
+ lipo $SOURCE/$BINARY -info &> /dev/null || return 0
26
+
27
+ # get the directory name the file is in
28
+ DIRNAME=$(dirname $BINARY)
29
+
30
+ # ensure the directory to move the binary to exists
31
+ mkdir -p $TARGET/$DIRNAME
32
+
33
+ # now finally move the binary
34
+ mv $SOURCE/$BINARY $TARGET/$BINARY
35
+ }
36
+
37
+ move_binaries() {
38
+ SOURCE=$1
39
+ TARGET=$2
40
+
41
+ [ ! -d $SOURCE ] && return 0
42
+ pushd $SOURCE
43
+
44
+ for BINARY in $(find . -type f); do
45
+ move_binary $SOURCE $TARGET $BINARY
46
+ done
47
+
48
+ popd
49
+ }
50
+
51
+ merge_binaries() {
52
+ TARGET=$1
53
+ SOURCE=$2
54
+
55
+ shift
56
+ shift
57
+
58
+ pushd $SOURCE/$1
59
+ BINARIES=$(find . -type f)
60
+ popd
61
+
62
+ for BINARY in $BINARIES; do
63
+ COMMAND="lipo -create -output $TARGET/$BINARY"
64
+
65
+ for ARCH in $@; do
66
+ COMMAND="$COMMAND -arch $ARCH $SOURCE/$ARCH/$BINARY"
67
+ done
68
+
69
+ $($COMMAND)
70
+ done
71
+ }
72
+
73
+ export PKG_CONFIG_PATH="$(cygpath -p "${PKG_CONFIG_PATH}")"
74
+
75
+ # Export HTTP(S)_PROXY as http(s)_proxy:
76
+ [ -n "$HTTP_PROXY" ] && export http_proxy="$HTTP_PROXY"
77
+ [ -n "$HTTPS_PROXY" ] && export https_proxy="$HTTPS_PROXY"
78
+
79
+ PATH_TO_BUILD_DIR=$( cygpath "@BUILD_DIR@")
80
+ PATH_TO_SRC_DIR=$( cygpath "@SOURCE_PATH@")
81
+ PATH_TO_PACKAGE_DIR=$(cygpath "@INST_PREFIX@")
82
+
83
+ JOBS=@VCPKG_CONCURRENCY@
84
+
85
+ OSX_ARCHS="@OSX_ARCHS@"
86
+ OSX_ARCH_COUNT=0@OSX_ARCH_COUNT@
87
+
88
+ # Default to hardware concurrency if unset.
89
+ : ${JOBS:=$(nproc)}
90
+
91
+ build_ffmpeg() {
92
+ echo "=== CONFIGURING ==="
93
+
94
+ sh "$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" "--cc=$CC" @CONFIGURE_OPTIONS@ $@
95
+
96
+ echo "=== BUILDING ==="
97
+
98
+ make -j${JOBS} V=1
99
+
100
+ echo "=== INSTALLING ==="
101
+
102
+ make install
103
+ }
104
+
105
+ cd "$PATH_TO_BUILD_DIR"
106
+
107
+ if [ $OSX_ARCH_COUNT -gt 1 ]; then
108
+ for ARCH in $OSX_ARCHS; do
109
+ echo "=== CLEANING FOR $ARCH ==="
110
+
111
+ make clean && make distclean
112
+
113
+ build_ffmpeg --enable-cross-compile --arch=$ARCH --extra-cflags=-arch --extra-cflags=$ARCH --extra-ldflags=-arch --extra-ldflags=$ARCH
114
+
115
+ echo "=== COLLECTING BINARIES FOR $ARCH ==="
116
+
117
+ move_binaries $PATH_TO_PACKAGE_DIR/lib $PATH_TO_BUILD_DIR/stage/$ARCH/lib
118
+ move_binaries $PATH_TO_PACKAGE_DIR/bin $PATH_TO_BUILD_DIR/stage/$ARCH/bin
119
+ done
120
+
121
+ echo "=== MERGING ARCHITECTURES ==="
122
+
123
+ merge_binaries $PATH_TO_PACKAGE_DIR $PATH_TO_BUILD_DIR/stage $OSX_ARCHS
124
+ else
125
+ build_ffmpeg
126
+ fi
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/portfile.cmake ADDED
@@ -0,0 +1,810 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(VCPKG_TARGET_IS_WINDOWS)
2
+ set(PATCHES 0017-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch) # https://trac.ffmpeg.org/ticket/9019
3
+ endif()
4
+ vcpkg_from_github(
5
+ OUT_SOURCE_PATH SOURCE_PATH
6
+ REPO ffmpeg/ffmpeg
7
+ REF n4.4.1
8
+ SHA512 a53e617937f9892c5cfddb00896be9ad8a3e398dc7cf3b6c893b52ff38aff6ff0cbc61a44cd5f93d9a28f775e71ae82996a5e2b699a769c1de8f882aab34c797
9
+ HEAD_REF master
10
+ PATCHES
11
+ 0001-create-lib-libraries.patch
12
+ 0003-fix-windowsinclude.patch
13
+ 0004-fix-debug-build.patch
14
+ 0006-fix-StaticFeatures.patch
15
+ 0007-fix-lib-naming.patch
16
+ 0009-Fix-fdk-detection.patch
17
+ 0010-Fix-x264-detection.patch
18
+ 0011-Fix-x265-detection.patch
19
+ 0012-Fix-ssl-110-detection.patch
20
+ 0013-define-WINVER.patch
21
+ 0014-avfilter-dependency-fix.patch # https://ffmpeg.org/pipermail/ffmpeg-devel/2021-February/275819.html
22
+ 0015-Fix-xml2-detection.patch
23
+ 0016-configure-dnn-needs-avformat.patch # https://ffmpeg.org/pipermail/ffmpeg-devel/2021-May/279926.html
24
+ ${PATCHES}
25
+ 0018-libaom-Dont-use-aom_codec_av1_dx_algo.patch
26
+ 0019-libx264-Do-not-explicitly-set-X264_API_IMPORTS.patch
27
+ )
28
+
29
+ if (SOURCE_PATH MATCHES " ")
30
+ message(FATAL_ERROR "Error: ffmpeg will not build with spaces in the path. Please use a directory with no spaces")
31
+ endif()
32
+
33
+
34
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
35
+ # ffmpeg nasm build gives link error on x86, so fall back to yasm
36
+ vcpkg_find_acquire_program(YASM)
37
+ get_filename_component(YASM_EXE_PATH "${YASM}" DIRECTORY)
38
+ vcpkg_add_to_path("${YASM_EXE_PATH}")
39
+ else()
40
+ vcpkg_find_acquire_program(NASM)
41
+ get_filename_component(NASM_EXE_PATH "${NASM}" DIRECTORY)
42
+ vcpkg_add_to_path("${NASM_EXE_PATH}")
43
+ endif()
44
+
45
+ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
46
+ #We're assuming that if we're building for Windows we're using MSVC
47
+ set(INCLUDE_VAR "INCLUDE")
48
+ set(LIB_PATH_VAR "LIB")
49
+ else()
50
+ set(INCLUDE_VAR "CPATH")
51
+ set(LIB_PATH_VAR "LIBRARY_PATH")
52
+ endif()
53
+
54
+ set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect")
55
+
56
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
57
+ set(OPTIONS "${OPTIONS} --disable-asm --disable-x86asm")
58
+ endif()
59
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
60
+ set(OPTIONS "${OPTIONS} --enable-asm --disable-x86asm")
61
+ endif()
62
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
63
+ set(OPTIONS "${OPTIONS} --enable-asm --enable-x86asm")
64
+ endif()
65
+
66
+ if(VCPKG_TARGET_IS_WINDOWS)
67
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
68
+ vcpkg_acquire_msys(MSYS_ROOT
69
+ DIRECT_PACKAGES
70
+ # Required for "cpp.exe" preprocessor
71
+ "https://repo.msys2.org/msys/x86_64/gcc-9.3.0-1-x86_64.pkg.tar.xz"
72
+ 76af0192a092278e6b26814b2d92815a2c519902a3fec056b057faec19623b1770ac928a59a39402db23cfc23b0d7601b7f88b367b27269361748c69d08654b2
73
+ "https://repo.msys2.org/msys/x86_64/isl-0.22.1-1-x86_64.pkg.tar.xz"
74
+ f4db50d00bad0fa0abc6b9ad965b0262d936d437a9faa35308fa79a7ee500a474178120e487b2db2259caf51524320f619e18d92acf4f0b970b5cbe5cc0f63a2
75
+ "https://repo.msys2.org/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz"
76
+ b607da40d3388b440f2a09e154f21966cd55ad77e02d47805f78a9dee5de40226225bf0b8335fdfd4b83f25ead3098e9cb974d4f202f28827f8468e30e3b790d
77
+ "https://repo.msys2.org/msys/x86_64/mpc-1.1.0-1-x86_64.pkg.tar.xz"
78
+ 7d0715c41c27fdbf91e6dcc73d6b8c02ee62c252e027f0a17fa4bfb974be8a74d8e3a327ef31c2460721902299ef69a7ef3c7fce52c8f02ce1cb47f0b6e073e9
79
+ "https://repo.msys2.org/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst"
80
+ d64fa60e188124591d41fc097d7eb51d7ea4940bac05cdcf5eafde951ed1eaa174468f5ede03e61106e1633e3428964b34c96de76321ed8853b398fbe8c4d072
81
+ "https://repo.msys2.org/msys/x86_64/gmp-6.2.0-1-x86_64.pkg.tar.xz"
82
+ 1389a443e775bb255d905665dd577bef7ed71d51a8c24d118097f8119c08c4dfe67505e88ddd1e9a3764dd1d50ed8b84fa34abefa797d257e90586f0cbf54de8
83
+ )
84
+ else()
85
+ vcpkg_acquire_msys(MSYS_ROOT)
86
+ endif()
87
+
88
+ set(SHELL "${MSYS_ROOT}/usr/bin/bash.exe")
89
+ else()
90
+ set(SHELL /bin/sh)
91
+ endif()
92
+
93
+ if(VCPKG_TARGET_IS_MINGW)
94
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
95
+ string(APPEND OPTIONS " --target-os=mingw32")
96
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
97
+ string(APPEND OPTIONS " --target-os=mingw64")
98
+ endif()
99
+ elseif(VCPKG_TARGET_IS_WINDOWS)
100
+ string(APPEND OPTIONS " --target-os=win32")
101
+ elseif(VCPKG_TARGET_IS_OSX)
102
+ string(APPEND OPTIONS " --target-os=darwin")
103
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android")
104
+ string(APPEND OPTIONS " --target-os=android")
105
+ else()
106
+ endif()
107
+
108
+ vcpkg_cmake_get_vars(cmake_vars_file)
109
+ include("${cmake_vars_file}")
110
+
111
+ if(VCPKG_DETECTED_MSVC)
112
+ set(OPTIONS "--toolchain=msvc ${OPTIONS}")
113
+ # This is required because ffmpeg depends upon optimizations to link correctly
114
+ string(APPEND VCPKG_COMBINED_C_FLAGS_DEBUG " -O2")
115
+ string(REGEX REPLACE "(^| )-RTC1( |$)" " " VCPKG_COMBINED_C_FLAGS_DEBUG "${VCPKG_COMBINED_C_FLAGS_DEBUG}")
116
+ string(REGEX REPLACE "(^| )-Od( |$)" " " VCPKG_COMBINED_C_FLAGS_DEBUG "${VCPKG_COMBINED_C_FLAGS_DEBUG}")
117
+ string(REGEX REPLACE "(^| )-Ob0( |$)" " " VCPKG_COMBINED_C_FLAGS_DEBUG "${VCPKG_COMBINED_C_FLAGS_DEBUG}")
118
+ endif()
119
+
120
+ string(APPEND VCPKG_COMBINED_C_FLAGS_DEBUG " -I \"${CURRENT_INSTALLED_DIR}/include\"")
121
+ string(APPEND VCPKG_COMBINED_C_FLAGS_RELEASE " -I \"${CURRENT_INSTALLED_DIR}/include\"")
122
+
123
+ set(_csc_PROJECT_PATH ffmpeg)
124
+
125
+ file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
126
+
127
+ set(FFMPEG_PKGCONFIG_MODULES libavutil)
128
+
129
+ if("nonfree" IN_LIST FEATURES)
130
+ set(OPTIONS "${OPTIONS} --enable-nonfree")
131
+ endif()
132
+
133
+ if("gpl" IN_LIST FEATURES)
134
+ set(OPTIONS "${OPTIONS} --enable-gpl")
135
+ endif()
136
+
137
+ if("version3" IN_LIST FEATURES)
138
+ set(OPTIONS "${OPTIONS} --enable-version3")
139
+ endif()
140
+
141
+ if("ffmpeg" IN_LIST FEATURES)
142
+ set(OPTIONS "${OPTIONS} --enable-ffmpeg")
143
+ else()
144
+ set(OPTIONS "${OPTIONS} --disable-ffmpeg")
145
+ endif()
146
+
147
+ if("ffplay" IN_LIST FEATURES)
148
+ set(OPTIONS "${OPTIONS} --enable-ffplay")
149
+ else()
150
+ set(OPTIONS "${OPTIONS} --disable-ffplay")
151
+ endif()
152
+
153
+ if("ffprobe" IN_LIST FEATURES)
154
+ set(OPTIONS "${OPTIONS} --enable-ffprobe")
155
+ else()
156
+ set(OPTIONS "${OPTIONS} --disable-ffprobe")
157
+ endif()
158
+
159
+ if (NOT "alsa" IN_LIST FEATURES)
160
+ set(OPTIONS "${OPTIONS} --disable-alsa")
161
+ endif()
162
+
163
+ if("avcodec" IN_LIST FEATURES)
164
+ set(OPTIONS "${OPTIONS} --enable-avcodec")
165
+ set(ENABLE_AVCODEC ON)
166
+ list(APPEND FFMPEG_PKGCONFIG_MODULES libavcodec)
167
+ else()
168
+ set(OPTIONS "${OPTIONS} --disable-avcodec")
169
+ set(ENABLE_AVCODEC OFF)
170
+ endif()
171
+
172
+ if("avdevice" IN_LIST FEATURES)
173
+ set(OPTIONS "${OPTIONS} --enable-avdevice")
174
+ set(ENABLE_AVDEVICE ON)
175
+ list(APPEND FFMPEG_PKGCONFIG_MODULES libavdevice)
176
+ else()
177
+ set(OPTIONS "${OPTIONS} --disable-avdevice")
178
+ set(ENABLE_AVDEVICE OFF)
179
+ endif()
180
+
181
+ if("avformat" IN_LIST FEATURES)
182
+ set(OPTIONS "${OPTIONS} --enable-avformat")
183
+ set(ENABLE_AVFORMAT ON)
184
+ list(APPEND FFMPEG_PKGCONFIG_MODULES libavformat)
185
+ else()
186
+ set(OPTIONS "${OPTIONS} --disable-avformat")
187
+ set(ENABLE_AVFORMAT OFF)
188
+ endif()
189
+
190
+ if("avfilter" IN_LIST FEATURES)
191
+ set(OPTIONS "${OPTIONS} --enable-avfilter")
192
+ set(ENABLE_AVFILTER ON)
193
+ list(APPEND FFMPEG_PKGCONFIG_MODULES libavfilter)
194
+ else()
195
+ set(OPTIONS "${OPTIONS} --disable-avfilter")
196
+ set(ENABLE_AVFILTER OFF)
197
+ endif()
198
+
199
+ if("postproc" IN_LIST FEATURES)
200
+ set(OPTIONS "${OPTIONS} --enable-postproc")
201
+ set(ENABLE_POSTPROC ON)
202
+ list(APPEND FFMPEG_PKGCONFIG_MODULES libpostproc)
203
+ else()
204
+ set(OPTIONS "${OPTIONS} --disable-postproc")
205
+ set(ENABLE_POSTPROC OFF)
206
+ endif()
207
+
208
+ if("swresample" IN_LIST FEATURES)
209
+ set(OPTIONS "${OPTIONS} --enable-swresample")
210
+ set(ENABLE_SWRESAMPLE ON)
211
+ list(APPEND FFMPEG_PKGCONFIG_MODULES libswresample)
212
+ else()
213
+ set(OPTIONS "${OPTIONS} --disable-swresample")
214
+ set(ENABLE_SWRESAMPLE OFF)
215
+ endif()
216
+
217
+ if("swscale" IN_LIST FEATURES)
218
+ set(OPTIONS "${OPTIONS} --enable-swscale")
219
+ set(ENABLE_SWSCALE ON)
220
+ list(APPEND FFMPEG_PKGCONFIG_MODULES libswscale)
221
+ else()
222
+ set(OPTIONS "${OPTIONS} --disable-swscale")
223
+ set(ENABLE_SWSCALE OFF)
224
+ endif()
225
+
226
+ set(ENABLE_AVRESAMPLE OFF)
227
+ if("avresample" IN_LIST FEATURES)
228
+ set(OPTIONS "${OPTIONS} --enable-avresample")
229
+ set(ENABLE_AVRESAMPLE ON)
230
+ list(APPEND FFMPEG_PKGCONFIG_MODULES libavresample)
231
+ endif()
232
+
233
+ set(STATIC_LINKAGE OFF)
234
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
235
+ set(STATIC_LINKAGE ON)
236
+ endif()
237
+
238
+ if("aom" IN_LIST FEATURES)
239
+ set(OPTIONS "${OPTIONS} --enable-libaom")
240
+ else()
241
+ set(OPTIONS "${OPTIONS} --disable-libaom")
242
+ endif()
243
+
244
+ if("ass" IN_LIST FEATURES)
245
+ set(OPTIONS "${OPTIONS} --enable-libass")
246
+ else()
247
+ set(OPTIONS "${OPTIONS} --disable-libass")
248
+ endif()
249
+
250
+ if("avisynthplus" IN_LIST FEATURES)
251
+ set(OPTIONS "${OPTIONS} --enable-avisynth")
252
+ else()
253
+ set(OPTIONS "${OPTIONS} --disable-avisynth")
254
+ endif()
255
+
256
+ if("bzip2" IN_LIST FEATURES)
257
+ set(OPTIONS "${OPTIONS} --enable-bzlib")
258
+ else()
259
+ set(OPTIONS "${OPTIONS} --disable-bzlib")
260
+ endif()
261
+
262
+ if("dav1d" IN_LIST FEATURES)
263
+ set(OPTIONS "${OPTIONS} --enable-libdav1d")
264
+ else()
265
+ set(OPTIONS "${OPTIONS} --disable-libdav1d")
266
+ endif()
267
+
268
+ if("fdk-aac" IN_LIST FEATURES)
269
+ set(OPTIONS "${OPTIONS} --enable-libfdk-aac")
270
+ else()
271
+ set(OPTIONS "${OPTIONS} --disable-libfdk-aac")
272
+ endif()
273
+
274
+ if("fontconfig" IN_LIST FEATURES)
275
+ set(OPTIONS "${OPTIONS} --enable-libfontconfig")
276
+ else()
277
+ set(OPTIONS "${OPTIONS} --disable-libfontconfig")
278
+ endif()
279
+
280
+ if("freetype" IN_LIST FEATURES)
281
+ set(OPTIONS "${OPTIONS} --enable-libfreetype")
282
+ else()
283
+ set(OPTIONS "${OPTIONS} --disable-libfreetype")
284
+ endif()
285
+
286
+ if("fribidi" IN_LIST FEATURES)
287
+ set(OPTIONS "${OPTIONS} --enable-libfribidi")
288
+ else()
289
+ set(OPTIONS "${OPTIONS} --disable-libfribidi")
290
+ endif()
291
+
292
+ if("iconv" IN_LIST FEATURES)
293
+ set(OPTIONS "${OPTIONS} --enable-iconv")
294
+ else()
295
+ set(OPTIONS "${OPTIONS} --disable-iconv")
296
+ endif()
297
+
298
+ if("ilbc" IN_LIST FEATURES)
299
+ set(OPTIONS "${OPTIONS} --enable-libilbc")
300
+ else()
301
+ set(OPTIONS "${OPTIONS} --disable-libilbc")
302
+ endif()
303
+
304
+ if("lzma" IN_LIST FEATURES)
305
+ set(OPTIONS "${OPTIONS} --enable-lzma")
306
+ else()
307
+ set(OPTIONS "${OPTIONS} --disable-lzma")
308
+ endif()
309
+
310
+ if("mp3lame" IN_LIST FEATURES)
311
+ set(OPTIONS "${OPTIONS} --enable-libmp3lame")
312
+ else()
313
+ set(OPTIONS "${OPTIONS} --disable-libmp3lame")
314
+ endif()
315
+
316
+ if("modplug" IN_LIST FEATURES)
317
+ set(OPTIONS "${OPTIONS} --enable-libmodplug")
318
+ else()
319
+ set(OPTIONS "${OPTIONS} --disable-libmodplug")
320
+ endif()
321
+
322
+ if("nvcodec" IN_LIST FEATURES)
323
+ #Note: the --enable-cuda option does not actually require the cuda sdk or toolset port dependency as ffmpeg uses runtime detection and dynamic loading
324
+ set(OPTIONS "${OPTIONS} --enable-cuda --enable-nvenc --enable-nvdec --enable-cuvid --enable-ffnvcodec")
325
+ else()
326
+ set(OPTIONS "${OPTIONS} --disable-cuda --disable-nvenc --disable-nvdec --disable-cuvid --disable-ffnvcodec")
327
+ endif()
328
+
329
+ if("opencl" IN_LIST FEATURES)
330
+ set(OPTIONS "${OPTIONS} --enable-opencl")
331
+ else()
332
+ set(OPTIONS "${OPTIONS} --disable-opencl")
333
+ endif()
334
+
335
+ if("opengl" IN_LIST FEATURES)
336
+ set(OPTIONS "${OPTIONS} --enable-opengl")
337
+ else()
338
+ set(OPTIONS "${OPTIONS} --disable-opengl")
339
+ endif()
340
+
341
+ if("openh264" IN_LIST FEATURES)
342
+ set(OPTIONS "${OPTIONS} --enable-libopenh264")
343
+ else()
344
+ set(OPTIONS "${OPTIONS} --disable-libopenh264")
345
+ endif()
346
+
347
+ if("openjpeg" IN_LIST FEATURES)
348
+ set(OPTIONS "${OPTIONS} --enable-libopenjpeg")
349
+ else()
350
+ set(OPTIONS "${OPTIONS} --disable-libopenjpeg")
351
+ endif()
352
+
353
+ if("openssl" IN_LIST FEATURES)
354
+ set(OPTIONS "${OPTIONS} --enable-openssl")
355
+ else()
356
+ set(OPTIONS "${OPTIONS} --disable-openssl")
357
+ endif()
358
+
359
+ if("opus" IN_LIST FEATURES)
360
+ set(OPTIONS "${OPTIONS} --enable-libopus")
361
+ else()
362
+ set(OPTIONS "${OPTIONS} --disable-libopus")
363
+ endif()
364
+
365
+ if("sdl2" IN_LIST FEATURES)
366
+ set(OPTIONS "${OPTIONS} --enable-sdl2")
367
+ else()
368
+ set(OPTIONS "${OPTIONS} --disable-sdl2")
369
+ endif()
370
+
371
+ if("snappy" IN_LIST FEATURES)
372
+ set(OPTIONS "${OPTIONS} --enable-libsnappy")
373
+ else()
374
+ set(OPTIONS "${OPTIONS} --disable-libsnappy")
375
+ endif()
376
+
377
+ if("soxr" IN_LIST FEATURES)
378
+ set(OPTIONS "${OPTIONS} --enable-libsoxr")
379
+ else()
380
+ set(OPTIONS "${OPTIONS} --disable-libsoxr")
381
+ endif()
382
+
383
+ if("speex" IN_LIST FEATURES)
384
+ set(OPTIONS "${OPTIONS} --enable-libspeex")
385
+ else()
386
+ set(OPTIONS "${OPTIONS} --disable-libspeex")
387
+ endif()
388
+
389
+ if("ssh" IN_LIST FEATURES)
390
+ set(OPTIONS "${OPTIONS} --enable-libssh")
391
+ else()
392
+ set(OPTIONS "${OPTIONS} --disable-libssh")
393
+ endif()
394
+
395
+ if("tensorflow" IN_LIST FEATURES)
396
+ set(OPTIONS "${OPTIONS} --enable-libtensorflow")
397
+ else()
398
+ set(OPTIONS "${OPTIONS} --disable-libtensorflow")
399
+ endif()
400
+
401
+ if("tesseract" IN_LIST FEATURES)
402
+ set(OPTIONS "${OPTIONS} --enable-libtesseract")
403
+ else()
404
+ set(OPTIONS "${OPTIONS} --disable-libtesseract")
405
+ endif()
406
+
407
+ if("theora" IN_LIST FEATURES)
408
+ set(OPTIONS "${OPTIONS} --enable-libtheora")
409
+ else()
410
+ set(OPTIONS "${OPTIONS} --disable-libtheora")
411
+ endif()
412
+
413
+ if("vorbis" IN_LIST FEATURES)
414
+ set(OPTIONS "${OPTIONS} --enable-libvorbis")
415
+ else()
416
+ set(OPTIONS "${OPTIONS} --disable-libvorbis")
417
+ endif()
418
+
419
+ if("vpx" IN_LIST FEATURES)
420
+ set(OPTIONS "${OPTIONS} --enable-libvpx")
421
+ else()
422
+ set(OPTIONS "${OPTIONS} --disable-libvpx")
423
+ endif()
424
+
425
+ if("webp" IN_LIST FEATURES)
426
+ set(OPTIONS "${OPTIONS} --enable-libwebp")
427
+ else()
428
+ set(OPTIONS "${OPTIONS} --disable-libwebp")
429
+ endif()
430
+
431
+ if("x264" IN_LIST FEATURES)
432
+ set(OPTIONS "${OPTIONS} --enable-libx264")
433
+ else()
434
+ set(OPTIONS "${OPTIONS} --disable-libx264")
435
+ endif()
436
+
437
+ if("x265" IN_LIST FEATURES)
438
+ set(OPTIONS "${OPTIONS} --enable-libx265")
439
+ else()
440
+ set(OPTIONS "${OPTIONS} --disable-libx265")
441
+ endif()
442
+
443
+ if("xml2" IN_LIST FEATURES)
444
+ set(OPTIONS "${OPTIONS} --enable-libxml2")
445
+ else()
446
+ set(OPTIONS "${OPTIONS} --disable-libxml2")
447
+ endif()
448
+
449
+ if("zlib" IN_LIST FEATURES)
450
+ set(OPTIONS "${OPTIONS} --enable-zlib")
451
+ else()
452
+ set(OPTIONS "${OPTIONS} --disable-zlib")
453
+ endif()
454
+
455
+ if (VCPKG_TARGET_IS_OSX)
456
+ set(OPTIONS "${OPTIONS} --disable-vdpau") # disable vdpau in OSX
457
+ endif()
458
+
459
+ set(OPTIONS_CROSS " --enable-cross-compile")
460
+
461
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
462
+ string(APPEND OPTIONS_CROSS " --arch=x86_64")
463
+ else()
464
+ string(APPEND OPTIONS_CROSS " --arch=${VCPKG_TARGET_ARCHITECTURE}")
465
+ endif()
466
+
467
+ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
468
+ if(VCPKG_TARGET_IS_WINDOWS)
469
+ vcpkg_find_acquire_program(GASPREPROCESSOR)
470
+ foreach(GAS_PATH ${GASPREPROCESSOR})
471
+ get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY)
472
+ set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${GAS_ITEM_PATH}")
473
+ endforeach(GAS_PATH)
474
+ endif()
475
+ endif()
476
+
477
+ if(VCPKG_TARGET_IS_UWP)
478
+ 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\\")
479
+ string(APPEND OPTIONS " --disable-programs")
480
+ string(APPEND OPTIONS " --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00")
481
+ string(APPEND OPTIONS " --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib")
482
+ endif()
483
+
484
+ # Note: --disable-optimizations can't be used due to https://ffmpeg.org/pipermail/libav-user/2013-March/003945.html
485
+ set(OPTIONS_DEBUG "--debug")
486
+ set(OPTIONS_RELEASE "")
487
+
488
+ set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}")
489
+
490
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
491
+ set(OPTIONS "${OPTIONS} --disable-static --enable-shared")
492
+ endif()
493
+
494
+ if(VCPKG_TARGET_IS_MINGW)
495
+ set(OPTIONS "${OPTIONS} --extra_cflags=-D_WIN32_WINNT=0x0601")
496
+ elseif(VCPKG_TARGET_IS_WINDOWS)
497
+ set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0")
498
+ endif()
499
+
500
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
501
+ set(OPTIONS "${OPTIONS} --pkg-config-flags=--static")
502
+ endif()
503
+
504
+ set(ENV_LIB_PATH "$ENV{${LIB_PATH_VAR}}")
505
+
506
+ get_filename_component(CC_path "${VCPKG_DETECTED_CMAKE_C_COMPILER}" DIRECTORY)
507
+ get_filename_component(CC_filename "${VCPKG_DETECTED_CMAKE_C_COMPILER}" NAME)
508
+ set(ENV{CC} "${CC_filename}")
509
+ if(CC_path)
510
+ vcpkg_add_to_path(PREPEND "${CC_path}")
511
+ endif()
512
+
513
+ message(STATUS "Building Options: ${OPTIONS}")
514
+
515
+ # Release build
516
+ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
517
+ message(STATUS "Building Release Options: ${OPTIONS_RELEASE}")
518
+ set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/lib${VCPKG_HOST_PATH_SEPARATOR}${ENV_LIB_PATH}")
519
+ set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig")
520
+ message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
521
+ file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
522
+ # We use response files here as the only known way to handle spaces in paths
523
+ set(crsp "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/cflags.rsp")
524
+ file(WRITE "${crsp}" "${VCPKG_COMBINED_C_FLAGS_RELEASE}")
525
+ set(ldrsp "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/ldflags.rsp")
526
+ file(WRITE "${ldrsp}" "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE}")
527
+ set(ENV{CFLAGS} "@${crsp}")
528
+ # All tools except the msvc arm{,64} assembler accept @... as response file syntax.
529
+ # For that assembler, there is no known way to pass in flags. We must hope that not passing flags will work acceptably.
530
+ if(NOT VCPKG_DETECTED_MSVC OR NOT VCPKG_TARGET_ARCHITECTURE MATCHES "^arm")
531
+ set(ENV{ASFLAGS} "@${crsp}")
532
+ endif()
533
+ set(ENV{LDFLAGS} "@${ldrsp}")
534
+
535
+ set(BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
536
+ set(CONFIGURE_OPTIONS "${OPTIONS} ${OPTIONS_RELEASE}")
537
+ set(INST_PREFIX "${CURRENT_PACKAGES_DIR}")
538
+
539
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY)
540
+
541
+ vcpkg_execute_required_process(
542
+ COMMAND "${SHELL}" ./build.sh
543
+ WORKING_DIRECTORY "${BUILD_DIR}"
544
+ LOGNAME "build-${TARGET_TRIPLET}-rel"
545
+ )
546
+ endif()
547
+
548
+ # Debug build
549
+ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
550
+ message(STATUS "Building Debug Options: ${OPTIONS_DEBUG}")
551
+ set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/debug/lib${VCPKG_HOST_PATH_SEPARATOR}${ENV_LIB_PATH}")
552
+ set(ENV{LDFLAGS} "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG}")
553
+ set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig")
554
+ message(STATUS "Building ${_csc_PROJECT_PATH} for Debug")
555
+ file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
556
+ set(crsp "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/cflags.rsp")
557
+ file(WRITE "${crsp}" "${VCPKG_COMBINED_C_FLAGS_DEBUG}")
558
+ set(ldrsp "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/ldflags.rsp")
559
+ file(WRITE "${ldrsp}" "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG}")
560
+ set(ENV{CFLAGS} "@${crsp}")
561
+ if(NOT VCPKG_DETECTED_MSVC OR NOT VCPKG_TARGET_ARCHITECTURE MATCHES "^arm")
562
+ set(ENV{ASFLAGS} "@${crsp}")
563
+ endif()
564
+ set(ENV{LDFLAGS} "@${ldrsp}")
565
+
566
+ set(BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
567
+ set(CONFIGURE_OPTIONS "${OPTIONS} ${OPTIONS_DEBUG}")
568
+ set(INST_PREFIX "${CURRENT_PACKAGES_DIR}/debug")
569
+
570
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY)
571
+
572
+ vcpkg_execute_required_process(
573
+ COMMAND "${SHELL}" ./build.sh
574
+ WORKING_DIRECTORY "${BUILD_DIR}"
575
+ LOGNAME "build-${TARGET_TRIPLET}-dbg"
576
+ )
577
+ endif()
578
+
579
+ if(VCPKG_TARGET_IS_WINDOWS)
580
+ file(GLOB DEF_FILES "${CURRENT_PACKAGES_DIR}/lib/*.def" "${CURRENT_PACKAGES_DIR}/debug/lib/*.def")
581
+
582
+ if(NOT VCPKG_TARGET_IS_MINGW)
583
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
584
+ set(LIB_MACHINE_ARG /machine:ARM)
585
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
586
+ set(LIB_MACHINE_ARG /machine:ARM64)
587
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
588
+ set(LIB_MACHINE_ARG /machine:x86)
589
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
590
+ set(LIB_MACHINE_ARG /machine:x64)
591
+ else()
592
+ message(FATAL_ERROR "Unsupported target architecture")
593
+ endif()
594
+
595
+ foreach(DEF_FILE ${DEF_FILES})
596
+ get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY)
597
+ get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME)
598
+ string(REGEX REPLACE "-[0-9]*\\.def" "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" OUT_FILE_NAME "${DEF_FILE_NAME}")
599
+ file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE)
600
+ file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE)
601
+ message(STATUS "Generating ${OUT_FILE_NATIVE}")
602
+ vcpkg_execute_required_process(
603
+ COMMAND lib.exe "/def:${DEF_FILE_NATIVE}" "/out:${OUT_FILE_NATIVE}" ${LIB_MACHINE_ARG}
604
+ WORKING_DIRECTORY "${CURRENT_PACKAGES_DIR}"
605
+ LOGNAME "libconvert-${TARGET_TRIPLET}"
606
+ )
607
+ endforeach()
608
+ endif()
609
+
610
+ file(GLOB EXP_FILES "${CURRENT_PACKAGES_DIR}/lib/*.exp" "${CURRENT_PACKAGES_DIR}/debug/lib/*.exp")
611
+ file(GLOB LIB_FILES "${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" "${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}")
612
+ if(VCPKG_TARGET_IS_MINGW)
613
+ file(GLOB LIB_FILES_2 "${CURRENT_PACKAGES_DIR}/bin/*.lib" "${CURRENT_PACKAGES_DIR}/debug/bin/*.lib")
614
+ endif()
615
+ set(files_to_remove ${EXP_FILES} ${LIB_FILES} ${LIB_FILES_2} ${DEF_FILES})
616
+ if(files_to_remove)
617
+ file(REMOVE ${files_to_remove})
618
+ endif()
619
+ endif()
620
+
621
+ if("ffmpeg" IN_LIST FEATURES)
622
+ vcpkg_copy_tools(TOOL_NAMES ffmpeg AUTO_CLEAN)
623
+ endif()
624
+ if("ffprobe" IN_LIST FEATURES)
625
+ vcpkg_copy_tools(TOOL_NAMES ffprobe AUTO_CLEAN)
626
+ endif()
627
+ if("ffplay" IN_LIST FEATURES)
628
+ vcpkg_copy_tools(TOOL_NAMES ffplay AUTO_CLEAN)
629
+ endif()
630
+
631
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
632
+
633
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
634
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
635
+ endif()
636
+
637
+ vcpkg_copy_pdbs()
638
+
639
+ if (VCPKG_TARGET_IS_WINDOWS)
640
+ set(_dirs "/")
641
+ if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
642
+ list(APPEND _dirs "/debug/")
643
+ endif()
644
+ foreach(_debug IN LISTS _dirs)
645
+ foreach(PKGCONFIG_MODULE IN LISTS FFMPEG_PKGCONFIG_MODULES)
646
+ set(PKGCONFIG_FILE "${CURRENT_PACKAGES_DIR}${_debug}lib/pkgconfig/${PKGCONFIG_MODULE}.pc")
647
+ # remove redundant cygwin style -libpath entries
648
+ execute_process(
649
+ COMMAND "${MSYS_ROOT}/usr/bin/cygpath.exe" -u "${CURRENT_INSTALLED_DIR}"
650
+ OUTPUT_VARIABLE CYG_INSTALLED_DIR
651
+ OUTPUT_STRIP_TRAILING_WHITESPACE
652
+ )
653
+ vcpkg_replace_string("${PKGCONFIG_FILE}" "-libpath:${CYG_INSTALLED_DIR}${_debug}lib/pkgconfig/../../lib " "")
654
+ # transform libdir, includedir, and prefix paths from cygwin style to windows style
655
+ file(READ "${PKGCONFIG_FILE}" PKGCONFIG_CONTENT)
656
+ foreach(PATH_NAME prefix libdir includedir)
657
+ string(REGEX MATCH "${PATH_NAME}=[^\n]*" PATH_VALUE "${PKGCONFIG_CONTENT}")
658
+ string(REPLACE "${PATH_NAME}=" "" PATH_VALUE "${PATH_VALUE}")
659
+ if(NOT PATH_VALUE)
660
+ message(FATAL_ERROR "failed to find pkgconfig variable ${PATH_NAME}")
661
+ endif()
662
+ execute_process(
663
+ COMMAND "${MSYS_ROOT}/usr/bin/cygpath.exe" -w "${PATH_VALUE}"
664
+ OUTPUT_VARIABLE FIXED_PATH
665
+ OUTPUT_STRIP_TRAILING_WHITESPACE
666
+ )
667
+ file(TO_CMAKE_PATH "${FIXED_PATH}" FIXED_PATH)
668
+ vcpkg_replace_string("${PKGCONFIG_FILE}" "${PATH_NAME}=${PATH_VALUE}" "${PATH_NAME}=${FIXED_PATH}")
669
+ endforeach()
670
+ # list libraries with -l flag (so pkgconf knows they are libraries and not just linker flags)
671
+ foreach(LIBS_ENTRY Libs Libs.private)
672
+ string(REGEX MATCH "${LIBS_ENTRY}: [^\n]*" LIBS_VALUE "${PKGCONFIG_CONTENT}")
673
+ if(NOT LIBS_VALUE)
674
+ message(FATAL_ERROR "failed to find pkgconfig entry ${LIBS_ENTRY}")
675
+ endif()
676
+ string(REPLACE "${LIBS_ENTRY}: " "" LIBS_VALUE "${LIBS_VALUE}")
677
+ if(LIBS_VALUE)
678
+ set(LIBS_VALUE_OLD "${LIBS_VALUE}")
679
+ string(REGEX REPLACE "([^ ]+)[.]lib" "-l\\1" LIBS_VALUE "${LIBS_VALUE}")
680
+ set(LIBS_VALUE_NEW "${LIBS_VALUE}")
681
+ vcpkg_replace_string("${PKGCONFIG_FILE}" "${LIBS_ENTRY}: ${LIBS_VALUE_OLD}" "${LIBS_ENTRY}: ${LIBS_VALUE_NEW}")
682
+ endif()
683
+ endforeach()
684
+ endforeach()
685
+ endforeach()
686
+ endif()
687
+
688
+ vcpkg_fixup_pkgconfig()
689
+
690
+ # Handle dependencies
691
+
692
+ x_vcpkg_pkgconfig_get_modules(PREFIX FFMPEG_PKGCONFIG MODULES ${FFMPEG_PKGCONFIG_MODULES} LIBS)
693
+
694
+ function(append_dependencies_from_libs out)
695
+ cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "LIBS" "")
696
+ string(REGEX REPLACE "[ ]+" ";" contents "${arg_LIBS}")
697
+ list(FILTER contents EXCLUDE REGEX "^-framework$")
698
+ list(FILTER contents EXCLUDE REGEX "^-L.+")
699
+ list(FILTER contents EXCLUDE REGEX "^-libpath:.+")
700
+ list(TRANSFORM contents REPLACE "^-Wl,-framework," "-l")
701
+ list(FILTER contents EXCLUDE REGEX "^-Wl,.+")
702
+ list(TRANSFORM contents REPLACE "^-l" "")
703
+ list(FILTER contents EXCLUDE REGEX "^avresample$")
704
+ list(FILTER contents EXCLUDE REGEX "^avutil$")
705
+ list(FILTER contents EXCLUDE REGEX "^avcodec$")
706
+ list(FILTER contents EXCLUDE REGEX "^avdevice$")
707
+ list(FILTER contents EXCLUDE REGEX "^avfilter$")
708
+ list(FILTER contents EXCLUDE REGEX "^avformat$")
709
+ list(FILTER contents EXCLUDE REGEX "^postproc$")
710
+ list(FILTER contents EXCLUDE REGEX "^swresample$")
711
+ list(FILTER contents EXCLUDE REGEX "^swscale$")
712
+ if(VCPKG_TARGET_IS_WINDOWS)
713
+ list(TRANSFORM contents TOLOWER)
714
+ endif()
715
+ if(contents)
716
+ list(APPEND "${out}" "${contents}")
717
+ set("${out}" "${${out}}" PARENT_SCOPE)
718
+ endif()
719
+ endfunction()
720
+
721
+ append_dependencies_from_libs(FFMPEG_DEPENDENCIES_RELEASE LIBS "${FFMPEG_PKGCONFIG_LIBS_RELEASE}")
722
+ append_dependencies_from_libs(FFMPEG_DEPENDENCIES_DEBUG LIBS "${FFMPEG_PKGCONFIG_LIBS_DEBUG}")
723
+
724
+ # must remove duplicates from the front to respect link order so reverse first
725
+ list(REVERSE FFMPEG_DEPENDENCIES_RELEASE)
726
+ list(REVERSE FFMPEG_DEPENDENCIES_DEBUG)
727
+ list(REMOVE_DUPLICATES FFMPEG_DEPENDENCIES_RELEASE)
728
+ list(REMOVE_DUPLICATES FFMPEG_DEPENDENCIES_DEBUG)
729
+ list(REVERSE FFMPEG_DEPENDENCIES_RELEASE)
730
+ list(REVERSE FFMPEG_DEPENDENCIES_DEBUG)
731
+
732
+ message(STATUS "Dependencies (release): ${FFMPEG_DEPENDENCIES_RELEASE}")
733
+ message(STATUS "Dependencies (debug): ${FFMPEG_DEPENDENCIES_DEBUG}")
734
+
735
+ # Handle version strings
736
+
737
+ function(extract_regex_from_file out)
738
+ cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "FILE;REGEX" "")
739
+ file(READ "${arg_FILE}" contents)
740
+ if (contents MATCHES "${arg_REGEX}")
741
+ if(NOT CMAKE_MATCH_COUNT EQUAL 1)
742
+ message(FATAL_ERROR "Could not identify match group in regular expression \"${arg_REGEX}\"")
743
+ endif()
744
+ else()
745
+ message(FATAL_ERROR "Could not find line matching \"${arg_REGEX}\" in file \"${arg_FILE}\"")
746
+ endif()
747
+ set("${out}" "${CMAKE_MATCH_1}" PARENT_SCOPE)
748
+ endfunction()
749
+
750
+ function(extract_version_from_component out)
751
+ cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "COMPONENT" "")
752
+ string(TOLOWER "${arg_COMPONENT}" component_lower)
753
+ string(TOUPPER "${arg_COMPONENT}" component_upper)
754
+ extract_regex_from_file(major_version
755
+ FILE "${SOURCE_PATH}/${component_lower}/version.h"
756
+ REGEX "#define ${component_upper}_VERSION_MAJOR[ ]+([0-9]+)"
757
+ )
758
+ extract_regex_from_file(minor_version
759
+ FILE "${SOURCE_PATH}/${component_lower}/version.h"
760
+ REGEX "#define ${component_upper}_VERSION_MINOR[ ]+([0-9]+)"
761
+ )
762
+ extract_regex_from_file(micro_version
763
+ FILE "${SOURCE_PATH}/${component_lower}/version.h"
764
+ REGEX "#define ${component_upper}_VERSION_MICRO[ ]+([0-9]+)"
765
+ )
766
+ set("${out}" "${major_version}.${minor_version}.${micro_version}" PARENT_SCOPE)
767
+ endfunction()
768
+
769
+ extract_regex_from_file(FFMPEG_VERSION
770
+ FILE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libavutil/ffversion.h"
771
+ REGEX "#define FFMPEG_VERSION[ ]+\"(.+)\""
772
+ )
773
+
774
+ extract_version_from_component(LIBAVUTIL_VERSION
775
+ COMPONENT libavutil)
776
+ extract_version_from_component(LIBAVCODEC_VERSION
777
+ COMPONENT libavcodec)
778
+ extract_version_from_component(LIBAVDEVICE_VERSION
779
+ COMPONENT libavdevice)
780
+ extract_version_from_component(LIBAVFILTER_VERSION
781
+ COMPONENT libavfilter)
782
+ extract_version_from_component( LIBAVFORMAT_VERSION
783
+ COMPONENT libavformat)
784
+ extract_version_from_component(LIBAVRESAMPLE_VERSION
785
+ COMPONENT libavresample)
786
+ extract_version_from_component(LIBSWRESAMPLE_VERSION
787
+ COMPONENT libswresample)
788
+ extract_version_from_component(LIBSWSCALE_VERSION
789
+ COMPONENT libswscale)
790
+
791
+ # Handle copyright
792
+ file(STRINGS "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-out.log" LICENSE_STRING REGEX "License: .*" LIMIT_COUNT 1)
793
+ if(LICENSE_STRING STREQUAL "License: LGPL version 2.1 or later")
794
+ set(LICENSE_FILE "COPYING.LGPLv2.1")
795
+ elseif(LICENSE_STRING STREQUAL "License: LGPL version 3 or later")
796
+ set(LICENSE_FILE "COPYING.LGPLv3")
797
+ elseif(LICENSE_STRING STREQUAL "License: GPL version 2 or later")
798
+ set(LICENSE_FILE "COPYING.GPLv2")
799
+ elseif(LICENSE_STRING STREQUAL "License: GPL version 3 or later")
800
+ set(LICENSE_FILE "COPYING.GPLv3")
801
+ elseif(LICENSE_STRING STREQUAL "License: nonfree and unredistributable")
802
+ set(LICENSE_FILE "COPYING.NONFREE")
803
+ file(WRITE "${SOURCE_PATH}/${LICENSE_FILE}" "${LICENSE_STRING}")
804
+ else()
805
+ message(FATAL_ERROR "Failed to identify license (${LICENSE_STRING})")
806
+ endif()
807
+
808
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/FindFFMPEG.cmake" @ONLY)
809
+ file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
810
+ file(INSTALL "${SOURCE_PATH}/${LICENSE_FILE}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/usage ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ To use ffmpeg add the following to your CMake project:
2
+
3
+ find_package(FFMPEG REQUIRED)
4
+ target_include_directories(main PRIVATE ${FFMPEG_INCLUDE_DIRS})
5
+ target_link_directories(main PRIVATE ${FFMPEG_LIBRARY_DIRS})
6
+ target_link_libraries(main PRIVATE ${FFMPEG_LIBRARIES})
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/vcpkg-cmake-wrapper.cmake ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ set(FFMPEG_PREV_MODULE_PATH ${CMAKE_MODULE_PATH})
2
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
3
+
4
+ cmake_policy(SET CMP0012 NEW)
5
+
6
+ _find_package(${ARGS})
7
+
8
+ set(CMAKE_MODULE_PATH ${FFMPEG_PREV_MODULE_PATH})
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffmpeg/vcpkg.json ADDED
@@ -0,0 +1,643 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "ffmpeg",
3
+ "version": "4.4.1",
4
+ "port-version": 12,
5
+ "description": [
6
+ "a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.",
7
+ "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."
8
+ ],
9
+ "homepage": "https://ffmpeg.org",
10
+ "license": null,
11
+ "dependencies": [
12
+ {
13
+ "name": "vcpkg-cmake",
14
+ "host": true
15
+ },
16
+ {
17
+ "name": "vcpkg-pkgconfig-get-modules",
18
+ "host": true
19
+ }
20
+ ],
21
+ "default-features": [
22
+ "avcodec",
23
+ "avdevice",
24
+ "avfilter",
25
+ "avformat",
26
+ "swresample",
27
+ "swscale"
28
+ ],
29
+ "features": {
30
+ "all": {
31
+ "description": "Build with all allowed dependencies selected that are compatible with the lgpl license",
32
+ "dependencies": [
33
+ {
34
+ "name": "ffmpeg",
35
+ "default-features": false,
36
+ "features": [
37
+ "avcodec",
38
+ "avdevice",
39
+ "avfilter",
40
+ "avformat",
41
+ "avresample",
42
+ "bzip2",
43
+ "freetype",
44
+ "iconv",
45
+ "lzma",
46
+ "mp3lame",
47
+ "openjpeg",
48
+ "opus",
49
+ "snappy",
50
+ "soxr",
51
+ "speex",
52
+ "swresample",
53
+ "swscale",
54
+ "theora",
55
+ "vorbis",
56
+ "vpx",
57
+ "webp",
58
+ "xml2",
59
+ "zlib"
60
+ ]
61
+ },
62
+ {
63
+ "name": "ffmpeg",
64
+ "default-features": false,
65
+ "features": [
66
+ "alsa"
67
+ ],
68
+ "platform": "linux"
69
+ },
70
+ {
71
+ "name": "ffmpeg",
72
+ "default-features": false,
73
+ "features": [
74
+ "sdl2"
75
+ ],
76
+ "platform": "!osx"
77
+ },
78
+ {
79
+ "name": "ffmpeg",
80
+ "default-features": false,
81
+ "features": [
82
+ "ass"
83
+ ],
84
+ "platform": "!uwp"
85
+ },
86
+ {
87
+ "name": "ffmpeg",
88
+ "default-features": false,
89
+ "features": [
90
+ "fontconfig"
91
+ ],
92
+ "platform": "!uwp"
93
+ },
94
+ {
95
+ "name": "ffmpeg",
96
+ "default-features": false,
97
+ "features": [
98
+ "fribidi"
99
+ ],
100
+ "platform": "!uwp"
101
+ },
102
+ {
103
+ "name": "ffmpeg",
104
+ "default-features": false,
105
+ "features": [
106
+ "modplug"
107
+ ],
108
+ "platform": "!uwp"
109
+ },
110
+ {
111
+ "name": "ffmpeg",
112
+ "default-features": false,
113
+ "features": [
114
+ "opencl"
115
+ ],
116
+ "platform": "!uwp"
117
+ },
118
+ {
119
+ "name": "ffmpeg",
120
+ "default-features": false,
121
+ "features": [
122
+ "openh264"
123
+ ],
124
+ "platform": "!uwp"
125
+ },
126
+ {
127
+ "name": "ffmpeg",
128
+ "default-features": false,
129
+ "features": [
130
+ "ilbc"
131
+ ],
132
+ "platform": "!(arm & uwp)"
133
+ },
134
+ {
135
+ "name": "ffmpeg",
136
+ "default-features": false,
137
+ "features": [
138
+ "ssh"
139
+ ],
140
+ "platform": "!(uwp | arm)"
141
+ },
142
+ {
143
+ "name": "ffmpeg",
144
+ "default-features": false,
145
+ "features": [
146
+ "tensorflow"
147
+ ],
148
+ "platform": "x64 & !static & !uwp"
149
+ },
150
+ {
151
+ "name": "ffmpeg",
152
+ "default-features": false,
153
+ "features": [
154
+ "aom"
155
+ ],
156
+ "platform": "!(windows & arm & !uwp)"
157
+ },
158
+ {
159
+ "name": "ffmpeg",
160
+ "default-features": false,
161
+ "features": [
162
+ "dav1d"
163
+ ],
164
+ "platform": "!(uwp | arm | x86 | osx)"
165
+ },
166
+ {
167
+ "name": "ffmpeg",
168
+ "default-features": false,
169
+ "features": [
170
+ "opengl"
171
+ ],
172
+ "platform": "!uwp & !(arm64 & windows)"
173
+ },
174
+ {
175
+ "name": "ffmpeg",
176
+ "default-features": false,
177
+ "features": [
178
+ "tesseract"
179
+ ],
180
+ "platform": "!(windows & arm) & !static & !uwp"
181
+ },
182
+ {
183
+ "name": "ffmpeg",
184
+ "default-features": false,
185
+ "features": [
186
+ "nvcodec"
187
+ ],
188
+ "platform": "linux | (!osx & !uwp & !(arm64 & windows))"
189
+ }
190
+ ]
191
+ },
192
+ "all-gpl": {
193
+ "description": "Build with all allowed dependencies selected that are compatible with the gpl license",
194
+ "dependencies": [
195
+ {
196
+ "name": "ffmpeg",
197
+ "default-features": false,
198
+ "features": [
199
+ "all",
200
+ "gpl",
201
+ "postproc"
202
+ ]
203
+ },
204
+ {
205
+ "name": "ffmpeg",
206
+ "default-features": false,
207
+ "features": [
208
+ "x265"
209
+ ],
210
+ "platform": "!(uwp | arm)"
211
+ },
212
+ {
213
+ "name": "ffmpeg",
214
+ "default-features": false,
215
+ "features": [
216
+ "x264"
217
+ ],
218
+ "platform": "!(arm & windows)"
219
+ },
220
+ {
221
+ "name": "ffmpeg",
222
+ "default-features": false,
223
+ "features": [
224
+ "avisynthplus"
225
+ ],
226
+ "platform": "windows & !arm & !uwp & !static"
227
+ }
228
+ ]
229
+ },
230
+ "all-nonfree": {
231
+ "description": "Build with all allowed dependencies selected with a non-redistributable license",
232
+ "dependencies": [
233
+ {
234
+ "name": "ffmpeg",
235
+ "default-features": false,
236
+ "features": [
237
+ "all-gpl",
238
+ "fdk-aac",
239
+ "nonfree",
240
+ "openssl"
241
+ ]
242
+ }
243
+ ]
244
+ },
245
+ "alsa": {
246
+ "description": "Enable ALSA support",
247
+ "dependencies": [
248
+ "alsa"
249
+ ]
250
+ },
251
+ "aom": {
252
+ "description": "AV1 video encoding/decoding via libaom support in ffmpeg",
253
+ "dependencies": [
254
+ "aom"
255
+ ]
256
+ },
257
+ "ass": {
258
+ "description": "Libass subtitles rendering, needed for subtitles and ass filter support in ffmpeg",
259
+ "dependencies": [
260
+ "libass"
261
+ ]
262
+ },
263
+ "avcodec": {
264
+ "description": "Build the avcodec library"
265
+ },
266
+ "avdevice": {
267
+ "description": "Build the avdevice library",
268
+ "dependencies": [
269
+ {
270
+ "name": "ffmpeg",
271
+ "default-features": false,
272
+ "features": [
273
+ "avcodec",
274
+ "avformat"
275
+ ]
276
+ }
277
+ ]
278
+ },
279
+ "avfilter": {
280
+ "description": "Build the avfilter library"
281
+ },
282
+ "avformat": {
283
+ "description": "Build the avformat library",
284
+ "dependencies": [
285
+ {
286
+ "name": "ffmpeg",
287
+ "default-features": false,
288
+ "features": [
289
+ "avcodec"
290
+ ]
291
+ }
292
+ ]
293
+ },
294
+ "avisynthplus": {
295
+ "description": "Reading of AviSynth script files",
296
+ "supports": "windows & !static",
297
+ "dependencies": [
298
+ "avisynthplus",
299
+ {
300
+ "name": "ffmpeg",
301
+ "default-features": false,
302
+ "features": [
303
+ "gpl"
304
+ ]
305
+ }
306
+ ]
307
+ },
308
+ "avresample": {
309
+ "description": "Build the avresample library"
310
+ },
311
+ "bzip2": {
312
+ "description": "Bzip2 support",
313
+ "dependencies": [
314
+ "bzip2"
315
+ ]
316
+ },
317
+ "dav1d": {
318
+ "description": "AV1 decoding via libdav1d",
319
+ "supports": "!osx",
320
+ "dependencies": [
321
+ "dav1d"
322
+ ]
323
+ },
324
+ "fdk-aac": {
325
+ "description": "AAC de/encoding via libfdk-aac, **including GPL-incompatible patent-encumbered HE-AAC**. If you do not require HE-AAC, use the built-in FFmpeg AAC codec.",
326
+ "dependencies": [
327
+ {
328
+ "name": "fdk-aac",
329
+ "default-features": false,
330
+ "features": [
331
+ "he-aac"
332
+ ]
333
+ },
334
+ {
335
+ "name": "ffmpeg",
336
+ "default-features": false,
337
+ "features": [
338
+ "nonfree"
339
+ ]
340
+ }
341
+ ]
342
+ },
343
+ "ffmpeg": {
344
+ "description": "Build the ffmpeg application",
345
+ "supports": "!uwp",
346
+ "dependencies": [
347
+ {
348
+ "name": "ffmpeg",
349
+ "default-features": false,
350
+ "features": [
351
+ "avcodec",
352
+ "avfilter",
353
+ "avformat"
354
+ ]
355
+ }
356
+ ]
357
+ },
358
+ "ffplay": {
359
+ "description": "Build the ffplay application",
360
+ "supports": "!uwp",
361
+ "dependencies": [
362
+ {
363
+ "name": "ffmpeg",
364
+ "default-features": false,
365
+ "features": [
366
+ "avcodec",
367
+ "avfilter",
368
+ "avformat",
369
+ "sdl2",
370
+ "swresample",
371
+ "swscale"
372
+ ]
373
+ }
374
+ ]
375
+ },
376
+ "ffprobe": {
377
+ "description": "Build the ffprobe application",
378
+ "supports": "!uwp",
379
+ "dependencies": [
380
+ {
381
+ "name": "ffmpeg",
382
+ "default-features": false,
383
+ "features": [
384
+ "avcodec",
385
+ "avformat"
386
+ ]
387
+ }
388
+ ]
389
+ },
390
+ "fontconfig": {
391
+ "description": "Useful for drawtext filter",
392
+ "dependencies": [
393
+ "fontconfig"
394
+ ]
395
+ },
396
+ "freetype": {
397
+ "description": "Needed for drawtext filter",
398
+ "dependencies": [
399
+ "freetype"
400
+ ]
401
+ },
402
+ "fribidi": {
403
+ "description": "Improves drawtext filter",
404
+ "dependencies": [
405
+ "fribidi"
406
+ ]
407
+ },
408
+ "gpl": {
409
+ "description": "Allow use of GPL code, the resulting libs and binaries will be under GPL"
410
+ },
411
+ "iconv": {
412
+ "description": "Iconv support",
413
+ "dependencies": [
414
+ "libiconv"
415
+ ]
416
+ },
417
+ "ilbc": {
418
+ "description": "iLBC de/encoding via libilbc",
419
+ "dependencies": [
420
+ "libilbc"
421
+ ]
422
+ },
423
+ "lzma": {
424
+ "description": "lzma support",
425
+ "dependencies": [
426
+ "liblzma"
427
+ ]
428
+ },
429
+ "modplug": {
430
+ "description": "ModPlug via libmodplug",
431
+ "dependencies": [
432
+ "libmodplug"
433
+ ]
434
+ },
435
+ "mp3lame": {
436
+ "description": "MP3 encoding via libmp3lame",
437
+ "dependencies": [
438
+ "mp3lame"
439
+ ]
440
+ },
441
+ "nonfree": {
442
+ "description": "Allow use of nonfree code, the resulting libs and binaries will be unredistributable"
443
+ },
444
+ "nvcodec": {
445
+ "description": "Nvidia video decoding/encoding acceleration",
446
+ "supports": "linux | (!osx & !uwp & !(arm64 & windows))",
447
+ "dependencies": [
448
+ "ffnvcodec"
449
+ ]
450
+ },
451
+ "opencl": {
452
+ "description": "OpenCL processing",
453
+ "supports": "!uwp",
454
+ "dependencies": [
455
+ "opencl"
456
+ ]
457
+ },
458
+ "opengl": {
459
+ "description": "OpenGL rendering",
460
+ "supports": "!uwp",
461
+ "dependencies": [
462
+ "opengl",
463
+ "opengl-registry"
464
+ ]
465
+ },
466
+ "openh264": {
467
+ "description": "H.264 de/encoding via openh264",
468
+ "dependencies": [
469
+ "openh264"
470
+ ]
471
+ },
472
+ "openjpeg": {
473
+ "description": "JPEG 2000 de/encoding via OpenJPEG",
474
+ "dependencies": [
475
+ "openjpeg"
476
+ ]
477
+ },
478
+ "openssl": {
479
+ "description": "Needed for https support if gnutls, libtls or mbedtls is not used",
480
+ "dependencies": [
481
+ {
482
+ "name": "ffmpeg",
483
+ "default-features": false,
484
+ "features": [
485
+ "nonfree"
486
+ ]
487
+ },
488
+ "openssl"
489
+ ]
490
+ },
491
+ "opus": {
492
+ "description": "Opus de/encoding via libopus",
493
+ "dependencies": [
494
+ "opus"
495
+ ]
496
+ },
497
+ "postproc": {
498
+ "description": "Build the postproc library",
499
+ "dependencies": [
500
+ {
501
+ "name": "ffmpeg",
502
+ "default-features": false,
503
+ "features": [
504
+ "gpl"
505
+ ]
506
+ }
507
+ ]
508
+ },
509
+ "sdl2": {
510
+ "description": "Sdl2 support",
511
+ "dependencies": [
512
+ {
513
+ "name": "sdl2",
514
+ "default-features": false,
515
+ "features": [
516
+ "x11"
517
+ ],
518
+ "platform": "linux"
519
+ },
520
+ {
521
+ "name": "sdl2",
522
+ "platform": "!linux"
523
+ }
524
+ ]
525
+ },
526
+ "snappy": {
527
+ "description": "Snappy compression, needed for hap encoding",
528
+ "dependencies": [
529
+ "snappy"
530
+ ]
531
+ },
532
+ "soxr": {
533
+ "description": "Include libsoxr resampling",
534
+ "dependencies": [
535
+ {
536
+ "name": "ffmpeg",
537
+ "default-features": false,
538
+ "features": [
539
+ "swresample"
540
+ ]
541
+ },
542
+ "soxr"
543
+ ]
544
+ },
545
+ "speex": {
546
+ "description": "Speex de/encoding via libspeex",
547
+ "dependencies": [
548
+ "speex"
549
+ ]
550
+ },
551
+ "ssh": {
552
+ "description": "SFTP protocol via libssh",
553
+ "dependencies": [
554
+ "libssh"
555
+ ]
556
+ },
557
+ "swresample": {
558
+ "description": "Build the swresample library"
559
+ },
560
+ "swscale": {
561
+ "description": "Build the swscale library"
562
+ },
563
+ "tensorflow": {
564
+ "description": "TensorFlow as a DNN module backend for DNN based filters like sr",
565
+ "supports": "!static",
566
+ "dependencies": [
567
+ "tensorflow"
568
+ ]
569
+ },
570
+ "tesseract": {
571
+ "description": "Tesseract, needed for ocr filter",
572
+ "supports": "!static",
573
+ "dependencies": [
574
+ "tesseract"
575
+ ]
576
+ },
577
+ "theora": {
578
+ "description": "Theora encoding via libtheora",
579
+ "dependencies": [
580
+ "libtheora"
581
+ ]
582
+ },
583
+ "version3": {
584
+ "description": "Upgrade (L)GPL to version 3"
585
+ },
586
+ "vorbis": {
587
+ "description": "Vorbis en/decoding via libvorbis, native implementation exists",
588
+ "dependencies": [
589
+ "libvorbis"
590
+ ]
591
+ },
592
+ "vpx": {
593
+ "description": "VP8 and VP9 de/encoding via libvpx",
594
+ "dependencies": [
595
+ "libvpx"
596
+ ]
597
+ },
598
+ "webp": {
599
+ "description": "WebP encoding via libwebp",
600
+ "dependencies": [
601
+ "libwebp"
602
+ ]
603
+ },
604
+ "x264": {
605
+ "description": "H.264 encoding via x264",
606
+ "dependencies": [
607
+ {
608
+ "name": "ffmpeg",
609
+ "default-features": false,
610
+ "features": [
611
+ "gpl"
612
+ ]
613
+ },
614
+ "x264"
615
+ ]
616
+ },
617
+ "x265": {
618
+ "description": "HEVC encoding via x265",
619
+ "dependencies": [
620
+ {
621
+ "name": "ffmpeg",
622
+ "default-features": false,
623
+ "features": [
624
+ "gpl"
625
+ ]
626
+ },
627
+ "x265"
628
+ ]
629
+ },
630
+ "xml2": {
631
+ "description": "XML parsing using the C library libxml2, needed for dash demuxing support",
632
+ "dependencies": [
633
+ "libxml2"
634
+ ]
635
+ },
636
+ "zlib": {
637
+ "description": "zlib support",
638
+ "dependencies": [
639
+ "zlib"
640
+ ]
641
+ }
642
+ }
643
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/LICENSE.txt ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 2.1, February 1999
3
+
4
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ [This is the first released version of the Lesser GPL. It also counts
10
+ as the successor of the GNU Library Public License, version 2, hence
11
+ the version number 2.1.]
12
+ Preamble
13
+ The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
14
+
15
+ This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
16
+
17
+ When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
18
+
19
+ To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
20
+
21
+ For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
22
+
23
+ We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
24
+
25
+ To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
26
+
27
+ Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
28
+
29
+ Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
30
+
31
+ When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
32
+
33
+ We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
34
+
35
+ For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
36
+
37
+ In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
38
+
39
+ Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
40
+
41
+ The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
42
+
43
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
44
+ 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
45
+
46
+ A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
47
+
48
+ The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
49
+
50
+ "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
51
+
52
+ Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
53
+
54
+ 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
55
+
56
+ You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
57
+
58
+ 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
59
+
60
+ a) The modified work must itself be a software library.
61
+ b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
62
+ c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
63
+ d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
64
+ (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
65
+
66
+ These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
67
+
68
+ Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
69
+
70
+ In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
71
+
72
+ 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
73
+
74
+ Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
75
+
76
+ This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
77
+
78
+ 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
79
+
80
+ If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
81
+
82
+ 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
83
+
84
+ However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
85
+
86
+ When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
87
+
88
+ If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
89
+
90
+ Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
91
+
92
+ 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
93
+
94
+ You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
95
+
96
+ a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
97
+ b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
98
+ c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
99
+ d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
100
+ e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
101
+ For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
102
+
103
+ It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
104
+
105
+ 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
106
+
107
+ a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
108
+ b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
109
+ 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
110
+
111
+ 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
112
+
113
+ 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
114
+
115
+ 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
116
+
117
+ If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
118
+
119
+ It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
120
+
121
+ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
122
+
123
+ 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
124
+
125
+ 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
126
+
127
+ Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
128
+
129
+ 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
130
+
131
+ NO WARRANTY
132
+
133
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
134
+
135
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
136
+
137
+ END OF TERMS AND CONDITIONS
138
+ How to Apply These Terms to Your New Libraries
139
+ If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
140
+
141
+ To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
142
+
143
+ one line to give the library's name and an idea of what it does.
144
+ Copyright (C) year name of author
145
+
146
+ This library is free software; you can redistribute it and/or
147
+ modify it under the terms of the GNU Lesser General Public
148
+ License as published by the Free Software Foundation; either
149
+ version 2.1 of the License, or (at your option) any later version.
150
+
151
+ This library is distributed in the hope that it will be useful,
152
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
153
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
154
+ Lesser General Public License for more details.
155
+
156
+ You should have received a copy of the GNU Lesser General Public
157
+ License along with this library; if not, write to the Free Software
158
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
159
+ Also add information on how to contact you by electronic and paper mail.
160
+
161
+ You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
162
+
163
+ Yoyodyne, Inc., hereby disclaims all copyright interest in
164
+ the library `Frob' (a library for tweaking knobs) written
165
+ by James Random Hacker.
166
+
167
+ signature of Ty Coon, 1 April 1990
168
+ Ty Coon, President of Vice
169
+ That's all there is to it!
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/build.sh ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/bash
2
+
3
+ # Deploys the ffnvcodec.pc file to the MSYS rootfs so that pkgconfig can find it.
4
+
5
+ set -e
6
+ export PATH=/usr/bin:$PATH
7
+
8
+ SOURCE_PATH="$1"
9
+ CURRENT_PACKAGES_DIR="$2"
10
+
11
+ pushd ${SOURCE_PATH}
12
+
13
+ # Create ffnvcodec.pc
14
+ make PREFIX=${CURRENT_PACKAGES_DIR}
15
+ make install PREFIX=${CURRENT_PACKAGES_DIR}
16
+
17
+
18
+ popd
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/copyright ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * This copyright notice applies to this header file only:
3
+ *
4
+ * Copyright (c) 2010-2019 NVIDIA Corporation
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person
7
+ * obtaining a copy of this software and associated documentation
8
+ * files (the "Software"), to deal in the Software without
9
+ * restriction, including without limitation the rights to use,
10
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the software, and to permit persons to whom the
12
+ * software is furnished to do so, subject to the following
13
+ * conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be
16
+ * included in all copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25
+ * OTHER DEALINGS IN THE SOFTWARE.
26
+ */
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/portfile.cmake ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO FFmpeg/nv-codec-headers
4
+ REF b641a195edbe3ac9788e681e22c2e2fad8aacddb # 11.1.5.0
5
+ SHA512 e8b4c21ddc9c39dadd9b69ebdfcf38cf1e61f19ffb88d0a4d9086ddbf69285d2c8c946bb02bde3ee943accae559a72468f096718ad69ac03a43746c1eb0ed483
6
+ HEAD_REF master
7
+ )
8
+
9
+ # ====================================================
10
+ # Install the pkgconfig info for the `nvcodec` package
11
+ # ====================================================
12
+
13
+ # Windows
14
+ if(VCPKG_TARGET_IS_WINDOWS)
15
+ set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh)
16
+ vcpkg_acquire_msys(MSYS_ROOT PACKAGES make pkg-config)
17
+ set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
18
+
19
+ message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
20
+ file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
21
+
22
+ # Make and deploy the ffnvcodec.pc file using MSYS
23
+ # (so that FFmpeg can find it in the MSYS rootfs)
24
+ vcpkg_execute_required_process(
25
+ COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}"
26
+ "${SOURCE_PATH}"
27
+ "${CURRENT_PACKAGES_DIR}"
28
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}
29
+ LOGNAME build-${TARGET_TRIPLET}
30
+ )
31
+
32
+ file(INSTALL "${SOURCE_PATH}/ffnvcodec.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
33
+
34
+ # Linux, etc.
35
+ else()
36
+ FIND_PROGRAM(MAKE make)
37
+ IF (NOT MAKE)
38
+ MESSAGE(FATAL_ERROR "MAKE not found")
39
+ ENDIF ()
40
+
41
+ vcpkg_execute_required_process(
42
+ COMMAND make PREFIX=$${CURRENT_PACKAGES_DIR}
43
+ WORKING_DIRECTORY ${SOURCE_PATH}
44
+ LOGNAME make-${TARGET_TRIPLET}
45
+ )
46
+
47
+ # FFmpeg uses pkgconfig to find ffnvcodec.pc, so install it where
48
+ # FFMpeg's call to pkgconfig expects to find it.
49
+ file(INSTALL "${SOURCE_PATH}/ffnvcodec.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
50
+ file(INSTALL "${SOURCE_PATH}/ffnvcodec.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
51
+ endif()
52
+
53
+ vcpkg_fixup_pkgconfig()
54
+
55
+ # Install the files to their default vcpkg locations
56
+ file(INSTALL "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}")
57
+ file(INSTALL "${CURRENT_PORT_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/ffnvcodec/vcpkg.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "ffnvcodec",
3
+ "version": "11.1.5.0",
4
+ "port-version": 1,
5
+ "description": "FFmpeg version of Nvidia Codec SDK headers.",
6
+ "homepage": "https://github.com/FFmpeg/nv-codec-headers",
7
+ "supports": "linux | (!osx & !uwp & !(arm64 & windows))"
8
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/aligned_malloc.patch ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/cmake.config.h.in b/cmake.config.h.in
2
+ index 1f4c505..fd763cc 100644
3
+ --- a/cmake.config.h.in
4
+ +++ b/cmake.config.h.in
5
+ @@ -112,6 +112,10 @@
6
+ you don't. */
7
+ #cmakedefine01 HAVE_DECL_POSIX_MEMALIGN
8
+
9
+ +/* Define to 1 if you have the declaration of `_aligned_malloc', and to 0 if you
10
+ + don't. */
11
+ +#cmakedefine01 HAVE_DECL_ALIGNED_MALLOC
12
+ +
13
+ /* Define to 1 if you have the declaration of `sinl', and to 0 if you don't.
14
+ */
15
+ #cmakedefine01 HAVE_DECL_SINL
16
+ @@ -184,6 +188,9 @@
17
+ /* Define to 1 if you have the `memalign' function. */
18
+ #cmakedefine HAVE_MEMALIGN 1
19
+
20
+ +/* Define to 1 if you have the `_aligned_malloc' function. */
21
+ +#cmakedefine HAVE_ALIGNED_MALLOC 1
22
+ +
23
+ /* Define to 1 if you have the `memmove' function. */
24
+ #cmakedefine HAVE_MEMMOVE 1
25
+
26
+ diff --git a/kernel/kalloc.c b/kernel/kalloc.c
27
+ index e42f6f3..ffc2257 100644
28
+ --- a/kernel/kalloc.c
29
+ +++ b/kernel/kalloc.c
30
+ @@ -103,7 +103,7 @@ void *X(kernel_malloc)(size_t n)
31
+ # undef real_free
32
+ # define real_free _mm_free
33
+
34
+ -# elif defined(_MSC_VER)
35
+ +# elif defined(_MSC_VER) || defined (HAVE_ALIGNED_MALLOC)
36
+ /* MS Visual C++ 6.0 with a "Processor Pack" supports SIMD
37
+ and _aligned_malloc/free (uses malloc.h) */
38
+ p = (void *) _aligned_malloc(n, MIN_ALIGNMENT);
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/fftw3_arch_fix.patch ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 49be67d..ef69fa6 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -66,6 +66,7 @@ check_prototype_definition (cosl "long double cosl( long double arg )" "0" math.
6
+ check_prototype_definition (sinl "long double sinl( long double arg )" "0" math.h HAVE_DECL_SINL)
7
+ check_prototype_definition (memalign "void *memalign(size_t alignment, size_t size)" "0" malloc.h HAVE_DECL_MEMALIGN)
8
+ check_prototype_definition (posix_memalign "int posix_memalign(void **memptr, size_t alignment, size_t size)" "0" stdlib.h HAVE_DECL_POSIX_MEMALIGN)
9
+ +check_prototype_definition (_aligned_malloc "void* __cdecl _aligned_malloc(size_t _Size, size_t _Alignment)" "0" malloc.h HAVE_DECL_ALIGNED_MALLOC)
10
+
11
+ include (CheckSymbolExists)
12
+ check_symbol_exists (clock_gettime time.h HAVE_CLOCK_GETTIME)
13
+ @@ -75,6 +76,7 @@ check_symbol_exists (drand48 stdlib.h HAVE_DRAND48)
14
+ check_symbol_exists (srand48 stdlib.h HAVE_SRAND48)
15
+ check_symbol_exists (memalign malloc.h HAVE_MEMALIGN)
16
+ check_symbol_exists (posix_memalign stdlib.h HAVE_POSIX_MEMALIGN)
17
+ +check_symbol_exists (_aligned_malloc malloc.h HAVE_ALIGNED_MALLOC)
18
+ check_symbol_exists (mach_absolute_time mach/mach_time.h HAVE_MACH_ABSOLUTE_TIME)
19
+ check_symbol_exists (alloca alloca.h HAVE_ALLOCA)
20
+ if (NOT HAVE_ALLOCA)
21
+ @@ -131,6 +133,7 @@ endif ()
22
+
23
+ include (CheckCCompilerFlag)
24
+
25
+ +#All those checks fail due to linkage errors so we directly set HAVE_<ARCH> in the PORTFILE! We assume the user knows what (s)he is doing!
26
+ if (ENABLE_SSE)
27
+ foreach (FLAG "-msse" "/arch:SSE")
28
+ unset (HAVE_SSE CACHE)
29
+ @@ -180,8 +183,9 @@ if (ENABLE_AVX2)
30
+ endif ()
31
+
32
+ # AVX2 codelets require FMA support as well
33
+ +# AVX2 implicitly includes FMA using Visual Studio (also definition __FMA__ is not set)
34
+ if (ENABLE_AVX2)
35
+ - foreach (FLAG "-mfma" "/arch:FMA")
36
+ + foreach (FLAG "-mfma" "/arch:AVX2")
37
+ unset (HAVE_FMA CACHE)
38
+ unset (HAVE_FMA)
39
+ check_c_compiler_flag (${FLAG} HAVE_FMA)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/omp_test.patch ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index f3cfc20..9826bff 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -385,6 +385,12 @@ if (BUILD_TESTS)
6
+ target_link_libraries (bench ${fftw3_lib})
7
+ endif ()
8
+
9
+ + if (ENABLE_OPENMP)
10
+ + target_link_libraries (bench ${fftw3_lib}_omp)
11
+ + else ()
12
+ + target_link_libraries (bench ${fftw3_lib})
13
+ + endif ()
14
+ +
15
+
16
+ enable_testing ()
17
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/patch_targets.patch ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 335808a..90772b4 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -358,7 +358,7 @@ foreach(subtarget ${subtargets})
6
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
7
+ endforeach ()
8
+ install(TARGETS ${fftw3_lib}
9
+ - EXPORT FFTW3LibraryDepends
10
+ + EXPORT FFTW3${PREC_SUFFIX}LibraryDepends
11
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
12
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
13
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
14
+ @@ -419,11 +419,11 @@ configure_file (FFTW3ConfigVersion.cmake.in FFTW3${PREC_SUFFIX}ConfigVersion.cma
15
+ install (FILES
16
+ ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}Config.cmake
17
+ ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}ConfigVersion.cmake
18
+ - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX}
19
+ + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
20
+ COMPONENT Development)
21
+
22
+ -export (TARGETS ${fftw3_lib} NAMESPACE FFTW3:: FILE ${PROJECT_BINARY_DIR}/FFTW3LibraryDepends.cmake)
23
+ -install(EXPORT FFTW3LibraryDepends
24
+ +export (TARGETS ${fftw3_lib} NAMESPACE FFTW3:: FILE ${PROJECT_BINARY_DIR}/FFTW3${PREC_SUFFIX}LibraryDepends.cmake)
25
+ +install(EXPORT FFTW3${PREC_SUFFIX}LibraryDepends
26
+ NAMESPACE FFTW3::
27
+ - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX}
28
+ + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
29
+ COMPONENT Development)
30
+ --- a/FFTW3Config.cmake.in
31
+ +++ b/FFTW3Config.cmake.in
32
+ @@ -10,7 +10,7 @@ set (FFTW3@PREC_SUFFIX@_LIBRARIES fftw3@PREC_SUFFIX@)
33
+ set (FFTW3@PREC_SUFFIX@_LIBRARY_DIRS @CMAKE_INSTALL_FULL_LIBDIR@)
34
+ set (FFTW3@PREC_SUFFIX@_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@)
35
+
36
+ -include ("${CMAKE_CURRENT_LIST_DIR}/FFTW3LibraryDepends.cmake")
37
+ +include ("${CMAKE_CURRENT_LIST_DIR}/FFTW3@[email protected]")
38
+
39
+ if (CMAKE_VERSION VERSION_LESS 2.8.3)
40
+ set (CMAKE_CURRENT_LIST_DIR)
41
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/portfile.cmake ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_download_distfile(ARCHIVE
2
+ URLS "https://www.fftw.org/fftw-3.3.10.tar.gz"
3
+ FILENAME "fftw-3.3.10.tar.gz"
4
+ SHA512 2d34b5ccac7b08740dbdacc6ebe451d8a34cf9d9bfec85a5e776e87adf94abfd803c222412d8e10fbaa4ed46f504aa87180396af1b108666cde4314a55610b40
5
+ )
6
+
7
+ vcpkg_extract_source_archive_ex(
8
+ OUT_SOURCE_PATH SOURCE_PATH
9
+ ARCHIVE ${ARCHIVE}
10
+ PATCHES
11
+ omp_test.patch
12
+ patch_targets.patch
13
+ fftw3_arch_fix.patch
14
+ aligned_malloc.patch
15
+ )
16
+
17
+ vcpkg_check_features(
18
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
19
+ FEATURES
20
+ openmp ENABLE_OPENMP
21
+ threads ENABLE_THREADS
22
+ threads WITH_COMBINED_THREADS
23
+ avx2 ENABLE_AVX2
24
+ avx ENABLE_AVX
25
+ sse2 ENABLE_SSE2
26
+ sse ENABLE_SSE
27
+ )
28
+
29
+ set(ENABLE_FLOAT_CMAKE fftw3f)
30
+ set(ENABLE_LONG_DOUBLE_CMAKE fftw3l)
31
+ set(ENABLE_DEFAULT_PRECISION_CMAKE fftw3)
32
+
33
+ foreach(PRECISION ENABLE_FLOAT ENABLE_LONG_DOUBLE ENABLE_DEFAULT_PRECISION)
34
+ if(PRECISION STREQUAL "ENABLE_LONG_DOUBLE")
35
+ vcpkg_cmake_configure(
36
+ SOURCE_PATH "${SOURCE_PATH}"
37
+ OPTIONS
38
+ -D${PRECISION}=ON
39
+ -DENABLE_OPENMP=${ENABLE_OPENMP}
40
+ -DENABLE_THREADS=${HAVE_THREADS}
41
+ -DWITH_COMBINED_THREADS=${HAVE_THREADS}
42
+ -DBUILD_TESTS=OFF
43
+ )
44
+ else()
45
+ vcpkg_cmake_configure(
46
+ SOURCE_PATH "${SOURCE_PATH}"
47
+ OPTIONS
48
+ -D${PRECISION}=ON
49
+ ${FEATURE_OPTIONS}
50
+ -DBUILD_TESTS=OFF
51
+ )
52
+ endif()
53
+
54
+ vcpkg_cmake_install()
55
+
56
+ vcpkg_copy_pdbs()
57
+
58
+ vcpkg_cmake_config_fixup(PACKAGE_NAME ${${PRECISION}_CMAKE} CONFIG_PATH lib/cmake)
59
+ endforeach()
60
+
61
+ file(READ "${SOURCE_PATH}/api/fftw3.h" _contents)
62
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
63
+ string(REPLACE "defined(FFTW_DLL)" "0" _contents "${_contents}")
64
+ else()
65
+ string(REPLACE "defined(FFTW_DLL)" "1" _contents "${_contents}")
66
+ endif()
67
+ file(WRITE "${SOURCE_PATH}/include/fftw3.h" "${_contents}")
68
+
69
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
70
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
71
+
72
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
73
+
74
+ vcpkg_fixup_pkgconfig()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftw3/vcpkg.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fftw3",
3
+ "version": "3.3.10",
4
+ "port-version": 3,
5
+ "description": "FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).",
6
+ "homepage": "https://www.fftw.org/",
7
+ "dependencies": [
8
+ {
9
+ "name": "vcpkg-cmake",
10
+ "host": true
11
+ },
12
+ {
13
+ "name": "vcpkg-cmake-config",
14
+ "host": true
15
+ }
16
+ ],
17
+ "features": {
18
+ "avx": {
19
+ "description": "Builds part of the library with avx, sse2, sse"
20
+ },
21
+ "avx2": {
22
+ "description": "Builds part of the library with avx2, fma, avx, sse2, sse"
23
+ },
24
+ "openmp": {
25
+ "description": "Builds openmp enabled lib"
26
+ },
27
+ "sse": {
28
+ "description": "Builds part of the library with sse"
29
+ },
30
+ "sse2": {
31
+ "description": "Builds part of the library with sse2, sse"
32
+ },
33
+ "threads": {
34
+ "description": "Enable threads in fftw3"
35
+ }
36
+ }
37
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftwpp/portfile.cmake ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ vcpkg_from_github(
3
+ OUT_SOURCE_PATH SOURCE_PATH
4
+ REPO dealias/fftwpp
5
+ REF d05a2812995a52a3834140fd3ddd2e80bf8fcd42
6
+ SHA512 851c79245eb61ebebfde97e7a8f3b9c061e84c9df571b5a7cafc3e959941e7b0792923e0ddefde4739582932d135c578c703195017da4bd34872adce7ab8c5ee
7
+ HEAD_REF master
8
+ )
9
+
10
+ # fftwpp is a header-only library
11
+ set (FFWTPP_SOURCE_FILES
12
+ ${SOURCE_PATH}/Array.h
13
+ ${SOURCE_PATH}/Array.cc
14
+ ${SOURCE_PATH}/Complex.h
15
+ ${SOURCE_PATH}/Complex.cc
16
+ ${SOURCE_PATH}/align.h
17
+ ${SOURCE_PATH}/cmult-sse2.h
18
+ ${SOURCE_PATH}/convolution.h
19
+ ${SOURCE_PATH}/convolution.cc
20
+ ${SOURCE_PATH}/fftw++.h
21
+ ${SOURCE_PATH}/fftw++.cc
22
+ ${SOURCE_PATH}/seconds.h
23
+ ${SOURCE_PATH}/statistics.h
24
+ ${SOURCE_PATH}/transposeoptions.h
25
+ )
26
+
27
+ set(FFWTPP_DOXY_CFG ${SOURCE_PATH}/fftw++.doxycfg)
28
+
29
+ file(INSTALL ${FFWTPP_SOURCE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT})
30
+ file(INSTALL ${FFWTPP_DOXY_CFG} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
31
+
32
+ file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
33
+ # Handle copyright
34
+ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fftwpp/vcpkg.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fftwpp",
3
+ "version-date": "2019-12-19",
4
+ "port-version": 2,
5
+ "description": "FFTW++ is a C++ header/MPI transpose for Version 3 of the highly optimized FFTW (https://www.fftw.org) Fourier Transform library.",
6
+ "homepage": "https://www.fftw.org/",
7
+ "dependencies": [
8
+ "fftw3"
9
+ ]
10
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fixed-string/portfile.cmake ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # header-only library
2
+
3
+ vcpkg_from_github(
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO unterumarmung/fixed_string
6
+ REF v0.1.0
7
+ SHA512 759c228e3bc4bc06d58b59bc19756ceb27a6f6104cb0c58288bf3156ca0958e6099741870fa09ba88a5572d17988529992cc5198faab30847118665e626c2ea4
8
+ HEAD_REF master
9
+ )
10
+
11
+ vcpkg_configure_cmake(
12
+ SOURCE_PATH ${SOURCE_PATH}
13
+ PREFER_NINJA
14
+ OPTIONS
15
+ -DFIXED_STRING_OPT_BUILD_EXAMPLES=OFF
16
+ -DFIXED_STRING_OPT_BUILD_TESTS=OFF
17
+ -DFIXED_STRING_OPT_INSTALL=ON
18
+ )
19
+
20
+ vcpkg_install_cmake()
21
+
22
+ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fixed_string TARGET_PATH share/fixed_string)
23
+
24
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
25
+
26
+ # Handle copyright
27
+ configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fixed-string/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fixed-string",
3
+ "version-string": "0.1.0",
4
+ "port-version": 1,
5
+ "description": "Header-only C++17 library provides a string class with std::array fixed-size semantic.",
6
+ "homepage": "https://github.com/unterumarmung/fixed_string"
7
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fizz/0001-fix-libsodium.patch ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt
2
+ index bb3e15e5..80c5051e 100644
3
+ --- a/fizz/CMakeLists.txt
4
+ +++ b/fizz/CMakeLists.txt
5
+ @@ -64,7 +64,7 @@ endif()
6
+
7
+ include(CheckAtomic)
8
+
9
+ -find_package(Sodium REQUIRED)
10
+ +find_package(unofficial-sodium CONFIG REQUIRED)
11
+
12
+ SET(FIZZ_SHINY_DEPENDENCIES "")
13
+ SET(FIZZ_LINK_LIBRARIES "")
14
+ @@ -255,7 +255,7 @@ target_link_libraries(fizz
15
+ PUBLIC
16
+ ${FOLLY_LIBRARIES}
17
+ ${OPENSSL_LIBRARIES}
18
+ - sodium
19
+ + unofficial-sodium::sodium
20
+ Threads::Threads
21
+ ZLIB::ZLIB
22
+ ${ZSTD_LIBRARY}
23
+ diff --git a/fizz/cmake/fizz-config.cmake.in b/fizz/cmake/fizz-config.cmake.in
24
+ index 679b0e61..b28750fa 100644
25
+ --- a/fizz/cmake/fizz-config.cmake.in
26
+ +++ b/fizz/cmake/fizz-config.cmake.in
27
+ @@ -26,7 +26,7 @@ endif()
28
+ set(FIZZ_LIBRARIES fizz::fizz)
29
+
30
+ include(CMakeFindDependencyMacro)
31
+ -find_dependency(Sodium)
32
+ +find_dependency(unofficial-sodium CONFIG REQUIRED)
33
+ find_dependency(folly CONFIG)
34
+ find_dependency(ZLIB)
35
+