applied-ai-018 commited on
Commit
c3f6250
·
verified ·
1 Parent(s): 69ab876

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/fix-build-flags.patch +17 -0
  2. cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/portfile.cmake +22 -0
  3. cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/usage +5 -0
  4. cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/vcpkg.json +18 -0
  5. cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/portfile.cmake +20 -0
  6. cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/vcpkg.json +17 -0
  7. cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/fix-build.patch +38 -0
  8. cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/portfile.cmake +23 -0
  9. cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/vcpkg.json +11 -0
  10. cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/build.patch +38 -0
  11. cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/configure.ac.patch +13 -0
  12. cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/portfile.cmake +32 -0
  13. cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/vcpkg.json +13 -0
  14. cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/pkgconfig.patch +11 -0
  15. cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/portfile.cmake +60 -0
  16. cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/vcpkg.json +25 -0
  17. cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/fix-cmake.patch +16 -0
  18. cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/template-param-types.diff +22 -0
  19. cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/usage +4 -0
  20. cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg-cmake-wrapper.cmake +9 -0
  21. cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg.json +30 -0
  22. cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/portfile.cmake +31 -0
  23. cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/vcpkg.json +26 -0
  24. cc-multilingual-main/cc_net/vcpkg/ports/python3/0001-only-build-required-projects.patch +57 -0
  25. cc-multilingual-main/cc_net/vcpkg/ports/python3/0002-static-library.patch +153 -0
  26. cc-multilingual-main/cc_net/vcpkg/ports/python3/0003-use-vcpkg-zlib.patch +39 -0
  27. cc-multilingual-main/cc_net/vcpkg/ports/python3/0004-devendor-external-dependencies.patch +117 -0
  28. cc-multilingual-main/cc_net/vcpkg/ports/python3/0005-dont-copy-vcruntime.patch +26 -0
  29. cc-multilingual-main/cc_net/vcpkg/ports/python3/0006-restore-support-for-windows-7.patch +326 -0
  30. cc-multilingual-main/cc_net/vcpkg/ports/python3/0007-workaround-windows-11-sdk-rc-compiler-error.patch +30 -0
  31. cc-multilingual-main/cc_net/vcpkg/ports/python3/0008-python.pc.patch +34 -0
  32. cc-multilingual-main/cc_net/vcpkg/ports/python3/0010-dont-skip-rpath.patch +31 -0
  33. cc-multilingual-main/cc_net/vcpkg/ports/python3/0011-gcc-ldflags-fix.patch +54 -0
  34. cc-multilingual-main/cc_net/vcpkg/ports/python3/0012-force-disable-modules.patch +13 -0
  35. cc-multilingual-main/cc_net/vcpkg/ports/python3/0014-fix-get-python-inc-output.patch +44 -0
  36. cc-multilingual-main/cc_net/vcpkg/ports/python3/0015-dont-use-WINDOWS-def.patch +13 -0
  37. cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-fix-win-cross.patch +34 -0
  38. cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-undup-ffi-symbols.patch +14 -0
  39. cc-multilingual-main/cc_net/vcpkg/ports/python3/0017-fix-win.patch +34 -0
  40. cc-multilingual-main/cc_net/vcpkg/ports/python3/0018-fix-sysconfig-include.patch +15 -0
  41. cc-multilingual-main/cc_net/vcpkg/ports/python3/openssl.props.in +23 -0
  42. cc-multilingual-main/cc_net/vcpkg/ports/python3/portfile.cmake +387 -0
  43. cc-multilingual-main/cc_net/vcpkg/ports/python3/python_vcpkg.props.in +52 -0
  44. cc-multilingual-main/cc_net/vcpkg/ports/python3/usage +4 -0
  45. cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.unix +9 -0
  46. cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.win +8 -0
  47. cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-cmake-wrapper.cmake +126 -0
  48. cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-port-config.cmake +12 -0
  49. cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg.json +59 -0
  50. cc-multilingual-main/cc_net/vcpkg/ports/qt5-doc/portfile.cmake +7 -0
cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/fix-build-flags.patch ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index deaa67c..fb82294 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -34,10 +34,10 @@ target_sources(mp
6
+ if(PROJECT_IS_TOP_LEVEL)
7
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
8
+ target_compile_options(mp INTERFACE
9
+ - $<BUILD_INTERFACE:-stdlib=libc++ -Wall -Wextra -Wpedantic -Werror>)
10
+ + $<BUILD_INTERFACE:-stdlib=libc++ -Wall -Wextra -Wpedantic>)
11
+ target_link_options(mp INTERFACE $<BUILD_INTERFACE:-stdlib=libc++>)
12
+ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
13
+ - target_compile_options(mp INTERFACE $<BUILD_INTERFACE:-Wall -Wextra -Wpedantic -Werror>)
14
+ + target_compile_options(mp INTERFACE $<BUILD_INTERFACE:-Wall -Wextra -Wpedantic>)
15
+ endif()
16
+ endif()
17
+
cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/portfile.cmake ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO boost-ext/mp
4
+ REF d2dbdf89e543624be8351fd52308a9cf73374dbc
5
+ SHA512 15d56bf0dca2e4bfb9128b8552a6aa01ed6b1431ab9c152ed51473f6fa237c31fbf3d5baa22523e3786d14fd716acb5436ed26fe89d46812ba9375e2417bc67a
6
+ HEAD_REF main
7
+ PATCHES fix-build-flags.patch
8
+ )
9
+
10
+ vcpkg_cmake_configure(
11
+ SOURCE_PATH "${SOURCE_PATH}"
12
+ )
13
+
14
+ vcpkg_cmake_install()
15
+
16
+ vcpkg_cmake_config_fixup(PACKAGE_NAME mp CONFIG_PATH "share/cmake/mp-0.0.1")
17
+
18
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
19
+
20
+ vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
21
+
22
+ file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/usage ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ The package bext-mp provides CMake targets:
2
+
3
+ find_package(mp CONFIG REQUIRED)
4
+ target_link_libraries(main PRIVATE Boost::mp)
5
+ set_property(TARGET main PROPERTY CXX_EXTENSIONS OFF)
cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/vcpkg.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "bext-mp",
3
+ "version-date": "2023-03-02",
4
+ "description": "C++20 ~~Template~~ Meta-Programming",
5
+ "homepage": "https://boost-ext.github.io/mp/",
6
+ "license": "BSL-1.0",
7
+ "supports": "!windows | mingw",
8
+ "dependencies": [
9
+ {
10
+ "name": "vcpkg-cmake",
11
+ "host": true
12
+ },
13
+ {
14
+ "name": "vcpkg-cmake-config",
15
+ "host": true
16
+ }
17
+ ]
18
+ }
cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/portfile.cmake ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO free-audio/clap
4
+ REF "${VERSION}"
5
+ SHA512 9113673a911d023ea29d9cb246fbd7e82b4baccf4df5eb63ffe2605cc65543f82cb3a66982803e26f9ecfc8c159508470608b1d3b47009965094fbcdede49cf5
6
+ HEAD_REF main
7
+ )
8
+
9
+ vcpkg_cmake_configure(
10
+ SOURCE_PATH "${SOURCE_PATH}"
11
+ )
12
+
13
+ vcpkg_cmake_install()
14
+ vcpkg_cmake_config_fixup(
15
+ CONFIG_PATH "lib/cmake/clap"
16
+ )
17
+ vcpkg_fixup_pkgconfig()
18
+
19
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
20
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/vcpkg.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "clap-cleveraudio",
3
+ "version-semver": "1.2.0",
4
+ "description": "CLAP is an audio plugin ABI which defines a standard for Digital Audio Workstations and audio plugins to work together",
5
+ "homepage": "https://cleveraudio.org/",
6
+ "license": "MIT",
7
+ "dependencies": [
8
+ {
9
+ "name": "vcpkg-cmake",
10
+ "host": true
11
+ },
12
+ {
13
+ "name": "vcpkg-cmake-config",
14
+ "host": true
15
+ }
16
+ ]
17
+ }
cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/fix-build.patch ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Makefile.am b/Makefile.am
2
+ index 6135f2a..e68974f 100644
3
+ --- a/Makefile.am
4
+ +++ b/Makefile.am
5
+ @@ -8,7 +8,7 @@ INCLUDE = -I$(abs_top_builddir)/include \
6
+ -I$(abs_top_builddir)/include/xor_codes
7
+
8
+ AM_CPPFLAGS = $(CPPFLAGS) $(INCLUDE)
9
+ -AM_CPPFLAGS += -Werror -Wall
10
+ +AM_CPPFLAGS += -Wall
11
+
12
+ AM_CFLAGS = -fPIC $(AM_CPPFLAGS) @GCOV_FLAGS@ -L/usr/local/lib
13
+
14
+ diff --git a/erasurecode.pc.in b/erasurecode.pc.in
15
+ index 148c382..5a8578f 100644
16
+ --- a/erasurecode.pc.in
17
+ +++ b/erasurecode.pc.in
18
+ @@ -11,5 +11,6 @@ Version: @LIBERASURECODE_VERSION@
19
+ Requires:
20
+ Conflicts:
21
+ Libs: -L${libdir} -lerasurecode -ldl
22
+ -Libs.private: @ERASURECODE_STATIC_LIBS@ -lz
23
+ +Libs.private: -lXorcode -lnullcode -lerasurecode_rs_vand
24
+ +Requires.private: zlib
25
+ Cflags: -I${includedir}/ -I${includedir}/liberasurecode
26
+ diff --git a/src/Makefile.am b/src/Makefile.am
27
+ index 693809e..097954d 100644
28
+ --- a/src/Makefile.am
29
+ +++ b/src/Makefile.am
30
+ @@ -32,7 +32,7 @@ liberasurecode_la_SOURCES = \
31
+ backends/shss/shss.c \
32
+ backends/phazrio/libphazr.c
33
+
34
+ -liberasurecode_la_CPPFLAGS = -Werror @GCOV_FLAGS@
35
+ +liberasurecode_la_CPPFLAGS = @GCOV_FLAGS@
36
+ liberasurecode_la_LIBADD = \
37
+ builtin/null_code/libnullcode.la \
38
+ builtin/xor_codes/libXorcode.la \
cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/portfile.cmake ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO openstack/liberasurecode
4
+ REF "${VERSION}"
5
+ SHA512 d5daa962324ef19fd195cfa842ec375d9dd5e62e3391b4a1cbf49a850b852b18cfc9be929ab18786d6b839139f6260d5cb4c88a0ba440c06b0e54e04ffb1bee1
6
+ HEAD_REF master
7
+ PATCHES
8
+ fix-build.patch
9
+ )
10
+
11
+ vcpkg_configure_make(
12
+ SOURCE_PATH "${SOURCE_PATH}"
13
+ AUTOCONFIG
14
+ OPTIONS
15
+ "--disable-werror"
16
+ )
17
+
18
+ vcpkg_install_make()
19
+ vcpkg_fixup_pkgconfig()
20
+
21
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share")
22
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
23
+ vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/vcpkg.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "liberasurecode",
3
+ "version": "1.6.3",
4
+ "description": "Erasure Code API library written in C with pluggable Erasure Code backends. Mirror of code maintained at opendev.org.",
5
+ "homepage": "https://github.com/openstack/liberasurecode",
6
+ "license": "BSD-2-Clause",
7
+ "supports": "!android & !windows",
8
+ "dependencies": [
9
+ "zlib"
10
+ ]
11
+ }
cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/build.patch ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/encparse.c b/src/encparse.c
2
+ index 548110ede..61952b9ce 100644
3
+ --- a/src/encparse.c
4
+ +++ b/src/encparse.c
5
+ @@ -28,12 +28,16 @@ THE SOFTWARE.
6
+ to be pure ASCII. Bloody ``Code Set Independence''. */
7
+
8
+ #include <string.h>
9
+ +#ifndef _MSC_VER
10
+ #include <strings.h>
11
+ +#else
12
+ +#define strcasecmp _stricmp
13
+ +#endif
14
+ #include <stdio.h>
15
+
16
+ #include <stdlib.h>
17
+
18
+ -#include "zlib.h"
19
+ +#include <zlib.h>
20
+ typedef gzFile FontFilePtr;
21
+
22
+ #define FontFileGetc(f) gzgetc(f)
23
+ diff --git a/src/fontenc.c b/src/fontenc.c
24
+ index c4ccd5eb0..e87d1089d 100644
25
+ --- a/src/fontenc.c
26
+ +++ b/src/fontenc.c
27
+ @@ -23,7 +23,11 @@ THE SOFTWARE.
28
+ /* Backend-independent encoding code */
29
+
30
+ #include <string.h>
31
+ +#ifndef _MSC_VER
32
+ #include <strings.h>
33
+ +#else
34
+ +#define strcasecmp _stricmp
35
+ +#endif
36
+ #include <stdlib.h>
37
+
38
+ #define FALSE 0
cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/configure.ac.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure.ac b/configure.ac
2
+ index cadc653a0..aa645af81 100644
3
+ --- a/configure.ac
4
+ +++ b/configure.ac
5
+ @@ -47,7 +47,7 @@ XORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings])
6
+ # zlib
7
+ AC_CHECK_HEADER([zlib.h], [],
8
+ AC_MSG_FAILURE([zlib.h is required to compile libfontenc]))
9
+ -AC_CHECK_LIB(z, gzclose, [],
10
+ +AC_SEARCH_LIBS(gzclose, [z zlib zlibd], [],
11
+ AC_MSG_FAILURE([zlib is required to compile libfontenc]))
12
+
13
+ # Obtain compiler/linker options for depedencies
cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/portfile.cmake ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS)
2
+ message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!")
3
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
4
+ else()
5
+
6
+ vcpkg_from_gitlab(
7
+ GITLAB_URL https://gitlab.freedesktop.org/xorg
8
+ OUT_SOURCE_PATH SOURCE_PATH
9
+ REPO lib/libfontenc
10
+ REF 2baea13978759d1a011fc6d739465893b554d30a #1.1.4
11
+ SHA512 5ebef8b516a2377b004894b53d56ad960bc5179d9f9a36e18bc2228ea04e8f87e9baffd4883c21783dd1f4c57d7f521cdfa42c1e9facae60c6fc2c9f5472230e
12
+ HEAD_REF master
13
+ PATCHES configure.ac.patch
14
+ build.patch
15
+ )
16
+ set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
17
+
18
+ vcpkg_configure_make(
19
+ SOURCE_PATH "${SOURCE_PATH}"
20
+ AUTOCONFIG
21
+ )
22
+
23
+ vcpkg_install_make()
24
+ vcpkg_fixup_pkgconfig()
25
+
26
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
27
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
28
+
29
+ # # Handle copyright
30
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}/")
31
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/" RENAME copyright)
32
+ endif()
cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/vcpkg.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libfontenc",
3
+ "version": "1.1.4",
4
+ "description": "X font encoding library",
5
+ "homepage": "https://gitlab.freedesktop.org/xorg/lib/libfontenc",
6
+ "license": null,
7
+ "dependencies": [
8
+ "font-util",
9
+ "xorg-macros",
10
+ "xproto",
11
+ "zlib"
12
+ ]
13
+ }
cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/pkgconfig.patch ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/libsystemd/libsystemd.pc.in b/src/libsystemd/libsystemd.pc.in
2
+ index da6e4e667e..3786238ccb 100644
3
+ --- a/src/libsystemd/libsystemd.pc.in
4
+ +++ b/src/libsystemd/libsystemd.pc.in
5
+ @@ -17,4 +17,6 @@ Description: systemd Library
6
+ URL: {{PROJECT_URL}}
7
+ Version: {{PROJECT_VERSION}}
8
+ Libs: -L${libdir} -lsystemd
9
+ +Libs.private: -lrt
10
+ +Requires.private: libcap libcrypt liblz4 liblzma libzstd mount
11
+ Cflags: -I${includedir}
cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/portfile.cmake ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO systemd/systemd
4
+ REF "v${VERSION}"
5
+ SHA512 84b4d16980fe2e64d5c3c95b9b4fbaad1076f368f493fdd745cbafbe7ce825293384f5fa0b6360ba8188da23c4575e87402fb666a3b71f84ff8b323aba0c07ff
6
+ PATCHES
7
+ pkgconfig.patch
8
+ )
9
+
10
+ vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
11
+
12
+ vcpkg_configure_meson(
13
+ SOURCE_PATH "${SOURCE_PATH}"
14
+ OPTIONS
15
+ -Dstatic-libsystemd=true
16
+ -Daudit=false
17
+ -Dgcrypt=false
18
+ OPTIONS_DEBUG
19
+ -Drootprefix=${CURRENT_PACKAGES_DIR}/debug
20
+ -Dpkgconfiglibdir={CURRENT_PACKAGES_DIR}/debug
21
+ OPTIONS_RELEASE
22
+ -Drootprefix=${CURRENT_PACKAGES_DIR}
23
+ -Dpkgconfiglibdir={CURRENT_PACKAGES_DIR}
24
+ )
25
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
26
+ vcpkg_build_ninja(
27
+ TARGETS libsystemd.a devel
28
+ )
29
+ else()
30
+ vcpkg_build_ninja(
31
+ TARGETS libsystemd devel
32
+ )
33
+ endif()
34
+
35
+ file(INSTALL "${SOURCE_PATH}/src/systemd" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h")
36
+
37
+ set(BUILD_DIR_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
38
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
39
+ file(INSTALL "${BUILD_DIR_RELEASE}/libsystemd.a" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
40
+ else()
41
+ file(INSTALL "${BUILD_DIR_RELEASE}/libsystemd.so" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" FOLLOW_SYMLINK_CHAIN)
42
+ endif()
43
+
44
+ if(NOT VCPKG_BUILD_TYPE)
45
+ set(BUILD_DIR_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
46
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
47
+ file(INSTALL "${BUILD_DIR_DEBUG}/libsystemd.a" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
48
+ else()
49
+ file(INSTALL "${BUILD_DIR_DEBUG}/libsystemd.so" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" FOLLOW_SYMLINK_CHAIN)
50
+ endif()
51
+ endif()
52
+
53
+ file(INSTALL "${BUILD_DIR_RELEASE}/src/libsystemd/libsystemd.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
54
+ if(NOT VCPKG_BUILD_TYPE)
55
+ file(INSTALL "${BUILD_DIR_DEBUG}/src/libsystemd/libsystemd.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
56
+ endif()
57
+
58
+ vcpkg_fixup_pkgconfig()
59
+
60
+ vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.LGPL2.1")
cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/vcpkg.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libsystemd",
3
+ "version": "254",
4
+ "port-version": 2,
5
+ "description": "Libsystemd",
6
+ "homepage": "https://github.com/systemd/systemd",
7
+ "license": "LGPL-2.1+",
8
+ "supports": "linux",
9
+ "dependencies": [
10
+ {
11
+ "name": "gperf",
12
+ "host": true
13
+ },
14
+ "libcap",
15
+ "liblzma",
16
+ "libmount",
17
+ "libxcrypt",
18
+ "lz4",
19
+ {
20
+ "name": "vcpkg-tool-meson",
21
+ "host": true
22
+ },
23
+ "zstd"
24
+ ]
25
+ }
cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/fix-cmake.patch ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --- a/CMakeLists.txt
2
+ +++ b/CMakeLists.txt
3
+ @@ -380,11 +380,11 @@ target_link_libraries(mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.lib)
4
+ add_custom_command(TARGET mimalloc POST_BUILD
5
+ COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" $<TARGET_FILE_DIR:mimalloc>
6
+ COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory")
7
+ - install(FILES "$<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${mi_install_libdir})
8
+ + install(FILES "$<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${CMAKE_INSTALL_BINDIR})
9
+ endif()
10
+
11
+ - install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
12
+ + install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION ${mi_install_libdir} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${mi_install_libdir} NAMELINK_SKIP)
13
+ install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})
14
+ endif()
15
+
16
+ # static library
cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/template-param-types.diff ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/arena.c b/src/arena.c
2
+ index a04a04c..1340a96 100644
3
+ --- a/src/arena.c
4
+ +++ b/src/arena.c
5
+ @@ -476,7 +476,7 @@ static void mi_arena_schedule_purge(mi_arena_t* arena, size_t bitmap_idx, size_t
6
+ // schedule decommit
7
+ mi_msecs_t expire = mi_atomic_loadi64_relaxed(&arena->purge_expire);
8
+ if (expire != 0) {
9
+ - mi_atomic_addi64_acq_rel(&arena->purge_expire, delay/10); // add smallish extra delay
10
+ + mi_atomic_addi64_acq_rel(&arena->purge_expire, (mi_msecs_t)delay/10); // add smallish extra delay
11
+ }
12
+ else {
13
+ mi_atomic_storei64_release(&arena->purge_expire, _mi_clock_now() + delay);
14
+ @@ -520,7 +520,7 @@ static bool mi_arena_try_purge(mi_arena_t* arena, mi_msecs_t now, bool force, mi
15
+ if (!force && expire > now) return false;
16
+
17
+ // reset expire (if not already set concurrently)
18
+ - mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire, 0);
19
+ + mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire, (mi_msecs_t)0);
20
+
21
+ // potential purges scheduled, walk through the bitmap
22
+ bool any_purged = false;
cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/usage ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ mimalloc provides CMake targets:
2
+
3
+ find_package(mimalloc CONFIG REQUIRED)
4
+ target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:mimalloc-static>,mimalloc-static,mimalloc)
cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg-cmake-wrapper.cmake ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ _find_package(${ARGS})
2
+
3
+ if(TARGET mimalloc AND NOT TARGET mimalloc-static)
4
+ add_library(mimalloc-static INTERFACE IMPORTED)
5
+ set_target_properties(mimalloc-static PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc)
6
+ elseif(TARGET mimalloc-static AND NOT TARGET mimalloc)
7
+ add_library(mimalloc INTERFACE IMPORTED)
8
+ set_target_properties(mimalloc PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc-static)
9
+ endif()
cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "mimalloc",
3
+ "version": "2.1.2",
4
+ "port-version": 1,
5
+ "description": "Compact general purpose allocator with excellent performance",
6
+ "homepage": "https://github.com/microsoft/mimalloc",
7
+ "license": "MIT",
8
+ "supports": "!uwp",
9
+ "dependencies": [
10
+ {
11
+ "name": "vcpkg-cmake",
12
+ "host": true
13
+ },
14
+ {
15
+ "name": "vcpkg-cmake-config",
16
+ "host": true
17
+ }
18
+ ],
19
+ "features": {
20
+ "asm": {
21
+ "description": "Generate assembly files"
22
+ },
23
+ "override": {
24
+ "description": "Override the standard malloc interface"
25
+ },
26
+ "secure": {
27
+ "description": "Use security mitigations (like guard pages and randomization)"
28
+ }
29
+ }
30
+ }
cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/portfile.cmake ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(VCPKG_TARGET_IS_WINDOWS)
2
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
3
+ endif()
4
+
5
+ # Convert PcapPlusPlus to add leading zero 23.9 => 23.09
6
+ string(REGEX REPLACE "^([0-9]+)[.]([0-9])\$" "\\1.0\\2" PCAPPLUSPLUS_VERSION "${VERSION}")
7
+
8
+ vcpkg_from_github(
9
+ OUT_SOURCE_PATH SOURCE_PATH
10
+ REPO seladb/PcapPlusPlus
11
+ REF "v${PCAPPLUSPLUS_VERSION}"
12
+ SHA512 e7dc1dbd85c9f0d2f9c5d3e436456c2cd183fb508c869fa8fb83f46aac99b868a16283204e5d57a0bfd7587f6ac2582b3e14c6098683fad4501708c8fededd6a
13
+ HEAD_REF master
14
+ )
15
+
16
+ vcpkg_cmake_configure(
17
+ SOURCE_PATH "${SOURCE_PATH}"
18
+ OPTIONS
19
+ -DPCAPPP_BUILD_EXAMPLES=OFF
20
+ )
21
+
22
+ vcpkg_cmake_install()
23
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/pcapplusplus)
24
+ vcpkg_fixup_pkgconfig()
25
+ vcpkg_copy_pdbs()
26
+
27
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
28
+ "${CURRENT_PACKAGES_DIR}/debug/include"
29
+ )
30
+
31
+ vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/vcpkg.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "pcapplusplus",
3
+ "version": "23.9",
4
+ "port-version": 1,
5
+ "description": "PcapPlusPlus is a multi-platform C++ library for capturing, parsing and crafting of network packets",
6
+ "homepage": "https://github.com/seladb/PcapPlusPlus",
7
+ "license": null,
8
+ "dependencies": [
9
+ {
10
+ "name": "libpcap",
11
+ "platform": "!windows"
12
+ },
13
+ {
14
+ "name": "vcpkg-cmake",
15
+ "host": true
16
+ },
17
+ {
18
+ "name": "vcpkg-cmake-config",
19
+ "host": true
20
+ },
21
+ {
22
+ "name": "winpcap",
23
+ "platform": "windows"
24
+ }
25
+ ]
26
+ }
cc-multilingual-main/cc_net/vcpkg/ports/python3/0001-only-build-required-projects.patch ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 6492277e39dbe7dd77d32fdc9ae4b989213ef3c6 Mon Sep 17 00:00:00 2001
2
+ From: Adam Johnson <[email protected]>
3
+ Date: Wed, 9 Sep 2020 20:15:58 -0400
4
+ Subject: [PATCH 5/6] only build required projects
5
+
6
+ strips out tests and unsupported externals (eg tkinter).
7
+ ---
8
+ PCbuild/_ssl.vcxproj | 2 +-
9
+ PCbuild/pcbuild.proj | 14 +++++++-------
10
+ 2 files changed, 8 insertions(+), 8 deletions(-)
11
+
12
+ diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj
13
+ index 4dffa202b7..e661cb6fb6 100644
14
+ --- a/PCbuild/_ssl.vcxproj
15
+ +++ b/PCbuild/_ssl.vcxproj
16
+ @@ -111,7 +111,7 @@
17
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
18
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
19
+ </ProjectReference>
20
+ - <ProjectReference Include="_socket.vcxproj">
21
+ + <ProjectReference Condition="false" Include="_socket.vcxproj">
22
+ <Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>
23
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
24
+ </ProjectReference>
25
+ diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
26
+ index 4d416c589e..ede9868a8f 100644
27
+ --- a/PCbuild/pcbuild.proj
28
+ +++ b/PCbuild/pcbuild.proj
29
+ @@ -60,17 +60,17 @@
30
+ <!-- python3.dll -->
31
+ <Projects Include="python3dll.vcxproj" />
32
+ <!-- py[w].exe -->
33
+ - <Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />
34
+ + <Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" Condition="false" />
35
+ <!-- pyshellext.dll -->
36
+ - <Projects Include="pyshellext.vcxproj" />
37
+ + <Projects Include="pyshellext.vcxproj" Condition="false" />
38
+ <!-- Extension modules -->
39
+ <ExtensionModules Include="_asyncio;_zoneinfo;_decimal;_elementtree;_msi;_multiprocessing;_overlapped;pyexpat;_queue;select;unicodedata;winsound;_uuid" />
40
+ <ExtensionModules Include="_ctypes" Condition="$(IncludeCTypes)" />
41
+ <!-- Extension modules that require external sources -->
42
+ <ExternalModules Include="_bz2;_lzma;_sqlite3" />
43
+ <!-- venv launchers -->
44
+ - <Projects Include="venvlauncher.vcxproj;venvwlauncher.vcxproj" />
45
+ - <!-- _ssl will build _socket as well, which may cause conflicts in parallel builds -->
46
+ - <ExtensionModules Include="_socket" Condition="!$(IncludeSSL) or !$(IncludeExternals)" />
47
+ - <ExternalModules Include="_ssl;_hashlib" Condition="$(IncludeSSL)" />
48
+ + <Projects Include="venvlauncher.vcxproj;venvwlauncher.vcxproj" Condition="false" />
49
+ + <!-- _ssl will NOT build _socket as well -->
50
+ + <ExtensionModules Include="_socket" Condition="true" />
51
+ + <ExternalModules Include="_ssl;_hashlib" Condition="true" />
52
+ <ExternalModules Include="_tkinter" Condition="$(IncludeTkinter)" />
53
+ <ExtensionModules Include="@(ExternalModules->'%(Identity)')" Condition="$(IncludeExternals)" />
54
+ <Projects Include="@(ExtensionModules->'%(Identity).vcxproj')" Condition="$(IncludeExtensions)" />
55
+ --
56
+ 2.28.0.windows.1
57
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0002-static-library.patch ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 14d91e4f4a9377f47cc4cc33faeeb7c82f64b176 Mon Sep 17 00:00:00 2001
2
+ From: Adam Johnson <[email protected]>
3
+ Date: Thu, 28 May 2020 17:25:21 -0400
4
+ Subject: [PATCH 1/7] static library
5
+
6
+ builds the pythoncore as a static library instead of a DLL
7
+ ---
8
+ PC/pyconfig.h | 9 +++++++++
9
+ PCbuild/pythoncore.vcxproj | 4 ++--
10
+ 2 files changed, 11 insertions(+), 2 deletions(-)
11
+
12
+ diff --git a/Modules/getpath.c b/Modules/getpath.c
13
+ index d7d3cf081e..34269f0b75 100644
14
+ --- a/Modules/getpath.c
15
+ +++ b/Modules/getpath.c
16
+ @@ -801,10 +801,12 @@ static int
17
+ library_to_dict(PyObject *dict, const char *key)
18
+ {
19
+ #ifdef MS_WINDOWS
20
+ +#ifdef Py_ENABLE_SHARED
21
+ extern HMODULE PyWin_DLLhModule;
22
+ if (PyWin_DLLhModule) {
23
+ return winmodule_to_dict(dict, key, PyWin_DLLhModule);
24
+ }
25
+ +#endif
26
+ #elif defined(WITH_NEXT_FRAMEWORK)
27
+ static char modPath[MAXPATHLEN + 1];
28
+ static int modPathInitialized = -1;
29
+ diff --git a/PC/pyconfig.h b/PC/pyconfig.h
30
+ index d7d3cf081e..34269f0b75 100644
31
+ --- a/PC/pyconfig.h
32
+ +++ b/PC/pyconfig.h
33
+ @@ -251,6 +251,9 @@ typedef int pid_t;
34
+
35
+ /* For Windows the Python core is in a DLL by default. Test
36
+ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
37
+ +#ifndef Py_NO_ENABLE_SHARED
38
+ +#define Py_NO_ENABLE_SHARED
39
+ +#endif
40
+ #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED)
41
+ # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */
42
+ # define MS_COREDLL /* deprecated old symbol */
43
+ @@ -276,6 +277,15 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
44
+ # endif /* _DEBUG */
45
+ # endif /* _MSC_VER */
46
+ # endif /* Py_BUILD_CORE */
47
+ +#else
48
+ + /* So MSVC users need not specify the .lib file in their own config */
49
+ +# pragma comment(lib, "version.lib")
50
+ +# pragma comment(lib, "shlwapi.lib")
51
+ +# pragma comment(lib, "ws2_32.lib")
52
+ +# pragma comment(lib, "bcrypt.lib")
53
+ +# if Py_WINVER > 0x0601
54
+ +# pragma comment(lib, "pathcch.lib")
55
+ +# endif /* Py_WINVER */
56
+ #endif /* MS_COREDLL */
57
+
58
+ #if defined(MS_WIN64)
59
+ diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
60
+ index 70c336a9d3..ba797e8afd 100644
61
+ --- a/PCbuild/pcbuild.proj
62
+ +++ b/PCbuild/pcbuild.proj
63
+ @@ -45,7 +45,7 @@
64
+ <BuildInParallel>false</BuildInParallel>
65
+ </Projects>
66
+ <!-- python3.dll -->
67
+ - <Projects Include="python3dll.vcxproj" />
68
+ + <Projects Include="python3dll.vcxproj" Condition="false" />
69
+ <!-- py[w].exe -->
70
+ <Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" Condition="false" />
71
+ <!-- pyshellext.dll -->
72
+ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
73
+ index 2625d0293d..2f8bdaa931 100644
74
+ --- a/PCbuild/pythoncore.vcxproj
75
+ +++ b/PCbuild/pythoncore.vcxproj
76
+ @@ -73,7 +73,7 @@
77
+ <Import Project="python.props" />
78
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
79
+ <PropertyGroup Label="Configuration">
80
+ - <ConfigurationType>DynamicLibrary</ConfigurationType>
81
+ + <ConfigurationType>StaticLibrary</ConfigurationType>
82
+ <UseOfMfc>false</UseOfMfc>
83
+ </PropertyGroup>
84
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
85
+ @@ -102,7 +102,7 @@
86
+ <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
87
+ <AdditionalIncludeDirectories>$(PySourcePath)Python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
88
+ <AdditionalIncludeDirectories Condition="$(IncludeExternals)">$(zlibDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
89
+ - <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
90
+ + <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
91
+ <PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92
+ </ClCompile>
93
+ <Link>
94
+ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
95
+ index 2625d0293d..2f8bdaa931 100644
96
+ --- a/PCbuild/_freeze_module.vcxproj
97
+ +++ b/PCbuild/_freeze_module.vcxproj
98
+ @@ -88,7 +88,7 @@
99
+ <PropertyGroup Label="UserMacros" />
100
+ <ItemDefinitionGroup>
101
+ <ClCompile>
102
+ - <PreprocessorDefinitions>Py_NO_ENABLE_SHARED;Py_BUILD_CORE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
103
+ + <PreprocessorDefinitions>Py_NO_ENABLE_SHARED;Py_BUILD_CORE;_CONSOLE;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
104
+ <Optimization>Disabled</Optimization>
105
+ <WholeProgramOptimization>false</WholeProgramOptimization>
106
+ </ClCompile>
107
+ diff --git a/Python/dynload_win.c b/Python/dynload_win.c
108
+ index ac49f7867a..f3583345ff 100644
109
+ --- a/Python/dynload_win.c
110
+ +++ b/Python/dynload_win.c
111
+ @@ -163,6 +163,7 @@ static char *GetPythonImport (HINSTANCE hModule)
112
+ return NULL;
113
+ }
114
+
115
+ +#ifdef Py_ENABLE_SHARED
116
+ /* Load python3.dll before loading any extension module that might refer
117
+ to it. That way, we can be sure that always the python3.dll corresponding
118
+ to this python DLL is loaded, not a python3.dll that might be on the path
119
+ @@ -216,6 +217,7 @@ _Py_CheckPython3(void)
120
+ return hPython3 != NULL;
121
+ #undef MAXPATHLEN
122
+ }
123
+ +#endif /* Py_ENABLE_SHARED */
124
+
125
+ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
126
+ const char *shortname,
127
+ @@ -224,7 +226,9 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
128
+ dl_funcptr p;
129
+ char funcname[258], *import_python;
130
+
131
+ +#ifdef Py_ENABLE_SHARED
132
+ _Py_CheckPython3();
133
+ +#endif /* Py_ENABLE_SHARED */
134
+
135
+ #if USE_UNICODE_WCHAR_CACHE
136
+ const wchar_t *wpathname = _PyUnicode_AsUnicode(pathname);
137
+ diff --git a/Python/sysmodule.c b/Python/sysmodule.c
138
+ index ac49f7867a..f3583345ff 100644
139
+ --- a/Python/sysmodule.c
140
+ +++ b/Python/sysmodule.c
141
+ @@ -2804,6 +2804,9 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict
142
+ #ifdef MS_COREDLL
143
+ SET_SYS("dllhandle", PyLong_FromVoidPtr(PyWin_DLLhModule));
144
+ SET_SYS_FROM_STRING("winver", PyWin_DLLVersionString);
145
+ +#elif defined(MS_WINDOWS)
146
+ + SET_SYS("dllhandle", PyLong_FromVoidPtr(NULL));
147
+ + SET_SYS_FROM_STRING("winver", MS_DLL_ID);
148
+ #endif
149
+ #ifdef ABIFLAGS
150
+ SET_SYS_FROM_STRING("abiflags", ABIFLAGS);
151
+ --
152
+ 2.28.0.windows.1
153
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0003-use-vcpkg-zlib.patch ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 196555707236f4387875749f66620fb519166963 Mon Sep 17 00:00:00 2001
2
+ From: Adam Johnson <[email protected]>
3
+ Date: Wed, 9 Sep 2020 15:20:36 -0400
4
+ Subject: [PATCH 2/6] use vcpkg zlib
5
+
6
+ building without zlib is not a supported configuration, per the warning
7
+ messages.
8
+ ---
9
+ PCbuild/pythoncore.vcxproj | 6 ++++--
10
+ 1 file changed, 4 insertions(+), 2 deletions(-)
11
+
12
+ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
13
+ index dbe236829a..5f30a35eb3 100644
14
+ --- a/PCbuild/pythoncore.vcxproj
15
+ +++ b/PCbuild/pythoncore.vcxproj
16
+ @@ -540,8 +540,10 @@
17
+ <ClCompile Include="..\Python\deepfreeze\deepfreeze.c" />
18
+ <!-- END deepfreeze -->
19
+ </ItemGroup>
20
+ - <ItemGroup Condition="$(IncludeExternals)">
21
+ + <ItemGroup>
22
+ <ClCompile Include="..\Modules\zlibmodule.c" />
23
+ + </ItemGroup>
24
+ + <ItemGroup Condition="false">
25
+ <ClCompile Include="$(zlibDir)\adler32.c" />
26
+ <ClCompile Include="$(zlibDir)\compress.c" />
27
+ <ClCompile Include="$(zlibDir)\crc32.c" />
28
+ @@ -593,7 +595,7 @@
29
+ <Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140' and $(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142' and $(PlatformToolset) != 'v143'">
30
+ <Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
31
+ </Target>
32
+ - <Target Name="_WarnAboutZlib" BeforeTargets="PrepareForBuild" Condition="!$(IncludeExternals)">
33
+ + <Target Name="_WarnAboutZlib" BeforeTargets="PrepareForBuild" Condition="false">
34
+ <Warning Text="Not including zlib is not a supported configuration." />
35
+ </Target>
36
+
37
+ --
38
+ 2.28.0.windows.1
39
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0004-devendor-external-dependencies.patch ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 6c5c3793cbc6ba2a1d0d623a2bdaa9c2125be516 Mon Sep 17 00:00:00 2001
2
+ From: Adam Johnson <[email protected]>
3
+ Date: Wed, 9 Sep 2020 15:24:38 -0400
4
+ Subject: [PATCH 3/6] devendor external dependencies
5
+
6
+ externally fetched libraries may cause linker errors resulting from
7
+ duplicate symbols in downstream projects.
8
+ ---
9
+ PCbuild/_bz2.vcxproj | 4 +++-
10
+ PCbuild/_lzma.vcxproj | 5 ++---
11
+ PCbuild/_sqlite3.vcxproj | 2 +-
12
+ PCbuild/_ssl.vcxproj | 2 +-
13
+ PCbuild/pyexpat.vcxproj | 6 ++++--
14
+ 5 files changed, 11 insertions(+), 8 deletions(-)
15
+
16
+ diff --git a/PCbuild/_bz2.vcxproj b/PCbuild/_bz2.vcxproj
17
+ index 3fe95fbf83..6b12e8818e 100644
18
+ --- a/PCbuild/_bz2.vcxproj
19
+ +++ b/PCbuild/_bz2.vcxproj
20
+ @@ -101,6 +101,8 @@
21
+ </ItemDefinitionGroup>
22
+ <ItemGroup>
23
+ <ClCompile Include="..\Modules\_bz2module.c" />
24
+ + </ItemGroup>
25
+ + <ItemGroup Condition="false">
26
+ <ClCompile Include="$(bz2Dir)\blocksort.c" />
27
+ <ClCompile Include="$(bz2Dir)\bzlib.c" />
28
+ <ClCompile Include="$(bz2Dir)\compress.c" />
29
+ @@ -109,7 +111,7 @@
30
+ <ClCompile Include="$(bz2Dir)\huffman.c" />
31
+ <ClCompile Include="$(bz2Dir)\randtable.c" />
32
+ </ItemGroup>
33
+ - <ItemGroup>
34
+ + <ItemGroup Condition="false">
35
+ <ClInclude Include="$(bz2Dir)\bzlib.h" />
36
+ <ClInclude Include="$(bz2Dir)\bzlib_private.h" />
37
+ </ItemGroup>
38
+ diff --git a/PCbuild/_lzma.vcxproj b/PCbuild/_lzma.vcxproj
39
+ index fe076a6fc5..70cc61dd95 100644
40
+ --- a/PCbuild/_lzma.vcxproj
41
+ +++ b/PCbuild/_lzma.vcxproj
42
+ @@ -94,10 +94,9 @@
43
+ <ItemDefinitionGroup>
44
+ <ClCompile>
45
+ <AdditionalIncludeDirectories>$(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
46
+ - <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
47
+ + <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
48
+ </ClCompile>
49
+ <Link>
50
+ - <AdditionalDependencies>$(OutDir)liblzma$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
51
+ </Link>
52
+ </ItemDefinitionGroup>
53
+ <ItemGroup>
54
+ @@ -111,7 +110,7 @@
55
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
56
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
57
+ </ProjectReference>
58
+ - <ProjectReference Include="liblzma.vcxproj">
59
+ + <ProjectReference Condition="false" Include="liblzma.vcxproj">
60
+ <Project>{12728250-16eC-4dc6-94d7-e21dd88947f8}</Project>
61
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
62
+ </ProjectReference>
63
+ diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj
64
+ index 7e0062692b..6fb3279a20 100644
65
+ --- a/PCbuild/_sqlite3.vcxproj
66
+ +++ b/PCbuild/_sqlite3.vcxproj
67
+ @@ -127,7 +127,7 @@
68
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
69
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
70
+ </ProjectReference>
71
+ - <ProjectReference Include="sqlite3.vcxproj">
72
+ + <ProjectReference Condition="false" Include="sqlite3.vcxproj">
73
+ <Project>{a1a295e5-463c-437f-81ca-1f32367685da}</Project>
74
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
75
+ </ProjectReference>
76
+ diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj
77
+ index 4907f49b66..4dffa202b7 100644
78
+ --- a/PCbuild/_ssl.vcxproj
79
+ +++ b/PCbuild/_ssl.vcxproj
80
+ @@ -99,7 +99,7 @@
81
+ </ItemDefinitionGroup>
82
+ <ItemGroup>
83
+ <ClCompile Include="..\Modules\_ssl.c" />
84
+ - <ClCompile Include="$(opensslIncludeDir)\applink.c">
85
+ + <ClCompile Condition="false" Include="$(opensslIncludeDir)\applink.c">
86
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)</PreprocessorDefinitions>
87
+ </ClCompile>
88
+ </ItemGroup>
89
+ diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj
90
+ index b2d9f5d57d..4efb826a05 100644
91
+ --- a/PCbuild/pyexpat.vcxproj
92
+ +++ b/PCbuild/pyexpat.vcxproj
93
+ @@ -89,17 +89,19 @@
94
+ </ImportGroup>
95
+ <PropertyGroup Label="UserMacros" />
96
+ <ItemDefinitionGroup>
97
+ - <ClCompile>
98
+ + <ClCompile Condition="false">
99
+ <AdditionalIncludeDirectories>$(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
100
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;XML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
101
+ </ClCompile>
102
+ </ItemDefinitionGroup>
103
+ - <ItemGroup>
104
+ + <ItemGroup Condition="false">
105
+ <ClInclude Include="..\Modules\expat\xmlrole.h" />
106
+ <ClInclude Include="..\Modules\expat\xmltok.h" />
107
+ </ItemGroup>
108
+ <ItemGroup>
109
+ <ClCompile Include="..\Modules\pyexpat.c" />
110
+ + </ItemGroup>
111
+ + <ItemGroup Condition="false">
112
+ <ClCompile Include="..\Modules\expat\xmlparse.c" />
113
+ <ClCompile Include="..\Modules\expat\xmlrole.c" />
114
+ <ClCompile Include="..\Modules\expat\xmltok.c" />
115
+ --
116
+ 2.28.0.windows.1
117
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0005-dont-copy-vcruntime.patch ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 8086c67fa7ada1888a7808cbdc6fe74b62abe5b1 Mon Sep 17 00:00:00 2001
2
+ From: Adam Johnson <[email protected]>
3
+ Date: Wed, 9 Sep 2020 16:12:49 -0400
4
+ Subject: [PATCH 4/6] dont copy vcruntime
5
+
6
+ VCRUNTIME140.dll should not be redistributed, ever.
7
+ ---
8
+ PCbuild/pythoncore.vcxproj | 2 +-
9
+ 1 file changed, 1 insertion(+), 1 deletion(-)
10
+
11
+ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
12
+ index 5f30a35eb3..3cf21ba39c 100644
13
+ --- a/PCbuild/pythoncore.vcxproj
14
+ +++ b/PCbuild/pythoncore.vcxproj
15
+ @@ -565,7 +565,7 @@
16
+ <Target Name="_CopyVCRuntime" AfterTargets="Build" Inputs="@(VCRuntimeDLL)" Outputs="$(OutDir)%(Filename)%(Extension)" DependsOnTargets="FindVCRuntime">
17
+ <!-- bpo-38597: When we switch to another VCRuntime DLL, include vcruntime140.dll as well -->
18
+ <Warning Text="A copy of vcruntime140.dll is also required" Condition="!$(VCToolsRedistVersion.StartsWith(`14.`))" />
19
+ - <Copy SourceFiles="%(VCRuntimeDLL.FullPath)" DestinationFolder="$(OutDir)" />
20
+ + <Copy Condition="false" SourceFiles="%(VCRuntimeDLL.FullPath)" DestinationFolder="$(OutDir)" />
21
+ </Target>
22
+ <Target Name="_CleanVCRuntime" AfterTargets="Clean">
23
+ <Delete Files="@(VCRuntimeDLL->'$(OutDir)%(Filename)%(Extension)')" />
24
+ --
25
+ 2.28.0.windows.1
26
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0006-restore-support-for-windows-7.patch ADDED
@@ -0,0 +1,326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From e30a560527d17ae81685dd11d3268bc982af2048 Mon Sep 17 00:00:00 2001
2
+ From: Adam Johnson <[email protected]>
3
+ Date: Tue, 16 Feb 2021 18:03:07 -0500
4
+ Subject: [PATCH 7/7] restore support for windows 7
5
+
6
+ this backports the windows 7 compatible fix for bpo-39401 from gh-18234,
7
+ originally authored by Steve Dower, and removes explicit dependencies on
8
+ pathcch.
9
+
10
+ The same mechanism is applied to fix posixmodule.c
11
+ ---
12
+ index 25ddc82..ff51042 100644
13
+ --- a/Modules/_winapi.c
14
+ +++ b/Modules/_winapi.c
15
+ @@ -44,6 +44,15 @@
16
+
17
+ #include "pycore_runtime.h" // _Py_ID
18
+
19
+ +// The Windws 7 patch lowers the API version such that these constants
20
+ +// are no longer defined by the Windows SDK. Debounce that.
21
+ +#ifndef LCMAP_SORTHANDLE
22
+ +# define LCMAP_SORTHANDLE 0x20000000
23
+ +#endif
24
+ +#ifndef LCMAP_HASH
25
+ +# define LCMAP_HASH 0x00040000
26
+ +#endif
27
+ +
28
+ #if defined(MS_WIN32) && !defined(MS_WIN64)
29
+ #define HANDLE_TO_PYNUM(handle) \
30
+ PyLong_FromUnsignedLong((unsigned long) handle)
31
+ diff --git a/Modules/getpath.c b/Modules/getpath.c
32
+ index bc730fc..7d3d559 100644
33
+ --- a/Modules/getpath.c
34
+ +++ b/Modules/getpath.c
35
+ @@ -11,7 +11,7 @@
36
+
37
+ #ifdef MS_WINDOWS
38
+ # include <windows.h> // GetFullPathNameW(), MAX_PATH
39
+ -# include <pathcch.h>
40
+ +# include <Shlwapi.h>
41
+ #endif
42
+
43
+ #ifdef __APPLE__
44
+ @@ -217,6 +217,11 @@ getpath_isfile(PyObject *Py_UNUSED(self), PyObject *args)
45
+ return r;
46
+ }
47
+
48
+ +#ifdef MS_WINDOWS
49
+ +static int _PathCchFindExtension_Initialized = 0;
50
+ +typedef HRESULT (__stdcall *PPathCchFindExtension) (PCWSTR pszPath, size_t cchPath, PCWSTR *ppszExt);
51
+ +static PPathCchFindExtension _PathCchFindExtension;
52
+ +#endif
53
+
54
+ static PyObject *
55
+ getpath_isxfile(PyObject *Py_UNUSED(self), PyObject *args)
56
+ @@ -231,13 +235,51 @@ getpath_isxfile(PyObject *Py_UNUSED(self), PyObject *args)
57
+ path = PyUnicode_AsWideCharString(pathobj, &cchPath);
58
+ if (path) {
59
+ #ifdef MS_WINDOWS
60
+ +
61
+ + if (_PathCchFindExtension_Initialized == 0) {
62
+ + HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL,
63
+ + LOAD_LIBRARY_SEARCH_SYSTEM32);
64
+ +
65
+ + if (pathapi) {
66
+ + _PathCchFindExtension = (PPathCchFindExtension)GetProcAddress(pathapi, "PathCchFindExtension");
67
+ + } else {
68
+ + _PathCchFindExtension = NULL;
69
+ + }
70
+ +
71
+ + _PathCchFindExtension_Initialized = 1;
72
+ + }
73
+ +
74
+ const wchar_t *ext;
75
+ DWORD attr = GetFileAttributesW(path);
76
+ - r = (attr != INVALID_FILE_ATTRIBUTES) &&
77
+ - !(attr & FILE_ATTRIBUTE_DIRECTORY) &&
78
+ - SUCCEEDED(PathCchFindExtension(path, cchPath + 1, &ext)) &&
79
+ - (CompareStringOrdinal(ext, -1, L".exe", -1, 1 /* ignore case */) == CSTR_EQUAL)
80
+ - ? Py_True : Py_False;
81
+ + if (attr == INVALID_FILE_ATTRIBUTES || (attr & FILE_ATTRIBUTE_DIRECTORY)) {
82
+ + r = Py_False;
83
+ + }
84
+ + else {
85
+ + HRESULT hr = S_OK;
86
+ + if (_PathCchFindExtension) {
87
+ + hr = _PathCchFindExtension(path, cchPath + 1, &ext);
88
+ + }
89
+ + else {
90
+ + if (cchPath > MAX_PATH) {
91
+ + hr = E_FAIL;
92
+ + }
93
+ + else {
94
+ + ext = PathFindExtensionW(path);
95
+ + if (*ext == '\0')
96
+ + hr = E_FAIL;
97
+ + }
98
+ + }
99
+ +
100
+ + if (!SUCCEEDED(hr)) {
101
+ + r = Py_False;
102
+ + }
103
+ + else if (CompareStringOrdinal(ext, -1, L".exe", -1, 1 /* ignore case */) != CSTR_EQUAL) {
104
+ + r = Py_False;
105
+ + }
106
+ + else {
107
+ + r = Py_True;
108
+ + }
109
+ + }
110
+ #else
111
+ struct stat st;
112
+ r = (_Py_wstat(path, &st) == 0) &&
113
+ diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
114
+ --- a/Modules/posixmodule.c
115
+ +++ b/Modules/posixmodule.c
116
+ @@ -15,7 +15,7 @@
117
+ // whereas pycore_condvar.h defines the WIN32_LEAN_AND_MEAN macro.
118
+ #ifdef MS_WINDOWS
119
+ # include <windows.h>
120
+ -# include <pathcch.h>
121
+ +# include <Shlwapi.h>
122
+ # include <lmcons.h> // UNLEN
123
+ # include "osdefs.h" // SEP
124
+ # define HAVE_SYMLINK
125
+ @@ -4471,6 +4471,11 @@ os__getvolumepathname_impl(PyObject *module, path_t *path)
126
+ return result;
127
+ }
128
+
129
+ +#ifdef MS_WINDOWS
130
+ +static int _PathCchSkipRoot_Initialized = 0;
131
+ +typedef HRESULT (__stdcall *PPathCchSkipRoot) (PCWSTR pszPath, PCWSTR *ppszRootEnd);
132
+ +static PPathCchSkipRoot _PathCchSkipRoot;
133
+ +#endif
134
+
135
+ /*[clinic input]
136
+ os._path_splitroot
137
+ @@ -4489,6 +4493,19 @@ os__path_splitroot_impl(PyObject *module, path_t *path)
138
+ PyObject *result = NULL;
139
+ HRESULT ret;
140
+
141
+ + if (_PathCchSkipRoot_Initialized == 0) {
142
+ + HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL,
143
+ + LOAD_LIBRARY_SEARCH_SYSTEM32);
144
+ +
145
+ + if (pathapi) {
146
+ + _PathCchSkipRoot = (PPathCchSkipRoot)GetProcAddress(pathapi, "PathCchSkipRoot");
147
+ + } else {
148
+ + _PathCchSkipRoot = NULL;
149
+ + }
150
+ +
151
+ + _PathCchSkipRoot_Initialized = 1;
152
+ + }
153
+ +
154
+ buffer = (wchar_t*)PyMem_Malloc(sizeof(wchar_t) * (wcslen(path->wide) + 1));
155
+ if (!buffer) {
156
+ return NULL;
157
+ @@ -4499,7 +4516,14 @@ os__path_splitroot_impl(PyObject *module, path_t *path)
158
+ }
159
+
160
+ Py_BEGIN_ALLOW_THREADS
161
+ - ret = PathCchSkipRoot(buffer, &end);
162
+ + if (_PathCchSkipRoot) {
163
+ + ret = _PathCchSkipRoot(buffer, &end);
164
+ + } else {
165
+ + end = PathSkipRootW(buffer);
166
+ + if (!end) {
167
+ + ret = E_FAIL;
168
+ + }
169
+ + }
170
+ Py_END_ALLOW_THREADS
171
+ if (FAILED(ret)) {
172
+ result = Py_BuildValue("sO", "", path->object);
173
+ diff --git a/PC/pyconfig.h b/PC/pyconfig.h
174
+ index d7d3cf0..6e9c090 100644
175
+ --- a/PC/pyconfig.h
176
+ +++ b/PC/pyconfig.h
177
+ @@ -130,8 +130,8 @@ WIN32 is still required for the locale module.
178
+
179
+ /* set the version macros for the windows headers */
180
+ /* Python 3.9+ requires Windows 8 or greater */
181
+ -#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */
182
+ -#define Py_NTDDI NTDDI_WIN8
183
+ +#define Py_WINVER 0x0601 /* _WIN32_WINNT_WIN7 */
184
+ +#define Py_NTDDI NTDDI_WIN7
185
+
186
+ /* We only set these values when building Python - we don't want to force
187
+ these values on extensions, as that will affect the prototypes and
188
+ diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj
189
+ index 442e343..ef0a43e 100644
190
+ --- a/PCbuild/_freeze_module.vcxproj
191
+ +++ b/PCbuild/_freeze_module.vcxproj
192
+ @@ -94,7 +94,7 @@
193
+ </ClCompile>
194
+ <Link>
195
+ <SubSystem>Console</SubSystem>
196
+ - <AdditionalDependencies>version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
197
+ + <AdditionalDependencies>version.lib;ws2_32.lib;shlwapi.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
198
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
199
+ </Link>
200
+ </ItemDefinitionGroup>
201
+ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
202
+ index c39ba3e1a9..0ef3a05fb6 100644
203
+ --- a/PCbuild/pythoncore.vcxproj
204
+ +++ b/PCbuild/pythoncore.vcxproj
205
+ @@ -106,7 +106,7 @@
206
+ <PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
207
+ </ClCompile>
208
+ <Link>
209
+ - <AdditionalDependencies>version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
210
+ + <AdditionalDependencies>version.lib;ws2_32.lib;shlwapi.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
211
+ </Link>
212
+ </ItemDefinitionGroup>
213
+ <ItemGroup>
214
+ diff --git a/Python/fileutils.c b/Python/fileutils.c
215
+ index c86ed40..6b1535d 100644
216
+ --- a/Python/fileutils.c
217
+ +++ b/Python/fileutils.c
218
+ @@ -8,7 +8,7 @@
219
+ #ifdef MS_WINDOWS
220
+ # include <malloc.h>
221
+ # include <windows.h>
222
+ -# include <pathcch.h> // PathCchCombineEx
223
+ +# include <Shlwapi.h>
224
+ extern int winerror_to_errno(int);
225
+ #endif
226
+
227
+ @@ -1999,13 +1999,46 @@ _Py_wrealpath(const wchar_t *path,
228
+ }
229
+ #endif
230
+
231
+ +#ifdef MS_WINDOWS
232
+ +static int _PathCchSkipRoot_Initialized = 0;
233
+ +typedef HRESULT (__stdcall *PPathCchSkipRoot) (PCWSTR pszPath, PCWSTR *ppszRootEnd);
234
+ +static PPathCchSkipRoot _PathCchSkipRoot;
235
+ +
236
+ +#ifndef PATHCCH_ALLOW_LONG_PATHS
237
+ +#define PATHCCH_ALLOW_LONG_PATHS 0x00000001
238
+ +#endif
239
+ +#endif
240
+
241
+ int
242
+ _Py_isabs(const wchar_t *path)
243
+ {
244
+ #ifdef MS_WINDOWS
245
+ + if (_PathCchSkipRoot_Initialized == 0) {
246
+ + HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL,
247
+ + LOAD_LIBRARY_SEARCH_SYSTEM32);
248
+ +
249
+ + if (pathapi) {
250
+ + _PathCchSkipRoot = (PPathCchSkipRoot)GetProcAddress(pathapi, "PathCchSkipRoot");
251
+ + } else {
252
+ + _PathCchSkipRoot = NULL;
253
+ + }
254
+ +
255
+ + _PathCchSkipRoot_Initialized = 1;
256
+ + }
257
+ +
258
+ + HRESULT hr;
259
+ const wchar_t *tail;
260
+ - HRESULT hr = PathCchSkipRoot(path, &tail);
261
+ + if (_PathCchSkipRoot) {
262
+ + hr = _PathCchSkipRoot(path, &tail);
263
+ + } else {
264
+ + tail = PathSkipRootW(path);
265
+ + if (!tail) {
266
+ + hr = E_FAIL;
267
+ + } else {
268
+ + hr = S_OK;
269
+ + }
270
+ + }
271
+ +
272
+ if (FAILED(hr) || path == tail) {
273
+ return 0;
274
+ }
275
+ @@ -2086,6 +2117,11 @@ _Py_abspath(const wchar_t *path, wchar_t **abspath_p)
276
+ #endif
277
+ }
278
+
279
+ +#ifdef MS_WINDOWS
280
+ +static int _PathCchCombineEx_Initialized = 0;
281
+ +typedef HRESULT (__stdcall *PPathCchCombineEx) (PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, PCWSTR pszMore, ULONG dwFlags);
282
+ +static PPathCchCombineEx _PathCchCombineEx;
283
+ +#endif
284
+
285
+ // The caller must ensure "buffer" is big enough.
286
+ static int
287
+ @@ -2093,9 +2127,36 @@ join_relfile(wchar_t *buffer, size_t bufsize,
288
+ const wchar_t *dirname, const wchar_t *relfile)
289
+ {
290
+ #ifdef MS_WINDOWS
291
+ - if (FAILED(PathCchCombineEx(buffer, bufsize, dirname, relfile,
292
+ - PATHCCH_ALLOW_LONG_PATHS))) {
293
+ - return -1;
294
+ +
295
+ + if (_PathCchCombineEx_Initialized == 0) {
296
+ + HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL,
297
+ + LOAD_LIBRARY_SEARCH_SYSTEM32);
298
+ +
299
+ + if (pathapi) {
300
+ + _PathCchCombineEx = (PPathCchCombineEx)GetProcAddress(pathapi, "PathCchCombineEx");
301
+ + } else {
302
+ + _PathCchCombineEx = NULL;
303
+ + }
304
+ +
305
+ + _PathCchCombineEx_Initialized = 1;
306
+ + }
307
+ +
308
+ + if (_PathCchCombineEx) {
309
+ + if (FAILED(_PathCchCombineEx(buffer, bufsize, dirname, relfile,
310
+ + PATHCCH_ALLOW_LONG_PATHS))) {
311
+ + return -1;
312
+ + }
313
+ + }
314
+ + else {
315
+ + size_t dirlen = wcslen(dirname);
316
+ + size_t rellen = wcslen(relfile);
317
+ + size_t maxlen = bufsize - 1;
318
+ + if (maxlen > MAX_PATH || dirlen >= maxlen || rellen >= maxlen - dirlen) {
319
+ + return -1;
320
+ + }
321
+ + wchar_t * r = PathCombineW(buffer, dirname, relfile);
322
+ + if (!r)
323
+ + return -1;
324
+ }
325
+ #else
326
+ assert(!_Py_isabs(relfile));
cc-multilingual-main/cc_net/vcpkg/ports/python3/0007-workaround-windows-11-sdk-rc-compiler-error.patch ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 0a72b7061ed79c5d6d37b41a5b1610e32fb371a4 Mon Sep 17 00:00:00 2001
2
+ From: Adam Johnson <[email protected]>
3
+ Date: Wed, 22 Sep 2021 21:04:21 -0400
4
+ Subject: [PATCH] workaround windows 11 sdk rc compiler error
5
+
6
+ winnt.h was changed to error if the `SYSTEM_CACHE_ALIGNMENT` cannot be
7
+ determined. when the RC compiler is invoked, this seems to fail where
8
+ previous SDKs silently set the ARM value.
9
+ ---
10
+ PC/python_ver_rc.h | 7 +++++++
11
+ 1 file changed, 7 insertions(+)
12
+
13
+ diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h
14
+ index 90fc6ba1a1..e313a5138e 100644
15
+ --- a/PC/python_ver_rc.h
16
+ +++ b/PC/python_ver_rc.h
17
+ @@ -1,3 +1,10 @@
18
+ +// Temporarily workaround bug in Windows SDK 10.0.22000.0 winnt.h
19
+ +#ifdef RC_INVOKED
20
+ +# ifndef SYSTEM_CACHE_ALIGNMENT_SIZE
21
+ +# define SYSTEM_CACHE_ALIGNMENT_SIZE 64
22
+ +# endif
23
+ +#endif
24
+ +
25
+ // Resource script for Python core DLL.
26
+ // Currently only holds version information.
27
+ //
28
+ --
29
+ 2.33.0.windows.1
30
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0008-python.pc.patch ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 3c43def510e7c4c115fbe3938db8e4fe9bc2e311 Mon Sep 17 00:00:00 2001
2
+ From: Max Khon <[email protected]>
3
+ Date: Tue, 8 Feb 2022 12:58:30 +0700
4
+ Subject: [PATCH 08/11] python.pc
5
+
6
+ Fix pkgconfig for debug Linux builds (#22529)
7
+ ---
8
+ Misc/python-embed.pc.in | 2 +-
9
+ Misc/python.pc.in | 2 +-
10
+ 2 files changed, 2 insertions(+), 2 deletions(-)
11
+
12
+ diff --git a/Misc/python-embed.pc.in b/Misc/python-embed.pc.in
13
+ index 2be9df8143..92142dfe68 100644
14
+ --- a/Misc/python-embed.pc.in
15
+ +++ b/Misc/python-embed.pc.in
16
+ @@ -10,4 +10,4 @@ Requires:
17
+ Version: @VERSION@
18
+ Libs.private: @LIBS@
19
+ Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@
20
+ -Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@
21
+ +Cflags: -I${includedir}/python@VERSION@
22
+ diff --git a/Misc/python.pc.in b/Misc/python.pc.in
23
+ index 87e04decc2..0349dc81ba 100644
24
+ --- a/Misc/python.pc.in
25
+ +++ b/Misc/python.pc.in
26
+ @@ -10,4 +10,4 @@ Requires:
27
+ Version: @VERSION@
28
+ Libs.private: @LIBS@
29
+ Libs:
30
+ -Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@
31
+ +Cflags: -I${includedir}/python@VERSION@
32
+ --
33
+ 2.37.3.windows.1
34
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0010-dont-skip-rpath.patch ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From f7439eae9b2f8d91b6689efbf01292a044f3a3fe Mon Sep 17 00:00:00 2001
2
+ From: Osyotr <[email protected]>
3
+ Date: Thu, 4 Aug 2022 23:49:06 +0300
4
+ Subject: [PATCH 10/11] dont skip rpath
5
+
6
+ ---
7
+ configure.ac | 6 ++++++
8
+ 1 file changed, 6 insertions(+), 0 deletions(-)
9
+
10
+ diff --git a/configure.ac b/configure.ac
11
+ index 61b3266..4c2cfb4 100644
12
+ --- a/configure.ac
13
+ +++ b/configure.ac
14
+ @@ -49,6 +49,14 @@ [$1]
15
+ [RESTORE_ENV]
16
+ )dnl
17
+
18
+ +if test "$ac_sys_system" != "Darwin"; then
19
+ +AS_VAR_IF([GNULD], [yes], [
20
+ + LDFLAGS="-Wl,--enable-new-dtags,-rpath,$vcpkg_rpath"
21
+ +], [
22
+ + LDFLAGS="-Wl,-rpath,$vcpkg_rpath"
23
+ +])
24
+ +fi
25
+ +
26
+ dnl PY_CHECK_FUNC(FUNCTION, [INCLUDES], [AC_DEFINE-VAR])
27
+ AC_DEFUN([PY_CHECK_FUNC],
28
+ [ AS_VAR_PUSHDEF([py_var], [ac_cv_func_$1])
29
+ --
30
+ 2.37.3.windows.1
31
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0011-gcc-ldflags-fix.patch ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 84652c4c5658fd443a05bf54fe6040857ba9c36c Mon Sep 17 00:00:00 2001
2
+ From: Christoph Neuhauser <[email protected]>
3
+ Date: Sat, 15 Oct 2022 01:14:12 +0200
4
+ Subject: [PATCH 11/11] gcc ldflags fix
5
+
6
+ ---
7
+ Lib/distutils/unixccompiler.py | 24 ++++++++++++++++++++++--
8
+ 1 file changed, 22 insertions(+), 2 deletions(-)
9
+
10
+ diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
11
+ index d00c48981e..b14ce8454e 100644
12
+ --- a/Lib/distutils/unixccompiler.py
13
+ +++ b/Lib/distutils/unixccompiler.py
14
+ @@ -13,7 +13,7 @@
15
+ * link shared library handled by 'cc -shared'
16
+ """
17
+
18
+ -import os, sys, re
19
+ +import os, sys, re, shutil
20
+
21
+ from distutils import sysconfig
22
+ from distutils.dep_util import newer
23
+ @@ -216,7 +216,27 @@ def library_dir_option(self, dir):
24
+
25
+ def _is_gcc(self, compiler_name):
26
+ # clang uses same syntax for rpath as gcc
27
+ - return any(name in compiler_name for name in ("gcc", "g++", "clang"))
28
+ + valid_compiler_names = ("gcc", "g++", "clang")
29
+ + is_gcc = any(name in compiler_name for name in valid_compiler_names)
30
+ + # On Linux systems, the compiler name may be, e.g., "cc -pthread".
31
+ + # The executable "cc" is in this case a symlink to the true compiler.
32
+ + if not is_gcc and "cc" in compiler_name:
33
+ + # We need to make sure that this is not another compiler with "cc"
34
+ + # at the end of its name, like "icc". For this, it is checked
35
+ + # whether "cc" is the first word, or separated by a space or path
36
+ + # delimiter before the "cc" substring.
37
+ + cc_string_location = compiler_name.find("cc")
38
+ + if cc_string_location == 0 \
39
+ + or compiler_name[cc_string_location - 1] == ' ' \
40
+ + or compiler_name[cc_string_location - 1] == '/' \
41
+ + or compiler_name[cc_string_location - 1] == '\\':
42
+ + cc_path = shutil.which("cc")
43
+ + if cc_path is not None:
44
+ + real_compiler_path = os.path.realpath(cc_path)
45
+ + is_gcc = any(
46
+ + name in real_compiler_path \
47
+ + for name in valid_compiler_names)
48
+ + return is_gcc
49
+
50
+ def runtime_library_dir_option(self, dir):
51
+ # XXX Hackish, at the very least. See Python bug #445902:
52
+ --
53
+ 2.37.3.windows.1
54
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0012-force-disable-modules.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Modules/Setup b/Modules/Setup
2
+ index 87c6a152f8..7ad53f5b4f 100644
3
+ --- a/Modules/Setup
4
+ +++ b/Modules/Setup
5
+ @@ -375,3 +375,8 @@ xxsubtype xxsubtype.c
6
+ #
7
+ # _sqlite3 _tkinter _curses pyexpat
8
+ # _codecs_jp _codecs_kr _codecs_tw unicodedata
9
+ +
10
+ +*disabled*
11
+ +_curses
12
+ +_curses_panel
13
+ +_tkinter
cc-multilingual-main/cc_net/vcpkg/ports/python3/0014-fix-get-python-inc-output.patch ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From b6ffa6e7a0f7a013fb111e618a7f7e2c58e9d548 Mon Sep 17 00:00:00 2001
2
+ From: Billy Robert O'Neal III <[email protected]>
3
+ Date: Wed, 26 Apr 2023 05:17:44 +0000
4
+ Subject: [PATCH 14/14] fix get python inc output
5
+
6
+ ---
7
+ Lib/distutils/sysconfig.py | 7 +++++--
8
+ 1 file changed, 5 insertions(+), 2 deletions(-)
9
+
10
+ diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
11
+ index 3414a761e7..e6ae456ee9 100644
12
+ --- a/Lib/distutils/sysconfig.py
13
+ +++ b/Lib/distutils/sysconfig.py
14
+ @@ -45,7 +45,7 @@
15
+ get_makefile_filename,
16
+ get_python_version,
17
+ )
18
+ -
19
+ +from os.path import dirname
20
+ # This is better than
21
+ # from sysconfig import _CONFIG_VARS as _config_vars
22
+ # because it makes sure that the global dictionary is initialized
23
+ @@ -292,6 +292,7 @@ def get_python_inc(plat_specific=0, prefix=None):
24
+ incdir = os.path.join(get_config_var('srcdir'), 'Include')
25
+ return os.path.normpath(incdir)
26
+ python_dir = 'python' + get_python_version() + build_flags
27
+ + prefix = dirname(dirname(BASE_PREFIX))
28
+ return os.path.join(prefix, "include", python_dir)
29
+ elif os.name == "nt":
30
+ if python_build:
31
+ @@ -299,7 +300,9 @@ def get_python_inc(plat_specific=0, prefix=None):
32
+ # pyconfig.h
33
+ return (os.path.join(prefix, "include") + os.path.pathsep +
34
+ os.path.join(prefix, "PC"))
35
+ - return os.path.join(prefix, "include")
36
+ + python_dir = 'python' + get_python_version() + build_flags
37
+ + prefix = dirname(dirname(BASE_PREFIX))
38
+ + return os.path.join(prefix, "include", python_dir)
39
+ else:
40
+ raise DistutilsPlatformError(
41
+ "I don't know where Python installs its C header files "
42
+ --
43
+ 2.25.1
44
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/0015-dont-use-WINDOWS-def.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/PC/launcher.c b/PC/launcher.c
2
+ index 734e75333..7124927cf 100644
3
+ --- a/PC/launcher.c
4
+ +++ b/PC/launcher.c
5
+ @@ -2015,7 +2015,7 @@ installed, use -0 for available pythons", &p[1]);
6
+ return rc;
7
+ }
8
+
9
+ -#if defined(_WINDOWS)
10
+ +#if !defined(_CONSOLE) // _WINDOWS is defined by the vcpkg toolchain
11
+
12
+ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
13
+ LPWSTR lpstrCmd, int nShow)
cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-fix-win-cross.patch ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj
2
+ index 7d3423251f..7f607742fe 100644
3
+ --- a/PCbuild/_freeze_module.vcxproj
4
+ +++ b/PCbuild/_freeze_module.vcxproj
5
+ @@ -366,7 +366,7 @@
6
+ <ImportGroup Label="ExtensionTargets">
7
+ </ImportGroup>
8
+ <Target Name="_RebuildGetPath" AfterTargets="_RebuildFrozen" Condition="$(Configuration) != 'PGUpdate'">
9
+ - <Exec Command='"$(TargetPath)" "%(GetPath.ModName)" "%(GetPath.FullPath)" "%(GetPath.IntFile)"' />
10
+ + <Exec Command='"_freeze_module.exe" "%(GetPath.ModName)" "%(GetPath.FullPath)" "%(GetPath.IntFile)"' />
11
+
12
+ <Copy SourceFiles="%(GetPath.IntFile)"
13
+ DestinationFiles="%(GetPath.OutFile)"
14
+ @@ -378,7 +378,7 @@
15
+ Condition="'@(_UpdatedGetPath)' != ''" Importance="high" />
16
+ </Target>
17
+ <Target Name="_RebuildFrozen" AfterTargets="AfterBuild" Condition="$(Configuration) != 'PGUpdate'">
18
+ - <Exec Command='"$(TargetPath)" "%(None.ModName)" "%(None.FullPath)" "%(None.IntFile)"' />
19
+ + <Exec Command='"_freeze_module.exe" "%(None.ModName)" "%(None.FullPath)" "%(None.IntFile)"' />
20
+
21
+ <Copy SourceFiles="%(None.IntFile)"
22
+ DestinationFiles="%(None.OutFile)"
23
+ diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
24
+ index c49a8533ad..b1cdf7c8d7 100644
25
+ --- a/PCbuild/pcbuild.proj
26
+ +++ b/PCbuild/pcbuild.proj
27
+ @@ -14,6 +14,6 @@
28
+ <ItemDefinitionGroup>
29
+ <FreezeProjects>
30
+ - <Platform>$(PreferredToolArchitecture)</Platform>
31
+ + <Platform>$(Platform)</Platform>
32
+ <Configuration>$(Configuration)</Configuration>
33
+ <Configuration Condition="$(Configuration) == 'PGInstrument'">Release</Configuration>
34
+ <Properties></Properties>
cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-undup-ffi-symbols.patch ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c
2
+ index 788bae6a9..3938f79db 100644
3
+ --- a/Modules/_ctypes/malloc_closure.c
4
+ +++ b/Modules/_ctypes/malloc_closure.c
5
+ @@ -11,6 +11,9 @@
6
+ #endif
7
+ #include "ctypes.h"
8
+
9
+ +#undef Py_ffi_closure_alloc
10
+ +#undef Py_ffi_closure_free
11
+ +
12
+ /* BLOCKSIZE can be adjusted. Larger blocksize will take a larger memory
13
+ overhead, but allocate less blocks from the system. It may be that some
14
+ systems have a limit of how many mmap'd blocks can be open.
cc-multilingual-main/cc_net/vcpkg/ports/python3/0017-fix-win.patch ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj
2
+ index 7d3423251f..7f607742fe 100644
3
+ --- a/PCbuild/_freeze_module.vcxproj
4
+ +++ b/PCbuild/_freeze_module.vcxproj
5
+ @@ -366,7 +366,7 @@
6
+ <ImportGroup Label="ExtensionTargets">
7
+ </ImportGroup>
8
+ <Target Name="_RebuildGetPath" AfterTargets="_RebuildFrozen" Condition="$(Configuration) != 'PGUpdate'">
9
+ - <Exec Command='"$(TargetPath)" "%(GetPath.ModName)" "%(GetPath.FullPath)" "%(GetPath.IntFile)"' />
10
+ + <Exec Command='"$(OutDir)$(TargetName)$(TargetExt)" "%(GetPath.ModName)" "%(GetPath.FullPath)" "%(GetPath.IntFile)"' />
11
+
12
+ <Copy SourceFiles="%(GetPath.IntFile)"
13
+ DestinationFiles="%(GetPath.OutFile)"
14
+ @@ -378,7 +378,7 @@
15
+ Condition="'@(_UpdatedGetPath)' != ''" Importance="high" />
16
+ </Target>
17
+ <Target Name="_RebuildFrozen" AfterTargets="AfterBuild" Condition="$(Configuration) != 'PGUpdate'">
18
+ - <Exec Command='"$(TargetPath)" "%(None.ModName)" "%(None.FullPath)" "%(None.IntFile)"' />
19
+ + <Exec Command='"$(OutDir)$(TargetName)$(TargetExt)" "%(None.ModName)" "%(None.FullPath)" "%(None.IntFile)"' />
20
+
21
+ <Copy SourceFiles="%(None.IntFile)"
22
+ DestinationFiles="%(None.OutFile)"
23
+ diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
24
+ index c49a8533ad..b1cdf7c8d7 100644
25
+ --- a/PCbuild/pcbuild.proj
26
+ +++ b/PCbuild/pcbuild.proj
27
+ @@ -14,6 +14,6 @@
28
+ <ItemDefinitionGroup>
29
+ <FreezeProjects>
30
+ - <Platform>$(PreferredToolArchitecture)</Platform>
31
+ + <Platform>$(Platform)</Platform>
32
+ <Configuration>$(Configuration)</Configuration>
33
+ <Configuration Condition="$(Configuration) == 'PGInstrument'">Release</Configuration>
34
+ <Properties></Properties>
cc-multilingual-main/cc_net/vcpkg/ports/python3/0018-fix-sysconfig-include.patch ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
2
+ index ebe371182..e351df7da 100644
3
+ --- a/Lib/sysconfig.py
4
+ +++ b/Lib/sysconfig.py
5
+ @@ -51,8 +51,8 @@
6
+ 'platstdlib': '{base}/Lib',
7
+ 'purelib': '{base}/Lib/site-packages',
8
+ 'platlib': '{base}/Lib/site-packages',
9
+ - 'include': '{installed_base}/Include',
10
+ - 'platinclude': '{installed_base}/Include',
11
+ + 'include': '{installed_base}/../../include/python{py_version_short}{abiflags}',
12
+ + 'platinclude': '{installed_base}/../../include/python{py_version_short}{abiflags}',
13
+ 'scripts': '{base}/Scripts',
14
+ 'data': '{base}',
15
+ },
cc-multilingual-main/cc_net/vcpkg/ports/python3/openssl.props.in ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemDefinitionGroup>
4
+ <Link>
5
+ <AdditionalDependencies>Crypt32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
6
+ <AdditionalDependencies Condition="'$(Configuration)|$(IncludeExternals)'=='Release|true'">
7
+ ${CRYPTO_RELEASE};${SSL_RELEASE};%(AdditionalDependencies)
8
+ </AdditionalDependencies>
9
+ <AdditionalDependencies Condition="'$(Configuration)|$(IncludeExternals)'=='Debug|true'">
10
+ ${CRYPTO_DEBUG};${SSL_DEBUG};%(AdditionalDependencies)
11
+ </AdditionalDependencies>
12
+ </Link>
13
+ <Lib>
14
+ <AdditionalDependencies>Crypt32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
15
+ <AdditionalDependencies Condition="'$(Configuration)|$(IncludeExternals)'=='Release|true'">
16
+ ${CRYPTO_RELEASE};${SSL_RELEASE};%(AdditionalDependencies)
17
+ </AdditionalDependencies>
18
+ <AdditionalDependencies Condition="'$(Configuration)|$(IncludeExternals)'=='Debug|true'">
19
+ ${CRYPTO_DEBUG};${SSL_DEBUG};%(AdditionalDependencies)
20
+ </AdditionalDependencies>
21
+ </Lib>
22
+ </ItemDefinitionGroup>
23
+ </Project>
cc-multilingual-main/cc_net/vcpkg/ports/python3/portfile.cmake ADDED
@@ -0,0 +1,387 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static)
2
+ message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.")
3
+ set(VCPKG_LIBRARY_LINKAGE static)
4
+ endif()
5
+
6
+ if(NOT VCPKG_HOST_IS_WINDOWS)
7
+ message(WARNING "${PORT} currently requires the following programs from the system package manager:
8
+ autoconf automake autoconf-archive
9
+ On Debian and Ubuntu derivatives:
10
+ sudo apt-get install autoconf automake autoconf-archive
11
+ On recent Red Hat and Fedora derivatives:
12
+ sudo dnf install autoconf automake autoconf-archive
13
+ On Arch Linux and derivatives:
14
+ sudo pacman -S autoconf automake autoconf-archive
15
+ On Alpine:
16
+ apk add autoconf automake autoconf-archive
17
+ On macOS:
18
+ brew install autoconf automake autoconf-archive\n")
19
+ endif()
20
+
21
+ string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" PYTHON_VERSION "${VERSION}")
22
+ set(PYTHON_VERSION_MAJOR "${CMAKE_MATCH_1}")
23
+ set(PYTHON_VERSION_MINOR "${CMAKE_MATCH_2}")
24
+ set(PYTHON_VERSION_PATCH "${CMAKE_MATCH_3}")
25
+
26
+ set(PATCHES
27
+ 0001-only-build-required-projects.patch
28
+ 0003-use-vcpkg-zlib.patch
29
+ 0004-devendor-external-dependencies.patch
30
+ 0005-dont-copy-vcruntime.patch
31
+ 0008-python.pc.patch
32
+ 0010-dont-skip-rpath.patch
33
+ 0012-force-disable-modules.patch
34
+ 0014-fix-get-python-inc-output.patch
35
+ 0015-dont-use-WINDOWS-def.patch
36
+ 0016-undup-ffi-symbols.patch # Required for lld-link.
37
+ 0018-fix-sysconfig-include.patch
38
+ )
39
+
40
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
41
+ list(APPEND PATCHES 0002-static-library.patch)
42
+ endif()
43
+
44
+ # Fix build failures with GCC for built-in modules (https://github.com/microsoft/vcpkg/issues/26573)
45
+ if(VCPKG_TARGET_IS_LINUX)
46
+ list(APPEND PATCHES 0011-gcc-ldflags-fix.patch)
47
+ endif()
48
+
49
+ # Python 3.9 removed support for Windows 7. This patch re-adds support for Windows 7 and is therefore
50
+ # required to build this port on Windows 7 itself due to Python using itself in its own build system.
51
+ if("deprecated-win7-support" IN_LIST FEATURES)
52
+ list(APPEND PATCHES 0006-restore-support-for-windows-7.patch)
53
+ message(WARNING "Windows 7 support is deprecated and may be removed at any time.")
54
+ elseif(VCPKG_TARGET_IS_WINDOWS AND CMAKE_SYSTEM_VERSION EQUAL 6.1)
55
+ message(FATAL_ERROR "python3 requires the feature deprecated-win7-support when building on Windows 7.")
56
+ endif()
57
+
58
+ if(VCPKG_TARGET_IS_WINDOWS)
59
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PYTHON_ALLOW_EXTENSIONS)
60
+ # The Windows 11 SDK has a problem that causes it to error on the resource files, so we patch that.
61
+ vcpkg_get_windows_sdk(WINSDK_VERSION)
62
+ if("${WINSDK_VERSION}" VERSION_GREATER_EQUAL "10.0.22000")
63
+ list(APPEND PATCHES "0007-workaround-windows-11-sdk-rc-compiler-error.patch")
64
+ endif()
65
+ if(VCPKG_CROSSCOMPILING)
66
+ list(APPEND PATCHES "0016-fix-win-cross.patch")
67
+ else()
68
+ list(APPEND PATCHES "0017-fix-win.patch")
69
+ endif()
70
+ endif()
71
+
72
+ vcpkg_from_github(
73
+ OUT_SOURCE_PATH SOURCE_PATH
74
+ REPO python/cpython
75
+ REF v${PYTHON_VERSION}
76
+ SHA512 c2ebe72ce53dd2d59750a7b0bdaf15ebb7ecb6f67d2913a457bf5d32bd0f640815f9496f2fa3ebeac0722264d000735d90d3ffaeac2de1f066b7aee994bf9b24
77
+ HEAD_REF master
78
+ PATCHES ${PATCHES}
79
+ )
80
+
81
+ vcpkg_replace_string("${SOURCE_PATH}/Makefile.pre.in" "$(INSTALL) -d -m $(DIRMODE)" "$(MKDIR_P)")
82
+
83
+ function(make_python_pkgconfig)
84
+ cmake_parse_arguments(PARSE_ARGV 0 arg "" "FILE;INSTALL_ROOT;EXEC_PREFIX;INCLUDEDIR;ABIFLAGS" "")
85
+
86
+ set(prefix "${CURRENT_PACKAGES_DIR}")
87
+ set(libdir [[${prefix}/lib]])
88
+ set(exec_prefix ${arg_EXEC_PREFIX})
89
+ set(includedir ${arg_INCLUDEDIR})
90
+ set(VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
91
+ set(ABIFLAGS ${arg_ABIFLAGS})
92
+
93
+ string(REPLACE "python" "python-${VERSION}" out_file ${arg_FILE})
94
+ set(out_full_path "${arg_INSTALL_ROOT}/lib/pkgconfig/${out_file}")
95
+ configure_file("${SOURCE_PATH}/Misc/${arg_FILE}.in" ${out_full_path} @ONLY)
96
+
97
+ file(READ ${out_full_path} pkgconfig_file)
98
+ string(REPLACE "-lpython${VERSION}" "-lpython${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}" pkgconfig_file "${pkgconfig_file}")
99
+ file(WRITE ${out_full_path} "${pkgconfig_file}")
100
+ endfunction()
101
+
102
+ if(VCPKG_TARGET_IS_WINDOWS)
103
+ # Due to the way Python handles C extension modules on Windows, a static python core cannot
104
+ # load extension modules.
105
+ if(PYTHON_ALLOW_EXTENSIONS)
106
+ find_library(BZ2_RELEASE NAMES bz2 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
107
+ find_library(BZ2_DEBUG NAMES bz2d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
108
+ find_library(CRYPTO_RELEASE NAMES libcrypto PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
109
+ find_library(CRYPTO_DEBUG NAMES libcrypto PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
110
+ find_library(EXPAT_RELEASE NAMES libexpat libexpatMD libexpatMT PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
111
+ find_library(EXPAT_DEBUG NAMES libexpatd libexpatdMD libexpatdMT PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
112
+ find_library(FFI_RELEASE NAMES ffi PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
113
+ find_library(FFI_DEBUG NAMES ffi PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
114
+ find_library(LZMA_RELEASE NAMES lzma PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
115
+ find_library(LZMA_DEBUG NAMES lzma PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
116
+ find_library(SQLITE_RELEASE NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
117
+ find_library(SQLITE_DEBUG NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
118
+ find_library(SSL_RELEASE NAMES libssl PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
119
+ find_library(SSL_DEBUG NAMES libssl PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
120
+ list(APPEND add_libs_rel "${BZ2_RELEASE};${EXPAT_RELEASE};${FFI_RELEASE};${LZMA_RELEASE};${SQLITE_RELEASE}")
121
+ list(APPEND add_libs_dbg "${BZ2_DEBUG};${EXPAT_DEBUG};${FFI_DEBUG};${LZMA_DEBUG};${SQLITE_DEBUG}")
122
+ else()
123
+ message(STATUS "WARNING: Static builds of Python will not have C extension modules available.")
124
+ endif()
125
+ find_library(ZLIB_RELEASE NAMES zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
126
+ find_library(ZLIB_DEBUG NAMES zlib zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
127
+ list(APPEND add_libs_rel "${ZLIB_RELEASE}")
128
+ list(APPEND add_libs_dbg "${ZLIB_DEBUG}")
129
+
130
+ configure_file("${SOURCE_PATH}/PC/pyconfig.h" "${SOURCE_PATH}/PC/pyconfig.h")
131
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/python_vcpkg.props.in" "${SOURCE_PATH}/PCbuild/python_vcpkg.props")
132
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.props.in" "${SOURCE_PATH}/PCbuild/openssl.props")
133
+ file(WRITE "${SOURCE_PATH}/PCbuild/libffi.props"
134
+ "<?xml version='1.0' encoding='utf-8'?>"
135
+ "<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' />"
136
+ )
137
+
138
+ list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DVCPKG_SET_CHARSET_FLAG=OFF")
139
+ if(PYTHON_ALLOW_EXTENSIONS)
140
+ set(OPTIONS
141
+ "/p:IncludeExtensions=true"
142
+ "/p:IncludeExternals=true"
143
+ "/p:IncludeCTypes=true"
144
+ "/p:IncludeSSL=true"
145
+ "/p:IncludeTkinter=false"
146
+ "/p:IncludeTests=false"
147
+ "/p:ForceImportBeforeCppTargets=${SOURCE_PATH}/PCbuild/python_vcpkg.props"
148
+ )
149
+ else()
150
+ set(OPTIONS
151
+ "/p:IncludeExtensions=false"
152
+ "/p:IncludeExternals=false"
153
+ "/p:IncludeTests=false"
154
+ "/p:ForceImportBeforeCppTargets=${SOURCE_PATH}/PCbuild/python_vcpkg.props"
155
+ )
156
+ endif()
157
+ if(VCPKG_TARGET_IS_UWP)
158
+ list(APPEND OPTIONS "/p:IncludeUwp=true")
159
+ else()
160
+ list(APPEND OPTIONS "/p:IncludeUwp=false")
161
+ endif()
162
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
163
+ list(APPEND OPTIONS "/p:_VcpkgPythonLinkage=DynamicLibrary")
164
+ else()
165
+ list(APPEND OPTIONS "/p:_VcpkgPythonLinkage=StaticLibrary")
166
+ endif()
167
+
168
+ vcpkg_find_acquire_program(PYTHON3)
169
+ get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
170
+ set(ENV{PythonForBuild} "${PYTHON3_DIR}/python.exe") # PythonForBuild is what's used on windows, despite the readme
171
+
172
+ if(VCPKG_CROSSCOMPILING)
173
+ vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}")
174
+ endif()
175
+
176
+ vcpkg_msbuild_install(
177
+ SOURCE_PATH "${SOURCE_PATH}"
178
+ PROJECT_SUBPATH "PCbuild/pcbuild.proj"
179
+ ADD_BIN_TO_PATH
180
+ OPTIONS ${OPTIONS}
181
+ ADDITIONAL_LIBS_RELEASE ${add_libs_rel}
182
+ ADDITIONAL_LIBS_DEBUG ${add_libs_dbg}
183
+ )
184
+
185
+ if(NOT VCPKG_CROSSCOMPILING)
186
+ file(GLOB_RECURSE freeze_module "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/PCbuild/**/_freeze_module.exe")
187
+ file(COPY "${freeze_module}" DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}")
188
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}")
189
+ endif()
190
+
191
+ # The extension modules must be placed in the DLLs directory, so we can't use vcpkg_copy_tools()
192
+ if(PYTHON_ALLOW_EXTENSIONS)
193
+ file(GLOB_RECURSE PYTHON_EXTENSIONS_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.pyd")
194
+ file(COPY ${PYTHON_EXTENSIONS_RELEASE} DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
195
+ file(COPY ${PYTHON_EXTENSIONS_RELEASE} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/DLLs")
196
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/DLLs")
197
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/DLLs/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll")
198
+
199
+ file(GLOB_RECURSE PYTHON_EXTENSIONS_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.pyd")
200
+ file(COPY ${PYTHON_EXTENSIONS_DEBUG} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
201
+ endif()
202
+
203
+ file(COPY "${SOURCE_PATH}/Include/" "${SOURCE_PATH}/PC/pyconfig.h"
204
+ DESTINATION "${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
205
+ FILES_MATCHING PATTERN *.h
206
+ )
207
+ file(COPY "${SOURCE_PATH}/Lib" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
208
+
209
+ # Remove any extension libraries and other unversioned binaries that could conflict with the python2 port.
210
+ # You don't need to link against these anyway.
211
+ file(GLOB PYTHON_LIBS
212
+ "${CURRENT_PACKAGES_DIR}/lib/*.lib"
213
+ "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib"
214
+ )
215
+ list(FILTER PYTHON_LIBS EXCLUDE REGEX [[python[0-9]*(_d)?\.lib$]])
216
+ file(GLOB PYTHON_INSTALLERS "${CURRENT_PACKAGES_DIR}/tools/${PORT}/wininst-*.exe")
217
+ file(REMOVE ${PYTHON_LIBS} ${PYTHON_INSTALLERS})
218
+
219
+ # pkg-config files
220
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
221
+ make_python_pkgconfig(FILE python.pc INSTALL_ROOT ${CURRENT_PACKAGES_DIR}
222
+ EXEC_PREFIX "\${prefix}/tools/${PORT}" INCLUDEDIR [[${prefix}/include]] ABIFLAGS "")
223
+ make_python_pkgconfig(FILE python-embed.pc INSTALL_ROOT ${CURRENT_PACKAGES_DIR}
224
+ EXEC_PREFIX "\${prefix}/tools/${PORT}" INCLUDEDIR [[${prefix}/include]] ABIFLAGS "")
225
+ endif()
226
+
227
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
228
+ make_python_pkgconfig(FILE python.pc INSTALL_ROOT "${CURRENT_PACKAGES_DIR}/debug"
229
+ EXEC_PREFIX "\${prefix}/../tools/${PORT}" INCLUDEDIR [[${prefix}/../include]] ABIFLAGS "_d")
230
+ make_python_pkgconfig(FILE python-embed.pc INSTALL_ROOT "${CURRENT_PACKAGES_DIR}/debug"
231
+ EXEC_PREFIX "\${prefix}/../tools/${PORT}" INCLUDEDIR [[${prefix}/../include]] ABIFLAGS "_d")
232
+ endif()
233
+
234
+ vcpkg_fixup_pkgconfig()
235
+
236
+ # Remove static library belonging to executable
237
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
238
+ if (EXISTS "${CURRENT_PACKAGES_DIR}/lib/python.lib")
239
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/manual-link")
240
+ file(RENAME "${CURRENT_PACKAGES_DIR}/lib/python.lib"
241
+ "${CURRENT_PACKAGES_DIR}/lib/manual-link/python.lib")
242
+ endif()
243
+ if (EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/python_d.lib")
244
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link")
245
+ file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/python_d.lib"
246
+ "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/python_d.lib")
247
+ endif()
248
+ endif()
249
+ else()
250
+ # The Python Stable ABI, `libpython3.so` is not produced by the upstream build system with --with-pydebug option
251
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND NOT VCPKG_BUILD_TYPE)
252
+ set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled)
253
+ endif()
254
+
255
+ set(OPTIONS
256
+ "--with-openssl=${CURRENT_INSTALLED_DIR}"
257
+ "--without-ensurepip"
258
+ "--with-suffix="
259
+ "--with-system-expat"
260
+ "--without-readline"
261
+ "--disable-test-modules"
262
+ )
263
+ if(VCPKG_TARGET_IS_OSX)
264
+ list(APPEND OPTIONS "LIBS=-liconv -lintl")
265
+ endif()
266
+
267
+ # The version of the build Python must match the version of the cross compiled host Python.
268
+ # https://docs.python.org/3/using/configure.html#cross-compiling-options
269
+ if(VCPKG_CROSSCOMPILING)
270
+ set(_python_for_build "${CURRENT_HOST_INSTALLED_DIR}/tools/python3/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
271
+ list(APPEND OPTIONS "--with-build-python=${_python_for_build}")
272
+ endif()
273
+
274
+ vcpkg_configure_make(
275
+ SOURCE_PATH "${SOURCE_PATH}"
276
+ AUTOCONFIG
277
+ OPTIONS
278
+ ${OPTIONS}
279
+ OPTIONS_DEBUG
280
+ "--with-pydebug"
281
+ "vcpkg_rpath=${CURRENT_INSTALLED_DIR}/debug/lib"
282
+ OPTIONS_RELEASE
283
+ "vcpkg_rpath=${CURRENT_INSTALLED_DIR}/lib"
284
+ )
285
+ vcpkg_install_make(ADD_BIN_TO_PATH INSTALL_TARGET altinstall)
286
+
287
+ file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
288
+
289
+ # Makefiles, c files, __pycache__, and other junk.
290
+ file(GLOB PYTHON_LIB_DIRS LIST_DIRECTORIES true
291
+ "${CURRENT_PACKAGES_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/*"
292
+ "${CURRENT_PACKAGES_DIR}/debug/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/*")
293
+ list(FILTER PYTHON_LIB_DIRS INCLUDE REGEX [[config-[0-9].*.*]])
294
+ file(REMOVE_RECURSE ${PYTHON_LIB_DIRS})
295
+
296
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
297
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
298
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
299
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
300
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}d")
301
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man1")
302
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
303
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug")
304
+
305
+ vcpkg_fixup_pkgconfig()
306
+
307
+ # Perform some post-build checks on modules
308
+ file(GLOB python_libs_dynload_debug LIST_DIRECTORIES false "${CURRENT_PACKAGES_DIR}/debug/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/lib-dynload/*.so*")
309
+ file(GLOB python_libs_dynload_release LIST_DIRECTORIES false "${CURRENT_PACKAGES_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/lib-dynload/*.so*")
310
+ set(python_libs_dynload_failed_debug ${python_libs_dynload_debug})
311
+ set(python_libs_dynload_failed_release ${python_libs_dynload_release})
312
+ list(FILTER python_libs_dynload_failed_debug INCLUDE REGEX ".*_failed\.so.*")
313
+ list(FILTER python_libs_dynload_failed_release INCLUDE REGEX ".*_failed\.so.*")
314
+ if(python_libs_dynload_failed_debug OR python_libs_dynload_failed_release)
315
+ list(JOIN python_libs_dynload_failed_debug "\n" python_libs_dynload_failed_debug_str)
316
+ list(JOIN python_libs_dynload_failed_release "\n" python_libs_dynload_failed_release_str)
317
+ message(FATAL_ERROR "There should be no modules with \"_failed\" suffix:\n${python_libs_dynload_failed_debug_str}\n${python_libs_dynload_failed_release_str}")
318
+ endif()
319
+ if(NOT VCPKG_BUILD_TYPE)
320
+ list(LENGTH python_libs_dynload_release python_libs_dynload_release_length)
321
+ list(LENGTH python_libs_dynload_debug python_libs_dynload_debug_length)
322
+ if(NOT python_libs_dynload_release_length STREQUAL python_libs_dynload_debug_length)
323
+ message(FATAL_ERROR "Mismatched number of modules: ${python_libs_dynload_debug_length} in debug, ${python_libs_dynload_release_length} in release")
324
+ endif()
325
+ endif()
326
+ endif()
327
+
328
+ vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
329
+
330
+ file(READ "${CMAKE_CURRENT_LIST_DIR}/usage" usage)
331
+ if(VCPKG_TARGET_IS_WINDOWS)
332
+ if(PYTHON_ALLOW_EXTENSIONS)
333
+ file(READ "${CMAKE_CURRENT_LIST_DIR}/usage.win" usage_extra)
334
+ else()
335
+ set(usage_extra "")
336
+ endif()
337
+ else()
338
+ file(READ "${CMAKE_CURRENT_LIST_DIR}/usage.unix" usage_extra)
339
+ endif()
340
+ string(REPLACE "@PYTHON_VERSION_MINOR@" "${PYTHON_VERSION_MINOR}" usage_extra "${usage_extra}")
341
+ file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage}\n${usage_extra}")
342
+
343
+ function(_generate_finder)
344
+ cmake_parse_arguments(PythonFinder "NO_OVERRIDE" "DIRECTORY;PREFIX" "" ${ARGN})
345
+ configure_file(
346
+ "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
347
+ "${CURRENT_PACKAGES_DIR}/share/${PythonFinder_DIRECTORY}/vcpkg-cmake-wrapper.cmake"
348
+ @ONLY
349
+ )
350
+ endfunction()
351
+
352
+ message(STATUS "Installing cmake wrappers")
353
+ _generate_finder(DIRECTORY "python" PREFIX "Python")
354
+ _generate_finder(DIRECTORY "python3" PREFIX "Python3")
355
+ _generate_finder(DIRECTORY "pythoninterp" PREFIX "PYTHON" NO_OVERRIDE)
356
+
357
+ if (NOT VCPKG_TARGET_IS_WINDOWS)
358
+ function(replace_dirs_in_config_file python_config_file)
359
+ vcpkg_replace_string("${python_config_file}" "${CURRENT_INSTALLED_DIR}" "' + _base + '")
360
+ vcpkg_replace_string("${python_config_file}" "${CURRENT_HOST_INSTALLED_DIR}" "' + _base + '/../${HOST_TRIPLET}")
361
+ vcpkg_replace_string("${python_config_file}" "${CURRENT_PACKAGES_DIR}" "' + _base + '")
362
+ vcpkg_replace_string("${python_config_file}" "${CURRENT_BUILDTREES_DIR}" "not/existing")
363
+ endfunction()
364
+
365
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
366
+ file(GLOB python_config_files "${CURRENT_PACKAGES_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/_sysconfigdata*")
367
+ list(POP_FRONT python_config_files python_config_file)
368
+ vcpkg_replace_string("${python_config_file}" "# system configuration generated and used by the sysconfig module" "# system configuration generated and used by the sysconfig module\nimport os\n_base = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))\n")
369
+ replace_dirs_in_config_file("${python_config_file}")
370
+ endif()
371
+
372
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
373
+ file(GLOB python_config_files "${CURRENT_PACKAGES_DIR}/debug/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/_sysconfigdata*")
374
+ list(POP_FRONT python_config_files python_config_file)
375
+ vcpkg_replace_string("${python_config_file}" "# system configuration generated and used by the sysconfig module" "# system configuration generated and used by the sysconfig module\nimport os\n_base = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))\n")
376
+ replace_dirs_in_config_file("${python_config_file}")
377
+ endif()
378
+ endif()
379
+
380
+ if(VCPKG_TARGET_IS_WINDOWS)
381
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/python3/Lib/distutils/command/build_ext.py" "'libs'" "'../../lib'")
382
+ else()
383
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/python3.${PYTHON_VERSION_MINOR}/distutils/command/build_ext.py" "'libs'" "'../../lib'")
384
+ file(COPY_FILE "${CURRENT_PACKAGES_DIR}/tools/python3/python3.${PYTHON_VERSION_MINOR}" "${CURRENT_PACKAGES_DIR}/tools/python3/python3")
385
+ endif()
386
+
387
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" "${CURRENT_PACKAGES_DIR}/share/python3/vcpkg-port-config.cmake" @ONLY)
cc-multilingual-main/cc_net/vcpkg/ports/python3/python_vcpkg.props.in ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemDefinitionGroup>
4
+ <CLCompile>
5
+ <!-- Use vcpkg ports instead of vendored externals -->
6
+ <PreprocessorDefinitions>_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
7
+ <PreprocessorDefinitions Condition="${VCPKG_LIBRARY_LINKAGE} == 'static'">XML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
8
+ <AdditionalIncludeDirectories>
9
+ %(AdditionalIncludeDirectories);${CURRENT_INSTALLED_DIR}/include
10
+ </AdditionalIncludeDirectories>
11
+ </CLCompile>
12
+ <Link>
13
+ <!-- Required Libs -->
14
+ <AdditionalDependencies Condition="'$(Configuration)'=='Release'">
15
+ ${ZLIB_RELEASE};%(AdditionalDependencies)
16
+ </AdditionalDependencies>
17
+ <AdditionalDependencies Condition="'$(Configuration)'=='Debug'">
18
+ ${ZLIB_DEBUG};%(AdditionalDependencies)
19
+ </AdditionalDependencies>
20
+
21
+ <!-- Extension modules -->
22
+ <AdditionalDependencies Condition="'$(Configuration)|$(IncludeExtensions)' == 'Release|true'">
23
+ ${BZ2_RELEASE};${EXPAT_RELEASE};${FFI_RELEASE};${LZMA_RELEASE};${SQLITE_RELEASE};%(AdditionalDependencies)
24
+ </AdditionalDependencies>
25
+ <AdditionalDependencies Condition="'$(Configuration)|$(IncludeExtensions)' == 'Debug|true'">
26
+ ${BZ2_DEBUG};${EXPAT_DEBUG};${FFI_DEBUG};${LZMA_DEBUG};${SQLITE_DEBUG};%(AdditionalDependencies)
27
+ </AdditionalDependencies>
28
+ </Link>
29
+
30
+ <Lib>
31
+ <!-- Required to prevent linker errors on Visual Studio 2017 with static CRT -->
32
+ <TargetMachine Condition="'${VCPKG_TARGET_ARCHITECTURE}'=='x86'">MachineX86</TargetMachine>
33
+ <TargetMachine Condition="'${VCPKG_TARGET_ARCHITECTURE}'=='x64'">MachineX64</TargetMachine>
34
+ <TargetMachine Condition="'${VCPKG_TARGET_ARCHITECTURE}'=='arm'">MachineARM</TargetMachine>
35
+ <!-- Required Libs -->
36
+ <AdditionalDependencies Condition="'$(Configuration)'=='Release'">
37
+ ${ZLIB_RELEASE};%(AdditionalDependencies)
38
+ </AdditionalDependencies>
39
+ <AdditionalDependencies Condition="'$(Configuration)'=='Debug'">
40
+ ${ZLIB_DEBUG};%(AdditionalDependencies)
41
+ </AdditionalDependencies>
42
+
43
+ <!-- Extension modules -->
44
+ <AdditionalDependencies Condition="'$(Configuration)|$(IncludeExtensions)' == 'Release|true'">
45
+ ${BZ2_RELEASE};${EXPAT_RELEASE};${FFI_RELEASE};${LZMA_RELEASE};${SQLITE_RELEASE};%(AdditionalDependencies)
46
+ </AdditionalDependencies>
47
+ <AdditionalDependencies Condition="'$(Configuration)|$(IncludeExtensions)' == 'Debug|true'">
48
+ ${BZ2_DEBUG};${EXPAT_DEBUG};${FFI_DEBUG};${LZMA_DEBUG};${SQLITE_DEBUG};%(AdditionalDependencies)
49
+ </AdditionalDependencies>
50
+ </Lib>
51
+ </ItemDefinitionGroup>
52
+ </Project>
cc-multilingual-main/cc_net/vcpkg/ports/python3/usage ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ The package python3 is compatible with built-in CMake targets:
2
+
3
+ find_package(Python3 COMPONENTS Development REQUIRED)
4
+ target_link_libraries(main PRIVATE Python3::Python)
cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.unix ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ The package python3 provides a python interpreter that supports virtual environments:
2
+
3
+ $ tools/python3/python3.@PYTHON_VERSION_MINOR@ -m venv /path/to/venv
4
+ $ export VIRTUAL_ENV=/path/to/venv
5
+ $ export PATH=/path/to/venv/bin:$PATH
6
+ $ export -n PYTHONHOME
7
+ $ unset PYTHONHOME
8
+
9
+ See https://docs.python.org/3/library/venv.html for more details.
cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.win ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ The package python3 provides a python interpreter that supports virtual environments:
2
+
3
+ >tools\python3\python.exe -m venv c:\path\to\venv
4
+ >set VIRTUAL_ENV=c:\path\to\venv
5
+ >set PATH=c:\path\to\venv\bin;%PATH%
6
+ >set PYTHONHOME=
7
+
8
+ See https://docs.python.org/3/library/venv.html for more details.
cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-cmake-wrapper.cmake ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # For very old ports whose upstream do not properly set the minimum CMake version.
2
+ cmake_policy(SET CMP0012 NEW)
3
+ cmake_policy(SET CMP0057 NEW)
4
+
5
+ # This prevents the port's python.exe from overriding the Python fetched by
6
+ # vcpkg_find_acquire_program(PYTHON3) and prevents the vcpkg toolchain from
7
+ # stomping on FindPython's default functionality.
8
+ list(REMOVE_ITEM CMAKE_PROGRAM_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/python3")
9
+ if(@PythonFinder_NO_OVERRIDE@)
10
+ _find_package(${ARGS})
11
+ return()
12
+ endif()
13
+
14
+ # CMake's FindPython's separation of concerns is very muddy. We only want to force vcpkg's Python
15
+ # if the consumer is using the development component. What we don't want to do is break detection
16
+ # of the system Python, which may have certain packages the user expects. But - if the user is
17
+ # embedding Python or using both the development and interpreter components, then we need the
18
+ # interpreter matching vcpkg's Python libraries. Note that the "Development" component implies
19
+ # both "Development.Module" and "Development.Embed"
20
+ if("Development" IN_LIST ARGS OR "Development.Embed" IN_LIST ARGS)
21
+ set(_PythonFinder_WantInterp TRUE)
22
+ set(_PythonFinder_WantLibs TRUE)
23
+ elseif("Development.Module" IN_LIST ARGS)
24
+ if("Interpreter" IN_LIST ARGS)
25
+ set(_PythonFinder_WantInterp TRUE)
26
+ endif()
27
+ set(_PythonFinder_WantLibs TRUE)
28
+ endif()
29
+
30
+ if(_PythonFinder_WantLibs)
31
+ find_path(
32
+ _@PythonFinder_PREFIX@_INCLUDE_DIR
33
+ NAMES "Python.h"
34
+ PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include"
35
+ PATH_SUFFIXES "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@"
36
+ NO_DEFAULT_PATH
37
+ )
38
+
39
+ # Don't set the public facing hint or the finder will be unable to detect the debug library.
40
+ # Internally, it uses the same value with an underscore prepended.
41
+ find_library(
42
+ _@PythonFinder_PREFIX@_LIBRARY_RELEASE
43
+ NAMES
44
+ "python@PYTHON_VERSION_MAJOR@@PYTHON_VERSION_MINOR@"
45
+ "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@"
46
+ PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib"
47
+ NO_DEFAULT_PATH
48
+ )
49
+ find_library(
50
+ _@PythonFinder_PREFIX@_LIBRARY_DEBUG
51
+ NAMES
52
+ "python@PYTHON_VERSION_MAJOR@@PYTHON_VERSION_MINOR@_d"
53
+ "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@d"
54
+ PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib"
55
+ NO_DEFAULT_PATH
56
+ )
57
+
58
+ if(_PythonFinder_WantInterp)
59
+ find_program(
60
+ @PythonFinder_PREFIX@_EXECUTABLE
61
+ NAMES "python" "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@"
62
+ PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/python3"
63
+ NO_DEFAULT_PATH
64
+ )
65
+ endif()
66
+
67
+ _find_package(${ARGS})
68
+
69
+ if(@VCPKG_LIBRARY_LINKAGE@ STREQUAL static)
70
+ include(CMakeFindDependencyMacro)
71
+
72
+ # Python for Windows embeds the zlib module into the core, so we have to link against it.
73
+ # This is a separate extension module on Unix-like platforms.
74
+ if(WIN32)
75
+ find_dependency(ZLIB)
76
+ if(TARGET @PythonFinder_PREFIX@::Python)
77
+ set_property(TARGET @PythonFinder_PREFIX@::Python APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
78
+ endif()
79
+ if(TARGET @PythonFinder_PREFIX@::Module)
80
+ set_property(TARGET @PythonFinder_PREFIX@::Module APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
81
+ endif()
82
+ if(DEFINED @PythonFinder_PREFIX@_LIBRARIES)
83
+ list(APPEND @PythonFinder_PREFIX@_LIBRARIES ${ZLIB_LIBRARIES})
84
+ endif()
85
+ endif()
86
+
87
+ if(APPLE)
88
+ find_dependency(Iconv)
89
+ find_dependency(Intl)
90
+ if(TARGET @PythonFinder_PREFIX@::Python)
91
+ get_target_property(_PYTHON_INTERFACE_LIBS @PythonFinder_PREFIX@::Python INTERFACE_LINK_LIBRARIES)
92
+ if(NOT _PYTHON_INTERFACE_LIBS)
93
+ set(_PYTHON_INTERFACE_LIBS "")
94
+ endif()
95
+ list(REMOVE_ITEM _PYTHON_INTERFACE_LIBS "-liconv" "-lintl")
96
+ list(APPEND _PYTHON_INTERFACE_LIBS
97
+ Iconv::Iconv
98
+ "$<IF:$<CONFIG:Debug>,${Intl_LIBRARY_DEBUG},${Intl_LIBRARY_RELEASE}>"
99
+ )
100
+ set_property(TARGET @PythonFinder_PREFIX@::Python PROPERTY INTERFACE_LINK_LIBRARIES ${_PYTHON_INTERFACE_LIBS})
101
+ unset(_PYTHON_INTERFACE_LIBS)
102
+ endif()
103
+ if(TARGET @PythonFinder_PREFIX@::Module)
104
+ get_target_property(_PYTHON_INTERFACE_LIBS @PythonFinder_PREFIX@::Module INTERFACE_LINK_LIBRARIES)
105
+ if(NOT _PYTHON_INTERFACE_LIBS)
106
+ set(_PYTHON_INTERFACE_LIBS "")
107
+ endif()
108
+ list(REMOVE_ITEM _PYTHON_INTERFACE_LIBS "-liconv" "-lintl")
109
+ list(APPEND _PYTHON_INTERFACE_LIBS
110
+ Iconv::Iconv
111
+ "$<IF:$<CONFIG:Debug>,${Intl_LIBRARY_DEBUG},${Intl_LIBRARY_RELEASE}>"
112
+ )
113
+ set_property(TARGET @PythonFinder_PREFIX@::Module PROPERTY INTERFACE_LINK_LIBRARIES ${_PYTHON_INTERFACE_LIBS})
114
+ unset(_PYTHON_INTERFACE_LIBS)
115
+ endif()
116
+ if(DEFINED @PythonFinder_PREFIX@_LIBRARIES)
117
+ list(APPEND @PythonFinder_PREFIX@_LIBRARIES "-framework CoreFoundation" ${Iconv_LIBRARIES} ${Intl_LIBRARIES})
118
+ endif()
119
+ endif()
120
+ endif()
121
+ else()
122
+ _find_package(${ARGS})
123
+ endif()
124
+
125
+ unset(_PythonFinder_WantInterp)
126
+ unset(_PythonFinder_WantLibs)
cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-port-config.cmake ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(PYTHON3_VERSION "@VERSION@")
2
+ set(PYTHON3_VERSION_MAJOR "@PYTHON_VERSION_MAJOR@")
3
+ set(PYTHON3_VERSION_MINOR "@PYTHON_VERSION_MINOR@")
4
+ set(PYTHON3_INCLUDE "include/python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR}")
5
+ set(site_base "")
6
+ if(VCPKG_TARGET_IS_WINDOWS)
7
+ set(site_base "tools/python${PYTHON3_VERSION_MAJOR}/Lib")
8
+ else()
9
+ set(site_base "lib/python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR}")
10
+ endif()
11
+ set(PYTHON3_SITE "${site_base}/site-packages")
12
+
cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "python3",
3
+ "version": "3.11.8",
4
+ "port-version": 1,
5
+ "description": "The Python programming language",
6
+ "homepage": "https://github.com/python/cpython",
7
+ "license": "Python-2.0",
8
+ "supports": "!uwp & !mingw",
9
+ "dependencies": [
10
+ {
11
+ "name": "bzip2",
12
+ "platform": "!(windows & static)"
13
+ },
14
+ "expat",
15
+ {
16
+ "name": "gettext",
17
+ "platform": "osx"
18
+ },
19
+ {
20
+ "name": "libffi",
21
+ "platform": "!(windows & static)"
22
+ },
23
+ {
24
+ "name": "libiconv",
25
+ "platform": "osx"
26
+ },
27
+ {
28
+ "name": "liblzma",
29
+ "platform": "!(windows & static)"
30
+ },
31
+ {
32
+ "name": "libuuid",
33
+ "platform": "!osx & !windows"
34
+ },
35
+ {
36
+ "name": "openssl",
37
+ "platform": "!(windows & static)"
38
+ },
39
+ {
40
+ "name": "python3",
41
+ "host": true
42
+ },
43
+ {
44
+ "name": "sqlite3",
45
+ "platform": "!(windows & static)"
46
+ },
47
+ {
48
+ "name": "vcpkg-msbuild",
49
+ "host": true,
50
+ "platform": "windows"
51
+ },
52
+ "zlib"
53
+ ],
54
+ "features": {
55
+ "deprecated-win7-support": {
56
+ "description": "Deprecated support for the Windows 7 platform -- may be removed at any time."
57
+ }
58
+ }
59
+ }
cc-multilingual-main/cc_net/vcpkg/ports/qt5-doc/portfile.cmake ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
2
+ if(VCPKG_TARGET_IS_WINDOWS)
3
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
4
+ message(STATUS "${PORT} will not build any artifacts on Windows!")
5
+ endif()
6
+ include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake)
7
+ qt_submodule_installation()