Techt3o commited on
Commit
68bb7e7
·
verified ·
1 Parent(s): 4492139

e7981169e15f7cee4efaab8c1d2a827d333294c540f832c07c9517c814d3d684

Browse files
Files changed (50) hide show
  1. third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/enable-uwp-builds.patch +26 -0
  2. third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/fix_config_include.patch +12 -0
  3. third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/portfile.cmake +66 -0
  4. third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/usage +9 -0
  5. third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/vcpkg-cmake-wrapper.cmake +64 -0
  6. third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/vcpkg.json +18 -0
  7. third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/win_output_name.patch +17 -0
  8. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmad/0001-Fix-MSVC-ARM.patch +25 -0
  9. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmad/CMakeLists.txt +53 -0
  10. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmad/portfile.cmake +29 -0
  11. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmad/vcpkg.json +7 -0
  12. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0001-Use-libtre.patch +53 -0
  13. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0002-Change-zlib-lib-name-to-match-CMake-output.patch +39 -0
  14. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0003-Fix-WIN32-macro-checks.patch +43 -0
  15. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0004-Typedef-POSIX-types-on-Windows.patch +29 -0
  16. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0005-Include-dirent.h-for-S_ISREG-and-S_ISDIR.patch +24 -0
  17. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0006-Remove-Wrap-POSIX-headers.patch +189 -0
  18. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch +30 -0
  19. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0008-Add-FILENO-defines.patch +26 -0
  20. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0009-No-fcntl-in-magic.c.patch +25 -0
  21. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0010-Properly-check-for-the-presence-of-bitmasks.patch +118 -0
  22. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0011-Remove-pipe-related-functions-in-funcs.c.patch +32 -0
  23. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0012-Convert-MSYS2-paths-to-Windows-paths.patch +24 -0
  24. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0013-Check-for-backslash-in-argv-0-on-Windows.patch +42 -0
  25. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0014-Define-POSIX-macros-if-missing.patch +38 -0
  26. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch +27 -0
  27. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/portfile.cmake +71 -0
  28. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/vcpkg.json +25 -0
  29. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/arm64.patch +15 -0
  30. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/disable-test-build.patch +18 -0
  31. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/export-cmake-targets.patch +43 -0
  32. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/fix-InstallPath.patch +62 -0
  33. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/fix-iconv.patch +40 -0
  34. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/fix-openssl.patch +13 -0
  35. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/md.patch +13 -0
  36. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/no-extra-static-lib.patch +19 -0
  37. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/pkgconfig.patch +60 -0
  38. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/portfile.cmake +77 -0
  39. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/vcpkg.json +65 -0
  40. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmaxminddb/CMakeLists.txt +34 -0
  41. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmaxminddb/fix-linux-build.patch +19 -0
  42. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmaxminddb/portfile.cmake +25 -0
  43. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmaxminddb/vcpkg.json +7 -0
  44. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmediainfo/portfile.cmake +31 -0
  45. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmediainfo/vcpkg.json +21 -0
  46. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmediainfo/vcpkg_support_in_cmakelists.patch +55 -0
  47. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmesh/copyright +169 -0
  48. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmesh/portfile.cmake +53 -0
  49. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmesh/vcpkg.json +8 -0
  50. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmicrohttpd/portfile.cmake +52 -0
third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/enable-uwp-builds.patch ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/common/tuklib_physmem.c b/src/common/tuklib_physmem.c
2
+ index 4053ad0..c49db6d 100644
3
+ --- a/src/common/tuklib_physmem.c
4
+ +++ b/src/common/tuklib_physmem.c
5
+ @@ -79,6 +79,13 @@ tuklib_physmem(void)
6
+ uint64_t ret = 0;
7
+
8
+ #if defined(_WIN32) || defined(__CYGWIN__)
9
+ +#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
10
+ + MEMORYSTATUSEX ms;
11
+ + ms.dwLength = sizeof(ms);
12
+ + if(!GlobalMemoryStatusEx(&ms))
13
+ + return 0;
14
+ + return ms.ullTotalPhys;
15
+ +#else
16
+ if ((GetVersion() & 0xFF) >= 5) {
17
+ // Windows 2000 and later have GlobalMemoryStatusEx() which
18
+ // supports reporting values greater than 4 GiB. To keep the
19
+ @@ -107,6 +114,7 @@ tuklib_physmem(void)
20
+ GlobalMemoryStatus(&meminfo);
21
+ ret = meminfo.dwTotalPhys;
22
+ }
23
+ +#endif
24
+
25
+ #elif defined(__OS2__)
26
+ unsigned long mem;
third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/fix_config_include.patch ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 34c6aca00..7b3708ab2 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -401,6 +401,7 @@ if(WIN32)
6
+ if(BUILD_SHARED_LIBS)
7
+ # Add the Windows resource file for liblzma.dll.
8
+ target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc)
9
+ + target_include_directories(liblzma PRIVATE windows/vs2019)
10
+
11
+ # Export the public API symbols with __declspec(dllexport).
12
+ target_compile_definitions(liblzma PRIVATE DLL_EXPORT)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/portfile.cmake ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO xz-mirror/xz
4
+ REF v5.2.5
5
+ SHA512 686f01cfe33e2194766a856c48668c661b25eee194a443524f87ce3f866e0eb54914075b4e00185921516c5211db8cd5d2658f4b91f4a3580508656f776f468e
6
+ HEAD_REF master
7
+ PATCHES
8
+ enable-uwp-builds.patch
9
+ fix_config_include.patch
10
+ win_output_name.patch # Fix output name on Windows. Autotool build does not generate lib prefixed libraries on windows.
11
+ add_support_ios.patch # add install bundle info for support ios
12
+ )
13
+
14
+ vcpkg_cmake_configure(
15
+ SOURCE_PATH "${SOURCE_PATH}"
16
+ )
17
+ vcpkg_cmake_install()
18
+ vcpkg_copy_pdbs()
19
+
20
+ set(exec_prefix "\${prefix}")
21
+ set(libdir "\${prefix}/lib")
22
+ set(includedir "\${prefix}/include")
23
+ set(PACKAGE_URL https://tukaani.org/xz/)
24
+ set(PACKAGE_VERSION 5.2.5)
25
+ if(NOT VCPKG_TARGET_IS_WINDOWS)
26
+ set(PTHREAD_CFLAGS -pthread)
27
+ endif()
28
+ set(prefix "${CURRENT_INSTALLED_DIR}")
29
+ configure_file("${SOURCE_PATH}/src/liblzma/liblzma.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/liblzma.pc" @ONLY)
30
+ if (NOT VCPKG_BUILD_TYPE)
31
+ set(prefix "${CURRENT_INSTALLED_DIR}/debug")
32
+ configure_file("${SOURCE_PATH}/src/liblzma/liblzma.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/liblzma.pc" @ONLY)
33
+ endif()
34
+ vcpkg_fixup_pkgconfig()
35
+
36
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/liblzma)
37
+
38
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
39
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/lzma.h" "defined(LZMA_API_STATIC)" "1")
40
+ else()
41
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/lzma.h" "defined(LZMA_API_STATIC)" "0")
42
+ endif()
43
+
44
+ file(REMOVE_RECURSE
45
+ "${CURRENT_PACKAGES_DIR}/debug/include"
46
+ "${CURRENT_PACKAGES_DIR}/debug/share"
47
+ "${CURRENT_PACKAGES_DIR}/share/man"
48
+ )
49
+
50
+ set(TOOLS xz xzdec)
51
+ foreach(_tool IN LISTS TOOLS)
52
+ if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
53
+ list(REMOVE_ITEM TOOLS ${_tool})
54
+ endif()
55
+ endforeach()
56
+ if(TOOLS)
57
+ vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN)
58
+ endif()
59
+
60
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
61
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
62
+ endif()
63
+
64
+ file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
65
+ file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
66
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/usage ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ The package liblzma provides CMake targets:
2
+
3
+ find_package(LibLZMA REQUIRED)
4
+ target_link_libraries(main PRIVATE LibLZMA::LibLZMA)
5
+
6
+ or
7
+
8
+ find_package(liblzma CONFIG REQUIRED)
9
+ target_link_libraries(main PRIVATE liblzma::liblzma)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/vcpkg-cmake-wrapper.cmake ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_policy(PUSH)
2
+ cmake_policy(SET CMP0012 NEW)
3
+ cmake_policy(SET CMP0057 NEW)
4
+ set(z_vcpkg_liblzma_fixup_needed 0)
5
+ if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS AND NOT CMAKE_DISABLE_FIND_PACKAGE_LibLZMA)
6
+ get_filename_component(z_vcpkg_liblzma_prefix "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
7
+ get_filename_component(z_vcpkg_liblzma_prefix "${z_vcpkg_liblzma_prefix}" DIRECTORY)
8
+ find_path(LIBLZMA_INCLUDE_DIR NAMES lzma.h PATHS "${z_vcpkg_liblzma_prefix}/include" NO_DEFAULT_PATH)
9
+ # liblzma doesn't use a debug postfix, but FindLibLZMA.cmake expects it
10
+ find_library(LIBLZMA_LIBRARY_RELEASE NAMES lzma PATHS "${z_vcpkg_liblzma_prefix}/lib" NO_DEFAULT_PATH)
11
+ find_library(LIBLZMA_LIBRARY_DEBUG NAMES lzma PATHS "${z_vcpkg_liblzma_prefix}/debug/lib" NO_DEFAULT_PATH)
12
+ unset(z_vcpkg_liblzma_prefix)
13
+ if(CMAKE_VERSION VERSION_LESS 3.16)
14
+ # Older versions of FindLibLZMA.cmake need a single lib in LIBLZMA_LIBRARY.
15
+ set(z_vcpkg_liblzma_fixup_needed 1)
16
+ set(LIBLZMA_LIBRARY "${LIBLZMA_LIBRARY_RELEASE}")
17
+ elseif(NOT TARGET LibLZMA::LibLZMA)
18
+ set(z_vcpkg_liblzma_fixup_needed 1)
19
+ endif()
20
+ # Known values, and required. Skip expensive tests.
21
+ set(LIBLZMA_HAS_AUTO_DECODER 1 CACHE INTERNAL "")
22
+ set(LIBLZMA_HAS_EASY_ENCODER 1 CACHE INTERNAL "")
23
+ set(LIBLZMA_HAS_LZMA_PRESET 1 CACHE INTERNAL "")
24
+ endif()
25
+
26
+ _find_package(${ARGS})
27
+
28
+ if(z_vcpkg_liblzma_fixup_needed)
29
+ include(SelectLibraryConfigurations)
30
+ select_library_configurations(LIBLZMA)
31
+ if(NOT TARGET LibLZMA::LibLZMA)
32
+ # Backfill LibLZMA::LibLZMA to versions of cmake before 3.14
33
+ add_library(LibLZMA::LibLZMA UNKNOWN IMPORTED)
34
+ if(DEFINED LIBLZMA_INCLUDE_DIRS)
35
+ set_target_properties(LibLZMA::LibLZMA PROPERTIES
36
+ INTERFACE_INCLUDE_DIRECTORIES "${LIBLZMA_INCLUDE_DIRS}")
37
+ endif()
38
+ set_property(TARGET LibLZMA::LibLZMA APPEND PROPERTY
39
+ IMPORTED_CONFIGURATIONS RELEASE)
40
+ set_target_properties(LibLZMA::LibLZMA PROPERTIES
41
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
42
+ IMPORTED_LOCATION_RELEASE "${LIBLZMA_LIBRARY_RELEASE}")
43
+ if(EXISTS "${LIBLZMA_LIBRARY}")
44
+ set_target_properties(LibLZMA::LibLZMA PROPERTIES
45
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
46
+ IMPORTED_LOCATION "${LIBLZMA_LIBRARY}")
47
+ endif()
48
+ endif()
49
+ if(LIBLZMA_LIBRARY_DEBUG)
50
+ # Backfill debug variant to versions of cmake before 3.16
51
+ set_property(TARGET LibLZMA::LibLZMA APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
52
+ set_target_properties(LibLZMA::LibLZMA PROPERTIES IMPORTED_LOCATION_DEBUG "${LIBLZMA_LIBRARY_DEBUG}")
53
+ endif()
54
+ endif()
55
+ if(LIBLZMA_LIBRARIES AND NOT "Threads::Threads" IN_LIST LIBLZMA_LIBRARIES)
56
+ set(THREADS_PREFER_PTHREAD_FLAG TRUE)
57
+ find_package(Threads)
58
+ list(APPEND LIBLZMA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
59
+ if(TARGET LibLZMA::LibLZMA)
60
+ set_property(TARGET LibLZMA::LibLZMA APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)
61
+ endif()
62
+ endif()
63
+ unset(z_vcpkg_liblzma_fixup_needed)
64
+ cmake_policy(POP)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/vcpkg.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "liblzma",
3
+ "version-semver": "5.2.5",
4
+ "port-version": 5,
5
+ "description": "Compression library with an API similar to that of zlib.",
6
+ "homepage": "https://github.com/xz-mirror/xz",
7
+ "license": null,
8
+ "dependencies": [
9
+ {
10
+ "name": "vcpkg-cmake",
11
+ "host": true
12
+ },
13
+ {
14
+ "name": "vcpkg-cmake-config",
15
+ "host": true
16
+ }
17
+ ]
18
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/liblzma/win_output_name.patch ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index e80b524..cddbccb 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -429,8 +429,11 @@ set_target_properties(liblzma PROPERTIES
6
+
7
+ # It's liblzma.so or liblzma.dll, not libliblzma.so or lzma.dll.
8
+ # Avoid the name lzma.dll because it would conflict with LZMA SDK.
9
+ - PREFIX ""
10
+ + OUTPUT_NAME lzma
11
+ )
12
+ +if(WIN32 AND NOT MINGW)
13
+ + set_target_properties(liblzma PROPERTIES RUNTIME_OUTPUT_NAME liblzma)
14
+ +endif()
15
+
16
+ # Create liblzmaConfigVersion.cmake.
17
+ #
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmad/0001-Fix-MSVC-ARM.patch ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/mad.h b/mad.h
2
+ index 9ef6cc8..5e3f7aa 100644
3
+ --- a/mad.h
4
+ +++ b/mad.h
5
+ @@ -24,7 +24,11 @@
6
+ extern "C" {
7
+ # endif
8
+
9
+ +#ifdef _WIN64
10
+ +# define FPM_64BIT
11
+ +#else
12
+ # define FPM_INTEL
13
+ +#endif
14
+
15
+
16
+
17
+ @@ -184,7 +188,7 @@ typedef mad_fixed_t mad_sample_t;
18
+
19
+ # elif defined(FPM_INTEL)
20
+
21
+ -# if defined(_MSC_VER)
22
+ +# if defined(_MSC_VER) && defined(_M_IX86)
23
+ # pragma warning(push)
24
+ # pragma warning(disable: 4035) /* no return value */
25
+ static __forceinline
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmad/CMakeLists.txt ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 2.8)
2
+
3
+ project(libmad)
4
+
5
+ set(SOURCES
6
+ bit.c
7
+ bit.h
8
+ config.h
9
+ decoder.c
10
+ decoder.h
11
+ fixed.c
12
+ fixed.h
13
+ frame.c
14
+ frame.h
15
+ global.h
16
+ huffman.c
17
+ huffman.h
18
+ layer12.c
19
+ layer12.h
20
+ layer3.c
21
+ layer3.h
22
+ mad.h
23
+ stream.c
24
+ stream.h
25
+ synth.c
26
+ synth.h
27
+ timer.c
28
+ timer.h
29
+ version.c
30
+ version.h
31
+ )
32
+
33
+ add_library(
34
+ mad
35
+ ${SOURCES}
36
+ )
37
+
38
+ target_compile_definitions(mad
39
+ PRIVATE _LIB _MBCS ASO_ZEROCHECK HAVE_CONFIG_H FPM_DEFAULT
40
+ PRIVATE _CRT_SECURE_NO_WARNINGS
41
+ )
42
+
43
+ install(
44
+ TARGETS mad
45
+ RUNTIME DESTINATION bin
46
+ LIBRARY DESTINATION lib
47
+ ARCHIVE DESTINATION lib
48
+ )
49
+
50
+ install(
51
+ FILES mad.h
52
+ DESTINATION include
53
+ )
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmad/portfile.cmake ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2
+
3
+ vcpkg_from_sourceforge(
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO mad/libmad
6
+ REF 0.15.1b
7
+ FILENAME "libmad-0.15.1b.tar.gz"
8
+ SHA512 2cad30347fb310dc605c46bacd9da117f447a5cabedd8fefdb24ab5de641429e5ec5ce8af7aefa6a75a3f545d3adfa255e3fa0a2d50971f76bc0c4fc0400cc45
9
+ PATCHES 0001-Fix-MSVC-ARM.patch
10
+ )
11
+
12
+ #The archive only contains a Visual Studio 6.0 era DSP project file, so use a custom CMakeLists.txt
13
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
14
+
15
+ #Use the msvc++ config.h header
16
+ file(COPY ${SOURCE_PATH}/msvc++/config.h DESTINATION ${SOURCE_PATH})
17
+
18
+ vcpkg_configure_cmake(
19
+ SOURCE_PATH ${SOURCE_PATH}
20
+ PREFER_NINJA
21
+ )
22
+
23
+ vcpkg_install_cmake()
24
+ vcpkg_copy_pdbs()
25
+
26
+ file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmad)
27
+ file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmad/COPYING ${CURRENT_PACKAGES_DIR}/share/libmad/copyright)
28
+
29
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmad/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmad",
3
+ "version-string": "0.15.1",
4
+ "port-version": 9,
5
+ "description": "high-quality MPEG audio decoder",
6
+ "homepage": "http://www.mars.org/home/rob/proj/mpeg/"
7
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0001-Use-libtre.patch ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From e6e59f41c082be94c4fef007e276b1dffe7dc240 Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sat, 8 May 2021 19:28:01 +0700
4
+ Subject: [PATCH 01/14] Use libtre
5
+
6
+ ---
7
+ configure.ac | 2 +-
8
+ src/Makefile.am | 2 +-
9
+ src/file.h | 2 +-
10
+ 3 files changed, 3 insertions(+), 3 deletions(-)
11
+
12
+ diff --git a/configure.ac b/configure.ac
13
+ index 02eac8f..b05c334 100644
14
+ --- a/configure.ac
15
+ +++ b/configure.ac
16
+ @@ -185,7 +185,7 @@ if test "$enable_libseccomp" != "no"; then
17
+ AC_CHECK_LIB(seccomp, seccomp_init)
18
+ fi
19
+ if test "$MINGW" = 1; then
20
+ - AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW]))
21
+ + AC_SEARCH_LIBS(tre_regexec,tre,,AC_MSG_ERROR([libtre is required to build file(1) with MinGW]))
22
+ fi
23
+
24
+ dnl See if we are cross-compiling
25
+ diff --git a/src/Makefile.am b/src/Makefile.am
26
+ index 3f67f2c..34781b9 100644
27
+ --- a/src/Makefile.am
28
+ +++ b/src/Makefile.am
29
+ @@ -13,7 +13,7 @@ libmagic_la_SOURCES = buffer.c magic.c apprentice.c softmagic.c ascmagic.c \
30
+ file_opts.h elfclass.h mygetopt.h cdf.c cdf_time.c readcdf.c cdf.h
31
+ libmagic_la_LDFLAGS = -no-undefined -version-info 1:0:0
32
+ if MINGW
33
+ -MINGWLIBS = -lgnurx -lshlwapi
34
+ +MINGWLIBS = -lshlwapi
35
+ else
36
+ MINGWLIBS =
37
+ endif
38
+ diff --git a/src/file.h b/src/file.h
39
+ index c548e97..299ac0c 100644
40
+ --- a/src/file.h
41
+ +++ b/src/file.h
42
+ @@ -79,7 +79,7 @@
43
+ #include <stdio.h> /* Include that here, to make sure __P gets defined */
44
+ #include <errno.h>
45
+ #include <fcntl.h> /* For open and flags */
46
+ -#include <regex.h>
47
+ +#include <tre/regex.h>
48
+ #include <time.h>
49
+ #include <sys/types.h>
50
+ #ifndef WIN32
51
+ --
52
+ 2.29.2.windows.2
53
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0002-Change-zlib-lib-name-to-match-CMake-output.patch ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 2fa43ece9ec7564e1fbb9867bb5852b834643aa4 Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sat, 8 May 2021 19:36:11 +0700
4
+ Subject: [PATCH 02/14] Change zlib lib name to match CMake output
5
+
6
+ ---
7
+ configure.ac | 6 +++---
8
+ 1 file changed, 3 insertions(+), 3 deletions(-)
9
+
10
+ diff --git a/configure.ac b/configure.ac
11
+ index b05c334..dd4063c 100644
12
+ --- a/configure.ac
13
+ +++ b/configure.ac
14
+ @@ -173,7 +173,7 @@ AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r
15
+
16
+ dnl Checks for libraries
17
+ if test "$enable_zlib" != "no"; then
18
+ - AC_CHECK_LIB(z, gzopen)
19
+ + AC_SEARCH_LIBS(gzopen, [z zlib zlibd], have_zlib = "yes", have_zlib = "no")
20
+ fi
21
+ if test "$enable_bzlib" != "no"; then
22
+ AC_CHECK_LIB(bz2, BZ2_bzCompressInit)
23
+ @@ -193,11 +193,11 @@ AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes)
24
+
25
+ dnl Final sanity checks
26
+ if test "$enable_zlib" = "yes"; then
27
+ - if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then
28
+ + if test "$ac_cv_header_zlib_h$have_zlib" != "yesyes"; then
29
+ AC_MSG_ERROR([zlib support requested but not found])
30
+ fi
31
+ fi
32
+ -if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then
33
+ +if test "$ac_cv_header_zlib_h$have_zlib" = "yesyes"; then
34
+ AC_DEFINE([ZLIBSUPPORT], 1, [Enable zlib compression support])
35
+ fi
36
+ if test "$enable_bzlib" = "yes"; then
37
+ --
38
+ 2.29.2.windows.2
39
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0003-Fix-WIN32-macro-checks.patch ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 2fffeb273ea46c1e91536f3d660982de785c8d49 Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sat, 8 May 2021 20:52:59 +0700
4
+ Subject: [PATCH 03/14] Fix WIN32 macro checks
5
+
6
+ ---
7
+ src/file.h | 6 +++---
8
+ 1 file changed, 3 insertions(+), 3 deletions(-)
9
+
10
+ diff --git a/src/file.h b/src/file.h
11
+ index 299ac0c..2c365a6 100644
12
+ --- a/src/file.h
13
+ +++ b/src/file.h
14
+ @@ -82,7 +82,7 @@
15
+ #include <tre/regex.h>
16
+ #include <time.h>
17
+ #include <sys/types.h>
18
+ -#ifndef WIN32
19
+ +#ifndef _WIN32
20
+ #include <sys/param.h>
21
+ #endif
22
+ /* Do this here and now, because struct stat gets re-defined on solaris */
23
+ @@ -95,7 +95,7 @@
24
+ #define MAGIC "/etc/magic"
25
+ #endif
26
+
27
+ -#if defined(__EMX__) || defined (WIN32)
28
+ +#if defined(__EMX__) || defined (_WIN32)
29
+ #define PATHSEP ';'
30
+ #else
31
+ #define PATHSEP ':'
32
+ @@ -103,7 +103,7 @@
33
+
34
+ #define private static
35
+
36
+ -#if HAVE_VISIBILITY && !defined(WIN32)
37
+ +#if HAVE_VISIBILITY && !defined(_WIN32)
38
+ #define public __attribute__ ((__visibility__("default")))
39
+ #ifndef protected
40
+ #define protected __attribute__ ((__visibility__("hidden")))
41
+ --
42
+ 2.29.2.windows.2
43
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0004-Typedef-POSIX-types-on-Windows.patch ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From eb3dde2954dacd86ec7490540eb9b7e3530b917b Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sat, 8 May 2021 20:12:55 +0700
4
+ Subject: [PATCH 04/14] Typedef POSIX types on Windows
5
+
6
+ ---
7
+ src/file.h | 6 ++++++
8
+ 1 file changed, 6 insertions(+)
9
+
10
+ diff --git a/src/file.h b/src/file.h
11
+ index 2c365a6..0332506 100644
12
+ --- a/src/file.h
13
+ +++ b/src/file.h
14
+ @@ -425,6 +425,12 @@ struct cont {
15
+
16
+ #define MAGIC_SETS 2
17
+
18
+ +#ifdef _MSC_VER
19
+ +#include <BaseTsd.h>
20
+ +typedef int mode_t;
21
+ +typedef SSIZE_T ssize_t;
22
+ +#endif
23
+ +
24
+ struct magic_set {
25
+ struct mlist *mlist[MAGIC_SETS]; /* list of regular entries */
26
+ struct cont c;
27
+ --
28
+ 2.29.2.windows.2
29
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0005-Include-dirent.h-for-S_ISREG-and-S_ISDIR.patch ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From a8f8fbfc2736419c65992cbf24de963c3b1f3107 Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sat, 8 May 2021 22:07:55 +0700
4
+ Subject: [PATCH 05/14] Include dirent.h for S_ISREG and S_ISDIR
5
+
6
+ ---
7
+ src/file.h | 1 +
8
+ 1 file changed, 1 insertion(+)
9
+
10
+ diff --git a/src/file.h b/src/file.h
11
+ index 0332506..4aa9f60 100644
12
+ --- a/src/file.h
13
+ +++ b/src/file.h
14
+ @@ -88,6 +88,7 @@
15
+ /* Do this here and now, because struct stat gets re-defined on solaris */
16
+ #include <sys/stat.h>
17
+ #include <stdarg.h>
18
+ +#include <dirent.h>
19
+
20
+ #define ENABLE_CONDITIONALS
21
+
22
+ --
23
+ 2.29.2.windows.2
24
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0006-Remove-Wrap-POSIX-headers.patch ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From b20c8e62851f3cb53083a3e7811518092f98dc26 Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sat, 8 May 2021 22:47:32 +0700
4
+ Subject: [PATCH 06/14] Remove/Wrap POSIX headers
5
+
6
+ ---
7
+ src/buffer.c | 2 ++
8
+ src/cdf.c | 2 ++
9
+ src/dprintf.c | 2 ++
10
+ src/file.c | 1 -
11
+ src/getline.c | 2 ++
12
+ src/is_csv.c | 2 ++
13
+ src/is_json.c | 2 ++
14
+ src/magic.c | 2 ++
15
+ src/memtest.c | 2 ++
16
+ src/mygetopt.h | 2 ++
17
+ src/pread.c | 2 ++
18
+ src/readcdf.c | 2 ++
19
+ 12 files changed, 22 insertions(+), 1 deletion(-)
20
+
21
+ diff --git a/src/buffer.c b/src/buffer.c
22
+ index 227015a..f3d8efa 100644
23
+ --- a/src/buffer.c
24
+ +++ b/src/buffer.c
25
+ @@ -31,7 +31,9 @@ FILE_RCSID("@(#)$File: buffer.c,v 1.8 2020/02/16 15:52:49 christos Exp $")
26
+ #endif /* lint */
27
+
28
+ #include "magic.h"
29
+ +#ifdef HAVE_UNISTD_H
30
+ #include <unistd.h>
31
+ +#endif
32
+ #include <string.h>
33
+ #include <stdlib.h>
34
+ #include <sys/stat.h>
35
+ diff --git a/src/cdf.c b/src/cdf.c
36
+ index bb81d63..dc9ec56 100644
37
+ --- a/src/cdf.c
38
+ +++ b/src/cdf.c
39
+ @@ -43,7 +43,9 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.116 2019/08/26 14:31:39 christos Exp $")
40
+ #include <err.h>
41
+ #endif
42
+ #include <stdlib.h>
43
+ +#ifdef HAVE_UNISTD_H
44
+ #include <unistd.h>
45
+ +#endif
46
+ #include <string.h>
47
+ #include <time.h>
48
+ #include <ctype.h>
49
+ diff --git a/src/dprintf.c b/src/dprintf.c
50
+ index 027a64f..873c547 100644
51
+ --- a/src/dprintf.c
52
+ +++ b/src/dprintf.c
53
+ @@ -32,7 +32,9 @@ FILE_RCSID("@(#)$File: dprintf.c,v 1.2 2018/09/09 20:33:28 christos Exp $")
54
+ #endif /* lint */
55
+
56
+ #include <assert.h>
57
+ +#ifdef HAVE_UNISTD_H
58
+ #include <unistd.h>
59
+ +#endif
60
+ #include <stdio.h>
61
+ #include <stdarg.h>
62
+
63
+ diff --git a/src/file.c b/src/file.c
64
+ index 87b9ab1..2889f8a 100644
65
+ --- a/src/file.c
66
+ +++ b/src/file.c
67
+ @@ -38,7 +38,6 @@ FILE_RCSID("@(#)$File: file.c,v 1.189 2021/02/05 21:33:49 christos Exp $")
68
+ #include "magic.h"
69
+
70
+ #include <stdlib.h>
71
+ -#include <unistd.h>
72
+ #include <string.h>
73
+ #ifdef RESTORE_TIME
74
+ # if (__COHERENT__ >= 0x420)
75
+ diff --git a/src/getline.c b/src/getline.c
76
+ index b00de01..c2d41ca 100644
77
+ --- a/src/getline.c
78
+ +++ b/src/getline.c
79
+ @@ -33,7 +33,9 @@
80
+ #if !HAVE_GETLINE
81
+ #include <stdlib.h>
82
+ #include <stdio.h>
83
+ +#ifdef HAVE_UNISTD_H
84
+ #include <unistd.h>
85
+ +#endif
86
+ #include <errno.h>
87
+ #include <string.h>
88
+
89
+ diff --git a/src/is_csv.c b/src/is_csv.c
90
+ index 937ab5f..2f704c5 100644
91
+ --- a/src/is_csv.c
92
+ +++ b/src/is_csv.c
93
+ @@ -166,7 +166,9 @@ file_is_csv(struct magic_set *ms, const struct buffer *b, int looks_text)
94
+ #include <sys/stat.h>
95
+ #include <stdio.h>
96
+ #include <fcntl.h>
97
+ +#ifdef HAVE_UNISTD_H
98
+ #include <unistd.h>
99
+ +#endif
100
+ #include <stdlib.h>
101
+ #include <stdint.h>
102
+ #include <err.h>
103
+ diff --git a/src/is_json.c b/src/is_json.c
104
+ index 0b12438..997a276 100644
105
+ --- a/src/is_json.c
106
+ +++ b/src/is_json.c
107
+ @@ -436,7 +436,9 @@ file_is_json(struct magic_set *ms, const struct buffer *b)
108
+ #include <sys/stat.h>
109
+ #include <stdio.h>
110
+ #include <fcntl.h>
111
+ +#ifdef HAVE_UNISTD_H
112
+ #include <unistd.h>
113
+ +#endif
114
+ #include <stdlib.h>
115
+ #include <stdint.h>
116
+ #include <err.h>
117
+ diff --git a/src/magic.c b/src/magic.c
118
+ index 81a0840..e9aeafa 100644
119
+ --- a/src/magic.c
120
+ +++ b/src/magic.c
121
+ @@ -39,7 +39,9 @@ FILE_RCSID("@(#)$File: magic.c,v 1.114 2021/02/05 21:33:49 christos Exp $")
122
+ #include "magic.h"
123
+
124
+ #include <stdlib.h>
125
+ +#ifdef HAVE_UNISTD_H
126
+ #include <unistd.h>
127
+ +#endif
128
+ #include <string.h>
129
+ #ifdef QUICK
130
+ #include <sys/mman.h>
131
+ diff --git a/src/memtest.c b/src/memtest.c
132
+ index f9506f6..ea50242 100644
133
+ --- a/src/memtest.c
134
+ +++ b/src/memtest.c
135
+ @@ -34,7 +34,9 @@
136
+ #include <stdlib.h>
137
+ #include <err.h>
138
+ #include <fcntl.h>
139
+ +#ifdef HAVE_UNISTD_H
140
+ #include <unistd.h>
141
+ +#endif
142
+ #include <dlfcn.h>
143
+ #include <magic.h>
144
+
145
+ diff --git a/src/mygetopt.h b/src/mygetopt.h
146
+ index d766762..b8e044c 100644
147
+ --- a/src/mygetopt.h
148
+ +++ b/src/mygetopt.h
149
+ @@ -39,7 +39,9 @@
150
+ #ifndef _GETOPT_H_
151
+ #define _GETOPT_H_
152
+
153
+ +#ifdef HAVE_UNISTD_H
154
+ #include <unistd.h>
155
+ +#endif
156
+
157
+ /*
158
+ * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
159
+ diff --git a/src/pread.c b/src/pread.c
160
+ index 3ab52d1..fc48d84 100644
161
+ --- a/src/pread.c
162
+ +++ b/src/pread.c
163
+ @@ -3,7 +3,9 @@
164
+ FILE_RCSID("@(#)$File: pread.c,v 1.2 2013/04/02 16:23:07 christos Exp $")
165
+ #endif /* lint */
166
+ #include <fcntl.h>
167
+ +#ifdef HAVE_UNISTD_H
168
+ #include <unistd.h>
169
+ +#endif
170
+
171
+ ssize_t
172
+ pread(int fd, void *buf, size_t len, off_t off) {
173
+ diff --git a/src/readcdf.c b/src/readcdf.c
174
+ index 7622c7b..977cb75 100644
175
+ --- a/src/readcdf.c
176
+ +++ b/src/readcdf.c
177
+ @@ -31,7 +31,9 @@ FILE_RCSID("@(#)$File: readcdf.c,v 1.74 2019/09/11 15:46:30 christos Exp $")
178
+
179
+ #include <assert.h>
180
+ #include <stdlib.h>
181
+ +#ifdef HAVE_UNISTD_H
182
+ #include <unistd.h>
183
+ +#endif
184
+ #include <string.h>
185
+ #include <time.h>
186
+ #include <ctype.h>
187
+ --
188
+ 2.29.2.windows.2
189
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 1106d1523ed44bcbcca90fc1fe9fa9400777d8fe Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sun, 9 May 2021 10:28:49 +0700
4
+ Subject: [PATCH 07/14] Substitute unistd macros for MSVC
5
+
6
+ ---
7
+ src/file.h | 7 +++++++
8
+ 1 file changed, 7 insertions(+)
9
+
10
+ diff --git a/src/file.h b/src/file.h
11
+ index 4aa9f60..5da838c 100644
12
+ --- a/src/file.h
13
+ +++ b/src/file.h
14
+ @@ -85,6 +85,13 @@
15
+ #ifndef _WIN32
16
+ #include <sys/param.h>
17
+ #endif
18
+ +#ifdef _MSC_VER
19
+ +#include <io.h>
20
+ +#define R_OK 4
21
+ +#define W_OK 2
22
+ +#define X_OK R_OK
23
+ +#define F_OK 0
24
+ +#endif
25
+ /* Do this here and now, because struct stat gets re-defined on solaris */
26
+ #include <sys/stat.h>
27
+ #include <stdarg.h>
28
+ --
29
+ 2.29.2.windows.2
30
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0008-Add-FILENO-defines.patch ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From e449e3fb47aee00f0d82782183cc7fd6b446d27b Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sun, 9 May 2021 13:24:42 +0700
4
+ Subject: [PATCH 08/14] Add FILENO defines
5
+
6
+ ---
7
+ src/file.h | 3 +++
8
+ 1 file changed, 3 insertions(+)
9
+
10
+ diff --git a/src/file.h b/src/file.h
11
+ index 5da838c..ccfe0da 100644
12
+ --- a/src/file.h
13
+ +++ b/src/file.h
14
+ @@ -91,6 +91,9 @@
15
+ #define W_OK 2
16
+ #define X_OK R_OK
17
+ #define F_OK 0
18
+ +#define STDIN_FILENO _fileno(stdin)
19
+ +#define STDOUT_FILENO _fileno(stdout)
20
+ +#define STDERR_FILENO _fileno(stderr)
21
+ #endif
22
+ /* Do this here and now, because struct stat gets re-defined on solaris */
23
+ #include <sys/stat.h>
24
+ --
25
+ 2.29.2.windows.2
26
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0009-No-fcntl-in-magic.c.patch ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 6d10bef865b69764f6e0ddd2b0f6a84e484cdb37 Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sun, 9 May 2021 13:25:14 +0700
4
+ Subject: [PATCH 09/14] No fcntl in magic.c
5
+
6
+ ---
7
+ src/magic.c | 2 +-
8
+ 1 file changed, 1 insertion(+), 1 deletion(-)
9
+
10
+ diff --git a/src/magic.c b/src/magic.c
11
+ index e9aeafa..382bd96 100644
12
+ --- a/src/magic.c
13
+ +++ b/src/magic.c
14
+ @@ -462,7 +462,7 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd)
15
+ rv = 0;
16
+ goto done;
17
+ }
18
+ -#if O_CLOEXEC == 0
19
+ +#if O_CLOEXEC == 0 && !defined(_WIN32)
20
+ (void)fcntl(fd, F_SETFD, FD_CLOEXEC);
21
+ #endif
22
+ }
23
+ --
24
+ 2.29.2.windows.2
25
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0010-Properly-check-for-the-presence-of-bitmasks.patch ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From a6bc98ce25cd9d9dba896e93ed441ff162f6793b Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sun, 9 May 2021 17:43:20 +0700
4
+ Subject: [PATCH 10/14] Properly check for the presence of bitmasks
5
+
6
+ ---
7
+ src/fsmagic.c | 24 ++++++++++++------------
8
+ 1 file changed, 12 insertions(+), 12 deletions(-)
9
+
10
+ diff --git a/src/fsmagic.c b/src/fsmagic.c
11
+ index 5204f20..7244841 100644
12
+ --- a/src/fsmagic.c
13
+ +++ b/src/fsmagic.c
14
+ @@ -66,7 +66,7 @@ FILE_RCSID("@(#)$File: fsmagic.c,v 1.81 2019/07/16 13:30:32 christos Exp $")
15
+ # define minor(dev) ((dev) & 0xff)
16
+ #endif
17
+ #undef HAVE_MAJOR
18
+ -#ifdef S_IFLNK
19
+ +#if S_IFLNK != 0
20
+ private int
21
+ bad_link(struct magic_set *ms, int err, char *buf)
22
+ {
23
+ @@ -108,7 +108,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
24
+ int ret, did = 0;
25
+ int mime = ms->flags & MAGIC_MIME;
26
+ int silent = ms->flags & (MAGIC_APPLE|MAGIC_EXTENSION);
27
+ -#ifdef S_IFLNK
28
+ +#if S_IFLNK != 0
29
+ char buf[BUFSIZ+4];
30
+ ssize_t nch;
31
+ struct stat tstatbuf;
32
+ @@ -122,7 +122,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
33
+ * Fstat is cheaper but fails for files you don't have read perms on.
34
+ * On 4.2BSD and similar systems, use lstat() to identify symlinks.
35
+ */
36
+ -#ifdef S_IFLNK
37
+ +#if S_IFLNK != 0
38
+ if ((ms->flags & MAGIC_SYMLINK) == 0)
39
+ ret = lstat(fn, sb);
40
+ else
41
+ @@ -171,17 +171,17 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
42
+
43
+ ret = 1;
44
+ if (!mime && !silent) {
45
+ -#ifdef S_ISUID
46
+ +#if S_ISUID != 0
47
+ if (sb->st_mode & S_ISUID)
48
+ if (file_printf(ms, "%ssetuid", COMMA) == -1)
49
+ return -1;
50
+ #endif
51
+ -#ifdef S_ISGID
52
+ +#if S_ISGID != 0
53
+ if (sb->st_mode & S_ISGID)
54
+ if (file_printf(ms, "%ssetgid", COMMA) == -1)
55
+ return -1;
56
+ #endif
57
+ -#ifdef S_ISVTX
58
+ +#if S_ISVTX != 0
59
+ if (sb->st_mode & S_ISVTX)
60
+ if (file_printf(ms, "%ssticky", COMMA) == -1)
61
+ return -1;
62
+ @@ -197,7 +197,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
63
+ } else if (file_printf(ms, "%sdirectory", COMMA) == -1)
64
+ return -1;
65
+ break;
66
+ -#ifdef S_IFCHR
67
+ +#if S_IFCHR != 0
68
+ case S_IFCHR:
69
+ /*
70
+ * If -s has been specified, treat character special files
71
+ @@ -232,7 +232,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
72
+ }
73
+ break;
74
+ #endif
75
+ -#ifdef S_IFBLK
76
+ +#if S_IFBLK != 0
77
+ case S_IFBLK:
78
+ /*
79
+ * If -s has been specified, treat block special files
80
+ @@ -268,7 +268,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
81
+ break;
82
+ #endif
83
+ /* TODO add code to handle V7 MUX and Blit MUX files */
84
+ -#ifdef S_IFIFO
85
+ +#if S_IFIFO != 0
86
+ case S_IFIFO:
87
+ if((ms->flags & MAGIC_DEVICES) != 0)
88
+ break;
89
+ @@ -280,7 +280,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
90
+ return -1;
91
+ break;
92
+ #endif
93
+ -#ifdef S_IFDOOR
94
+ +#if S_IFDOOR != 0
95
+ case S_IFDOOR:
96
+ if (mime) {
97
+ if (handle_mime(ms, mime, "door") == -1)
98
+ @@ -290,7 +290,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
99
+ return -1;
100
+ break;
101
+ #endif
102
+ -#ifdef S_IFLNK
103
+ +#if S_IFLNK != 0
104
+ case S_IFLNK:
105
+ if ((nch = readlink(fn, buf, BUFSIZ-1)) <= 0) {
106
+ if (ms->flags & MAGIC_ERROR) {
107
+ @@ -378,7 +378,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
108
+ }
109
+ break;
110
+ #endif
111
+ -#ifdef S_IFSOCK
112
+ +#if S_IFSOCK != 0
113
+ #ifndef __COHERENT__
114
+ case S_IFSOCK:
115
+ if (mime) {
116
+ --
117
+ 2.29.2.windows.2
118
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0011-Remove-pipe-related-functions-in-funcs.c.patch ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 15b0f505ff9eefd41b74ffdd4230355e933263ca Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Sun, 9 May 2021 17:45:50 +0700
4
+ Subject: [PATCH 11/14] Remove pipe related functions in funcs.c
5
+
6
+ ---
7
+ src/funcs.c | 2 ++
8
+ 1 file changed, 2 insertions(+)
9
+
10
+ diff --git a/src/funcs.c b/src/funcs.c
11
+ index b926625..b585486 100644
12
+ --- a/src/funcs.c
13
+ +++ b/src/funcs.c
14
+ @@ -809,6 +809,7 @@ file_print_guid(char *str, size_t len, const uint64_t *guid)
15
+ g->data4[6], g->data4[7]);
16
+ }
17
+
18
+ +#ifndef _WIN32
19
+ protected int
20
+ file_pipe_closexec(int *fds)
21
+ {
22
+ @@ -827,6 +828,7 @@ protected int
23
+ file_clear_closexec(int fd) {
24
+ return fcntl(fd, F_SETFD, 0);
25
+ }
26
+ +#endif
27
+
28
+ protected char *
29
+ file_strtrim(char *str)
30
+ --
31
+ 2.29.2.windows.2
32
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0012-Convert-MSYS2-paths-to-Windows-paths.patch ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From f0139ced57c1579450f3d09b6e3ae0159aae031b Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Mon, 10 May 2021 08:43:28 +0700
4
+ Subject: [PATCH 12/14] Convert MSYS2 paths to Windows paths
5
+
6
+ ---
7
+ src/Makefile.am | 3 +++
8
+ 1 file changed, 3 insertions(+)
9
+
10
+ diff --git a/src/Makefile.am b/src/Makefile.am
11
+ index 34781b9..26f853f 100644
12
+ --- a/src/Makefile.am
13
+ +++ b/src/Makefile.am
14
+ @@ -1,4 +1,7 @@
15
+ MAGIC = $(pkgdatadir)/magic
16
+ +if MINGW
17
+ +MAGIC != cygpath -m -a -l '$(MAGIC)'
18
+ +endif
19
+ lib_LTLIBRARIES = libmagic.la
20
+ nodist_include_HEADERS = magic.h
21
+
22
+ --
23
+ 2.29.2.windows.2
24
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0013-Check-for-backslash-in-argv-0-on-Windows.patch ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 3f10c7d31627b64b068b84ba72e706991f672560 Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Fri, 14 May 2021 08:14:05 +0700
4
+ Subject: [PATCH 13/14] Check for backslash in argv[0] on Windows
5
+
6
+ ---
7
+ magic/Makefile.am | 2 +-
8
+ src/file.c | 5 +++++
9
+ 2 files changed, 6 insertions(+), 1 deletion(-)
10
+
11
+ diff --git a/magic/Makefile.am b/magic/Makefile.am
12
+ index 0eb5865..170bbab 100644
13
+ --- a/magic/Makefile.am
14
+ +++ b/magic/Makefile.am
15
+ @@ -353,7 +353,7 @@ ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
16
+ @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \
17
+ echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \
18
+ else \
19
+ - v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \
20
+ + v=$$(${FILE_COMPILE} --version | sed -e s/file${EXEEXT}-// -e q); \
21
+ if [ "$$v" != "${PACKAGE_VERSION}" ]; then \
22
+ echo "Cannot use the installed version of file ($$v) to"; \
23
+ echo "cross-compile file ${PACKAGE_VERSION}"; \
24
+ diff --git a/src/file.c b/src/file.c
25
+ index 2889f8a..12a604b 100644
26
+ --- a/src/file.c
27
+ +++ b/src/file.c
28
+ @@ -200,6 +200,11 @@ main(int argc, char *argv[])
29
+ _wildcard(&argc, &argv);
30
+ #endif
31
+
32
+ +#ifdef _WIN32
33
+ + if ((progname = strrchr(argv[0], '\\')) != NULL)
34
+ + progname++;
35
+ + else
36
+ +#endif
37
+ if ((progname = strrchr(argv[0], '/')) != NULL)
38
+ progname++;
39
+ else
40
+ --
41
+ 2.29.2.windows.2
42
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0014-Define-POSIX-macros-if-missing.patch ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From fa0e11f36bb0e322250e1e488ced9f2bf166874f Mon Sep 17 00:00:00 2001
2
+ From: Long Nguyen <[email protected]>
3
+ Date: Fri, 14 May 2021 18:11:39 +0700
4
+ Subject: [PATCH 14/14] Define POSIX macros if missing
5
+
6
+ ---
7
+ src/file.h | 15 +++++++++++++++
8
+ 1 file changed, 15 insertions(+)
9
+
10
+ diff --git a/src/file.h b/src/file.h
11
+ index ccfe0da..98cd37b 100644
12
+ --- a/src/file.h
13
+ +++ b/src/file.h
14
+ @@ -100,6 +100,21 @@
15
+ #include <stdarg.h>
16
+ #include <dirent.h>
17
+
18
+ +#if !defined(S_IFBLK)
19
+ +#define S_IFBLK 0
20
+ +#define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK)
21
+ +#endif
22
+ +
23
+ +#if !defined(S_IFLNK)
24
+ +#define S_IFLNK 0
25
+ +#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
26
+ +#endif
27
+ +
28
+ +#if !defined(S_IFSOCK)
29
+ +#define S_IFSOCK 0
30
+ +#define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK)
31
+ +#endif
32
+ +
33
+ #define ENABLE_CONDITIONALS
34
+
35
+ #ifndef MAGIC
36
+ --
37
+ 2.29.2.windows.2
38
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # From https://github.com/msys2/MINGW-packages/commit/3a51faadb8bacf06c7b7fd84b2ea80775d1a8b0d
2
+
3
+ # this is an advanced patch to fix building v5.38
4
+ # see for details
5
+ # this patch should be removed with the next version
6
+ diff --git a/src/compress.c b/src/compress.c
7
+ index 33ce2bc..f172eda 100644
8
+ --- a/src/compress.c
9
+ +++ b/src/compress.c
10
+ @@ -378,7 +378,7 @@
11
+ sread(int fd, void *buf, size_t n, int canbepipe __attribute__((__unused__)))
12
+ {
13
+ ssize_t rv;
14
+ -#ifdef FIONREAD
15
+ +#if defined(FIONREAD) && !defined(__MINGW32__) && !defined(WIN32)
16
+ int t = 0;
17
+ #endif
18
+ size_t rn = n;
19
+ @@ -386,7 +386,7 @@
20
+ if (fd == STDIN_FILENO)
21
+ goto nocheck;
22
+
23
+ -#ifdef FIONREAD
24
+ +#if defined(FIONREAD) && !defined(__MINGW32__) && !defined(WIN32)
25
+ if (canbepipe && (ioctl(fd, FIONREAD, &t) == -1 || t == 0)) {
26
+ #ifdef FD_ZERO
27
+ ssize_t cnt;
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/portfile.cmake ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(VCPKG_TARGET_IS_WINDOWS)
2
+ set(PATCHES
3
+ "0001-Use-libtre.patch"
4
+ "0002-Change-zlib-lib-name-to-match-CMake-output.patch"
5
+ "0003-Fix-WIN32-macro-checks.patch"
6
+ "0004-Typedef-POSIX-types-on-Windows.patch"
7
+ "0005-Include-dirent.h-for-S_ISREG-and-S_ISDIR.patch"
8
+ "0006-Remove-Wrap-POSIX-headers.patch"
9
+ "0007-Substitute-unistd-macros-for-MSVC.patch"
10
+ "0008-Add-FILENO-defines.patch"
11
+ "0009-No-fcntl-in-magic.c.patch"
12
+ "0010-Properly-check-for-the-presence-of-bitmasks.patch"
13
+ "0011-Remove-pipe-related-functions-in-funcs.c.patch"
14
+ "0012-Convert-MSYS2-paths-to-Windows-paths.patch"
15
+ "0013-Check-for-backslash-in-argv-0-on-Windows.patch"
16
+ "0014-Define-POSIX-macros-if-missing.patch"
17
+ "0015-MSYS2-Remove-ioctl-call.patch"
18
+ )
19
+ endif()
20
+
21
+ vcpkg_from_github(
22
+ OUT_SOURCE_PATH SOURCE_PATH
23
+ REPO file/file
24
+ REF FILE5_40
25
+ SHA512 d76bfe5326e1b40368e055c2e049a24b4ffdbd727371f4f3aa1dd3f53787d16b88550b3cc71ecf02151e2fb3e567eb2598e4707badab8c391eb71113c2dcc319
26
+ HEAD_REF master
27
+ PATCHES ${PATCHES}
28
+ )
29
+
30
+ if(VCPKG_TARGET_IS_WINDOWS)
31
+ set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS")
32
+ set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS")
33
+ endif()
34
+
35
+ vcpkg_configure_make(
36
+ AUTOCONFIG
37
+ SOURCE_PATH "${SOURCE_PATH}"
38
+ )
39
+
40
+ if(VCPKG_CROSSCOMPILING)
41
+ vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/libmagic/bin")
42
+ elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
43
+ set(EXTRA_ARGS "ADD_BIN_TO_PATH")
44
+ endif()
45
+
46
+ vcpkg_install_make(${EXTRA_ARGS})
47
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
48
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin")
49
+ vcpkg_fixup_pkgconfig()
50
+
51
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
52
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
53
+ endif()
54
+
55
+ if(VCPKG_TARGET_IS_WINDOWS)
56
+ if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
57
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/share/misc")
58
+ file(COPY "${CURRENT_PACKAGES_DIR}/share/${PORT}/misc/magic.mgc" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/share/misc")
59
+ endif()
60
+ if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
61
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/share/misc")
62
+ file(COPY "${CURRENT_PACKAGES_DIR}/share/${PORT}/misc/magic.mgc" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/share/misc")
63
+ endif()
64
+ endif()
65
+
66
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
67
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
68
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man5")
69
+
70
+ # Handle copyright
71
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmagic/vcpkg.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmagic",
3
+ "version-string": "5.40",
4
+ "port-version": 1,
5
+ "description": "This library can be used to classify files according to magic number tests.",
6
+ "homepage": "https://github.com/file/file",
7
+ "dependencies": [
8
+ {
9
+ "name": "dirent",
10
+ "platform": "windows"
11
+ },
12
+ {
13
+ "name": "getopt",
14
+ "platform": "windows"
15
+ },
16
+ {
17
+ "name": "libmagic",
18
+ "host": true
19
+ },
20
+ {
21
+ "name": "tre",
22
+ "platform": "windows | mingw"
23
+ }
24
+ ]
25
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/arm64.patch ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
2
+ index 640a35bea..6c8d93250 100755
3
+ --- a/libmariadb/CMakeLists.txt
4
+ +++ b/libmariadb/CMakeLists.txt
5
+ @@ -410,10 +410,6 @@ TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS})
6
+
7
+ SIGN_TARGET(libmariadb)
8
+
9
+ -IF(CMAKE_SIZEOF_VOID_P EQUAL 8 AND MSVC)
10
+ - SET_TARGET_PROPERTIES(mariadbclient PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
11
+ -ENDIF()
12
+ -
13
+ IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR
14
+ CMAKE_SYSTEM_NAME MATCHES "kFreeBSD" OR
15
+ CMAKE_SYSTEM_NAME MATCHES "GNU")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/disable-test-build.patch ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/unittest/libmariadb/CMakeLists.txt b/unittest/libmariadb/CMakeLists.txt
2
+ index e3ba18b..48c4f1d 100644
3
+ --- a/unittest/libmariadb/CMakeLists.txt
4
+ +++ b/unittest/libmariadb/CMakeLists.txt
5
+ @@ -48,6 +48,7 @@ ENDIF()
6
+
7
+ ADD_LIBRARY(ma_getopt ma_getopt.c)
8
+
9
+ +if(0)
10
+ FOREACH(API_TEST ${API_TESTS})
11
+ IF (NOT TARGET ${API_TEST})
12
+ ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c)
13
+ @@ -65,3 +66,4 @@ FOREACH(API_TEST ${MANUAL_TESTS})
14
+ ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c)
15
+ TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient)
16
+ ENDFOREACH()
17
+ +endif()
18
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/export-cmake-targets.patch ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
2
+ index c109a20..e1fa3f1 100644
3
+ --- a/libmariadb/CMakeLists.txt
4
+ +++ b/libmariadb/CMakeLists.txt
5
+ @@ -405,6 +405,7 @@ ELSE()
6
+ ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def)
7
+ SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C)
8
+ ENDIF()
9
+ +TARGET_INCLUDE_DIRECTORIES(libmariadb PUBLIC $<INSTALL_INTERFACE:include/mysql>)
10
+
11
+ TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS})
12
+
13
+ @@ -453,13 +454,30 @@ ENDIF()
14
+
15
+ INSTALL(TARGETS mariadbclient
16
+ COMPONENT Development
17
+ + EXPORT unofficial-libmariadb-targets
18
+ LIBRARY DESTINATION lib)
19
+ INSTALL(TARGETS libmariadb
20
+ COMPONENT SharedLibraries
21
+ + EXPORT unofficial-libmariadb-targets
22
+ RUNTIME DESTINATION bin
23
+ LIBRARY DESTINATION lib
24
+ ARCHIVE DESTINATION lib)
25
+
26
+ +install(EXPORT unofficial-libmariadb-targets
27
+ + NAMESPACE unofficial::
28
+ + DESTINATION share/unofficial-libmariadb
29
+ +)
30
+ +
31
+ +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake.in"
32
+ +[[include(CMakeFindDependencyMacro)
33
+ +find_dependency(ZLIB)
34
+ +if("@WITH_SSL@" STREQUAL "OPENSSL")
35
+ + find_dependency(OpenSSL)
36
+ +endif()
37
+ +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libmariadb-targets.cmake")
38
+ +]])
39
+ +configure_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake" @ONLY)
40
+ +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake DESTINATION share/unofficial-libmariadb)
41
+
42
+ IF(0)
43
+ # On Windows, install PDB
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/fix-InstallPath.patch ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/include/mariadb_version.h.in b/include/mariadb_version.h.in
2
+ index a82dbb7..e9005fa 100644
3
+ --- a/include/mariadb_version.h.in
4
+ +++ b/include/mariadb_version.h.in
5
+ @@ -30,7 +30,7 @@
6
+ #define MARIADB_PACKAGE_VERSION_ID @MARIADB_PACKAGE_VERSION_ID@
7
+ #define MARIADB_SYSTEM_TYPE "@CMAKE_SYSTEM_NAME@"
8
+ #define MARIADB_MACHINE_TYPE "@CMAKE_SYSTEM_PROCESSOR@"
9
+ -#define MARIADB_PLUGINDIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_PLUGINDIR@"
10
+ +#define MARIADB_PLUGINDIR "../@INSTALL_PLUGINDIR@"
11
+
12
+ /* mysqld compile time options */
13
+ #ifndef MYSQL_CHARSET
14
+ diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
15
+ index bcfd4de..c109a20 100644
16
+ --- a/libmariadb/CMakeLists.txt
17
+ +++ b/libmariadb/CMakeLists.txt
18
+ @@ -398,10 +398,10 @@ ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE})
19
+ TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS})
20
+
21
+ IF(UNIX)
22
+ - ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE})
23
+ + ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE})
24
+ SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
25
+ ELSE()
26
+ - ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def)
27
+ + ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def)
28
+ SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C)
29
+ ENDIF()
30
+
31
+ @@ -453,13 +453,15 @@ ENDIF()
32
+
33
+ INSTALL(TARGETS mariadbclient
34
+ COMPONENT Development
35
+ - DESTINATION ${INSTALL_LIBDIR})
36
+ + LIBRARY DESTINATION lib)
37
+ INSTALL(TARGETS libmariadb
38
+ COMPONENT SharedLibraries
39
+ - DESTINATION ${INSTALL_LIBDIR})
40
+ + RUNTIME DESTINATION bin
41
+ + LIBRARY DESTINATION lib
42
+ + ARCHIVE DESTINATION lib)
43
+
44
+
45
+ -IF(MSVC)
46
+ +IF(0)
47
+ # On Windows, install PDB
48
+ INSTALL(FILES $<TARGET_PDB_FILE:libmariadb> DESTINATION "${INSTALL_LIBDIR}"
49
+ CONFIGURATIONS Debug RelWithDebInfo
50
+ diff --git a/mariadb_config/mariadb_config.c.in b/mariadb_config/mariadb_config.c.in
51
+ index 5574943..fc1ca7c 100644
52
+ --- a/mariadb_config/mariadb_config.c.in
53
+ +++ b/mariadb_config/mariadb_config.c.in
54
+ @@ -210,7 +210,7 @@ end:
55
+ }
56
+ if (!p || !p[0])
57
+ {
58
+ - strncpy(installation_dir, "@CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@", PATH_MAX - 1);
59
+ + strncpy(installation_dir, "../@CMAKE_INSTALL_PREFIX@", PATH_MAX - 1);
60
+ return;
61
+ }
62
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/fix-iconv.patch ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 203fca7..65cc350 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -342,7 +342,8 @@ ENDIF()
6
+
7
+ IF(WITH_ICONV)
8
+ IF(NOT WIN32)
9
+ - INCLUDE(${CC_SOURCE_DIR}/cmake/FindIconv.cmake)
10
+ + find_package(Iconv REQUIRED)
11
+ + include_directories(${Iconv_INCLUDE_DIRS})
12
+ ENDIF()
13
+ ENDIF()
14
+
15
+ @@ -359,8 +360,8 @@ IF(WIN32)
16
+ SET(SYSTEM_LIBS ws2_32 advapi32 kernel32 shlwapi crypt32 ${LIBZ})
17
+ ELSE()
18
+ SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBPTHREAD} ${CMAKE_DL_LIBS} ${LIBM})
19
+ - IF(ICONV_EXTERNAL)
20
+ - SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${ICONV_LIBRARIES})
21
+ + IF(WITH_ICONV)
22
+ + SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${Iconv_LIBRARIES})
23
+ ENDIF()
24
+ ENDIF()
25
+ IF(WITH_SSL)
26
+ diff --git a/mariadb_config/CMakeLists.txt b/mariadb_config/CMakeLists.txt
27
+ index 5bbf36b..70e619b 100644
28
+ --- a/mariadb_config/CMakeLists.txt
29
+ +++ b/mariadb_config/CMakeLists.txt
30
+ @@ -38,8 +38,8 @@ STRING(STRIP "${extra_dynamic_LDFLAGS}" extra_dynamic_LDFLAGS)
31
+ LIST(REMOVE_DUPLICATES extra_dynamic_LDFLAGS)
32
+
33
+ IF(UNIX AND NOT APPLE)
34
+ - IF(ICONV_EXTERNAL)
35
+ - GET_LIB_NAME(${ICONV_LIBRARIES} LIB_OUT)
36
+ + IF(WITH_ICONV)
37
+ + GET_LIB_NAME(${Iconv_LIBRARIES} LIB_OUT)
38
+ SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} ${LIB_OUT}")
39
+ ENDIF()
40
+ ENDIF()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/fix-openssl.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 33565f5..d83176d 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -280,7 +280,7 @@ IF(NOT WITH_SSL STREQUAL "OFF")
6
+ IF(OPENSSL_FOUND)
7
+ ADD_DEFINITIONS(-DHAVE_OPENSSL -DHAVE_TLS)
8
+ SET(SSL_SOURCES "${CC_SOURCE_DIR}/libmariadb/secure/openssl.c")
9
+ - SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
10
+ + SET(SSL_LIBRARIES OpenSSL::SSL)
11
+ IF(WIN32)
12
+ CHECK_INCLUDE_FILES (${OPENSSL_INCLUDE_DIR}/openssl/applink.c HAVE_OPENSSL_APPLINK_C)
13
+ ENDIF()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/md.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index cd716e3..a1f2ada 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -98,7 +98,7 @@ IF(MSVC)
6
+ # Speedup system tests
7
+ INCLUDE(${CC_SOURCE_DIR}/cmake/WindowsCache.cmake)
8
+ ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)
9
+ - IF (MSVC)
10
+ + IF (MSVC AND 0)
11
+ SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO")
12
+ FOREACH(BUILD_TYPE ${CONFIG_TYPES})
13
+ FOREACH(COMPILER CXX C)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/no-extra-static-lib.patch ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
2
+ index 39fa709..a726a6d 100644
3
+ --- a/libmariadb/CMakeLists.txt
4
+ +++ b/libmariadb/CMakeLists.txt
5
+ @@ -455,10 +455,14 @@ IF(NOT WIN32)
6
+ SET_TARGET_PROPERTIES(mariadbclient PROPERTIES OUTPUT_NAME "${LIBMARIADB_STATIC_NAME}")
7
+ ENDIF()
8
+
9
+ +if(VCPKG_MARIADBCLIENT)
10
+ INSTALL(TARGETS mariadbclient
11
+ COMPONENT Development
12
+ EXPORT unofficial-libmariadb-targets
13
+ LIBRARY DESTINATION lib)
14
+ +else()
15
+ + set_target_properties(mariadbclient PROPERTIES EXCLUDE_FROM_ALL 1)
16
+ +endif()
17
+ INSTALL(TARGETS libmariadb
18
+ COMPONENT SharedLibraries
19
+ EXPORT unofficial-libmariadb-targets
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/pkgconfig.patch ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 0be0fb1..33565f5 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -393,7 +393,7 @@ ENDIF()
6
+ INCLUDE(${CC_SOURCE_DIR}/plugins/CMakeLists.txt)
7
+ ADD_SUBDIRECTORY(include)
8
+ ADD_SUBDIRECTORY(libmariadb)
9
+ -IF(NOT WIN32)
10
+ +IF(1)
11
+ ADD_SUBDIRECTORY(mariadb_config)
12
+ ENDIF()
13
+
14
+ diff --git a/mariadb_config/CMakeLists.txt b/mariadb_config/CMakeLists.txt
15
+ index 70e619b..7a22fa1 100644
16
+ --- a/mariadb_config/CMakeLists.txt
17
+ +++ b/mariadb_config/CMakeLists.txt
18
+ @@ -30,6 +30,15 @@ IF(${rllength} GREATER 0)
19
+ LIST(REMOVE_DUPLICATES SYSTEM_LIBS)
20
+ ENDIF()
21
+
22
+ +set(REQUIRES_PRIVATE "" CACHE STRING "")
23
+ +if(WITH_SSL STREQUAL "OPENSSL")
24
+ + list(REMOVE_ITEM SYSTEM_LIBS ${SSL_LIBRARIES})
25
+ + string(APPEND REQUIRES_PRIVATE " openssl")
26
+ +endif()
27
+ +if(WITH_EXTERNAL_ZLIB)
28
+ + string(APPEND REQUIRES_PRIVATE " zlib")
29
+ +endif()
30
+ +
31
+ FOREACH (LIB_NAME ${SYSTEM_LIBS})
32
+ GET_LIB_NAME(${LIB_NAME} LIB_OUT)
33
+ SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} ${LIB_OUT}")
34
+ @@ -50,6 +59,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mariadb_config.c.in
35
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmariadb.pc.in
36
+ ${CMAKE_CURRENT_BINARY_DIR}/libmariadb.pc @ONLY)
37
+
38
+ +if(0)
39
+ ADD_EXECUTABLE(mariadb_config ${CMAKE_CURRENT_BINARY_DIR}/mariadb_config.c)
40
+
41
+ IF(CMAKE_SYSTEM_NAME MATCHES AIX)
42
+ @@ -61,6 +71,7 @@ ENDIF()
43
+ INSTALL(TARGETS mariadb_config
44
+ DESTINATION "bin"
45
+ COMPONENT Development)
46
+ +endif()
47
+
48
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmariadb.pc
49
+ DESTINATION "${INSTALL_PCDIR}"
50
+ diff --git a/mariadb_config/libmariadb.pc.in b/mariadb_config/libmariadb.pc.in
51
+ index 968181a..3f0410d 100644
52
+ --- a/mariadb_config/libmariadb.pc.in
53
+ +++ b/mariadb_config/libmariadb.pc.in
54
+ @@ -16,5 +16,6 @@ Description: MariaDB Connector/C dynamic library
55
+ Cflags: -I${includedir}
56
+ Libs: -L${libdir} -lmariadb
57
+ Libs.private: @extra_dynamic_LDFLAGS@
58
+ +Requires.private: @REQUIRES_PRIVATE@
59
+
60
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/portfile.cmake ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if (EXISTS "${CURRENT_INSTALLED_DIR}/share/libmysql")
2
+ message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.")
3
+ endif()
4
+
5
+ if("openssl" IN_LIST FEATURES AND "schannel" IN_LIST FEATURES)
6
+ message(FATAL_ERROR "Only one SSL backend must be selected.")
7
+ endif()
8
+
9
+ if("schannel" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS)
10
+ message(FATAL_ERROR "Feature schannel not supported on non-Windows platforms.")
11
+ endif()
12
+
13
+ vcpkg_from_github(
14
+ OUT_SOURCE_PATH SOURCE_PATH
15
+ REPO mariadb-corporation/mariadb-connector-c
16
+ REF b2bb1b213c79169b7c994a99f21f47f11be465d4 # v3.1.15
17
+ SHA512 51ebd2e9fd505eebc7691c60fe0b86cfc5368f8b370fba6c3ec8f5514319ef1e0de4910ad5e093cd7d5e5c7782120e22e8c85c94af9389fa4e240cedf012d755
18
+ HEAD_REF 3.1
19
+ PATCHES
20
+ arm64.patch
21
+ md.patch
22
+ disable-test-build.patch
23
+ fix-InstallPath.patch
24
+ fix-iconv.patch
25
+ export-cmake-targets.patch
26
+ pkgconfig.patch
27
+ no-extra-static-lib.patch
28
+ fix-openssl.patch
29
+ )
30
+
31
+ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
32
+ FEATURES
33
+ iconv WITH_ICONV
34
+ mariadbclient VCPKG_MARIADBCLIENT
35
+ )
36
+
37
+ if("openssl" IN_LIST FEATURES)
38
+ set(WITH_SSL OPENSSL)
39
+ elseif("schannel" IN_LIST FEATURES)
40
+ set(WITH_SSL ON)
41
+ else()
42
+ set(WITH_SSL OFF)
43
+ endif()
44
+
45
+ vcpkg_cmake_configure(
46
+ SOURCE_PATH "${SOURCE_PATH}"
47
+ OPTIONS
48
+ ${FEATURE_OPTIONS}
49
+ -DINSTALL_INCLUDEDIR=include/mysql # legacy port decisiong
50
+ -DINSTALL_LIBDIR=lib
51
+ -DINSTALL_PLUGINDIR=plugins/${PORT}
52
+ -DWITH_UNIT_TESTS=OFF
53
+ -DWITH_CURL=OFF
54
+ -DWITH_EXTERNAL_ZLIB=ON
55
+ -DWITH_SSL=${WITH_SSL}
56
+ -DREMOTEIO_PLUGIN_TYPE=OFF
57
+ -DAUTH_GSSAPI_PLUGIN_TYPE=OFF
58
+ MAYBE_UNUSED_VARIABLES
59
+ AUTH_GSSAPI_PLUGIN_TYPE
60
+ )
61
+
62
+ vcpkg_cmake_install()
63
+
64
+ vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libmariadb)
65
+
66
+ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
67
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libmariadb.pc" " -lmariadb" " -llibmariadb")
68
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
69
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libmariadb.pc" " -lmariadb" " -llibmariadb")
70
+ endif()
71
+ endif()
72
+ vcpkg_fixup_pkgconfig()
73
+
74
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
75
+
76
+ # copy license file
77
+ file(INSTALL "${SOURCE_PATH}/COPYING.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmariadb/vcpkg.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmariadb",
3
+ "version-semver": "3.1.15",
4
+ "description": "MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases",
5
+ "homepage": "https://github.com/MariaDB/mariadb-connector-c",
6
+ "supports": "!uwp",
7
+ "dependencies": [
8
+ {
9
+ "name": "vcpkg-cmake",
10
+ "host": true
11
+ },
12
+ {
13
+ "name": "vcpkg-cmake-config",
14
+ "host": true
15
+ },
16
+ "zlib"
17
+ ],
18
+ "default-features": [
19
+ "ssl"
20
+ ],
21
+ "features": {
22
+ "iconv": {
23
+ "description": "Enables character set conversion",
24
+ "dependencies": [
25
+ "libiconv"
26
+ ]
27
+ },
28
+ "mariadbclient": {
29
+ "description": "Build the static mariadbclient library"
30
+ },
31
+ "openssl": {
32
+ "description": "SSL support (OpenSSL)",
33
+ "dependencies": [
34
+ "openssl"
35
+ ]
36
+ },
37
+ "schannel": {
38
+ "description": "SSL support (Secure Channel)"
39
+ },
40
+ "ssl": {
41
+ "description": "Default SSL backend",
42
+ "dependencies": [
43
+ {
44
+ "name": "libmariadb",
45
+ "default-features": false,
46
+ "features": [
47
+ "schannel"
48
+ ],
49
+ "platform": "windows | mingw"
50
+ },
51
+ {
52
+ "name": "libmariadb",
53
+ "default-features": false,
54
+ "features": [
55
+ "openssl"
56
+ ],
57
+ "platform": "!windows & !mingw"
58
+ }
59
+ ]
60
+ },
61
+ "zlib": {
62
+ "description": "Obsolete. zlib is always used. This feature is left for compatibility."
63
+ }
64
+ }
65
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmaxminddb/CMakeLists.txt ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required (VERSION 3.9)
2
+ project(maxminddb C)
3
+
4
+ set(CMAKE_DEBUG_POSTFIX d)
5
+ set(CMAKE_SHARED_LIBRARY_PREFIX lib)
6
+ set(CMAKE_STATIC_LIBRARY_PREFIX lib)
7
+
8
+ if(MSVC)
9
+ add_compile_options(-D_CRT_SECURE_NO_WARNINGS)
10
+ endif()
11
+
12
+ set(SRCS
13
+ src/maxminddb.c
14
+ src/data-pool.c
15
+ )
16
+
17
+ include_directories(. src include projects/VS12)
18
+
19
+ add_library(maxminddb ${SRCS})
20
+
21
+ if(WIN32)
22
+ target_link_libraries(maxminddb ws2_32)
23
+ endif()
24
+
25
+ install(
26
+ TARGETS maxminddb
27
+ RUNTIME DESTINATION bin
28
+ LIBRARY DESTINATION lib
29
+ ARCHIVE DESTINATION lib
30
+ )
31
+
32
+ if(NOT DISABLE_INSTALL_HEADERS)
33
+ install(FILES include/maxminddb.h projects/VS12/maxminddb_config.h DESTINATION include/maxminddb)
34
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmaxminddb/fix-linux-build.patch ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/include/maxminddb.h b/include/maxminddb.h
2
+ index 13b276f..6c70e49 100644
3
+ --- a/include/maxminddb.h
4
+ +++ b/include/maxminddb.h
5
+ @@ -24,11 +24,12 @@ extern "C" {
6
+ #include <stdio.h>
7
+ #include <sys/types.h>
8
+
9
+ +/* libmaxminddb package version from configure */
10
+ +#define PACKAGE_VERSION "1.4.3"
11
+ +
12
+ #ifdef _WIN32
13
+ #include <winsock2.h>
14
+ #include <ws2tcpip.h>
15
+ -/* libmaxminddb package version from configure */
16
+ -#define PACKAGE_VERSION "1.4.3"
17
+
18
+ typedef ADDRESS_FAMILY sa_family_t;
19
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmaxminddb/portfile.cmake ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2
+
3
+ vcpkg_from_github(
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO maxmind/libmaxminddb
6
+ REF 07797e9dfb6771190f9fa41a33babe19425ef552 #1.4.3
7
+ SHA512 94f7fbd46a7846c804edad9759ceedf2f7c4b2085430322f74bea5c89f6c3fa0824f154f551119a8c69becec5120650efef89c6d7f5a2ef3df476086070c8c7e
8
+ HEAD_REF master
9
+ PATCHES fix-linux-build.patch
10
+ )
11
+
12
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
13
+
14
+ vcpkg_configure_cmake(
15
+ SOURCE_PATH ${SOURCE_PATH}
16
+ PREFER_NINJA
17
+ OPTIONS_DEBUG
18
+ -DDISABLE_INSTALL_HEADERS=ON
19
+ )
20
+
21
+ vcpkg_install_cmake()
22
+ vcpkg_copy_pdbs()
23
+
24
+ # Handle copyright
25
+ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmaxminddb/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmaxminddb",
3
+ "version-string": "1.4.3",
4
+ "port-version": 1,
5
+ "description": "C library for the MaxMind DB file format",
6
+ "homepage": "https://github.com/maxmind/libmaxminddb"
7
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmediainfo/portfile.cmake ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO MediaArea/MediaInfoLib
4
+ REF v21.03
5
+ SHA512 1317b27dc3ac1ad224ef9b7ca7c08a8f55983ac6984b5e8daf6309fa33094fbad8a0a5fbe0cff086b7a5c9233b3e24e26995b037d16adf83f63877f2c753f811
6
+ HEAD_REF master
7
+ PATCHES vcpkg_support_in_cmakelists.patch
8
+ )
9
+
10
+ vcpkg_cmake_configure(
11
+ SOURCE_PATH "${SOURCE_PATH}/Project/CMake"
12
+ OPTIONS
13
+ -DBUILD_ZENLIB=0
14
+ -DBUILD_ZLIB=0
15
+ )
16
+
17
+ vcpkg_cmake_install()
18
+
19
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/share/mediainfolib")
20
+ file(RENAME "${CURRENT_PACKAGES_DIR}/share/mediainfolib" "${CURRENT_PACKAGES_DIR}/share/MediaInfoLib")
21
+ endif()
22
+
23
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/mediainfolib")
24
+ file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/mediainfolib" "${CURRENT_PACKAGES_DIR}/debug/share/MediaInfoLib")
25
+ endif()
26
+ vcpkg_cmake_config_fixup(PACKAGE_NAME MediaInfoLib CONFIG_PATH share/MediaInfoLib)
27
+ vcpkg_fixup_pkgconfig()
28
+
29
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
30
+
31
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmediainfo/vcpkg.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmediainfo",
3
+ "version-string": "21.03",
4
+ "port-version": 2,
5
+ "description": "Get most relevant technical and tag data from video and audio files",
6
+ "homepage": "https://github.com/MediaArea/MediaInfoLib",
7
+ "dependencies": [
8
+ "curl",
9
+ "libzen",
10
+ "tinyxml2",
11
+ {
12
+ "name": "vcpkg-cmake",
13
+ "host": true
14
+ },
15
+ {
16
+ "name": "vcpkg-cmake-config",
17
+ "host": true
18
+ },
19
+ "zlib"
20
+ ]
21
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmediainfo/vcpkg_support_in_cmakelists.patch ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Project/CMake/CMakeLists.txt b/Project/CMake/CMakeLists.txt
2
+ index f983343..c6ba5ea 100644
3
+ --- a/Project/CMake/CMakeLists.txt
4
+ +++ b/Project/CMake/CMakeLists.txt
5
+ @@ -88,7 +88,7 @@ endif()
6
+ find_package(TinyXML)
7
+
8
+ # use system curl if is present
9
+ -find_package(CURL)
10
+ +find_package(CURL CONFIG REQUIRED)
11
+
12
+ include_directories(${MediaInfoLib_SOURCES_PATH})
13
+ include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/md5/)
14
+ @@ -400,13 +400,7 @@ endif()
15
+ target_link_libraries(mediainfo ${ZenLib_LIBRARY} ${ZLIB_LIBRARIES})
16
+
17
+ if(MSVC AND BUILD_SHARED_LIBS)
18
+ - get_target_property(LOCATION mediainfo LOCATION_DEBUG)
19
+ - string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}")
20
+ - install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
21
+ -
22
+ - get_target_property(LOCATION mediainfo LOCATION_RELWITHDEBINFO)
23
+ - string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}")
24
+ - install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
25
+ + install(FILES $<TARGET_PDB_FILE:mediainfo> DESTINATION ${BIN_INSTALL_DIR} OPTIONAL)
26
+ endif()
27
+
28
+ if (APPLE)
29
+ diff --git a/Source/ThirdParty/aes-gladman/aesopt.h b/Source/ThirdParty/aes-gladman/aesopt.h
30
+ index d3ac0f9..eeefa40 100644
31
+ --- a/Source/ThirdParty/aes-gladman/aesopt.h
32
+ +++ b/Source/ThirdParty/aes-gladman/aesopt.h
33
+ @@ -183,7 +183,7 @@ Issue Date: 20/12/2007
34
+ AES_REV_DKS must NOT be defined when such assembler files are
35
+ built
36
+ */
37
+ -#if 1 && defined( _WIN64 ) && defined( _MSC_VER )
38
+ +#if 1 && defined( _WIN64 ) && defined( _MSC_VER ) && defined( _M_AMD64 )
39
+ # define INTEL_AES_POSSIBLE
40
+ #endif
41
+
42
+ diff --git a/Source/ThirdParty/aes-gladman/brg_endian.h b/Source/ThirdParty/aes-gladman/brg_endian.h
43
+ index b44c5cb..8c34364 100644
44
+ --- a/Source/ThirdParty/aes-gladman/brg_endian.h
45
+ +++ b/Source/ThirdParty/aes-gladman/brg_endian.h
46
+ @@ -110,7 +110,8 @@ Issue Date: 20/12/2007
47
+ defined( __MRC__ ) || defined( __MVS__ ) || defined( __MWERKS__ ) || \
48
+ defined( sparc ) || defined( __sparc) || defined( SYMANTEC_C ) || \
49
+ defined( __VOS__ ) || defined( __TIGCC__ ) || defined( __TANDEM ) || \
50
+ - defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX )
51
+ + defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX ) || \
52
+ + defined( _M_ARM64 ) || defined ( _M_ARM )
53
+ # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
54
+
55
+ #elif 0 /* **** EDIT HERE IF NECESSARY **** */
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmesh/copyright 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/libmesh/portfile.cmake ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO libMesh/libmesh
4
+ REF 21f623c837b3865ed65ec9608b357bdb1935d428 #1.5.0
5
+ SHA512 53ad41ed0cd99cb5096ff338a3ff5d8a8ecbfb17dc1d7ee0d2b0cbffecbede7f7c11b7c3c2233cec9dde0988c8828ba0199247effd3442befc72230e641a185e
6
+ HEAD_REF master
7
+ )
8
+
9
+ if(VCPKG_TARGET_IS_WINDOWS)
10
+ set(OPTIONS --disable-qhull )
11
+ endif()
12
+ # There a lot of configure options in this port which are not yet correctly handled by VCPKG
13
+ # To only mention two:
14
+ # --enable-vtk-required Error if VTK is not detected by configure
15
+ # --enable-capnp-required Error if Cap'n Proto support is not detected by
16
+ # but there are a lot more which need to be checked/fixed
17
+ # So this port can only be considered a Work In Progress
18
+ vcpkg_configure_make(
19
+ SOURCE_PATH ${SOURCE_PATH}
20
+ OPTIONS ${OPTIONS}
21
+ OPTIONS_DEBUG --with-methods=dbg
22
+ OPTIONS_RELEASE --with-methods=opt
23
+ )
24
+
25
+ vcpkg_install_make()
26
+
27
+ if (EXISTS ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool)
28
+ file(COPY ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
29
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool)
30
+ endif()
31
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/contrib)
32
+
33
+ file(GLOB LIBMESH_EXAMPLES ${CURRENT_PACKAGES_DIR}/examples/*)
34
+ foreach (LIBMESH_EXAMPLE ${LIBMESH_EXAMPLES})
35
+ file(COPY ${LIBMESH_EXAMPLE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
36
+ endforeach()
37
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/examples)
38
+
39
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
40
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
41
+ endif()
42
+
43
+ # Remove tools and debug include directories
44
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/contrib ${CURRENT_PACKAGES_DIR}/debug/etc
45
+ ${CURRENT_PACKAGES_DIR}/debug/examples ${CURRENT_PACKAGES_DIR}/debug/include
46
+ ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/tools/libmesh/debug
47
+ ${CURRENT_PACKAGES_DIR}/Make.common ${CURRENT_PACKAGES_DIR}/debug/Make.common)
48
+
49
+ vcpkg_copy_pdbs()
50
+ vcpkg_fixup_pkgconfig()
51
+
52
+ file(INSTALL ${CURRENT_PORT_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
53
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmesh/vcpkg.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmesh",
3
+ "version": "1.5.0",
4
+ "port-version": 4,
5
+ "description": "The libMesh library provides a framework for the numerical simulation of partial differential equations using arbitrary unstructured discretizations on serial and parallel platforms. A major goal of the library is to provide support for adaptive mesh refinement (AMR) computations in parallel while allowing a research scientist to focus on the physics they are modeling.",
6
+ "homepage": "https://github.com/libMesh/libmesh",
7
+ "license": "LGPL-2.1-only"
8
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmicrohttpd/portfile.cmake ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(MICROHTTPD_VERSION 0.9.75)
2
+
3
+ vcpkg_download_distfile(ARCHIVE
4
+ URLS
5
+ "https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz"
6
+ "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz"
7
+ FILENAME "libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz"
8
+ SHA512 4dc62ed191342a61cc2767171bb1ff4050f390db14ef7100299888237b52ea0b04b939c843878fe7f5daec2b35a47b3c1b7e7c11fb32d458184fe6b19986a37c
9
+ )
10
+
11
+ vcpkg_extract_source_archive_ex(
12
+ ARCHIVE "${ARCHIVE}"
13
+ OUT_SOURCE_PATH SOURCE_PATH
14
+ )
15
+
16
+ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
17
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
18
+ set(CFG_SUFFIX "dll")
19
+ else()
20
+ set(CFG_SUFFIX "static")
21
+ endif()
22
+
23
+ vcpkg_install_msbuild(
24
+ SOURCE_PATH "${SOURCE_PATH}"
25
+ PROJECT_SUBPATH w32/VS2015/libmicrohttpd.vcxproj
26
+ RELEASE_CONFIGURATION "Release-${CFG_SUFFIX}"
27
+ DEBUG_CONFIGURATION "Debug-${CFG_SUFFIX}"
28
+ )
29
+
30
+ file(GLOB MICROHTTPD_HEADERS "${SOURCE_PATH}/src/include/microhttpd*.h")
31
+ file(COPY ${MICROHTTPD_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include")
32
+ else()
33
+ if(VCPKG_TARGET_IS_OSX AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
34
+ set(ENV{LIBS} "$ENV{LIBS} -framework Foundation -framework AppKit") # TODO: Get this from the extracted cmake vars somehow
35
+ endif()
36
+ vcpkg_configure_make(
37
+ SOURCE_PATH "${SOURCE_PATH}"
38
+ OPTIONS
39
+ --disable-doc
40
+ --disable-examples
41
+ --disable-curl
42
+ --disable-https
43
+ --with-gnutls=no
44
+ )
45
+
46
+ vcpkg_install_make()
47
+ vcpkg_fixup_pkgconfig()
48
+
49
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
50
+ endif()
51
+
52
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)