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

88c5446cbf417143f6e22425ba1ea85aff0e1c20e6de909df6cbcc64ff5d7e7b

Browse files
Files changed (50) hide show
  1. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmicrohttpd/vcpkg.json +13 -0
  2. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmikmod/fix-missing-dll.patch +29 -0
  3. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmikmod/name_conflict.patch +13 -0
  4. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmikmod/portfile.cmake +49 -0
  5. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmikmod/vcpkg.json +10 -0
  6. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/CMakeLists.txt +114 -0
  7. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/config.h.cmake +49 -0
  8. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/fix-static-linkage.patch +13 -0
  9. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/portfile.cmake +30 -0
  10. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/vcpkg.json +8 -0
  11. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/fix-install-path.patch +39 -0
  12. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/fix-undefined-typeid.patch +12 -0
  13. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/portfile.cmake +42 -0
  14. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/usage +5 -0
  15. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/vcpkg-cmake-wrapper.cmake +6 -0
  16. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/vcpkg.json +26 -0
  17. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/001-automagically-define-modplug-static.patch +13 -0
  18. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/002-detect_sinf.patch +35 -0
  19. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/003-use-static-cast-for-ctype.patch +14 -0
  20. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/004-export-pkgconfig.patch +46 -0
  21. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/005-fix-install-paths.patch +16 -0
  22. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/portfile.cmake +30 -0
  23. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/vcpkg.json +8 -0
  24. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmorton/portfile.cmake +22 -0
  25. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmorton/vcpkg.json +15 -0
  26. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmount/portfile.cmake +40 -0
  27. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmount/vcpkg.json +7 -0
  28. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch +146 -0
  29. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmpeg2/CMakeLists.txt +108 -0
  30. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmpeg2/portfile.cmake +37 -0
  31. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmpeg2/vcpkg.json +13 -0
  32. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/CMakeLists.txt +50 -0
  33. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/config.h +4 -0
  34. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/libmspack.def +35 -0
  35. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/portfile.cmake +32 -0
  36. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/vcpkg.json +7 -0
  37. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmt32emu/portfile.cmake +30 -0
  38. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmt32emu/vcpkg.json +17 -0
  39. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/CMakeLists.txt +66 -0
  40. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/dont-generate-extract-3rd-party-things.patch +16 -0
  41. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/portfile.cmake +29 -0
  42. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/use-if-instead-of-ifdef-in-writer.patch +39 -0
  43. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/vcpkg.json +23 -0
  44. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/004-added-limits-include.patch +12 -0
  45. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/export-cmake-targets.patch +123 -0
  46. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/ignore-boost-version.patch +13 -0
  47. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/openssl.patch +125 -0
  48. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/portfile.cmake +145 -0
  49. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/rename-version.patch +26 -0
  50. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/system-libs.patch +149 -0
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmicrohttpd/vcpkg.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmicrohttpd",
3
+ "version": "0.9.75",
4
+ "description": "GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application",
5
+ "homepage": "https://www.gnu.org/software/libmicrohttpd/",
6
+ "supports": "!(arm | uwp)",
7
+ "dependencies": [
8
+ {
9
+ "name": "gettext",
10
+ "platform": "!windows"
11
+ }
12
+ ]
13
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmikmod/fix-missing-dll.patch ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 53a174e..b4d31d3 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -856,11 +856,19 @@ INSTALL(
6
+ ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
7
+ )
8
+
9
+ -INSTALL(
10
+ - FILES "${CMAKE_BINARY_DIR}/libmikmod-config"
11
+ - PERMISSIONS GROUP_EXECUTE GROUP_READ OWNER_EXECUTE OWNER_READ OWNER_WRITE WORLD_EXECUTE WORLD_READ
12
+ - DESTINATION "bin"
13
+ -)
14
+ +IF(WIN32)
15
+ + SET(LIB_SUFFIX_USED ".dll")
16
+ +ELSEIF(UNIX)
17
+ + SET(LIB_SUFFIX_USED ".so")
18
+ +ELSEIF(APPLE)
19
+ + SET(LIB_SUFFIX_USED ".dylib")
20
+ +ELSE()
21
+ + SET(LIB_SUFFIX_USED)
22
+ +ENDIF()
23
+ +
24
+ +IF(NOT ENABLE_STATIC)
25
+ + INSTALL(FILES "${CMAKE_BINARY_DIR}/mikmod${LIB_SUFFIX_USED}" DESTINATION "bin")
26
+ +ENDIF()
27
+
28
+ INSTALL(
29
+ FILES
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmikmod/name_conflict.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 53a174e..5983882 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -404,7 +404,7 @@ IF (ENABLE_STATIC)
6
+
7
+ SET_TARGET_PROPERTIES(
8
+ mikmod-static
9
+ - PROPERTIES OUTPUT_NAME "mikmod"
10
+ + PROPERTIES OUTPUT_NAME "mikmod-static"
11
+ )
12
+ SET_TARGET_PROPERTIES(
13
+ ${LIBMIKMOD_LIBS}
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmikmod/portfile.cmake ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_sourceforge(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO mikmod/libmikmod
4
+ REF 3.3.11.1
5
+ FILENAME "libmikmod-3.3.11.1.tar.gz"
6
+ SHA512 f2439e2b691613847cd0787dd4e050116683ce7b05c215b8afecde5c6add819ea6c18e678e258c0a80786bef463f406072de15127f64368f694287a5e8e1a9de
7
+ PATCHES
8
+ fix-missing-dll.patch
9
+ name_conflict.patch
10
+ )
11
+
12
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
13
+ set(ENABLE_STATIC ON)
14
+ else()
15
+ set(ENABLE_STATIC OFF)
16
+ endif()
17
+
18
+ vcpkg_configure_cmake(
19
+ SOURCE_PATH ${SOURCE_PATH}
20
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
21
+ OPTIONS
22
+ -DENABLE_DOC=OFF
23
+ -DENABLE_THREADS=ON
24
+ -DDISABLE_HQMIXER=OFF
25
+ -DENABLE_AF=ON
26
+ -DENABLE_AIFF=ON
27
+ -DENABLE_NAS=ON
28
+ -DENABLE_OPENAL=ON
29
+ -DENABLE_PIPE=ON
30
+ -DENABLE_RAW=ON
31
+ -DENABLE_STDOUT=ON
32
+ -DENABLE_WAV=ON
33
+ -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
34
+ -DENABLE_STATIC=${ENABLE_STATIC}
35
+ OPTIONS_RELEASE -DENABLE_SIMD=ON
36
+ OPTIONS_DEBUG -DENABLE_SIMD=OFF
37
+ )
38
+
39
+ vcpkg_install_cmake()
40
+
41
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
42
+
43
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
44
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
45
+ endif()
46
+
47
+ file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
48
+
49
+ vcpkg_fixup_pkgconfig()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmikmod/vcpkg.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmikmod",
3
+ "version-string": "3.3.11.1",
4
+ "port-version": 10,
5
+ "description": "Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm.",
6
+ "homepage": "https://sourceforge.net/projects/mikmod/",
7
+ "dependencies": [
8
+ "openal-soft"
9
+ ]
10
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/CMakeLists.txt ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.0)
2
+ project(libmodbus VERSION 3.1.6)
3
+
4
+ set(LIBMODBUS_VERSION ${PROJECT_VERSION})
5
+ set(LIBMODBUS_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
6
+ set(LIBMODBUS_VERSION_MINOR ${PROJECT_VERSION_MINOR})
7
+ set(LIBMODBUS_VERSION_MICRO ${PROJECT_VERSION_PATCH})
8
+ configure_file(src/modbus-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/modbus-version.h)
9
+
10
+ if(WIN32)
11
+ set(HAVE_ERRNO_H 1)
12
+ set(HAVE_FCNTL_H 1)
13
+ set(HAVE_LIMITS_H 1)
14
+ set(HAVE_SYS_TYPES_H 1)
15
+ set(HAVE_TIME_H 1)
16
+ set(HAVE_MALLOC 1)
17
+ set(HAVE_MEMSET 1)
18
+ set(HAVE_STRERROR 1)
19
+ else()
20
+ include(CheckIncludeFile)
21
+ check_include_file(arpa/inet.h HAVE_ARPA_INET_H)
22
+ check_include_file(byteswap.h HAVE_BYTESWAP_H)
23
+ check_include_file(errno.h HAVE_ERRNO_H)
24
+ check_include_file(fcntl.h HAVE_FCNTL_H)
25
+ check_include_file(limits.h HAVE_LIMITS_H)
26
+ check_include_file(linux/serial.h HAVE_LINUX_SERIAL_H)
27
+ check_include_file(netdb.h HAVE_NETDB_H)
28
+ check_include_file(netinet/in.h HAVE_NETINET_IN_H)
29
+ check_include_file(netinet/tcp.h HAVE_NETINET_TCP_H)
30
+ check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H)
31
+ check_include_file(sys/params.h HAVE_SYS_PARAMS_H)
32
+ check_include_file(sys/socket.h HAVE_SYS_SOCKET_H)
33
+ check_include_file(sys/time.h HAVE_SYS_TIME_H)
34
+ check_include_file(sys/types.h HAVE_SYS_TYPES_H)
35
+ check_include_file(termios.h HAVE_TERMIOS_H)
36
+ check_include_file(time.h HAVE_TIME_H)
37
+ check_include_file(unistd.h HAVE_UNISTD_H)
38
+
39
+ include(CheckFunctionExists)
40
+ check_function_exists(accept4 HAVE_ACCEPT4)
41
+ check_function_exists(fork HAVE_FORK)
42
+ check_function_exists(getaddrinfo HAVE_GETADDRINFO)
43
+ check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
44
+ check_function_exists(inet_ntoa HAVE_INET_NTOA)
45
+ check_function_exists(malloc HAVE_MALLOC)
46
+ check_function_exists(memset HAVE_MEMSET)
47
+ check_function_exists(select HAVE_SELECT)
48
+ check_function_exists(socket HAVE_SOCKET)
49
+ check_function_exists(strerror HAVE_STRERROR)
50
+ check_function_exists(strlcpy HAVE_STRLCPY)
51
+
52
+ include(CheckSymbolExists)
53
+ check_symbol_exists(TIOCSRS485 sys/ioctl.h HAVE_TIOCRS485)
54
+ check_symbol_exists(TIOCM_RTS sys/ioctl.h HAVE_TIOCM_RTS)
55
+ endif()
56
+
57
+ configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
58
+
59
+
60
+ if(BUILD_SHARED_LIBS)
61
+ add_compile_options(-DDLLBUILD=ON)
62
+ else()
63
+ add_compile_options(-DLIBBUILD=ON)
64
+ endif()
65
+
66
+ set(MODBUS_PUBLIC_HEADERS
67
+ src/modbus-rtu.h
68
+ src/modbus-tcp.h
69
+ src/modbus.h
70
+ ${CMAKE_CURRENT_BINARY_DIR}/modbus-version.h
71
+ )
72
+
73
+ add_library(modbus
74
+ src/modbus-data.c
75
+ src/modbus-rtu.c
76
+ src/modbus-tcp.c
77
+ src/modbus.c)
78
+
79
+ target_include_directories(modbus PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
80
+ target_include_directories(modbus INTERFACE
81
+ $<INSTALL_INTERFACE:include>
82
+ )
83
+ set_target_properties(modbus PROPERTIES PUBLIC_HEADER "${MODBUS_PUBLIC_HEADERS}")
84
+
85
+ if(CMAKE_COMPILER_IS_GNUCC)
86
+ target_compile_options(modbus PRIVATE -D_GNU_SOURCE)
87
+ endif()
88
+
89
+ if(WIN32)
90
+ target_link_libraries(modbus wsock32 ws2_32)
91
+ endif()
92
+
93
+ set(LIBMODBUS_SOVERSION_VERSION 5.1.0)
94
+ set(LIBMODBUS_SOVERSION_SOVERSION 5)
95
+
96
+
97
+ set_target_properties(modbus PROPERTIES
98
+ VERSION ${LIBMODBUS_SOVERSION_VERSION}
99
+ SOVERSION ${LIBMODBUS_SOVERSION_SOVERSION})
100
+
101
+
102
+ install(
103
+ TARGETS modbus
104
+ EXPORT libmodbusConfig
105
+ RUNTIME DESTINATION bin
106
+ LIBRARY DESTINATION lib
107
+ ARCHIVE DESTINATION lib
108
+ )
109
+ install(EXPORT libmodbusConfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
110
+
111
+
112
+ if(NOT DISABLE_INSTALL_HEADERS)
113
+ install(FILES ${MODBUS_PUBLIC_HEADERS} DESTINATION include/)
114
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/config.h.cmake ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef CONFIG_H
2
+ #define CONFIG_H
3
+
4
+ #cmakedefine HAVE_ARPA_INET_H
5
+ #cmakedefine HAVE_BYTESWAP_H
6
+ #cmakedefine HAVE_ERRNO_H
7
+ #cmakedefine HAVE_FCNTL_H
8
+ #cmakedefine HAVE_LIMITS_H
9
+ #cmakedefine HAVE_LINUX_SERIAL_H
10
+ #cmakedefine HAVE_NETDB_H
11
+ #cmakedefine HAVE_NETINET_IN_H
12
+ #cmakedefine HAVE_NETINET_TCP_H
13
+ #cmakedefine HAVE_SYS_IOCTL_H
14
+ #cmakedefine HAVE_SYS_PARAMS_H
15
+ #cmakedefine HAVE_SYS_SOCKET_H
16
+ #cmakedefine HAVE_SYS_TIME_H
17
+ #cmakedefine HAVE_SYS_TYPES_H
18
+ #cmakedefine HAVE_TERMIOS_H
19
+ #cmakedefine HAVE_TIME_H
20
+ #cmakedefine HAVE_UNISTD_H
21
+
22
+ #cmakedefine HAVE_ACCEPT4
23
+ #cmakedefine HAVE_FORK
24
+ #cmakedefine HAVE_GETADDRINFO
25
+ #cmakedefine HAVE_GETTIMEOFDAY
26
+ #cmakedefine HAVE_INET_NTOA
27
+ #cmakedefine HAVE_MALLOC
28
+ #cmakedefine HAVE_MEMSET
29
+ #cmakedefine HAVE_SELECT
30
+ #cmakedefine HAVE_SOCKET
31
+ #cmakedefine HAVE_STRERROR
32
+ #cmakedefine HAVE_STRLCPY
33
+
34
+ #cmakedefine HAVE_TIOCRS485
35
+ #cmakedefine HAVE_TIOCM_RTS
36
+
37
+ #ifdef HAVE_TIOCM_RTS
38
+ #define HAVE_DECL_TIOCM_RTS 1
39
+ #else
40
+ #define HAVE_DECL_TIOCM_RTS 0
41
+ #endif
42
+
43
+ #ifdef HAVE_TIOCRS485
44
+ #define HAVE_DECL_TIOCSRS485 1
45
+ #else
46
+ #define HAVE_DECL_TIOCSRS485 0
47
+ #endif
48
+
49
+ #endif
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/fix-static-linkage.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/modbus.h b/src/modbus.h
2
+ index fbe20bc..895d05d 100644
3
+ --- a/src/modbus.h
4
+ +++ b/src/modbus.h
5
+ @@ -24,6 +24,8 @@
6
+ # if defined(DLLBUILD)
7
+ /* define DLLBUILD when building the DLL */
8
+ # define MODBUS_API __declspec(dllexport)
9
+ +# elif defined(LIBBUILD)
10
+ +# define MODBUS_API
11
+ # else
12
+ # define MODBUS_API __declspec(dllimport)
13
+ # endif
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/portfile.cmake ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO stephane/libmodbus
4
+ REF v3.1.6
5
+ SHA512 9eaa395c75e1170e703e01f8c52c6e6e87efe4eaa22adfc3b51153fd5535d545aea35cf68e1aba29720a6c1dd13d9c60b6b08a5c8098dccd13ccfdc6944420a9
6
+ HEAD_REF master
7
+ PATCHES fix-static-linkage.patch
8
+ )
9
+
10
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH})
11
+
12
+ vcpkg_configure_cmake(
13
+ SOURCE_PATH "${SOURCE_PATH}"
14
+ PREFER_NINJA
15
+ OPTIONS_DEBUG
16
+ -DDISABLE_INSTALL_HEADERS=ON
17
+ )
18
+
19
+ vcpkg_install_cmake()
20
+ vcpkg_copy_pdbs()
21
+ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
22
+
23
+ if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
24
+ vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/modbus.h "elif defined(LIBBUILD)" "elif 1")
25
+ endif()
26
+
27
+ # Handle copyright
28
+ file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
29
+
30
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodbus/vcpkg.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmodbus",
3
+ "version": "3.1.6",
4
+ "port-version": 2,
5
+ "description": "libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol",
6
+ "homepage": "https://github.com/stephane/libmodbus",
7
+ "supports": "!uwp"
8
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/fix-install-path.patch ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/libmodman/CMakeLists.txt b/libmodman/CMakeLists.txt
2
+ index 0aff593..9e419ce 100644
3
+ --- a/libmodman/CMakeLists.txt
4
+ +++ b/libmodman/CMakeLists.txt
5
+ @@ -30,15 +30,15 @@ if(NOT WIN32 AND NOT APPLE)
6
+ configure_file(libmodman-2.0.pc.in
7
+ ${CMAKE_CURRENT_BINARY_DIR}/libmodman-2.0.pc @ONLY)
8
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmodman-2.0.pc
9
+ - DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
10
+ + DESTINATION lib/pkgconfig)
11
+ endif()
12
+
13
+ # CMake Find helper
14
+ -if (NOT WIN32 AND NOT APPLE)
15
+ +if (1)
16
+ configure_file(Findlibmodman.cmake.in
17
+ ${CMAKE_CURRENT_BINARY_DIR}/Findlibmodman.cmake @ONLY)
18
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Findlibmodman.cmake
19
+ - DESTINATION ${SHARE_INSTALL_DIR}/cmake/Modules)
20
+ + DESTINATION share/${PROJECT_NAME})
21
+ endif()
22
+
23
+ # Define the library itself
24
+ @@ -50,8 +50,13 @@ if(NOT WIN32)
25
+ target_link_libraries(modman dl)
26
+ endif()
27
+ set_target_properties(modman PROPERTIES PREFIX "lib" VERSION 1.0.0 SOVERSION 1)
28
+ -install(TARGETS modman DESTINATION ${LIB_INSTALL_DIR})
29
+ -install(FILES module_manager.hpp module.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
30
+ +install(
31
+ + TARGETS modman
32
+ + RUNTIME DESTINATION bin
33
+ + LIBRARY DESTINATION lib
34
+ + ARCHIVE DESTINATION lib
35
+ +)
36
+ +install(FILES module_manager.hpp module.hpp DESTINATION include/${PROJECT_NAME})
37
+
38
+ ### Tests
39
+ add_testdirectory(test)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/fix-undefined-typeid.patch ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/libmodman/test/main.hpp b/libmodman/test/main.hpp
2
+ index 90ca87f..f4f8844 100644
3
+ --- a/libmodman/test/main.hpp
4
+ +++ b/libmodman/test/main.hpp
5
+ @@ -20,6 +20,7 @@
6
+ #ifndef MAIN_HPP_
7
+ #define MAIN_HPP_
8
+
9
+ +#include <typeinfo>
10
+ #include "../module_manager.hpp"
11
+
12
+ using namespace std;
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/portfile.cmake ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Enable static build in UNIX
2
+ if (VCPKG_TARGET_IS_WINDOWS)
3
+ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
4
+ endif()
5
+
6
+ set(LIBMODMAN_VER 2.0.1)
7
+
8
+ vcpkg_download_distfile(ARCHIVE
9
+ URLS "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libmodman/libmodman-${LIBMODMAN_VER}.zip"
10
+ FILENAME "libmodman-${LIBMODMAN_VER}.zip"
11
+ SHA512 1fecc0fa3637c4aa86d114f5bc991605172d39183fa0f39d8c7858ef5d0d894152025bd426de4dd017a41372d800bf73f53b2328c57b77352a508e12792729fa
12
+ )
13
+
14
+ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
15
+ tests BUILD_TESTING
16
+ )
17
+
18
+ vcpkg_extract_source_archive_ex(
19
+ ARCHIVE ${ARCHIVE}
20
+ OUT_SOURCE_PATH SOURCE_PATH
21
+ PATCHES
22
+ fix-install-path.patch
23
+ fix-undefined-typeid.patch
24
+ )
25
+
26
+ vcpkg_cmake_configure(
27
+ SOURCE_PATH "${SOURCE_PATH}"
28
+ OPTIONS ${FEATURE_OPTIONS}
29
+ )
30
+
31
+ vcpkg_cmake_install()
32
+ vcpkg_cmake_config_fixup(CONFIG_PATH share/libmodman)
33
+ vcpkg_copy_pdbs()
34
+
35
+ file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
36
+ "${CMAKE_CURRENT_LIST_DIR}/usage"
37
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
38
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
39
+
40
+ vcpkg_fixup_pkgconfig()
41
+
42
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/usage ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ The package libmodman provides CMake targets:
2
+
3
+ find_package(libmodman CONFIG REQUIRED)
4
+ target_include_directories(main PRIVATE ${LIBMODMAN_INCLUDE_DIR})
5
+ target_link_libraries(main PRIVATE ${LIBMODMAN_LIBRARIES})
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/vcpkg-cmake-wrapper.cmake ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ set(LIBMODMAN_PREV_MODULE_PATH ${CMAKE_MODULE_PATH})
2
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
3
+
4
+ _find_package(${ARGS})
5
+
6
+ set(CMAKE_MODULE_PATH ${LIBMODMAN_PREV_MODULE_PATH})
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodman/vcpkg.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmodman",
3
+ "version-string": "2.0.1",
4
+ "port-version": 4,
5
+ "description": "a simple library for managing modules",
6
+ "homepage": "https://code.google.com/p/libmodman",
7
+ "supports": "!uwp",
8
+ "dependencies": [
9
+ {
10
+ "name": "vcpkg-cmake",
11
+ "host": true
12
+ },
13
+ {
14
+ "name": "vcpkg-cmake-config",
15
+ "host": true
16
+ }
17
+ ],
18
+ "features": {
19
+ "tests": {
20
+ "description": "Build libmodman tests",
21
+ "dependencies": [
22
+ "zlib"
23
+ ]
24
+ }
25
+ }
26
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/001-automagically-define-modplug-static.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/modplug.h b/src/modplug.h
2
+ index 3ffbf9d..fd19ae5 100644
3
+ --- a/src/modplug.h
4
+ +++ b/src/modplug.h
5
+ @@ -11,6 +11,8 @@
6
+ extern "C" {
7
+ #endif
8
+
9
+ +#define MODPLUG_STATIC
10
+ +
11
+ #if defined(_WIN32) || defined(__CYGWIN__)
12
+ # if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */
13
+ # define MODPLUG_EXPORT __declspec(dllexport)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/002-detect_sinf.patch ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 2ada51b..468f1a3 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -4,6 +4,7 @@ project(libmodplug)
6
+ add_definitions(-DMODPLUG_BUILD)
7
+
8
+ include (CheckFunctionExists)
9
+ +include (CheckIncludeFile)
10
+
11
+ include_directories(AFTER
12
+ src
13
+ @@ -11,6 +12,10 @@ include_directories(AFTER
14
+ ${PROJECT_BINARY_DIR}
15
+ )
16
+
17
+ +if (UNIX)
18
+ + set (CMAKE_REQUIRED_LIBRARIES m)
19
+ +endif()
20
+ +
21
+ if (WIN32)
22
+ add_definitions(-D_USE_MATH_DEFINES)
23
+ add_definitions(-DNOMINMAX)
24
+ @@ -44,6 +49,11 @@ if (WIN32 AND NOT (MINGW OR MSYS))
25
+ "Compilation may fail if inttypes.h is not natively supported by the compiler."
26
+ "You can get inttypes.h from http://code.google.com/p/msinttypes/")
27
+ endif()
28
+ +else()
29
+ + check_include_file("stdint.h" HAVE_STDINT)
30
+ + if (HAVE_STDINT)
31
+ + add_definitions(-DHAVE_STDINT_H)
32
+ + endif()
33
+ endif()
34
+
35
+ check_function_exists("setenv" HAVE_SETENV)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/003-use-static-cast-for-ctype.patch ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/load_abc.cpp b/src/load_abc.cpp
2
+ index ee79f39..874ab8f 100644
3
+ --- a/src/load_abc.cpp
4
+ +++ b/src/load_abc.cpp
5
+ @@ -268,7 +268,8 @@ static void setenv(const char *name, const char *value, int overwrite)
6
+ #endif
7
+
8
+ static int abc_isvalidchar(char c) {
9
+ - return(isalpha(c) || isdigit(c) || isspace(c) || c == '%' || c == ':');
10
+ + unsigned char u = static_cast<unsigned char>(c);
11
+ + return(isalpha(u) || isdigit(u) || isspace(u) || c == '%' || c == ':');
12
+ }
13
+ #if 0
14
+ static const char *abc_skipspace(const char *p)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/004-export-pkgconfig.patch ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 6a3e539ea26eec1bfc2a6e722e923bd5221f8d26 Mon Sep 17 00:00:00 2001
2
+ From: "Matthias C. M. Troffaes" <[email protected]>
3
+ Date: Thu, 8 Jul 2021 10:47:30 +0100
4
+ Subject: [PATCH] Fix Libs.private in .pc file.
5
+
6
+ ---
7
+ CMakeLists.txt | 7 +++++--
8
+ libmodplug.pc.in | 2 +-
9
+ 2 files changed, 6 insertions(+), 3 deletions(-)
10
+
11
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
12
+ index 468f1a3..3164fc6 100644
13
+ --- a/CMakeLists.txt
14
+ +++ b/CMakeLists.txt
15
+ @@ -141,7 +141,11 @@ if(HAVE_SINF)
16
+ add_definitions(-DHAVE_SINF)
17
+ endif(HAVE_SINF)
18
+
19
+ -if (NOT WIN32)
20
+ +if(WIN32)
21
+ + set(LIBS_PRIVATE "-luser32")
22
+ +else(WIN32)
23
+ + set(LIBS_PRIVATE "-lstdc++ -lm")
24
+ +endif(WIN32)
25
+ set(prefix "${CMAKE_INSTALL_PREFIX}")
26
+ set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
27
+ set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
28
+ @@ -152,4 +156,3 @@ if (NOT WIN32)
29
+ install(FILES "${PROJECT_BINARY_DIR}/libmodplug.pc"
30
+ DESTINATION lib/pkgconfig
31
+ )
32
+ -endif (NOT WIN32)
33
+ diff --git a/libmodplug.pc.in b/libmodplug.pc.in
34
+ index bbf05f9..e4a43cc 100644
35
+ --- a/libmodplug.pc.in
36
+ +++ b/libmodplug.pc.in
37
+ @@ -8,5 +8,5 @@ Description: The ModPlug mod file playing library.
38
+ Version: @VERSION@
39
+ Requires:
40
+ Libs: -L${libdir} -lmodplug
41
+ -Libs.private: -lstdc++ -lm
42
+ +Libs.private: @LIBS_PRIVATE@
43
+ Cflags: -I${includedir}
44
+ --
45
+ 2.21.0.windows.1
46
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/005-fix-install-paths.patch ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 468f1a3..b58b11e 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -119,7 +119,10 @@ add_library(modplug ${LIB_TYPE}
6
+ )
7
+
8
+ # install the library:
9
+ -install(TARGETS modplug DESTINATION lib)
10
+ +install(TARGETS modplug
11
+ + RUNTIME DESTINATION bin
12
+ + LIBRARY DESTINATION lib
13
+ + ARCHIVE DESTINATION lib)
14
+
15
+ # incstall the headers:
16
+ install(FILES
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/portfile.cmake ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(MODPLUG_HASH 5a39f5913d07ba3e61d8d5afdba00b70165da81d)
2
+
3
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
4
+ set(STATIC_PATCH "001-automagically-define-modplug-static.patch")
5
+ endif()
6
+
7
+ vcpkg_from_github(ARCHIVE
8
+ OUT_SOURCE_PATH SOURCE_PATH
9
+ REPO Konstanty/libmodplug
10
+ REF ${MODPLUG_HASH}
11
+ SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1
12
+ PATCHES
13
+ ${STATIC_PATCH}
14
+ 002-detect_sinf.patch
15
+ 003-use-static-cast-for-ctype.patch
16
+ 004-export-pkgconfig.patch # https://github.com/Konstanty/libmodplug/pull/59
17
+ 005-fix-install-paths.patch # https://github.com/Konstanty/libmodplug/pull/61
18
+ )
19
+
20
+ vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA)
21
+
22
+ vcpkg_install_cmake()
23
+
24
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
25
+
26
+ vcpkg_copy_pdbs()
27
+
28
+ vcpkg_fixup_pkgconfig()
29
+
30
+ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmodplug/vcpkg.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmodplug",
3
+ "version-string": "0.8.9.0",
4
+ "port-version": 9,
5
+ "description": "The ModPlug mod file playing library.",
6
+ "homepage": "https://github.com/Konstanty/libmodplug",
7
+ "supports": "!uwp"
8
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmorton/portfile.cmake ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO Forceflow/libmorton
4
+ REF v0.2.8
5
+ SHA512 7497203573965337F1216DB729D3F6806278B8DDFF539E8D01EF83FB3EAB50D5FF90C965CF5EA3A76464CF6F279C000434D2111B37D3D368834F7EF20959E790
6
+ HEAD_REF master
7
+ )
8
+
9
+ vcpkg_cmake_configure(
10
+ SOURCE_PATH "${SOURCE_PATH}"
11
+ OPTIONS
12
+ -DBUILD_TESTING=OFF
13
+ )
14
+
15
+ vcpkg_cmake_install()
16
+
17
+ vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/libmorton)
18
+ vcpkg_fixup_pkgconfig()
19
+
20
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
21
+
22
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmorton/vcpkg.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmorton",
3
+ "version": "0.2.8",
4
+ "description": "Header-only library for encoding/decoding Morton codes in/from 2D/3D coordinates",
5
+ "dependencies": [
6
+ {
7
+ "name": "vcpkg-cmake",
8
+ "host": true
9
+ },
10
+ {
11
+ "name": "vcpkg-cmake-config",
12
+ "host": true
13
+ }
14
+ ]
15
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmount/portfile.cmake ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(VERSION_MAJOR 2)
2
+ set(VERSION_MINOR 37)
3
+ set(VERSION_PATCH 2)
4
+ set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
5
+
6
+ vcpkg_download_distfile(ARCHIVE
7
+ URLS "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v${VERSION_MAJOR}.${VERSION_MINOR}/util-linux-${VERSION}.tar.xz"
8
+ FILENAME "util-linux-${VERSION}.tar.xz"
9
+ SHA512 38f0fe820445e3bfa79550e6581c230f98c7661566ccc4daa51c7208a5f972c61b4e57dfc86bed074fdbc7c40bc79f856be8f6a05a8860c1c0cecc4208e8b81d
10
+ )
11
+
12
+ vcpkg_extract_source_archive_ex(
13
+ OUT_SOURCE_PATH SOURCE_PATH
14
+ ARCHIVE "${ARCHIVE}"
15
+ REF ${VERSION}
16
+ )
17
+
18
+ vcpkg_configure_make(
19
+ AUTOCONFIG
20
+ SOURCE_PATH "${SOURCE_PATH}"
21
+ OPTIONS
22
+ --disable-asciidoc
23
+ --disable-all-programs
24
+ --enable-libmount
25
+ --enable-libblkid
26
+ )
27
+
28
+ vcpkg_install_make()
29
+ vcpkg_fixup_pkgconfig()
30
+
31
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
32
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
33
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/sbin" "${CURRENT_PACKAGES_DIR}/debug/sbin")
34
+ endif()
35
+
36
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share")
37
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
38
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools") # empty folder
39
+
40
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmount/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmount",
3
+ "version": "2.37.2",
4
+ "description": "Block device identification library from util-linux",
5
+ "homepage": "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/about/",
6
+ "supports": "linux"
7
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From ed3b6e4bca1fe5211e3d7ca06bbbf9b161c8bc19 Mon Sep 17 00:00:00 2001
2
+ From: Michal Janiszewski <[email protected]>
3
+ Date: Sat, 2 Nov 2019 14:50:53 -0700
4
+ Subject: [PATCH] Add naive MSVC support to sources
5
+
6
+ ---
7
+ libmpeg2/convert/rgb.c | 2 +-
8
+ libmpeg2/cpu_accel.c | 4 ++--
9
+ libmpeg2/cpu_state.c | 4 ++--
10
+ libmpeg2/idct.c | 2 +-
11
+ libmpeg2/motion_comp.c | 2 +-
12
+ libvo/video_out_dx.c | 6 +++---
13
+ vc++/config.h | 2 ++
14
+ 7 files changed, 12 insertions(+), 10 deletions(-)
15
+
16
+ diff --git a/libmpeg2/convert/rgb.c b/libmpeg2/convert/rgb.c
17
+ index 8863b0b..db6f4e3 100644
18
+ --- a/libmpeg2/convert/rgb.c
19
+ +++ b/libmpeg2/convert/rgb.c
20
+ @@ -499,7 +499,7 @@ static int rgb_internal (mpeg2convert_rgb_order_t order, unsigned int bpp,
21
+ int convert420 = 0;
22
+ int rgb_stride_min = ((bpp + 7) >> 3) * seq->width;
23
+
24
+ -#ifdef ARCH_X86
25
+ +#if !defined(_MSC_VER) && defined(ARCH_X86)
26
+ if (!copy && (accel & MPEG2_ACCEL_X86_MMXEXT)) {
27
+ convert420 = 0;
28
+ copy = mpeg2convert_rgb_mmxext (order, bpp, seq);
29
+ diff --git a/libmpeg2/cpu_accel.c b/libmpeg2/cpu_accel.c
30
+ index 9b24610..a922df1 100644
31
+ --- a/libmpeg2/cpu_accel.c
32
+ +++ b/libmpeg2/cpu_accel.c
33
+ @@ -29,7 +29,7 @@
34
+ #include "attributes.h"
35
+ #include "mpeg2_internal.h"
36
+
37
+ -#if defined(ARCH_X86) || defined(ARCH_X86_64)
38
+ +#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64))
39
+ static inline uint32_t arch_accel (uint32_t accel)
40
+ {
41
+ if (accel & (MPEG2_ACCEL_X86_3DNOW | MPEG2_ACCEL_X86_MMXEXT))
42
+ @@ -253,7 +253,7 @@ static inline uint32_t arch_accel (uint32_t accel)
43
+
44
+ uint32_t mpeg2_detect_accel (uint32_t accel)
45
+ {
46
+ -#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC)
47
+ +#if !defined(_MSC_VER) && (defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC))
48
+ accel = arch_accel (accel);
49
+ #endif
50
+ return accel;
51
+ diff --git a/libmpeg2/cpu_state.c b/libmpeg2/cpu_state.c
52
+ index 2f2f64a..f4966c1 100644
53
+ --- a/libmpeg2/cpu_state.c
54
+ +++ b/libmpeg2/cpu_state.c
55
+ @@ -36,7 +36,7 @@
56
+ void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL;
57
+ void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL;
58
+
59
+ -#if defined(ARCH_X86) || defined(ARCH_X86_64)
60
+ +#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64))
61
+ static void state_restore_mmx (cpu_state_t * state)
62
+ {
63
+ emms ();
64
+ @@ -115,7 +115,7 @@ static void state_restore_altivec (cpu_state_t * state)
65
+
66
+ void mpeg2_cpu_state_init (uint32_t accel)
67
+ {
68
+ -#if defined(ARCH_X86) || defined(ARCH_X86_64)
69
+ +#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64))
70
+ if (accel & MPEG2_ACCEL_X86_MMX) {
71
+ mpeg2_cpu_state_restore = state_restore_mmx;
72
+ }
73
+ diff --git a/libmpeg2/idct.c b/libmpeg2/idct.c
74
+ index 81c57e0..a057bf7 100644
75
+ --- a/libmpeg2/idct.c
76
+ +++ b/libmpeg2/idct.c
77
+ @@ -235,7 +235,7 @@ static void mpeg2_idct_add_c (const int last, int16_t * block,
78
+
79
+ void mpeg2_idct_init (uint32_t accel)
80
+ {
81
+ -#ifdef ARCH_X86
82
+ +#if !defined(_MSC_VER) && defined(ARCH_X86)
83
+ if (accel & MPEG2_ACCEL_X86_SSE2) {
84
+ mpeg2_idct_copy = mpeg2_idct_copy_sse2;
85
+ mpeg2_idct_add = mpeg2_idct_add_sse2;
86
+ diff --git a/libmpeg2/motion_comp.c b/libmpeg2/motion_comp.c
87
+ index 7aed113..b00a32d 100644
88
+ --- a/libmpeg2/motion_comp.c
89
+ +++ b/libmpeg2/motion_comp.c
90
+ @@ -33,7 +33,7 @@ mpeg2_mc_t mpeg2_mc;
91
+
92
+ void mpeg2_mc_init (uint32_t accel)
93
+ {
94
+ -#ifdef ARCH_X86
95
+ +#if !defined(_MSC_VER) && defined(ARCH_X86)
96
+ if (accel & MPEG2_ACCEL_X86_MMXEXT)
97
+ mpeg2_mc = mpeg2_mc_mmxext;
98
+ else if (accel & MPEG2_ACCEL_X86_3DNOW)
99
+ diff --git a/libvo/video_out_dx.c b/libvo/video_out_dx.c
100
+ index 36de68a..0797cdc 100644
101
+ --- a/libvo/video_out_dx.c
102
+ +++ b/libvo/video_out_dx.c
103
+ @@ -82,7 +82,7 @@ static void update_overlay (dx_instance_t * instance)
104
+ dwFlags, &ddofx);
105
+ }
106
+
107
+ -static long FAR PASCAL event_procedure (HWND hwnd, UINT message,
108
+ +static LRESULT FAR PASCAL event_procedure (HWND hwnd, UINT message,
109
+ WPARAM wParam, LPARAM lParam)
110
+ {
111
+ RECT rect_window;
112
+ @@ -92,7 +92,7 @@ static long FAR PASCAL event_procedure (HWND hwnd, UINT message,
113
+ switch (message) {
114
+
115
+ case WM_WINDOWPOSCHANGED:
116
+ - instance = (dx_instance_t *) GetWindowLong (hwnd, GWL_USERDATA);
117
+ + instance = (dx_instance_t *) GetWindowLongPtr (hwnd, GWLP_USERDATA);
118
+
119
+ /* update the window position and size */
120
+ point_window.x = 0;
121
+ @@ -173,7 +173,7 @@ static int create_window (dx_instance_t * instance)
122
+ /* store a directx_instance pointer into the window local storage
123
+ * (for later use in event_handler).
124
+ * We need to use SetWindowLongPtr when it is available in mingw */
125
+ - SetWindowLong (instance->window, GWL_USERDATA, (LONG) instance);
126
+ + SetWindowLongPtr (instance->window, GWLP_USERDATA, (LONG_PTR) instance);
127
+
128
+ ShowWindow (instance->window, SW_SHOW);
129
+
130
+ diff --git a/vc++/config.h b/vc++/config.h
131
+ index 93719f0..a03cce6 100644
132
+ --- a/vc++/config.h
133
+ +++ b/vc++/config.h
134
+ @@ -16,7 +16,9 @@
135
+ /* #undef ARCH_SPARC */
136
+
137
+ /* x86 architecture */
138
+ +#if defined(_M_AMD64) || defined(_M_IX86)
139
+ #define ARCH_X86
140
+ +#endif
141
+
142
+ /* maximum supported data alignment */
143
+ /* #undef ATTRIBUTE_ALIGNED_MAX */
144
+ --
145
+ 2.25.0
146
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmpeg2/CMakeLists.txt ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.2)
2
+ project(libmpeg2)
3
+
4
+ option(TOOLS "Build libmpeg2 tools" OFF)
5
+
6
+ set(MPEG2_SOURCE_FILES
7
+ libmpeg2/alloc.c
8
+ libmpeg2/cpu_accel.c
9
+ libmpeg2/cpu_state.c
10
+ libmpeg2/decode.c
11
+ libmpeg2/header.c
12
+ libmpeg2/idct.c
13
+ libmpeg2/idct_alpha.c
14
+ libmpeg2/idct_altivec.c
15
+ #libmpeg2/idct_mmx.c
16
+ libmpeg2/motion_comp.c
17
+ libmpeg2/motion_comp_alpha.c
18
+ libmpeg2/motion_comp_altivec.c
19
+ libmpeg2/motion_comp_arm.c
20
+ #libmpeg2/motion_comp_mmx.c
21
+ libmpeg2/motion_comp_vis.c
22
+ libmpeg2/slice.c
23
+ )
24
+ set(VO_SOURCE_FILES
25
+ libvo/video_out.c
26
+ libvo/video_out_dx.c
27
+ libvo/video_out_null.c
28
+ libvo/video_out_pgm.c
29
+ libvo/video_out_sdl.c
30
+ libvo/video_out_x11.c
31
+ )
32
+ set(MPEG2_CONVERT_SOURCES
33
+ libmpeg2/convert/rgb.c
34
+ #libmpeg2/convert/rgb_mmx.c
35
+ libmpeg2/convert/rgb_vis.c
36
+ libmpeg2/convert/uyvy.c
37
+ )
38
+ set(GETOPT_FILES
39
+ src/getopt.c
40
+ )
41
+ set(HEADERS
42
+ include/mpeg2.h
43
+ include/mpeg2convert.h
44
+ )
45
+
46
+ add_library(mpeg2 ${MPEG2_SOURCE_FILES})
47
+ add_library(mpeg2convert ${MPEG2_CONVERT_SOURCES})
48
+ add_library(getopt STATIC ${GETOPT_FILES})
49
+ add_library(vo STATIC ${VO_SOURCE_FILES})
50
+
51
+ target_include_directories(mpeg2convert PUBLIC
52
+ "${CMAKE_SOURCE_DIR}/vc++"
53
+ "${CMAKE_SOURCE_DIR}/include"
54
+ )
55
+ target_include_directories(getopt PUBLIC
56
+ "${CMAKE_SOURCE_DIR}/vc++"
57
+ "${CMAKE_SOURCE_DIR}/include"
58
+ )
59
+ target_include_directories(vo PUBLIC
60
+ "${CMAKE_SOURCE_DIR}/vc++"
61
+ "${CMAKE_SOURCE_DIR}/include"
62
+ )
63
+ target_include_directories(mpeg2 PUBLIC
64
+ "${CMAKE_SOURCE_DIR}/vc++"
65
+ "${CMAKE_SOURCE_DIR}/include"
66
+ )
67
+ target_include_directories(mpeg2 INTERFACE
68
+ "${CMAKE_SOURCE_DIR}/include"
69
+ )
70
+
71
+ target_compile_definitions(getopt PUBLIC HAVE_CONFIG_H)
72
+ target_link_libraries(vo mpeg2convert)
73
+
74
+ if (TOOLS)
75
+ add_executable(mpeg2dec src/mpeg2dec.c src/dump_state.c src/gettimeofday.c)
76
+ add_executable(extract_mpeg2 src/extract_mpeg2.c)
77
+ add_executable(corrupt_mpeg2 src/corrupt_mpeg2.c)
78
+
79
+ target_compile_definitions(extract_mpeg2 PUBLIC HAVE_CONFIG_H)
80
+ target_compile_definitions(corrupt_mpeg2 PUBLIC HAVE_CONFIG_H)
81
+
82
+ target_link_libraries(mpeg2dec PRIVATE getopt vo mpeg2convert mpeg2 gdi32)
83
+ target_link_libraries(extract_mpeg2 PRIVATE getopt)
84
+ target_link_libraries(corrupt_mpeg2 PRIVATE getopt)
85
+
86
+ target_include_directories(mpeg2dec PUBLIC
87
+ "${CMAKE_SOURCE_DIR}/vc++"
88
+ "${CMAKE_SOURCE_DIR}/include"
89
+ "${CMAKE_SOURCE_DIR}/src"
90
+ )
91
+ target_include_directories(extract_mpeg2 PUBLIC
92
+ "${CMAKE_SOURCE_DIR}/vc++"
93
+ "${CMAKE_SOURCE_DIR}/include"
94
+ "${CMAKE_SOURCE_DIR}/src"
95
+ )
96
+ target_include_directories(corrupt_mpeg2 PUBLIC
97
+ "${CMAKE_SOURCE_DIR}/vc++"
98
+ "${CMAKE_SOURCE_DIR}/include"
99
+ "${CMAKE_SOURCE_DIR}/src"
100
+ )
101
+ endif (TOOLS)
102
+
103
+ install(TARGETS mpeg2
104
+ EXPORT libmpeg2
105
+ LIBRARY DESTINATION lib
106
+ )
107
+
108
+ install(FILES ${HEADERS} DESTINATION "include/mpeg2dec")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmpeg2/portfile.cmake ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2
+
3
+ # There is archived version of releases available at https://github.com/janisozaur/libmpeg2
4
+ vcpkg_download_distfile(ARCHIVE
5
+ URLS "http://libmpeg2.sourceforge.net/files/libmpeg2-0.5.1.tar.gz"
6
+ FILENAME "libmpeg2-0.5.1.tar.gz"
7
+ SHA512 3648a2b3d7e2056d5adb328acd2fb983a1fa9a05ccb6f9388cc686c819445421811f42e8439418a0491a13080977f074a0d8bf8fa6bc101ff245ddea65a46fbc
8
+ )
9
+
10
+ vcpkg_extract_source_archive_ex(
11
+ OUT_SOURCE_PATH SOURCE_PATH
12
+ ARCHIVE ${ARCHIVE}
13
+ PATCHES
14
+ 0001-Add-naive-MSVC-support-to-sources.patch
15
+ )
16
+
17
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
18
+
19
+ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
20
+ FEATURES
21
+ tools TOOLS
22
+ )
23
+
24
+ vcpkg_configure_cmake(
25
+ SOURCE_PATH ${SOURCE_PATH}
26
+ PREFER_NINJA
27
+ OPTIONS ${FEATURE_OPTIONS}
28
+ )
29
+
30
+ vcpkg_install_cmake()
31
+
32
+ # # Handle copyright
33
+ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmpeg2 RENAME copyright)
34
+
35
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
36
+
37
+ vcpkg_copy_pdbs()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmpeg2/vcpkg.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmpeg2",
3
+ "version": "0.5.1",
4
+ "port-version": 2,
5
+ "description": "a free MPEG-2 video stream decoder",
6
+ "homepage": "http://libmpeg2.sourceforge.net/",
7
+ "supports": "!(linux | osx | uwp)",
8
+ "features": {
9
+ "tools": {
10
+ "description": "Build tools provided with libmpeg2"
11
+ }
12
+ }
13
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/CMakeLists.txt ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.8)
2
+
3
+ project(libmspack C)
4
+
5
+ add_definitions(-DHAVE_CONFIG_H)
6
+
7
+ if(MSVC)
8
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
9
+ add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
10
+ endif()
11
+
12
+ # List the source files
13
+ set(LIB_SRC mspack/cabc.c
14
+ mspack/cabd.c
15
+ mspack/chmc.c
16
+ mspack/chmd.c
17
+ mspack/crc32.c
18
+ mspack/hlpc.c
19
+ mspack/hlpd.c
20
+ mspack/kwajc.c
21
+ mspack/kwajd.c
22
+ mspack/litc.c
23
+ mspack/litd.c
24
+ mspack/lzssd.c
25
+ mspack/lzxc.c
26
+ mspack/lzxd.c
27
+ mspack/mszipc.c
28
+ mspack/mszipd.c
29
+ mspack/oabc.c
30
+ mspack/oabd.c
31
+ mspack/qtmd.c
32
+ mspack/system.c
33
+ mspack/szddc.c
34
+ mspack/szddd.c
35
+ )
36
+
37
+ if(BUILD_SHARED_LIBS)
38
+ set(LIB_DEF libmspack.def)
39
+ endif()
40
+
41
+ add_library(libmspack ${LIB_SRC} ${LIB_DEF})
42
+
43
+ target_include_directories(libmspack PRIVATE . ./mspack)
44
+
45
+ install(TARGETS libmspack
46
+ RUNTIME DESTINATION bin
47
+ LIBRARY DESTINATION lib
48
+ ARCHIVE DESTINATION lib)
49
+
50
+ install(FILES mspack/mspack.h DESTINATION include)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/config.h ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #define HAVE_LIMITS_H 1
2
+ #define HAVE_INTTYPES_H 1
3
+
4
+ #define HAVE_TOWLOWER 1
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/libmspack.def ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ EXPORTS
2
+
3
+ mspack_create_cab_compressor
4
+ mspack_create_chm_compressor
5
+ mspack_create_lit_compressor
6
+ mspack_create_hlp_compressor
7
+ mspack_create_szdd_compressor
8
+ mspack_create_kwaj_compressor
9
+ mspack_create_oab_compressor
10
+
11
+ mspack_create_cab_decompressor
12
+ mspack_create_chm_decompressor
13
+ mspack_create_lit_decompressor
14
+ mspack_create_hlp_decompressor
15
+ mspack_create_szdd_decompressor
16
+ mspack_create_kwaj_decompressor
17
+ mspack_create_oab_decompressor
18
+
19
+ mspack_destroy_cab_compressor
20
+ mspack_destroy_cab_decompressor
21
+ mspack_destroy_chm_compressor
22
+ mspack_destroy_chm_decompressor
23
+ mspack_destroy_lit_compressor
24
+ mspack_destroy_lit_decompressor
25
+ mspack_destroy_hlp_compressor
26
+ mspack_destroy_hlp_decompressor
27
+ mspack_destroy_szdd_compressor
28
+ mspack_destroy_szdd_decompressor
29
+ mspack_destroy_kwaj_compressor
30
+ mspack_destroy_kwaj_decompressor
31
+ mspack_destroy_oab_compressor
32
+ mspack_destroy_oab_decompressor
33
+
34
+ mspack_sys_selftest_internal
35
+ mspack_version
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/portfile.cmake ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(LIB_NAME libmspack)
2
+ set(LIB_VERSION 0.10.1alpha)
3
+ set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz)
4
+
5
+ vcpkg_download_distfile(ARCHIVE
6
+ URLS "https://www.cabextract.org.uk/libmspack/${LIB_FILENAME}"
7
+ FILENAME "${LIB_FILENAME}"
8
+ SHA512 a7b5f7caa49190c5021f3e768b92f2e51cc0ce685c9ab6ed6fb36de885c73231b58d47a8a3b5c5aa5c9ac56c25c500eb683d84dbf11f09f97f6cb4fff5adc245
9
+ )
10
+
11
+ vcpkg_extract_source_archive_ex(
12
+ ARCHIVE ${ARCHIVE}
13
+ OUT_SOURCE_PATH SOURCE_PATH
14
+ )
15
+
16
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
17
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH})
18
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/libmspack.def DESTINATION ${SOURCE_PATH})
19
+
20
+ vcpkg_configure_cmake(
21
+ SOURCE_PATH ${SOURCE_PATH}
22
+ PREFER_NINJA
23
+ )
24
+
25
+ vcpkg_install_cmake()
26
+
27
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
28
+
29
+ # License and man
30
+ file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright)
31
+
32
+ vcpkg_copy_pdbs()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmspack/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmspack",
3
+ "version-string": "0.10.1",
4
+ "port-version": 4,
5
+ "description": "libmspack is a portable library for some loosely related Microsoft compression formats.",
6
+ "homepage": "https://www.cabextract.org.uk/libmspack"
7
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmt32emu/portfile.cmake ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO munt/munt
4
+ REF 004800c20b1edaab921e08f69133fc2a4bd3b8e8 #vlibmt32emu_2_6_2
5
+ SHA512 3a47c269d285f3930eefda4cae6f1c7e157fc4e88d7d64ad029542586b6592b32d5f9bf0e22344e27a21869aea2191051505f3727e52dff268cf2be4d52f15c3
6
+ HEAD_REF master
7
+ )
8
+
9
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
10
+
11
+ vcpkg_cmake_configure(
12
+ SOURCE_PATH "${SOURCE_PATH}/mt32emu"
13
+ OPTIONS
14
+ -Dlibmt32emu_SHARED:BOOL=${BUILD_SHARED}
15
+ )
16
+
17
+ vcpkg_cmake_install()
18
+
19
+ vcpkg_cmake_config_fixup(PACKAGE_NAME MT32Emu CONFIG_PATH lib/cmake/MT32Emu)
20
+
21
+ vcpkg_fixup_pkgconfig()
22
+
23
+ vcpkg_copy_pdbs()
24
+
25
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
26
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
27
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
28
+
29
+
30
+ file(INSTALL "${SOURCE_PATH}/mt32emu/COPYING.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmt32emu/vcpkg.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmt32emu",
3
+ "version": "2.6.2",
4
+ "description": "A MT-32 emulator",
5
+ "homepage": "https://github.com/munt/munt/tree/master/mt32emu",
6
+ "license": "GPL-2.0-or-later",
7
+ "dependencies": [
8
+ {
9
+ "name": "vcpkg-cmake",
10
+ "host": true
11
+ },
12
+ {
13
+ "name": "vcpkg-cmake-config",
14
+ "host": true
15
+ }
16
+ ]
17
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/CMakeLists.txt ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.9)
2
+ project(libmupdf C)
3
+
4
+ set(CMAKE_DEBUG_POSTFIX d)
5
+
6
+ if(WIN32)
7
+ execute_process(
8
+ COMMAND "cmd.exe" "/c" "platform\\win32\\generate.bat"
9
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
10
+ )
11
+ else()
12
+ find_program(MAKE_EXE NAMES make REQUIRED)
13
+ execute_process(
14
+ COMMAND ${MAKE_EXE} "generate"
15
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
16
+ )
17
+ endif()
18
+
19
+
20
+ find_package(freetype NO_MODULE REQUIRED)
21
+ find_package(JPEG REQUIRED)
22
+ find_path(HARFBUZZ_INCLUDE hb.h PATH_SUFFIXES harfbuzz)
23
+ find_library(HARFBUZZ_LIBRARIES harfbuzz)
24
+ find_package(ZLIB REQUIRED)
25
+ find_package(OpenJPEG CONFIG REQUIRED)
26
+ find_library(JBIG2DEC_LIB NAMES jbig2decd jbig2dec)
27
+
28
+ file(GLOB_RECURSE SOURCES "source/*.c" "generated/*.c")
29
+ list(FILTER SOURCES EXCLUDE REGEX "source/tools/[a-z]*\\.c$")
30
+ list(FILTER SOURCES EXCLUDE REGEX "source/tests/.*.c$")
31
+ list(FILTER SOURCES EXCLUDE REGEX "source/fitz/output-docx.c")
32
+
33
+ add_library(libmupdf ${SOURCES})
34
+
35
+ if(WIN32)
36
+ target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0 -DMEMENTO_MUPDF_HACKS -DFZ_ENABLE_DOCX_OUTPUT=0 -DFZ_ENABLE_ODT_OUTPUT=0)
37
+ else()
38
+ target_compile_definitions(libmupdf PRIVATE -DHAVE_PTHREAD=1 -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0 -DMEMENTO_MUPDF_HACKS -DFZ_ENABLE_DOCX_OUTPUT=0 -DFZ_ENABLE_ODT_OUTPUT=0)
39
+ endif()
40
+ target_include_directories(libmupdf
41
+ PUBLIC
42
+ include
43
+ PRIVATE
44
+ generated
45
+ ${JPEG_INCLUDE_DIR}
46
+ ${HARFBUZZ_INCLUDE}
47
+ )
48
+ target_link_libraries(libmupdf PRIVATE
49
+ openjp2
50
+ freetype
51
+ ${JPEG_LIBRARIES}
52
+ ${HARFBUZZ_LIBRARIES}
53
+ ${JBIG2DEC_LIB}
54
+ ZLIB::ZLIB
55
+ )
56
+
57
+ install(TARGETS libmupdf
58
+ RUNTIME DESTINATION bin
59
+ LIBRARY DESTINATION lib
60
+ ARCHIVE DESTINATION lib
61
+ )
62
+
63
+ if(BUILD_EXAMPLES)
64
+ add_executable(mu-office-test source/tests/mu-office-test.c)
65
+ target_link_libraries(mu-office-test PRIVATE libmupdf)
66
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/dont-generate-extract-3rd-party-things.patch ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --- a/Makethird
2
+ +++ b/Makethird
3
+ @@ -238,6 +238,7 @@ endif
4
+
5
+ # --- EXTRACT ---
6
+
7
+ +ifeq (0, 1)
8
+ THIRD_CFLAGS += $(EXTRACT_CFLAGS)
9
+ THIRD_LIBS += $(EXTRACT_LIBS)
10
+ THIRD_SRC += $(EXTRACT_SRC)
11
+ @@ -268,3 +269,4 @@ thirdparty/extract/src/odt_template.c: thirdparty/extract/src/template.odt third
12
+ @touch $@
13
+
14
+ generate: thirdparty/extract/src/docx_template.c
15
+ +endif
16
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/portfile.cmake ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2
+
3
+ vcpkg_from_github(
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO ArtifexSoftware/mupdf
6
+ REF 61b63d734a7b9df618f6b45dda2466aed442f7f0 # 1.19.0-rc2
7
+ SHA512 16661c012e18ac72b24c46caf5c02515c29a05e0a8dcf95076eff3a1f2e87c225245037480ed37068858fe6e04ff4a404f69877599b208ab9265d054ec117820
8
+ HEAD_REF master
9
+ PATCHES
10
+ dont-generate-extract-3rd-party-things.patch
11
+ use-if-instead-of-ifdef-in-writer.patch
12
+ )
13
+
14
+ file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
15
+
16
+ vcpkg_cmake_configure(
17
+ SOURCE_PATH "${SOURCE_PATH}"
18
+ DISABLE_PARALLEL_CONFIGURE
19
+ OPTIONS
20
+ -DBUILD_EXAMPLES=OFF
21
+ )
22
+
23
+ vcpkg_cmake_install()
24
+
25
+ file(COPY "${SOURCE_PATH}/include/mupdf" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
26
+
27
+ vcpkg_copy_pdbs()
28
+
29
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/use-if-instead-of-ifdef-in-writer.patch ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --- a/source/fitz/writer.c
2
+ +++ b/source/fitz/writer.c
3
+ @@ -169,7 +169,7 @@ fz_new_document_writer(fz_context *ctx, const char *path, const char *explicit_f
4
+ format = strrchr(path, '.');
5
+ while (format)
6
+ {
7
+ -#ifdef FZ_ENABLE_OCR_OUTPUT
8
+ +#if FZ_ENABLE_OCR_OUTPUT
9
+ if (is_extension(format, "ocr"))
10
+ return fz_new_pdfocr_writer(ctx, path, options);
11
+ #endif
12
+ @@ -219,11 +219,11 @@ fz_new_document_writer(fz_context *ctx, const char *path, const char *explicit_f
13
+ if (is_extension(format, "stext.json"))
14
+ return fz_new_text_writer(ctx, "stext.json", path, options);
15
+
16
+ -#ifdef FZ_ENABLE_ODT_OUTPUT
17
+ +#if FZ_ENABLE_ODT_OUTPUT
18
+ if (is_extension(format, "odt"))
19
+ return fz_new_odt_writer(ctx, path, options);
20
+ #endif
21
+ -#ifdef FZ_ENABLE_DOCX_OUTPUT
22
+ +#if FZ_ENABLE_DOCX_OUTPUT
23
+ if (is_extension(format, "docx"))
24
+ return fz_new_docx_writer(ctx, path, options);
25
+ #endif
26
+ @@ -267,11 +267,11 @@ fz_new_document_writer_with_output(fz_context *ctx, fz_output *out, const char *
27
+ if (is_extension(format, "stext.json"))
28
+ return fz_new_text_writer_with_output(ctx, "stext.json", out, options);
29
+
30
+ -#ifdef FZ_ENABLE_ODT_OUTPUT
31
+ +#if FZ_ENABLE_ODT_OUTPUT
32
+ if (is_extension(format, "odt"))
33
+ return fz_new_odt_writer_with_output(ctx, out, options);
34
+ #endif
35
+ -#ifdef FZ_ENABLE_DOCX_OUTPUT
36
+ +#if FZ_ENABLE_DOCX_OUTPUT
37
+ if (is_extension(format, "docx"))
38
+ return fz_new_docx_writer_with_output(ctx, out, options);
39
+ #endif
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmupdf/vcpkg.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libmupdf",
3
+ "version": "1.19.0-rc2",
4
+ "port-version": 1,
5
+ "description": "a lightweight PDF, XPS, and E-book library",
6
+ "homepage": "https://github.com/ArtifexSoftware/mupdf",
7
+ "supports": "!osx",
8
+ "dependencies": [
9
+ "curl",
10
+ "freetype",
11
+ "glfw3",
12
+ "gumbo",
13
+ "harfbuzz",
14
+ "jbig2dec",
15
+ "libjpeg-turbo",
16
+ "openjpeg",
17
+ {
18
+ "name": "vcpkg-cmake",
19
+ "host": true
20
+ },
21
+ "zlib"
22
+ ]
23
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/004-added-limits-include.patch ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/sql-common/sql_string.cc b/sql-common/sql_string.cc
2
+ index 40435729..8b6ee827 100644
3
+ --- a/sql-common/sql_string.cc
4
+ +++ b/sql-common/sql_string.cc
5
+ @@ -23,6 +23,7 @@
6
+ #include "sql_string.h"
7
+
8
+ #include <algorithm>
9
+ +#include <limits>
10
+
11
+ #include "my_dbug.h"
12
+ #include "my_macros.h"
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/export-cmake-targets.patch ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
2
+ index c3a05ec..0d44ef2 100644
3
+ --- a/cmake/install_macros.cmake
4
+ +++ b/cmake/install_macros.cmake
5
+ @@ -100,7 +100,7 @@ ENDFUNCTION()
6
+
7
+ FUNCTION(MYSQL_INSTALL_TARGETS)
8
+ MYSQL_PARSE_ARGUMENTS(ARG
9
+ - "DESTINATION;COMPONENT"
10
+ + "DESTINATION;COMPONENT;EXPORT"
11
+ ""
12
+ ${ARGN}
13
+ )
14
+ @@ -115,7 +115,20 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
15
+ IF(ARG_COMPONENT)
16
+ SET(COMP COMPONENT ${ARG_COMPONENT})
17
+ ENDIF()
18
+ - INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP})
19
+ + IF (ARG_EXPORT)
20
+ + FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${ARG_EXPORT}-config.cmake"
21
+ +"include(CMakeFindDependencyMacro)
22
+ +find_dependency(ZLIB)
23
+ +find_dependency(OpenSSL)
24
+ +include(\"\${CMAKE_CURRENT_LIST_DIR}/${ARG_EXPORT}-targets.cmake\")
25
+ +")
26
+ + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ARG_EXPORT}-config.cmake DESTINATION share/${ARG_EXPORT})
27
+ + set(EXPORT_ARGS EXPORT ${ARG_EXPORT}-targets)
28
+ + ENDIF()
29
+ + INSTALL(TARGETS ${TARGETS} ${EXPORT_ARGS} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ${COMP})
30
+ + IF (ARG_EXPORT)
31
+ + INSTALL(${EXPORT_ARGS} DESTINATION share/${ARG_EXPORT})
32
+ + ENDIF()
33
+ SET(INSTALL_LOCATION ${ARG_DESTINATION} )
34
+ INSTALL_DEBUG_SYMBOLS("${TARGETS}")
35
+ SET(INSTALL_LOCATION)
36
+ diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
37
+ index 5481fae..3fa58da 100644
38
+ --- a/cmake/libutils.cmake
39
+ +++ b/cmake/libutils.cmake
40
+ @@ -237,7 +237,7 @@ MACRO(MERGE_LIBRARIES_SHARED)
41
+ IF(ARG_COMPONENT)
42
+ SET(COMP COMPONENT ${ARG_COMPONENT})
43
+ ENDIF()
44
+ - MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
45
+ + MYSQL_INSTALL_TARGETS(${TARGET} EXPORT unofficial-libmysql DESTINATION "${INSTALL_LIBDIR}" ${COMP})
46
+ ENDIF()
47
+ ENDMACRO()
48
+
49
+ @@ -372,7 +372,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES)
50
+ SET(COMP COMPONENT ${ARG_COMPONENT})
51
+ ENDIF()
52
+ IF(INSTALL_STATIC_LIBRARIES)
53
+ - MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
54
+ + MYSQL_INSTALL_TARGETS(${TARGET} EXPORT unofficial-libmysql DESTINATION "${INSTALL_LIBDIR}" ${COMP})
55
+ ENDIF()
56
+ ENDIF()
57
+ ENDMACRO()
58
+ diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
59
+ index 605288d..c5d0f5d 100644
60
+ --- a/libmysql/CMakeLists.txt
61
+ +++ b/libmysql/CMakeLists.txt
62
+ @@ -245,8 +245,16 @@ ENDIF()
63
+ # LDAP authentication SASL client plugin
64
+ ADD_SUBDIRECTORY(authentication_ldap)
65
+
66
+ +IF (BUILD_SHARED_LIBS)
67
+ + set(INSTALL_SHARED )
68
+ + set(INSTALL_STATIC SKIP_INSTALL)
69
+ +ELSE()
70
+ + set(INSTALL_SHARED SKIP_INSTALL)
71
+ + set(INSTALL_STATIC )
72
+ +ENDIF()
73
+ +
74
+ # Merge several convenience libraries into one big mysqlclient
75
+ -MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} COMPONENT Development)
76
+ +MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} ${INSTALL_STATIC} COMPONENT Development)
77
+ TARGET_LINK_LIBRARIES(mysqlclient PRIVATE ${LIBS_TO_LINK})
78
+
79
+ # Visual Studio users need debug static library for debug projects
80
+ @@ -283,6 +291,7 @@ ENDIF()
81
+ # Merge several convenience libraries into one big mysqlclient
82
+ # and link them together into shared library.
83
+ MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE}
84
+ + ${INSTALL_SHARED}
85
+ EXPORTS
86
+ ${CLIENT_API_FUNCTIONS}
87
+ ${CLIENT_API_FUNCTIONS_UNDOCUMENTED}
88
+ @@ -370,6 +379,7 @@ CONFIGURE_FILE(api_test.c.in ${CMAKE_CURRENT_BINARY_DIR}/api_test.c)
89
+ # from @CLIENT_API_FUNCTIONS@ are declared by <mysql.h>. It will fail
90
+ # to run if not all of these symbols are exported by the library.
91
+ #
92
+ +IF (ENABLE_TESTING)
93
+ MYSQL_ADD_EXECUTABLE(libmysql_api_test
94
+ ${CMAKE_CURRENT_BINARY_DIR}/api_test.c
95
+ LINK_LIBRARIES libmysql ${LIBRT}
96
+ @@ -398,3 +408,4 @@ ADD_CUSTOM_COMMAND(TARGET libmysql_api_test POST_BUILD
97
+ COMMAND libmysql_api_test
98
+ > ${CMAKE_CURRENT_BINARY_DIR}/libmysql_api_test.out
99
+ )
100
+ +ENDIF()
101
+
102
+ diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
103
+ index a5fa18e..0f2e15c 100644
104
+ --- a/scripts/CMakeLists.txt
105
+ +++ b/scripts/CMakeLists.txt
106
+ @@ -329,13 +329,13 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
107
+ STRING(REGEX REPLACE "^[ ]+" "" ${var} "${${var}}")
108
+ STRING(REGEX REPLACE "[ ]+$" "" ${var} "${${var}}")
109
+ ENDMACRO()
110
+ -
111
+ +IF (NOT BUILD_SHARED_LIBS)
112
+ EXTRACT_LINK_LIBRARIES(mysqlclient CLIENT_LIBS)
113
+ -
114
+ -IF(MSVC)
115
+ +ENDIF()
116
+ +IF(MSVC AND NOT BUILD_SHARED_LIBS)
117
+ GET_TARGET_PROPERTY(LIBMYSQL_OS_SHLIB_VERSION mysqlclient VERSION)
118
+ GET_TARGET_PROPERTY(LIBMYSQL_OS_OUTPUT_NAME mysqlclient OUTPUT_NAME)
119
+ -ELSE()
120
+ +ELSEIF(BUILD_SHARED_LIBS)
121
+ GET_TARGET_PROPERTY(LIBMYSQL_OS_SHLIB_VERSION libmysql VERSION)
122
+ GET_TARGET_PROPERTY(LIBMYSQL_OS_OUTPUT_NAME libmysql OUTPUT_NAME)
123
+ ENDIF()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/ignore-boost-version.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/cmake/boost.cmake b/cmake/boost.cmake
2
+ index 592a67f..202a770 100644
3
+ --- a/cmake/boost.cmake
4
+ +++ b/cmake/boost.cmake
5
+ @@ -297,7 +297,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10)
6
+ COULD_NOT_FIND_BOOST()
7
+ ENDIF()
8
+
9
+ -IF(NOT BOOST_MINOR_VERSION EQUAL 70)
10
+ +IF(NOT BOOST_MINOR_VERSION EQUAL 70 AND NOT IGNORE_BOOST_VERSION)
11
+ MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} "
12
+ "we need 70"
13
+ )
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/openssl.patch ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
2
+ index dea997b252c..81484f0652b 100644
3
+ --- a/mysys/my_md5.cc
4
+ +++ b/mysys/my_md5.cc
5
+ @@ -35,6 +35,10 @@
6
+ #include <openssl/crypto.h>
7
+ #include <openssl/md5.h>
8
+
9
+ +#if OPENSSL_VERSION_NUMBER >= 0x30000000L
10
+ +#include <openssl/evp.h>
11
+ +#endif
12
+ +
13
+ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
14
+ int len) {
15
+ MD5_CTX ctx;
16
+ @@ -56,7 +60,11 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
17
+ int compute_md5_hash(char *digest, const char *buf, int len) {
18
+ int retval = 0;
19
+ int fips_mode = 0;
20
+ + #if OPENSSL_VERSION_NUMBER < 0x30000000L
21
+ fips_mode = FIPS_mode();
22
+ + #else
23
+ + fips_mode = EVP_default_properties_is_fips_enabled(NULL);
24
+ + #endif
25
+ /* If fips mode is ON/STRICT restricted method calls will result into abort,
26
+ * skipping call. */
27
+ if (fips_mode == 0) {
28
+ diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
29
+ index 13bc6794ea5..8752bcea9bf 100644
30
+ --- a/plugin/x/client/xconnection_impl.cc
31
+ +++ b/plugin/x/client/xconnection_impl.cc
32
+ @@ -51,6 +51,10 @@
33
+ #include "plugin/x/src/config/config.h"
34
+ #include "sql-common/net_ns.h"
35
+
36
+ +#if OPENSSL_VERSION_NUMBER >= 0x30000000L
37
+ +#include <openssl/evp.h>
38
+ +#endif
39
+ +
40
+ #ifndef WIN32
41
+ #include <netdb.h>
42
+ #include <sys/socket.h>
43
+ @@ -524,12 +528,20 @@ int set_fips_mode(const uint32_t fips_mode,
44
+ if (fips_mode > 2) {
45
+ goto EXIT;
46
+ }
47
+ + #if OPENSSL_VERSION_NUMBER < 0x30000000L
48
+ fips_mode_old = FIPS_mode();
49
+ + #else
50
+ + fips_mode_old = EVP_default_properties_is_fips_enabled(NULL);
51
+ + #endif
52
+ if (fips_mode_old == fips_mode) {
53
+ rc = 1;
54
+ goto EXIT;
55
+ }
56
+ + #if OPENSSL_VERSION_NUMBER < 0x30000000L
57
+ if (!(rc = FIPS_mode_set(fips_mode))) {
58
+ + #else
59
+ + if (!(rc = EVP_default_properties_enable_fips(fips_mode))) {
60
+ + #endif
61
+ err_library = ERR_get_error();
62
+ ERR_error_string_n(err_library, err_string, OPENSSL_ERROR_LENGTH - 1);
63
+ err_string[OPENSSL_ERROR_LENGTH - 1] = '\0';
64
+ diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
65
+ index 6c04029ccb0..164b727e3dc 100644
66
+ --- a/vio/viosslfactories.cc
67
+ +++ b/vio/viosslfactories.cc
68
+ @@ -40,6 +40,10 @@
69
+
70
+ #include <openssl/dh.h>
71
+
72
+ +#if OPENSSL_VERSION_NUMBER >= 0x30000000L
73
+ +#include <openssl/evp.h>
74
+ +#endif
75
+ +
76
+ #if OPENSSL_VERSION_NUMBER < 0x10002000L
77
+ #include <openssl/ec.h>
78
+ #endif /* OPENSSL_VERSION_NUMBER < 0x10002000L */
79
+ @@ -498,12 +502,20 @@ int set_fips_mode(const uint fips_mode, char err_string[OPENSSL_ERROR_LENGTH]) {
80
+ if (fips_mode > 2) {
81
+ goto EXIT;
82
+ }
83
+ + #if OPENSSL_VERSION_NUMBER < 0x30000000L
84
+ fips_mode_old = FIPS_mode();
85
+ + #else
86
+ + fips_mode_old = EVP_default_properties_is_fips_enabled(NULL);
87
+ + #endif
88
+ if (fips_mode_old == fips_mode) {
89
+ rc = 1;
90
+ goto EXIT;
91
+ }
92
+ + #if OPENSSL_VERSION_NUMBER < 0x30000000L
93
+ if (!(rc = FIPS_mode_set(fips_mode))) {
94
+ + #else
95
+ + if (!(rc = EVP_default_properties_enable_fips(NULL, fips_mode))) {
96
+ + #endif
97
+ /*
98
+ If OS doesn't have FIPS enabled openssl library and user sets FIPS mode
99
+ ON, It fails with proper error. But in the same time it doesn't allow to
100
+ @@ -511,7 +523,11 @@ int set_fips_mode(const uint fips_mode, char err_string[OPENSSL_ERROR_LENGTH]) {
101
+ error, setting old working FIPS mode value in the OpenSSL library. It will
102
+ allow successful cryptographic operation and will not abort the server.
103
+ */
104
+ + #if OPENSSL_VERSION_NUMBER < 0x30000000L
105
+ FIPS_mode_set(fips_mode_old);
106
+ + #else
107
+ + EVP_default_properties_enable_fips(NULL, fips_mode_old);
108
+ + #endif
109
+ err_library = ERR_get_error();
110
+ ERR_error_string_n(err_library, err_string, OPENSSL_ERROR_LENGTH - 1);
111
+ err_string[OPENSSL_ERROR_LENGTH - 1] = '\0';
112
+ @@ -525,7 +541,13 @@ EXIT:
113
+
114
+ @returns openssl current fips mode
115
+ */
116
+ +#if OPENSSL_VERSION_NUMBER < 0x30000000L
117
+ uint get_fips_mode() { return FIPS_mode(); }
118
+ +#else
119
+ +uint get_fips_mode() {
120
+ + return EVP_default_properties_is_fips_enabled(NULL);
121
+ +}
122
+ +#endif
123
+
124
+ long process_tls_version(const char *tls_version) {
125
+ const char *separator = ",";
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/portfile.cmake ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h")
2
+ message(FATAL_ERROR "FATAL ERROR: ${PORT} and libmariadb are incompatible.")
3
+ endif()
4
+
5
+ if (VCPKG_TARGET_IS_LINUX)
6
+ message(WARNING "${PORT} needs ncurses on LINUX, please install ncurses first.\nOn Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.")
7
+ endif()
8
+
9
+ vcpkg_from_github(
10
+ OUT_SOURCE_PATH SOURCE_PATH
11
+ REPO mysql/mysql-server
12
+ REF 7d10c82196c8e45554f27c00681474a9fb86d137 # 8.0.20
13
+ SHA512 9f5e8cc254ea2a4cf76313287c7bb6fc693400810464dd2901e67d51ecb27f8916009464fd8aed8365c3038314b845b3d517db6e82ae5c7908612f0b3b72335f
14
+ HEAD_REF master
15
+ PATCHES
16
+ ignore-boost-version.patch
17
+ system-libs.patch
18
+ rename-version.patch
19
+ export-cmake-targets.patch
20
+ 004-added-limits-include.patch
21
+ openssl.patch
22
+ )
23
+
24
+ file(REMOVE_RECURSE "${SOURCE_PATH}/include/boost_1_70_0")
25
+
26
+ set(STACK_DIRECTION)
27
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
28
+ set(STACK_DIRECTION -DSTACK_DIRECTION=-1)
29
+ endif()
30
+
31
+ #Skip the version check for Visual Studio
32
+ if(VCPKG_TARGET_IS_WINDOWS)
33
+ set(FORCE_UNSUPPORTED_COMPILER 1)
34
+ endif()
35
+
36
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS)
37
+ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT_LINKAGE)
38
+
39
+ vcpkg_cmake_configure(
40
+ SOURCE_PATH "${SOURCE_PATH}"
41
+ OPTIONS
42
+ -DWITHOUT_SERVER=ON
43
+ -DWITH_UNIT_TESTS=OFF
44
+ -DENABLED_PROFILING=OFF
45
+ -DENABLE_TESTING=OFF
46
+ -DWIX_DIR=OFF
47
+ ${STACK_DIRECTION}
48
+ -DIGNORE_BOOST_VERSION=ON
49
+ -DWITH_SYSTEMD=OFF
50
+ -DWITH_TEST_TRACE_PLUGIN=OFF
51
+ -DMYSQL_MAINTAINER_MODE=OFF
52
+ -DBUNDLE_RUNTIME_LIBRARIES=OFF
53
+ -DDOWNLOAD_BOOST=OFF
54
+ -DENABLE_DOWNLOADS=OFF
55
+ -DWITH_NDB_TEST=OFF
56
+ -DWITH_NDB_NODEJS_DEFAULT=OFF
57
+ -DWITH_NDBAPI_EXAMPLES=OFF
58
+ -DMYSQLX_ADDITIONAL_TESTS_ENABLE=OFF
59
+ -DWITH_SSL=system
60
+ -DWITH_ICU=system
61
+ -DWITH_LIBEVENT=system
62
+ -DWITH_LZ4=system
63
+ -DWITH_ZLIB=system
64
+ -DFORCE_UNSUPPORTED_COMPILER=${FORCE_UNSUPPORTED_COMPILER}
65
+ -DINSTALL_STATIC_LIBRARIES=${BUILD_STATIC_LIBS}
66
+ -DLINK_STATIC_RUNTIME_LIBRARIES=${STATIC_CRT_LINKAGE}
67
+ )
68
+
69
+ vcpkg_cmake_install(ADD_BIN_TO_PATH)
70
+
71
+ list(APPEND MYSQL_TOOLS
72
+ comp_err
73
+ my_print_defaults
74
+ mysql
75
+ mysql_config_editor
76
+ mysql_secure_installation
77
+ mysql_ssl_rsa_setup
78
+ mysqladmin
79
+ mysqlbinlog
80
+ mysqlcheck
81
+ mysqldump
82
+ mysqlimport
83
+ mysqlpump
84
+ mysqlshow
85
+ mysqlslap
86
+ mysqltest
87
+ perror
88
+ zlib_decompress
89
+ )
90
+
91
+ if (VCPKG_TARGET_IS_WINDOWS)
92
+ list(APPEND MYSQL_TOOLS
93
+ echo
94
+ )
95
+ else()
96
+ list(APPEND MYSQL_TOOLS
97
+ mysql_config
98
+ )
99
+ endif()
100
+
101
+ vcpkg_copy_tools(TOOL_NAMES ${MYSQL_TOOLS} AUTO_CLEAN)
102
+
103
+ file(RENAME "${CURRENT_PACKAGES_DIR}/share" "${CURRENT_PACKAGES_DIR}/${PORT}")
104
+ file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/${PORT}")
105
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share")
106
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/share")
107
+ file(RENAME "${CURRENT_PACKAGES_DIR}/${PORT}" "${CURRENT_PACKAGES_DIR}/share/${PORT}")
108
+ file(RENAME "${CURRENT_PACKAGES_DIR}/debug/${PORT}" "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}")
109
+
110
+ vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libmysql CONFIG_PATH share/${PORT}/unofficial-libmysql)
111
+
112
+ # switch mysql into /mysql
113
+ file(RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include2")
114
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
115
+ file(RENAME "${CURRENT_PACKAGES_DIR}/include2" "${CURRENT_PACKAGES_DIR}/include/mysql")
116
+
117
+ ## delete useless vcruntime/scripts/bin/msg file
118
+ file(REMOVE_RECURSE
119
+ "${CURRENT_PACKAGES_DIR}/debug/include"
120
+ "${CURRENT_PACKAGES_DIR}/debug/share"
121
+ "${CURRENT_PACKAGES_DIR}/docs"
122
+ "${CURRENT_PACKAGES_DIR}/debug/docs"
123
+ "${CURRENT_PACKAGES_DIR}/lib/debug"
124
+ "${CURRENT_PACKAGES_DIR}/lib/plugin"
125
+ "${CURRENT_PACKAGES_DIR}/lib/plugin/debug"
126
+ )
127
+
128
+ ## remove misc files
129
+ file(REMOVE
130
+ "${CURRENT_PACKAGES_DIR}/LICENSE"
131
+ "${CURRENT_PACKAGES_DIR}/README"
132
+ "${CURRENT_PACKAGES_DIR}/debug/LICENSE"
133
+ "${CURRENT_PACKAGES_DIR}/debug/README"
134
+ )
135
+
136
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h" "#include <mysql/udf_registration_types.h>" "#include \"mysql/udf_registration_types.h\"")
137
+ if (NOT VCPKG_TARGET_IS_WINDOWS)
138
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/libmysql/mysql_config" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/../..")
139
+ endif()
140
+
141
+ file(INSTALL "${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
142
+ file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
143
+
144
+ # copy license
145
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/rename-version.patch ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/VERSION b/VERSION.txt
2
+ similarity index 100%
3
+ rename from VERSION
4
+ rename to VERSION.txt
5
+ diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake
6
+ index bed6e9f02e2..a924ef09bac 100644
7
+ --- a/cmake/mysql_version.cmake
8
+ +++ b/cmake/mysql_version.cmake
9
+ @@ -30,7 +30,7 @@ SET(PROTOCOL_VERSION "10")
10
+
11
+ # Generate "something" to trigger cmake rerun when VERSION changes
12
+ CONFIGURE_FILE(
13
+ - ${CMAKE_SOURCE_DIR}/VERSION
14
+ + ${CMAKE_SOURCE_DIR}/VERSION.txt
15
+ ${CMAKE_BINARY_DIR}/VERSION.dep
16
+ )
17
+
18
+ @@ -38,7 +38,7 @@ CONFIGURE_FILE(
19
+
20
+ MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
21
+ IF(NOT ${var})
22
+ - FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
23
+ + FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION.txt str REGEX "^[ ]*${keyword}=")
24
+ IF(str)
25
+ STRING(REPLACE "${keyword}=" "" str ${str})
26
+ STRING(REGEX REPLACE "[ ].*" "" str "${str}")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libmysql/system-libs.patch ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/cmake/icu.cmake b/cmake/icu.cmake
2
+ index fde3a75..9f694b9 100644
3
+ --- a/cmake/icu.cmake
4
+ +++ b/cmake/icu.cmake
5
+ @@ -38,49 +38,11 @@
6
+ # install_root is either 'system' or is assumed to be a path.
7
+ #
8
+ MACRO (FIND_ICU install_root)
9
+ - IF("${install_root}" STREQUAL "system")
10
+ - SET(EXTRA_FIND_LIB_ARGS)
11
+ - SET(EXTRA_FIND_INC_ARGS)
12
+ - ELSE()
13
+ - SET(EXTRA_FIND_LIB_ARGS HINTS "${install_root}"
14
+ - PATH_SUFFIXES "lib" "lib64" NO_DEFAULT_PATH)
15
+ - SET(EXTRA_FIND_INC_ARGS HINTS "${install_root}"
16
+ - PATH_SUFFIXES "include" NO_DEFAULT_PATH)
17
+ - ENDIF()
18
+ -
19
+ - FIND_PATH(ICU_INCLUDE_DIR NAMES unicode/regex.h ${EXTRA_FIND_INC_ARGS})
20
+ - IF (NOT ICU_INCLUDE_DIR)
21
+ - MESSAGE(FATAL_ERROR "Cannot find ICU regular expression headers")
22
+ - ENDIF()
23
+ -
24
+ - IF(WIN32)
25
+ - SET(ICU_LIBS icuuc icuio icudt icuin)
26
+ - ELSE()
27
+ - SET(ICU_LIBS icuuc icuio icudata icui18n)
28
+ - ENDIF()
29
+ -
30
+ - SET(ICU_SYSTEM_LIBRARIES)
31
+ - FOREACH(ICU_LIB ${ICU_LIBS})
32
+ - UNSET(ICU_LIB_PATH CACHE)
33
+ - FIND_LIBRARY(ICU_LIB_PATH NAMES ${ICU_LIB} ${EXTRA_FIND_LIB_ARGS})
34
+ - IF(NOT ICU_LIB_PATH)
35
+ - MESSAGE(FATAL_ERROR "Cannot find the ICU library ${ICU_LIB}")
36
+ - ENDIF()
37
+ - LIST(APPEND ICU_SYSTEM_LIBRARIES ${ICU_LIB_PATH})
38
+ - ENDFOREACH()
39
+ -
40
+ - # To do: If we include the path in ICU_INCLUDE_DIR, it leads to GUnit
41
+ - # picking up the wrong regex.h header. And it looks like we don't need it;
42
+ - # at least on Linux, the header gets installed in an OS path anyway.
43
+ - IF(NOT "${install_root}" STREQUAL "system")
44
+ - SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
45
+ - ENDIF()
46
+ -
47
+ - SET(ICU_LIBRARIES ${ICU_SYSTEM_LIBRARIES})
48
+ -
49
+ - # Needed for version information.
50
+ - SET(ICU_COMMON_DIR ${ICU_INCLUDE_DIR})
51
+
52
+ + find_package(ICU REQUIRED COMPONENTS uc io dt in)
53
+ + set(ICU_SYSTEM_LIBRARIES ICU::uc ICU::io ICU::dt ICU::in)
54
+ + set(ICU_COMMON_DIR ${ICU_INCLUDE_DIR})
55
+ + SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
56
+ ENDMACRO()
57
+
58
+ MACRO (MYSQL_USE_BUNDLED_ICU)
59
+ diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
60
+ index 3fa58da..88b53e7 100644
61
+ --- a/cmake/libutils.cmake
62
+ +++ b/cmake/libutils.cmake
63
+ @@ -350,12 +350,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES)
64
+ # On Windows, ssleay32.lib/libeay32.lib or libssl.lib/libcrypto.lib
65
+ # must be merged into mysqlclient.lib
66
+ IF(WIN32 AND ${TARGET} STREQUAL "mysqlclient")
67
+ - SET(LINKER_EXTRA_FLAGS "")
68
+ - FOREACH(LIB ${SSL_LIBRARIES})
69
+ - STRING_APPEND(LINKER_EXTRA_FLAGS " ${LIB}")
70
+ - ENDFOREACH()
71
+ - SET_TARGET_PROPERTIES(${TARGET}
72
+ - PROPERTIES STATIC_LIBRARY_FLAGS "${LINKER_EXTRA_FLAGS}")
73
+ + TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ${SSL_LIBRARIES})
74
+ ENDIF()
75
+
76
+ IF(OSLIBS)
77
+ diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake
78
+ index 9aad130..68cbaba 100644
79
+ --- a/cmake/lz4.cmake
80
+ +++ b/cmake/lz4.cmake
81
+ @@ -25,7 +25,7 @@
82
+
83
+ MACRO (FIND_SYSTEM_LZ4)
84
+ FIND_PATH(PATH_TO_LZ4 NAMES lz4frame.h)
85
+ - FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4)
86
+ + FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4d lz4)
87
+ IF (PATH_TO_LZ4 AND LZ4_SYSTEM_LIBRARY)
88
+ SET(SYSTEM_LZ4_FOUND 1)
89
+ INCLUDE_DIRECTORIES(SYSTEM ${PATH_TO_LZ4})
90
+ diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
91
+ index 52feade..1e71bd7 100644
92
+ --- a/cmake/ssl.cmake
93
+ +++ b/cmake/ssl.cmake
94
+ @@ -93,7 +93,20 @@ ENDMACRO()
95
+ # Provides the following configure options:
96
+ # WITH_SSL=[yes|system|<path/to/custom/installation>]
97
+ MACRO (MYSQL_CHECK_SSL)
98
+ + find_package(OpenSSL REQUIRED)
99
+ + set(OPENSSL_LIBRARY OpenSSL::SSL CACHE STRING "")
100
+ + set(CRYPTO_LIBRARY OpenSSL::Crypto CACHE STRING "")
101
+ + FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
102
+ + DOC "path to the openssl executable")
103
+ + SET(SSL_DEFINES "-DHAVE_OPENSSL")
104
+ + set(SSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
105
+ + if(NOT WIN32)
106
+ + find_package(Threads REQUIRED)
107
+ + list(APPEND SSL_LIBRARIES Threads::Threads)
108
+ + endif()
109
+ +ENDMACRO()
110
+
111
+ +MACRO (MYSQL_CHECK_SSL_OLD)
112
+ IF(NOT WITH_SSL)
113
+ SET(WITH_SSL "system" CACHE STRING ${WITH_SSL_DOC_STRING} FORCE)
114
+ ENDIF()
115
+ diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
116
+ index 26c56fe..65bebb4 100644
117
+ --- a/cmake/zlib.cmake
118
+ +++ b/cmake/zlib.cmake
119
+ @@ -51,28 +51,7 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
120
+ IF(WITH_ZLIB STREQUAL "bundled")
121
+ MYSQL_USE_BUNDLED_ZLIB()
122
+ ELSE()
123
+ - SET(ZLIB_FIND_QUIETLY TRUE)
124
+ - INCLUDE(FindZLIB)
125
+ - IF(ZLIB_FOUND)
126
+ - INCLUDE(CheckFunctionExists)
127
+ - SET(SAVE_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
128
+ - SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} z)
129
+ - CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32)
130
+ - CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND)
131
+ - CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND)
132
+ - SET(CMAKE_REQUIRED_LIBRARIES ${SAVE_CMAKE_REQUIRED_LIBRARIES})
133
+ - IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND)
134
+ - SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES} CACHE INTERNAL "System zlib library")
135
+ - SET(WITH_ZLIB "system" CACHE STRING
136
+ - "Which zlib to use (possible values are 'bundled' or 'system')")
137
+ - SET(ZLIB_SOURCES "")
138
+ - ELSE()
139
+ - SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable")
140
+ - MESSAGE(STATUS "system zlib found but not usable")
141
+ - ENDIF()
142
+ - ENDIF()
143
+ - IF(NOT ZLIB_FOUND)
144
+ - MYSQL_USE_BUNDLED_ZLIB()
145
+ - ENDIF()
146
+ + find_package(ZLIB REQUIRED)
147
+ + SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library")
148
+ ENDIF()
149
+ ENDMACRO()