diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/boost-array/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/boost-array/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..99e327099130ffa748d1193c99c54241a7915449 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/boost-array/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by scripts/boost/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/array + REF boost-${VERSION} + SHA512 ddc4f259b1ce6e2b856978fc7474811cbf5c1b7a808ff16c411bb5f873dac80e27b67119e2e8f1cbe05da314a04f8a57d46113b6b86598a7ff378955feb7b79b + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/boost-array/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/boost-array/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..bc52c1fabd40b0b2616d68b244359d40460a2cc1 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/boost-array/vcpkg.json @@ -0,0 +1,34 @@ +{ + "$comment": "Automatically generated by scripts/boost/generate-ports.ps1", + "name": "boost-array", + "version": "1.84.0", + "description": "Boost array module", + "homepage": "https://github.com/boostorg/array", + "license": "BSL-1.0", + "dependencies": [ + { + "name": "boost-assert", + "version>=": "1.84.0" + }, + { + "name": "boost-config", + "version>=": "1.84.0" + }, + { + "name": "boost-core", + "version>=": "1.84.0" + }, + { + "name": "boost-static-assert", + "version>=": "1.84.0" + }, + { + "name": "boost-throw-exception", + "version>=": "1.84.0" + }, + { + "name": "boost-vcpkg-helpers", + "version>=": "1.84.0" + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/dx/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/dx/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..61500c5c0c143a7738e18eb451f0843b9d233897 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/dx/portfile.cmake @@ -0,0 +1,19 @@ +#header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sdcb/dx + REF v1.0.1 + SHA512 b40eb4daf774bfdb394b207bb29652fbf44361f5d8f9b60509c7a3215cd403dbf0c10454979c0c2e97d839496ef20940070a42837375993cd67d58afacc990e0 + HEAD_REF master +) + +file(INSTALL + ${SOURCE_PATH}/dx.h + ${SOURCE_PATH}/debug.h + ${SOURCE_PATH}/handle.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include/dx +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/dx RENAME copyright) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/dx/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/dx/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..8d1eefd905e7d95e4c8c2c7e3dcba97082e22fe1 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/dx/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "dx", + "version": "1.0.1", + "port-version": 3, + "description": "A modern C++ library for DirectX programming", + "homepage": "https://github.com/sdcb/dx" +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/CMakeLists.txt b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..60f9783acbd525a0f2d4d6534b12c28973708ffe --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/CMakeLists.txt @@ -0,0 +1,164 @@ +cmake_minimum_required(VERSION 3.4) + +include(GNUInstallDirs) + +project(FreeImage C CXX) + +if(MSVC) + add_definitions("-D_CRT_SECURE_NO_WARNINGS") + set(CMAKE_CXX_FLAGS "/wd4828 ${CMAKE_CXX_FLAGS}") +endif() + +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) +find_package(JPEG REQUIRED) +find_package(TIFF REQUIRED) +find_package(OpenJPEG REQUIRED) +find_package(WebP CONFIG REQUIRED) +find_package(JXR REQUIRED) +find_package(LibRaw REQUIRED) +find_package(OpenEXR REQUIRED) + +option(BUILD_SHARED_LIBS "Build shared libraries" ON) +option(INSTALL_HEADERS "Install the development headers" ON) + +set(REAL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Source) + +# Add a debug postfix +set(CMAKE_DEBUG_POSTFIX "d") + +# List the public header files +set(PUBLIC_HEADERS ${REAL_SOURCE_DIR}/FreeImage.h) + +# List the private header files +set(ROOT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/CacheFile.h + ${REAL_SOURCE_DIR}/FreeImageIO.h + ${REAL_SOURCE_DIR}/MapIntrospector.h + ${REAL_SOURCE_DIR}/Plugin.h + ${REAL_SOURCE_DIR}/Quantizers.h + ${REAL_SOURCE_DIR}/ToneMapping.h + ${REAL_SOURCE_DIR}/Utilities.h) + +file(GLOB FREEIMAGE_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImage/*.h) +file(GLOB FREEIMAGE_TOOLKIT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.h) +file(GLOB METADATA_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/Metadata/*.h) + +set(PRIVATE_HEADERS ${ROOT_PRIVATE_HEADERS} + ${FREEIMAGE_PRIVATE_HEADERS} + ${FREEIMAGE_TOOLKIT_PRIVATE_HEADERS} + ${METADATA_PRIVATE_HEADERS}) + +# List the source files +file(GLOB DEPRECATION_SRCS ${REAL_SOURCE_DIR}/DeprecationManager/*.cpp) +file(GLOB FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.cpp) +file(GLOB FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/*.cpp) +file(GLOB METADATA_SRCS ${REAL_SOURCE_DIR}/Metadata/*.cpp) + +# The G3 plugin is disabled because it require the private copy of tiff +list(REMOVE_ITEM FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/PluginG3.cpp) + +# The JPEGTransform plugin is disable because it requires a private copy of jpeg +list(REMOVE_ITEM FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/JPEGTransform.cpp) + + +set(SRCS ${DEPRECATION_SRCS} + ${FREEIMAGE_SRCS} + ${FREEIMAGE_TOOLKIT_SRCS} + ${METADATA_SRCS} +) + +# If FreeImage is used as a static library, FREEIMAGE_LIB +# needs to be defined (at the C preprocessor level) to correctly +# define (to nothing instead of _declspec(dllimport) ) the DLL_API macro. +# For this purpouse we include (depending on the BUILD_SHARED_LIBS ) +# the appropriate FreeImageConfig.h . +if(BUILD_SHARED_LIBS) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-dynamic.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) +else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-static.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) +endif() +list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) + +add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/FreeImage.rc) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS) +else() + target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_LIB) +endif() + +target_include_directories(FreeImage PRIVATE ${REAL_SOURCE_DIR} + ${ZLIB_INCLUDE_DIRS} + ${JPEG_INCLUDE_DIRS} + ${TIFF_INCLUDE_DIRS} + ${PNG_INCLUDE_DIRS} + ${OPENJPEG_INCLUDE_DIRS} + ${JXR_INCLUDE_DIRS} + ${LibRaw_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} + PUBLIC $) + + +target_link_libraries(FreeImage ${ZLIB_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARIES} + ${PNG_LIBRARIES} + ${OPENJPEG_LIBRARIES} + WebP::webp WebP::webpdemux WebP::libwebpmux WebP::webpdecoder + ${JXR_LIBRARIES} + ${LibRaw_LIBRARIES} + OpenEXR::OpenEXR + Imath::Imath) + +target_compile_definitions(FreeImage PRIVATE ${PNG_DEFINITIONS}) + +# FreeImagePlus +file(GLOB FREEIMAGEPLUS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/src/*.cpp) +add_library(FreeImagePlus + ${FREEIMAGEPLUS_SOURCES} + ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h + ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.rc) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(FreeImagePlus PRIVATE -DFIP_EXPORTS) +else() + target_compile_definitions(FreeImagePlus PRIVATE -DFREEIMAGE_LIB) +endif() + +target_include_directories(FreeImagePlus PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus + ${CMAKE_CURRENT_BINARY_DIR} + ${REAL_SOURCE_DIR} + PUBLIC $) + +target_link_libraries(FreeImagePlus PUBLIC FreeImage) + +list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h) + +install(TARGETS FreeImage FreeImagePlus + EXPORT freeimage-targets + COMPONENT runtime + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + +install(EXPORT freeimage-targets NAMESPACE freeimage:: DESTINATION share/freeimage) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/freeimage-config.cmake" +"include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +find_dependency(PNG) +find_dependency(JPEG) +find_dependency(TIFF) +find_dependency(OpenJPEG) +find_dependency(WebP CONFIG) +find_dependency(JXR) +find_dependency(LibRaw) +find_dependency(OpenEXR) +find_dependency(Imath) +include(\"\${CMAKE_CURRENT_LIST_DIR}/freeimage-targets.cmake\") +") + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freeimage-config.cmake DESTINATION share/freeimage) +if(INSTALL_HEADERS) + install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +endif() diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/FreeImageConfig-dynamic.h b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/FreeImageConfig-dynamic.h new file mode 100644 index 0000000000000000000000000000000000000000..41dcf57d971eec7a3518e4e5ca17a0f1758abd87 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/FreeImageConfig-dynamic.h @@ -0,0 +1,6 @@ +#ifndef FREEIMAGE_CONFIG_H +#define FREEIMAGE_CONFIG_H + +#undef FREEIMAGE_LIB + +#endif diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/FreeImageConfig-static.h b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/FreeImageConfig-static.h new file mode 100644 index 0000000000000000000000000000000000000000..ed723490eed616dc12d8c7f7211d2d6d96fe86e3 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/FreeImageConfig-static.h @@ -0,0 +1,6 @@ +#ifndef FREEIMAGE_CONFIG_H +#define FREEIMAGE_CONFIG_H + +#define FREEIMAGE_LIB + +#endif diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch new file mode 100644 index 0000000000000000000000000000000000000000..c22828deee750488cdcfb007c45d292db50ea517 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch @@ -0,0 +1,89 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 12182cd..ebd0453 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -410,16 +410,20 @@ FI_ENUM(FREE_IMAGE_FORMAT) { + FIF_DDS = 24, + FIF_GIF = 25, + FIF_HDR = 26, +- FIF_FAXG3 = 27, +- FIF_SGI = 28, +- FIF_EXR = 29, +- FIF_J2K = 30, +- FIF_JP2 = 31, +- FIF_PFM = 32, +- FIF_PICT = 33, +- FIF_RAW = 34, +- FIF_WEBP = 35, +- FIF_JXR = 36 ++/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of ++ FreeImage, since it requires usage of the vendored copy of libtiff. */ ++#if 0 ++ FIF_FAXG3 = 27, ++#endif ++ FIF_SGI = 27, ++ FIF_EXR = 28, ++ FIF_J2K = 29, ++ FIF_JP2 = 30, ++ FIF_PFM = 31, ++ FIF_PICT = 32, ++ FIF_RAW = 33, ++ FIF_WEBP = 34, ++ FIF_JXR = 35 + }; + + /** Image type used in FreeImage. +@@ -476,6 +480,9 @@ FI_ENUM(FREE_IMAGE_DITHER) { + /** Lossless JPEG transformations + Constants used in FreeImage_JPEGTransform + */ ++/* vcpkg: The JPEGTransform functions are deliberately disabled in our build ++ of FreeImage, since they require usage of the vendored copy of libjpeg. */ ++#if 0 + FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_NONE = 0, //! no transformation + FIJPEG_OP_FLIP_H = 1, //! horizontal flip +@@ -486,6 +493,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_ROTATE_180 = 6, //! 180-degree rotation + FIJPEG_OP_ROTATE_270 = 7 //! 270-degree clockwise (or 90 ccw) + }; ++#endif + + /** Tone mapping operators. + Constants used in FreeImage_ToneMapping. +@@ -1089,6 +1097,9 @@ DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, + // JPEG lossless transformation routines + // -------------------------------------------------------------------------- + ++/* vcpkg: The JPEGTransform functions are deliberately disabled in our build ++ of FreeImage, since they require usage of the vendored copy of libjpeg. */ ++#if 0 + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); +@@ -1097,7 +1108,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); +- ++#endif + + // -------------------------------------------------------------------------- + // Image manipulation toolkit +diff --git a/Source/FreeImage/Plugin.cpp b/Source/FreeImage/Plugin.cpp +index 11e7294..0119ba7 100644 +--- a/Source/FreeImage/Plugin.cpp ++++ b/Source/FreeImage/Plugin.cpp +@@ -263,7 +263,11 @@ FreeImage_Initialise(BOOL load_local_plugins_only) { + s_plugins->AddNode(InitDDS); + s_plugins->AddNode(InitGIF); + s_plugins->AddNode(InitHDR); +- s_plugins->AddNode(InitG3); ++/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of FreeImage +++ since it requires usage of the vendored copy of libtiff. */ ++#if 0 ++ s_plugins->AddNode(InitG3); ++#endif + s_plugins->AddNode(InitSGI); + s_plugins->AddNode(InitEXR); + s_plugins->AddNode(InitJ2K); diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/fix-function-overload.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/fix-function-overload.patch new file mode 100644 index 0000000000000000000000000000000000000000..adb1164f6d13254d345dac6bed58a2bed0b302c0 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/fix-function-overload.patch @@ -0,0 +1,40 @@ +diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp +index 8db177d..efa2c4e 100644 +--- a/Source/FreeImage/PluginJPEG.cpp ++++ b/Source/FreeImage/PluginJPEG.cpp +@@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr marker) { + return FALSE. You might want to issue an error message instead. + */ + static BOOL +-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { ++jpeg_read_icc_profile_(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { + jpeg_saved_marker_ptr marker; + int num_markers = 0; + int seq_no; +@@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) { + BYTE *icc_profile = NULL; + unsigned icc_length = 0; + +- if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) { ++ if( jpeg_read_icc_profile_(cinfo, &icc_profile, &icc_length) ) { + // copy ICC profile data + FreeImage_CreateICCProfile(dib, icc_profile, icc_length); + // clean up +@@ -785,7 +785,7 @@ jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) { + Write JPEG_APP2 marker (ICC profile) + */ + static BOOL +-jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) { ++jpeg_write_icc_profile_(j_compress_ptr cinfo, FIBITMAP *dib) { + // marker identifying string "ICC_PROFILE" (null-terminated) + BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 }; + +@@ -1038,7 +1038,7 @@ write_markers(j_compress_ptr cinfo, FIBITMAP *dib) { + jpeg_write_comment(cinfo, dib); + + // write ICC profile +- jpeg_write_icc_profile(cinfo, dib); ++ jpeg_write_icc_profile_(cinfo, dib); + + // write IPTC profile + jpeg_write_iptc_profile(cinfo, dib); diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..6409d74853e9279a38d83bd766689e2c86e16b93 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO freeimage/Source%20Distribution + REF 3.18.0 + FILENAME "FreeImage3180.zip" + SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818 + PATCHES + disable-plugins-depending-on-internal-third-party-libraries.patch + use-external-jpeg.patch + use-external-jxrlib.patch + use-external-libtiff.patch + use-external-openjpeg.patch + use-external-png-zlib.patch + use-external-rawlib.patch + use-external-webp.patch + use-external-openexr.patch + use-freeimage-config-include.patch + fix-function-overload.patch + use-typedef-as-already-declared.patch + use-functions-to-override-libtiff-warning-error-handlers.patch + remove_auto_ptr.patch + rawlib-build-fix.patch +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" + "${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-static.h" + "${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-dynamic.h" + DESTINATION "${SOURCE_PATH}" +) + +# This is not strictly necessary, but to make sure +# that no "internal" libraries are used we remove them +file(REMOVE_RECURSE + "${SOURCE_PATH}/Source/LibJPEG" + "${SOURCE_PATH}/Source/LibPNG" + "${SOURCE_PATH}/Source/LibTIFF4" + "${SOURCE_PATH}/Source/ZLib" + "${SOURCE_PATH}/Source/LibOpenJPEG" + "${SOURCE_PATH}/Source/LibJXR" + "${SOURCE_PATH}/Source/LibWebP" + "${SOURCE_PATH}/Source/LibRawLite" + "${SOURCE_PATH}/Source/OpenEXR" +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() + +vcpkg_copy_pdbs() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/license-fi.txt") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/rawlib-build-fix.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/rawlib-build-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..b5b53dc1eb8aa844222d9979f4092c6d2c87a3e5 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/rawlib-build-fix.patch @@ -0,0 +1,31 @@ +diff --git a/Source/FreeImage/PluginRAW.cpp b/Source/FreeImage/PluginRAW.cpp +index c7f8758a..a57fd5f1 100644 +--- a/Source/FreeImage/PluginRAW.cpp ++++ b/Source/FreeImage/PluginRAW.cpp +@@ -46,6 +46,14 @@ private: + long _eof; + INT64 _fsize; + ++ // Minimal change to make version 3.18.0 of FreeImage compile with ++ // LibRaw 0.20 and later versions. ++ // Once the port of FreeImage has been updated to a version greater ++ // than 3.18.0, this patch should be removed as it will not be needed. ++#if LIBRAW_COMPILE_CHECK_VERSION_NOTLESS(0, 20) ++ LibRaw_abstract_datastream * const substream = nullptr; ++#endif ++ + public: + LibRaw_freeimage_datastream(FreeImageIO *io, fi_handle handle) : _io(io), _handle(handle) { + long start_pos = io->tell_proc(handle); +@@ -694,7 +702,11 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { + // -------------------------------------------- + + // (-s [0..N-1]) Select one raw image from input file ++#if LIBRAW_COMPILE_CHECK_VERSION_NOTLESS(0, 20) ++ RawProcessor->imgdata.rawparams.shot_select = 0; ++#else + RawProcessor->imgdata.params.shot_select = 0; ++#endif + // (-w) Use camera white balance, if possible (otherwise, fallback to auto_wb) + RawProcessor->imgdata.params.use_camera_wb = 1; + // (-M) Use any color matrix from the camera metadata. This option only affects Olympus, Leaf, and Phase One cameras. diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/remove_auto_ptr.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/remove_auto_ptr.patch new file mode 100644 index 0000000000000000000000000000000000000000..65315e2a7b153706de326d8e46232c26bafbf21b --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/remove_auto_ptr.patch @@ -0,0 +1,35 @@ +diff --git a/Source/FreeImage/MultiPage.cpp b/Source/FreeImage/MultiPage.cpp +index 4f2605188..8af384aff 100644 +--- a/Source/FreeImage/MultiPage.cpp ++++ b/Source/FreeImage/MultiPage.cpp +@@ -31,6 +31,8 @@ + #pragma warning (disable : 4786) // identifier was truncated to 'number' characters + #endif + ++#include ++ + #include "CacheFile.h" + #include "FreeImageIO.h" + #include "Plugin.h" +@@ -271,8 +273,8 @@ FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT fif, const char *filename, BOOL crea + } + } + +- std::auto_ptr bitmap (new FIMULTIBITMAP); +- std::auto_ptr header (new MULTIBITMAPHEADER); ++ std::unique_ptr bitmap (new FIMULTIBITMAP); ++ std::unique_ptr header (new MULTIBITMAPHEADER); + header->m_filename = filename; + // io is default + header->node = node; +@@ -337,8 +339,8 @@ FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_h + PluginNode *node = list->FindNodeFromFIF(fif); + + if (node) { +- std::auto_ptr bitmap (new FIMULTIBITMAP); +- std::auto_ptr header (new MULTIBITMAPHEADER); ++ std::unique_ptr bitmap (new FIMULTIBITMAP); ++ std::unique_ptr header (new MULTIBITMAPHEADER); + header->io = *io; + header->node = node; + header->fif = fif; diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-jpeg.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-jpeg.patch new file mode 100644 index 0000000000000000000000000000000000000000..2df2c9d2d4ad31ff219e9a600ab1d2bb48ebd04e --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-jpeg.patch @@ -0,0 +1,17 @@ +diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp +index 573989c..aaeefa4 100644 +--- a/Source/FreeImage/PluginJPEG.cpp ++++ b/Source/FreeImage/PluginJPEG.cpp +@@ -35,9 +35,9 @@ extern "C" { + #undef FAR + #include + +-#include "../LibJPEG/jinclude.h" +-#include "../LibJPEG/jpeglib.h" +-#include "../LibJPEG/jerror.h" ++#include ++#include ++#include + } + + #include "FreeImage.h" diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-jxrlib.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-jxrlib.patch new file mode 100644 index 0000000000000000000000000000000000000000..d86a18e82486965f65aa573960299dbd876b7da2 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-jxrlib.patch @@ -0,0 +1,14 @@ +diff --git a/Source/FreeImage/PluginJXR.cpp b/Source/FreeImage/PluginJXR.cpp +index 0e14e09..8eb9d5d 100644 +--- a/Source/FreeImage/PluginJXR.cpp ++++ b/Source/FreeImage/PluginJXR.cpp +@@ -23,7 +23,8 @@ + #include "Utilities.h" + #include "../Metadata/FreeImageTag.h" + +-#include "../LibJXR/jxrgluelib/JXRGlue.h" ++#define INITGUID ++#include + + // ========================================================== + // Plugin Interface diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-libtiff.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-libtiff.patch new file mode 100644 index 0000000000000000000000000000000000000000..23d5dfd1d08d9e7abf17660cdebc1da810108e69 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-libtiff.patch @@ -0,0 +1,204 @@ +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index 5068d94..8947b03 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -37,9 +37,9 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibTIFF4/tiffiop.h" ++#include + #include "../Metadata/FreeImageTag.h" + #include "../OpenEXR/Half/half.h" + + #include "FreeImageIO.h" + #include "PSDParser.h" +@@ -199,15 +199,18 @@ Open a TIFF file for reading or writing + @param name + @param mode + */ ++/* + TIFF* + TIFFOpen(const char* name, const char* mode) { + return 0; + } ++*/ + + // ---------------------------------------------------------- + // TIFF library FreeImage-specific routines. + // ---------------------------------------------------------- + ++/* + void* + _TIFFmalloc(tmsize_t s) { + return malloc(s); +@@ -245,6 +248,7 @@ int + _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) { + return (memcmp(p1, p2, (size_t) c)); + } ++*/ + + // ---------------------------------------------------------- + // in FreeImage warnings and errors are disabled + +diff --git a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp +index d5be902..8dbcd5d 100644 +--- a/Source/Metadata/XTIFF.cpp ++++ b/Source/Metadata/XTIFF.cpp +@@ -29,7 +29,7 @@ + #pragma warning (disable : 4786) // identifier was truncated to 'number' characters + #endif + +-#include "../LibTIFF4/tiffiop.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" +@@ -40,6 +40,43 @@ + // Extended TIFF Directory GEO Tag Support + // ---------------------------------------------------------- + ++// vcpkg: function imported from libtiff/tif_dirinfo.c, in which it is not exported ++/* ++ * Return size of TIFFDataType in bytes. ++ * ++ * XXX: We need a separate function to determine the space needed ++ * to store the value. For TIFF_RATIONAL values TIFFDataWidth() returns 8, ++ * but we use 4-byte float to represent rationals. ++ */ ++int ++FreeImage_TIFFDataSize(TIFFDataType type) ++{ ++ switch (type) ++ { ++ case TIFF_BYTE: ++ case TIFF_SBYTE: ++ case TIFF_ASCII: ++ case TIFF_UNDEFINED: ++ return 1; ++ case TIFF_SHORT: ++ case TIFF_SSHORT: ++ return 2; ++ case TIFF_LONG: ++ case TIFF_SLONG: ++ case TIFF_FLOAT: ++ case TIFF_IFD: ++ case TIFF_RATIONAL: ++ case TIFF_SRATIONAL: ++ return 4; ++ case TIFF_DOUBLE: ++ case TIFF_LONG8: ++ case TIFF_SLONG8: ++ case TIFF_IFD8: ++ return 8; ++ default: ++ return 0; ++ } ++} + /** + Tiff info structure. + Entry format: +@@ -224,6 +261,33 @@ tiff_write_geotiff_profile(TIFF *tif, FIBITMAP *dib) { + // TIFF EXIF tag reading & writing + // ---------------------------------------------------------- + ++static uint32 exif_tag_ids[] = { ++ EXIFTAG_EXPOSURETIME, EXIFTAG_FNUMBER, EXIFTAG_EXPOSUREPROGRAM, ++ EXIFTAG_SPECTRALSENSITIVITY, EXIFTAG_ISOSPEEDRATINGS, EXIFTAG_OECF, ++ EXIFTAG_EXIFVERSION, EXIFTAG_DATETIMEORIGINAL, EXIFTAG_DATETIMEDIGITIZED, ++ EXIFTAG_COMPONENTSCONFIGURATION, EXIFTAG_COMPRESSEDBITSPERPIXEL, ++ EXIFTAG_SHUTTERSPEEDVALUE, EXIFTAG_APERTUREVALUE, ++ EXIFTAG_BRIGHTNESSVALUE, EXIFTAG_EXPOSUREBIASVALUE, ++ EXIFTAG_MAXAPERTUREVALUE, EXIFTAG_SUBJECTDISTANCE, EXIFTAG_METERINGMODE, ++ EXIFTAG_LIGHTSOURCE, EXIFTAG_FLASH, EXIFTAG_FOCALLENGTH, ++ EXIFTAG_SUBJECTAREA, EXIFTAG_MAKERNOTE, EXIFTAG_USERCOMMENT, ++ EXIFTAG_SUBSECTIME, EXIFTAG_SUBSECTIMEORIGINAL, ++ EXIFTAG_SUBSECTIMEDIGITIZED, EXIFTAG_FLASHPIXVERSION, EXIFTAG_COLORSPACE, ++ EXIFTAG_PIXELXDIMENSION, EXIFTAG_PIXELYDIMENSION, ++ EXIFTAG_RELATEDSOUNDFILE, EXIFTAG_FLASHENERGY, ++ EXIFTAG_SPATIALFREQUENCYRESPONSE, EXIFTAG_FOCALPLANEXRESOLUTION, ++ EXIFTAG_FOCALPLANEYRESOLUTION, EXIFTAG_FOCALPLANERESOLUTIONUNIT, ++ EXIFTAG_SUBJECTLOCATION, EXIFTAG_EXPOSUREINDEX, EXIFTAG_SENSINGMETHOD, ++ EXIFTAG_FILESOURCE, EXIFTAG_SCENETYPE, EXIFTAG_CFAPATTERN, ++ EXIFTAG_CUSTOMRENDERED, EXIFTAG_EXPOSUREMODE, EXIFTAG_WHITEBALANCE, ++ EXIFTAG_DIGITALZOOMRATIO, EXIFTAG_FOCALLENGTHIN35MMFILM, ++ EXIFTAG_SCENECAPTURETYPE, EXIFTAG_GAINCONTROL, EXIFTAG_CONTRAST, ++ EXIFTAG_SATURATION, EXIFTAG_SHARPNESS, EXIFTAG_DEVICESETTINGDESCRIPTION, ++ EXIFTAG_SUBJECTDISTANCERANGE, EXIFTAG_GAINCONTROL, EXIFTAG_GAINCONTROL, ++ EXIFTAG_IMAGEUNIQUEID ++}; ++static int nExifTags = sizeof(exif_tag_ids) / sizeof(exif_tag_ids[0]); ++ + /** + Read a single Exif tag + +@@ -575,43 +639,10 @@ tiff_read_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + + // loop over all Core Directory Tags + // ### uses private data, but there is no other way ++ // -> vcpkg: Best we can do without private headers is to hard-code a list of known EXIF tags and read those + if(md_model == TagLib::EXIF_MAIN) { +- const TIFFDirectory *td = &tif->tif_dir; +- +- uint32 lastTag = 0; //<- used to prevent reading some tags twice (as stored in tif_fieldinfo) +- +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); +- +- if(tag_id == lastTag) { +- continue; +- } +- +- // test if tag value is set +- // (lifted directly from LibTiff _TIFFWriteDirectory) +- +- if( fld->field_bit == FIELD_CUSTOM ) { +- int is_set = FALSE; +- +- for(int ci = 0; ci < td->td_customValueCount; ci++ ) { +- is_set |= (td->td_customValues[ci].info == fld); +- } +- +- if( !is_set ) { +- continue; +- } +- +- } else if(!TIFFFieldSet(tif, fld->field_bit)) { +- continue; +- } +- +- // process *all* other tags (some will be ignored) +- +- tiff_read_exif_tag(tif, tag_id, dib, md_model); +- +- lastTag = tag_id; ++ for (int i = 0; i < nExifTags; ++i) { ++ tiff_read_exif_tag(tif, exif_tag_ids[i], dib, md_model); + } + + } +@@ -723,10 +754,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + + TagLib& tag_lib = TagLib::instance(); + +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); ++ for (int fi = 0, nfi = nExifTags; nfi > 0; nfi--, fi++) { ++ const uint32 tag_id = exif_tag_ids[fi]; ++ const TIFFField *fld = TIFFFieldWithTag(tif, tag_id); + + if(skip_write_field(tif, tag_id)) { + // skip tags that are already handled by the LibTIFF writing process +@@ -749,7 +779,7 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + continue; + } + // type of storage may differ (e.g. rationnal array vs float array type) +- if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) { ++ if((unsigned)FreeImage_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) { + // skip tag or _TIFFmemcpy will fail + continue; + } diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-openexr.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-openexr.patch new file mode 100644 index 0000000000000000000000000000000000000000..4f02f71329fa486bf197dacd66dd787d9d7c47e0 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-openexr.patch @@ -0,0 +1,72 @@ +diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp +index b286430..82b3b72 100644 +--- a/Source/FreeImage/PluginEXR.cpp ++++ b/Source/FreeImage/PluginEXR.cpp +@@ -28,16 +28,16 @@ + #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning) + #endif + +-#include "../OpenEXR/IlmImf/ImfIO.h" +-#include "../OpenEXR/Iex/Iex.h" +-#include "../OpenEXR/IlmImf/ImfOutputFile.h" +-#include "../OpenEXR/IlmImf/ImfInputFile.h" +-#include "../OpenEXR/IlmImf/ImfRgbaFile.h" +-#include "../OpenEXR/IlmImf/ImfChannelList.h" +-#include "../OpenEXR/IlmImf/ImfRgba.h" +-#include "../OpenEXR/IlmImf/ImfArray.h" +-#include "../OpenEXR/IlmImf/ImfPreviewImage.h" +-#include "../OpenEXR/Half/half.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + + // ========================================================== +@@ -66,11 +66,11 @@ public: + return ((unsigned)n != _io->read_proc(c, 1, n, _handle)); + } + +- virtual Imath::Int64 tellg() { ++ virtual uint64_t tellg() { + return _io->tell_proc(_handle); + } + +- virtual void seekg(Imath::Int64 pos) { ++ virtual void seekg(uint64_t pos) { + _io->seek_proc(_handle, (unsigned)pos, SEEK_SET); + } + +@@ -100,11 +100,11 @@ public: + } + } + +- virtual Imath::Int64 tellp() { ++ virtual uint64_t tellp() { + return _io->tell_proc(_handle); + } + +- virtual void seekp(Imath::Int64 pos) { ++ virtual void seekp(uint64_t pos) { + _io->seek_proc(_handle, (unsigned)pos, SEEK_SET); + } + }; +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index 562fdd7..ce12649 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -39,7 +39,7 @@ + #include "Utilities.h" + #include + #include "../Metadata/FreeImageTag.h" +-#include "../OpenEXR/Half/half.h" ++#include + + #include "FreeImageIO.h" + #include "PSDParser.h" diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-openjpeg.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-openjpeg.patch new file mode 100644 index 0000000000000000000000000000000000000000..fa4f8e7b6e79139f4b4682dd6b06398077c5d3ca --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-openjpeg.patch @@ -0,0 +1,39 @@ +diff --git a/Source/FreeImage/J2KHelper.cpp b/Source/FreeImage/J2KHelper.cpp +index 1776c3b..538f1c5 100644 +--- a/Source/FreeImage/J2KHelper.cpp ++++ b/Source/FreeImage/J2KHelper.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // -------------------------------------------------------------------------- +diff --git a/Source/FreeImage/PluginJ2K.cpp b/Source/FreeImage/PluginJ2K.cpp +index b8bcfc8..621a903 100644 +--- a/Source/FreeImage/PluginJ2K.cpp ++++ b/Source/FreeImage/PluginJ2K.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== +diff --git a/Source/FreeImage/PluginJP2.cpp b/Source/FreeImage/PluginJP2.cpp +index 742fe2c..c57f626 100644 +--- a/Source/FreeImage/PluginJP2.cpp ++++ b/Source/FreeImage/PluginJP2.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-png-zlib.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-png-zlib.patch new file mode 100644 index 0000000000000000000000000000000000000000..da489b6b82cd456fada283229f37ba6dbbc02971 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-png-zlib.patch @@ -0,0 +1,40 @@ +diff --git a/Source/FreeImage/PluginPNG.cpp b/Source/FreeImage/PluginPNG.cpp +index ba2ef17..c3c5cd6 100644 +--- a/Source/FreeImage/PluginPNG.cpp ++++ b/Source/FreeImage/PluginPNG.cpp +@@ -40,8 +40,8 @@ + + // ---------------------------------------------------------- + +-#include "../ZLib/zlib.h" +-#include "../LibPNG/png.h" ++#include ++#include + + // ---------------------------------------------------------- + +diff --git a/Source/FreeImage/ZLibInterface.cpp b/Source/FreeImage/ZLibInterface.cpp +index 3ab6d32..725618b 100644 +--- a/Source/FreeImage/ZLibInterface.cpp ++++ b/Source/FreeImage/ZLibInterface.cpp +@@ -19,10 +19,9 @@ + // Use at your own risk! + // ========================================================== + +-#include "../ZLib/zlib.h" ++#include + #include "FreeImage.h" + #include "Utilities.h" +-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ + + /** + Compresses a source buffer into a target buffer, using the ZLib library. +@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_s + return 0; + case Z_OK: { + // patch header, setup crc and length (stolen from mod_trace_output) +- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code ++ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code + crc = crc32(crc, source, source_size); + memcpy(target + 4 + dest_len, &crc, 4); + memcpy(target + 8 + dest_len, &source_size, 4); diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-rawlib.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-rawlib.patch new file mode 100644 index 0000000000000000000000000000000000000000..6afa0bffa254999c626dec34c25fac98de1e376a --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-rawlib.patch @@ -0,0 +1,13 @@ +diff --git a/Source/FreeImage/PluginRAW.cpp b/Source/FreeImage/PluginRAW.cpp +index e9bd5bf..c7f8758 100644 +--- a/Source/FreeImage/PluginRAW.cpp ++++ b/Source/FreeImage/PluginRAW.cpp +@@ -19,7 +19,7 @@ + // Use at your own risk! + // ========================================================== + +-#include "../LibRawLite/libraw/libraw.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-webp.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-webp.patch new file mode 100644 index 0000000000000000000000000000000000000000..4d1757c395fd7d0207c0674c825e20e3f9d70724 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-external-webp.patch @@ -0,0 +1,17 @@ +diff --git a/Source/FreeImage/PluginWebP.cpp b/Source/FreeImage/PluginWebP.cpp +index 7c9f62f..c401447 100644 +--- a/Source/FreeImage/PluginWebP.cpp ++++ b/Source/FreeImage/PluginWebP.cpp +@@ -24,9 +24,9 @@ + + #include "../Metadata/FreeImageTag.h" + +-#include "../LibWebP/src/webp/decode.h" +-#include "../LibWebP/src/webp/encode.h" +-#include "../LibWebP/src/webp/mux.h" ++#include ++#include ++#include + + // ========================================================== + // Plugin Interface diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-freeimage-config-include.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-freeimage-config-include.patch new file mode 100644 index 0000000000000000000000000000000000000000..579f08845e1d61b996482aa73c33e5df6a5ccd4f --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-freeimage-config-include.patch @@ -0,0 +1,16 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 12182cd..86a1e68 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -32,6 +32,11 @@ + #define FREEIMAGE_MINOR_VERSION 18 + #define FREEIMAGE_RELEASE_SERIAL 0 + ++// vcpkg specific includes -------------------------------------------------- ++// Include FreeImageConfig.h to define FREEIMAGE_LIB in static builds, ++// or do not define it in dynamic builds ++#include "FreeImageConfig.h" ++ + // Compiler options --------------------------------------------------------- + + #include // needed for UNICODE functions diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch new file mode 100644 index 0000000000000000000000000000000000000000..270331e26c07cef60b252d8ff754b0ee07d1b78b --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch @@ -0,0 +1,31 @@ +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index a9fcf0e..b1f7b32 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -258,7 +258,7 @@ static void + msdosWarningHandler(const char* module, const char* fmt, va_list ap) { + } + +-TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler; ++//TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler; + + static void + msdosErrorHandler(const char* module, const char* fmt, va_list ap) { +@@ -273,7 +273,7 @@ msdosErrorHandler(const char* module, const char* fmt, va_list ap) { + */ + } + +-TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler; ++//TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler; + + // ---------------------------------------------------------- + +@@ -2659,6 +2659,8 @@ InitTIFF(Plugin *plugin, int format_id) { + // Set up the callback for extended TIFF directory tag support (see XTIFF.cpp) + // Must be called before using libtiff + XTIFFInitialize(); ++ TIFFSetWarningHandler(msdosWarningHandler); ++ TIFFSetErrorHandler(msdosErrorHandler); + + plugin->format_proc = Format; + plugin->description_proc = Description; diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-typedef-as-already-declared.patch b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-typedef-as-already-declared.patch new file mode 100644 index 0000000000000000000000000000000000000000..80d367bcb5feb14adf0ccec93e85ea757333dd81 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/use-typedef-as-already-declared.patch @@ -0,0 +1,15 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 1fd9c2f..59de277 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -160,8 +160,8 @@ typedef uint8_t BYTE; + typedef uint16_t WORD; + typedef uint32_t DWORD; + typedef int32_t LONG; +-typedef int64_t INT64; +-typedef uint64_t UINT64; ++typedef long long int INT64; ++typedef long long unsigned int UINT64; + #else + // MS is not C99 ISO compliant + typedef long BOOL; diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..ef75a78dd77bb0ccfcc950669b0db21eb16a3983 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/freeimage/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "freeimage", + "version": "3.18.0", + "port-version": 25, + "description": "Support library for graphics image formats", + "homepage": "https://sourceforge.net/projects/freeimage/", + "license": "GPL-2.0-only OR GPL-3.0-only OR FreeImage", + "dependencies": [ + "imath", + "jxrlib", + "libjpeg-turbo", + "libpng", + "libraw", + { + "name": "libwebp", + "platform": "!uwp" + }, + "openexr", + "openjpeg", + "tiff", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/hps/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/hps/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..2104177fe393cee7af7e3c8b95da2522c870cbe6 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/hps/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jl2922/hps + REF 8d1403697a2fad6ddf02c7afb190596ca68b2105 + SHA512 e0c22de8a684891a5b6faa968c72782ffb44c5359ce53a4cbd74abf5e1b6d5d1ff30ce96a4fc4c38fc7a0222d6874eab47b76c5a87fce1c43285a915d0f55814 + HEAD_REF master +) + +# Install header files +file(INSTALL + DIRECTORY + "${SOURCE_PATH}/src/" + DESTINATION + "${CURRENT_PACKAGES_DIR}/include/${PORT}" + FILES_MATCHING PATTERN "*.h" ) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/${PORT}/benchmark") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/hps/usage b/cc-multilingual-main/cc_net/vcpkg/ports/hps/usage new file mode 100644 index 0000000000000000000000000000000000000000..198508212306b31ae2b946e3cef60dea1674198f --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/hps/usage @@ -0,0 +1,4 @@ +The package hps is header only and can be used from CMake via: + + find_path(HPS_INCLUDE_DIRS "hps/hps.h") + target_include_directories(main PRIVATE ${HPS_INCLUDE_DIRS}) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libnice/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/libnice/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..5758a61f7c9372e7c1a3f66ff2d57ff6dcf62a4b --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libnice/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org + OUT_SOURCE_PATH SOURCE_PATH + REPO libnice/libnice + REF 0.1.21 + SHA512 8808523d663da5974e81ffeef10812b758792b1f762edc1f3713d09962598a8a30d17ac1985438361d2a284b9bc82b5ba1e8d73c6e1ca86c93901bc06b634e9a + HEAD_REF master +) + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dgtk_doc=disabled #Enable generating the API reference (depends on GTK-Doc) + -Dintrospection=disabled #Enable GObject Introspection (depends on GObject)' + -Dtests=disabled + -Dexamples=disabled + -Dgstreamer=disabled + -Dcrypto-library=openssl + ADDITIONAL_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' +) + +# Could be features: +# option('gupnp', type: 'feature', value: 'auto', + # description: 'Enable or disable GUPnP IGD support') +# option('ignored-network-interface-prefix', type: 'array', value: ['docker', 'veth', 'virbr', 'vnet'], + # description: 'Ignore network interfaces whose name starts with a string from this list in the ICE connection check algorithm. For example, "virbr" to ignore virtual bridge interfaces added by virtd, which do not help in finding connectivity.') +# option('crypto-library', type: 'combo', choices : ['auto', 'gnutls', 'openssl'], value : 'auto') + +vcpkg_install_meson() + +vcpkg_copy_pdbs() +vcpkg_copy_tools(TOOL_NAMES stunbdc stund AUTO_CLEAN) +vcpkg_fixup_pkgconfig() + +vcpkg_install_copyright( + FILE_LIST + "${SOURCE_PATH}/COPYING" + "${SOURCE_PATH}/COPYING.LGPL" + "${SOURCE_PATH}/COPYING.MPL" +) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libnice/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/libnice/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..481ec1367d0e097e87502d186712523076389774 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libnice/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "libnice", + "version": "0.1.21", + "port-version": 2, + "description": "Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389).", + "homepage": "https://nice.freedesktop.org", + "license": "LGPL-2.1-only AND MPL-1.1", + "supports": "!xbox", + "dependencies": [ + "glib", + { + "name": "glib", + "host": true, + "default-features": false + }, + "openssl", + { + "name": "vcpkg-tool-meson", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libsoundio/fix_cmakelists.patch b/cc-multilingual-main/cc_net/vcpkg/ports/libsoundio/fix_cmakelists.patch new file mode 100644 index 0000000000000000000000000000000000000000..b25f58824a7d09644e9b18fe45d38d3e09b1493e --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libsoundio/fix_cmakelists.patch @@ -0,0 +1,58 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6541f1b..e81bdce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,5 @@ +-cmake_minimum_required(VERSION 2.8.5) ++cmake_minimum_required(VERSION 3.14) ++cmake_policy(SET CMP0022 NEW) + project(libsoundio C) + set(CMAKE_MODULE_PATH ${libsoundio_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) + +@@ -233,7 +234,8 @@ if(BUILD_DYNAMIC_LIBS) + LINKER_LANGUAGE C + ) + target_link_libraries(libsoundio_shared LINK_PUBLIC ${LIBSOUNDIO_LIBS}) +- install(TARGETS libsoundio_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_include_directories(libsoundio_shared PUBLIC $) ++ install(TARGETS libsoundio_shared EXPORT libsoundio-export) + endif() + + if(BUILD_STATIC_LIBS) +@@ -204,8 +206,7 @@ if(MSVC) + set(EXAMPLE_CFLAGS "/W4") + set(TEST_CFLAGS "${LIB_CFLAGS}") + set(TEST_LDFLAGS " ") + set(LIBM " ") + else() +- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror -pedantic") + set(LIB_CFLAGS "-std=c11 -fvisibility=hidden -Wall -Werror=strict-prototypes -Werror=old-style-definition -Werror=missing-prototypes -D_REENTRANT -D_POSIX_C_SOURCE=200809L -Wno-missing-braces") + set(EXAMPLE_CFLAGS "-std=c99 -Wall") +@@ -243,9 +244,26 @@ if(BUILD_STATIC_LIBS) + COMPILE_FLAGS ${LIB_CFLAGS} + LINKER_LANGUAGE C + ) +- install(TARGETS libsoundio_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_link_libraries(libsoundio_static PUBLIC ${LIBSOUNDIO_LIBS}) ++ target_include_directories(libsoundio_static PUBLIC $) ++ install(TARGETS libsoundio_static EXPORT libsoundio-export) + endif() + ++add_library(libsoundio INTERFACE) ++if(BUILD_DYNAMIC_LIBS) ++ target_link_libraries(libsoundio INTERFACE libsoundio_shared) ++else() ++ target_link_libraries(libsoundio INTERFACE libsoundio_static) ++endif() ++install(TARGETS libsoundio EXPORT libsoundio-export) ++install( ++ EXPORT libsoundio-export ++ FILE libsoundio-config.cmake ++ DESTINATION share/libsoundio/ ++ NAMESPACE ${PROJECT_NAME}:: ++ EXPORT_LINK_INTERFACE_LIBRARIES ++) ++ + install(FILES + ${LIBSOUNDIO_HEADERS} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/soundio") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libsoundio/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/libsoundio/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..86ceea181be98b075b7eb20741d5fbe2d569a21e --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libsoundio/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO andrewrk/libsoundio + REF 2.0.0 + SHA512 347a9be1789a41e778ea8d0efa1d00e03e725a4ab65e3aaf6c71e49138643f08a50a81bd60087d86a3b4d63beaeec617e47ba6b81f829ece8a3ac17418eb5309 + HEAD_REF master + PATCHES + fix_cmakelists.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_DYNAMIC_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + alsa ENABLE_ALSA + jack ENABLE_JACK + pulseaudio ENABLE_PULSEAUDIO +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_DYNAMIC_LIBS=${BUILD_DYNAMIC_LIBS} + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DBUILD_EXAMPLE_PROGRAMS=OFF + -DBUILD_TESTS=OFF + ${FEATURE_OPTIONS} + -DENABLE_COREAUDIO=${VCPKG_TARGET_IS_OSX} + -DENABLE_WASAPI=${VCPKG_TARGET_IS_WINDOWS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() +vcpkg_copy_pdbs() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +endif() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/libsoundio/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/libsoundio/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..230ade61fb2509e6cb0b7705a1c76aa64e7a18d1 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/libsoundio/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "libsoundio", + "version": "2.0.0", + "port-version": 7, + "description": "libsoundio is C library providing cross-platform audio input and output.", + "homepage": "http://libsound.io/", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "alsa": { + "description": "ALSA backend for libsoundio" + }, + "jack": { + "description": "JACK backend for libsoundio", + "dependencies": [ + "jack2" + ] + }, + "pulseaudio": { + "description": "PulseAudio backend for libsoundio" + } + } +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/cmake_fix.patch b/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/cmake_fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..96c569c2cd68690fd6e4204a7fc56f6cf9664e75 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/cmake_fix.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 75f367f..6ef3dc2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,7 +190,7 @@ add_subdirectory(Core) + export( + TARGETS MOOS + NAMESPACE MOOS:: +- FILE UseMOOS.cmake ++ FILE UseMOOSTargets.cmake + ) + + # Support existing projects that expect to find MOOS_LIBRARIES and +@@ -222,7 +222,7 @@ set(PROJECT_CONFIG_PATH "lib/cmake/MOOS") + install( + EXPORT MOOS + NAMESPACE MOOS:: +- FILE UseMOOS.cmake ++ FILE UseMOOSTargets.cmake + DESTINATION ${PROJECT_CONFIG_PATH} + ) + +diff --git a/Core/libMOOS/CMakeLists.txt b/Core/libMOOS/CMakeLists.txt +index b74a30f..492df50 100644 +--- a/Core/libMOOS/CMakeLists.txt ++++ b/Core/libMOOS/CMakeLists.txt +@@ -196,7 +196,7 @@ mark_as_advanced(TIME_WARP_AGGLOMERATION_CONSTANT) + install( + DIRECTORY ${INCLUDE_ROOTS} + DESTINATION . +- FILES_MATCHING PATTERN "*.h" PATTERN "*.hxx" ++ FILES_MATCHING PATTERN "*.h" PATTERN "*.hxx" PATTERN "*.hpp" + ) + + # install libraries +diff --git a/MOOSConfig.cmake.in b/MOOSConfig.cmake.in +index 10af599..dff769a 100644 +--- a/MOOSConfig.cmake.in ++++ b/MOOSConfig.cmake.in +@@ -2,7 +2,7 @@ + + # Pick up the auto-generated file which knows how to add the imported library + # targets for the libraries that MOOS exports. +-set(exports_file "${CMAKE_CURRENT_LIST_DIR}/UseMOOS.cmake") ++set(exports_file "${CMAKE_CURRENT_LIST_DIR}/UseMOOSTargets.cmake") + include(${exports_file}) + + include(FindPackageHandleStandardArgs) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/include_functional.patch b/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/include_functional.patch new file mode 100644 index 0000000000000000000000000000000000000000..1245ca8731dbdc4075af680a08caa98f30d61867 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/include_functional.patch @@ -0,0 +1,12 @@ +diff --git a/Core/libMOOS/Utils/MOOSUtilityFunctions.cpp b/Core/libMOOS/Utils/MOOSUtilityFunctions.cpp +index 9d4473f..3f91018 100644 +--- a/Core/libMOOS/Utils/MOOSUtilityFunctions.cpp ++++ b/Core/libMOOS/Utils/MOOSUtilityFunctions.cpp +@@ -47,6 +47,7 @@ + #include + #include + #include ++#include + + #ifndef _WIN32 + #include diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..3bd8a627b93ebe92020f0a1581ab4bb8c833a13c --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO themoos/core-moos + REF "v${VERSION}" + SHA512 8a82074bd219bbedbe56c2187afe74a55a252b0654a675c64d1f75e62353b0874e7b405d9f677fadb297e955d11aea50a07e8f5f3546be3c4ddab76fe356a51e + HEAD_REF master + PATCHES + cmake_fix.patch + include_functional.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/MOOS) + +# Stage tools +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/${PORT}") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/Core/GPLCore.txt") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..2fc2564e54e37e2d8acb21b6df5ff704aa76f377 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/moos-core/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "moos-core", + "version": "10.4.0", + "port-version": 10, + "description": "A very light weight, easy to use middleware.", + "homepage": "https://sites.google.com/site/moossoftware/", + "license": "GPL-2.0-or-later", + "supports": "!xbox & !uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/nanort/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/nanort/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..d6e774a5263c00f7ef9b40cd834569821ed4d5c0 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/nanort/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lighttransport/nanort + REF c85fe7a10be5baf8242c81288718c244f25d0183 + SHA512 0917ffdc51db9d5f936fc79d5b3d1886c5163470e650a2613200417a9e7a344b75c76c115f64160877d6a3480f7eda7884f3097927eb371267cc6d3c30afed37 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/nanort.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/nanort/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/nanort/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..bb1265efa974e1d08f93f7988160ae50d62f4537 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/nanort/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "nanort", + "version-date": "2019-08-20", + "port-version": 3, + "description": "Single header only modern ray tracing kernel", + "homepage": "https://github.com/lighttransport/nanort" +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/ncnn/fix_uwp.patch b/cc-multilingual-main/cc_net/vcpkg/ports/ncnn/fix_uwp.patch new file mode 100644 index 0000000000000000000000000000000000000000..d678464aeaa3dc9fabd3df8b086cfd2f681bed1b --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/ncnn/fix_uwp.patch @@ -0,0 +1,42 @@ +diff --git a/src/cpu.cpp b/src/cpu.cpp +index e56cd67..3ca1189 100644 +--- a/src/cpu.cpp ++++ b/src/cpu.cpp +@@ -184,6 +184,13 @@ static int g_cpu_is_arm_a53_a55; + #endif // defined __ANDROID__ || defined __linux__ + + #if defined _WIN32 ++#if WINAPI_FAMILY == WINAPI_FAMILY_APP ++static int detectisa(const void* /*some_inst*/) ++{ ++ // uwp does not support seh :( ++ return 0; ++} ++#else // WINAPI_FAMILY == WINAPI_FAMILY_APP + static int g_sigill_caught = 0; + static jmp_buf g_jmpbuf; + +@@ -213,6 +220,7 @@ static int detectisa(const void* some_inst) + + return g_sigill_caught ? 0 : 1; + } ++#endif // WINAPI_FAMILY == WINAPI_FAMILY_APP + + #if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64) + #ifdef _MSC_VER +@@ -1966,12 +1974,12 @@ static void initialize_global_cpu_info() + + #if defined _WIN32 + #if __arm__ +- g_cpu_support_arm_neon = detectisa(some_neon); ++ g_cpu_support_arm_neon = 1; // all modern windows arm devices have neon + g_cpu_support_arm_vfpv4 = detectisa(some_vfpv4); + #if __aarch64__ + g_cpu_support_arm_cpuid = detectisa(some_cpuid); +- g_cpu_support_arm_asimdhp = detectisa(some_asimdhp); +- g_cpu_support_arm_asimddp = detectisa(some_asimddp); ++ g_cpu_support_arm_asimdhp = detectisa(some_asimdhp) || IsProcessorFeaturePresent(43); // dp implies hp ++ g_cpu_support_arm_asimddp = detectisa(some_asimddp) || IsProcessorFeaturePresent(43); // 43 is PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE + g_cpu_support_arm_asimdfhm = detectisa(some_asimdfhm); + g_cpu_support_arm_bf16 = detectisa(some_bf16); + g_cpu_support_arm_i8mm = detectisa(some_i8mm); diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/ncnn/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/ncnn/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..a3dec468a362ed4c3403e2ebf76cfaac46b57a8a --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/ncnn/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tencent/ncnn + REF "${VERSION}" + SHA512 31bc3c2f461a00241fb8f69ca6ea8cc590af6618856b1b84a048bde924e4b474fd883ad5d54dbfbdd1e5b59015889e15ffc4fbafccb3e42e052a02071f2017b1 + HEAD_REF master + PATCHES + fix_uwp.patch #https://github.com/Tencent/ncnn/pull/5328 +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DNCNN_BUILD_TOOLS=OFF + -DNCNN_BUILD_EXAMPLES=OFF + -DNCNN_BUILD_BENCHMARK=OFF + -DNCNN_SHARED_LIB=${BUILD_SHARED} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ncnn) +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/ncnn/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/ncnn/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..28be929f74ac3d9ac57ca82aa2020895c5cf3fa4 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/ncnn/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "ncnn", + "version": "20240102", + "description": "ncnn is a high-performance neural network inference computing framework.", + "homepage": "https://github.com/Tencent/ncnn", + "license": "BSD-3-Clause", + "supports": "!(windows & arm)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/pipewire/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/pipewire/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..e3f72f7c4d814dd6fe033cc123b83e8744b26483 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/pipewire/portfile.cmake @@ -0,0 +1,93 @@ +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org/ + OUT_SOURCE_PATH SOURCE_PATH + REPO pipewire/pipewire + REF "${VERSION}" + SHA512 3884a64ce4d467665d34ee39e84ab394e4fe7c24bc006efe1f6ba78649e9fe3693c65f2173a4b0bf0979786309a5b12bc8b90aab3f6cbc223db596c44d00f4cc + HEAD_REF master # branch name +) + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dalsa=disabled + -Daudioconvert=enabled + -Daudiomixer=disabled + -Daudiotestsrc=disabled + -Davahi=disabled + -Dbluez5-backend-hfp-native=disabled + -Dbluez5-backend-hsp-native=disabled + -Dbluez5-backend-hsphfpd=disabled + -Dbluez5-backend-ofono=disabled + -Dbluez5-codec-aac=disabled + -Dbluez5-codec-aptx=disabled + -Dbluez5-codec-lc3plus=disabled + -Dbluez5-codec-ldac=disabled + -Dbluez5=disabled + -Dcontrol=disabled + -Ddbus=disabled + -Ddocs=disabled + -Decho-cancel-webrtc=disabled + -Devl=disabled + -Dexamples=disabled + -Dffmpeg=disabled + -Dgstreamer-device-provider=disabled + -Dgstreamer=disabled + -Dinstalled_tests=disabled + -Djack-devel=false + -Djack=disabled + -Dlegacy-rtkit=false + -Dlibcamera=disabled + -Dlibcanberra=disabled + -Dlibpulse=disabled + -Dlibusb=disabled + -Dlv2=disabled + -Dman=disabled + -Dpipewire-alsa=disabled + -Dpipewire-jack=disabled + -Dpipewire-v4l2=disabled + -Dpw-cat=disabled + -Draop=disabled + -Droc=disabled + -Dsdl2=disabled + -Dsndfile=disabled + -Dspa-plugins=enabled # This one must be enabled or the resulting build won't be able to connect to pipewire daemon + -Dsupport=enabled # This one must be enabled or the resulting build won't be able to connect to pipewire daemon + -Dsystemd-system-service=disabled + -Dsystemd-system-unit-dir=disabled + -Dsystemd-user-service=disabled + -Dsystemd-user-unit-dir=disabled + -Dsystemd=disabled + -Dtest=disabled + -Dtests=disabled + -Dudev=disabled + -Dudevrulesdir=disabled + -Dv4l2=disabled + -Dvideoconvert=disabled + -Dvideotestsrc=disabled + -Dvolume=disabled + -Dvulkan=disabled + -Dx11-xfixes=disabled + -Dx11=disabled + -Dsession-managers=[] +) +vcpkg_install_meson() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +# remove absolute paths +file(GLOB config_files "${CURRENT_PACKAGES_DIR}/share/${PORT}/*.conf") +foreach(file ${config_files}) + vcpkg_replace_string("${file}" "in ${CURRENT_PACKAGES_DIR}/etc/pipewire for system-wide changes\n# or" "") + cmake_path(GET file FILENAME filename) + vcpkg_replace_string("${file}" "# ${CURRENT_PACKAGES_DIR}/etc/pipewire/${filename}.d/ for system-wide changes or in" "") +endforeach() +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/pipewire/pipewire.conf" "${CURRENT_PACKAGES_DIR}/bin" "") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/pipewire/minimal.conf" "${CURRENT_PACKAGES_DIR}/bin" "") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/pipewire/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/pipewire/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..38d3accc090e171d6f5ac38bfb7f373eaaec4c3f --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/pipewire/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "pipewire", + "version": "1.0.3", + "description": "Low-latency audio/video router and processor. This port only builds the client library, not the server.", + "homepage": "https://pipewire.org", + "license": "MIT", + "supports": "linux", + "dependencies": [ + "glib", + { + "name": "vcpkg-tool-meson", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/qthttpserver/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/qthttpserver/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..120f46074945d620b11b2f8f30cddb83f4566766 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/qthttpserver/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "qthttpserver", + "version": "6.6.1", + "port-version": 1, + "description": "Qt HTTP Server supports building HTTP server functionality into an application.", + "homepage": "https://www.qt.io/", + "license": null, + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "concurrent", + "network" + ] + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/CMakeLists.txt b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..60f38348ab4df079a67a296b5e4eb827e2bacc10 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.14) + +project(tinyexpr LANGUAGES C) + +include(CheckSymbolExists) +include(GNUInstallDirs) + +if(WIN32 AND BUILD_SHARED_LIBS) + add_library(tinyexpr tinyexpr.c exports.def) +else() + add_library(tinyexpr tinyexpr.c) +endif() + +target_include_directories( + tinyexpr + PUBLIC + $ +) + +# https://stackoverflow.com/questions/32816646/can-cmake-detect-if-i-need-to-link-to-libm-when-using-pow-in-c +if(NOT POW_FUNCTION_EXISTS AND NOT NEED_LINKING_AGAINST_LIBM) + check_symbol_exists(pow "math.h" POW_FUNCTION_EXISTS) + if(NOT POW_FUNCTION_EXISTS) + unset(POW_FUNCTION_EXISTS CACHE) + list(APPEND CMAKE_REQUIRED_LIBRARIES m) + check_symbol_exists(pow "math.h" POW_FUNCTION_EXISTS) + if(POW_FUNCTION_EXISTS) + set(NEED_LINKING_AGAINST_LIBM True CACHE BOOL "" FORCE) + else() + message(FATAL_ERROR "Failed making the pow() function available") + endif() + endif() +endif() + +if(NEED_LINKING_AGAINST_LIBM) + target_link_libraries(tinyexpr PUBLIC m) +endif() + +set_target_properties(tinyexpr PROPERTIES PUBLIC_HEADER tinyexpr.h) + +install(TARGETS tinyexpr EXPORT unofficial-tinyexpr-config) + +install( + EXPORT unofficial-tinyexpr-config + NAMESPACE unofficial::tinyexpr:: + DESTINATION share/unofficial-tinyexpr + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/exports.def b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/exports.def new file mode 100644 index 0000000000000000000000000000000000000000..a43f437d27c950f221c62309c8a3a9b366573483 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/exports.def @@ -0,0 +1,6 @@ +EXPORTS + te_compile + te_eval + te_free + te_interp + te_print diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/fix-issue-34.patch b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/fix-issue-34.patch new file mode 100644 index 0000000000000000000000000000000000000000..000fea053e6086733ef9ea4cfdda99947a4201b6 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/fix-issue-34.patch @@ -0,0 +1,16 @@ +diff --git a/tinyexpr.c b/tinyexpr.c +index 90ed8fc..570f2fd 100755 +--- a/tinyexpr.c ++++ b/tinyexpr.c +@@ -49,6 +49,11 @@ For log = natural log uncomment the next line. */ + #define INFINITY (1.0/0.0) + #endif + ++/* https://github.com/codeplea/tinyexpr/issues/34 */ ++#ifdef _MSC_VER ++#pragma function(ceil) ++#pragma function(floor) ++#endif + + typedef double (*te_fun2)(double, double); + diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..968f1befb090e5685f21b166998606a4de2df601 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO codeplea/tinyexpr + REF ffb0d41b13e5f8d318db95feb071c220c134fe70 + SHA512 fe4975f8b444a50d7ba8135450a42007a81f1545eebd7775f92307b87b72bc9abee4591e56ddeb76ec9e5aa41f0852ba98c99881d671f47a58caca8bd1ca9999 + HEAD_REF master + PATCHES + fix-issue-34.patch +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/exports.def" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..7b55dfe28dc98a2388c7179ef44ee1d8388cfa7f --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/tinyexpr/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "tinyexpr", + "version-date": "2020-09-25", + "port-version": 2, + "description": "Tiny recursive descent parser and evaluation engine in C", + "homepage": "https://codeplea.com/tinyexpr", + "license": "Zlib", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/v8/V8Config-shared.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/v8/V8Config-shared.cmake new file mode 100644 index 0000000000000000000000000000000000000000..fadfdb5acdc50f3e5f2d23bca1b90eb08642b746 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/v8/V8Config-shared.cmake @@ -0,0 +1,111 @@ +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +include(SelectLibraryConfigurations) + +find_path(V8_INCLUDE_DIR NAMES v8.h PATH_SUFFIXES include) + +if(EXISTS ${_IMPORT_PREFIX}/bin/snapshot_blob.bin) + set(V8_SNAPSHOT_BLOB_RELEASE ${_IMPORT_PREFIX}/bin/snapshot_blob.bin CACHE FILEPATH "Release version of V8 snapshot blob location") +endif() +if(EXISTS ${_IMPORT_PREFIX}/debug/bin/snapshot_blob.bin) + set(V8_SNAPSHOT_BLOB_DEBUG ${_IMPORT_PREFIX}/debug/bin/snapshot_blob.bin CACHE FILEPATH "Debug version of V8 snapshot blob location") +endif() +set(V8_SNAPSHOT_BLOB "$,${V8_SNAPSHOT_BLOB_DEBUG},${V8_SNAPSHOT_BLOB_RELEASE}>") + +if(EXISTS "${_IMPORT_PREFIX}/lib/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8_LIBRARY_RELEASE "${_IMPORT_PREFIX}/lib/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Release version of the V8 library location") +endif() +if(EXISTS "${_IMPORT_PREFIX}/debug/lib/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8_LIBRARY_DEBUG "${_IMPORT_PREFIX}/debug/lib/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Debug version of the V8 library location") +endif() +select_library_configurations(V8) + +if(EXISTS "${_IMPORT_PREFIX}/lib/v8_libbase${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8LIBBASE_LIBRARY_RELEASE "${_IMPORT_PREFIX}/lib/v8_libbase${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Release version of the V8 libbase library location") +endif() +if(EXISTS "${_IMPORT_PREFIX}/debug/lib/v8_libbase${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8LIBBASE_LIBRARY_DEBUG "${_IMPORT_PREFIX}/debug/lib/v8_libbase${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Debug version of the V8 libbase library location") +endif() +select_library_configurations(V8LIBBASE) + +if(EXISTS "${_IMPORT_PREFIX}/lib/v8_libplatform${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8LIBPLATFORM_LIBRARY_RELEASE "${_IMPORT_PREFIX}/lib/v8_libplatform${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Release version of the V8 libplatform library location") +endif() +if(EXISTS "${_IMPORT_PREFIX}/debug/lib/v8_libplatform${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8LIBPLATFORM_LIBRARY_DEBUG "${_IMPORT_PREFIX}/debug/lib/v8_libplatform${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Delete version of the V8 libplatform library location") +endif() +select_library_configurations(V8LIBPLATFORM) + +mark_as_advanced(V8_INCLUDE_DIR) + +if(V8_INCLUDE_DIR AND EXISTS "${V8_INCLUDE_DIR}/v8-version.h") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_MAJOR_VERSION REGEX "^#define V8_MAJOR_VERSION [0-9]+.*$") + string(REGEX REPLACE "^#define V8_MAJOR_VERSION ([0-9]+).*$" "\\1" V8_MAJOR_VERSION "${V8_MAJOR_VERSION}") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_MINOR_VERSION REGEX "^#define V8_MINOR_VERSION [0-9]+.*$") + string(REGEX REPLACE "^#define V8_MINOR_VERSION ([0-9]+).*$" "\\1" V8_MINOR_VERSION "${V8_MINOR_VERSION}") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_BUILD_NUMBER REGEX "^#define V8_BUILD_NUMBER [0-9]+.*$") + string(REGEX REPLACE "^#define V8_BUILD_NUMBER ([0-9]+).*$" "\\1" V8_BUILD_NUMBER "${V8_BUILD_NUMBER}") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_PATCH_LEVEL REGEX "^#define V8_PATCH_LEVEL [0-9]+.*$") + string(REGEX REPLACE "^#define V8_PATCH_LEVEL ([0-9]+).*$" "\\1" V8_PATCH_LEVEL "${V8_PATCH_LEVEL}") + set(V8_VERSION_STRING "${V8_MAJOR_VERSION}.${V8_MINOR_VERSION}.${V8_BUILD_NUMBER}.${V8_PATCH_LEVEL}") +endif() + + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(V8_COMPILE_DEFINITIONS "V8_COMPRESS_POINTERS;V8_31BIT_SMIS_ON_64BIT_ARCH") +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(V8_COMPILE_DEFINITIONS " ") +endif() + +mark_as_advanced(V8_COMPILE_DEFINITIONS) + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(V8 REQUIRED_VARS V8_LIBRARY V8LIBBASE_LIBRARY V8LIBPLATFORM_LIBRARY V8_INCLUDE_DIR V8_COMPILE_DEFINITIONS +VERSION_VAR V8_VERSION_STRING) +set(V8_LIBRARIES ${V8_LIBRARY} ${V8LIBBASE_LIBRARY} ${V8LIBPLATFORM_LIBRARY}) + +mark_as_advanced(V8_LIBRARIES) + +if(NOT TARGET V8::V8) + add_library(V8::V8 SHARED IMPORTED) + set_target_properties(V8::V8 PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${V8_INCLUDE_DIR}" + INTERFACE_COMPILE_DEFINITIONS "${V8_COMPILE_DEFINITIONS}") + + if(V8_LIBRARY_RELEASE) + set_property(TARGET V8::V8 APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" + IMPORTED_IMPLIB_RELEASE "${V8_LIBRARY_RELEASE}" + ) + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE + "${V8LIBBASE_LIBRARY_RELEASE};${V8LIBPLATFORM_LIBRARY_RELEASE}") + endif() + + if(V8_LIBRARY_DEBUG) + set_property(TARGET V8::V8 APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" + IMPORTED_IMPLIB_DEBUG "${V8_LIBRARY_DEBUG}") + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG + "${V8LIBBASE_LIBRARY_DEBUG};${V8LIBPLATFORM_LIBRARY_DEBUG}") + endif() + + if(NOT V8_LIBRARY_RELEASE AND NOT V8_LIBRARY_DEBUG) + set_property(TARGET V8::V8 APPEND PROPERTY + IMPORTED_IMPLIB "${V8_LIBRARY}") + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LINK_INTERFACE_LIBRARIES + "${V8LIBBASE_LIBRARY};${V8LIBPLATFORM_LIBRARY}") + endif() +endif() diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/v8/build.patch b/cc-multilingual-main/cc_net/vcpkg/ports/v8/build.patch new file mode 100644 index 0000000000000000000000000000000000000000..15fede3fe87c31d95bad382ee9619b87fd586b92 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/v8/build.patch @@ -0,0 +1,187 @@ +diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn +index 1904a2559..e66586c88 100644 +--- a/config/compiler/BUILD.gn ++++ b/config/compiler/BUILD.gn +@@ -1571,6 +1571,7 @@ config("default_warnings") { + # Disables. + "-Wno-missing-field-initializers", # "struct foo f = {0};" + "-Wno-unused-parameter", # Unused function parameters. ++ "-Wno-invalid-offsetof", # Use of "conditionally-supported" offsetof in c++17 + ] + } + +@@ -1987,8 +1988,17 @@ config("no_incompatible_pointer_warnings") { + # Shared settings for both "optimize" and "optimize_max" configs. + # IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags. + if (is_win) { +- common_optimize_on_cflags = [ +- "/Ob2", # Both explicit and auto inlining. ++ common_optimize_on_cflags = [] ++ if(is_clang) { ++ common_optimize_on_cflags += [ ++ "/Ob2", # Both explicit and auto inlining. ++ ] ++ } else { ++ common_optimize_on_cflags += [ ++ "/Ob3", # Both explicit and auto inlining. ++ ] ++ } ++ common_optimize_on_cflags += [ + "/Oy-", # Disable omitting frame pointers, must be after /O2. + "/Zc:inline", # Remove unreferenced COMDAT (faster links). + ] +diff --git a/config/linux/pkg-config.py b/config/linux/pkg-config.py +index 5adf70cc3..dab159f98 100755 +--- a/config/linux/pkg-config.py ++++ b/config/linux/pkg-config.py +@@ -41,6 +41,11 @@ from optparse import OptionParser + # Additionally, you can specify the option --atleast-version. This will skip + # the normal outputting of a dictionary and instead print true or false, + # depending on the return value of pkg-config for the given package. ++# ++# --pkg_config_libdir= allows direct override ++# of the PKG_CONFIG_LIBDIR environment library. ++# ++# --full-path-libs causes lib names to include their full path. + + + def SetConfigPath(options): +@@ -105,11 +110,32 @@ def RewritePath(path, strip_prefix, sysroot): + return path + + ++flag_regex = re.compile("(-.)(.+)") ++ ++ ++def FlagReplace(matchobj): ++ if matchobj.group(1) == '-I': ++ return matchobj.group(1) + subprocess.check_output([u'cygpath',u'-w',matchobj.group(2)]).strip().decode("utf-8") ++ if matchobj.group(1) == '-L': ++ return matchobj.group(1) + subprocess.check_output([u'cygpath',u'-w',matchobj.group(2)]).strip().decode("utf-8") ++ if matchobj.group(1) == '-l': ++ return matchobj.group(1) + matchobj.group(2) + '.lib' ++ return matchobj.group(0) ++ ++ ++def ConvertGCCToMSVC(flags): ++ """Rewrites GCC flags into MSVC flags.""" ++ # need a better way to determine mingw vs msvc build ++ if 'win32' not in sys.platform or "GCC" in sys.version: ++ return flags ++ return [ flag_regex.sub(FlagReplace,flag) for flag in flags] ++ ++ + def main(): + # If this is run on non-Linux platforms, just return nothing and indicate + # success. This allows us to "kind of emulate" a Linux build from other + # platforms. +- if "linux" not in sys.platform: ++ if "linux" not in sys.platform and 'win32' not in sys.platform: + print("[[],[],[],[],[]]") + return 0 + +@@ -128,6 +154,9 @@ def main(): + parser.add_option('--dridriverdir', action='store_true', dest='dridriverdir') + parser.add_option('--version-as-components', action='store_true', + dest='version_as_components') ++ parser.add_option('--pkg_config_libdir', action='store', dest='pkg_config_libdir', ++ type='string') ++ parser.add_option('--full-path-libs', action='store_true', dest='full_path_libs') + (options, args) = parser.parse_args() + + # Make a list of regular expressions to strip out. +@@ -144,6 +173,10 @@ def main(): + else: + prefix = '' + ++ # Override PKG_CONFIG_LIBDIR ++ if options.pkg_config_libdir: ++ os.environ['PKG_CONFIG_LIBDIR'] = options.pkg_config_libdir ++ + if options.atleast_version: + # When asking for the return value, just run pkg-config and print the return + # value, no need to do other work. +@@ -203,7 +236,7 @@ def main(): + # For now just split on spaces to get the args out. This will break if + # pkgconfig returns quoted things with spaces in them, but that doesn't seem + # to happen in practice. +- all_flags = flag_string.strip().split(' ') ++ all_flags = ConvertGCCToMSVC(flag_string.strip().split(' ')) + + + sysroot = options.sysroot +@@ -220,7 +253,10 @@ def main(): + continue; + + if flag[:2] == '-l': +- libs.append(RewritePath(flag[2:], prefix, sysroot)) ++ library = RewritePath(flag[2:], prefix, sysroot) ++ # Skip math library on MSVC ++ if library != 'm.lib': ++ libs.append(library) + elif flag[:2] == '-L': + lib_dirs.append(RewritePath(flag[2:], prefix, sysroot)) + elif flag[:2] == '-I': +@@ -237,6 +273,14 @@ def main(): + else: + cflags.append(flag) + ++ if options.full_path_libs: ++ full_path_libs = [] ++ for lib_dir in lib_dirs: ++ for lib in libs: ++ if os.path.isfile(lib_dir+"/"+lib): ++ full_path_libs.append(lib_dir+"/"+lib) ++ libs = full_path_libs ++ + # Output a GN array, the first one is the cflags, the second are the libs. The + # JSON formatter prints GN compatible lists when everything is a list of + # strings. +diff --git a/config/linux/pkg_config.gni b/config/linux/pkg_config.gni +index 428e44ac0..a0d2175ee 100644 +--- a/config/linux/pkg_config.gni ++++ b/config/linux/pkg_config.gni +@@ -45,6 +45,9 @@ declare_args() { + # in similar fashion by setting the `system_libdir` variable in the build's + # args.gn file to 'lib' or 'lib64' as appropriate for the target architecture. + system_libdir = "lib" ++ ++ # Allow directly overriding the PKG_CONFIG_LIBDIR enviroment variable ++ pkg_config_libdir = "" + } + + pkg_config_script = "//build/config/linux/pkg-config.py" +@@ -87,6 +90,17 @@ if (host_pkg_config != "") { + host_pkg_config_args = pkg_config_args + } + ++if (pkg_config_libdir != "") { ++ pkg_config_args += [ ++ "--pkg_config_libdir", ++ pkg_config_libdir, ++ ] ++ host_pkg_config_args += [ ++ "--pkg_config_libdir", ++ pkg_config_libdir, ++ ] ++} ++ + template("pkg_config") { + assert(defined(invoker.packages), + "Variable |packages| must be defined to be a list in pkg_config.") +diff --git a/util/lastchange.py b/util/lastchange.py +index 02a36642b..78934f1b0 100755 +--- a/util/lastchange.py ++++ b/util/lastchange.py +@@ -192,7 +192,10 @@ def GetGitTopDirectory(source_dir): + Returns: + The output of "git rev-parse --show-toplevel" as a string + """ +- return _RunGitCommand(source_dir, ['rev-parse', '--show-toplevel']) ++ directory = _RunGitCommand(source_dir, ['rev-parse', '--show-toplevel']) ++ if "GCC" in sys.version and sys.platform=='win32': ++ return subprocess.check_output(["cygpath", "-w", directory]).strip(b"\n").decode() ++ return directory + + + def WriteIfChanged(file_name, contents): diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/v8/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/v8/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..0e316e8ae537b8ef70a0794c35f872fa627c1945 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/v8/portfile.cmake @@ -0,0 +1,198 @@ + +set(pkgver "9.1.269.39") + +set(ENV{DEPOT_TOOLS_WIN_TOOLCHAIN} 0) + +get_filename_component(GIT_PATH ${GIT} DIRECTORY) +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_PATH ${PYTHON2} DIRECTORY) +vcpkg_find_acquire_program(GN) +get_filename_component(GN_PATH ${GN} DIRECTORY) +vcpkg_find_acquire_program(NINJA) +get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) + +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") +vcpkg_add_to_path(PREPEND "${GIT_PATH}") +vcpkg_add_to_path(PREPEND "${PYTHON2_PATH}") +vcpkg_add_to_path(PREPEND "${GN_PATH}") +vcpkg_add_to_path(PREPEND "${NINJA_PATH}") +if(WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES pkg-config) + vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") +endif() + +set(VCPKG_KEEP_ENV_VARS PATH;DEPOT_TOOLS_WIN_TOOLCHAIN) + +function(v8_fetch) + set(oneValueArgs DESTINATION URL REF SOURCE) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(V8 "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT DEFINED V8_DESTINATION) + message(FATAL_ERROR "DESTINATION must be specified.") + endif() + + if(NOT DEFINED V8_URL) + message(FATAL_ERROR "The git url must be specified") + endif() + + if(NOT DEFINED V8_REF) + message(FATAL_ERROR "The git ref must be specified.") + endif() + + if(EXISTS ${V8_SOURCE}/${V8_DESTINATION}) + vcpkg_execute_required_process( + COMMAND ${GIT} reset --hard + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + else() + vcpkg_execute_required_process( + COMMAND ${GIT} clone --depth 1 ${V8_URL} ${V8_DESTINATION} + WORKING_DIRECTORY ${V8_SOURCE} + LOGNAME build-${TARGET_TRIPLET}) + vcpkg_execute_required_process( + COMMAND ${GIT} fetch --depth 1 origin ${V8_REF} + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + vcpkg_execute_required_process( + COMMAND ${GIT} checkout FETCH_HEAD + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + endif() + foreach(PATCH ${V8_PATCHES}) + vcpkg_execute_required_process( + COMMAND ${GIT} apply ${PATCH} + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + endforeach() +endfunction() + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://chromium.googlesource.com/v8/v8.git + REF 7d3d62c91f69a702e5aa54c6b4dbbaa883683717 + PATCHES ${CURRENT_PORT_DIR}/v8.patch +) + +message(STATUS "Fetching submodules") +v8_fetch( + DESTINATION build + URL https://chromium.googlesource.com/chromium/src/build.git + REF fd86d60f33cbc794537c4da2ef7e298d7f81138e + SOURCE ${SOURCE_PATH} + PATCHES ${CURRENT_PORT_DIR}/build.patch) +v8_fetch( + DESTINATION third_party/zlib + URL https://chromium.googlesource.com/chromium/src/third_party/zlib.git + REF 156be8c52f80cde343088b4a69a80579101b6e67 + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION base/trace_event/common + URL https://chromium.googlesource.com/chromium/src/base/trace_event/common.git + REF dab187b372fc17e51f5b9fad8201813d0aed5129 + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION third_party/googletest/src + URL https://chromium.googlesource.com/external/github.com/google/googletest.git + REF 10b1902d893ea8cc43c69541d70868f91af3646b + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION third_party/jinja2 + URL https://chromium.googlesource.com/chromium/src/third_party/jinja2.git + REF b41863e42637544c2941b574c7877d3e1f663e25 + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION third_party/markupsafe + URL https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git + REF 8f45f5cfa0009d2a70589bcda0349b8cb2b72783 + SOURCE ${SOURCE_PATH}) + +vcpkg_execute_required_process( + COMMAND ${PYTHON2} build/util/lastchange.py -o build/util/LASTCHANGE + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET} +) + +file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party/icu") +configure_file("${CURRENT_PORT_DIR}/zlib.gn" "${SOURCE_PATH}/third_party/zlib/BUILD.gn" COPYONLY) +configure_file("${CURRENT_PORT_DIR}/icu.gn" "${SOURCE_PATH}/third_party/icu/BUILD.gn" COPYONLY) +file(WRITE "${SOURCE_PATH}/build/config/gclient_args.gni" "checkout_google_benchmark = false\n") +if(WIN32) + string(REGEX REPLACE "\\\\+$" "" WindowsSdkDir $ENV{WindowsSdkDir}) + file(APPEND "${SOURCE_PATH}/build/config/gclient_args.gni" "windows_sdk_path = \"${WindowsSdkDir}\"\n") +endif() + +if(UNIX) + set(UNIX_CURRENT_INSTALLED_DIR ${CURRENT_INSTALLED_DIR}) + set(LIBS "-ldl -lpthread") + set(REQUIRES ", gmodule-2.0, gobject-2.0, gthread-2.0") +elseif(WIN32) + execute_process(COMMAND cygpath "${CURRENT_INSTALLED_DIR}" OUTPUT_VARIABLE UNIX_CURRENT_INSTALLED_DIR) + string(STRIP ${UNIX_CURRENT_INSTALLED_DIR} UNIX_CURRENT_INSTALLED_DIR) + set(LIBS "-lWinmm -lDbgHelp") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(is_component_build true) + set(v8_monolithic false) + set(v8_use_external_startup_data true) + set(targets :v8_libbase :v8_libplatform :v8) +else() + set(is_component_build false) + set(v8_monolithic true) + set(v8_use_external_startup_data false) + set(targets :v8_monolith) +endif() + +message(STATUS "Generating v8 build files. Please wait...") + +vcpkg_gn_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS "is_component_build=${is_component_build} target_cpu=\"${VCPKG_TARGET_ARCHITECTURE}\" v8_monolithic=${v8_monolithic} v8_use_external_startup_data=${v8_use_external_startup_data} use_sysroot=false is_clang=false use_custom_libcxx=false v8_enable_verify_heap=false icu_use_data_file=false" + OPTIONS_DEBUG "is_debug=true enable_iterator_debugging=true pkg_config_libdir=\"${UNIX_CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig\"" + OPTIONS_RELEASE "is_debug=false enable_iterator_debugging=false pkg_config_libdir=\"${UNIX_CURRENT_INSTALLED_DIR}/lib/pkgconfig\"" +) + +message(STATUS "Building v8. Please wait...") + +vcpkg_gn_install( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS ${targets} +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CFLAGS "-DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH") +endif() + +file(INSTALL "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(PREFIX ${CURRENT_PACKAGES_DIR}) + configure_file("${CURRENT_PORT_DIR}/v8.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8.pc" @ONLY) + configure_file("${CURRENT_PORT_DIR}/v8_libbase.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8_libbase.pc" @ONLY) + configure_file("${CURRENT_PORT_DIR}/v8_libplatform.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8_libplatform.pc" @ONLY) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/snapshot_blob.bin" DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + + set(PREFIX ${CURRENT_PACKAGES_DIR}/debug) + configure_file("${CURRENT_PORT_DIR}/v8.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8.pc" @ONLY) + configure_file("${CURRENT_PORT_DIR}/v8_libbase.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8_libbase.pc" @ONLY) + configure_file("${CURRENT_PORT_DIR}/v8_libplatform.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8_libplatform.pc" @ONLY) + configure_file("${CURRENT_PORT_DIR}/V8Config-shared.cmake" "${CURRENT_PACKAGES_DIR}/share/v8/V8Config.cmake" @ONLY) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/snapshot_blob.bin" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") +else() + set(PREFIX ${CURRENT_PACKAGES_DIR}) + configure_file("${CURRENT_PORT_DIR}/v8_monolith.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8_monolith.pc" @ONLY) + set(PREFIX ${CURRENT_PACKAGES_DIR}/debug) + configure_file("${CURRENT_PORT_DIR}/v8_monolith.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8_monolith.pc" @ONLY) + configure_file("${CURRENT_PORT_DIR}/V8Config-static.cmake" "${CURRENT_PACKAGES_DIR}/share/v8/V8Config.cmake" @ONLY) +endif() + + +vcpkg_copy_pdbs() + +# v8 libraries are listed as SYSTEM_LIBRARIES because the pc files reference each other. +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m dl pthread Winmm DbgHelp v8_libbase v8_libplatform v8) + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8.patch b/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8.patch new file mode 100644 index 0000000000000000000000000000000000000000..7b41c8d3e6c47c9de910fbe24b3ddac90f32e5df --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8.patch @@ -0,0 +1,241 @@ +diff --git a/BUILD.gn b/BUILD.gn +index d2bfb6129d..c5ab18ee44 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -5366,6 +5366,7 @@ if (is_component_build) { + + public_deps = [ + ":v8_base", ++ ":v8_initializers", + ":v8_snapshot", + ] + +diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h +index 72b8fbc8a8..3ebfc23f1f 100644 +--- a/src/codegen/code-stub-assembler.h ++++ b/src/codegen/code-stub-assembler.h +@@ -303,7 +303,7 @@ enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; + // it's possible to add JavaScript-specific useful CodeAssembler "macros" + // without modifying files in the compiler directory (and requiring a review + // from a compiler directory OWNER). +-class V8_EXPORT_PRIVATE CodeStubAssembler ++class V8_EXPORT CodeStubAssembler + : public compiler::CodeAssembler, + public TorqueGeneratedExportedMacrosAssembler { + public: +diff --git a/src/common/globals.h b/src/common/globals.h +index f51c3210f8..5291285337 100644 +--- a/src/common/globals.h ++++ b/src/common/globals.h +@@ -1364,7 +1364,7 @@ class BinaryOperationFeedback { + // This is distinct from BinaryOperationFeedback on purpose, because the + // feedback that matters differs greatly as well as the way it is consumed. + class CompareOperationFeedback { +- enum { ++ enum : uint32_t { + kSignedSmallFlag = 1 << 0, + kOtherNumberFlag = 1 << 1, + kBooleanFlag = 1 << 2, +@@ -1378,7 +1378,7 @@ class CompareOperationFeedback { + }; + + public: +- enum Type { ++ enum Type : uint32_t { + kNone = 0, + + kBoolean = kBooleanFlag, +diff --git a/src/compiler/node-cache.h b/src/compiler/node-cache.h +index 8e1d3d4eae..c55d8329de 100644 +--- a/src/compiler/node-cache.h ++++ b/src/compiler/node-cache.h +@@ -29,7 +29,7 @@ class Node; + // nodes such as constants, parameters, etc. + template , + typename Pred = std::equal_to > +-class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) NodeCache final { ++class V8_EXPORT_PRIVATE NodeCache final { + public: + explicit NodeCache(Zone* zone) : map_(zone) {} + ~NodeCache() = default; +diff --git a/src/heap/paged-spaces-inl.h b/src/heap/paged-spaces-inl.h +index e135e30efc..0c055247bc 100644 +--- a/src/heap/paged-spaces-inl.h ++++ b/src/heap/paged-spaces-inl.h +@@ -19,7 +19,7 @@ namespace internal { + // ----------------------------------------------------------------------------- + // PagedSpaceObjectIterator + +-HeapObject PagedSpaceObjectIterator::Next() { ++inline HeapObject PagedSpaceObjectIterator::Next() { + do { + HeapObject next_obj = FromCurrentPage(); + if (!next_obj.is_null()) return next_obj; +diff --git a/src/heap/paged-spaces.h b/src/heap/paged-spaces.h +index 621d92aa89..a8592a5b4d 100644 +--- a/src/heap/paged-spaces.h ++++ b/src/heap/paged-spaces.h +@@ -45,7 +45,7 @@ class V8_EXPORT_PRIVATE PagedSpaceObjectIterator : public ObjectIterator { + // Advance to the next object, skipping free spaces and other fillers and + // skipping the special garbage section of which there is one per space. + // Returns nullptr when the iteration has ended. +- inline HeapObject Next() override; ++ HeapObject Next() override; + + private: + // Fast (inlined) path of next(). +diff --git a/src/objects/feedback-vector.cc b/src/objects/feedback-vector.cc +index a77ea5d265..0cddb92a02 100644 +--- a/src/objects/feedback-vector.cc ++++ b/src/objects/feedback-vector.cc +@@ -114,9 +114,9 @@ Handle FeedbackMetadata::New(LocalIsolate* isolate, + return metadata; + } + +-template Handle FeedbackMetadata::New( ++template V8_EXPORT Handle FeedbackMetadata::New( + Isolate* isolate, const FeedbackVectorSpec* spec); +-template Handle FeedbackMetadata::New( ++template V8_EXPORT Handle FeedbackMetadata::New( + LocalIsolate* isolate, const FeedbackVectorSpec* spec); + + bool FeedbackMetadata::SpecDiffersFrom( +diff --git a/src/objects/fixed-array-inl.h b/src/objects/fixed-array-inl.h +index cca6d40070..d6d36ff59f 100644 +--- a/src/objects/fixed-array-inl.h ++++ b/src/objects/fixed-array-inl.h +@@ -88,7 +88,7 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) { + return get(isolate, index).IsTheHole(isolate); + } + +-void FixedArray::set(int index, Smi value) { ++inline V8_EXPORT_PRIVATE void FixedArray::set(int index, Smi value) { + DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map()); + DCHECK_LT(static_cast(index), static_cast(length())); + DCHECK(Object(value).IsSmi()); +diff --git a/src/objects/fixed-array.h b/src/objects/fixed-array.h +index 98c5d8d5b5..bd5303e44c 100644 +--- a/src/objects/fixed-array.h ++++ b/src/objects/fixed-array.h +@@ -132,7 +132,7 @@ class FixedArray + inline bool is_the_hole(Isolate* isolate, int index); + + // Setter that doesn't need write barrier. +- inline void set(int index, Smi value); ++ inline V8_EXPORT_PRIVATE void set(int index, Smi value); + // Setter with explicit barrier mode. + inline void set(int index, Object value, WriteBarrierMode mode); + +diff --git a/src/snapshot/snapshot-utils.cc b/src/snapshot/snapshot-utils.cc +index eb2372372c..7defadb4b1 100644 +--- a/src/snapshot/snapshot-utils.cc ++++ b/src/snapshot/snapshot-utils.cc +@@ -5,7 +5,7 @@ + #include "src/snapshot/snapshot-utils.h" + + #include "src/sanitizer/msan.h" +-#include "third_party/zlib/zlib.h" ++#include "zlib.h" + + namespace v8 { + namespace internal { +diff --git a/src/wasm/function-body-decoder-impl.h b/src/wasm/function-body-decoder-impl.h +index d37f718681..3a409e1d76 100644 +--- a/src/wasm/function-body-decoder-impl.h ++++ b/src/wasm/function-body-decoder-impl.h +@@ -2013,7 +2013,7 @@ class WasmDecoder : public Decoder { + } + + // TODO(clemensb): This is only used by the interpreter; move there. +- V8_EXPORT_PRIVATE std::pair StackEffect(const byte* pc) { ++ std::pair StackEffect(const byte* pc) { + WasmOpcode opcode = static_cast(*pc); + // Handle "simple" opcodes with a fixed signature first. + const FunctionSig* sig = WasmOpcodes::Signature(opcode); +diff --git a/test/cctest/BUILD.gn b/test/cctest/BUILD.gn +index ffa4e3a136..a279faee9b 100644 +--- a/test/cctest/BUILD.gn ++++ b/test/cctest/BUILD.gn +@@ -493,6 +493,10 @@ v8_source_set("cctest_sources") { + # C4309: 'static_cast': truncation of constant value + cflags += [ "/wd4309" ] + ++ if(!is_clang) { ++ cflags += [ "/wd4789" ] ++ } ++ + # MSVS wants this for gay-{precision,shortest}.cc. + cflags += [ "/bigobj" ] + +diff --git a/tools/debug_helper/BUILD.gn b/tools/debug_helper/BUILD.gn +index 2256df1f55..29e27c6af9 100644 +--- a/tools/debug_helper/BUILD.gn ++++ b/tools/debug_helper/BUILD.gn +@@ -100,10 +100,12 @@ v8_component("v8_debug_helper") { + "../..:v8_libbase", + "../..:v8_shared_internal_headers", + "../..:v8_tracing", ++ "../..:v8", + ] + + configs = [ ":internal_config" ] + if (v8_enable_i18n_support) { ++ public_deps = [ "//third_party/icu" ] + configs += [ "//third_party/icu:icu_config" ] + } + +diff --git a/tools/v8windbg/BUILD.gn b/tools/v8windbg/BUILD.gn +index 5618d2d945..71568f1670 100644 +--- a/tools/v8windbg/BUILD.gn ++++ b/tools/v8windbg/BUILD.gn +@@ -6,7 +6,7 @@ import("../../gni/v8.gni") + + config("v8windbg_config") { + # Required for successful compilation of SDK header file DbgModel.h. +- cflags_cc = [ "/Zc:twoPhase-" ] ++ cflags_cc = [ "/Zc:twoPhase-", "/std:c++latest" ] + + include_dirs = [ "../.." ] + } +diff --git a/tools/v8windbg/base/dbgext.h b/tools/v8windbg/base/dbgext.h +index 8b36a8f361..f8d9f0d64e 100644 +--- a/tools/v8windbg/base/dbgext.h ++++ b/tools/v8windbg/base/dbgext.h +@@ -9,6 +9,7 @@ + #error Unicode not defined + #endif + ++#include + #include + #include + #include +diff --git a/tools/v8windbg/src/v8-debug-helper-interop.h b/tools/v8windbg/src/v8-debug-helper-interop.h +index f7d78c5dd3..1c70e54e7a 100644 +--- a/tools/v8windbg/src/v8-debug-helper-interop.h ++++ b/tools/v8windbg/src/v8-debug-helper-interop.h +@@ -5,10 +5,11 @@ + #ifndef V8_TOOLS_V8WINDBG_SRC_V8_DEBUG_HELPER_INTEROP_H_ + #define V8_TOOLS_V8WINDBG_SRC_V8_DEBUG_HELPER_INTEROP_H_ + +-#include +- ++#include ++#include + #include + ++#include + #include + #include + #include +diff --git a/tools/v8windbg/test/debug-callbacks.h b/tools/v8windbg/test/debug-callbacks.h +index 8855d6ffbc..ed2b0f62e9 100644 +--- a/tools/v8windbg/test/debug-callbacks.h ++++ b/tools/v8windbg/test/debug-callbacks.h +@@ -9,6 +9,7 @@ + #error Unicode not defined + #endif + ++#include + #include + #include + #include diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8.pc.in b/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8.pc.in new file mode 100644 index 0000000000000000000000000000000000000000..5f5721725626cc84b13fdeecda3d5dc58cc53ccd --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine +Version: @pkgver@ +Requires: zlib, icu-uc, icu-i18n, v8_libbase = @pkgver@ +Libs: -L${libdir} -lv8 +Cflags: -I${includedir} @CFLAGS@ diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8_libplatform.pc.in b/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8_libplatform.pc.in new file mode 100644 index 0000000000000000000000000000000000000000..19c54ba7988d1e2cb93c606b03f1c95a3b5a1177 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8_libplatform.pc.in @@ -0,0 +1,10 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine - Platform library +Version: @pkgver@ +Libs: -L${libdir} -lv8_libplatform +Cflags: -I${includedir} @CFLAGS@ diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8_monolith.pc.in b/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8_monolith.pc.in new file mode 100644 index 0000000000000000000000000000000000000000..b23c661e817c856bb8a7fe29c5941a3d2e9459f0 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/v8/v8_monolith.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine +Version: @pkgver@ +Requires: zlib, icu-uc, icu-i18n @REQUIRES@ +Libs: -L${libdir} -lv8_monolith @LIBS@ +Cflags: -I${includedir} @CFLAGS@ diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/v8/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/v8/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..a37df53207659a42781446eea6afe0b5dbbc470e --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/v8/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "v8", + "version": "9.1.269.39", + "port-version": 6, + "description": "Google Chrome's JavaScript engine", + "homepage": "https://v8.dev", + "license": "BSD-3-Clause", + "supports": "!(arm | arm64 | uwp | osx | linux)", + "dependencies": [ + { + "name": "glib", + "platform": "linux" + }, + "icu", + { + "name": "pthread", + "platform": "linux" + }, + { + "name": "vcpkg-gn", + "host": true + }, + { + "name": "vcpkg-tool-python2", + "host": true + }, + "zlib" + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/v8/zlib.gn b/cc-multilingual-main/cc_net/vcpkg/ports/v8/zlib.gn new file mode 100644 index 0000000000000000000000000000000000000000..570d0e22a36caaaf489a108d4179ce9ab78485a0 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/v8/zlib.gn @@ -0,0 +1,21 @@ +import("//build/config/linux/pkg_config.gni") + +pkg_config("system_zlib") { + packages = [ "zlib" ] + defines = [ "USE_SYSTEM_ZLIB=1" ] +} + +config("zlib_config") { + if(is_win && !is_component_build) { + ldflags = ["/ignore:4099"] # needed on VCPKG CI builds + } + configs = [ + ":system_zlib", + ] +} + +source_set("zlib") { + public_configs = [ + ":system_zlib", + ] +} diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/fix-cmakelists.patch b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/fix-cmakelists.patch new file mode 100644 index 0000000000000000000000000000000000000000..adcc3d1230b310a1eb89e9ccc53e194bbb69761c --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/fix-cmakelists.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 551ec4b..ae36bc8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -288,8 +288,11 @@ endif() + + + add_subdirectory( "source/Lib/vvenc" ) ++if(BUILD_TOOLS) + add_subdirectory( "source/App/vvencapp" ) + add_subdirectory( "source/App/vvencFFapp" ) ++endif() ++if(BUILD_TESTING) + add_subdirectory( "test/vvenclibtest" ) + add_subdirectory( "test/vvencinterfacetest" ) + +@@ -378,6 +381,7 @@ add_vvenc_test( compare_output-medium_rc2p_statsFile_easy 30 NO_OUTPUT "${OUT_VV + + add_test( NAME Cleanup_remove_temp_files COMMAND ${CMAKE_COMMAND} -E remove -f ${CLEANUP_TEST_FILES} rec.yuv stats_exp.json stats_easy.json ) + set_tests_properties( Cleanup_remove_temp_files PROPERTIES FIXTURES_CLEANUP cleanup ) ++endif() + + if( VVENC_ENABLE_INSTALL ) + # include installer +diff --git a/cmake/modules/vvencInstall.cmake b/cmake/modules/vvencInstall.cmake +index 4945f1d..7006bf6 100644 +--- a/cmake/modules/vvencInstall.cmake ++++ b/cmake/modules/vvencInstall.cmake +@@ -16,9 +16,11 @@ macro( install_targets config_ ) + RUNTIME DESTINATION ${RUNTIME_DEST} + LIBRARY DESTINATION ${LIBRARY_DEST} + ARCHIVE DESTINATION ${ARCHIVE_DEST} ) ++ if(BUILD_TOOLS) + install( TARGETS vvencapp vvencFFapp + CONFIGURATIONS ${config_} + RUNTIME DESTINATION ${RUNTIME_DEST} ) ++ endif() + endmacro( install_targets ) + + # install pdb file for static and shared libraries +@@ -61,8 +63,10 @@ install_targets( RelWithDebInfo ) + + # install pdb files + install_lib_pdb( vvenc ) ++if(BUILD_TOOLS) + install_exe_pdb( vvencapp ) + install_exe_pdb( vvencFFapp ) ++endif() + + # configure version file + configure_file( cmake/install/vvencConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/vvencConfigVersion.cmake @ONLY ) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/fix-dependencies.patch b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/fix-dependencies.patch new file mode 100644 index 0000000000000000000000000000000000000000..1dd997a37278c6cafa959446ff12aa6917689077 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/fix-dependencies.patch @@ -0,0 +1,77 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 551ec4b..8405ad0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -161,6 +161,8 @@ set_property( GLOBAL PROPERTY USE_FOLDERS ON ) + # Enable multithreading + find_package( Threads REQUIRED ) + ++find_package(nlohmann_json CONFIG REQUIRED) ++ + # set _WIN32_WINNT + if( WIN32 ) + # set _WIN32_WINT version global + +diff --git a/source/App/vvencFFapp/CMakeLists.txt b/source/App/vvencFFapp/CMakeLists.txt +index 869b6ac..452301c 100644 +--- a/source/App/vvencFFapp/CMakeLists.txt ++++ b/source/App/vvencFFapp/CMakeLists.txt +@@ -34,7 +34,7 @@ target_compile_options( ${EXE_NAME} PRIVATE $<$,$:/W4 /WX /wd4100 /wd4244 /wd4251 /wd4459 /wd4996>) + + target_include_directories( ${EXE_NAME} PRIVATE ../../Lib ) +-target_link_libraries( ${EXE_NAME} Threads::Threads vvenc ) ++target_link_libraries( ${EXE_NAME} Threads::Threads vvenc nlohmann_json::nlohmann_json ) + + # example: place header files in different folders + source_group( "Header Files" FILES ${INC_FILES} ) + +diff --git a/source/App/vvencapp/CMakeLists.txt b/source/App/vvencapp/CMakeLists.txt +index a0e764b..98e5bb4 100644 +--- a/source/App/vvencapp/CMakeLists.txt ++++ b/source/App/vvencapp/CMakeLists.txt +@@ -31,7 +31,7 @@ target_compile_options( ${EXE_NAME} PRIVATE $<$,$:/W4 /WX /wd4244 /wd4251 /wd4996>) + + target_include_directories( ${EXE_NAME} PRIVATE ../../Lib ) +-target_link_libraries( ${EXE_NAME} Threads::Threads vvenc ) ++target_link_libraries( ${EXE_NAME} Threads::Threads vvenc nlohmann_json::nlohmann_json ) + + # example: place header files in different folders + source_group( "Header Files" FILES ${INC_FILES} ) +diff --git a/source/Lib/apputils/LogoRenderer.h b/source/Lib/apputils/LogoRenderer.h +index 6f990e6..bbf40d7 100644 +--- a/source/Lib/apputils/LogoRenderer.h ++++ b/source/Lib/apputils/LogoRenderer.h +@@ -58,7 +58,7 @@ POSSIBILITY OF SUCH DAMAGE. + #include "FileIOHelper.h" + + #ifdef VVENC_ENABLE_THIRDPARTY_JSON +-#include "../../../thirdparty/nlohmann_json/single_include/nlohmann/json.hpp" ++#include "nlohmann/json.hpp" + using nlohmann::json; + #endif + +diff --git a/source/Lib/vvenc/CMakeLists.txt b/source/Lib/vvenc/CMakeLists.txt +index 5ee3740..827cf41 100644 +--- a/source/Lib/vvenc/CMakeLists.txt ++++ b/source/Lib/vvenc/CMakeLists.txt +@@ -70,7 +70,8 @@ add_compile_definitions( ${LIB_NAME_UC}_SOURCE ) + # set PRIVATE include directories for all targets in this directory + include_directories( $ $ ) + include_directories( . .. ../DecoderLib ../EncoderLib ../CommonLib ../CommonLib/x86 ../apputils ) +-include_directories( SYSTEM ../../../thirdparty ) ++find_path(SIMDE_INCLUDE_DIRS "simde/arm/neon.h") ++include_directories(SYSTEM ${SIMDE_INCLUDE_DIRS}) + + # set common warning flags + add_compile_options( "$<$,$>:-Wall;-Werror;-Wno-deprecated-register;-Wno-unused-const-variable;-Wno-unknown-attributes>" ) +@@ -140,7 +141,7 @@ endif() + if( VVENC_ENABLE_THIRDPARTY_JSON ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVVENC_ENABLE_THIRDPARTY_JSON" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVVENC_ENABLE_THIRDPARTY_JSON" ) +- target_include_directories( ${LIB_NAME} PRIVATE ../../../thirdparty/nlohmann_json/single_include ) ++ target_link_libraries( ${LIB_NAME} PRIVATE nlohmann_json::nlohmann_json ) + endif() + + if( TARGET INTEL_ITT) diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/no-werror.patch b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/no-werror.patch new file mode 100644 index 0000000000000000000000000000000000000000..8c2dc265b87b96b97fa8aaa49cbbe90ad0bdf3f2 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/no-werror.patch @@ -0,0 +1,51 @@ +diff --git a/source/App/vvencFFapp/CMakeLists.txt b/source/App/vvencFFapp/CMakeLists.txt +index 452301c..947da3d 100644 +--- a/source/App/vvencFFapp/CMakeLists.txt ++++ b/source/App/vvencFFapp/CMakeLists.txt +@@ -29,9 +29,9 @@ set_target_properties( ${EXE_NAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DE + set_target_properties( ${EXE_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX "${CMAKE_RELWITHDEBINFO_POSTFIX}" ) + set_target_properties( ${EXE_NAME} PROPERTIES MINSIZEREL_POSTFIX "${CMAKE_MINSIZEREL_POSTFIX}" ) + +-target_compile_options( ${EXE_NAME} PRIVATE $<$,$>:-Wall -Werror> +- $<$:-Wall -Werror -fdiagnostics-show-option> +- $<$:/W4 /WX /wd4100 /wd4244 /wd4251 /wd4459 /wd4996>) ++target_compile_options( ${EXE_NAME} PRIVATE $<$,$>:-Wall> ++ $<$:-Wall -fdiagnostics-show-option> ++ $<$:/wd4100 /wd4244 /wd4251 /wd4459 /wd4996>) + + target_include_directories( ${EXE_NAME} PRIVATE ../../Lib ) + target_link_libraries( ${EXE_NAME} Threads::Threads vvenc nlohmann_json::nlohmann_json ) +diff --git a/source/App/vvencapp/CMakeLists.txt b/source/App/vvencapp/CMakeLists.txt +index 98e5bb4..f5ae8f1 100644 +--- a/source/App/vvencapp/CMakeLists.txt ++++ b/source/App/vvencapp/CMakeLists.txt +@@ -26,9 +26,9 @@ set_target_properties( ${EXE_NAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DE + set_target_properties( ${EXE_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX "${CMAKE_RELWITHDEBINFO_POSTFIX}" ) + set_target_properties( ${EXE_NAME} PROPERTIES MINSIZEREL_POSTFIX "${CMAKE_MINSIZEREL_POSTFIX}" ) + +-target_compile_options( ${EXE_NAME} PRIVATE $<$,$>:-Wall -Werror> +- $<$:-Wall -Werror -fdiagnostics-show-option> +- $<$:/W4 /WX /wd4244 /wd4251 /wd4996>) ++target_compile_options( ${EXE_NAME} PRIVATE $<$,$>:-Wall> ++ $<$:-Wall -fdiagnostics-show-option> ++ $<$:/wd4244 /wd4251 /wd4996>) + + target_include_directories( ${EXE_NAME} PRIVATE ../../Lib ) + target_link_libraries( ${EXE_NAME} Threads::Threads vvenc nlohmann_json::nlohmann_json ) +diff --git a/source/Lib/vvenc/CMakeLists.txt b/source/Lib/vvenc/CMakeLists.txt +index 827cf41..93bcfc0 100644 +--- a/source/Lib/vvenc/CMakeLists.txt ++++ b/source/Lib/vvenc/CMakeLists.txt +@@ -74,9 +74,9 @@ find_path(SIMDE_INCLUDE_DIRS "simde/arm/neon.h") + include_directories(SYSTEM ${SIMDE_INCLUDE_DIRS}) + + # set common warning flags +-add_compile_options( "$<$,$>:-Wall;-Werror;-Wno-deprecated-register;-Wno-unused-const-variable;-Wno-unknown-attributes>" ) +-add_compile_options( "$<$:-Wall;-Werror;-Wno-unused-function;;-Wno-unused-variable;;-Wno-sign-compare;;-fdiagnostics-show-option;-Wno-ignored-attributes>" ) +-add_compile_options( "$<$:/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4245;/wd4251;/wd4310;/wd4389;/wd4456;/wd4457;/wd4458;/wd4459;/wd4505;/wd4701;/wd4702;/wd4703;/wd4996>" ) ++add_compile_options( "$<$,$>:-Wall;-Wno-deprecated-register;-Wno-unused-const-variable;-Wno-unknown-attributes>" ) ++add_compile_options( "$<$:-Wall;-Wno-unused-function;;-Wno-unused-variable;;-Wno-sign-compare;;-fdiagnostics-show-option;-Wno-ignored-attributes>" ) ++add_compile_options( "$<$:/wd4100;/wd4127;/wd4244;/wd4245;/wd4251;/wd4310;/wd4389;/wd4456;/wd4457;/wd4458;/wd4459;/wd4505;/wd4701;/wd4702;/wd4703;/wd4996>" ) + + # don't export all symbols from shared libraries by default (gcc: -fvisibility=hidden), only those marked as VVENC_DECL + # behavior similar to __declspec(dllexport) on windows diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/portfile.cmake b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/portfile.cmake new file mode 100644 index 0000000000000000000000000000000000000000..750b23066c380fc3131d7307cc31259359931fad --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fraunhoferhhi/vvenc + REF v${VERSION} + SHA512 bf2ac5fc3859cb3303ef4fa4fcdbe00a6db617e3c2e76c6d658071a7650e5966fa1522ccb2feca8c770cea3ea25d2b573dbd0c72f4c0d71be61ba7dd1ab9440b + HEAD_REF master + PATCHES + fix-cmakelists.patch + fix-dependencies.patch + no-werror.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools BUILD_TOOLS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_TESTING=OFF + -DCCACHE_FOUND=OFF +) + + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/vvenc) + +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +if(BUILD_TOOLS) + vcpkg_copy_tools(TOOL_NAMES vvencFFapp vvencapp AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/vcpkg.json b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/vcpkg.json new file mode 100644 index 0000000000000000000000000000000000000000..9ea8a66e9ebf915c161a3319f1b1a346a6ffad35 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/ports/vvenc/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "vvenc", + "version": "1.7.0", + "description": "VVenC is a fast and efficient H.266/VVC encoder implementation.", + "homepage": "https://github.com/fraunhoferhhi/vvenc", + "license": "BSD-3-Clause-Clear", + "supports": "!x86 & !arm", + "dependencies": [ + "nlohmann-json", + "simde", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tools": { + "description": "Build user tools: vvencFFapp and vvencapp" + } + } +} diff --git a/cc-multilingual-main/cc_net/vcpkg/scripts/bootstrap.ps1 b/cc-multilingual-main/cc_net/vcpkg/scripts/bootstrap.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..e1338c7b30cf0b74845d0b796c7af5cf4e1ae4d8 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/scripts/bootstrap.ps1 @@ -0,0 +1,87 @@ +[CmdletBinding()] +param( + $badParam, + [Parameter(Mandatory=$False)][switch]$win64 = $false, + [Parameter(Mandatory=$False)][string]$withVSPath = "", + [Parameter(Mandatory=$False)][string]$withWinSDK = "", + [Parameter(Mandatory=$False)][switch]$disableMetrics = $false +) +Set-StrictMode -Version Latest +# Powershell2-compatible way of forcing named-parameters +if ($badParam) +{ + if ($disableMetrics -and $badParam -eq "1") + { + Write-Warning "'disableMetrics 1' is deprecated, please change to 'disableMetrics' (without '1')." + } + else + { + throw "Only named parameters are allowed." + } +} + +if ($win64) +{ + Write-Warning "-win64 no longer has any effect; ignored." +} + +if (-Not [string]::IsNullOrWhiteSpace($withVSPath)) +{ + Write-Warning "-withVSPath no longer has any effect; ignored." +} + +if (-Not [string]::IsNullOrWhiteSpace($withWinSDK)) +{ + Write-Warning "-withWinSDK no longer has any effect; ignored." +} + +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +$vcpkgRootDir = $scriptsDir +while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) +{ + Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root" + $vcpkgRootDir = Split-path $vcpkgRootDir -Parent +} + +Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" + +# Read the vcpkg-tool config file to determine what release to download +$Config = ConvertFrom-StringData (Get-Content "$PSScriptRoot\vcpkg-tool-metadata.txt" -Raw) +$versionDate = $Config.VCPKG_TOOL_RELEASE_TAG + +if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64' -or $env:PROCESSOR_IDENTIFIER -match "ARMv[8,9] \(64-bit\)") { + & "$scriptsDir/tls12-download-arm64.exe" github.com "/microsoft/vcpkg-tool/releases/download/$versionDate/vcpkg-arm64.exe" "$vcpkgRootDir\vcpkg.exe" +} else { + & "$scriptsDir/tls12-download.exe" github.com "/microsoft/vcpkg-tool/releases/download/$versionDate/vcpkg.exe" "$vcpkgRootDir\vcpkg.exe" +} + +Write-Host "" + +if ($LASTEXITCODE -ne 0) +{ + Write-Error "Downloading vcpkg.exe failed. Please check your internet connection, or consider downloading a recent vcpkg.exe from https://github.com/microsoft/vcpkg-tool with a browser." + throw +} + +& "$vcpkgRootDir\vcpkg.exe" version --disable-metrics + +if ($disableMetrics) +{ + Set-Content -Value "" -Path "$vcpkgRootDir\vcpkg.disable-metrics" -Force +} +elseif (-Not (Test-Path "$vcpkgRootDir\vcpkg.disable-metrics")) +{ + # Note that we intentionally leave any existing vcpkg.disable-metrics; once a user has + # opted out they should stay opted out. + Write-Host @" +Telemetry +--------- +vcpkg collects usage data in order to help us improve your experience. +The data collected by Microsoft is anonymous. +You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics, +passing --disable-metrics to vcpkg on the command line, +or by setting the VCPKG_DISABLE_METRICS environment variable. + +Read more about vcpkg telemetry at docs/about/privacy.md +"@ +} diff --git a/cc-multilingual-main/cc_net/vcpkg/scripts/bootstrap.sh b/cc-multilingual-main/cc_net/vcpkg/scripts/bootstrap.sh new file mode 100644 index 0000000000000000000000000000000000000000..32b9d4108e8dcd9258a6666cbbe4f2806075e642 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/scripts/bootstrap.sh @@ -0,0 +1,246 @@ +#!/bin/sh + +# Find .vcpkg-root. +vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) +while [ "$vcpkgRootDir" != "/" ] && ! [ -e "$vcpkgRootDir/.vcpkg-root" ]; do + vcpkgRootDir="$(dirname "$vcpkgRootDir")" +done + +# Parse arguments. +vcpkgDisableMetrics="OFF" +vcpkgUseSystem=false +vcpkgUseMuslC="OFF" +for var in "$@" +do + if [ "$var" = "-disableMetrics" -o "$var" = "--disableMetrics" ]; then + vcpkgDisableMetrics="ON" + elif [ "$var" = "-useSystemBinaries" -o "$var" = "--useSystemBinaries" ]; then + echo "Warning: -useSystemBinaries no longer has any effect; ignored. Note that the VCPKG_USE_SYSTEM_BINARIES environment variable behavior is not changed." + elif [ "$var" = "-allowAppleClang" -o "$var" = "--allowAppleClang" ]; then + echo "Warning: -allowAppleClang no longer has any effect; ignored." + elif [ "$var" = "-buildTests" ]; then + echo "Warning: -buildTests no longer has any effect; ignored." + elif [ "$var" = "-musl" ]; then + vcpkgUseMuslC="ON" + elif [ "$var" = "-help" -o "$var" = "--help" ]; then + echo "Usage: ./bootstrap-vcpkg.sh [options]" + echo + echo "Options:" + echo " -help Display usage help" + echo " -disableMetrics Mark this vcpkg root to disable metrics." + echo " -musl Use the musl binary rather than the glibc binary on Linux." + exit 1 + else + echo "Unknown argument $var. Use '-help' for help." + exit 1 + fi +done + +# Enable using this entry point on windows from git bash by redirecting to the .bat file. +unixName=$(uname -s | sed 's/MINGW.*_NT.*/MINGW_NT/') +if [ "$unixName" = "MINGW_NT" ]; then + if [ "$vcpkgDisableMetrics" = "ON" ]; then + args="-disableMetrics" + else + args="" + fi + + vcpkgRootDir=$(cygpath -aw "$vcpkgRootDir") + cmd "/C $vcpkgRootDir\\bootstrap-vcpkg.bat $args" || exit 1 + exit 0 +fi + +# Determine the downloads directory. +if [ -z ${VCPKG_DOWNLOADS+x} ]; then + downloadsDir="$vcpkgRootDir/downloads" +else + downloadsDir="$VCPKG_DOWNLOADS" + if [ ! -d "$VCPKG_DOWNLOADS" ]; then + echo "VCPKG_DOWNLOADS was set to '$VCPKG_DOWNLOADS', but that was not a directory." + exit 1 + fi + +fi + +# Check for minimal prerequisites. +vcpkgCheckRepoTool() +{ + __tool=$1 + if ! command -v "$__tool" >/dev/null 2>&1 ; then + echo "Could not find $__tool. Please install it (and other dependencies) with:" + echo "On Debian and Ubuntu derivatives:" + echo " sudo apt-get install curl zip unzip tar" + echo "On recent Red Hat and Fedora derivatives:" + echo " sudo dnf install curl zip unzip tar" + echo "On older Red Hat and Fedora derivatives:" + echo " sudo yum install curl zip unzip tar" + echo "On SUSE Linux and derivatives:" + echo " sudo zypper install curl zip unzip tar" + echo "On Arch Linux and derivatives:" + echo " sudo pacman -S curl zip unzip tar cmake ninja" + echo "On Alpine:" + echo " apk add build-base cmake ninja zip unzip curl git" + echo " (and export VCPKG_FORCE_SYSTEM_BINARIES=1)" + exit 1 + fi +} + +vcpkgCheckRepoTool curl +vcpkgCheckRepoTool zip +vcpkgCheckRepoTool unzip +vcpkgCheckRepoTool tar + +UNAME="$(uname)" +ARCH="$(uname -m)" + +if [ -e /etc/alpine-release ]; then + vcpkgUseSystem="ON" + if [ "$ARCH" = "x86_64" ]; then + vcpkgUseMuslC="ON" + fi +fi + +if [ "$UNAME" = "OpenBSD" ]; then + vcpkgUseSystem="ON" +fi + +if [ "$vcpkgUseSystem" = "ON" ]; then + vcpkgCheckRepoTool cmake + vcpkgCheckRepoTool ninja + vcpkgCheckRepoTool git +fi + +vcpkgCheckEqualFileHash() +{ + url=$1; filePath=$2; expectedHash=$3 + + if command -v "sha512sum" >/dev/null 2>&1 ; then + actualHash=$(sha512sum "$filePath") + elif command -v "gsha512sum" >/dev/null 2>&1 ; then + # OpenBSD's coreutil's sha512sum is prefixed with a `g` + actualHash=$(gsha512sum "$filePath") + else + # [g]sha512sum is not available by default on osx + # shasum is not available by default on Fedora + actualHash=$(shasum -a 512 "$filePath") + fi + + actualHash="${actualHash%% *}" # shasum returns [hash filename], so get the first word + + if ! [ "$expectedHash" = "$actualHash" ]; then + echo "" + echo "File does not have expected hash:" + echo " url: [ $url ]" + echo " File path: [ $downloadPath ]" + echo " Expected hash: [ $sha512 ]" + echo " Actual hash: [ $actualHash ]" + exit 1 + fi +} + +vcpkgDownloadFile() +{ + url=$1; downloadPath=$2 sha512=$3 + rm -rf "$downloadPath.part" + curl -L $url --tlsv1.2 --create-dirs --retry 3 --output "$downloadPath.part" --silent --show-error --fail || exit 1 + + vcpkgCheckEqualFileHash $url "$downloadPath.part" $sha512 + chmod +x "$downloadPath.part" + mv "$downloadPath.part" "$downloadPath" +} + +vcpkgExtractTar() +{ + archive=$1; toPath=$2 + rm -rf "$toPath" "$toPath.partial" + mkdir -p "$toPath.partial" + $(cd "$toPath.partial" && tar xzf "$archive") + mv "$toPath.partial" "$toPath" +} + +# Determine what we are going to do to bootstrap: +# MacOS -> Download vcpkg-macos +# Linux +# useMuslC -> download vcpkg-muslc +# amd64 -> download vcpkg-glibc +# Otherwise +# Download and build from source + +# Read the vcpkg-tool config file to determine what release to download +. "$vcpkgRootDir/scripts/vcpkg-tool-metadata.txt" + +vcpkgDownloadTool="ON" +if [ "$UNAME" = "Darwin" ]; then + echo "Downloading vcpkg-macos..." + vcpkgToolReleaseSha=$VCPKG_MACOS_SHA + vcpkgToolName="vcpkg-macos" +elif [ "$vcpkgUseMuslC" = "ON" ]; then + echo "Downloading vcpkg-muslc..." + vcpkgToolReleaseSha=$VCPKG_MUSLC_SHA + vcpkgToolName="vcpkg-muslc" +elif [ "$ARCH" = "x86_64" ]; then + echo "Downloading vcpkg-glibc..." + vcpkgToolReleaseSha=$VCPKG_GLIBC_SHA + vcpkgToolName="vcpkg-glibc" +else + echo "Unable to determine a binary release of vcpkg; attempting to build from source." + vcpkgDownloadTool="OFF" + vcpkgToolReleaseSha=$VCPKG_TOOL_SOURCE_SHA +fi + +# Do the download or build. +if [ "$vcpkgDownloadTool" = "ON" ]; then + vcpkgDownloadFile "https://github.com/microsoft/vcpkg-tool/releases/download/$VCPKG_TOOL_RELEASE_TAG/$vcpkgToolName" "$vcpkgRootDir/vcpkg" $vcpkgToolReleaseSha +else + vcpkgToolReleaseTarball="$VCPKG_TOOL_RELEASE_TAG.tar.gz" + vcpkgToolUrl="https://github.com/microsoft/vcpkg-tool/archive/$vcpkgToolReleaseTarball" + baseBuildDir="$vcpkgRootDir/buildtrees/_vcpkg" + buildDir="$baseBuildDir/build" + tarballPath="$downloadsDir/$vcpkgToolReleaseTarball" + srcBaseDir="$baseBuildDir/src" + srcDir="$srcBaseDir/vcpkg-tool-$VCPKG_TOOL_RELEASE_TAG" + + if [ -e "$tarballPath" ]; then + vcpkgCheckEqualFileHash "$vcpkgToolUrl" "$tarballPath" "$vcpkgToolReleaseSha" + else + echo "Downloading vcpkg tool sources" + vcpkgDownloadFile "$vcpkgToolUrl" "$tarballPath" "$vcpkgToolReleaseSha" + fi + + echo "Building vcpkg-tool..." + rm -rf "$baseBuildDir" + mkdir -p "$buildDir" + vcpkgExtractTar "$tarballPath" "$srcBaseDir" + cmakeConfigOptions="-DCMAKE_BUILD_TYPE=Release -G 'Ninja' -DVCPKG_DEVELOPMENT_WARNINGS=OFF" + + if [ "${VCPKG_MAX_CONCURRENCY}" != "" ] ; then + cmakeConfigOptions=" $cmakeConfigOptions '-DCMAKE_JOB_POOL_COMPILE:STRING=compile' '-DCMAKE_JOB_POOL_LINK:STRING=link' '-DCMAKE_JOB_POOLS:STRING=compile=$VCPKG_MAX_CONCURRENCY;link=$VCPKG_MAX_CONCURRENCY' " + fi + + (cd "$buildDir" && eval cmake "$srcDir" $cmakeConfigOptions) || exit 1 + (cd "$buildDir" && cmake --build .) || exit 1 + + rm -rf "$vcpkgRootDir/vcpkg" + cp "$buildDir/vcpkg" "$vcpkgRootDir/" +fi + +"$vcpkgRootDir/vcpkg" version --disable-metrics + +# Apply the disable-metrics marker file. +if [ "$vcpkgDisableMetrics" = "ON" ]; then + touch "$vcpkgRootDir/vcpkg.disable-metrics" +elif ! [ -f "$vcpkgRootDir/vcpkg.disable-metrics" ]; then + # Note that we intentionally leave any existing vcpkg.disable-metrics; once a user has + # opted out they should stay opted out. + cat < ${FILENAME}...") + file(DOWNLOAD "${URL}" "${DOWNLOAD_PATH}" STATUS download_status) + list(GET download_status 0 status_code) + if(NOT "${download_status}" EQUAL "0") + message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}") + endif() + endif() + file(SHA512 "${DOWNLOAD_PATH}" SHA512) + + file(MAKE_DIRECTORY "${PORT_PATH}") + configure_file("${SCRIPTS}/templates/portfile.in.cmake" "${PORTFILE_PATH}" @ONLY) + configure_file("${SCRIPTS}/templates/vcpkg.json.in" "${MANIFEST_PATH}" @ONLY) + + message(STATUS "Generated portfile: ${NATIVE_PORTFILE_PATH}") + message(STATUS "Generated manifest: ${NATIVE_MANIFEST_PATH}") + message(STATUS "To launch an editor for these new files, run") + message(STATUS " .\\vcpkg edit ${PORT}") +endif() diff --git a/cc-multilingual-main/cc_net/vcpkg/scripts/tls12-download-arm64.exe b/cc-multilingual-main/cc_net/vcpkg/scripts/tls12-download-arm64.exe new file mode 100644 index 0000000000000000000000000000000000000000..d221b870d036a25d1ce5878de7210b7bbdd0b5dd Binary files /dev/null and b/cc-multilingual-main/cc_net/vcpkg/scripts/tls12-download-arm64.exe differ diff --git a/cc-multilingual-main/cc_net/vcpkg/scripts/tls12-download.exe b/cc-multilingual-main/cc_net/vcpkg/scripts/tls12-download.exe new file mode 100644 index 0000000000000000000000000000000000000000..5105f4cb429dc5ec5705e35e78810f2f43bc9884 Binary files /dev/null and b/cc-multilingual-main/cc_net/vcpkg/scripts/tls12-download.exe differ diff --git a/cc-multilingual-main/cc_net/vcpkg/scripts/update-vcpkg-tool-metadata.ps1 b/cc-multilingual-main/cc_net/vcpkg/scripts/update-vcpkg-tool-metadata.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..aafcc6141c088714166e88802b497ea8cb287e43 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/scripts/update-vcpkg-tool-metadata.ps1 @@ -0,0 +1,75 @@ +[CmdletBinding()] +Param( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Date +) + +function Get-Sha256 { + Param([string]$File) + $content = [System.IO.File]::ReadAllBytes($File) + $shaHasher = $null + [string]$shaHash = '' + try { + $shaHasher = [System.Security.Cryptography.SHA256]::Create() + $hashBytes = $shaHasher.ComputeHash($content) + $shaHash = [System.BitConverter]::ToString($hashBytes).Replace('-', '').ToLowerInvariant() + } finally { + if ($shaHasher -ne $null) { + $shaHasher.Dispose(); + } + } + + return $shaHash +} + +[string]$metadata = "VCPKG_TOOL_RELEASE_TAG=$Date`n" +$vsCodeHashes = [ordered]@{} +Set-Content -LiteralPath "$PSScriptRoot\vcpkg-tool-metadata.txt" -Value $metadata -NoNewline -Encoding utf8NoBOM +& "$PSScriptRoot\bootstrap.ps1" +[string]$vcpkg = "$PSScriptRoot\..\vcpkg.exe" + +# Windows arm64 (VS Code only) +& $vcpkg x-download "$PSScriptRoot\vcpkg-arm64.exe" ` + "--url=https://github.com/microsoft/vcpkg-tool/releases/download/$Date/vcpkg-arm64.exe" --skip-sha512 +$vsCodeHashes["vcpkg-arm64.exe"] = Get-Sha256 "$PSScriptRoot\vcpkg-arm64.exe" + +# Linux Binaries +foreach ($binary in @('macos', 'muslc', 'glibc')) { + $caps = $binary.ToUpperInvariant() + & $vcpkg x-download "$PSScriptRoot\vcpkg-$binary" ` + "--url=https://github.com/microsoft/vcpkg-tool/releases/download/$Date/vcpkg-$binary" --skip-sha512 + $sha512 = & $vcpkg hash "$PSScriptRoot\vcpkg-$binary" + $metadata += "VCPKG_$($caps)_SHA=$sha512`n" + $vsCodeHashes["vcpkg-$binary"] = Get-Sha256 "$PSScriptRoot\vcpkg-$binary" +} + +# Windows x64 (assumed to be host) +$vsCodeHashes["vcpkg.exe"] = Get-Sha256 "$vcpkg" + +# Source +$sourceName = "$Date.tar.gz" +& $vcpkg x-download "$PSScriptRoot\$sourceName" ` + "--url=https://github.com/microsoft/vcpkg-tool/archive/refs/tags/$Date.tar.gz" --skip-sha512 +$sha512 = & $vcpkg hash "$PSScriptRoot\$sourceName" +$metadata += "VCPKG_TOOL_SOURCE_SHA=$sha512`n" + +# Cleanup +Remove-Item @( + "$PSScriptRoot\vcpkg-arm64.exe", + "$PSScriptRoot\vcpkg-macos", + "$PSScriptRoot\vcpkg-muslc", + "$PSScriptRoot\vcpkg-glibc", + "$PSScriptRoot\$sourceName" +) + +Set-Content -LiteralPath "$PSScriptRoot\vcpkg-tool-metadata.txt" -Value $metadata -NoNewline -Encoding utf8NoBOM + +Write-Host "Metadata Written" +Write-Host "VS Code Block" +$vsCodeOverall = [ordered]@{ + version = $Date; + hashes = $vsCodeHashes; +} + +Write-Host (ConvertTo-Json $vsCodeOverall) diff --git a/cc-multilingual-main/cc_net/vcpkg/scripts/vcpkg-tool-metadata.txt b/cc-multilingual-main/cc_net/vcpkg/scripts/vcpkg-tool-metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..2244c01eeac714f6ef21a78a186d9e36233afc4c --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/scripts/vcpkg-tool-metadata.txt @@ -0,0 +1,5 @@ +VCPKG_TOOL_RELEASE_TAG=2024-03-14 +VCPKG_MACOS_SHA=d9acaea52a459fffd64e5fddda0364e229480379995baab5839d15b0d7b75870d1b50f62127ccc2a02a6056408dc4af2258f0cafa399ed52fe7dbf2e944e4693 +VCPKG_MUSLC_SHA=5f54a8a29ce12e717fb29593ca8377f3c0460cd8112b41ec21333064add8844be45e34ff9bb58db5fec46abe1f436b88bcd1d90b5d416dad01bfd9719a353134 +VCPKG_GLIBC_SHA=73abdb955030dee962d5b964d8c44a3621a92764518b23d3022e97cbb888b1eed66c944036b04fba84f0556dab11279a51f3ae1cfc46687cbab6ded22b259b55 +VCPKG_TOOL_SOURCE_SHA=d28da01818043a84060a0964d0b7849b425e488f90076408c28b5366aa95c8f688b1917059e59ac5b95420bbd9e4b6e7c9a2a24cee1366476e366f9e9b0025f2 diff --git a/cc-multilingual-main/cc_net/vcpkg/scripts/vcpkgTools.xml b/cc-multilingual-main/cc_net/vcpkg/scripts/vcpkgTools.xml new file mode 100644 index 0000000000000000000000000000000000000000..a7162858563b1d267ea4ac6faa8ba188aa336661 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/scripts/vcpkgTools.xml @@ -0,0 +1,210 @@ + + + + 3.11.8 + python.exe + https://www.python.org/ftp/python/3.11.8/python-3.11.8-embed-win32.zip + c88ef02f0860000dbc59361cfe051e3e8dc7d208ed39bb5bc20a3e8b8711b578926e281a11941787ea61b2ef05b945ab3133322dcb85b916f79ac4ada57f6309 + python-3.11.8-embed-win32.zip + + + 3.11.8 + tools\python.exe + https://www.nuget.org/api/v2/package/python/3.11.8 + 8c1abd622fb2795fb87ab5208764fe13f7f4d69f2283b4237ea47b7c14b0989b5b4169f1ac1d3b1f417c6c2cc3d85ce151370dae8efc807c93e57cd67fa3c8cf + python-3.11.8.nupkg.zip + + + 3.27.1 + cmake-3.27.1-windows-i386/bin/cmake.exe + https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-i386.zip + a847f636fb27ba41ba9e6eaafa56937c614bcb39c6d0c9723241c229a9b0a77b4d00ebee88639561035d43f9aa64895f387eab56c628990c01191da57839cda0 + cmake-3.27.1-windows-i386.zip + + + 3.27.1 + cmake-3.27.1-macos-universal/CMake.app/Contents/bin/cmake + https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-macos-universal.tar.gz + 78e639b93786eb994bdbc6263afc48267d42d9305c1cb1cb9482adf012e7b4f45934e744a98eaf93d8361f154e642cada13398cca064c1700f009a7795746fe7 + cmake-3.27.1-macos-universal.tar.gz + + + 3.27.1 + cmake-3.27.1-linux-x86_64/bin/cmake + https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-linux-x86_64.tar.gz + 192374a68e2971f04974a194645726196d9b8ee7abd650d1e6f65f7aa2ccc9b186c3edb473bb4958c764532edcdd42f4182ee1fcb86b17d78b0bcd6305ce3df1 + cmake-3.27.1-linux-x86_64.tar.gz + + + 2.7.4 + mingw64\bin\git.exe + https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/PortableGit-2.43.0-64-bit.7z.exe + 02ec40f55a6de18f305530e9415b6ce0a597359ebb9a58cf727ac84eceb0003b0f437941b76872b6568157a333c8e6e8d865a36faf874fd5f04774deb6a9387a + PortableGit-2.43.0-32-bit.7z.exe + + + 2.7.4 + + + + + + 2.7.4 + + + + + + 2.7.4 + + + + + + 4.65 + google-cloud-sdk\bin\gsutil.cmd + https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-347.0.0-windows-x86_64-bundled-python.zip + e2792e17b132aad77f7c0b9fd26faf415e9437923d9227a9e6d253554e6843d29a6ddad0a7fb5e9aea4a130fd4c521e6ece8844fd4a4f9e8d580348775425389 + google-cloud-sdk-347.0.0-windows-x86_64-bundled-python.zip + + + 4.65 + gsutil/gsutil + https://storage.googleapis.com/pub/gsutil_4.65.tar.gz + 2c5c9dea48147f97180a491bbb9e24e8cbcd4f3452620e2f80338b781e4dfc90bb754e3bbfa05e1b990e44bff52d990d8c2dd51bc83d112339d8e6096a2f21c8 + gsutil_4.65.tar.gz + + + 4.65 + gsutil/gsutil + https://storage.googleapis.com/pub/gsutil_4.65.tar.gz + 2c5c9dea48147f97180a491bbb9e24e8cbcd4f3452620e2f80338b781e4dfc90bb754e3bbfa05e1b990e44bff52d990d8c2dd51bc83d112339d8e6096a2f21c8 + gsutil_4.65.tar.gz + + + 3.1.7 + vswhere.exe + https://github.com/microsoft/vswhere/releases/download/3.1.7/vswhere.exe + 40c534eb27f079c15c9782f53f82c12dabfede4d3d85f0edf8a855c2b0d5e12921a96506b37c210beab3c33220f8ff098447ad054e82d8c2603964975fc12076 + + + 6.2.1 + nuget.exe + https://dist.nuget.org/win-x86-commandline/v6.2.1/nuget.exe + dbb8c13d93a8c0071f45b1fe733ee7a888078dcec5bbcb4dfb49ab8c3970c7513f608bd3bc80b0bfb4764a505ea017cac2ead3656e1a5aa7f3a770c8e3e35825 + + + 6.2.1 + nuget.exe + https://dist.nuget.org/win-x86-commandline/v6.2.1/nuget.exe + dbb8c13d93a8c0071f45b1fe733ee7a888078dcec5bbcb4dfb49ab8c3970c7513f608bd3bc80b0bfb4764a505ea017cac2ead3656e1a5aa7f3a770c8e3e35825 + + + 6.2.1 + nuget.exe + https://dist.nuget.org/win-x86-commandline/v6.2.1/nuget.exe + dbb8c13d93a8c0071f45b1fe733ee7a888078dcec5bbcb4dfb49ab8c3970c7513f608bd3bc80b0bfb4764a505ea017cac2ead3656e1a5aa7f3a770c8e3e35825 + + + 0.11.0 + coscli-windows.exe + https://github.com/tencentyun/coscli/releases/download/v0.11.0-beta/coscli-windows.exe + 38a521ec80cdb6944124f4233d7e71eed8cc9f9be2c0c736269915d21c3718ea8131e4516bb6eeada6df331f5fa8f47a299907e50ee9edbe0114444520974d06 + + + 0.11.0 + coscli-linux + https://github.com/tencentyun/coscli/releases/download/v0.11.0-beta/coscli-linux + 9c930a1d308e9581a0e2fdfe3751ea7fe13d6068df90ca6465740ec3eda034202ef71ec54c99e90015ff81aa68aa1489567db5e411e222eb7258704bdac7e924 + + + 0.11.0 + coscli-mac + https://github.com/tencentyun/coscli/releases/download/v0.11.0-beta/coscli-mac + 9556335bfc8bc14bace6dfced45fa77fb07c80f08aa975e047a54efda1d19852aae0ea68a5bc7f04fbd88e3edce5a73512a61216b1c5ff4cade224de4a9ab8db + + + 4.4.0 + QtInstallerFramework-win-x86\bin\installerbase.exe + https://download.qt.io/official_releases/qt-installer-framework/4.4.0/installer-framework-opensource-src-4.4.0.zip + fc713f54bfe2781cb232cd0ae8eddb96833ec178d53a55ec0b01886aa048b13441eb49a1f33282e8eab7259cfe512c890d50b8e632d3dbf501a0bf1fd83de947 + installer-framework-opensource-src-4.4.0.zip + + + 23.01 + Files\7-Zip\7z.exe + https://github.com/ip7z/7zip/releases/download/23.01/7z2301-x64.msi + 09e3ce970ea8383e8c736a51ebb61e3036e655c81d59bc64c5eecb041abdad2cbce2f400fcf4478e22f56fe40f8d912c639f550a5f990e24abfd4e86cdd3755c + 7z2301-x64.msi + + + 23.01 + 7za.exe + https://github.com/ip7z/7zip/releases/download/23.01/7z2301-extra.7z + c849c2cb489cf5b6eeb92bfbc27dcb37d0349c36971e1bc7ef32c7cde1b659e19e8b46d734ba90f47affe07fdfd5b4774cbfa0fdf4b681e9f60bb46bba1f7f9b + 7z2301-extra.7z + + + 1.37.0 + aria2-1.37.0-win-64bit-build1\aria2c.exe + https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip + 6d78405da9cf5639dbe8174787002161b8124d73880fb57cc8c0a3a63982f84e46df4e626990c58f23452965ad925f0d37cb9147e99b25c3d7ca0ea49602f34d + aria2-1.37.0-win-64bit-build1.zip + + + 1.35.0 + aria2-1.35.0/bin/aria2c + https://github.com/aria2/aria2/releases/download/release-1.35.0/aria2-1.35.0-osx-darwin.tar.bz2 + 3bb32b7d55347d1af37c6f4ebf0e20b38ce51c37a1baf92f7ad1762000539a03413dd679a6d902fdb1805fa71917300c9692aceee012eb06ecdff10491137aec + aria2-1.35.0-osx-darwin.tar.bz2 + + + 1.11.1 + ninja.exe + https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip + a700e794c32eb67b9f87040db7f1ba3a8e891636696fc54d416b01661c2421ff46fa517c97fd904adacdf8e621df3e68ea380105b909ae8b6651a78ae7eb3199 + ninja-win-1.11.1.zip + + + 1.11.1 + ninja + https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip + 6403dac9196baffcff614fa73ea530752997c8db6bbfbaa0446b4b09d7327e2aa6e8615d1283c961d3bf0df497e85ba86604149f1505ee75f89d600245a45dde + ninja-linux-1.11.1.zip + + + 1.11.1 + ninja + https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip + dad33b0918c60bbf5107951a936175b1610b4894a408f4ba4b47a2f5b328fc982a52a2aed6a0cb75028ee4765af5083bea66611c37516826eb0c851366bb4427 + ninja-mac-1.11.1.zip + + + 7.2.16 + pwsh.exe + https://github.com/PowerShell/PowerShell/releases/download/v7.2.16/PowerShell-7.2.16-win-x64.zip + de246b7719337ff0c16ef46cf1df2e0fb5e39f7d2754cb28422cf455df276be6e35e9efa9d2bac81c383df1d2d97c9281a24e86ec84af7c395b7671149111ca9 + PowerShell-7.2.16-win-x64.zip + + + 16.15.1 + node-v16.15.1-win-x64\node.exe + https://nodejs.org/dist/v16.15.1/node-v16.15.1-win-x64.7z + 7ec4bfe2ea6034e1461e306b6372d62c0c5d1060c453ba76a73a5cec38ac26b5952a744caa9071455329caa58eb0a96d26c68854c8915c17610ff27b0cf2c1cf + node-v16.15.1-win-x64.7z + + + 16.15.1 + node-v16.15.1-linux-x64/bin/node + https://nodejs.org/dist/v16.15.1/node-v16.15.1-linux-x64.tar.gz + 5ad3b4b9caeaa8d31503efa99f5a593118a267dec9d4181d019732126ba248ce9a901207115b3f6b899eb5b3f0373c7f77ea95cc92ac625cddf437ee9b8b8919 + node-v16.15.1-linux-x64.tar.gz + + + 16.15.1 + node-v16.15.1-darwin-x64/bin/node + https://nodejs.org/dist/v16.15.1/node-v16.15.1-darwin-x64.tar.gz + 90d0612bbe5467b6cf385c91a68b8daad0057e3e0ccacea44567f5b95b14f7481cb79784185ab1463b4bd990e092ff0f9109576d1a1934b84e1c816582929611 + node-v16.15.1-darwin-x64.tar.gz + + diff --git a/cc-multilingual-main/cc_net/vcpkg/scripts/vcpkg_completion.fish b/cc-multilingual-main/cc_net/vcpkg/scripts/vcpkg_completion.fish new file mode 100644 index 0000000000000000000000000000000000000000..42e4b78dc483fc38a09efddb257453920f380983 --- /dev/null +++ b/cc-multilingual-main/cc_net/vcpkg/scripts/vcpkg_completion.fish @@ -0,0 +1,92 @@ +# vcpkg completions for fish +set vcpkg_executable (string split -m1 ' ' (commandline -cb))[1] + +function _vcpkg_completions + set arg (string split -m1 ' ' (commandline -cb))[2] + set curr_token (commandline -t) + if [ -n $arg ] + if [ -z $curr_token ] + set arg $arg " " + end + end + for key in ($vcpkg_executable autocomplete "$arg" -- 2>/dev/null) + echo $key + end +end + +complete -c vcpkg -f --arguments '(_vcpkg_completions)' + +set vcpkg_commands ($vcpkg_executable autocomplete) + +function _set_triplet_arguments + set triplets ($vcpkg_executable help triplet | grep "^\s" | cut -d' ' -f3) + set triplet_from "" + for triplet in $triplets + echo (test -n "$triplet") >> temp.txt + if [ (string sub -l5 -- $triplet) = "VCPKG" ] + set -l temp (string length $triplet) + set triplet_from (string sub -s6 -l(math $temp - 15) -- $triplet) + else if [ -n "$triplet" ] + complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l triplet -d "$triplet_from" -a (string sub -s3 -- $triplet) + end + end +end +_set_triplet_arguments + +# options for all completions +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l triplet -d "Specify the target architecture triplet. See 'vcpkg help triplet' (default: \$VCPKG_DEFAULT_TRIPLET)" +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l overlay-ports -d "Specify directories to be used when searching for ports (also: \$VCPKG_OVERLAY_PORTS)" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l overlay-triplets -d "Specify directories containing triplets files (also: \$VCPKG_OVERLAY_TRIPLETS)" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l binarysource -d "Add sources for binary caching. See 'vcpkg help binarycaching'" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l downloads-root -d "Specify the downloads root directory (default: \$VCPKG_DOWNLOADS)" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l vcpkg-root -d "Specify the vcpkg root directory (default: \$VCPKG_ROOT)" -a '(__fish_complete_directories)' + +# options for install +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l dry-run -d "Do not actually build or install" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l head -d "Install the libraries on the command line using the latest upstream sources" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l no-downloads -d "Do not download new sources" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l only-downloads -d "Download sources but don't build packages" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l recurse -d "Allow removal of packages as part of installation" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l keep-going -d "Continue installing packages on failure" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l editable -d "Disable source re-extraction and binary caching for libraries on the command line" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l clean-after-build -d "Clean buildtrees, packages and downloads after building each package" + +# options for edit +complete -c vcpkg -n "__fish_seen_subcommand_from edit" -f -l buildtrees -d "Open editor into the port-specific buildtree subfolder" +complete -c vcpkg -n "__fish_seen_subcommand_from edit" -f -l all -d "Open editor into the port as well as the port-specific buildtree subfolder" + +# options for export +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l dry-run -d "Do not actually export" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l raw -d "Export to an uncompressed directory" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l nuget -d "Export a NuGet package" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l ifw -d "Export to an IFW-based installer" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l zip -d "Export to a zip file" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l 7zip -d "Export to a 7zip (.7z) file" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l prefab -d "Export to Prefab format" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l prefab-maven -d "Enable maven" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l prefab-debug -d "Enable prefab debug" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l output -d "Specify the output name (used to construct filename)" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l output-dir -d "Specify the output directory for produced artifacts" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l nuget-id -d "Specify the id for the exported NuGet package (overrides --output)" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l nuget-version -d "Specify the version for the exported NuGet package" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-repository-url -d "Specify the remote repository URL for the online installer" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-packages-directory-path -d "Specify the temporary directory path for the repacked packages" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-repository-directory-path -d "Specify the directory path for the exported repository" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-configuration-file-path -d "Specify the temporary file path for the installer configuration" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-installer-file-path -d "Specify the file path for the exported installer" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-group-id -d "GroupId uniquely identifies your project according maven specifications" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-artifact-id -d "Artifact Id is the name of the project according maven specifications" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-version -d "Version is the name of the project according maven specifications" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-min-sdk -d "Android minimum supported sdk version" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-target-sdk -d "Android target sdk version" + +# options for remove +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l purge -d "Remove the cached copy of the package (default)" +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l no-purge -d "Do not remove the cached copy of the package (deprecated)" +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l recurse -d "Allow removal of packages not explicitly specified on the command line" +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l dry-run -d "Print the packages to be removed, but do not remove them" +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l outdated -d "Select all packages with versions that do not match the portfiles" + +# options for upgrade +complete -c vcpkg -n "__fish_seen_subcommand_from upgrade" -f -l no-dry-run -d "Actually upgrade" +complete -c vcpkg -n "__fish_seen_subcommand_from upgrade" -f -l keep-going -d "Continue installing packages on failure"