diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/fix-build-flags.patch b/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/fix-build-flags.patch new file mode 100644 index 0000000000000000000000000000000000000000..960dfa20967b30f9975b726538fcfc9fcc51ef8d --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/fix-build-flags.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index deaa67c..fb82294 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,10 +34,10 @@ target_sources(mp + if(PROJECT_IS_TOP_LEVEL) + if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + target_compile_options(mp INTERFACE +- $) ++ $) + target_link_options(mp INTERFACE $) + elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +- target_compile_options(mp INTERFACE $) ++ target_compile_options(mp INTERFACE $) + endif() + endif() + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..0adc5fa237b6adceded14903d63dcc40dca3ce5c --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boost-ext/mp + REF d2dbdf89e543624be8351fd52308a9cf73374dbc + SHA512 15d56bf0dca2e4bfb9128b8552a6aa01ed6b1431ab9c152ed51473f6fa237c31fbf3d5baa22523e3786d14fd716acb5436ed26fe89d46812ba9375e2417bc67a + HEAD_REF main + PATCHES fix-build-flags.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME mp CONFIG_PATH "share/cmake/mp-0.0.1") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/usage b/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/usage new file mode 100644 index 0000000000000000000000000000000000000000..247e07999037b42372485ea9dd571498b038e6f3 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/usage @@ -0,0 +1,5 @@ +The package bext-mp provides CMake targets: + + find_package(mp CONFIG REQUIRED) + target_link_libraries(main PRIVATE Boost::mp) + set_property(TARGET main PROPERTY CXX_EXTENSIONS OFF) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..413416c11b40cf010697838275301acdba64ef85 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/bext-mp/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "bext-mp", + "version-date": "2023-03-02", + "description": "C++20 ~~Template~~ Meta-Programming", + "homepage": "https://boost-ext.github.io/mp/", + "license": "BSL-1.0", + "supports": "!windows | mingw", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..21f1557a975307ab64d199e17181dc5b4cebec00 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO free-audio/clap + REF "${VERSION}" + SHA512 9113673a911d023ea29d9cb246fbd7e82b4baccf4df5eb63ffe2605cc65543f82cb3a66982803e26f9ecfc8c159508470608b1d3b47009965094fbcdede49cf5 + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup( + CONFIG_PATH "lib/cmake/clap" +) +vcpkg_fixup_pkgconfig() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..63a8ef2a6e069971d855501b1eb3c406c0e000bc --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/clap-cleveraudio/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "clap-cleveraudio", + "version-semver": "1.2.0", + "description": "CLAP is an audio plugin ABI which defines a standard for Digital Audio Workstations and audio plugins to work together", + "homepage": "https://cleveraudio.org/", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/fix-build.patch b/cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/fix-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..0677673639826d2b07de607824ff0a080c9139cd --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/fix-build.patch @@ -0,0 +1,38 @@ +diff --git a/Makefile.am b/Makefile.am +index 6135f2a..e68974f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -8,7 +8,7 @@ INCLUDE = -I$(abs_top_builddir)/include \ + -I$(abs_top_builddir)/include/xor_codes + + AM_CPPFLAGS = $(CPPFLAGS) $(INCLUDE) +-AM_CPPFLAGS += -Werror -Wall ++AM_CPPFLAGS += -Wall + + AM_CFLAGS = -fPIC $(AM_CPPFLAGS) @GCOV_FLAGS@ -L/usr/local/lib + +diff --git a/erasurecode.pc.in b/erasurecode.pc.in +index 148c382..5a8578f 100644 +--- a/erasurecode.pc.in ++++ b/erasurecode.pc.in +@@ -11,5 +11,6 @@ Version: @LIBERASURECODE_VERSION@ + Requires: + Conflicts: + Libs: -L${libdir} -lerasurecode -ldl +-Libs.private: @ERASURECODE_STATIC_LIBS@ -lz ++Libs.private: -lXorcode -lnullcode -lerasurecode_rs_vand ++Requires.private: zlib + Cflags: -I${includedir}/ -I${includedir}/liberasurecode +diff --git a/src/Makefile.am b/src/Makefile.am +index 693809e..097954d 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -32,7 +32,7 @@ liberasurecode_la_SOURCES = \ + backends/shss/shss.c \ + backends/phazrio/libphazr.c + +-liberasurecode_la_CPPFLAGS = -Werror @GCOV_FLAGS@ ++liberasurecode_la_CPPFLAGS = @GCOV_FLAGS@ + liberasurecode_la_LIBADD = \ + builtin/null_code/libnullcode.la \ + builtin/xor_codes/libXorcode.la \ diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..3968a1ad36bf08faad763562109473d7f45c1f43 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO openstack/liberasurecode + REF "${VERSION}" + SHA512 d5daa962324ef19fd195cfa842ec375d9dd5e62e3391b4a1cbf49a850b852b18cfc9be929ab18786d6b839139f6260d5cb4c88a0ba440c06b0e54e04ffb1bee1 + HEAD_REF master + PATCHES + fix-build.patch +) + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + OPTIONS + "--disable-werror" +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..213d78e61a25327a9a800ada8b27241fc95db320 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/liberasurecode/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "liberasurecode", + "version": "1.6.3", + "description": "Erasure Code API library written in C with pluggable Erasure Code backends. Mirror of code maintained at opendev.org.", + "homepage": "https://github.com/openstack/liberasurecode", + "license": "BSD-2-Clause", + "supports": "!android & !windows", + "dependencies": [ + "zlib" + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/build.patch b/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/build.patch new file mode 100644 index 0000000000000000000000000000000000000000..c5e1b75011f3966e2e6b6156f3849ad6454d8c28 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/build.patch @@ -0,0 +1,38 @@ +diff --git a/src/encparse.c b/src/encparse.c +index 548110ede..61952b9ce 100644 +--- a/src/encparse.c ++++ b/src/encparse.c +@@ -28,12 +28,16 @@ THE SOFTWARE. + to be pure ASCII. Bloody ``Code Set Independence''. */ + + #include ++#ifndef _MSC_VER + #include ++#else ++#define strcasecmp _stricmp ++#endif + #include + + #include + +-#include "zlib.h" ++#include + typedef gzFile FontFilePtr; + + #define FontFileGetc(f) gzgetc(f) +diff --git a/src/fontenc.c b/src/fontenc.c +index c4ccd5eb0..e87d1089d 100644 +--- a/src/fontenc.c ++++ b/src/fontenc.c +@@ -23,7 +23,11 @@ THE SOFTWARE. + /* Backend-independent encoding code */ + + #include ++#ifndef _MSC_VER + #include ++#else ++#define strcasecmp _stricmp ++#endif + #include + + #define FALSE 0 diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/configure.ac.patch b/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/configure.ac.patch new file mode 100644 index 0000000000000000000000000000000000000000..2a9fa85a86eb529189bdf1111e4f366077f70094 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/configure.ac.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index cadc653a0..aa645af81 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -47,7 +47,7 @@ XORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings]) + # zlib + AC_CHECK_HEADER([zlib.h], [], + AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +-AC_CHECK_LIB(z, gzclose, [], ++AC_SEARCH_LIBS(gzclose, [z zlib zlibd], [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) + + # Obtain compiler/linker options for depedencies diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..9b29d4893d7619c1c0bed6859eeb32bf50326b45 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/portfile.cmake @@ -0,0 +1,32 @@ +if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) + 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!") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org/xorg + OUT_SOURCE_PATH SOURCE_PATH + REPO lib/libfontenc + REF 2baea13978759d1a011fc6d739465893b554d30a #1.1.4 + SHA512 5ebef8b516a2377b004894b53d56ad960bc5179d9f9a36e18bc2228ea04e8f87e9baffd4883c21783dd1f4c57d7f521cdfa42c1e9facae60c6fc2c9f5472230e + HEAD_REF master + PATCHES configure.ac.patch + build.patch +) +set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# # Handle copyright +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}/") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/" RENAME copyright) +endif() diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..c34079afeaed5987f09590f10eb7dd64b4bca78f --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libfontenc/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libfontenc", + "version": "1.1.4", + "description": "X font encoding library", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libfontenc", + "license": null, + "dependencies": [ + "font-util", + "xorg-macros", + "xproto", + "zlib" + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/pkgconfig.patch b/cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/pkgconfig.patch new file mode 100644 index 0000000000000000000000000000000000000000..1c6f5dee355924fd9ba45a27aeeb812f50beacbf --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/pkgconfig.patch @@ -0,0 +1,11 @@ +diff --git a/src/libsystemd/libsystemd.pc.in b/src/libsystemd/libsystemd.pc.in +index da6e4e667e..3786238ccb 100644 +--- a/src/libsystemd/libsystemd.pc.in ++++ b/src/libsystemd/libsystemd.pc.in +@@ -17,4 +17,6 @@ Description: systemd Library + URL: {{PROJECT_URL}} + Version: {{PROJECT_VERSION}} + Libs: -L${libdir} -lsystemd ++Libs.private: -lrt ++Requires.private: libcap libcrypt liblz4 liblzma libzstd mount + Cflags: -I${includedir} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..2db5d2866d8ebaed5e5b82160a63c43f337db820 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/portfile.cmake @@ -0,0 +1,60 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO systemd/systemd + REF "v${VERSION}" + SHA512 84b4d16980fe2e64d5c3c95b9b4fbaad1076f368f493fdd745cbafbe7ce825293384f5fa0b6360ba8188da23c4575e87402fb666a3b71f84ff8b323aba0c07ff + PATCHES + pkgconfig.patch +) + +vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf") + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dstatic-libsystemd=true + -Daudit=false + -Dgcrypt=false + OPTIONS_DEBUG + -Drootprefix=${CURRENT_PACKAGES_DIR}/debug + -Dpkgconfiglibdir={CURRENT_PACKAGES_DIR}/debug + OPTIONS_RELEASE + -Drootprefix=${CURRENT_PACKAGES_DIR} + -Dpkgconfiglibdir={CURRENT_PACKAGES_DIR} +) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_build_ninja( + TARGETS libsystemd.a devel + ) +else() + vcpkg_build_ninja( + TARGETS libsystemd devel + ) +endif() + +file(INSTALL "${SOURCE_PATH}/src/systemd" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h") + +set(BUILD_DIR_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(INSTALL "${BUILD_DIR_RELEASE}/libsystemd.a" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") +else() + file(INSTALL "${BUILD_DIR_RELEASE}/libsystemd.so" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" FOLLOW_SYMLINK_CHAIN) +endif() + +if(NOT VCPKG_BUILD_TYPE) + set(BUILD_DIR_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(INSTALL "${BUILD_DIR_DEBUG}/libsystemd.a" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + else() + file(INSTALL "${BUILD_DIR_DEBUG}/libsystemd.so" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" FOLLOW_SYMLINK_CHAIN) + endif() +endif() + +file(INSTALL "${BUILD_DIR_RELEASE}/src/libsystemd/libsystemd.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") +if(NOT VCPKG_BUILD_TYPE) + file(INSTALL "${BUILD_DIR_DEBUG}/src/libsystemd/libsystemd.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") +endif() + +vcpkg_fixup_pkgconfig() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.LGPL2.1") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..71bd3765593bd0a76f6887d8e41966d2a8b049ce --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libsystemd/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "libsystemd", + "version": "254", + "port-version": 2, + "description": "Libsystemd", + "homepage": "https://github.com/systemd/systemd", + "license": "LGPL-2.1+", + "supports": "linux", + "dependencies": [ + { + "name": "gperf", + "host": true + }, + "libcap", + "liblzma", + "libmount", + "libxcrypt", + "lz4", + { + "name": "vcpkg-tool-meson", + "host": true + }, + "zstd" + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/fix-cmake.patch b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/fix-cmake.patch new file mode 100644 index 0000000000000000000000000000000000000000..3164b1b3c0b5fa7be46f3a92241f4e7b996ce469 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/fix-cmake.patch @@ -0,0 +1,16 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -380,11 +380,11 @@ target_link_libraries(mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.lib) + add_custom_command(TARGET mimalloc POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" $ + COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory") +- install(FILES "$/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${mi_install_libdir}) ++ install(FILES "$/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) ++ install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION ${mi_install_libdir} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${mi_install_libdir} NAMELINK_SKIP) + install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) + endif() + + # static library diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/template-param-types.diff b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/template-param-types.diff new file mode 100644 index 0000000000000000000000000000000000000000..1f1b703749125365eb8bc95e4c21a527e0504057 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/template-param-types.diff @@ -0,0 +1,22 @@ +diff --git a/src/arena.c b/src/arena.c +index a04a04c..1340a96 100644 +--- a/src/arena.c ++++ b/src/arena.c +@@ -476,7 +476,7 @@ static void mi_arena_schedule_purge(mi_arena_t* arena, size_t bitmap_idx, size_t + // schedule decommit + mi_msecs_t expire = mi_atomic_loadi64_relaxed(&arena->purge_expire); + if (expire != 0) { +- mi_atomic_addi64_acq_rel(&arena->purge_expire, delay/10); // add smallish extra delay ++ mi_atomic_addi64_acq_rel(&arena->purge_expire, (mi_msecs_t)delay/10); // add smallish extra delay + } + else { + mi_atomic_storei64_release(&arena->purge_expire, _mi_clock_now() + delay); +@@ -520,7 +520,7 @@ static bool mi_arena_try_purge(mi_arena_t* arena, mi_msecs_t now, bool force, mi + if (!force && expire > now) return false; + + // reset expire (if not already set concurrently) +- mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire, 0); ++ mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire, (mi_msecs_t)0); + + // potential purges scheduled, walk through the bitmap + bool any_purged = false; diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/usage b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/usage new file mode 100644 index 0000000000000000000000000000000000000000..45cd37e753dac967640d0219bf7cddb2637815c2 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/usage @@ -0,0 +1,4 @@ +mimalloc provides CMake targets: + + find_package(mimalloc CONFIG REQUIRED) + target_link_libraries(main PRIVATE $,mimalloc-static,mimalloc) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg-cmake-wrapper.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4e2a70c4b5e3b54be74e647728234e690b618636 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET mimalloc AND NOT TARGET mimalloc-static) + add_library(mimalloc-static INTERFACE IMPORTED) + set_target_properties(mimalloc-static PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc) +elseif(TARGET mimalloc-static AND NOT TARGET mimalloc) + add_library(mimalloc INTERFACE IMPORTED) + set_target_properties(mimalloc PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc-static) +endif() diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..0a3c8e93a7048e8451904becaf466b676fe881e8 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/mimalloc/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "mimalloc", + "version": "2.1.2", + "port-version": 1, + "description": "Compact general purpose allocator with excellent performance", + "homepage": "https://github.com/microsoft/mimalloc", + "license": "MIT", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "asm": { + "description": "Generate assembly files" + }, + "override": { + "description": "Override the standard malloc interface" + }, + "secure": { + "description": "Use security mitigations (like guard pages and randomization)" + } + } +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..e52619655769a108f7cce523fa14f5b0871dfc6b --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/portfile.cmake @@ -0,0 +1,31 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +# Convert PcapPlusPlus to add leading zero 23.9 => 23.09 +string(REGEX REPLACE "^([0-9]+)[.]([0-9])\$" "\\1.0\\2" PCAPPLUSPLUS_VERSION "${VERSION}") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO seladb/PcapPlusPlus + REF "v${PCAPPLUSPLUS_VERSION}" + SHA512 e7dc1dbd85c9f0d2f9c5d3e436456c2cd183fb508c869fa8fb83f46aac99b868a16283204e5d57a0bfd7587f6ac2582b3e14c6098683fad4501708c8fededd6a + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DPCAPPP_BUILD_EXAMPLES=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/pcapplusplus) +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/include" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..963d22b6490eb8406f996c6311b72ea1489ca742 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/pcapplusplus/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "pcapplusplus", + "version": "23.9", + "port-version": 1, + "description": "PcapPlusPlus is a multi-platform C++ library for capturing, parsing and crafting of network packets", + "homepage": "https://github.com/seladb/PcapPlusPlus", + "license": null, + "dependencies": [ + { + "name": "libpcap", + "platform": "!windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + { + "name": "winpcap", + "platform": "windows" + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0001-only-build-required-projects.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0001-only-build-required-projects.patch new file mode 100644 index 0000000000000000000000000000000000000000..1c9f047d4b209d920f909093b9e41f20f5dcc314 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0001-only-build-required-projects.patch @@ -0,0 +1,57 @@ +From 6492277e39dbe7dd77d32fdc9ae4b989213ef3c6 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 9 Sep 2020 20:15:58 -0400 +Subject: [PATCH 5/6] only build required projects + +strips out tests and unsupported externals (eg tkinter). +--- + PCbuild/_ssl.vcxproj | 2 +- + PCbuild/pcbuild.proj | 14 +++++++------- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj +index 4dffa202b7..e661cb6fb6 100644 +--- a/PCbuild/_ssl.vcxproj ++++ b/PCbuild/_ssl.vcxproj +@@ -111,7 +111,7 @@ + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} + false + +- ++ + {86937f53-c189-40ef-8ce8-8759d8e7d480} + false + +diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj +index 4d416c589e..ede9868a8f 100644 +--- a/PCbuild/pcbuild.proj ++++ b/PCbuild/pcbuild.proj +@@ -60,17 +60,17 @@ + + + +- ++ + +- ++ + + + + + + +- +- +- +- ++ ++ ++ ++ + + + +-- +2.28.0.windows.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0002-static-library.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0002-static-library.patch new file mode 100644 index 0000000000000000000000000000000000000000..10bb2c0c7b7b263d25293e40d302f94beb32e37c --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0002-static-library.patch @@ -0,0 +1,153 @@ +From 14d91e4f4a9377f47cc4cc33faeeb7c82f64b176 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Thu, 28 May 2020 17:25:21 -0400 +Subject: [PATCH 1/7] static library + +builds the pythoncore as a static library instead of a DLL +--- + PC/pyconfig.h | 9 +++++++++ + PCbuild/pythoncore.vcxproj | 4 ++-- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/Modules/getpath.c b/Modules/getpath.c +index d7d3cf081e..34269f0b75 100644 +--- a/Modules/getpath.c ++++ b/Modules/getpath.c +@@ -801,10 +801,12 @@ static int + library_to_dict(PyObject *dict, const char *key) + { + #ifdef MS_WINDOWS ++#ifdef Py_ENABLE_SHARED + extern HMODULE PyWin_DLLhModule; + if (PyWin_DLLhModule) { + return winmodule_to_dict(dict, key, PyWin_DLLhModule); + } ++#endif + #elif defined(WITH_NEXT_FRAMEWORK) + static char modPath[MAXPATHLEN + 1]; + static int modPathInitialized = -1; +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index d7d3cf081e..34269f0b75 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -251,6 +251,9 @@ typedef int pid_t; + + /* For Windows the Python core is in a DLL by default. Test + Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ ++#ifndef Py_NO_ENABLE_SHARED ++#define Py_NO_ENABLE_SHARED ++#endif + #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) + # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ + # define MS_COREDLL /* deprecated old symbol */ +@@ -276,6 +277,15 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ + # endif /* _DEBUG */ + # endif /* _MSC_VER */ + # endif /* Py_BUILD_CORE */ ++#else ++ /* So MSVC users need not specify the .lib file in their own config */ ++# pragma comment(lib, "version.lib") ++# pragma comment(lib, "shlwapi.lib") ++# pragma comment(lib, "ws2_32.lib") ++# pragma comment(lib, "bcrypt.lib") ++# if Py_WINVER > 0x0601 ++# pragma comment(lib, "pathcch.lib") ++# endif /* Py_WINVER */ + #endif /* MS_COREDLL */ + + #if defined(MS_WIN64) +diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj +index 70c336a9d3..ba797e8afd 100644 +--- a/PCbuild/pcbuild.proj ++++ b/PCbuild/pcbuild.proj +@@ -45,7 +45,7 @@ + false + + +- ++ + + + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 2625d0293d..2f8bdaa931 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -73,7 +73,7 @@ + + + +- DynamicLibrary ++ StaticLibrary + false + + +@@ -102,7 +102,7 @@ + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;%(AdditionalIncludeDirectories) + $(zlibDir);%(AdditionalIncludeDirectories) +- _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) + + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 2625d0293d..2f8bdaa931 100644 +--- a/PCbuild/_freeze_module.vcxproj ++++ b/PCbuild/_freeze_module.vcxproj +@@ -88,7 +88,7 @@ + + + +- Py_NO_ENABLE_SHARED;Py_BUILD_CORE;_CONSOLE;%(PreprocessorDefinitions) ++ Py_NO_ENABLE_SHARED;Py_BUILD_CORE;_CONSOLE;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + Disabled + false + +diff --git a/Python/dynload_win.c b/Python/dynload_win.c +index ac49f7867a..f3583345ff 100644 +--- a/Python/dynload_win.c ++++ b/Python/dynload_win.c +@@ -163,6 +163,7 @@ static char *GetPythonImport (HINSTANCE hModule) + return NULL; + } + ++#ifdef Py_ENABLE_SHARED + /* Load python3.dll before loading any extension module that might refer + to it. That way, we can be sure that always the python3.dll corresponding + to this python DLL is loaded, not a python3.dll that might be on the path +@@ -216,6 +217,7 @@ _Py_CheckPython3(void) + return hPython3 != NULL; + #undef MAXPATHLEN + } ++#endif /* Py_ENABLE_SHARED */ + + dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix, + const char *shortname, +@@ -224,7 +226,9 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix, + dl_funcptr p; + char funcname[258], *import_python; + ++#ifdef Py_ENABLE_SHARED + _Py_CheckPython3(); ++#endif /* Py_ENABLE_SHARED */ + + #if USE_UNICODE_WCHAR_CACHE + const wchar_t *wpathname = _PyUnicode_AsUnicode(pathname); +diff --git a/Python/sysmodule.c b/Python/sysmodule.c +index ac49f7867a..f3583345ff 100644 +--- a/Python/sysmodule.c ++++ b/Python/sysmodule.c +@@ -2804,6 +2804,9 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict + #ifdef MS_COREDLL + SET_SYS("dllhandle", PyLong_FromVoidPtr(PyWin_DLLhModule)); + SET_SYS_FROM_STRING("winver", PyWin_DLLVersionString); ++#elif defined(MS_WINDOWS) ++ SET_SYS("dllhandle", PyLong_FromVoidPtr(NULL)); ++ SET_SYS_FROM_STRING("winver", MS_DLL_ID); + #endif + #ifdef ABIFLAGS + SET_SYS_FROM_STRING("abiflags", ABIFLAGS); +-- +2.28.0.windows.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0003-use-vcpkg-zlib.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0003-use-vcpkg-zlib.patch new file mode 100644 index 0000000000000000000000000000000000000000..af0b4fa806c9489eda939e5b611b3678bbfab356 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0003-use-vcpkg-zlib.patch @@ -0,0 +1,39 @@ +From 196555707236f4387875749f66620fb519166963 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 9 Sep 2020 15:20:36 -0400 +Subject: [PATCH 2/6] use vcpkg zlib + +building without zlib is not a supported configuration, per the warning +messages. +--- + PCbuild/pythoncore.vcxproj | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index dbe236829a..5f30a35eb3 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -540,8 +540,10 @@ + + + +- ++ + ++ ++ + + + +@@ -593,7 +595,7 @@ + + + +- ++ + + + +-- +2.28.0.windows.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0004-devendor-external-dependencies.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0004-devendor-external-dependencies.patch new file mode 100644 index 0000000000000000000000000000000000000000..ad31c1eea7bd925ada9ecd8d5bd9b0908f9b17d7 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0004-devendor-external-dependencies.patch @@ -0,0 +1,117 @@ +From 6c5c3793cbc6ba2a1d0d623a2bdaa9c2125be516 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 9 Sep 2020 15:24:38 -0400 +Subject: [PATCH 3/6] devendor external dependencies + +externally fetched libraries may cause linker errors resulting from +duplicate symbols in downstream projects. +--- + PCbuild/_bz2.vcxproj | 4 +++- + PCbuild/_lzma.vcxproj | 5 ++--- + PCbuild/_sqlite3.vcxproj | 2 +- + PCbuild/_ssl.vcxproj | 2 +- + PCbuild/pyexpat.vcxproj | 6 ++++-- + 5 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/PCbuild/_bz2.vcxproj b/PCbuild/_bz2.vcxproj +index 3fe95fbf83..6b12e8818e 100644 +--- a/PCbuild/_bz2.vcxproj ++++ b/PCbuild/_bz2.vcxproj +@@ -101,6 +101,8 @@ + + + ++ ++ + + + +@@ -109,7 +111,7 @@ + + + +- ++ + + + +diff --git a/PCbuild/_lzma.vcxproj b/PCbuild/_lzma.vcxproj +index fe076a6fc5..70cc61dd95 100644 +--- a/PCbuild/_lzma.vcxproj ++++ b/PCbuild/_lzma.vcxproj +@@ -94,10 +94,9 @@ + + + $(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories) +- WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions) ++ WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + +- $(OutDir)liblzma$(PyDebugExt).lib;%(AdditionalDependencies) + + + +@@ -111,7 +110,7 @@ + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} + false + +- ++ + {12728250-16eC-4dc6-94d7-e21dd88947f8} + false + +diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj +index 7e0062692b..6fb3279a20 100644 +--- a/PCbuild/_sqlite3.vcxproj ++++ b/PCbuild/_sqlite3.vcxproj +@@ -127,7 +127,7 @@ + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} + false + +- ++ + {a1a295e5-463c-437f-81ca-1f32367685da} + false + +diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj +index 4907f49b66..4dffa202b7 100644 +--- a/PCbuild/_ssl.vcxproj ++++ b/PCbuild/_ssl.vcxproj +@@ -99,7 +99,7 @@ + + + +- ++ + _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions) + + +diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj +index b2d9f5d57d..4efb826a05 100644 +--- a/PCbuild/pyexpat.vcxproj ++++ b/PCbuild/pyexpat.vcxproj +@@ -89,17 +89,19 @@ + + + +- ++ + $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;XML_STATIC;%(PreprocessorDefinitions) + + +- ++ + + + + + ++ ++ + + + +-- +2.28.0.windows.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0005-dont-copy-vcruntime.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0005-dont-copy-vcruntime.patch new file mode 100644 index 0000000000000000000000000000000000000000..174c27e5c9ea510ca94a0e8f95b7135f48362bc7 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0005-dont-copy-vcruntime.patch @@ -0,0 +1,26 @@ +From 8086c67fa7ada1888a7808cbdc6fe74b62abe5b1 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 9 Sep 2020 16:12:49 -0400 +Subject: [PATCH 4/6] dont copy vcruntime + +VCRUNTIME140.dll should not be redistributed, ever. +--- + PCbuild/pythoncore.vcxproj | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 5f30a35eb3..3cf21ba39c 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -565,7 +565,7 @@ + + + +- ++ + + + +-- +2.28.0.windows.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0006-restore-support-for-windows-7.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0006-restore-support-for-windows-7.patch new file mode 100644 index 0000000000000000000000000000000000000000..757d8bf2ac32a955ae861ceba4260155bdd7a02b --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0006-restore-support-for-windows-7.patch @@ -0,0 +1,326 @@ +From e30a560527d17ae81685dd11d3268bc982af2048 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Tue, 16 Feb 2021 18:03:07 -0500 +Subject: [PATCH 7/7] restore support for windows 7 + +this backports the windows 7 compatible fix for bpo-39401 from gh-18234, +originally authored by Steve Dower, and removes explicit dependencies on +pathcch. + +The same mechanism is applied to fix posixmodule.c +--- +index 25ddc82..ff51042 100644 +--- a/Modules/_winapi.c ++++ b/Modules/_winapi.c +@@ -44,6 +44,15 @@ + + #include "pycore_runtime.h" // _Py_ID + ++// The Windws 7 patch lowers the API version such that these constants ++// are no longer defined by the Windows SDK. Debounce that. ++#ifndef LCMAP_SORTHANDLE ++# define LCMAP_SORTHANDLE 0x20000000 ++#endif ++#ifndef LCMAP_HASH ++# define LCMAP_HASH 0x00040000 ++#endif ++ + #if defined(MS_WIN32) && !defined(MS_WIN64) + #define HANDLE_TO_PYNUM(handle) \ + PyLong_FromUnsignedLong((unsigned long) handle) +diff --git a/Modules/getpath.c b/Modules/getpath.c +index bc730fc..7d3d559 100644 +--- a/Modules/getpath.c ++++ b/Modules/getpath.c +@@ -11,7 +11,7 @@ + + #ifdef MS_WINDOWS + # include // GetFullPathNameW(), MAX_PATH +-# include ++# include + #endif + + #ifdef __APPLE__ +@@ -217,6 +217,11 @@ getpath_isfile(PyObject *Py_UNUSED(self), PyObject *args) + return r; + } + ++#ifdef MS_WINDOWS ++static int _PathCchFindExtension_Initialized = 0; ++typedef HRESULT (__stdcall *PPathCchFindExtension) (PCWSTR pszPath, size_t cchPath, PCWSTR *ppszExt); ++static PPathCchFindExtension _PathCchFindExtension; ++#endif + + static PyObject * + getpath_isxfile(PyObject *Py_UNUSED(self), PyObject *args) +@@ -231,13 +235,51 @@ getpath_isxfile(PyObject *Py_UNUSED(self), PyObject *args) + path = PyUnicode_AsWideCharString(pathobj, &cchPath); + if (path) { + #ifdef MS_WINDOWS ++ ++ if (_PathCchFindExtension_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ ++ if (pathapi) { ++ _PathCchFindExtension = (PPathCchFindExtension)GetProcAddress(pathapi, "PathCchFindExtension"); ++ } else { ++ _PathCchFindExtension = NULL; ++ } ++ ++ _PathCchFindExtension_Initialized = 1; ++ } ++ + const wchar_t *ext; + DWORD attr = GetFileAttributesW(path); +- r = (attr != INVALID_FILE_ATTRIBUTES) && +- !(attr & FILE_ATTRIBUTE_DIRECTORY) && +- SUCCEEDED(PathCchFindExtension(path, cchPath + 1, &ext)) && +- (CompareStringOrdinal(ext, -1, L".exe", -1, 1 /* ignore case */) == CSTR_EQUAL) +- ? Py_True : Py_False; ++ if (attr == INVALID_FILE_ATTRIBUTES || (attr & FILE_ATTRIBUTE_DIRECTORY)) { ++ r = Py_False; ++ } ++ else { ++ HRESULT hr = S_OK; ++ if (_PathCchFindExtension) { ++ hr = _PathCchFindExtension(path, cchPath + 1, &ext); ++ } ++ else { ++ if (cchPath > MAX_PATH) { ++ hr = E_FAIL; ++ } ++ else { ++ ext = PathFindExtensionW(path); ++ if (*ext == '\0') ++ hr = E_FAIL; ++ } ++ } ++ ++ if (!SUCCEEDED(hr)) { ++ r = Py_False; ++ } ++ else if (CompareStringOrdinal(ext, -1, L".exe", -1, 1 /* ignore case */) != CSTR_EQUAL) { ++ r = Py_False; ++ } ++ else { ++ r = Py_True; ++ } ++ } + #else + struct stat st; + r = (_Py_wstat(path, &st) == 0) && +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -15,7 +15,7 @@ + // whereas pycore_condvar.h defines the WIN32_LEAN_AND_MEAN macro. + #ifdef MS_WINDOWS + # include +-# include ++# include + # include // UNLEN + # include "osdefs.h" // SEP + # define HAVE_SYMLINK +@@ -4471,6 +4471,11 @@ os__getvolumepathname_impl(PyObject *module, path_t *path) + return result; + } + ++#ifdef MS_WINDOWS ++static int _PathCchSkipRoot_Initialized = 0; ++typedef HRESULT (__stdcall *PPathCchSkipRoot) (PCWSTR pszPath, PCWSTR *ppszRootEnd); ++static PPathCchSkipRoot _PathCchSkipRoot; ++#endif + + /*[clinic input] + os._path_splitroot +@@ -4489,6 +4493,19 @@ os__path_splitroot_impl(PyObject *module, path_t *path) + PyObject *result = NULL; + HRESULT ret; + ++ if (_PathCchSkipRoot_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ ++ if (pathapi) { ++ _PathCchSkipRoot = (PPathCchSkipRoot)GetProcAddress(pathapi, "PathCchSkipRoot"); ++ } else { ++ _PathCchSkipRoot = NULL; ++ } ++ ++ _PathCchSkipRoot_Initialized = 1; ++ } ++ + buffer = (wchar_t*)PyMem_Malloc(sizeof(wchar_t) * (wcslen(path->wide) + 1)); + if (!buffer) { + return NULL; +@@ -4499,7 +4516,14 @@ os__path_splitroot_impl(PyObject *module, path_t *path) + } + + Py_BEGIN_ALLOW_THREADS +- ret = PathCchSkipRoot(buffer, &end); ++ if (_PathCchSkipRoot) { ++ ret = _PathCchSkipRoot(buffer, &end); ++ } else { ++ end = PathSkipRootW(buffer); ++ if (!end) { ++ ret = E_FAIL; ++ } ++ } + Py_END_ALLOW_THREADS + if (FAILED(ret)) { + result = Py_BuildValue("sO", "", path->object); +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index d7d3cf0..6e9c090 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -130,8 +130,8 @@ WIN32 is still required for the locale module. + + /* set the version macros for the windows headers */ + /* Python 3.9+ requires Windows 8 or greater */ +-#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */ +-#define Py_NTDDI NTDDI_WIN8 ++#define Py_WINVER 0x0601 /* _WIN32_WINNT_WIN7 */ ++#define Py_NTDDI NTDDI_WIN7 + + /* We only set these values when building Python - we don't want to force + these values on extensions, as that will affect the prototypes and +diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj +index 442e343..ef0a43e 100644 +--- a/PCbuild/_freeze_module.vcxproj ++++ b/PCbuild/_freeze_module.vcxproj +@@ -94,7 +94,7 @@ + + + Console +- version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies) ++ version.lib;ws2_32.lib;shlwapi.lib;bcrypt.lib;%(AdditionalDependencies) + Default + + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index c39ba3e1a9..0ef3a05fb6 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -106,7 +106,7 @@ + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) + + +- version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies) ++ version.lib;ws2_32.lib;shlwapi.lib;bcrypt.lib;%(AdditionalDependencies) + + + +diff --git a/Python/fileutils.c b/Python/fileutils.c +index c86ed40..6b1535d 100644 +--- a/Python/fileutils.c ++++ b/Python/fileutils.c +@@ -8,7 +8,7 @@ + #ifdef MS_WINDOWS + # include + # include +-# include // PathCchCombineEx ++# include + extern int winerror_to_errno(int); + #endif + +@@ -1999,13 +1999,46 @@ _Py_wrealpath(const wchar_t *path, + } + #endif + ++#ifdef MS_WINDOWS ++static int _PathCchSkipRoot_Initialized = 0; ++typedef HRESULT (__stdcall *PPathCchSkipRoot) (PCWSTR pszPath, PCWSTR *ppszRootEnd); ++static PPathCchSkipRoot _PathCchSkipRoot; ++ ++#ifndef PATHCCH_ALLOW_LONG_PATHS ++#define PATHCCH_ALLOW_LONG_PATHS 0x00000001 ++#endif ++#endif + + int + _Py_isabs(const wchar_t *path) + { + #ifdef MS_WINDOWS ++ if (_PathCchSkipRoot_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ ++ if (pathapi) { ++ _PathCchSkipRoot = (PPathCchSkipRoot)GetProcAddress(pathapi, "PathCchSkipRoot"); ++ } else { ++ _PathCchSkipRoot = NULL; ++ } ++ ++ _PathCchSkipRoot_Initialized = 1; ++ } ++ ++ HRESULT hr; + const wchar_t *tail; +- HRESULT hr = PathCchSkipRoot(path, &tail); ++ if (_PathCchSkipRoot) { ++ hr = _PathCchSkipRoot(path, &tail); ++ } else { ++ tail = PathSkipRootW(path); ++ if (!tail) { ++ hr = E_FAIL; ++ } else { ++ hr = S_OK; ++ } ++ } ++ + if (FAILED(hr) || path == tail) { + return 0; + } +@@ -2086,6 +2117,11 @@ _Py_abspath(const wchar_t *path, wchar_t **abspath_p) + #endif + } + ++#ifdef MS_WINDOWS ++static int _PathCchCombineEx_Initialized = 0; ++typedef HRESULT (__stdcall *PPathCchCombineEx) (PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, PCWSTR pszMore, ULONG dwFlags); ++static PPathCchCombineEx _PathCchCombineEx; ++#endif + + // The caller must ensure "buffer" is big enough. + static int +@@ -2093,9 +2127,36 @@ join_relfile(wchar_t *buffer, size_t bufsize, + const wchar_t *dirname, const wchar_t *relfile) + { + #ifdef MS_WINDOWS +- if (FAILED(PathCchCombineEx(buffer, bufsize, dirname, relfile, +- PATHCCH_ALLOW_LONG_PATHS))) { +- return -1; ++ ++ if (_PathCchCombineEx_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ ++ if (pathapi) { ++ _PathCchCombineEx = (PPathCchCombineEx)GetProcAddress(pathapi, "PathCchCombineEx"); ++ } else { ++ _PathCchCombineEx = NULL; ++ } ++ ++ _PathCchCombineEx_Initialized = 1; ++ } ++ ++ if (_PathCchCombineEx) { ++ if (FAILED(_PathCchCombineEx(buffer, bufsize, dirname, relfile, ++ PATHCCH_ALLOW_LONG_PATHS))) { ++ return -1; ++ } ++ } ++ else { ++ size_t dirlen = wcslen(dirname); ++ size_t rellen = wcslen(relfile); ++ size_t maxlen = bufsize - 1; ++ if (maxlen > MAX_PATH || dirlen >= maxlen || rellen >= maxlen - dirlen) { ++ return -1; ++ } ++ wchar_t * r = PathCombineW(buffer, dirname, relfile); ++ if (!r) ++ return -1; + } + #else + assert(!_Py_isabs(relfile)); diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0007-workaround-windows-11-sdk-rc-compiler-error.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0007-workaround-windows-11-sdk-rc-compiler-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..e5f8237d161b69edbb41633269bc07c95cad6c60 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0007-workaround-windows-11-sdk-rc-compiler-error.patch @@ -0,0 +1,30 @@ +From 0a72b7061ed79c5d6d37b41a5b1610e32fb371a4 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 22 Sep 2021 21:04:21 -0400 +Subject: [PATCH] workaround windows 11 sdk rc compiler error + +winnt.h was changed to error if the `SYSTEM_CACHE_ALIGNMENT` cannot be +determined. when the RC compiler is invoked, this seems to fail where +previous SDKs silently set the ARM value. +--- + PC/python_ver_rc.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h +index 90fc6ba1a1..e313a5138e 100644 +--- a/PC/python_ver_rc.h ++++ b/PC/python_ver_rc.h +@@ -1,3 +1,10 @@ ++// Temporarily workaround bug in Windows SDK 10.0.22000.0 winnt.h ++#ifdef RC_INVOKED ++# ifndef SYSTEM_CACHE_ALIGNMENT_SIZE ++# define SYSTEM_CACHE_ALIGNMENT_SIZE 64 ++# endif ++#endif ++ + // Resource script for Python core DLL. + // Currently only holds version information. + // +-- +2.33.0.windows.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0008-python.pc.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0008-python.pc.patch new file mode 100644 index 0000000000000000000000000000000000000000..e02dc1264a25f68a7f2d03ad0565885716143f0b --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0008-python.pc.patch @@ -0,0 +1,34 @@ +From 3c43def510e7c4c115fbe3938db8e4fe9bc2e311 Mon Sep 17 00:00:00 2001 +From: Max Khon +Date: Tue, 8 Feb 2022 12:58:30 +0700 +Subject: [PATCH 08/11] python.pc + +Fix pkgconfig for debug Linux builds (#22529) +--- + Misc/python-embed.pc.in | 2 +- + Misc/python.pc.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Misc/python-embed.pc.in b/Misc/python-embed.pc.in +index 2be9df8143..92142dfe68 100644 +--- a/Misc/python-embed.pc.in ++++ b/Misc/python-embed.pc.in +@@ -10,4 +10,4 @@ Requires: + Version: @VERSION@ + Libs.private: @LIBS@ + Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@ +-Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@ ++Cflags: -I${includedir}/python@VERSION@ +diff --git a/Misc/python.pc.in b/Misc/python.pc.in +index 87e04decc2..0349dc81ba 100644 +--- a/Misc/python.pc.in ++++ b/Misc/python.pc.in +@@ -10,4 +10,4 @@ Requires: + Version: @VERSION@ + Libs.private: @LIBS@ + Libs: +-Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@ ++Cflags: -I${includedir}/python@VERSION@ +-- +2.37.3.windows.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0010-dont-skip-rpath.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0010-dont-skip-rpath.patch new file mode 100644 index 0000000000000000000000000000000000000000..5d0b9dea6bb026a6b90d4fc9b95106f71fdafa58 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0010-dont-skip-rpath.patch @@ -0,0 +1,31 @@ +From f7439eae9b2f8d91b6689efbf01292a044f3a3fe Mon Sep 17 00:00:00 2001 +From: Osyotr +Date: Thu, 4 Aug 2022 23:49:06 +0300 +Subject: [PATCH 10/11] dont skip rpath + +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+), 0 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 61b3266..4c2cfb4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -49,6 +49,14 @@ [$1] + [RESTORE_ENV] + )dnl + ++if test "$ac_sys_system" != "Darwin"; then ++AS_VAR_IF([GNULD], [yes], [ ++ LDFLAGS="-Wl,--enable-new-dtags,-rpath,$vcpkg_rpath" ++], [ ++ LDFLAGS="-Wl,-rpath,$vcpkg_rpath" ++]) ++fi ++ + dnl PY_CHECK_FUNC(FUNCTION, [INCLUDES], [AC_DEFINE-VAR]) + AC_DEFUN([PY_CHECK_FUNC], + [ AS_VAR_PUSHDEF([py_var], [ac_cv_func_$1]) +-- +2.37.3.windows.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0011-gcc-ldflags-fix.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0011-gcc-ldflags-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..195a43785bc4a5fc57b359ca36775ac1a1bab728 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0011-gcc-ldflags-fix.patch @@ -0,0 +1,54 @@ +From 84652c4c5658fd443a05bf54fe6040857ba9c36c Mon Sep 17 00:00:00 2001 +From: Christoph Neuhauser +Date: Sat, 15 Oct 2022 01:14:12 +0200 +Subject: [PATCH 11/11] gcc ldflags fix + +--- + Lib/distutils/unixccompiler.py | 24 ++++++++++++++++++++++-- + 1 file changed, 22 insertions(+), 2 deletions(-) + +diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py +index d00c48981e..b14ce8454e 100644 +--- a/Lib/distutils/unixccompiler.py ++++ b/Lib/distutils/unixccompiler.py +@@ -13,7 +13,7 @@ + * link shared library handled by 'cc -shared' + """ + +-import os, sys, re ++import os, sys, re, shutil + + from distutils import sysconfig + from distutils.dep_util import newer +@@ -216,7 +216,27 @@ def library_dir_option(self, dir): + + def _is_gcc(self, compiler_name): + # clang uses same syntax for rpath as gcc +- return any(name in compiler_name for name in ("gcc", "g++", "clang")) ++ valid_compiler_names = ("gcc", "g++", "clang") ++ is_gcc = any(name in compiler_name for name in valid_compiler_names) ++ # On Linux systems, the compiler name may be, e.g., "cc -pthread". ++ # The executable "cc" is in this case a symlink to the true compiler. ++ if not is_gcc and "cc" in compiler_name: ++ # We need to make sure that this is not another compiler with "cc" ++ # at the end of its name, like "icc". For this, it is checked ++ # whether "cc" is the first word, or separated by a space or path ++ # delimiter before the "cc" substring. ++ cc_string_location = compiler_name.find("cc") ++ if cc_string_location == 0 \ ++ or compiler_name[cc_string_location - 1] == ' ' \ ++ or compiler_name[cc_string_location - 1] == '/' \ ++ or compiler_name[cc_string_location - 1] == '\\': ++ cc_path = shutil.which("cc") ++ if cc_path is not None: ++ real_compiler_path = os.path.realpath(cc_path) ++ is_gcc = any( ++ name in real_compiler_path \ ++ for name in valid_compiler_names) ++ return is_gcc + + def runtime_library_dir_option(self, dir): + # XXX Hackish, at the very least. See Python bug #445902: +-- +2.37.3.windows.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0012-force-disable-modules.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0012-force-disable-modules.patch new file mode 100644 index 0000000000000000000000000000000000000000..f97f19e5b28a9db75ed49138c630691443f9a085 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0012-force-disable-modules.patch @@ -0,0 +1,13 @@ +diff --git a/Modules/Setup b/Modules/Setup +index 87c6a152f8..7ad53f5b4f 100644 +--- a/Modules/Setup ++++ b/Modules/Setup +@@ -375,3 +375,8 @@ xxsubtype xxsubtype.c + # + # _sqlite3 _tkinter _curses pyexpat + # _codecs_jp _codecs_kr _codecs_tw unicodedata ++ ++*disabled* ++_curses ++_curses_panel ++_tkinter diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0014-fix-get-python-inc-output.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0014-fix-get-python-inc-output.patch new file mode 100644 index 0000000000000000000000000000000000000000..a20d2673ac1949419213700197cab708aafe18f4 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0014-fix-get-python-inc-output.patch @@ -0,0 +1,44 @@ +From b6ffa6e7a0f7a013fb111e618a7f7e2c58e9d548 Mon Sep 17 00:00:00 2001 +From: Billy Robert O'Neal III +Date: Wed, 26 Apr 2023 05:17:44 +0000 +Subject: [PATCH 14/14] fix get python inc output + +--- + Lib/distutils/sysconfig.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 3414a761e7..e6ae456ee9 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -45,7 +45,7 @@ + get_makefile_filename, + get_python_version, + ) +- ++from os.path import dirname + # This is better than + # from sysconfig import _CONFIG_VARS as _config_vars + # because it makes sure that the global dictionary is initialized +@@ -292,6 +292,7 @@ def get_python_inc(plat_specific=0, prefix=None): + incdir = os.path.join(get_config_var('srcdir'), 'Include') + return os.path.normpath(incdir) + python_dir = 'python' + get_python_version() + build_flags ++ prefix = dirname(dirname(BASE_PREFIX)) + return os.path.join(prefix, "include", python_dir) + elif os.name == "nt": + if python_build: +@@ -299,7 +300,9 @@ def get_python_inc(plat_specific=0, prefix=None): + # pyconfig.h + return (os.path.join(prefix, "include") + os.path.pathsep + + os.path.join(prefix, "PC")) +- return os.path.join(prefix, "include") ++ python_dir = 'python' + get_python_version() + build_flags ++ prefix = dirname(dirname(BASE_PREFIX)) ++ return os.path.join(prefix, "include", python_dir) + else: + raise DistutilsPlatformError( + "I don't know where Python installs its C header files " +-- +2.25.1 + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0015-dont-use-WINDOWS-def.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0015-dont-use-WINDOWS-def.patch new file mode 100644 index 0000000000000000000000000000000000000000..862fe3e472e5247a8c5addaadbfa0c6ed0325bea --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0015-dont-use-WINDOWS-def.patch @@ -0,0 +1,13 @@ +diff --git a/PC/launcher.c b/PC/launcher.c +index 734e75333..7124927cf 100644 +--- a/PC/launcher.c ++++ b/PC/launcher.c +@@ -2015,7 +2015,7 @@ installed, use -0 for available pythons", &p[1]); + return rc; + } + +-#if defined(_WINDOWS) ++#if !defined(_CONSOLE) // _WINDOWS is defined by the vcpkg toolchain + + int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, + LPWSTR lpstrCmd, int nShow) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-fix-win-cross.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-fix-win-cross.patch new file mode 100644 index 0000000000000000000000000000000000000000..fdbdf82e81b9869db0de07703b3a039c21bceb33 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-fix-win-cross.patch @@ -0,0 +1,34 @@ +diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj +index 7d3423251f..7f607742fe 100644 +--- a/PCbuild/_freeze_module.vcxproj ++++ b/PCbuild/_freeze_module.vcxproj +@@ -366,7 +366,7 @@ + + + +- ++ + + + + +- ++ + + + +- $(PreferredToolArchitecture) ++ $(Platform) + $(Configuration) + Release + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-undup-ffi-symbols.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-undup-ffi-symbols.patch new file mode 100644 index 0000000000000000000000000000000000000000..7faec9f9b8c377d9071c955e8d9ed2f73d937242 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0016-undup-ffi-symbols.patch @@ -0,0 +1,14 @@ +diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c +index 788bae6a9..3938f79db 100644 +--- a/Modules/_ctypes/malloc_closure.c ++++ b/Modules/_ctypes/malloc_closure.c +@@ -11,6 +11,9 @@ + #endif + #include "ctypes.h" + ++#undef Py_ffi_closure_alloc ++#undef Py_ffi_closure_free ++ + /* BLOCKSIZE can be adjusted. Larger blocksize will take a larger memory + overhead, but allocate less blocks from the system. It may be that some + systems have a limit of how many mmap'd blocks can be open. diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0017-fix-win.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0017-fix-win.patch new file mode 100644 index 0000000000000000000000000000000000000000..9d3fb3efb44f9f765af01305e06ae1ee31d65132 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0017-fix-win.patch @@ -0,0 +1,34 @@ +diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj +index 7d3423251f..7f607742fe 100644 +--- a/PCbuild/_freeze_module.vcxproj ++++ b/PCbuild/_freeze_module.vcxproj +@@ -366,7 +366,7 @@ + + + +- ++ + + + + +- ++ + + + +- $(PreferredToolArchitecture) ++ $(Platform) + $(Configuration) + Release + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/0018-fix-sysconfig-include.patch b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0018-fix-sysconfig-include.patch new file mode 100644 index 0000000000000000000000000000000000000000..1efdb5a8a72cdd5508897a3960fc1f7977bac15c --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/0018-fix-sysconfig-include.patch @@ -0,0 +1,15 @@ +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index ebe371182..e351df7da 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -51,8 +51,8 @@ + 'platstdlib': '{base}/Lib', + 'purelib': '{base}/Lib/site-packages', + 'platlib': '{base}/Lib/site-packages', +- 'include': '{installed_base}/Include', +- 'platinclude': '{installed_base}/Include', ++ 'include': '{installed_base}/../../include/python{py_version_short}{abiflags}', ++ 'platinclude': '{installed_base}/../../include/python{py_version_short}{abiflags}', + 'scripts': '{base}/Scripts', + 'data': '{base}', + }, diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/openssl.props.in b/cc-multilingual-main/cc_net/vcpkg/ports/python3/openssl.props.in new file mode 100644 index 0000000000000000000000000000000000000000..697185cf9faa9766c8063906750349d2205f5b32 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/openssl.props.in @@ -0,0 +1,23 @@ + + + + + Crypt32.lib;ws2_32.lib;%(AdditionalDependencies) + + ${CRYPTO_RELEASE};${SSL_RELEASE};%(AdditionalDependencies) + + + ${CRYPTO_DEBUG};${SSL_DEBUG};%(AdditionalDependencies) + + + + Crypt32.lib;ws2_32.lib;%(AdditionalDependencies) + + ${CRYPTO_RELEASE};${SSL_RELEASE};%(AdditionalDependencies) + + + ${CRYPTO_DEBUG};${SSL_DEBUG};%(AdditionalDependencies) + + + + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/python3/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..9ca5cdd1cb56e80df35b7dc436be8a8a09e3dade --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/portfile.cmake @@ -0,0 +1,387 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static) + message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +if(NOT VCPKG_HOST_IS_WINDOWS) + message(WARNING "${PORT} currently requires the following programs from the system package manager: + autoconf automake autoconf-archive +On Debian and Ubuntu derivatives: + sudo apt-get install autoconf automake autoconf-archive +On recent Red Hat and Fedora derivatives: + sudo dnf install autoconf automake autoconf-archive +On Arch Linux and derivatives: + sudo pacman -S autoconf automake autoconf-archive +On Alpine: + apk add autoconf automake autoconf-archive +On macOS: + brew install autoconf automake autoconf-archive\n") +endif() + +string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" PYTHON_VERSION "${VERSION}") +set(PYTHON_VERSION_MAJOR "${CMAKE_MATCH_1}") +set(PYTHON_VERSION_MINOR "${CMAKE_MATCH_2}") +set(PYTHON_VERSION_PATCH "${CMAKE_MATCH_3}") + +set(PATCHES + 0001-only-build-required-projects.patch + 0003-use-vcpkg-zlib.patch + 0004-devendor-external-dependencies.patch + 0005-dont-copy-vcruntime.patch + 0008-python.pc.patch + 0010-dont-skip-rpath.patch + 0012-force-disable-modules.patch + 0014-fix-get-python-inc-output.patch + 0015-dont-use-WINDOWS-def.patch + 0016-undup-ffi-symbols.patch # Required for lld-link. + 0018-fix-sysconfig-include.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND PATCHES 0002-static-library.patch) +endif() + +# Fix build failures with GCC for built-in modules (https://github.com/microsoft/vcpkg/issues/26573) +if(VCPKG_TARGET_IS_LINUX) + list(APPEND PATCHES 0011-gcc-ldflags-fix.patch) +endif() + +# Python 3.9 removed support for Windows 7. This patch re-adds support for Windows 7 and is therefore +# required to build this port on Windows 7 itself due to Python using itself in its own build system. +if("deprecated-win7-support" IN_LIST FEATURES) + list(APPEND PATCHES 0006-restore-support-for-windows-7.patch) + message(WARNING "Windows 7 support is deprecated and may be removed at any time.") +elseif(VCPKG_TARGET_IS_WINDOWS AND CMAKE_SYSTEM_VERSION EQUAL 6.1) + message(FATAL_ERROR "python3 requires the feature deprecated-win7-support when building on Windows 7.") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PYTHON_ALLOW_EXTENSIONS) + # The Windows 11 SDK has a problem that causes it to error on the resource files, so we patch that. + vcpkg_get_windows_sdk(WINSDK_VERSION) + if("${WINSDK_VERSION}" VERSION_GREATER_EQUAL "10.0.22000") + list(APPEND PATCHES "0007-workaround-windows-11-sdk-rc-compiler-error.patch") + endif() + if(VCPKG_CROSSCOMPILING) + list(APPEND PATCHES "0016-fix-win-cross.patch") + else() + list(APPEND PATCHES "0017-fix-win.patch") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO python/cpython + REF v${PYTHON_VERSION} + SHA512 c2ebe72ce53dd2d59750a7b0bdaf15ebb7ecb6f67d2913a457bf5d32bd0f640815f9496f2fa3ebeac0722264d000735d90d3ffaeac2de1f066b7aee994bf9b24 + HEAD_REF master + PATCHES ${PATCHES} +) + +vcpkg_replace_string("${SOURCE_PATH}/Makefile.pre.in" "$(INSTALL) -d -m $(DIRMODE)" "$(MKDIR_P)") + +function(make_python_pkgconfig) + cmake_parse_arguments(PARSE_ARGV 0 arg "" "FILE;INSTALL_ROOT;EXEC_PREFIX;INCLUDEDIR;ABIFLAGS" "") + + set(prefix "${CURRENT_PACKAGES_DIR}") + set(libdir [[${prefix}/lib]]) + set(exec_prefix ${arg_EXEC_PREFIX}) + set(includedir ${arg_INCLUDEDIR}) + set(VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") + set(ABIFLAGS ${arg_ABIFLAGS}) + + string(REPLACE "python" "python-${VERSION}" out_file ${arg_FILE}) + set(out_full_path "${arg_INSTALL_ROOT}/lib/pkgconfig/${out_file}") + configure_file("${SOURCE_PATH}/Misc/${arg_FILE}.in" ${out_full_path} @ONLY) + + file(READ ${out_full_path} pkgconfig_file) + string(REPLACE "-lpython${VERSION}" "-lpython${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}" pkgconfig_file "${pkgconfig_file}") + file(WRITE ${out_full_path} "${pkgconfig_file}") +endfunction() + +if(VCPKG_TARGET_IS_WINDOWS) + # Due to the way Python handles C extension modules on Windows, a static python core cannot + # load extension modules. + if(PYTHON_ALLOW_EXTENSIONS) + find_library(BZ2_RELEASE NAMES bz2 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(BZ2_DEBUG NAMES bz2d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(CRYPTO_RELEASE NAMES libcrypto PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(CRYPTO_DEBUG NAMES libcrypto PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(EXPAT_RELEASE NAMES libexpat libexpatMD libexpatMT PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(EXPAT_DEBUG NAMES libexpatd libexpatdMD libexpatdMT PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(FFI_RELEASE NAMES ffi PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(FFI_DEBUG NAMES ffi PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(LZMA_RELEASE NAMES lzma PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(LZMA_DEBUG NAMES lzma PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(SQLITE_RELEASE NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(SQLITE_DEBUG NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(SSL_RELEASE NAMES libssl PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(SSL_DEBUG NAMES libssl PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + list(APPEND add_libs_rel "${BZ2_RELEASE};${EXPAT_RELEASE};${FFI_RELEASE};${LZMA_RELEASE};${SQLITE_RELEASE}") + list(APPEND add_libs_dbg "${BZ2_DEBUG};${EXPAT_DEBUG};${FFI_DEBUG};${LZMA_DEBUG};${SQLITE_DEBUG}") + else() + message(STATUS "WARNING: Static builds of Python will not have C extension modules available.") + endif() + find_library(ZLIB_RELEASE NAMES zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(ZLIB_DEBUG NAMES zlib zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + list(APPEND add_libs_rel "${ZLIB_RELEASE}") + list(APPEND add_libs_dbg "${ZLIB_DEBUG}") + + configure_file("${SOURCE_PATH}/PC/pyconfig.h" "${SOURCE_PATH}/PC/pyconfig.h") + configure_file("${CMAKE_CURRENT_LIST_DIR}/python_vcpkg.props.in" "${SOURCE_PATH}/PCbuild/python_vcpkg.props") + configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.props.in" "${SOURCE_PATH}/PCbuild/openssl.props") + file(WRITE "${SOURCE_PATH}/PCbuild/libffi.props" + "" + "" + ) + + list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DVCPKG_SET_CHARSET_FLAG=OFF") + if(PYTHON_ALLOW_EXTENSIONS) + set(OPTIONS + "/p:IncludeExtensions=true" + "/p:IncludeExternals=true" + "/p:IncludeCTypes=true" + "/p:IncludeSSL=true" + "/p:IncludeTkinter=false" + "/p:IncludeTests=false" + "/p:ForceImportBeforeCppTargets=${SOURCE_PATH}/PCbuild/python_vcpkg.props" + ) + else() + set(OPTIONS + "/p:IncludeExtensions=false" + "/p:IncludeExternals=false" + "/p:IncludeTests=false" + "/p:ForceImportBeforeCppTargets=${SOURCE_PATH}/PCbuild/python_vcpkg.props" + ) + endif() + if(VCPKG_TARGET_IS_UWP) + list(APPEND OPTIONS "/p:IncludeUwp=true") + else() + list(APPEND OPTIONS "/p:IncludeUwp=false") + endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND OPTIONS "/p:_VcpkgPythonLinkage=DynamicLibrary") + else() + list(APPEND OPTIONS "/p:_VcpkgPythonLinkage=StaticLibrary") + endif() + + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) + set(ENV{PythonForBuild} "${PYTHON3_DIR}/python.exe") # PythonForBuild is what's used on windows, despite the readme + + if(VCPKG_CROSSCOMPILING) + vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}") + endif() + + vcpkg_msbuild_install( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "PCbuild/pcbuild.proj" + ADD_BIN_TO_PATH + OPTIONS ${OPTIONS} + ADDITIONAL_LIBS_RELEASE ${add_libs_rel} + ADDITIONAL_LIBS_DEBUG ${add_libs_dbg} + ) + + if(NOT VCPKG_CROSSCOMPILING) + file(GLOB_RECURSE freeze_module "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/PCbuild/**/_freeze_module.exe") + file(COPY "${freeze_module}" DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}") + endif() + + # The extension modules must be placed in the DLLs directory, so we can't use vcpkg_copy_tools() + if(PYTHON_ALLOW_EXTENSIONS) + file(GLOB_RECURSE PYTHON_EXTENSIONS_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.pyd") + file(COPY ${PYTHON_EXTENSIONS_RELEASE} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(COPY ${PYTHON_EXTENSIONS_RELEASE} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/DLLs") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/DLLs") + file(REMOVE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/DLLs/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll") + + file(GLOB_RECURSE PYTHON_EXTENSIONS_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.pyd") + file(COPY ${PYTHON_EXTENSIONS_DEBUG} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + endif() + + file(COPY "${SOURCE_PATH}/Include/" "${SOURCE_PATH}/PC/pyconfig.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" + FILES_MATCHING PATTERN *.h + ) + file(COPY "${SOURCE_PATH}/Lib" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + + # Remove any extension libraries and other unversioned binaries that could conflict with the python2 port. + # You don't need to link against these anyway. + file(GLOB PYTHON_LIBS + "${CURRENT_PACKAGES_DIR}/lib/*.lib" + "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib" + ) + list(FILTER PYTHON_LIBS EXCLUDE REGEX [[python[0-9]*(_d)?\.lib$]]) + file(GLOB PYTHON_INSTALLERS "${CURRENT_PACKAGES_DIR}/tools/${PORT}/wininst-*.exe") + file(REMOVE ${PYTHON_LIBS} ${PYTHON_INSTALLERS}) + + # pkg-config files + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + make_python_pkgconfig(FILE python.pc INSTALL_ROOT ${CURRENT_PACKAGES_DIR} + EXEC_PREFIX "\${prefix}/tools/${PORT}" INCLUDEDIR [[${prefix}/include]] ABIFLAGS "") + make_python_pkgconfig(FILE python-embed.pc INSTALL_ROOT ${CURRENT_PACKAGES_DIR} + EXEC_PREFIX "\${prefix}/tools/${PORT}" INCLUDEDIR [[${prefix}/include]] ABIFLAGS "") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + make_python_pkgconfig(FILE python.pc INSTALL_ROOT "${CURRENT_PACKAGES_DIR}/debug" + EXEC_PREFIX "\${prefix}/../tools/${PORT}" INCLUDEDIR [[${prefix}/../include]] ABIFLAGS "_d") + make_python_pkgconfig(FILE python-embed.pc INSTALL_ROOT "${CURRENT_PACKAGES_DIR}/debug" + EXEC_PREFIX "\${prefix}/../tools/${PORT}" INCLUDEDIR [[${prefix}/../include]] ABIFLAGS "_d") + endif() + + vcpkg_fixup_pkgconfig() + + # Remove static library belonging to executable + if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if (EXISTS "${CURRENT_PACKAGES_DIR}/lib/python.lib") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/manual-link") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/python.lib" + "${CURRENT_PACKAGES_DIR}/lib/manual-link/python.lib") + endif() + if (EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/python_d.lib") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/python_d.lib" + "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/python_d.lib") + endif() + endif() +else() + # The Python Stable ABI, `libpython3.so` is not produced by the upstream build system with --with-pydebug option + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND NOT VCPKG_BUILD_TYPE) + set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled) + endif() + + set(OPTIONS + "--with-openssl=${CURRENT_INSTALLED_DIR}" + "--without-ensurepip" + "--with-suffix=" + "--with-system-expat" + "--without-readline" + "--disable-test-modules" + ) + if(VCPKG_TARGET_IS_OSX) + list(APPEND OPTIONS "LIBS=-liconv -lintl") + endif() + + # The version of the build Python must match the version of the cross compiled host Python. + # https://docs.python.org/3/using/configure.html#cross-compiling-options + if(VCPKG_CROSSCOMPILING) + set(_python_for_build "${CURRENT_HOST_INSTALLED_DIR}/tools/python3/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") + list(APPEND OPTIONS "--with-build-python=${_python_for_build}") + endif() + + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + OPTIONS + ${OPTIONS} + OPTIONS_DEBUG + "--with-pydebug" + "vcpkg_rpath=${CURRENT_INSTALLED_DIR}/debug/lib" + OPTIONS_RELEASE + "vcpkg_rpath=${CURRENT_INSTALLED_DIR}/lib" + ) + vcpkg_install_make(ADD_BIN_TO_PATH INSTALL_TARGET altinstall) + + file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + + # Makefiles, c files, __pycache__, and other junk. + file(GLOB PYTHON_LIB_DIRS LIST_DIRECTORIES true + "${CURRENT_PACKAGES_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/*" + "${CURRENT_PACKAGES_DIR}/debug/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/*") + list(FILTER PYTHON_LIB_DIRS INCLUDE REGEX [[config-[0-9].*.*]]) + file(REMOVE_RECURSE ${PYTHON_LIB_DIRS}) + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}d") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man1") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug") + + vcpkg_fixup_pkgconfig() + + # Perform some post-build checks on modules + file(GLOB python_libs_dynload_debug LIST_DIRECTORIES false "${CURRENT_PACKAGES_DIR}/debug/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/lib-dynload/*.so*") + file(GLOB python_libs_dynload_release LIST_DIRECTORIES false "${CURRENT_PACKAGES_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/lib-dynload/*.so*") + set(python_libs_dynload_failed_debug ${python_libs_dynload_debug}) + set(python_libs_dynload_failed_release ${python_libs_dynload_release}) + list(FILTER python_libs_dynload_failed_debug INCLUDE REGEX ".*_failed\.so.*") + list(FILTER python_libs_dynload_failed_release INCLUDE REGEX ".*_failed\.so.*") + if(python_libs_dynload_failed_debug OR python_libs_dynload_failed_release) + list(JOIN python_libs_dynload_failed_debug "\n" python_libs_dynload_failed_debug_str) + list(JOIN python_libs_dynload_failed_release "\n" python_libs_dynload_failed_release_str) + 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}") + endif() + if(NOT VCPKG_BUILD_TYPE) + list(LENGTH python_libs_dynload_release python_libs_dynload_release_length) + list(LENGTH python_libs_dynload_debug python_libs_dynload_debug_length) + if(NOT python_libs_dynload_release_length STREQUAL python_libs_dynload_debug_length) + message(FATAL_ERROR "Mismatched number of modules: ${python_libs_dynload_debug_length} in debug, ${python_libs_dynload_release_length} in release") + endif() + endif() +endif() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") + +file(READ "${CMAKE_CURRENT_LIST_DIR}/usage" usage) +if(VCPKG_TARGET_IS_WINDOWS) + if(PYTHON_ALLOW_EXTENSIONS) + file(READ "${CMAKE_CURRENT_LIST_DIR}/usage.win" usage_extra) + else() + set(usage_extra "") + endif() +else() + file(READ "${CMAKE_CURRENT_LIST_DIR}/usage.unix" usage_extra) +endif() +string(REPLACE "@PYTHON_VERSION_MINOR@" "${PYTHON_VERSION_MINOR}" usage_extra "${usage_extra}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage}\n${usage_extra}") + +function(_generate_finder) + cmake_parse_arguments(PythonFinder "NO_OVERRIDE" "DIRECTORY;PREFIX" "" ${ARGN}) + configure_file( + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" + "${CURRENT_PACKAGES_DIR}/share/${PythonFinder_DIRECTORY}/vcpkg-cmake-wrapper.cmake" + @ONLY + ) +endfunction() + +message(STATUS "Installing cmake wrappers") +_generate_finder(DIRECTORY "python" PREFIX "Python") +_generate_finder(DIRECTORY "python3" PREFIX "Python3") +_generate_finder(DIRECTORY "pythoninterp" PREFIX "PYTHON" NO_OVERRIDE) + +if (NOT VCPKG_TARGET_IS_WINDOWS) + function(replace_dirs_in_config_file python_config_file) + vcpkg_replace_string("${python_config_file}" "${CURRENT_INSTALLED_DIR}" "' + _base + '") + vcpkg_replace_string("${python_config_file}" "${CURRENT_HOST_INSTALLED_DIR}" "' + _base + '/../${HOST_TRIPLET}") + vcpkg_replace_string("${python_config_file}" "${CURRENT_PACKAGES_DIR}" "' + _base + '") + vcpkg_replace_string("${python_config_file}" "${CURRENT_BUILDTREES_DIR}" "not/existing") + endfunction() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB python_config_files "${CURRENT_PACKAGES_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/_sysconfigdata*") + list(POP_FRONT python_config_files python_config_file) + 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") + replace_dirs_in_config_file("${python_config_file}") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB python_config_files "${CURRENT_PACKAGES_DIR}/debug/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/_sysconfigdata*") + list(POP_FRONT python_config_files python_config_file) + 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") + replace_dirs_in_config_file("${python_config_file}") + endif() +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/python3/Lib/distutils/command/build_ext.py" "'libs'" "'../../lib'") +else() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/python3.${PYTHON_VERSION_MINOR}/distutils/command/build_ext.py" "'libs'" "'../../lib'") + file(COPY_FILE "${CURRENT_PACKAGES_DIR}/tools/python3/python3.${PYTHON_VERSION_MINOR}" "${CURRENT_PACKAGES_DIR}/tools/python3/python3") +endif() + +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" "${CURRENT_PACKAGES_DIR}/share/python3/vcpkg-port-config.cmake" @ONLY) \ No newline at end of file diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/python_vcpkg.props.in b/cc-multilingual-main/cc_net/vcpkg/ports/python3/python_vcpkg.props.in new file mode 100644 index 0000000000000000000000000000000000000000..a64a17d0172ec2d8917506177a6ec041bf724698 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/python_vcpkg.props.in @@ -0,0 +1,52 @@ + + + + + + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) + XML_STATIC;%(PreprocessorDefinitions) + + %(AdditionalIncludeDirectories);${CURRENT_INSTALLED_DIR}/include + + + + + + ${ZLIB_RELEASE};%(AdditionalDependencies) + + + ${ZLIB_DEBUG};%(AdditionalDependencies) + + + + + ${BZ2_RELEASE};${EXPAT_RELEASE};${FFI_RELEASE};${LZMA_RELEASE};${SQLITE_RELEASE};%(AdditionalDependencies) + + + ${BZ2_DEBUG};${EXPAT_DEBUG};${FFI_DEBUG};${LZMA_DEBUG};${SQLITE_DEBUG};%(AdditionalDependencies) + + + + + + MachineX86 + MachineX64 + MachineARM + + + ${ZLIB_RELEASE};%(AdditionalDependencies) + + + ${ZLIB_DEBUG};%(AdditionalDependencies) + + + + + ${BZ2_RELEASE};${EXPAT_RELEASE};${FFI_RELEASE};${LZMA_RELEASE};${SQLITE_RELEASE};%(AdditionalDependencies) + + + ${BZ2_DEBUG};${EXPAT_DEBUG};${FFI_DEBUG};${LZMA_DEBUG};${SQLITE_DEBUG};%(AdditionalDependencies) + + + + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/usage b/cc-multilingual-main/cc_net/vcpkg/ports/python3/usage new file mode 100644 index 0000000000000000000000000000000000000000..e177b11f63bd7da5a44e87885b5907d981046419 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/usage @@ -0,0 +1,4 @@ +The package python3 is compatible with built-in CMake targets: + + find_package(Python3 COMPONENTS Development REQUIRED) + target_link_libraries(main PRIVATE Python3::Python) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.unix b/cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.unix new file mode 100644 index 0000000000000000000000000000000000000000..fc2a575ebf968d650c2228c0c7e9639f24e86cbb --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.unix @@ -0,0 +1,9 @@ +The package python3 provides a python interpreter that supports virtual environments: + + $ tools/python3/python3.@PYTHON_VERSION_MINOR@ -m venv /path/to/venv + $ export VIRTUAL_ENV=/path/to/venv + $ export PATH=/path/to/venv/bin:$PATH + $ export -n PYTHONHOME + $ unset PYTHONHOME + + See https://docs.python.org/3/library/venv.html for more details. diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.win b/cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.win new file mode 100644 index 0000000000000000000000000000000000000000..dcbb71747dcb9ce24c1515f65396eae65b045f99 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/usage.win @@ -0,0 +1,8 @@ +The package python3 provides a python interpreter that supports virtual environments: + + >tools\python3\python.exe -m venv c:\path\to\venv + >set VIRTUAL_ENV=c:\path\to\venv + >set PATH=c:\path\to\venv\bin;%PATH% + >set PYTHONHOME= + + See https://docs.python.org/3/library/venv.html for more details. diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-cmake-wrapper.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000000000000000000000000000000000000..9acd72e18947aab5f27c11d3f090863cf3e99411 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,126 @@ +# For very old ports whose upstream do not properly set the minimum CMake version. +cmake_policy(SET CMP0012 NEW) +cmake_policy(SET CMP0057 NEW) + +# This prevents the port's python.exe from overriding the Python fetched by +# vcpkg_find_acquire_program(PYTHON3) and prevents the vcpkg toolchain from +# stomping on FindPython's default functionality. +list(REMOVE_ITEM CMAKE_PROGRAM_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/python3") +if(@PythonFinder_NO_OVERRIDE@) + _find_package(${ARGS}) + return() +endif() + +# CMake's FindPython's separation of concerns is very muddy. We only want to force vcpkg's Python +# if the consumer is using the development component. What we don't want to do is break detection +# of the system Python, which may have certain packages the user expects. But - if the user is +# embedding Python or using both the development and interpreter components, then we need the +# interpreter matching vcpkg's Python libraries. Note that the "Development" component implies +# both "Development.Module" and "Development.Embed" +if("Development" IN_LIST ARGS OR "Development.Embed" IN_LIST ARGS) + set(_PythonFinder_WantInterp TRUE) + set(_PythonFinder_WantLibs TRUE) +elseif("Development.Module" IN_LIST ARGS) + if("Interpreter" IN_LIST ARGS) + set(_PythonFinder_WantInterp TRUE) + endif() + set(_PythonFinder_WantLibs TRUE) +endif() + +if(_PythonFinder_WantLibs) + find_path( + _@PythonFinder_PREFIX@_INCLUDE_DIR + NAMES "Python.h" + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" + PATH_SUFFIXES "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@" + NO_DEFAULT_PATH + ) + + # Don't set the public facing hint or the finder will be unable to detect the debug library. + # Internally, it uses the same value with an underscore prepended. + find_library( + _@PythonFinder_PREFIX@_LIBRARY_RELEASE + NAMES + "python@PYTHON_VERSION_MAJOR@@PYTHON_VERSION_MINOR@" + "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@" + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" + NO_DEFAULT_PATH + ) + find_library( + _@PythonFinder_PREFIX@_LIBRARY_DEBUG + NAMES + "python@PYTHON_VERSION_MAJOR@@PYTHON_VERSION_MINOR@_d" + "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@d" + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" + NO_DEFAULT_PATH + ) + + if(_PythonFinder_WantInterp) + find_program( + @PythonFinder_PREFIX@_EXECUTABLE + NAMES "python" "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@" + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/python3" + NO_DEFAULT_PATH + ) + endif() + + _find_package(${ARGS}) + + if(@VCPKG_LIBRARY_LINKAGE@ STREQUAL static) + include(CMakeFindDependencyMacro) + + # Python for Windows embeds the zlib module into the core, so we have to link against it. + # This is a separate extension module on Unix-like platforms. + if(WIN32) + find_dependency(ZLIB) + if(TARGET @PythonFinder_PREFIX@::Python) + set_property(TARGET @PythonFinder_PREFIX@::Python APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) + endif() + if(TARGET @PythonFinder_PREFIX@::Module) + set_property(TARGET @PythonFinder_PREFIX@::Module APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) + endif() + if(DEFINED @PythonFinder_PREFIX@_LIBRARIES) + list(APPEND @PythonFinder_PREFIX@_LIBRARIES ${ZLIB_LIBRARIES}) + endif() + endif() + + if(APPLE) + find_dependency(Iconv) + find_dependency(Intl) + if(TARGET @PythonFinder_PREFIX@::Python) + get_target_property(_PYTHON_INTERFACE_LIBS @PythonFinder_PREFIX@::Python INTERFACE_LINK_LIBRARIES) + if(NOT _PYTHON_INTERFACE_LIBS) + set(_PYTHON_INTERFACE_LIBS "") + endif() + list(REMOVE_ITEM _PYTHON_INTERFACE_LIBS "-liconv" "-lintl") + list(APPEND _PYTHON_INTERFACE_LIBS + Iconv::Iconv + "$,${Intl_LIBRARY_DEBUG},${Intl_LIBRARY_RELEASE}>" + ) + set_property(TARGET @PythonFinder_PREFIX@::Python PROPERTY INTERFACE_LINK_LIBRARIES ${_PYTHON_INTERFACE_LIBS}) + unset(_PYTHON_INTERFACE_LIBS) + endif() + if(TARGET @PythonFinder_PREFIX@::Module) + get_target_property(_PYTHON_INTERFACE_LIBS @PythonFinder_PREFIX@::Module INTERFACE_LINK_LIBRARIES) + if(NOT _PYTHON_INTERFACE_LIBS) + set(_PYTHON_INTERFACE_LIBS "") + endif() + list(REMOVE_ITEM _PYTHON_INTERFACE_LIBS "-liconv" "-lintl") + list(APPEND _PYTHON_INTERFACE_LIBS + Iconv::Iconv + "$,${Intl_LIBRARY_DEBUG},${Intl_LIBRARY_RELEASE}>" + ) + set_property(TARGET @PythonFinder_PREFIX@::Module PROPERTY INTERFACE_LINK_LIBRARIES ${_PYTHON_INTERFACE_LIBS}) + unset(_PYTHON_INTERFACE_LIBS) + endif() + if(DEFINED @PythonFinder_PREFIX@_LIBRARIES) + list(APPEND @PythonFinder_PREFIX@_LIBRARIES "-framework CoreFoundation" ${Iconv_LIBRARIES} ${Intl_LIBRARIES}) + endif() + endif() + endif() +else() + _find_package(${ARGS}) +endif() + +unset(_PythonFinder_WantInterp) +unset(_PythonFinder_WantLibs) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-port-config.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-port-config.cmake new file mode 100644 index 0000000000000000000000000000000000000000..b3eab36d623eb3a76600a02d06b96c4d0dd1060b --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg-port-config.cmake @@ -0,0 +1,12 @@ +set(PYTHON3_VERSION "@VERSION@") +set(PYTHON3_VERSION_MAJOR "@PYTHON_VERSION_MAJOR@") +set(PYTHON3_VERSION_MINOR "@PYTHON_VERSION_MINOR@") +set(PYTHON3_INCLUDE "include/python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR}") +set(site_base "") +if(VCPKG_TARGET_IS_WINDOWS) + set(site_base "tools/python${PYTHON3_VERSION_MAJOR}/Lib") +else() + set(site_base "lib/python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR}") +endif() +set(PYTHON3_SITE "${site_base}/site-packages") + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..d1be50b739bcb89d9507d7383a46823153c05d97 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/python3/vcpkg.json @@ -0,0 +1,59 @@ +{ + "name": "python3", + "version": "3.11.8", + "port-version": 1, + "description": "The Python programming language", + "homepage": "https://github.com/python/cpython", + "license": "Python-2.0", + "supports": "!uwp & !mingw", + "dependencies": [ + { + "name": "bzip2", + "platform": "!(windows & static)" + }, + "expat", + { + "name": "gettext", + "platform": "osx" + }, + { + "name": "libffi", + "platform": "!(windows & static)" + }, + { + "name": "libiconv", + "platform": "osx" + }, + { + "name": "liblzma", + "platform": "!(windows & static)" + }, + { + "name": "libuuid", + "platform": "!osx & !windows" + }, + { + "name": "openssl", + "platform": "!(windows & static)" + }, + { + "name": "python3", + "host": true + }, + { + "name": "sqlite3", + "platform": "!(windows & static)" + }, + { + "name": "vcpkg-msbuild", + "host": true, + "platform": "windows" + }, + "zlib" + ], + "features": { + "deprecated-win7-support": { + "description": "Deprecated support for the Windows 7 platform -- may be removed at any time." + } + } +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/qt5-doc/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/qt5-doc/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4f6e6848e0185456e69fbafd98fb59ebd8c65527 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/qt5-doc/portfile.cmake @@ -0,0 +1,7 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +if(VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + message(STATUS "${PORT} will not build any artifacts on Windows!") +endif() +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/qt5-doc/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/qt5-doc/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..cad232450990dd4438b7e011f9bd938fafbefedf --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/qt5-doc/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "qt5-doc", + "version": "5.15.13", + "port-version": 1, + "description": "The Qt documentation.", + "license": null, + "supports": "linux", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-quickcontrols2", + "qt5-tools" + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/rtmidi/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/rtmidi/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..f242870f46ccce057814e81aaa63c55a5f897c07 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/rtmidi/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "rtmidi", + "version": "5.0.0", + "port-version": 3, + "description": "A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia)", + "homepage": "https://github.com/thestk/rtmidi", + "license": "MIT", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "alsa": { + "description": "Build ALSA API", + "supports": "linux", + "dependencies": [ + "alsa" + ] + } + } +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/skcrypter/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/skcrypter/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..3faa896af7abeeb4df18665f0b3e5a73b19b0374 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/skcrypter/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skadro-official/skCrypter + REF 7970de8acc01af5ecef044374c26ecb33b7cd069 + SHA512 f0ef3c6673523d5b86bc9b5859ae77fb4d182238b67ce4f07da1068f23ee7915e028ed837b8c6b2dd5421ae5a7c043e0d486d18c4b5404ebee50bd8cef4ba4bb + HEAD_REF master +) + +file(COPY "${SOURCE_PATH}/files/skCrypter.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") + +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) \ No newline at end of file diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/skcrypter/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/skcrypter/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..6d3b3083b926ceb85a14cd789accd5af3bc3eaad --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/skcrypter/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "skcrypter", + "version-date": "2021-12-03", + "description": "Compile-time, Usermode + Kernelmode, safe and lightweight string crypter library for C++11", + "homepage": "https://github.com/skadro-official/skCrypter" +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/solid3/disable-examples.patch b/cc-multilingual-main/cc_net/vcpkg/ports/solid3/disable-examples.patch new file mode 100644 index 0000000000000000000000000000000000000000..5af3b26457d7158ae3dfc55827d68e35157cf34c --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/solid3/disable-examples.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0303a8f..be43838 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,7 +97,7 @@ if(UNIX) + endif(UNIX) + + add_subdirectory(src) +-add_subdirectory(examples) ++#add_subdirectory(examples) + #add_subdirectory(doc) + + include(CMakePackageConfigHelpers) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/solid3/no-sse.patch b/cc-multilingual-main/cc_net/vcpkg/ports/solid3/no-sse.patch new file mode 100644 index 0000000000000000000000000000000000000000..ed2cb1ddbb9ae19e8da78d7665a346835cf4a5d3 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/solid3/no-sse.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be43838..fe71394 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -87,8 +87,12 @@ if(MSVC) + endif(MSVC) + + if(UNIX) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -ffast-math -msse2 -mfpmath=sse") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -Wall -ffast-math -msse2 -mfpmath=sse") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -ffast-math") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -Wall -ffast-math") ++ if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse") ++ endif() + if (DYNAMIC_SOLID) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/solid3/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/solid3/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..3a45bbb14b1f82a17b3473be0acc54db898341bd --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/solid3/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "solid3", + "version": "3.5.8", + "port-version": 2, + "description": "Software Library for Interference Detection", + "license": "GPL-2.0-only OR QPL-1.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/debug-postfix.patch b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/debug-postfix.patch new file mode 100644 index 0000000000000000000000000000000000000000..2c882f09aa46fc19ca129116a16a9f98c889c1f7 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/debug-postfix.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 979ae25..4eb88a1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -210,7 +210,9 @@ if(WIN32 AND MSVC) + set( MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS" ) + + # to distinguish between debug and release lib in windows ++ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + set( CMAKE_DEBUG_POSTFIX "d" ) # little effect in unix ++ endif() + else() + # add any gcc flags + endif() +diff --git a/tidy.pc.cmake.in b/tidy.pc.cmake.in +index 7d819f1..cbdd299 100644 +--- a/tidy.pc.cmake.in ++++ b/tidy.pc.cmake.in +@@ -7,5 +7,5 @@ Name: @LIB_NAME@ + Description: @LIBTIDY_DESCRIPTION@ + URL: @LIBTIDY_URL@ + Version: @LIBTIDY_VERSION@ +-Libs: -L${libdir} -l@LIB_NAME@ ++Libs: -L${libdir} -l@LIB_NAME@@CMAKE_DEBUG_POSTFIX@ + Cflags: -I${includedir} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/disable-doc.patch b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/disable-doc.patch new file mode 100644 index 0000000000000000000000000000000000000000..105c766853075c7dbcb5d8ca164f5f6bcdb6c4fa --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/disable-doc.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8efec25..d2edac2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -508,7 +508,7 @@ endif () + # Create man pages + ################################################# + +-if (UNIX AND SUPPORT_CONSOLE_APP) ++if (0) + find_program( XSLTPROC_FOUND xsltproc ) + if (XSLTPROC_FOUND) + ## NOTE: man name must match exe ie currently `${LIB_NAME}.1` not `tidy.1` diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/fix_unsupport_func_uwp.patch b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/fix_unsupport_func_uwp.patch new file mode 100644 index 0000000000000000000000000000000000000000..7da38b6f7dd35266b3893f06cf72330367f87f92 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/fix_unsupport_func_uwp.patch @@ -0,0 +1,13 @@ +diff --git a/src/sprtf.c b/src/sprtf.c +index 3468ac1..1630405 100644 +--- a/src/sprtf.c ++++ b/src/sprtf.c +@@ -387,7 +387,7 @@ static void wprt( PTSTR ps ) + { + static char _s_woibuf[1024]; + char * cp = _s_woibuf; +- int len = (int)lstrlen(ps); ++ int len = (int)wcslen(ps); + if(len) { + int ret = WideCharToMultiByte( CP_ACP, /* UINT CodePage, // code page */ + 0, /* DWORD dwFlags, // performance and mapping flags */ diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..298bec58341df8f13948f075e0ade198bf9a55da --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO htacg/tidy-html5 + REF 5.8.0 + SHA512 f352165bdda5d1fca7bba3365560b64d6f70a4e010821cd246cde43bed5c23cea3408d461d3f889110fd35ec9b68aa2b4e95412b07775eb852b7ee1745007a44 + HEAD_REF master + PATCHES + disable-doc.patch + static-vs-shared.patch + debug-postfix.patch + fix_unsupport_func_uwp.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIB) +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + NO_CHARSET_FLAG + OPTIONS + -DBUILD_SHARED_LIB=${BUILD_SHARED_LIB} + -DTIDY_CONSOLE_SHARED=${BUILD_SHARED_LIB} +) +vcpkg_cmake_install() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/bin/tidyd${VCPKG_TARGET_EXECUTABLE_SUFFIX}" +) + +vcpkg_copy_tools(TOOL_NAMES tidy AUTO_CLEAN) + +file(INSTALL "${SOURCE_PATH}/README/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/static-vs-shared.patch b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/static-vs-shared.patch new file mode 100644 index 0000000000000000000000000000000000000000..92b6c8e92133d41906911ee653dbf0a8d591ca0a --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/static-vs-shared.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d2edac2..979ae25 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -395,11 +395,11 @@ endif () + + #------------------------------------------------------------------------ + # Static Library +-# The static library always builds. ++if(NOT BUILD_SHARED_LIB) + #------------------------------------------------------------------------ + set(name tidy-static) + add_library ( ${name} STATIC ${CFILES} ${HFILES} ${LIBHFILES} ) +-if (WIN32) ++if (0) + set_target_properties( ${name} PROPERTIES + OUTPUT_NAME ${LIB_NAME}_static ) + else () +@@ -415,12 +415,14 @@ install(TARGETS ${name} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ) +-install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} ) + if(MSVC) + # install(FILES $ DESTINATION lib OPTIONAL) + INSTALL(FILES ${PROJECT_BINARY_DIR}/${name}.dir/Debug/${name}.pdb ++ OPTIONAL + DESTINATION lib CONFIGURATIONS Debug ) + endif() ++endif() ++install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} ) + + #------------------------------------------------------------------------ + # Dynamic Library diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..203fd8c77a42faa935ddfa3dac8a7673c88e4884 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tidy-html5/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "tidy-html5", + "version": "5.8.0", + "port-version": 1, + "description": "Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools.", + "homepage": "https://www.html-tidy.org", + "license": null, + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/wangle/fix-config-cmake.patch b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/fix-config-cmake.patch new file mode 100644 index 0000000000000000000000000000000000000000..1d5949ceada07e2377da30069485eb006da883ee --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/fix-config-cmake.patch @@ -0,0 +1,22 @@ +diff --git a/wangle/cmake/wangle-config.cmake.in b/wangle/cmake/wangle-config.cmake.in +index e50af54..e0fd0dc 100644 +--- a/wangle/cmake/wangle-config.cmake.in ++++ b/wangle/cmake/wangle-config.cmake.in +@@ -12,7 +12,16 @@ + @PACKAGE_INIT@ + + set_and_check(WANGLE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +-set_and_check(WANGLE_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@") ++set_and_check(WANGLE_CMAKE_DIR "${PACKAGE_PREFIX_DIR}/share/wangle") ++ ++include(CMakeFindDependencyMacro) ++find_dependency(folly REQUIRED) ++find_dependency(fizz REQUIRED) ++find_dependency(glog REQUIRED) ++find_dependency(Threads REQUIRED) ++find_dependency(Libevent REQUIRED) ++find_dependency(OpenSSL REQUIRED) ++find_dependency(double-conversion REQUIRED) + + if (NOT TARGET wangle::wangle) + include("${WANGLE_CMAKE_DIR}/wangle-targets.cmake") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/wangle/fix_dependency.patch b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/fix_dependency.patch new file mode 100644 index 0000000000000000000000000000000000000000..f44d39fabc9d72baa6be02ff2fd807c9400ceedd --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/fix_dependency.patch @@ -0,0 +1,79 @@ +diff --git a/wangle/CMakeLists.txt b/wangle/CMakeLists.txt +index 85ae066..766d3d3 100644 +--- a/wangle/CMakeLists.txt ++++ b/wangle/CMakeLists.txt +@@ -64,18 +64,23 @@ set(CMAKE_INSTALL_DIR lib/cmake/wangle CACHE STRING + find_package(folly CONFIG REQUIRED) + + find_package(fizz CONFIG REQUIRED) +-find_package(fmt CONFIG REQUIRED) + find_package(OpenSSL REQUIRED) +-find_package(Glog REQUIRED) +-find_package(gflags CONFIG QUIET) ++find_package(glog CONFIG REQUIRED) ++find_package(gflags CONFIG REQUIRED) ++find_package(Boost REQUIRED ++ COMPONENTS ++ filesystem ++ thread ++) ++ + if (gflags_FOUND) + message(STATUS "Found gflags from package config") + message(STATUS "gflags_CONFIG=${gflags_CONFIG}") + else() + find_package(Gflags REQUIRED) + endif() +-find_package(LibEvent MODULE REQUIRED) +-find_package(DoubleConversion REQUIRED) ++find_package(Libevent CONFIG REQUIRED) ++find_package(double-conversion CONFIG REQUIRED) + find_package(Threads REQUIRED) + if (UNIX AND NOT APPLE) + find_package(Librt) +@@ -166,6 +171,14 @@ target_include_directories( + ${LIBEVENT_INCLUDE_DIR} + ${DOUBLE_CONVERSION_INCLUDE_DIR} + ) ++set(Boost_LIBRARIES Boost::boost Boost::filesystem Boost::thread ) ++set(FOLLY_LIBRARIES Folly::folly) ++set(FIZZ_LIBRARIES fizz::fizz) ++set(GLOG_LIBRARIES glog::glog) ++set(GFLAGS_LIBRARIES gflags::gflags) ++set(LIBEVENT_LIB libevent::core libevent::extra) ++set(DOUBLE_CONVERSION_LIBRARIES double-conversion::double-conversion) ++ + target_link_libraries(wangle PUBLIC + ${FOLLY_LIBRARIES} + ${FIZZ_LIBRARIES} +diff --git a/wangle/cmake/wangle-config.cmake.in b/wangle/cmake/wangle-config.cmake.in +index e0fd0dc..5f6cf14 100644 +--- a/wangle/cmake/wangle-config.cmake.in ++++ b/wangle/cmake/wangle-config.cmake.in +@@ -15,13 +15,19 @@ set_and_check(WANGLE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") + set_and_check(WANGLE_CMAKE_DIR "${PACKAGE_PREFIX_DIR}/share/wangle") + + include(CMakeFindDependencyMacro) +-find_dependency(folly REQUIRED) +-find_dependency(fizz REQUIRED) +-find_dependency(glog REQUIRED) +-find_dependency(Threads REQUIRED) +-find_dependency(Libevent REQUIRED) +-find_dependency(OpenSSL REQUIRED) +-find_dependency(double-conversion REQUIRED) ++find_dependency(folly CONFIG) ++find_dependency(fizz CONFIG) ++find_dependency(gflags CONFIG) ++find_dependency(glog CONFIG) ++find_dependency(Threads) ++find_dependency(Libevent CONFIG) ++find_dependency(OpenSSL) ++find_dependency(double-conversion CONFIG) ++find_dependency(Boost ++ COMPONENTS ++ filesystem ++ thread ++) + + if (NOT TARGET wangle::wangle) + include("${WANGLE_CMAKE_DIR}/wangle-targets.cmake") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/wangle/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..392875a40db1f76f2a91f5a0e8fec61cb8312d95 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/wangle + REF "v${VERSION}" + SHA512 a3c671b19cb4f4875fa894b3374a4c24e6d4715fbb025c21434d7ca89f10f0affb8c25f392acc15793b4a92b48998d95c51b5120457e1b47ea15890221d0dd6c + HEAD_REF master + PATCHES + fix-config-cmake.patch + fix_dependency.patch +) + +file(REMOVE + "${SOURCE_PATH}/wangle/cmake/FindDoubleConversion.cmake" + "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGflags.cmake" + "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGlog.cmake" + "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGMock.cmake" + "${SOURCE_PATH}/build/fbcode_builder/CMake/FindLibEvent.cmake" + "${SOURCE_PATH}/build/fbcode_builder/CMake/FindSodium.cmake" + "${SOURCE_PATH}/build/fbcode_builder/CMake/FindZstd.cmake" +) + + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/wangle" + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DINCLUDE_INSTALL_DIR:STRING=include +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/wangle) + +file(READ "${CURRENT_PACKAGES_DIR}/share/wangle/wangle-targets.cmake" _contents) +STRING(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/\$<\$:debug/>lib/" _contents "${_contents}") +STRING(REPLACE "\${_IMPORT_PREFIX}/debug/lib/" "\${_IMPORT_PREFIX}/\$<\$:debug/>lib/" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/wangle/wangle-targets.cmake" "${_contents}") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/include/wangle/util/test" + "${CURRENT_PACKAGES_DIR}/include/wangle/ssl/test/certs" + "${CURRENT_PACKAGES_DIR}/include/wangle/service/test" + "${CURRENT_PACKAGES_DIR}/include/wangle/deprecated/rx/test" +) + +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/wangle/usage b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/usage new file mode 100644 index 0000000000000000000000000000000000000000..50903e726c131c39c9a79f9c5bc0666bd849f9aa --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/usage @@ -0,0 +1,4 @@ +The package wangle is compatible with built-in CMake targets: + + find_package(wangle REQUIRED) + target_link_libraries(main PRIVATE wangle::wangle) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/wangle/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..1ba4a67e15990395d73aff17c463b1654787f34b --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/wangle/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "wangle", + "version-string": "2024.01.01.00", + "description": "Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.", + "homepage": "https://github.com/facebook/wangle", + "license": "Apache-2.0", + "dependencies": [ + "boost-context", + "boost-filesystem", + "boost-regex", + "boost-system", + "boost-thread", + "double-conversion", + "fizz", + "folly", + "gflags", + "glog", + "libevent", + "openssl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/change_to_mt.ps1 b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/change_to_mt.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..91306095423bd0c395ae5a8bc91c4d569186b981 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/change_to_mt.ps1 @@ -0,0 +1,53 @@ + +$projFilePath = $args[0] +$crtLinkage = $args[1] + +if($projFilePath) +{ + $xpath = "/rs:Project/rs:ItemGroup/rs:ProjectConfiguration" + $xmldoc = New-Object System.Xml.XmlDocument + $xmldoc.load($projFilePath) + $nsmgr = New-Object System.Xml.XmlNamespaceManager($xmldoc.NameTable); + $nsmgr.AddNamespace("rs", "http://schemas.microsoft.com/developer/msbuild/2003"); + $root = $xmldoc.DocumentElement + + foreach($conf in $root.ItemDefinitionGroup) + { + if($conf.Condition) + { + if(-Not ($conf.ClCompile.RuntimeLibrary)) + { + $rtl = $xmldoc.CreateElement("RuntimeLibrary", $conf.ClCompile.NamespaceURI) + $conf.ClCompile.AppendChild($rtl) + } + + if($conf.Condition.Contains("Debug")) + { + if($crtLinkage -eq "static") + { + $conf.ClCompile.RuntimeLibrary = "MultithreadedDebug" + } + else + { + $conf.ClCompile.RuntimeLibrary = "MultithreadedDebugDLL" + } + } + else + { + if($crtLinkage -eq "static") + { + $conf.ClCompile.RuntimeLibrary = "Multithreaded" + } + else + { + $conf.ClCompile.RuntimeLibrary = "MultithreadedDLL" + } + } + } + } + $xmldoc.save($projFilePath) +} +else +{ + Write-Error "Error: No path defined!" +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/fix-missing-functional.patch b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/fix-missing-functional.patch new file mode 100644 index 0000000000000000000000000000000000000000..1125a3f388834a97624f688a56b1ad470d5d489d --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/fix-missing-functional.patch @@ -0,0 +1,12 @@ +diff --git a/cpp/include/IceUtil/Timer.h b/cpp/include/IceUtil/Timer.h +index 177a7f8..19b8c09 100644 +--- a/cpp/include/IceUtil/Timer.h ++++ b/cpp/include/IceUtil/Timer.h +@@ -12,6 +12,7 @@ + + #include + #include ++#include + + namespace IceUtil + { diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/mcppd_fix.patch b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/mcppd_fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..3502af871912479ebe7defb7b0d7f420bc2cd98a --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/mcppd_fix.patch @@ -0,0 +1,24 @@ +--- a/config/Make.project.rules 2022-01-17 10:28:23.000000000 ++++ b/config/Make.project.rules 2022-04-18 12:15:19.000000000 +@@ -1050,17 +1050,17 @@ + # + # $(call make-lib,$1=libname) + # + define make-lib + ifneq ($($1_home),) + # Check for 3rd party libraries either in home/lib or home/lib +-$1_installdir = $$($1_home)/lib$$(call platform-var,installdir,$1,$$($$2_platform),$$($$2_config),$$2) +-$1_libdir ?= $$(strip $$(if $$(wildcard $$($1_installdir)),$$($1_installdir),$$($1_home)/lib)) +-$1_includedir ?= $$($1_home)/include ++$1_installdir = ++$1_libdir ?= ++$1_includedir ?= + endif +-$1_ldflags ?= -l$1 ++$1_ldflags ?= -l$$(if $$(and $$(filter mcpp,$1),$$(filter no,$$(OPTIMIZE))),$1d,$1) + endef + + # + # $(call repathfromdir,path) + # + # Returns reversed relative path for directory (e.g.: test/Ice/operations diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/no-werror.patch b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/no-werror.patch new file mode 100644 index 0000000000000000000000000000000000000000..655d0bddb92016e2f22d3f0a576db5131787fcf4 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/no-werror.patch @@ -0,0 +1,13 @@ +diff --git a/config/Make.rules.Darwin b/config/Make.rules.Darwin +index e978836..2276b5d 100644 +--- a/config/Make.rules.Darwin ++++ b/config/Make.rules.Darwin +@@ -35,7 +35,7 @@ endif + shared_cppflags = $(if $(filter-out program,$($1_target)),-fPIC) -fvisibility=hidden + + cppflags = -Wall -Wextra -Wshadow -Wshadow-all -Wredundant-decls -Wno-shadow-field \ +- -Wdeprecated -Wstrict-prototypes -Werror -Wconversion -Wdocumentation -pthread \ ++ -Wdeprecated -Wstrict-prototypes -Wconversion -Wdocumentation -pthread \ + $(if $(filter yes,$(OPTIMIZE)),-O2 -DNDEBUG,-g) + + ifeq ($(MAXWARN),yes) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..13f4955a750967aaff00edbd3d9a5ae6fff4b33a --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/portfile.cmake @@ -0,0 +1,319 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeroc-ice/ice + REF "v${VERSION}" + SHA512 07d7c439fbe1f69d808d05a11f32e09cdd8d4df2a93b6f253496304e0a521d417212ae688e316b4450dae406b59d1a460025b51ecd0614c69e48d86c0a6f81c5 + PATCHES + mcppd_fix.patch + no-werror.patch + fix-missing-functional.patch +) + +set(RELEASE_TRIPLET ${TARGET_TRIPLET}-rel) +set(DEBUG_TRIPLET ${TARGET_TRIPLET}-dbg) + +set(UNIX_BUILD_DIR "${SOURCE_PATH}") +set(WIN_DEBUG_BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}") +set(WIN_RELEASE_BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}") + +# install_includes +function(install_includes ORIGINAL_PATH RELATIVE_PATHS) + foreach(RELATIVE_PATH ${RELATIVE_PATHS}) + file(GLOB HEADER_FILES ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.h) + if(EXISTS "${ORIGINAL_PATH}/${RELATIVE_PATH}") + file(COPY ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/${RELATIVE_PATH}") + endif() + endforeach() +endfunction() + +# install_slices +function(install_slices ORIGINAL_PATH RELATIVE_PATHS) + foreach(RELATIVE_PATH ${RELATIVE_PATHS}) + file(GLOB HEADER_FILES ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.ice) + if(EXISTS ${ORIGINAL_PATH}/${RELATIVE_PATH}) + file(COPY ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/share/ice/slice/${RELATIVE_PATH}") + endif() + endforeach() +endfunction() + +vcpkg_list(SET ICE_INCLUDE_SUB_DIRECTORIES + "Glacier2" + "Ice" + "IceUtil" + "IceBT" + "IceBox" + "IceBT" + "IceDiscovery" + "IceGrid" + "IceIAP" + "IceLocatorDiscovery" + "IcePatch2" + "IceSSL" + "IceStorm" +) + +set(ICE_OPTIONAL_COMPONENTS_MSBUILD "") +set(ICE_OPTIONAL_COMPONENTS_MAKE "Ice") # Intentional! +set(pkgconfig_packages "") + +# IceSSL +if("icessl" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++11\\icessl++11") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "IceSSL") +endif() + +# Glacier2 +if("glacier2lib" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++11\\glacier2++11") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "Glacier2") +endif() + +# Glacier2Router +if("glacier2router" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\glacier2router") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\glacier2cryptpermissionsverifier") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "glacier2router") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "Glacier2CryptPermissionsVerifier") +endif() + +# IceBox +if("iceboxlib" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++11\\iceboxlib++11") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "IceBox") +endif() + +# IceBox +if("iceboxtools" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++11\\icebox++11") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\iceboxadmin") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "icebox") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "iceboxadmin") +endif() + +# IceGrid +if("icegridlib" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++11\\icegrid++11") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "IceGrid") +endif() + +# IceGrid tools +if("icegridtools" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\icegridadmin") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\icegridregistry") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\icegridnode") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "icegridnode") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "icegridregistry") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "icegridnode") + list(APPEND pkgconfig_packages expat) +endif() + +# IceStorm +if("icestormlib" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++11\\icestorm++11") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "IceStorm") +endif() + +# IceStormAdmin +if("icestormtools" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\icestormadmin") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\icestormservice") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\icestormdb") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "icestormadmin") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "IceStormService") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "icestormdb") +endif() + +# IceBridge executable +if("icebridge" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++98\\icebridge") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "icebridge") +endif() + +# IceDiscovery +if("icediscovery" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++11\\icediscovery++11") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "IceDiscovery") +endif() + +# IceLocatorDiscovery +if("icelocatordiscovery" IN_LIST FEATURES) + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MSBUILD "/t:C++11\\icelocatordiscovery++11") + vcpkg_list(APPEND ICE_OPTIONAL_COMPONENTS_MAKE "IceLocatorDiscovery") +endif() + +if(NOT VCPKG_TARGET_IS_WINDOWS) + # Clean up for the first round (important for install --editable) + vcpkg_execute_build_process( + COMMAND make distclean + WORKING_DIRECTORY ${SOURCE_PATH}/cpp + LOGNAME make-clean-${TARGET_TRIPLET} + ) + + if(EXISTS "${UNIX_BUILD_DIR}/cpp/lib") + file(REMOVE_RECURSE "${UNIX_BUILD_DIR}/cpp/lib") + endif() + if(EXISTS "${UNIX_BUILD_DIR}/cpp/lib64") + file(REMOVE_RECURSE "${UNIX_BUILD_DIR}/cpp/lib64") + endif() + file(REMOVE_RECURSE "${UNIX_BUILD_DIR}/cpp/bin") + + # Setting these as environment variables, as .d files aren't generated + # the first time passing them as arguments to make. + set(ENV{MCPP_HOME} ${CURRENT_INSTALLED_DIR}) + set(ENV{EXPAT_HOME} ${CURRENT_INSTALLED_DIR}) + set(ENV{BZ2_HOME} ${CURRENT_INSTALLED_DIR}) + set(ENV{LMDB_HOME} ${CURRENT_INSTALLED_DIR}) + set(ENV{CPPFLAGS} "-I${CURRENT_INSTALLED_DIR}/include") + set(ENV{LDFLAGS} "-L${CURRENT_INSTALLED_DIR}/debug/lib") + + set(ICE_BUILD_CONFIG "shared cpp11-shared") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(ICE_BUILD_CONFIG "static cpp11-static") + endif() + if(NOT VCPKG_BUILD_TYPE) + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_build_process( + COMMAND make + V=1 + "prefix=${CURRENT_PACKAGES_DIR}/debug" + linux_id=vcpkg + "CONFIGS=${ICE_BUILD_CONFIG}" + USR_DIR_INSTALL=yes + OPTIMIZE=no + ${ICE_OPTIONAL_COMPONENTS_MAKE} + "-j${VCPKG_CONCURRENCY}" + WORKING_DIRECTORY ${SOURCE_PATH}/cpp + LOGNAME make-${TARGET_TRIPLET}-dbg + ) + + # Install debug libraries to packages directory + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib") + if(EXISTS "${UNIX_BUILD_DIR}/cpp/lib64") + file(GLOB ICE_DEBUG_LIBRARIES "${UNIX_BUILD_DIR}/cpp/lib64/*") + else() + file(GLOB ICE_DEBUG_LIBRARIES "${UNIX_BUILD_DIR}/cpp/lib/*") + endif() + file(COPY ${ICE_DEBUG_LIBRARIES} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + + # Clean up for the next round + vcpkg_execute_build_process( + COMMAND make distclean + WORKING_DIRECTORY ${SOURCE_PATH}/cpp + LOGNAME make-clean-${TARGET_TRIPLET} + ) + + if(EXISTS "${UNIX_BUILD_DIR}/cpp/lib") + file(REMOVE_RECURSE "${UNIX_BUILD_DIR}/cpp/lib") + endif() + if(EXISTS "${UNIX_BUILD_DIR}/cpp/lib64") + file(REMOVE_RECURSE "${UNIX_BUILD_DIR}/cpp/lib64") + endif() + file(REMOVE_RECURSE "${UNIX_BUILD_DIR}/cpp/bin") + endif() # TODO: get-cmake-vars! + # Release build + set(ENV{LDFLAGS} "-L${CURRENT_INSTALLED_DIR}/lib") + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_build_process( + COMMAND make + V=1 + "prefix=${CURRENT_PACKAGES_DIR}" + linux_id=vcpkg + "CONFIGS=${ICE_BUILD_CONFIG}" + USR_DIR_INSTALL=yes + OPTIMIZE=yes + ${ICE_OPTIONAL_COMPONENTS_MAKE} + "-j${VCPKG_CONCURRENCY}" + WORKING_DIRECTORY ${SOURCE_PATH}/cpp + LOGNAME make-${TARGET_TRIPLET}-rel + ) + + # Install release libraries and other files to packages directory + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/ice/slice") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + + install_includes("${UNIX_BUILD_DIR}/cpp/include" "${ICE_INCLUDE_SUB_DIRECTORIES}") + install_includes("${UNIX_BUILD_DIR}/cpp/include/generated" "${ICE_INCLUDE_SUB_DIRECTORIES}") + install_slices("${SOURCE_PATH}/slice" "${ICE_INCLUDE_SUB_DIRECTORIES}") + if(EXISTS "${UNIX_BUILD_DIR}/cpp/lib64") + file(GLOB ICE_RELEASE_LIBRARIES "${UNIX_BUILD_DIR}/cpp/lib64/*") + else() + file(GLOB ICE_RELEASE_LIBRARIES "${UNIX_BUILD_DIR}/cpp/lib/*") + endif() + file(COPY ${ICE_RELEASE_LIBRARIES} DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(GLOB ICE_RELEASE_EXECUTABLES "${UNIX_BUILD_DIR}/cpp/bin/*") + file(COPY ${ICE_RELEASE_EXECUTABLES} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + + # Clean up + vcpkg_execute_build_process( + COMMAND make distclean + WORKING_DIRECTORY ${SOURCE_PATH}/cpp + LOGNAME make-clean-after-build-${TARGET_TRIPLET} + ) + + if(EXISTS "${UNIX_BUILD_DIR}/cpp/lib") + file(REMOVE_RECURSE "${UNIX_BUILD_DIR}/cpp/lib") + endif() + if(EXISTS "${UNIX_BUILD_DIR}/cpp/lib64") + file(REMOVE_RECURSE "${UNIX_BUILD_DIR}/cpp/lib64") + endif() + file(REMOVE_RECURSE "${UNIX_BUILD_DIR}/cpp/bin") + +else() # VCPKG_TARGET_IS_WINDOWS + + # Fix project files to prevent nuget restore of dependencies and + # remove hard coded runtime linkage + include("${CURRENT_PORT_DIR}/prepare_for_build.cmake") + prepare_for_build("${SOURCE_PATH}") + + vcpkg_list(SET MSBUILD_OPTIONS + "/p:UseVcpkg=yes" + "/p:IceBuildingSrc=yes" + ${ICE_OPTIONAL_COMPONENTS_MSBUILD} + ) + + # Build Ice + vcpkg_msbuild_install( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "cpp/msbuild/ice.${VCPKG_PLATFORM_TOOLSET}.sln" + TARGET "C++11\\ice++11" + OPTIONS + ${MSBUILD_OPTIONS} + DEPENDENT_PKGCONFIG bzip2 ${pkgconfig_packages} + ADDITIONAL_LIBS lmdb.lib + ADDITIONAL_LIBS_RELEASE mcpp.lib ${libs_rel} + ADDITIONAL_LIBS_DEBUG mcppd.lib ${libs_dbg} + ) + + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/zeroc.icebuilder.msbuild.dll") + file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/zeroc.icebuilder.msbuild.dll") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/zeroc.icebuilder.msbuild.dll") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/zeroc.icebuilder.msbuild.dll") + endif() + + install_includes("${WIN_RELEASE_BUILD_DIR}/cpp/include" "${ICE_INCLUDE_SUB_DIRECTORIES}") + install_includes("${WIN_RELEASE_BUILD_DIR}/cpp/include/generated/cpp11/${TRIPLET_SYSTEM_ARCH}/Release" "${ICE_INCLUDE_SUB_DIRECTORIES}") + + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/ice/slice") + install_slices("${SOURCE_PATH}/slice" "${ICE_INCLUDE_SUB_DIRECTORIES}") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + endif() + + vcpkg_clean_msbuild() + +endif() + +# Remove unnecessary static libraries. +file(GLOB PDLIBS "${CURRENT_PACKAGES_DIR}/debug/lib/*") +file(GLOB PRLIBS "${CURRENT_PACKAGES_DIR}/lib/*") +list(FILTER PDLIBS INCLUDE REGEX ".*(([Ii]ce[Uu]til|[Ss]lice)d?\.([a-z]+))$") +list(FILTER PRLIBS INCLUDE REGEX ".*(([Ii]ce[Uu]til|[Ss]lice)d?\.([a-z]+))$") +file(REMOVE ${PDLIBS} ${PRLIBS}) + +# Handle copyright +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/prepare_for_build.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/prepare_for_build.cmake new file mode 100644 index 0000000000000000000000000000000000000000..e49303c99f830ac0547acb308d702c85c2b3c9f1 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/prepare_for_build.cmake @@ -0,0 +1,78 @@ + +# This function modifies hardcoded RuntimeLibrary directives in Ice's .vcxproj files and downloads +# Ice Builder for MSBuild, which is required to generate C++ files based on the interface definition +# files (.ice). + +function(prepare_for_build ICE_SOURCE_DIR) + + message("-- Modifying hardcoded 'RuntimeLibrary' directives in .vcxproj files") + set(CPP_SOURCE_DIR "${ICE_SOURCE_DIR}/cpp/src") + file(GLOB_RECURSE PROJ_FILES "${CPP_SOURCE_DIR}/*.vcxproj") + + foreach(PROJ_FILE ${PROJ_FILES}) + file(READ ${PROJ_FILE} PROJ_FILE_CONTENT) + STRING(REGEX + REPLACE + "" + "" + PROJ_FILE_CONTENT + "${PROJ_FILE_CONTENT}" + ) + + if((NOT ${PROJ_FILE} MATCHES ".*slice\.vcxproj") AND + (NOT ${PROJ_FILE} MATCHES ".*iceutil\.vcxproj") AND + (NOT ${PROJ_FILE} MATCHES ".*slice2cpp\.vcxproj")) + + if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") + STRING(REGEX + REPLACE + "DynamicLibrary" + "StaticLibrary" + PROJ_FILE_CONTENT + "${PROJ_FILE_CONTENT}" + ) + else() + STRING(REGEX + REPLACE + "StaticLibrary" + "DynamicLibrary" + PROJ_FILE_CONTENT + "${PROJ_FILE_CONTENT}" + ) + endif() + endif() + + file(WRITE ${PROJ_FILE} "${PROJ_FILE_CONTENT}") + + vcpkg_execute_required_process( + COMMAND pwsh ${CURRENT_PORT_DIR}/change_to_mt.ps1 ${PROJ_FILE} ${VCPKG_CRT_LINKAGE} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME change_to_mt-${TARGET_TRIPLET}-rel + ) + endforeach() + + set(ICE_BUILDER_VERSION "5.0.9") + set(ICE_CPP_MSBUILD_PACKAGES_DIR "${ICE_SOURCE_DIR}/cpp/msbuild/packages") + set(ICE_BUILDER_DEST_DIRECTORY "${ICE_CPP_MSBUILD_PACKAGES_DIR}/zeroc.icebuilder.msbuild.${ICE_BUILDER_VERSION}") + if(NOT EXISTS "${ICE_BUILDER_DEST_DIRECTORY}") + message("-- Making Ice Builder for MSBuild available") + vcpkg_download_distfile( + ICE_BUILDER_MSBUILD_ARCHIVE + URLS https://globalcdn.nuget.org/packages/zeroc.icebuilder.msbuild.5.0.9.nupkg + FILENAME "zeroc.icebuilder.msbuild.${ICE_BUILDER_VERSION}.zip" + SHA512 E65620F3B667A48B28EC770443296BB0B8058168197DB3AE877A36531FFC6CE7E9289C7FE37DFAD751877FBDBA03C55E37122931BBF001EA6F1906DFEEBACFCB + ) + + vcpkg_extract_source_archive( + ICE_BUILDER_MSBUILD_DIRECTORY + ARCHIVE + "${ICE_BUILDER_MSBUILD_ARCHIVE}" + NO_REMOVE_ONE_LEVEL + SOURCE_BASE icebuilder + ) + + file(MAKE_DIRECTORY "${ICE_SOURCE_DIR}/cpp/msbuild/packages") + file(RENAME "${ICE_BUILDER_MSBUILD_DIRECTORY}" "${ICE_BUILDER_DEST_DIRECTORY}") + endif() + +endfunction() diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..db1a1c1e7cb7813b096dedf3540e4edc68dd3f5d --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/zeroc-ice/vcpkg.json @@ -0,0 +1,152 @@ +{ + "name": "zeroc-ice", + "version": "3.7.9", + "port-version": 4, + "maintainers": "Benjamin Oldenburg ", + "description": "Comprehensive RPC framework with support for C++, CSharp, Java, JavaScript, Python and more.", + "homepage": "https://github.com/zeroc-ice/ice", + "license": null, + "supports": "!uwp & !(windows & arm) & !wasm32", + "dependencies": [ + "bzip2", + "expat", + "lmdb", + "mcpp", + { + "name": "openssl", + "platform": "!windows" + }, + { + "name": "vcpkg-msbuild", + "host": true, + "platform": "windows" + }, + "zlib" + ], + "default-features": [ + "glacier2lib", + "icegridlib", + "icestormlib" + ], + "features": { + "glacier2lib": { + "description": "Glacier2 libraries" + }, + "glacier2router": { + "description": "Glacier2Router", + "supports": "!(windows & static)", + "dependencies": [ + { + "name": "zeroc-ice", + "features": [ + "glacier2lib", + "icessl" + ] + } + ] + }, + "iceboxlib": { + "description": "IceBox libraries and runtime", + "supports": "!(windows & static)" + }, + "iceboxtools": { + "description": "IceBox tools", + "supports": "!(windows & static)" + }, + "icebridge": { + "description": "IceBridge", + "supports": "!(windows & static)", + "dependencies": [ + { + "name": "zeroc-ice", + "features": [ + "iceboxlib" + ] + } + ] + }, + "icediscovery": { + "description": "IceDiscovery", + "dependencies": [ + { + "name": "zeroc-ice", + "features": [ + "glacier2lib", + "iceboxlib", + "icessl", + "icestormlib" + ] + } + ] + }, + "icegridlib": { + "description": "IceGrid library", + "dependencies": [ + { + "name": "zeroc-ice", + "features": [ + "glacier2lib" + ] + } + ] + }, + "icegridtools": { + "description": "IceGrid tools", + "supports": "!(windows & static)", + "dependencies": [ + "expat", + { + "name": "zeroc-ice", + "features": [ + "glacier2lib", + "iceboxlib", + "icegridlib", + "icessl" + ] + } + ] + }, + "icelocatordiscovery": { + "description": "IceLocatorDiscovery", + "dependencies": [ + { + "name": "zeroc-ice", + "features": [ + "glacier2lib", + "iceboxlib", + "icessl", + "icestormlib" + ] + } + ] + }, + "icessl": { + "description": "IceSSL", + "dependencies": [ + { + "name": "openssl", + "platform": "!windows" + } + ] + }, + "icestormlib": { + "description": "IceStorm library" + }, + "icestormtools": { + "description": "IceStorm tools", + "supports": "!(windows & static)", + "dependencies": [ + "lmdb", + { + "name": "zeroc-ice", + "features": [ + "glacier2lib", + "iceboxlib", + "icegridlib", + "icestormlib" + ] + } + ] + } + } +}