From 2f888ee53eb9d6dd7d411b8c14c85d0302d156f8 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 10 Apr 2022 15:32:54 +0700 Subject: [PATCH 01/50] newer Skia version --- ports/skia/portfile.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index e7cf8d1557b8f1..f547e1235743f2 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL https://skia.googlesource.com/skia.git - REF fb0b35fed5580d49392df7ce9374551b348fffbf - PATCHES add-missing-tuple.patch + REF 1a668363fdf0d663c6df3f124e7c10796bc842f0 + #PATCHES add-missing-tuple.patch ) function(checkout_in_path PATH URL REF) @@ -106,6 +106,7 @@ skia_use_lua=false \ skia_enable_tools=false \ skia_enable_spirv_validation=false") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") set(OPTIONS "${OPTIONS} target_cpu=\"arm64\"") endif() @@ -124,6 +125,11 @@ if("metal" IN_LIST FEATURES) list(APPEND SKIA_PUBLIC_DEFINITIONS SK_METAL) endif() +if("opengl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} skia_use_gl=true") + list(APPEND SKIA_PUBLIC_DEFINITIONS SK_GL) +endif() + set(OPTIONS_REL "${OPTIONS} is_official_build=true") set(OPTIONS_DBG "${OPTIONS} is_debug=true") From 57404fef98667e0e28c1108e2e86ef4aa559837a Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Mon, 11 Apr 2022 14:01:13 +0700 Subject: [PATCH 02/50] Update ports/skia/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/skia/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index f547e1235743f2..13a97c4e0493c8 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -106,7 +106,6 @@ skia_use_lua=false \ skia_enable_tools=false \ skia_enable_spirv_validation=false") - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") set(OPTIONS "${OPTIONS} target_cpu=\"arm64\"") endif() From 0dbd64e4172eb1830f6f46d54fb8d20bc8dd4b93 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Thu, 14 Apr 2022 04:18:01 +0700 Subject: [PATCH 03/50] use absolute python 3 path --- ports/skia/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 13a97c4e0493c8..556634ce6cea7d 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -5,6 +5,11 @@ vcpkg_from_git( #PATCHES add-missing-tuple.patch ) +vcpkg_find_acquire_program(PYTHON3) +file(READ "${SOURCE_PATH}/.gn" GN_FILE_CONTENT) +string(REPLACE "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"" GN_FILE_CONTENT ${GN_FILE_CONTENT}) +file(WRITE "${SOURCE_PATH}/.gn" ${GN_FILE_CONTENT}) + function(checkout_in_path PATH URL REF) if(EXISTS "${PATH}") return() From 6a92c04d0bb832ca3f47617b383fd853274567e6 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Thu, 14 Apr 2022 04:40:13 +0700 Subject: [PATCH 04/50] fix issue with gn file --- ports/skia/portfile.cmake | 1 + ports/skia/remove_unused_var.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 ports/skia/remove_unused_var.patch diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 556634ce6cea7d..feb0a537b2338e 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -2,6 +2,7 @@ vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL https://skia.googlesource.com/skia.git REF 1a668363fdf0d663c6df3f124e7c10796bc842f0 + PATCHES remove_unused_var.patch #PATCHES add-missing-tuple.patch ) diff --git a/ports/skia/remove_unused_var.patch b/ports/skia/remove_unused_var.patch new file mode 100644 index 00000000000000..5509a2e1ac07fa --- /dev/null +++ b/ports/skia/remove_unused_var.patch @@ -0,0 +1,12 @@ +diff --git a/BUILD.gn b/BUILD.gn +index dc81d8c1b4..53b929c594 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -868,7 +868,6 @@ optional("gpu") { + } + + libs = [] +- frameworks = [] + + if (skia_use_gl) { + public_defines += [ "SK_GL" ] From e37985264859a1b555ae93196c385570238d94fe Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Thu, 14 Apr 2022 17:52:04 +0700 Subject: [PATCH 05/50] Update GN for Windows --- scripts/cmake/vcpkg_find_acquire_program.cmake | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index c85932dc7c92e0..59653723a83d26 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -214,6 +214,7 @@ function(vcpkg_find_acquire_program program) set(apt_package_name "git") endif() elseif(program STREQUAL "GN") + message("Arch: $ENV{PROCESSOR_ARCHITECTURE}") set(program_name gn) set(rename_binary_to "gn") set(cipd_download_gn "https://chrome-infra-packages.appspot.com/dl/gn/gn") @@ -228,9 +229,15 @@ function(vcpkg_find_acquire_program program) set(gn_platform "mac-amd64") set(download_sha512 "03ee64cb15bae7fceb412900d470601090bce147cfd45eb9b46683ac1a5dca848465a5d74c55a47df7f0e334d708151249a6d37bb021de74dd48b97ed4a07937") else() - set(program_version "qUkAhy9J0P7c5racy-9wB6AHNK_btS18im8S06_ehhwC") - set(gn_platform "windows-amd64") - set(download_sha512 "263e02bd79eee0cb7b664831b7898565c5656a046328d8f187ef7ae2a4d766991d477b190c9b425fcc960ab76f381cd3e396afb85cba7408ca9e74eb32c175db") + if($ENV{PROCESSOR_ARCHITECTURE} STREQUAL "ARM64") + set(program_version "q5ExVHmXyD34Q_Tzb-aRxsPipO-e37-csVRhVM7IJh0C") + set(gn_platform "windows-amd64") + set(download_sha512 "FA764AA44EB6F48ED50E855B4DC1DD1ABE35E45FD4AAC7F059A35293A14894C1B591215E34FB0CE9362E646EA9463BA3B489EFB7EBBAA2693D14238B50E4E686") + else() # AMD64 + set(program_version "q5ExVHmXyD34Q_Tzb-aRxsPipO-e37-csVRhVM7IJh0C") + set(gn_platform "windows-amd64") + set(download_sha512 "FA764AA44EB6F48ED50E855B4DC1DD1ABE35E45FD4AAC7F059A35293A14894C1B591215E34FB0CE9362E646EA9463BA3B489EFB7EBBAA2693D14238B50E4E686") + endif() endif() set(tool_subdirectory "${program_version}") set(download_urls "${cipd_download_gn}/${gn_platform}/+/${program_version}") From 8bdd0b6756c1581dbe71081e0dba68643442e681 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Thu, 14 Apr 2022 18:57:56 +0700 Subject: [PATCH 06/50] updated gn for mac and linux (amd64 / arm64) --- .../cmake/vcpkg_find_acquire_program.cmake | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 59653723a83d26..bf3bb24c7cc967 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -214,20 +214,34 @@ function(vcpkg_find_acquire_program program) set(apt_package_name "git") endif() elseif(program STREQUAL "GN") - message("Arch: $ENV{PROCESSOR_ARCHITECTURE}") + set(program_name gn) set(rename_binary_to "gn") set(cipd_download_gn "https://chrome-infra-packages.appspot.com/dl/gn/gn") if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") set(supported_on_unix ON) - set(program_version "xus7xtaPhpv5vCmKFOnsBVoB-PKmhZvRsSTjbQAuF0MC") - set(gn_platform "linux-amd64") - set(download_sha512 "871e75d7f3597b74fb99e36bb41fe5a9f8ce8a4d9f167f4729fc6e444807a59f35ec8aca70c2274a99c79d70a1108272be1ad991678a8ceb39e30f77abb13135") + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE HOST_ARCH) + if(HOST_ARCH STREQUAL "aarch64") + set(program_version "GkfFAfAUyE-qfeWkdUMaeM1Ov64Fk3SjSj9pwKqZX7gC") + set(gn_platform "linux-arm64") + set(download_sha512 "E88201309A12C00CE60137261B8E1A759780C81D1925B819583B16D2095A16A7D32EFB2AF36C1E1D6EAA142BF6A6A811847D3140E4E94967EE28F4ADF6373E4B") + else() + set(program_version "Fv1ENXodhXmEXy_xpZr2gQkVJh57w_IsbsrEJOU0_EoC") + set(gn_platform "linux-amd64") + set(download_sha512 "A7A5CD5633C5547EC1B1A95958486DDAAC91F1A65881EDC0AD8F74DF44E82F08BA74358E9A72DFCDDE6F534A6B9C9A430D3E16ACE2E4346C4D2E9113F7654B3F") + endif() elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") set(supported_on_unix ON) - set(program_version "qhxILDNcJ2H44HfHmfiU-XIY3E_SIXvFqLd2wvbIgOoC") - set(gn_platform "mac-amd64") - set(download_sha512 "03ee64cb15bae7fceb412900d470601090bce147cfd45eb9b46683ac1a5dca848465a5d74c55a47df7f0e334d708151249a6d37bb021de74dd48b97ed4a07937") + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE HOST_ARCH) + if(HOST_ARCH STREQUAL "arm64") + set(program_version "qMPtGq7xZlpb-lHjP-SK27ftT4X71WIvguuyx6X14DEC") + set(gn_platform "mac-arm64") + set(download_sha512 "D096FB958D017807427911089AB5A7655AED117F6851C0491AC8063CEDB544423122EF64DF4264ECA86C20A2BDE9E64D7B72DA7ED8C95C2BA79A68B8247D36B8") + else() + set(program_version "0x2juPLNfP9603GIyZrUfflxK6LiMcppLAoxEpYuIYoC") + set(gn_platform "mac-amd64") + set(download_sha512 "2696ECE7B2C8008CABDDF10024017E2ECF875F8679424E77052252BDDC83A2096DF3C61D89CD25120EF27E0458C8914BEEED9D418593BDBC4F6ED33A8D4C3DC5") + endif() else() if($ENV{PROCESSOR_ARCHITECTURE} STREQUAL "ARM64") set(program_version "q5ExVHmXyD34Q_Tzb-aRxsPipO-e37-csVRhVM7IJh0C") From 1d9cd3ca21672793f1bcb351d45c4d0489af27c1 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Thu, 14 Apr 2022 19:18:47 +0700 Subject: [PATCH 07/50] removed empty line --- scripts/cmake/vcpkg_find_acquire_program.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index bf3bb24c7cc967..903c20680c6535 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -214,7 +214,6 @@ function(vcpkg_find_acquire_program program) set(apt_package_name "git") endif() elseif(program STREQUAL "GN") - set(program_name gn) set(rename_binary_to "gn") set(cipd_download_gn "https://chrome-infra-packages.appspot.com/dl/gn/gn") From 6027b27657e0bc59879681b69873a5a52bc1d11c Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Fri, 15 Apr 2022 00:51:57 +0700 Subject: [PATCH 08/50] Remove patch files --- ports/skia/add-missing-tuple.patch | 12 ------------ ports/skia/portfile.cmake | 2 -- ports/skia/remove_unused_var.patch | 12 ------------ 3 files changed, 26 deletions(-) delete mode 100644 ports/skia/add-missing-tuple.patch delete mode 100644 ports/skia/remove_unused_var.patch diff --git a/ports/skia/add-missing-tuple.patch b/ports/skia/add-missing-tuple.patch deleted file mode 100644 index e33d44e3aefa0a..00000000000000 --- a/ports/skia/add-missing-tuple.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h -index 7afe4f9..502f83e 100644 ---- a/include/private/SkPathRef.h -+++ b/include/private/SkPathRef.h -@@ -21,6 +21,7 @@ - - #include - #include -+#include - - class SkRBuffer; - class SkWBuffer; diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index feb0a537b2338e..d20735513e501c 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -2,8 +2,6 @@ vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL https://skia.googlesource.com/skia.git REF 1a668363fdf0d663c6df3f124e7c10796bc842f0 - PATCHES remove_unused_var.patch - #PATCHES add-missing-tuple.patch ) vcpkg_find_acquire_program(PYTHON3) diff --git a/ports/skia/remove_unused_var.patch b/ports/skia/remove_unused_var.patch deleted file mode 100644 index 5509a2e1ac07fa..00000000000000 --- a/ports/skia/remove_unused_var.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/BUILD.gn b/BUILD.gn -index dc81d8c1b4..53b929c594 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -868,7 +868,6 @@ optional("gpu") { - } - - libs = [] -- frameworks = [] - - if (skia_use_gl) { - public_defines += [ "SK_GL" ] From a57b244cd2239b97ed128848555cd1e1a3cd585d Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Fri, 15 Apr 2022 19:10:49 +0700 Subject: [PATCH 09/50] changes from vejmartin --- ports/skia/portfile.cmake | 106 +++++++++++++++++++-------------- ports/skia/skiaConfig.cmake.in | 48 ++------------- 2 files changed, 65 insertions(+), 89 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index d20735513e501c..d7ed672664a08a 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -1,19 +1,22 @@ +vcpkg_fail_port_install( + ON_ARCH "x86" "arm" "arm64" + ON_TARGET "UWP" "LINUX" "ANDROID" "FREEBSD") + vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH - URL https://skia.googlesource.com/skia.git - REF 1a668363fdf0d663c6df3f124e7c10796bc842f0 + URL https://github.com/google/skia + REF 890498e3d73014e81ae15a250e5ed658f1cf11a6 ) -vcpkg_find_acquire_program(PYTHON3) -file(READ "${SOURCE_PATH}/.gn" GN_FILE_CONTENT) -string(REPLACE "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"" GN_FILE_CONTENT ${GN_FILE_CONTENT}) -file(WRITE "${SOURCE_PATH}/.gn" ${GN_FILE_CONTENT}) - -function(checkout_in_path PATH URL REF) +function(checkout_in_path PATH URL MIRROR_URL REF) if(EXISTS "${PATH}") return() endif() + if(SKIA_USE_MIRROR) + set(URL "${MIRROR_URL}") + endif() + vcpkg_from_git( OUT_SOURCE_PATH DEP_SOURCE_PATH URL "${URL}" @@ -27,20 +30,26 @@ set(EXTERNALS "${SOURCE_PATH}/third_party/externals") file(MAKE_DIRECTORY "${EXTERNALS}") # these following aren't available in vcpkg +# to update, visit the DEPS file in Skia's root directory +# define SKIA_USE_MIRROR in a triplet to use the mirrors checkout_in_path("${EXTERNALS}/sfntly" + "https://github.com/googlefonts/sfntly" "https://github.com/googlefonts/sfntly" "b55ff303ea2f9e26702b514cf6a3196a2e3e2974" ) checkout_in_path("${EXTERNALS}/dng_sdk" "https://android.googlesource.com/platform/external/dng_sdk" + "https://gitee.com/mirrors_android_source/dng_sdk" "c8d0c9b1d16bfda56f15165d39e0ffa360a11123" ) checkout_in_path("${EXTERNALS}/libgifcodec" "https://skia.googlesource.com/libgifcodec" - "d06d2a6d42baf6c0c91cacc28df2542a911d05fe" + "https://gitee.com/mirrors_skia_googlesource/libgifcodec" + "fd59fa92a0c86788dcdd84d091e1ce81eda06a77" ) checkout_in_path("${EXTERNALS}/piex" "https://android.googlesource.com/platform/external/piex" + "https://gitee.com/mirrors_android_source/piex" "bb217acdca1cc0c16b704669dd6f91a1b509c406" ) @@ -51,7 +60,7 @@ function(cmake_to_gn_list OUTPUT_ INPUT_) set(${OUTPUT_} "[]" PARENT_SCOPE) else() string(REPLACE ";" "\",\"" TEMP "${INPUT_}") - set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) + set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) endif() endfunction() @@ -102,7 +111,9 @@ replace_skia_dep(harfbuzz "/include/harfbuzz" "harfbuzz-icu" "harfbuzz-icu" "") replace_skia_dep(icu "/include" "icuuc,icuucd" "icuuc" "U_USING_ICU_NAMESPACE=0") replace_skia_dep(libjpeg-turbo "/include" "jpeg,jpegd;turbojpeg,turbojpegd" "jpeg;turbojpeg" "") replace_skia_dep(libpng "/include" "libpng16,libpng16d" "libpng16" "") -replace_skia_dep(libwebp "/include" "webp;webpdemux;webpdecoder;webpmux" "webp;webpdemux;webpdecoder;webpmux" "") +replace_skia_dep(libwebp "/include" + "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;libwebpmux,libwebpmuxd" + "webp;webpdemux;webpdecoder;libwebpmux" "") replace_skia_dep(zlib "/include" "z,zlib,zlibd" "z,zlib" "") set(OPTIONS "\ @@ -110,13 +121,6 @@ skia_use_lua=false \ skia_enable_tools=false \ skia_enable_spirv_validation=false") -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(OPTIONS "${OPTIONS} target_cpu=\"arm64\"") -endif() - -# used for passing feature-specific definitions to the config file -set(SKIA_PUBLIC_DEFINITIONS "") - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(OPTIONS "${OPTIONS} is_component_build=true") else() @@ -125,12 +129,6 @@ endif() if("metal" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} skia_use_metal=true") - list(APPEND SKIA_PUBLIC_DEFINITIONS SK_METAL) -endif() - -if("opengl" IN_LIST FEATURES) - set(OPTIONS "${OPTIONS} skia_use_gl=true") - list(APPEND SKIA_PUBLIC_DEFINITIONS SK_GL) endif() set(OPTIONS_REL "${OPTIONS} is_official_build=true") @@ -171,6 +169,10 @@ if(CMAKE_HOST_WIN32) endif() +z_vcpkg_install_gn_create_extract_public_config_targets( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS "extract_skia//:skia") + vcpkg_configure_gn( SOURCE_PATH "${SOURCE_PATH}" OPTIONS_DEBUG "${OPTIONS_DBG}" @@ -183,11 +185,11 @@ vcpkg_install_gn( ) message(STATUS "Installing: ${CURRENT_PACKAGES_DIR}/include/${PORT}") -file(COPY "${SOURCE_PATH}/include" +file(COPY "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}/include") -file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" +file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" "${CURRENT_PACKAGES_DIR}/include/${PORT}") -file(GLOB_RECURSE SKIA_INCLUDE_FILES LIST_DIRECTORIES false +file(GLOB_RECURSE SKIA_INCLUDE_FILES LIST_DIRECTORIES false "${CURRENT_PACKAGES_DIR}/include/${PORT}/*") foreach(file_ ${SKIA_INCLUDE_FILES}) vcpkg_replace_string("${file_}" "#include \"include/" "#include \"${PORT}/") @@ -195,32 +197,46 @@ endforeach() # get a list of library dependencies for TARGET function(gn_desc_target_libs OUTPUT BUILD_DIR TARGET) - vcpkg_find_acquire_program(GN) - execute_process( - COMMAND ${GN} desc "${BUILD_DIR}" "${TARGET}" libs - WORKING_DIRECTORY "${SOURCE_PATH}" - OUTPUT_VARIABLE OUTPUT_ - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - string(REGEX REPLACE "\n|(\r\n)" ";" OUTPUT_ "${OUTPUT_}") + z_vcpkg_install_gn_get_desc("${OUTPUT}" + SOURCE_PATH "${SOURCE_PATH}" + BUILD_DIR "${BUILD_DIR}" + TARGET "${TARGET}" + WHAT_TO_DISPLAY libs) +endfunction() + +function(gn_desc_target_defines OUTPUT BUILD_DIR TARGET) + z_vcpkg_install_gn_get_desc(OUTPUT_ + SOURCE_PATH "${SOURCE_PATH}" + BUILD_DIR "${BUILD_DIR}" + TARGET "${TARGET}" + WHAT_TO_DISPLAY defines) + # exclude system defines such as _HAS_EXCEPTIONS=0 + list(FILTER OUTPUT_ EXCLUDE REGEX "^_") set(${OUTPUT} ${OUTPUT_} PARENT_SCOPE) endfunction() # skiaConfig.cmake.in input variables -gn_desc_target_libs(SKIA_DEP_DBG - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - //:skia) -gn_desc_target_libs(SKIA_DEP_REL - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - //:skia) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + gn_desc_target_libs(SKIA_DEP_DBG + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + //:skia) + gn_desc_target_defines(SKIA_DEFINITIONS_DBG + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + //extract_public_config:extract_skia) +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + gn_desc_target_libs(SKIA_DEP_REL + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + //:skia) + gn_desc_target_defines(SKIA_DEFINITIONS_REL + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + //extract_public_config:extract_skia) +endif() configure_file("${CMAKE_CURRENT_LIST_DIR}/skiaConfig.cmake.in" "${CURRENT_PACKAGES_DIR}/share/skia/skiaConfig.cmake" @ONLY) -file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/share/skia") -vcpkg_cmake_config_fixup() -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") - vcpkg_copy_pdbs() file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" diff --git a/ports/skia/skiaConfig.cmake.in b/ports/skia/skiaConfig.cmake.in index b4c7c82ce86db9..62f816a6ba44e1 100644 --- a/ports/skia/skiaConfig.cmake.in +++ b/ports/skia/skiaConfig.cmake.in @@ -1,12 +1,9 @@ add_library(skia INTERFACE) add_library(skia::skia ALIAS skia) - -set(SKIA_LIBRARY_NAME_DBG @SKIA_LIBRARY_NAME_DBG@) -set(SKIA_LIBRARY_NAME_REL @SKIA_LIBRARY_NAME_REL@) -set(SKIA_LIBRARY_IMPLIB_DBG @SKIA_LIBRARY_IMPLIB_DBG@) -set(SKIA_LIBRARY_IMPLIB_REL @SKIA_LIBRARY_IMPLIB_REL@) - -set(SKIA_PUBLIC_DEFINITIONS @SKIA_PUBLIC_DEFINITIONS@) +set(SKIA_DEP_DBG @SKIA_DEP_DBG@) +set(SKIA_DEP_REL @SKIA_DEP_REL@) +set(SKIA_DEFINITIONS_DBG @SKIA_DEFINITIONS_DBG@) +set(SKIA_DEFINITIONS_REL @SKIA_DEFINITIONS_REL@) # Compute the installation prefix relative to this file. get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) @@ -16,9 +13,6 @@ if(_IMPORT_PREFIX STREQUAL "/") set(_IMPORT_PREFIX "") endif() -set(SKIA_DEP_DBG @SKIA_DEP_DBG@) -set(SKIA_DEP_REL @SKIA_DEP_REL@) - find_library(SKIA_LIB NAMES skia skia.dll) target_link_libraries(skia INTERFACE "${SKIA_LIB}") @@ -45,42 +39,8 @@ endfunction() set_dependencies(Debug "${SKIA_DEP_DBG}") set_dependencies(Release "${SKIA_DEP_REL}") -set(SKIA_DEFINITIONS_DBG - _CRT_SECURE_NO_WARNINGS - _HAS_EXCEPTIONS=0 - WIN32_LEAN_AND_MEAN - NOMINMAX - SK_GL - SK_ENABLE_DUMP_GPU - SK_SUPPORT_PDF - SK_HAS_JPEG_LIBRARY - SK_USE_LIBGIFCODEC - SK_HAS_HEIF_LIBRARY - SK_HAS_PNG_LIBRARY - SK_ENABLE_SKSL_INTERPRETER - SK_HAS_WEBP_LIBRARY - SK_XML - SKIA_DLL - SK_SUPPORT_ATLAS_TEXT=1) - -set(SKIA_DEFINITIONS_REL - _CRT_SECURE_NO_WARNINGS - _HAS_EXCEPTIONS=0 - WIN32_LEAN_AND_MEAN - NOMINMAX - NDEBUG - SK_GL - SK_SUPPORT_PDF - SK_HAS_JPEG_LIBRARY - SK_USE_LIBGIFCODEC - SK_HAS_PNG_LIBRARY - SK_HAS_WEBP_LIBRARY - SK_XML - SKIA_DLL) - target_compile_definitions(skia INTERFACE $<$:${SKIA_DEFINITIONS_DBG}> $<$:${SKIA_DEFINITIONS_REL}>) target_include_directories(skia INTERFACE ${_IMPORT_PREFIX}/include) -target_compile_definitions(skia INTERFACE ${SKIA_PUBLIC_DEFINITIONS}) From eb863cb15032639d9778f9d31de32753714a003d Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Fri, 15 Apr 2022 21:00:57 +0700 Subject: [PATCH 10/50] make skia build x64-windows --- ports/skia/portfile.cmake | 21 +++++++++++---------- scripts/cmake/vcpkg_configure_gn.cmake | 6 +++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index d7ed672664a08a..70f353fe2f3238 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -1,13 +1,14 @@ -vcpkg_fail_port_install( - ON_ARCH "x86" "arm" "arm64" - ON_TARGET "UWP" "LINUX" "ANDROID" "FREEBSD") - vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL https://github.com/google/skia - REF 890498e3d73014e81ae15a250e5ed658f1cf11a6 + REF 3aa7f602018816ab3f009f1b8d359ccde752e1de ) +vcpkg_find_acquire_program(PYTHON3) +file(READ "${SOURCE_PATH}/.gn" GN_FILE_CONTENT) +string(REPLACE "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"" GN_FILE_CONTENT ${GN_FILE_CONTENT}) +file(WRITE "${SOURCE_PATH}/.gn" ${GN_FILE_CONTENT}) + function(checkout_in_path PATH URL MIRROR_URL REF) if(EXISTS "${PATH}") return() @@ -107,7 +108,7 @@ set(_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include") replace_skia_dep(expat "/include" "libexpat,libexpatd,libexpatdMD" "libexpat,libexpatMD" "") replace_skia_dep(freetype2 "/include" "freetype,freetyped" "freetype" "") -replace_skia_dep(harfbuzz "/include/harfbuzz" "harfbuzz-icu" "harfbuzz-icu" "") +replace_skia_dep(harfbuzz "/include/harfbuzz" "harfbuzz;harfbuzz-subset" "harfbuzz;harfbuzz-subset" "") replace_skia_dep(icu "/include" "icuuc,icuucd" "icuuc" "U_USING_ICU_NAMESPACE=0") replace_skia_dep(libjpeg-turbo "/include" "jpeg,jpegd;turbojpeg,turbojpegd" "jpeg;turbojpeg" "") replace_skia_dep(libpng "/include" "libpng16,libpng16d" "libpng16" "") @@ -169,9 +170,9 @@ if(CMAKE_HOST_WIN32) endif() -z_vcpkg_install_gn_create_extract_public_config_targets( - SOURCE_PATH "${SOURCE_PATH}" - TARGETS "extract_skia//:skia") +#z_vcpkg_install_gn_create_extract_public_config_targets( +# SOURCE_PATH "${SOURCE_PATH}" +# TARGETS "extract_skia//:skia") vcpkg_configure_gn( SOURCE_PATH "${SOURCE_PATH}" @@ -237,7 +238,7 @@ endif() configure_file("${CMAKE_CURRENT_LIST_DIR}/skiaConfig.cmake.in" "${CURRENT_PACKAGES_DIR}/share/skia/skiaConfig.cmake" @ONLY) -vcpkg_copy_pdbs() +#vcpkg_copy_pdbs() file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/scripts/cmake/vcpkg_configure_gn.cmake b/scripts/cmake/vcpkg_configure_gn.cmake index cdd4c313aa2385..d3ec8ab59d5ebb 100644 --- a/scripts/cmake/vcpkg_configure_gn.cmake +++ b/scripts/cmake/vcpkg_configure_gn.cmake @@ -56,9 +56,9 @@ function(vcpkg_configure_gn) message(FATAL_ERROR "SOURCE_PATH must be specified.") endif() - vcpkg_find_acquire_program(PYTHON2) - get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) - vcpkg_add_to_path(PREPEND "${PYTHON2_DIR}") + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) + vcpkg_add_to_path(PREPEND "${PYTHON3_DIR}") vcpkg_find_acquire_program(GN) From 2609ae642eff0e1a1725c3b9b50a8c325ad10e26 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Fri, 15 Apr 2022 21:22:46 +0700 Subject: [PATCH 11/50] update version --- versions/baseline.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index bcdcbb6c22ed5b..c5d01e18c26594 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6521,8 +6521,8 @@ "port-version": 0 }, "skia": { - "baseline": "2020-05-18", - "port-version": 9 + "baseline": "2022-04-10", + "port-version": 0 }, "skyr-url": { "baseline": "1.13.0", From c3bf0985598942876071b04f07be4b937773efbe Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Fri, 15 Apr 2022 21:23:04 +0700 Subject: [PATCH 12/50] update version --- versions/baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index c5d01e18c26594..89d763ac4a759f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6522,7 +6522,7 @@ }, "skia": { "baseline": "2022-04-10", - "port-version": 0 + "port-version": 9 }, "skyr-url": { "baseline": "1.13.0", From 0d2f053be0ed8b6ce58c2db53c402ab8022192b2 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Fri, 15 Apr 2022 21:32:57 +0700 Subject: [PATCH 13/50] enable linux --- ports/skia/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json index 756ab79e83b255..de1284a9096f8d 100644 --- a/ports/skia/vcpkg.json +++ b/ports/skia/vcpkg.json @@ -8,7 +8,7 @@ "Skia is sponsored and managed by Google, but is available for use by anyone under the BSD Free Software License. While engineering of the core components is done by the Skia development team, we consider contributions from any source." ], "homepage": "https://skia.org", - "supports": "osx | windows", + "supports": "osx | windows | linux", "dependencies": [ "expat", { From 787ba23de724f04f3b01b48fe601c107a7b6e86e Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 01:04:17 +0700 Subject: [PATCH 14/50] update crashpad --- ports/crashpad/portfile.cmake | 7 +++++-- ports/crashpad/vcpkg.json | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/crashpad/portfile.cmake b/ports/crashpad/portfile.cmake index 1764fc99ac0a12..364d0a39888e46 100644 --- a/ports/crashpad/portfile.cmake +++ b/ports/crashpad/portfile.cmake @@ -3,7 +3,7 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL https://chromium.googlesource.com/crashpad/crashpad - REF 9a31d3f8e9815774026a753a1ff6155347cd549f + REF 68aba08c48bb428b7b159b3371163f86e8d5a126 ) function(checkout_in_path PATH URL REF) @@ -24,7 +24,7 @@ endfunction() checkout_in_path( "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium" "https://chromium.googlesource.com/chromium/mini_chromium" - "c426ff98e1d9e9d59777fe8b883a5c0ceeca9ca3" + "5654edb4225bcad13901155c819febb5748e502b" ) function(replace_gn_dependency INPUT_FILE OUTPUT_FILE LIBRARY_NAMES) @@ -119,6 +119,9 @@ file(REMOVE_RECURSE configure_file("${CMAKE_CURRENT_LIST_DIR}/crashpadConfig.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/crashpadConfig.cmake" @ONLY) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/${PORT}/build") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/${PORT}/util/mach/__pycache__") + vcpkg_copy_pdbs() file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json index d244f5987365bb..a4ef1d69638480 100644 --- a/ports/crashpad/vcpkg.json +++ b/ports/crashpad/vcpkg.json @@ -1,13 +1,13 @@ { "name": "crashpad", - "version-date": "2020-03-18", + "version-date": "2022-04-16", "port-version": 2, "description": [ "Crashpad is a crash-reporting system.", "Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss." ], "homepage": "https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md", - "supports": "x64 & (osx | windows)", + "supports": "(osx | windows)", "dependencies": [ "zlib" ] From 725b5505313cdb57af7f895b786b4908b4775aae Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 01:13:23 +0700 Subject: [PATCH 15/50] make crashpad build on windows --- ports/crashpad/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/crashpad/portfile.cmake b/ports/crashpad/portfile.cmake index 364d0a39888e46..4255ff29a99191 100644 --- a/ports/crashpad/portfile.cmake +++ b/ports/crashpad/portfile.cmake @@ -6,6 +6,11 @@ vcpkg_from_git( REF 68aba08c48bb428b7b159b3371163f86e8d5a126 ) +vcpkg_find_acquire_program(PYTHON3) +file(READ "${SOURCE_PATH}/.gn" GN_FILE_CONTENT) +string(REPLACE "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"" GN_FILE_CONTENT ${GN_FILE_CONTENT}) +file(WRITE "${SOURCE_PATH}/.gn" ${GN_FILE_CONTENT}) + function(checkout_in_path PATH URL REF) if(EXISTS "${PATH}") return() From 8d24d7ce995ae5f66d6f95868a2ca46bfb6acc5f Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 02:06:37 +0700 Subject: [PATCH 16/50] formatted crashpad/vcpkg.json --- ports/crashpad/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json index a4ef1d69638480..5e05cf795fdde9 100644 --- a/ports/crashpad/vcpkg.json +++ b/ports/crashpad/vcpkg.json @@ -7,7 +7,7 @@ "Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss." ], "homepage": "https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md", - "supports": "(osx | windows)", + "supports": "osx | windows", "dependencies": [ "zlib" ] From eaeff3f362962a06f52f6271397a9ce148dea155 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 02:06:55 +0700 Subject: [PATCH 17/50] update version --- versions/baseline.json | 2 +- versions/c-/crashpad.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 89d763ac4a759f..d3ddb2af5bfe94 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1669,7 +1669,7 @@ "port-version": 1 }, "crashpad": { - "baseline": "2020-03-18", + "baseline": "2022-04-16", "port-version": 2 }, "crashrpt": { diff --git a/versions/c-/crashpad.json b/versions/c-/crashpad.json index 6a57a61610372b..56bc7d29f36d5a 100644 --- a/versions/c-/crashpad.json +++ b/versions/c-/crashpad.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3763e87e3bf4e883bbde5c81f508c998de3e93f8", + "version-date": "2022-04-16", + "port-version": 2 + }, { "git-tree": "88ee612aa949155b1e363bb710578811d3283033", "version-date": "2020-03-18", From ece6a8219ef329bda287f6a037dc7ba360fbdf54 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 03:15:42 +0700 Subject: [PATCH 18/50] remove portfile --- ports/skia/portfile.cmake | 244 -------------------------------------- 1 file changed, 244 deletions(-) delete mode 100644 ports/skia/portfile.cmake diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake deleted file mode 100644 index 70f353fe2f3238..00000000000000 --- a/ports/skia/portfile.cmake +++ /dev/null @@ -1,244 +0,0 @@ -vcpkg_from_git( - OUT_SOURCE_PATH SOURCE_PATH - URL https://github.com/google/skia - REF 3aa7f602018816ab3f009f1b8d359ccde752e1de -) - -vcpkg_find_acquire_program(PYTHON3) -file(READ "${SOURCE_PATH}/.gn" GN_FILE_CONTENT) -string(REPLACE "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"" GN_FILE_CONTENT ${GN_FILE_CONTENT}) -file(WRITE "${SOURCE_PATH}/.gn" ${GN_FILE_CONTENT}) - -function(checkout_in_path PATH URL MIRROR_URL REF) - if(EXISTS "${PATH}") - return() - endif() - - if(SKIA_USE_MIRROR) - set(URL "${MIRROR_URL}") - endif() - - vcpkg_from_git( - OUT_SOURCE_PATH DEP_SOURCE_PATH - URL "${URL}" - REF "${REF}" - ) - file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") - file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") -endfunction() - -set(EXTERNALS "${SOURCE_PATH}/third_party/externals") -file(MAKE_DIRECTORY "${EXTERNALS}") - -# these following aren't available in vcpkg -# to update, visit the DEPS file in Skia's root directory -# define SKIA_USE_MIRROR in a triplet to use the mirrors -checkout_in_path("${EXTERNALS}/sfntly" - "https://github.com/googlefonts/sfntly" - "https://github.com/googlefonts/sfntly" - "b55ff303ea2f9e26702b514cf6a3196a2e3e2974" -) -checkout_in_path("${EXTERNALS}/dng_sdk" - "https://android.googlesource.com/platform/external/dng_sdk" - "https://gitee.com/mirrors_android_source/dng_sdk" - "c8d0c9b1d16bfda56f15165d39e0ffa360a11123" -) -checkout_in_path("${EXTERNALS}/libgifcodec" - "https://skia.googlesource.com/libgifcodec" - "https://gitee.com/mirrors_skia_googlesource/libgifcodec" - "fd59fa92a0c86788dcdd84d091e1ce81eda06a77" -) -checkout_in_path("${EXTERNALS}/piex" - "https://android.googlesource.com/platform/external/piex" - "https://gitee.com/mirrors_android_source/piex" - "bb217acdca1cc0c16b704669dd6f91a1b509c406" -) - -# turn a CMake list into a GN list of quoted items -# "a;b;c" -> ["a","b","c"] -function(cmake_to_gn_list OUTPUT_ INPUT_) - if(NOT INPUT_) - set(${OUTPUT_} "[]" PARENT_SCOPE) - else() - string(REPLACE ";" "\",\"" TEMP "${INPUT_}") - set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) - endif() -endfunction() - -# multiple libraries with multiple names may be passed as -# "libA,libA2;libB,libB2,libB3;..." -function(find_libraries RESOLVED LIBRARY_NAMES PATHS) - set(_RESOLVED "") - foreach(_LIB_GROUP ${LIBRARY_NAMES}) - string(REPLACE "," ";" _LIB_GROUP_NAMES "${_LIB_GROUP}") - unset(_LIB CACHE) - find_library(_LIB NAMES ${_LIB_GROUP_NAMES} - PATHS "${PATHS}" - NO_DEFAULT_PATH) - - if(_LIB MATCHES "-NOTFOUND") - message(FATAL_ERROR "Could not find library with names: ${_LIB_GROUP_NAMES}") - endif() - - list(APPEND _RESOLVED "${_LIB}") - endforeach() - set(${RESOLVED} "${_RESOLVED}" PARENT_SCOPE) -endfunction() - -# For each .gn file in the current list directory, configure and install at -# the corresponding directory to replace Skia dependencies with ones from vcpkg. -function(replace_skia_dep NAME INCLUDES LIBS_DBG LIBS_REL DEFINITIONS) - list(TRANSFORM INCLUDES PREPEND "${CURRENT_INSTALLED_DIR}") - cmake_to_gn_list(_INCLUDES "${INCLUDES}") - - find_libraries(_LIBS_DBG "${LIBS_DBG}" "${CURRENT_INSTALLED_DIR}/debug/lib") - cmake_to_gn_list(_LIBS_DBG "${_LIBS_DBG}") - - find_libraries(_LIBS_REL "${LIBS_REL}" "${CURRENT_INSTALLED_DIR}/lib") - cmake_to_gn_list(_LIBS_REL "${_LIBS_REL}") - - cmake_to_gn_list(_DEFINITIONS "${DEFINITIONS}") - - set(OUT_FILE "${SOURCE_PATH}/third_party/${NAME}/BUILD.gn") - file(REMOVE "${OUT_FILE}") - configure_file("${CMAKE_CURRENT_LIST_DIR}/${NAME}.gn" "${OUT_FILE}" @ONLY) -endfunction() - -set(_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include") - -replace_skia_dep(expat "/include" "libexpat,libexpatd,libexpatdMD" "libexpat,libexpatMD" "") -replace_skia_dep(freetype2 "/include" "freetype,freetyped" "freetype" "") -replace_skia_dep(harfbuzz "/include/harfbuzz" "harfbuzz;harfbuzz-subset" "harfbuzz;harfbuzz-subset" "") -replace_skia_dep(icu "/include" "icuuc,icuucd" "icuuc" "U_USING_ICU_NAMESPACE=0") -replace_skia_dep(libjpeg-turbo "/include" "jpeg,jpegd;turbojpeg,turbojpegd" "jpeg;turbojpeg" "") -replace_skia_dep(libpng "/include" "libpng16,libpng16d" "libpng16" "") -replace_skia_dep(libwebp "/include" - "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;libwebpmux,libwebpmuxd" - "webp;webpdemux;webpdecoder;libwebpmux" "") -replace_skia_dep(zlib "/include" "z,zlib,zlibd" "z,zlib" "") - -set(OPTIONS "\ -skia_use_lua=false \ -skia_enable_tools=false \ -skia_enable_spirv_validation=false") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(OPTIONS "${OPTIONS} is_component_build=true") -else() - set(OPTIONS "${OPTIONS} is_component_build=false") -endif() - -if("metal" IN_LIST FEATURES) - set(OPTIONS "${OPTIONS} skia_use_metal=true") -endif() - -set(OPTIONS_REL "${OPTIONS} is_official_build=true") -set(OPTIONS_DBG "${OPTIONS} is_debug=true") - -if(CMAKE_HOST_WIN32) - # Load toolchains - if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") - endif() - include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") - - # turn a space delimited string into a gn list: - # "a b c" -> ["a","b","c"] - function(to_gn_list OUTPUT_ INPUT_) - string(STRIP "${INPUT_}" TEMP) - string(REPLACE " " " " TEMP "${TEMP}") - string(REPLACE " " "\",\"" TEMP "${TEMP}") - set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) - endfunction() - - to_gn_list(SKIA_C_FLAGS_DBG "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}") - to_gn_list(SKIA_C_FLAGS_REL "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") - - to_gn_list(SKIA_CXX_FLAGS_DBG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") - to_gn_list(SKIA_CXX_FLAGS_REL "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") - - set(OPTIONS_DBG "${OPTIONS_DBG} extra_cflags_c=${SKIA_C_FLAGS_DBG} \ - extra_cflags_cc=${SKIA_CXX_FLAGS_DBG}") - - set(OPTIONS_REL "${OPTIONS_REL} extra_cflags_c=${SKIA_C_FLAGS_REL} \ - extra_cflags_cc=${SKIA_CXX_FLAGS_REL}") - - set(WIN_VC "$ENV{VCINSTALLDIR}") - string(REPLACE "\\VC\\" "\\VC" WIN_VC "${WIN_VC}") - set(OPTIONS_DBG "${OPTIONS_DBG} win_vc=\"${WIN_VC}\"") - set(OPTIONS_REL "${OPTIONS_REL} win_vc=\"${WIN_VC}\"") - -endif() - -#z_vcpkg_install_gn_create_extract_public_config_targets( -# SOURCE_PATH "${SOURCE_PATH}" -# TARGETS "extract_skia//:skia") - -vcpkg_configure_gn( - SOURCE_PATH "${SOURCE_PATH}" - OPTIONS_DEBUG "${OPTIONS_DBG}" - OPTIONS_RELEASE "${OPTIONS_REL}" -) - -vcpkg_install_gn( - SOURCE_PATH "${SOURCE_PATH}" - TARGETS ":skia" -) - -message(STATUS "Installing: ${CURRENT_PACKAGES_DIR}/include/${PORT}") -file(COPY "${SOURCE_PATH}/include" - DESTINATION "${CURRENT_PACKAGES_DIR}/include") -file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" - "${CURRENT_PACKAGES_DIR}/include/${PORT}") -file(GLOB_RECURSE SKIA_INCLUDE_FILES LIST_DIRECTORIES false - "${CURRENT_PACKAGES_DIR}/include/${PORT}/*") -foreach(file_ ${SKIA_INCLUDE_FILES}) - vcpkg_replace_string("${file_}" "#include \"include/" "#include \"${PORT}/") -endforeach() - -# get a list of library dependencies for TARGET -function(gn_desc_target_libs OUTPUT BUILD_DIR TARGET) - z_vcpkg_install_gn_get_desc("${OUTPUT}" - SOURCE_PATH "${SOURCE_PATH}" - BUILD_DIR "${BUILD_DIR}" - TARGET "${TARGET}" - WHAT_TO_DISPLAY libs) -endfunction() - -function(gn_desc_target_defines OUTPUT BUILD_DIR TARGET) - z_vcpkg_install_gn_get_desc(OUTPUT_ - SOURCE_PATH "${SOURCE_PATH}" - BUILD_DIR "${BUILD_DIR}" - TARGET "${TARGET}" - WHAT_TO_DISPLAY defines) - # exclude system defines such as _HAS_EXCEPTIONS=0 - list(FILTER OUTPUT_ EXCLUDE REGEX "^_") - set(${OUTPUT} ${OUTPUT_} PARENT_SCOPE) -endfunction() - -# skiaConfig.cmake.in input variables -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - gn_desc_target_libs(SKIA_DEP_DBG - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - //:skia) - gn_desc_target_defines(SKIA_DEFINITIONS_DBG - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - //extract_public_config:extract_skia) -endif() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - gn_desc_target_libs(SKIA_DEP_REL - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - //:skia) - gn_desc_target_defines(SKIA_DEFINITIONS_REL - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - //extract_public_config:extract_skia) -endif() - -configure_file("${CMAKE_CURRENT_LIST_DIR}/skiaConfig.cmake.in" - "${CURRENT_PACKAGES_DIR}/share/skia/skiaConfig.cmake" @ONLY) - -#vcpkg_copy_pdbs() -file(INSTALL "${SOURCE_PATH}/LICENSE" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" - RENAME copyright) From 0f4a218e097611828d78688065cec88814dc5809 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 03:16:20 +0700 Subject: [PATCH 19/50] add file again --- ports/skia/portfile.cmake | 244 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 244 insertions(+) create mode 100644 ports/skia/portfile.cmake diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake new file mode 100644 index 00000000000000..70f353fe2f3238 --- /dev/null +++ b/ports/skia/portfile.cmake @@ -0,0 +1,244 @@ +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://github.com/google/skia + REF 3aa7f602018816ab3f009f1b8d359ccde752e1de +) + +vcpkg_find_acquire_program(PYTHON3) +file(READ "${SOURCE_PATH}/.gn" GN_FILE_CONTENT) +string(REPLACE "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"" GN_FILE_CONTENT ${GN_FILE_CONTENT}) +file(WRITE "${SOURCE_PATH}/.gn" ${GN_FILE_CONTENT}) + +function(checkout_in_path PATH URL MIRROR_URL REF) + if(EXISTS "${PATH}") + return() + endif() + + if(SKIA_USE_MIRROR) + set(URL "${MIRROR_URL}") + endif() + + vcpkg_from_git( + OUT_SOURCE_PATH DEP_SOURCE_PATH + URL "${URL}" + REF "${REF}" + ) + file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") + file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") +endfunction() + +set(EXTERNALS "${SOURCE_PATH}/third_party/externals") +file(MAKE_DIRECTORY "${EXTERNALS}") + +# these following aren't available in vcpkg +# to update, visit the DEPS file in Skia's root directory +# define SKIA_USE_MIRROR in a triplet to use the mirrors +checkout_in_path("${EXTERNALS}/sfntly" + "https://github.com/googlefonts/sfntly" + "https://github.com/googlefonts/sfntly" + "b55ff303ea2f9e26702b514cf6a3196a2e3e2974" +) +checkout_in_path("${EXTERNALS}/dng_sdk" + "https://android.googlesource.com/platform/external/dng_sdk" + "https://gitee.com/mirrors_android_source/dng_sdk" + "c8d0c9b1d16bfda56f15165d39e0ffa360a11123" +) +checkout_in_path("${EXTERNALS}/libgifcodec" + "https://skia.googlesource.com/libgifcodec" + "https://gitee.com/mirrors_skia_googlesource/libgifcodec" + "fd59fa92a0c86788dcdd84d091e1ce81eda06a77" +) +checkout_in_path("${EXTERNALS}/piex" + "https://android.googlesource.com/platform/external/piex" + "https://gitee.com/mirrors_android_source/piex" + "bb217acdca1cc0c16b704669dd6f91a1b509c406" +) + +# turn a CMake list into a GN list of quoted items +# "a;b;c" -> ["a","b","c"] +function(cmake_to_gn_list OUTPUT_ INPUT_) + if(NOT INPUT_) + set(${OUTPUT_} "[]" PARENT_SCOPE) + else() + string(REPLACE ";" "\",\"" TEMP "${INPUT_}") + set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) + endif() +endfunction() + +# multiple libraries with multiple names may be passed as +# "libA,libA2;libB,libB2,libB3;..." +function(find_libraries RESOLVED LIBRARY_NAMES PATHS) + set(_RESOLVED "") + foreach(_LIB_GROUP ${LIBRARY_NAMES}) + string(REPLACE "," ";" _LIB_GROUP_NAMES "${_LIB_GROUP}") + unset(_LIB CACHE) + find_library(_LIB NAMES ${_LIB_GROUP_NAMES} + PATHS "${PATHS}" + NO_DEFAULT_PATH) + + if(_LIB MATCHES "-NOTFOUND") + message(FATAL_ERROR "Could not find library with names: ${_LIB_GROUP_NAMES}") + endif() + + list(APPEND _RESOLVED "${_LIB}") + endforeach() + set(${RESOLVED} "${_RESOLVED}" PARENT_SCOPE) +endfunction() + +# For each .gn file in the current list directory, configure and install at +# the corresponding directory to replace Skia dependencies with ones from vcpkg. +function(replace_skia_dep NAME INCLUDES LIBS_DBG LIBS_REL DEFINITIONS) + list(TRANSFORM INCLUDES PREPEND "${CURRENT_INSTALLED_DIR}") + cmake_to_gn_list(_INCLUDES "${INCLUDES}") + + find_libraries(_LIBS_DBG "${LIBS_DBG}" "${CURRENT_INSTALLED_DIR}/debug/lib") + cmake_to_gn_list(_LIBS_DBG "${_LIBS_DBG}") + + find_libraries(_LIBS_REL "${LIBS_REL}" "${CURRENT_INSTALLED_DIR}/lib") + cmake_to_gn_list(_LIBS_REL "${_LIBS_REL}") + + cmake_to_gn_list(_DEFINITIONS "${DEFINITIONS}") + + set(OUT_FILE "${SOURCE_PATH}/third_party/${NAME}/BUILD.gn") + file(REMOVE "${OUT_FILE}") + configure_file("${CMAKE_CURRENT_LIST_DIR}/${NAME}.gn" "${OUT_FILE}" @ONLY) +endfunction() + +set(_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include") + +replace_skia_dep(expat "/include" "libexpat,libexpatd,libexpatdMD" "libexpat,libexpatMD" "") +replace_skia_dep(freetype2 "/include" "freetype,freetyped" "freetype" "") +replace_skia_dep(harfbuzz "/include/harfbuzz" "harfbuzz;harfbuzz-subset" "harfbuzz;harfbuzz-subset" "") +replace_skia_dep(icu "/include" "icuuc,icuucd" "icuuc" "U_USING_ICU_NAMESPACE=0") +replace_skia_dep(libjpeg-turbo "/include" "jpeg,jpegd;turbojpeg,turbojpegd" "jpeg;turbojpeg" "") +replace_skia_dep(libpng "/include" "libpng16,libpng16d" "libpng16" "") +replace_skia_dep(libwebp "/include" + "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;libwebpmux,libwebpmuxd" + "webp;webpdemux;webpdecoder;libwebpmux" "") +replace_skia_dep(zlib "/include" "z,zlib,zlibd" "z,zlib" "") + +set(OPTIONS "\ +skia_use_lua=false \ +skia_enable_tools=false \ +skia_enable_spirv_validation=false") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS "${OPTIONS} is_component_build=true") +else() + set(OPTIONS "${OPTIONS} is_component_build=false") +endif() + +if("metal" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} skia_use_metal=true") +endif() + +set(OPTIONS_REL "${OPTIONS} is_official_build=true") +set(OPTIONS_DBG "${OPTIONS} is_debug=true") + +if(CMAKE_HOST_WIN32) + # Load toolchains + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + endif() + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + + # turn a space delimited string into a gn list: + # "a b c" -> ["a","b","c"] + function(to_gn_list OUTPUT_ INPUT_) + string(STRIP "${INPUT_}" TEMP) + string(REPLACE " " " " TEMP "${TEMP}") + string(REPLACE " " "\",\"" TEMP "${TEMP}") + set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) + endfunction() + + to_gn_list(SKIA_C_FLAGS_DBG "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}") + to_gn_list(SKIA_C_FLAGS_REL "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") + + to_gn_list(SKIA_CXX_FLAGS_DBG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") + to_gn_list(SKIA_CXX_FLAGS_REL "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") + + set(OPTIONS_DBG "${OPTIONS_DBG} extra_cflags_c=${SKIA_C_FLAGS_DBG} \ + extra_cflags_cc=${SKIA_CXX_FLAGS_DBG}") + + set(OPTIONS_REL "${OPTIONS_REL} extra_cflags_c=${SKIA_C_FLAGS_REL} \ + extra_cflags_cc=${SKIA_CXX_FLAGS_REL}") + + set(WIN_VC "$ENV{VCINSTALLDIR}") + string(REPLACE "\\VC\\" "\\VC" WIN_VC "${WIN_VC}") + set(OPTIONS_DBG "${OPTIONS_DBG} win_vc=\"${WIN_VC}\"") + set(OPTIONS_REL "${OPTIONS_REL} win_vc=\"${WIN_VC}\"") + +endif() + +#z_vcpkg_install_gn_create_extract_public_config_targets( +# SOURCE_PATH "${SOURCE_PATH}" +# TARGETS "extract_skia//:skia") + +vcpkg_configure_gn( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG "${OPTIONS_DBG}" + OPTIONS_RELEASE "${OPTIONS_REL}" +) + +vcpkg_install_gn( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS ":skia" +) + +message(STATUS "Installing: ${CURRENT_PACKAGES_DIR}/include/${PORT}") +file(COPY "${SOURCE_PATH}/include" + DESTINATION "${CURRENT_PACKAGES_DIR}/include") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" + "${CURRENT_PACKAGES_DIR}/include/${PORT}") +file(GLOB_RECURSE SKIA_INCLUDE_FILES LIST_DIRECTORIES false + "${CURRENT_PACKAGES_DIR}/include/${PORT}/*") +foreach(file_ ${SKIA_INCLUDE_FILES}) + vcpkg_replace_string("${file_}" "#include \"include/" "#include \"${PORT}/") +endforeach() + +# get a list of library dependencies for TARGET +function(gn_desc_target_libs OUTPUT BUILD_DIR TARGET) + z_vcpkg_install_gn_get_desc("${OUTPUT}" + SOURCE_PATH "${SOURCE_PATH}" + BUILD_DIR "${BUILD_DIR}" + TARGET "${TARGET}" + WHAT_TO_DISPLAY libs) +endfunction() + +function(gn_desc_target_defines OUTPUT BUILD_DIR TARGET) + z_vcpkg_install_gn_get_desc(OUTPUT_ + SOURCE_PATH "${SOURCE_PATH}" + BUILD_DIR "${BUILD_DIR}" + TARGET "${TARGET}" + WHAT_TO_DISPLAY defines) + # exclude system defines such as _HAS_EXCEPTIONS=0 + list(FILTER OUTPUT_ EXCLUDE REGEX "^_") + set(${OUTPUT} ${OUTPUT_} PARENT_SCOPE) +endfunction() + +# skiaConfig.cmake.in input variables +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + gn_desc_target_libs(SKIA_DEP_DBG + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + //:skia) + gn_desc_target_defines(SKIA_DEFINITIONS_DBG + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + //extract_public_config:extract_skia) +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + gn_desc_target_libs(SKIA_DEP_REL + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + //:skia) + gn_desc_target_defines(SKIA_DEFINITIONS_REL + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + //extract_public_config:extract_skia) +endif() + +configure_file("${CMAKE_CURRENT_LIST_DIR}/skiaConfig.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/skia/skiaConfig.cmake" @ONLY) + +#vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) From 433fb1ea98b7d140263649ec452209e5c6c1400d Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 03:34:28 +0700 Subject: [PATCH 20/50] Looks like the CMake's rules for finding libraries have changed between cmake version 3.22.22011901-MSVC_2 and cmake version 3.22.22022201-MSVC_2 . :-D At least I don't have another explanation for why this change here is required to find libwebpmux.lib . --- ports/skia/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 70f353fe2f3238..7229c96258c97f 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -113,8 +113,8 @@ replace_skia_dep(icu "/include" "icuuc,icuucd" "icuuc" "U_USING_ICU_NAMESPACE=0" replace_skia_dep(libjpeg-turbo "/include" "jpeg,jpegd;turbojpeg,turbojpegd" "jpeg;turbojpeg" "") replace_skia_dep(libpng "/include" "libpng16,libpng16d" "libpng16" "") replace_skia_dep(libwebp "/include" - "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;libwebpmux,libwebpmuxd" - "webp;webpdemux;webpdecoder;libwebpmux" "") + "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;libwebpmux,libwebpmuxd,webpmux,webpmuxd" + "webp;webpdemux;webpdecoder;libwebpmux,webpmux" "") replace_skia_dep(zlib "/include" "z,zlib,zlibd" "z,zlib" "") set(OPTIONS "\ From c52915ba96c8bfb0a4f11e258574488119fc82f4 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 03:44:32 +0700 Subject: [PATCH 21/50] updated version --- versions/baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index d3ddb2af5bfe94..840e8f38b62718 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6521,7 +6521,7 @@ "port-version": 0 }, "skia": { - "baseline": "2022-04-10", + "baseline": "2022-04-15", "port-version": 9 }, "skyr-url": { From a677be0caf3f4e2fef7cd4757b7ffcd20829790a Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 20:31:08 +0700 Subject: [PATCH 22/50] Fix static crt issue --- ports/zeroc-ice/change_to_mt.ps1 | 53 +++++++++++++++++++++++++ ports/zeroc-ice/portfile.cmake | 11 +++-- ports/zeroc-ice/prepare_for_build.cmake | 49 +++++++++++++++-------- 3 files changed, 94 insertions(+), 19 deletions(-) create mode 100644 ports/zeroc-ice/change_to_mt.ps1 diff --git a/ports/zeroc-ice/change_to_mt.ps1 b/ports/zeroc-ice/change_to_mt.ps1 new file mode 100644 index 00000000000000..d538236b3be433 --- /dev/null +++ b/ports/zeroc-ice/change_to_mt.ps1 @@ -0,0 +1,53 @@ + +$projFilePath = $args[0] +$crtLinkage = $args[1] + +if($projFilePath) +{ + $xpath = "/rs:Project/rs:ItemGroup/rs:ProjectConfiguration" + $xmldoc = New-Object System.Xml.XmlDocument + $xmldoc.load($projFilePath) + $nsmgr = New-Object System.Xml.XmlNamespaceManager($xmldoc.NameTable); + $nsmgr.AddNamespace("rs", "http://schemas.microsoft.com/developer/msbuild/2003"); + $root = $xmldoc.DocumentElement + + foreach($conf in $root.ItemDefinitionGroup) + { + if($conf.Condition) + { + if(-Not ($conf.ClCompile.RuntimeLibrary)) + { + $rtl = $xmldoc.CreateElement("RuntimeLibrary", $conf.ClCompile.NamespaceURI) + $conf.ClCompile.AppendChild($rtl) + } + + if($conf.Condition.Contains("Debug")) + { + if($crtLinkage -eq "static") + { + $conf.ClCompile.RuntimeLibrary = "MultithreadedDebug" + } + else + { + $conf.ClCompile.RuntimeLibrary = "MultithreadedDebugDLL" + } + } + else + { + if($crtLinkage -eq "static") + { + $conf.ClCompile.RuntimeLibrary = "Multithreaded" + } + else + { + $conf.ClCompile.RuntimeLibrary = "MultithreadedDLL" + } + } + } + } + $xmldoc.save($projFilePath) +} +else +{ + Write-Error "Error: No path defined!" +} \ No newline at end of file diff --git a/ports/zeroc-ice/portfile.cmake b/ports/zeroc-ice/portfile.cmake index c1eaf7d02192e6..8102b045fac17a 100644 --- a/ports/zeroc-ice/portfile.cmake +++ b/ports/zeroc-ice/portfile.cmake @@ -257,6 +257,12 @@ else() # VCPKG_TARGET_IS_WINDOWS include("${CURRENT_PORT_DIR}/prepare_for_build.cmake") prepare_for_build("${SOURCE_PATH}") + vcpkg_list(SET MSBUILD_OPTIONS + "/p:UseVcpkg=yes" + "/p:IceBuildingSrc=yes" + ${ICE_OPTIONAL_COMPONENTS_MSBUILD} + ) + # Build Ice vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} @@ -265,9 +271,8 @@ else() # VCPKG_TARGET_IS_WINDOWS TARGET "C++11\\ice++11" USE_VCPKG_INTEGRATION OPTIONS - /p:UseVcpkg=yes - /p:IceBuildingSrc=yes - ${ICE_OPTIONAL_COMPONENTS_MSBUILD} + ${MSBUILD_OPTIONS} + ) if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/zeroc.icebuilder.msbuild.dll") diff --git a/ports/zeroc-ice/prepare_for_build.cmake b/ports/zeroc-ice/prepare_for_build.cmake index 4287fbdc820e9e..0f5e4261246029 100644 --- a/ports/zeroc-ice/prepare_for_build.cmake +++ b/ports/zeroc-ice/prepare_for_build.cmake @@ -1,11 +1,11 @@ -# This function removes hardcoded RuntimeLibrary directives from Ice's vcxproh files and downloads +# This function modifies hardcoded RuntimeLibrary directives in Ice's .vcxproj files and downloads # Ice Builder for MSBuild, which is required to generate C++ files based on the interface definition # files (.ice). function(prepare_for_build ICE_SOURCE_DIR) - message("-- Removing hardcoded 'RuntimeLibrary' directives from .vcxproj files") + message("-- Modifying hardcoded 'RuntimeLibrary' directives in .vcxproj files") set(CPP_SOURCE_DIR "${ICE_SOURCE_DIR}/cpp/src") file(GLOB_RECURSE PROJ_FILES "${CPP_SOURCE_DIR}/*.vcxproj") foreach(PROJ_FILE ${PROJ_FILES}) @@ -17,21 +17,38 @@ function(prepare_for_build ICE_SOURCE_DIR) PROJ_FILE_CONTENT "${PROJ_FILE_CONTENT}" ) - STRING(REGEX - REPLACE - "MultiThreadedDebug" - "" - PROJ_FILE_CONTENT - "${PROJ_FILE_CONTENT}" - ) - STRING(REGEX - REPLACE - "MultiThreaded" - "" - PROJ_FILE_CONTENT - "${PROJ_FILE_CONTENT}" - ) + + if((NOT ${PROJ_FILE} MATCHES ".*slice\.vcxproj") AND + (NOT ${PROJ_FILE} MATCHES ".*iceutil\.vcxproj") AND + (NOT ${PROJ_FILE} MATCHES ".*slice2cpp\.vcxproj")) + + if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") + STRING(REGEX + REPLACE + "DynamicLibrary" + "StaticLibrary" + PROJ_FILE_CONTENT + "${PROJ_FILE_CONTENT}" + ) + else() + STRING(REGEX + REPLACE + "StaticLibrary" + "DynamicLibrary" + PROJ_FILE_CONTENT + "${PROJ_FILE_CONTENT}" + ) + endif() + endif() + file(WRITE ${PROJ_FILE} "${PROJ_FILE_CONTENT}") + + vcpkg_execute_required_process( + COMMAND pwsh ${CURRENT_PORT_DIR}/change_to_mt.ps1 ${PROJ_FILE} ${VCPKG_CRT_LINKAGE} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME change_to_mt-${TARGET_TRIPLET}-rel + ) + endforeach() set(ICE_CPP_MSBUILD_PACKAGES_DIR "${ICE_SOURCE_DIR}/cpp/msbuild/packages") From d203d9352b8e6029914d5029639f178b64d360af Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 21:23:00 +0700 Subject: [PATCH 23/50] Fix Skia for arm64-windows --- ports/skia/portfile.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 7229c96258c97f..802a1b095f48c4 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -132,6 +132,10 @@ if("metal" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} skia_use_metal=true") endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPTIONS "${OPTIONS} target_cpu=\"arm64\"") +endif() + set(OPTIONS_REL "${OPTIONS} is_official_build=true") set(OPTIONS_DBG "${OPTIONS} is_debug=true") @@ -170,10 +174,6 @@ if(CMAKE_HOST_WIN32) endif() -#z_vcpkg_install_gn_create_extract_public_config_targets( -# SOURCE_PATH "${SOURCE_PATH}" -# TARGETS "extract_skia//:skia") - vcpkg_configure_gn( SOURCE_PATH "${SOURCE_PATH}" OPTIONS_DEBUG "${OPTIONS_DBG}" @@ -238,7 +238,6 @@ endif() configure_file("${CMAKE_CURRENT_LIST_DIR}/skiaConfig.cmake.in" "${CURRENT_PACKAGES_DIR}/share/skia/skiaConfig.cmake" @ONLY) -#vcpkg_copy_pdbs() file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) From 27c2e399fe149b82e1112703b68956bb984445d4 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sat, 16 Apr 2022 22:48:02 +0700 Subject: [PATCH 24/50] disable linux again --- ports/skia/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json index de1284a9096f8d..756ab79e83b255 100644 --- a/ports/skia/vcpkg.json +++ b/ports/skia/vcpkg.json @@ -8,7 +8,7 @@ "Skia is sponsored and managed by Google, but is available for use by anyone under the BSD Free Software License. While engineering of the core components is done by the Skia development team, we consider contributions from any source." ], "homepage": "https://skia.org", - "supports": "osx | windows | linux", + "supports": "osx | windows", "dependencies": [ "expat", { From 5723f6eb40815308b9f53c9b53503fa021491350 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 17 Apr 2022 02:02:24 +0700 Subject: [PATCH 25/50] disable linux --- ports/v8/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/v8/vcpkg.json b/ports/v8/vcpkg.json index 5f82dceb8c4acd..6e1d79c3b75d00 100644 --- a/ports/v8/vcpkg.json +++ b/ports/v8/vcpkg.json @@ -4,7 +4,7 @@ "port-version": 3, "description": "Google Chrome's JavaScript engine", "homepage": "https://v8.dev", - "supports": "!(arm | arm64 | uwp | osx)", + "supports": "!(arm | arm64 | uwp | osx | linux)", "dependencies": [ { "name": "glib", From c73947eed3615bbe817f33c18e790db6ea9c50dd Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 17 Apr 2022 02:03:35 +0700 Subject: [PATCH 26/50] update version --- versions/v-/v8.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/v-/v8.json b/versions/v-/v8.json index 9583dc8d42738f..e5b64d70dbe35d 100644 --- a/versions/v-/v8.json +++ b/versions/v-/v8.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3abf0953ae7dcf4bb4b4ede21adb27ad850b1e1c", + "git-tree": "061557d75a68bdfa65fcd029ad081abcc95f35aa", "version": "9.1.269.39", "port-version": 3 }, From e719f2dfa6132aac9ee19472d3f664cff2cc72b3 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 17 Apr 2022 03:22:41 +0700 Subject: [PATCH 27/50] set v8 to fail on linux --- scripts/ci.baseline.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 8cc1e7066809c1..74b047e7232ad1 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1157,7 +1157,6 @@ signalrclient:arm-uwp=fail skia:arm-uwp=fail skia:x64-linux=fail skia:x64-uwp=fail -skia:x86-windows=fail sleef:x86-windows=fail slikenet:arm-uwp=fail slikenet:x64-uwp=fail @@ -1273,10 +1272,6 @@ urdfdom:x64-windows-static=fail usd:x86-windows=fail uthenticode:arm-uwp=fail uthenticode:x64-uwp=fail -v8:arm64-windows=fail -v8:arm-uwp=fail -v8:x64-osx=fail -v8:x64-uwp=fail vectorclass:arm64-windows=fail vectorclass:arm-uwp=fail vulkan:arm64-windows=fail @@ -1375,6 +1370,11 @@ v8:x86-windows=fail v8:x64-windows=fail v8:x64-windows-static=fail v8:x64-windows-static-md=fail +v8:arm64-windows=fail +v8:arm-uwp=fail +v8:x64-osx=fail +v8:x64-uwp=fail +v8:x84-linux=fail zyre:x64-windows-static-md=fail usbmuxd:x64-windows-static-md=fail From 4d532074789efbdd702ff5d870d4ec22b292db2a Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 17 Apr 2022 17:14:47 +0700 Subject: [PATCH 28/50] skia doesn't support x86 builds with local MSVC installations --- ports/skia/portfile.cmake | 4 +--- ports/skia/vcpkg.json | 2 +- scripts/ci.baseline.txt | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 802a1b095f48c4..94bab9cafcec1e 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -132,9 +132,7 @@ if("metal" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} skia_use_metal=true") endif() -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(OPTIONS "${OPTIONS} target_cpu=\"arm64\"") -endif() +set(OPTIONS "${OPTIONS} target_cpu=\"${VCPKG_TARGET_ARCHITECTURE}\"") set(OPTIONS_REL "${OPTIONS} is_official_build=true") set(OPTIONS_DBG "${OPTIONS} is_debug=true") diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json index 756ab79e83b255..cb32df215b6131 100644 --- a/ports/skia/vcpkg.json +++ b/ports/skia/vcpkg.json @@ -8,7 +8,7 @@ "Skia is sponsored and managed by Google, but is available for use by anyone under the BSD Free Software License. While engineering of the core components is done by the Skia development team, we consider contributions from any source." ], "homepage": "https://skia.org", - "supports": "osx | windows", + "supports": "(osx | windows) & !(windows & x86)", "dependencies": [ "expat", { diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 74b047e7232ad1..0c8b0b5b44603f 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1157,6 +1157,7 @@ signalrclient:arm-uwp=fail skia:arm-uwp=fail skia:x64-linux=fail skia:x64-uwp=fail +skia:x86-windows=fail # skia doesn't support x86 builds with local MSVC installations sleef:x86-windows=fail slikenet:arm-uwp=fail slikenet:x64-uwp=fail From c7cdf1cfd38bc68fc2123cbcdf5f528b2c5c88b8 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 17 Apr 2022 19:29:48 +0700 Subject: [PATCH 29/50] review change requests --- ports/skia/portfile.cmake | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 94bab9cafcec1e..dd528b58604873 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -123,19 +123,19 @@ skia_enable_tools=false \ skia_enable_spirv_validation=false") if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(OPTIONS "${OPTIONS} is_component_build=true") + string(APPEND OPTIONS " is_component_build=true") else() - set(OPTIONS "${OPTIONS} is_component_build=false") + string(APPEND OPTIONS " is_component_build=false") endif() if("metal" IN_LIST FEATURES) - set(OPTIONS "${OPTIONS} skia_use_metal=true") + string(APPEND OPTIONS " skia_use_metal=true") endif() -set(OPTIONS "${OPTIONS} target_cpu=\"${VCPKG_TARGET_ARCHITECTURE}\"") +string(APPEND OPTIONS " target_cpu=\"${VCPKG_TARGET_ARCHITECTURE}\"") -set(OPTIONS_REL "${OPTIONS} is_official_build=true") set(OPTIONS_DBG "${OPTIONS} is_debug=true") +set(OPTIONS_REL "${OPTIONS} is_official_build=true") if(CMAKE_HOST_WIN32) # Load toolchains @@ -159,16 +159,16 @@ if(CMAKE_HOST_WIN32) to_gn_list(SKIA_CXX_FLAGS_DBG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") to_gn_list(SKIA_CXX_FLAGS_REL "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") - set(OPTIONS_DBG "${OPTIONS_DBG} extra_cflags_c=${SKIA_C_FLAGS_DBG} \ + string(APPEND OPTIONS_DBG " extra_cflags_c=${SKIA_C_FLAGS_DBG} \ extra_cflags_cc=${SKIA_CXX_FLAGS_DBG}") - - set(OPTIONS_REL "${OPTIONS_REL} extra_cflags_c=${SKIA_C_FLAGS_REL} \ + string(APPEND OPTIONS_REL " extra_cflags_c=${SKIA_C_FLAGS_REL} \ extra_cflags_cc=${SKIA_CXX_FLAGS_REL}") - + set(WIN_VC "$ENV{VCINSTALLDIR}") string(REPLACE "\\VC\\" "\\VC" WIN_VC "${WIN_VC}") - set(OPTIONS_DBG "${OPTIONS_DBG} win_vc=\"${WIN_VC}\"") - set(OPTIONS_REL "${OPTIONS_REL} win_vc=\"${WIN_VC}\"") + string(APPEND OPTIONS_DBG " win_vc=\"${WIN_VC}\"") + string(APPEND OPTIONS_REL " win_vc=\"${WIN_VC}\"") + endif() @@ -186,9 +186,9 @@ vcpkg_install_gn( message(STATUS "Installing: ${CURRENT_PACKAGES_DIR}/include/${PORT}") file(COPY "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}/include") -file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" +file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" "${CURRENT_PACKAGES_DIR}/include/${PORT}") -file(GLOB_RECURSE SKIA_INCLUDE_FILES LIST_DIRECTORIES false +file(GLOB_RECURSE SKIA_INCLUDE_FILES LIST_DIRECTORIES false "${CURRENT_PACKAGES_DIR}/include/${PORT}/*") foreach(file_ ${SKIA_INCLUDE_FILES}) vcpkg_replace_string("${file_}" "#include \"include/" "#include \"${PORT}/") From 4c732984b549e19d293cf97d04fe1a6354365e0f Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 17 Apr 2022 19:51:29 +0700 Subject: [PATCH 30/50] review changes --- ports/skia/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index dd528b58604873..5c529c0f1132df 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -61,7 +61,7 @@ function(cmake_to_gn_list OUTPUT_ INPUT_) set(${OUTPUT_} "[]" PARENT_SCOPE) else() string(REPLACE ";" "\",\"" TEMP "${INPUT_}") - set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) + set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) endif() endfunction() @@ -113,8 +113,8 @@ replace_skia_dep(icu "/include" "icuuc,icuucd" "icuuc" "U_USING_ICU_NAMESPACE=0" replace_skia_dep(libjpeg-turbo "/include" "jpeg,jpegd;turbojpeg,turbojpegd" "jpeg;turbojpeg" "") replace_skia_dep(libpng "/include" "libpng16,libpng16d" "libpng16" "") replace_skia_dep(libwebp "/include" - "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;libwebpmux,libwebpmuxd,webpmux,webpmuxd" - "webp;webpdemux;webpdecoder;libwebpmux,webpmux" "") + "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;webpmux,webpmuxd" + "webp;webpdemux;webpdecoder;webpmux" "") replace_skia_dep(zlib "/include" "z,zlib,zlibd" "z,zlib" "") set(OPTIONS "\ From 182aa46ea181a3db470acb608e3db074c37d07e3 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 17 Apr 2022 20:47:31 +0700 Subject: [PATCH 31/50] added vcpkg-tool-gn --- ports/crashpad/vcpkg.json | 4 ++ ports/skia/vcpkg.json | 4 ++ ports/vcpkg-tool-gn/portfile.cmake | 62 ++++++++++++++++ ports/vcpkg-tool-gn/vcpkg.json | 7 ++ .../cmake/vcpkg_find_acquire_program.cmake | 72 ++++++++++--------- 5 files changed, 116 insertions(+), 33 deletions(-) create mode 100644 ports/vcpkg-tool-gn/portfile.cmake create mode 100644 ports/vcpkg-tool-gn/vcpkg.json diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json index 5e05cf795fdde9..53e753d0ee6885 100644 --- a/ports/crashpad/vcpkg.json +++ b/ports/crashpad/vcpkg.json @@ -9,6 +9,10 @@ "homepage": "https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md", "supports": "osx | windows", "dependencies": [ + { + "name": "vcpkg-tool-gn", + "host": true + }, "zlib" ] } diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json index cb32df215b6131..9f86bc018e1e7f 100644 --- a/ports/skia/vcpkg.json +++ b/ports/skia/vcpkg.json @@ -29,6 +29,10 @@ "name": "vcpkg-cmake-config", "host": true }, + { + "name": "vcpkg-tool-gn", + "host": true + }, "zlib" ], "features": { diff --git a/ports/vcpkg-tool-gn/portfile.cmake b/ports/vcpkg-tool-gn/portfile.cmake new file mode 100644 index 00000000000000..a8c42daa4950f9 --- /dev/null +++ b/ports/vcpkg-tool-gn/portfile.cmake @@ -0,0 +1,62 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +set(program GN) +set(search_names gn gn.exe) +set(paths_to_search "${CURRENT_PACKAGES_DIR}/tools/gn") + +set(cipd_download_gn "https://chrome-infra-packages.appspot.com/dl/gn/gn") +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE HOST_ARCH) + if(HOST_ARCH STREQUAL "aarch64") + set(program_version "GkfFAfAUyE-qfeWkdUMaeM1Ov64Fk3SjSj9pwKqZX7gC") + set(gn_platform "linux-arm64") + set(download_sha512 "E88201309A12C00CE60137261B8E1A759780C81D1925B819583B16D2095A16A7D32EFB2AF36C1E1D6EAA142BF6A6A811847D3140E4E94967EE28F4ADF6373E4B") + else() + set(program_version "Fv1ENXodhXmEXy_xpZr2gQkVJh57w_IsbsrEJOU0_EoC") + set(gn_platform "linux-amd64") + set(download_sha512 "A7A5CD5633C5547EC1B1A95958486DDAAC91F1A65881EDC0AD8F74DF44E82F08BA74358E9A72DFCDDE6F534A6B9C9A430D3E16ACE2E4346C4D2E9113F7654B3F") + endif() +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(supported_on_unix ON) + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE HOST_ARCH) + if(HOST_ARCH STREQUAL "arm64") + set(program_version "qMPtGq7xZlpb-lHjP-SK27ftT4X71WIvguuyx6X14DEC") + set(gn_platform "mac-arm64") + set(download_sha512 "D096FB958D017807427911089AB5A7655AED117F6851C0491AC8063CEDB544423122EF64DF4264ECA86C20A2BDE9E64D7B72DA7ED8C95C2BA79A68B8247D36B8") + else() + set(program_version "0x2juPLNfP9603GIyZrUfflxK6LiMcppLAoxEpYuIYoC") + set(gn_platform "mac-amd64") + set(download_sha512 "2696ECE7B2C8008CABDDF10024017E2ECF875F8679424E77052252BDDC83A2096DF3C61D89CD25120EF27E0458C8914BEEED9D418593BDBC4F6ED33A8D4C3DC5") + endif() +else() + if($ENV{PROCESSOR_ARCHITECTURE} STREQUAL "ARM64") + set(program_version "q5ExVHmXyD34Q_Tzb-aRxsPipO-e37-csVRhVM7IJh0C") + set(gn_platform "windows-amd64") + set(download_sha512 "FA764AA44EB6F48ED50E855B4DC1DD1ABE35E45FD4AAC7F059A35293A14894C1B591215E34FB0CE9362E646EA9463BA3B489EFB7EBBAA2693D14238B50E4E686") + else() # AMD64 + set(program_version "q5ExVHmXyD34Q_Tzb-aRxsPipO-e37-csVRhVM7IJh0C") + set(gn_platform "windows-amd64") + set(download_sha512 "FA764AA44EB6F48ED50E855B4DC1DD1ABE35E45FD4AAC7F059A35293A14894C1B591215E34FB0CE9362E646EA9463BA3B489EFB7EBBAA2693D14238B50E4E686") + endif() +endif() + +set(download_urls "${cipd_download_gn}/${gn_platform}/+/${program_version}") +set(download_filename "gn-${gn_platform}.zip") +vcpkg_download_distfile(archive_path + URLS ${download_urls} + SHA512 "${download_sha512}" + FILENAME "${download_filename}" +) +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/gn") +vcpkg_execute_in_download_mode( + COMMAND "${CMAKE_COMMAND}" -E tar xzf "${archive_path}" + WORKING_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/gn" +) + +z_vcpkg_find_acquire_program_find_internal("${program}" + PATHS ${paths_to_search} + NAMES ${search_names} +) + +message(STATUS "Using gn: ${GN}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/gn/version.txt" "${program_version}") # For vcpkg_find_acquire_program diff --git a/ports/vcpkg-tool-gn/vcpkg.json b/ports/vcpkg-tool-gn/vcpkg.json new file mode 100644 index 00000000000000..f37bd09e0abd09 --- /dev/null +++ b/ports/vcpkg-tool-gn/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "vcpkg-tool-gn", + "version-date": "2022-04-16", + "description": "GN build system", + "homepage": "https://gn.googlesource.com/gn/", + "supports": "native" +} diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 903c20680c6535..b5be6bbcbad1f8 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -216,40 +216,46 @@ function(vcpkg_find_acquire_program program) elseif(program STREQUAL "GN") set(program_name gn) set(rename_binary_to "gn") - set(cipd_download_gn "https://chrome-infra-packages.appspot.com/dl/gn/gn") - if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") - set(supported_on_unix ON) - EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE HOST_ARCH) - if(HOST_ARCH STREQUAL "aarch64") - set(program_version "GkfFAfAUyE-qfeWkdUMaeM1Ov64Fk3SjSj9pwKqZX7gC") - set(gn_platform "linux-arm64") - set(download_sha512 "E88201309A12C00CE60137261B8E1A759780C81D1925B819583B16D2095A16A7D32EFB2AF36C1E1D6EAA142BF6A6A811847D3140E4E94967EE28F4ADF6373E4B") - else() - set(program_version "Fv1ENXodhXmEXy_xpZr2gQkVJh57w_IsbsrEJOU0_EoC") - set(gn_platform "linux-amd64") - set(download_sha512 "A7A5CD5633C5547EC1B1A95958486DDAAC91F1A65881EDC0AD8F74DF44E82F08BA74358E9A72DFCDDE6F534A6B9C9A430D3E16ACE2E4346C4D2E9113F7654B3F") - endif() - elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") - set(supported_on_unix ON) - EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE HOST_ARCH) - if(HOST_ARCH STREQUAL "arm64") - set(program_version "qMPtGq7xZlpb-lHjP-SK27ftT4X71WIvguuyx6X14DEC") - set(gn_platform "mac-arm64") - set(download_sha512 "D096FB958D017807427911089AB5A7655AED117F6851C0491AC8063CEDB544423122EF64DF4264ECA86C20A2BDE9E64D7B72DA7ED8C95C2BA79A68B8247D36B8") + if(EXISTS "${CURRENT_HOST_INSTALLED_DIR}/share/gn/version.txt") + file(READ "${CURRENT_HOST_INSTALLED_DIR}/share/gn/version.txt" program_version) + set(paths_to_search "${CURRENT_HOST_INSTALLED_DIR}/tools/gn") + else() # Old behavior + message("Consider adding vcpkg-tool-gn as a host dependency of this port or create an issue at https://github.com/microsoft/vcpkg/issues") + set(cipd_download_gn "https://chrome-infra-packages.appspot.com/dl/gn/gn") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(supported_on_unix ON) + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE HOST_ARCH) + if(HOST_ARCH STREQUAL "aarch64") + set(program_version "GkfFAfAUyE-qfeWkdUMaeM1Ov64Fk3SjSj9pwKqZX7gC") + set(gn_platform "linux-arm64") + set(download_sha512 "E88201309A12C00CE60137261B8E1A759780C81D1925B819583B16D2095A16A7D32EFB2AF36C1E1D6EAA142BF6A6A811847D3140E4E94967EE28F4ADF6373E4B") + else() + set(program_version "Fv1ENXodhXmEXy_xpZr2gQkVJh57w_IsbsrEJOU0_EoC") + set(gn_platform "linux-amd64") + set(download_sha512 "A7A5CD5633C5547EC1B1A95958486DDAAC91F1A65881EDC0AD8F74DF44E82F08BA74358E9A72DFCDDE6F534A6B9C9A430D3E16ACE2E4346C4D2E9113F7654B3F") + endif() + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(supported_on_unix ON) + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE HOST_ARCH) + if(HOST_ARCH STREQUAL "arm64") + set(program_version "qMPtGq7xZlpb-lHjP-SK27ftT4X71WIvguuyx6X14DEC") + set(gn_platform "mac-arm64") + set(download_sha512 "D096FB958D017807427911089AB5A7655AED117F6851C0491AC8063CEDB544423122EF64DF4264ECA86C20A2BDE9E64D7B72DA7ED8C95C2BA79A68B8247D36B8") + else() + set(program_version "0x2juPLNfP9603GIyZrUfflxK6LiMcppLAoxEpYuIYoC") + set(gn_platform "mac-amd64") + set(download_sha512 "2696ECE7B2C8008CABDDF10024017E2ECF875F8679424E77052252BDDC83A2096DF3C61D89CD25120EF27E0458C8914BEEED9D418593BDBC4F6ED33A8D4C3DC5") + endif() else() - set(program_version "0x2juPLNfP9603GIyZrUfflxK6LiMcppLAoxEpYuIYoC") - set(gn_platform "mac-amd64") - set(download_sha512 "2696ECE7B2C8008CABDDF10024017E2ECF875F8679424E77052252BDDC83A2096DF3C61D89CD25120EF27E0458C8914BEEED9D418593BDBC4F6ED33A8D4C3DC5") - endif() - else() - if($ENV{PROCESSOR_ARCHITECTURE} STREQUAL "ARM64") - set(program_version "q5ExVHmXyD34Q_Tzb-aRxsPipO-e37-csVRhVM7IJh0C") - set(gn_platform "windows-amd64") - set(download_sha512 "FA764AA44EB6F48ED50E855B4DC1DD1ABE35E45FD4AAC7F059A35293A14894C1B591215E34FB0CE9362E646EA9463BA3B489EFB7EBBAA2693D14238B50E4E686") - else() # AMD64 - set(program_version "q5ExVHmXyD34Q_Tzb-aRxsPipO-e37-csVRhVM7IJh0C") - set(gn_platform "windows-amd64") - set(download_sha512 "FA764AA44EB6F48ED50E855B4DC1DD1ABE35E45FD4AAC7F059A35293A14894C1B591215E34FB0CE9362E646EA9463BA3B489EFB7EBBAA2693D14238B50E4E686") + if($ENV{PROCESSOR_ARCHITECTURE} STREQUAL "ARM64") + set(program_version "q5ExVHmXyD34Q_Tzb-aRxsPipO-e37-csVRhVM7IJh0C") + set(gn_platform "windows-amd64") + set(download_sha512 "FA764AA44EB6F48ED50E855B4DC1DD1ABE35E45FD4AAC7F059A35293A14894C1B591215E34FB0CE9362E646EA9463BA3B489EFB7EBBAA2693D14238B50E4E686") + else() # AMD64 + set(program_version "q5ExVHmXyD34Q_Tzb-aRxsPipO-e37-csVRhVM7IJh0C") + set(gn_platform "windows-amd64") + set(download_sha512 "FA764AA44EB6F48ED50E855B4DC1DD1ABE35E45FD4AAC7F059A35293A14894C1B591215E34FB0CE9362E646EA9463BA3B489EFB7EBBAA2693D14238B50E4E686") + endif() endif() endif() set(tool_subdirectory "${program_version}") From 780f47b8be9be5c818ff0b6d291e768a4f40a99f Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 17 Apr 2022 20:53:33 +0700 Subject: [PATCH 32/50] Updated license fields and reverted changes to ci.baseline.txt --- ports/chromium-base/vcpkg.json | 11 +++++++++-- ports/crashpad/vcpkg.json | 1 + ports/skia/vcpkg.json | 1 + ports/v8/vcpkg.json | 1 + ports/vcpkg-tool-gn/vcpkg.json | 1 + scripts/ci.baseline.txt | 9 ++++----- versions/baseline.json | 4 ++++ versions/c-/chromium-base.json | 4 ++-- versions/c-/crashpad.json | 2 +- versions/v-/v8.json | 2 +- versions/v-/vcpkg-tool-gn.json | 9 +++++++++ 11 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 versions/v-/vcpkg-tool-gn.json diff --git a/ports/chromium-base/vcpkg.json b/ports/chromium-base/vcpkg.json index a96735ba3a4a81..d036177733fa0c 100644 --- a/ports/chromium-base/vcpkg.json +++ b/ports/chromium-base/vcpkg.json @@ -1,8 +1,15 @@ { "name": "chromium-base", - "version-string": "86.0.4199.1", + "version": "86.0.4199.1", "port-version": 3, "description": "Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.", "homepage": "https://chromium.googlesource.com/chromium/src", - "supports": "x64 & (osx | windows | linux) & !uwp" + "license": "BSD-3-Clause", + "supports": "x64 & (osx | windows | linux) & !uwp", + "dependencies": [ + { + "name": "vcpkg-tool-gn", + "host": true + } + ] } diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json index 53e753d0ee6885..de30fcc6ef88f9 100644 --- a/ports/crashpad/vcpkg.json +++ b/ports/crashpad/vcpkg.json @@ -7,6 +7,7 @@ "Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss." ], "homepage": "https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md", + "license": "Apache-2.0", "supports": "osx | windows", "dependencies": [ { diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json index 9f86bc018e1e7f..cf6b3d66b6865f 100644 --- a/ports/skia/vcpkg.json +++ b/ports/skia/vcpkg.json @@ -8,6 +8,7 @@ "Skia is sponsored and managed by Google, but is available for use by anyone under the BSD Free Software License. While engineering of the core components is done by the Skia development team, we consider contributions from any source." ], "homepage": "https://skia.org", + "license": "BSD-3-Clause", "supports": "(osx | windows) & !(windows & x86)", "dependencies": [ "expat", diff --git a/ports/v8/vcpkg.json b/ports/v8/vcpkg.json index 6e1d79c3b75d00..07de8ce62880a9 100644 --- a/ports/v8/vcpkg.json +++ b/ports/v8/vcpkg.json @@ -4,6 +4,7 @@ "port-version": 3, "description": "Google Chrome's JavaScript engine", "homepage": "https://v8.dev", + "license": "BSD-3-Clause", "supports": "!(arm | arm64 | uwp | osx | linux)", "dependencies": [ { diff --git a/ports/vcpkg-tool-gn/vcpkg.json b/ports/vcpkg-tool-gn/vcpkg.json index f37bd09e0abd09..2239a3aa5303f0 100644 --- a/ports/vcpkg-tool-gn/vcpkg.json +++ b/ports/vcpkg-tool-gn/vcpkg.json @@ -3,5 +3,6 @@ "version-date": "2022-04-16", "description": "GN build system", "homepage": "https://gn.googlesource.com/gn/", + "license": null, "supports": "native" } diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 0c8b0b5b44603f..7926f5fa2d9498 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1273,6 +1273,10 @@ urdfdom:x64-windows-static=fail usd:x86-windows=fail uthenticode:arm-uwp=fail uthenticode:x64-uwp=fail +v8:arm64-windows=fail +v8:arm-uwp=fail +v8:x64-osx=fail +v8:x64-uwp=fail vectorclass:arm64-windows=fail vectorclass:arm-uwp=fail vulkan:arm64-windows=fail @@ -1371,11 +1375,6 @@ v8:x86-windows=fail v8:x64-windows=fail v8:x64-windows-static=fail v8:x64-windows-static-md=fail -v8:arm64-windows=fail -v8:arm-uwp=fail -v8:x64-osx=fail -v8:x64-uwp=fail -v8:x84-linux=fail zyre:x64-windows-static-md=fail usbmuxd:x64-windows-static-md=fail diff --git a/versions/baseline.json b/versions/baseline.json index 840e8f38b62718..2da26b85e29635 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7328,6 +7328,10 @@ "baseline": "2022-02-14", "port-version": 0 }, + "vcpkg-tool-gn": { + "baseline": "2022-04-16", + "port-version": 0 + }, "vcpkg-tool-gyp-nss": { "baseline": "2022-03-04", "port-version": 0 diff --git a/versions/c-/chromium-base.json b/versions/c-/chromium-base.json index 74ed1896208618..92979f3aee27de 100644 --- a/versions/c-/chromium-base.json +++ b/versions/c-/chromium-base.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "36e6dbafdea0e90a8717907171efa375d2580d8b", - "version-string": "86.0.4199.1", + "git-tree": "e0883d228c02f1b6a2bcb9372f0ba0f7ded330a7", + "version": "86.0.4199.1", "port-version": 3 }, { diff --git a/versions/c-/crashpad.json b/versions/c-/crashpad.json index 56bc7d29f36d5a..48bcbce62b8473 100644 --- a/versions/c-/crashpad.json +++ b/versions/c-/crashpad.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3763e87e3bf4e883bbde5c81f508c998de3e93f8", + "git-tree": "baf22648c3011b81827b03f1b5a5c8d5ba5da1e6", "version-date": "2022-04-16", "port-version": 2 }, diff --git a/versions/v-/v8.json b/versions/v-/v8.json index e5b64d70dbe35d..8f5ef52ef12965 100644 --- a/versions/v-/v8.json +++ b/versions/v-/v8.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "061557d75a68bdfa65fcd029ad081abcc95f35aa", + "git-tree": "5dd64fe575529fc0d7700772326c76b23c12c135", "version": "9.1.269.39", "port-version": 3 }, diff --git a/versions/v-/vcpkg-tool-gn.json b/versions/v-/vcpkg-tool-gn.json new file mode 100644 index 00000000000000..cd79c22ef4dfe7 --- /dev/null +++ b/versions/v-/vcpkg-tool-gn.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "811d8c3a4d4489a291c69cde7788c620f950eb9e", + "version-date": "2022-04-16", + "port-version": 0 + } + ] +} From 512c32fbfdf6b1659c4d600933e89e3ec7fc8ba8 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Sun, 17 Apr 2022 23:23:35 +0700 Subject: [PATCH 33/50] enable linux again :-) --- ports/skia/fontconfig.gn | 10 ++++++++++ ports/skia/portfile.cmake | 3 +++ ports/skia/vcpkg.json | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ports/skia/fontconfig.gn diff --git a/ports/skia/fontconfig.gn b/ports/skia/fontconfig.gn new file mode 100644 index 00000000000000..cded75c8f2d994 --- /dev/null +++ b/ports/skia/fontconfig.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + + system("fontconfig") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } + } \ No newline at end of file diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 5c529c0f1132df..18488f29e93438 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -116,6 +116,9 @@ replace_skia_dep(libwebp "/include" "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;webpmux,webpmuxd" "webp;webpdemux;webpdecoder;webpmux" "") replace_skia_dep(zlib "/include" "z,zlib,zlibd" "z,zlib" "") +if(CMAKE_HOST_UNIX) + replace_skia_dep(fontconfig "/include" "fontconfig" "fontconfig" "") + endif() set(OPTIONS "\ skia_use_lua=false \ diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json index cf6b3d66b6865f..01b63b137712e8 100644 --- a/ports/skia/vcpkg.json +++ b/ports/skia/vcpkg.json @@ -9,9 +9,10 @@ ], "homepage": "https://skia.org", "license": "BSD-3-Clause", - "supports": "(osx | windows) & !(windows & x86)", + "supports": "(osx | windows | linux) & !(windows & x86)", "dependencies": [ "expat", + "fontconfig", { "name": "freetype", "default-features": false From 3f4e56fdc8d09f79671f80ef4e590022f63937e2 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Mon, 18 Apr 2022 00:05:36 +0700 Subject: [PATCH 34/50] Enabled additional backends --- ports/skia/dawn_use_vcpkg_spirv.patch | 13 ++ ports/skia/portfile.cmake | 174 +++++++++++++++++++++++--- ports/skia/use_vcpkg_fontconfig.patch | 42 +++++++ ports/skia/vcpkg.json | 22 +++- 4 files changed, 227 insertions(+), 24 deletions(-) create mode 100644 ports/skia/dawn_use_vcpkg_spirv.patch create mode 100644 ports/skia/use_vcpkg_fontconfig.patch diff --git a/ports/skia/dawn_use_vcpkg_spirv.patch b/ports/skia/dawn_use_vcpkg_spirv.patch new file mode 100644 index 00000000000000..08cfa51ab0119f --- /dev/null +++ b/ports/skia/dawn_use_vcpkg_spirv.patch @@ -0,0 +1,13 @@ +diff --git a/src/dawn_native/BUILD.gn b/src/dawn_native/BUILD.gn +index f73bfe24..e37792a0 100644 +--- a/src/dawn_native/BUILD.gn ++++ b/src/dawn_native/BUILD.gn +@@ -145,7 +145,7 @@ source_set("dawn_native_sources") { + ":dawn_native_headers", + ":dawn_native_utils_gen", + "${dawn_root}/src/common", +- "${dawn_root}/third_party/gn/spirv_cross:spirv_cross", ++ "//third_party/spirv-cross:spirv_cross", + "${dawn_spirv_tools_dir}:spvtools_opt", + "${dawn_spirv_tools_dir}:spvtools_val", + "${dawn_tint_dir}/src:libtint", diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 18488f29e93438..cef4eff832ebe9 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -2,26 +2,44 @@ vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL https://github.com/google/skia REF 3aa7f602018816ab3f009f1b8d359ccde752e1de + PATCHES + "use_vcpkg_fontconfig.patch" ) +# Replace hardcoded python paths vcpkg_find_acquire_program(PYTHON3) file(READ "${SOURCE_PATH}/.gn" GN_FILE_CONTENT) string(REPLACE "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"" GN_FILE_CONTENT ${GN_FILE_CONTENT}) file(WRITE "${SOURCE_PATH}/.gn" ${GN_FILE_CONTENT}) -function(checkout_in_path PATH URL MIRROR_URL REF) +file(READ "${SOURCE_PATH}/gn/toolchain/BUILD.gn" GN_FILE_CONTENT) +string(REPLACE "command = \"$shell python" "command = \"$shell '${PYTHON3}'" GN_FILE_CONTENT ${GN_FILE_CONTENT}) +file(WRITE "${SOURCE_PATH}/gn/toolchain/BUILD.gn" ${GN_FILE_CONTENT}) + +function(checkout_in_path PATH URL REF) if(EXISTS "${PATH}") return() endif() - if(SKIA_USE_MIRROR) - set(URL "${MIRROR_URL}") + vcpkg_from_git( + OUT_SOURCE_PATH DEP_SOURCE_PATH + URL "${URL}" + REF "${REF}" + ) + file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") + file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") +endfunction() + +function(checkout_in_path_with_patch PATH URL REF PATCH) + if(EXISTS "${PATH}") + return() endif() - + vcpkg_from_git( OUT_SOURCE_PATH DEP_SOURCE_PATH URL "${URL}" REF "${REF}" + PATCHES "${PATCH}" ) file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") @@ -34,23 +52,19 @@ file(MAKE_DIRECTORY "${EXTERNALS}") # to update, visit the DEPS file in Skia's root directory # define SKIA_USE_MIRROR in a triplet to use the mirrors checkout_in_path("${EXTERNALS}/sfntly" - "https://github.com/googlefonts/sfntly" "https://github.com/googlefonts/sfntly" "b55ff303ea2f9e26702b514cf6a3196a2e3e2974" ) checkout_in_path("${EXTERNALS}/dng_sdk" "https://android.googlesource.com/platform/external/dng_sdk" - "https://gitee.com/mirrors_android_source/dng_sdk" "c8d0c9b1d16bfda56f15165d39e0ffa360a11123" ) checkout_in_path("${EXTERNALS}/libgifcodec" "https://skia.googlesource.com/libgifcodec" - "https://gitee.com/mirrors_skia_googlesource/libgifcodec" "fd59fa92a0c86788dcdd84d091e1ce81eda06a77" ) checkout_in_path("${EXTERNALS}/piex" "https://android.googlesource.com/platform/external/piex" - "https://gitee.com/mirrors_android_source/piex" "bb217acdca1cc0c16b704669dd6f91a1b509c406" ) @@ -112,8 +126,8 @@ replace_skia_dep(harfbuzz "/include/harfbuzz" "harfbuzz;harfbuzz-subset" "harfbu replace_skia_dep(icu "/include" "icuuc,icuucd" "icuuc" "U_USING_ICU_NAMESPACE=0") replace_skia_dep(libjpeg-turbo "/include" "jpeg,jpegd;turbojpeg,turbojpegd" "jpeg;turbojpeg" "") replace_skia_dep(libpng "/include" "libpng16,libpng16d" "libpng16" "") -replace_skia_dep(libwebp "/include" - "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;webpmux,webpmuxd" +replace_skia_dep(libwebp "/include" + "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;webpmux,webpmuxd" "webp;webpdemux;webpdecoder;webpmux" "") replace_skia_dep(zlib "/include" "z,zlib,zlibd" "z,zlib" "") if(CMAKE_HOST_UNIX) @@ -123,19 +137,132 @@ if(CMAKE_HOST_UNIX) set(OPTIONS "\ skia_use_lua=false \ skia_enable_tools=false \ -skia_enable_spirv_validation=false") +skia_enable_spirv_validation=false \ +target_cpu=\"${VCPKG_TARGET_ARCHITECTURE}\"") + +# used for passing feature-specific definitions to the config file +set(SKIA_PUBLIC_DEFINITIONS + SK_SUPPORT_PDF + SK_HAS_JPEG_LIBRARY + SK_USE_LIBGIFCODEC + SK_HAS_PNG_LIBRARY + SK_HAS_WEBP_LIBRARY + SK_XML) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) string(APPEND OPTIONS " is_component_build=true") + if(CMAKE_HOST_WIN32) + set(SKIA_PUBLIC_DEFINITIONS SKIA_DLL) + endif() else() string(APPEND OPTIONS " is_component_build=false") endif() -if("metal" IN_LIST FEATURES) - string(APPEND OPTIONS " skia_use_metal=true") +if(CMAKE_HOST_APPLE) + if("metal" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} skia_use_metal=true") + list(APPEND SKIA_PUBLIC_DEFINITIONS SK_METAL) + endif() +endif() + +if("vulkan" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} skia_use_vulkan=true") + list(APPEND SKIA_PUBLIC_DEFINITIONS SK_VULKAN) + endif() + +if(CMAKE_HOST_WIN32) + if("direct3d" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} skia_use_direct3d=true") + list(APPEND SKIA_PUBLIC_DEFINITIONS SK_DIRECT3D) + + checkout_in_path("${EXTERNALS}/spirv-cross" + "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross" + "6a67891418a3f08be63f92726e049dc788e46f5b" + ) + + checkout_in_path("${EXTERNALS}/spirv-headers" + "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git" + "82becc8a8a92e509d3d8d635889da0a3c17d0606" + ) + + checkout_in_path("${EXTERNALS}/spirv-tools" + "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git" + "cb96abbf7affd986016f17dd09f9f971138a922b" + ) + + checkout_in_path("${EXTERNALS}/d3d12allocator" + "https://skia.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git" + "169895d529dfce00390a20e69c2f516066fe7a3b" + ) + endif() +endif() + +if("dawn" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} skia_use_dawn=true") + list(APPEND SKIA_PUBLIC_DEFINITIONS SK_DAWN) + + checkout_in_path("${EXTERNALS}/spirv-cross" + "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross" + "6a67891418a3f08be63f92726e049dc788e46f5b" + ) + + checkout_in_path("${EXTERNALS}/spirv-headers" + "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git" + "82becc8a8a92e509d3d8d635889da0a3c17d0606" + ) + + checkout_in_path("${EXTERNALS}/spirv-tools" + "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git" + "cb96abbf7affd986016f17dd09f9f971138a922b" + ) + + checkout_in_path("${EXTERNALS}/tint" + "https://dawn.googlesource.com/tint" + "b612c505939bf86c80a55c193b93c41ed0f252a1" + ) + + checkout_in_path("${EXTERNALS}/jinja2" + "https://chromium.googlesource.com/chromium/src/third_party/jinja2" + "ee69aa00ee8536f61db6a451f3858745cf587de6" + ) + + checkout_in_path("${EXTERNALS}/markupsafe" + "https://chromium.googlesource.com/chromium/src/third_party/markupsafe" + "0944e71f4b2cb9a871bcbe353f95e889b64a611a" + ) + +## Remove + checkout_in_path("${EXTERNALS}/vulkan-headers" + "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers" + "76f00ef6cbb1886eb1162d1fa39bee8b51e22ee8" + ) + + checkout_in_path("${EXTERNALS}/vulkan-tools" + "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools" + "ef20059aea7ec24d0842edca2f75255eaa33a7b0" + ) + + checkout_in_path("${EXTERNALS}/abseil-cpp" + "https://skia.googlesource.com/external/github.com/abseil/abseil-cpp.git" + "c5a424a2a21005660b182516eb7a079cd8021699" + ) + +## REMOVE ^ + checkout_in_path("${EXTERNALS}/dawn" + "https://dawn.googlesource.com/dawn.git" + "e6d4598d36157639606a780164c425c6bffb93f6" + ) + + vcpkg_find_acquire_program(GIT) + file(READ "${SOURCE_PATH}/third_party/externals/dawn/generator/dawn_version_generator.py" DVG_CONTENT) + string(REPLACE "return 'git.bat' if sys.platform == 'win32' else 'git'" "return '${GIT}'" DVG_CONTENT ${DVG_CONTENT}) + file(WRITE "${SOURCE_PATH}/third_party/externals/dawn/generator/dawn_version_generator.py" ${DVG_CONTENT}) endif() -string(APPEND OPTIONS " target_cpu=\"${VCPKG_TARGET_ARCHITECTURE}\"") +if("gl" IN_LIST FEATURES) + string(APPEND OPTIONS " skia_use_gl=true") + list(APPEND SKIA_PUBLIC_DEFINITIONS SK_GL) +endif() set(OPTIONS_DBG "${OPTIONS} is_debug=true") set(OPTIONS_REL "${OPTIONS} is_official_build=true") @@ -166,13 +293,11 @@ if(CMAKE_HOST_WIN32) extra_cflags_cc=${SKIA_CXX_FLAGS_DBG}") string(APPEND OPTIONS_REL " extra_cflags_c=${SKIA_C_FLAGS_REL} \ extra_cflags_cc=${SKIA_CXX_FLAGS_REL}") - + set(WIN_VC "$ENV{VCINSTALLDIR}") string(REPLACE "\\VC\\" "\\VC" WIN_VC "${WIN_VC}") string(APPEND OPTIONS_DBG " win_vc=\"${WIN_VC}\"") string(APPEND OPTIONS_REL " win_vc=\"${WIN_VC}\"") - - endif() vcpkg_configure_gn( @@ -181,13 +306,24 @@ vcpkg_configure_gn( OPTIONS_RELEASE "${OPTIONS_REL}" ) +set(DAWN_LINKAGE "") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(DAWN_LINKAGE "shared") +else() + set(DAWN_LINKAGE "static") +endif() + vcpkg_install_gn( SOURCE_PATH "${SOURCE_PATH}" - TARGETS ":skia" + TARGETS + ":skia" + "third_party/externals/dawn/src/dawn:proc_${DAWN_LINKAGE}" + "third_party/externals/dawn/src/dawn/native:${DAWN_LINKAGE}" + "third_party/externals/dawn/src/dawn/platform:${DAWN_LINKAGE}" ) message(STATUS "Installing: ${CURRENT_PACKAGES_DIR}/include/${PORT}") -file(COPY "${SOURCE_PATH}/include" +file(COPY "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}/include") file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" "${CURRENT_PACKAGES_DIR}/include/${PORT}") diff --git a/ports/skia/use_vcpkg_fontconfig.patch b/ports/skia/use_vcpkg_fontconfig.patch new file mode 100644 index 00000000000000..3533e8cf3d5835 --- /dev/null +++ b/ports/skia/use_vcpkg_fontconfig.patch @@ -0,0 +1,42 @@ +diff --git a/BUILD.gn b/BUILD.gn +index aeb46b4664..2ddbcd0ebe 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -452,7 +452,7 @@ optional("fontmgr_fontconfig") { + enabled = skia_enable_fontmgr_fontconfig + + # The public header includes fontconfig.h and uses FcConfig* +- public_deps = [ "//third_party:fontconfig" ] ++ public_deps = [ "//third_party/fontconfig" ] + public = [ "include/ports/SkFontMgr_fontconfig.h" ] + deps = [ ":typeface_freetype" ] + sources = [ "src/ports/SkFontMgr_fontconfig.cpp" ] +@@ -469,7 +469,7 @@ optional("fontmgr_FontConfigInterface") { + + deps = [ + ":typeface_freetype", +- "//third_party:fontconfig", ++ "//third_party/fontconfig", + ] + public = [ + "include/ports/SkFontConfigInterface.h", +diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn +index 63fa748d16..6760e0f41b 100644 +--- a/third_party/BUILD.gn ++++ b/third_party/BUILD.gn +@@ -6,9 +6,9 @@ + declare_args() { + } + +-config("system_fontconfig") { +- libs = [ "fontconfig" ] +-} +-group("fontconfig") { +- public_configs = [ ":system_fontconfig" ] +-} ++#config("system_fontconfig") { ++# libs = [ "fontconfig" ] ++#} ++#group("fontconfig") { ++# public_configs = [ ":system_fontconfig" ] ++#} diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json index 01b63b137712e8..b9b405f4674f7d 100644 --- a/ports/skia/vcpkg.json +++ b/ports/skia/vcpkg.json @@ -10,6 +10,9 @@ "homepage": "https://skia.org", "license": "BSD-3-Clause", "supports": "(osx | windows | linux) & !(windows & x86)", + "default-features": [ + "gl" + ], "dependencies": [ "expat", "fontconfig", @@ -18,10 +21,7 @@ "default-features": false }, { - "name": "harfbuzz", - "features": [ - "icu" - ] + "name": "harfbuzz" }, "icu", "libjpeg-turbo", @@ -39,7 +39,19 @@ ], "features": { "metal": { - "description": "metal support for skia" + "description": "Metal support for skia" + }, + "vulkan": { + "description": "Vulkan support for skia" + }, + "direct3d": { + "description": "Direct3D support for skia" + }, + "dawn": { + "description": "dawn support for skia" + }, + "gl": { + "description": "OpenGL support for skia" } } } From 1f8b303afb443797311ffe554e4049697ee3cad5 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Tue, 19 Apr 2022 04:23:13 +0700 Subject: [PATCH 35/50] Fixes after merge conflicts --- ports/zeroc-ice/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/zeroc-ice/vcpkg.json b/ports/zeroc-ice/vcpkg.json index fa2d4c4968b8f3..e5b946193a6a12 100644 --- a/ports/zeroc-ice/vcpkg.json +++ b/ports/zeroc-ice/vcpkg.json @@ -6,7 +6,7 @@ "description": "Comprehensive RPC framework with support for C++, CSharp, Java, JavaScript, Python and more.", "homepage": "https://github.com/zeroc-ice/ice", "license": null, - "supports": "!uwp & !(windows & arm) & !(windows & staticcrt) & !wasm32", + "supports": "!uwp & !(windows & arm) & !wasm32", "dependencies": [ "bzip2", "expat", From f5c164cdfe1346b90dcfb762abb6fa4e81caa64a Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Tue, 19 Apr 2022 04:26:32 +0700 Subject: [PATCH 36/50] updated version --- versions/z-/zeroc-ice.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/z-/zeroc-ice.json b/versions/z-/zeroc-ice.json index cf4a0d74ce330f..a7e67f3bedc6f9 100644 --- a/versions/z-/zeroc-ice.json +++ b/versions/z-/zeroc-ice.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f32e4c338e25d36018095348e632c794b13fc513", + "git-tree": "d7eb1800fd6ab2b18666af779f818263d1f92d97", "version": "3.7.7", "port-version": 1 }, From 8fee76d4a923bd6634783f4086663bc91898967c Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Tue, 19 Apr 2022 04:58:30 +0700 Subject: [PATCH 37/50] Increased port version for zeroc-ice and skia and added warning for building skia[dawn] feature on Linux. --- ports/skia/portfile.cmake | 15 +++++++++++++++ ports/skia/vcpkg.json | 34 ++++++++++++++++------------------ ports/zeroc-ice/vcpkg.json | 2 +- versions/baseline.json | 4 ++-- versions/z-/zeroc-ice.json | 5 +++++ 5 files changed, 39 insertions(+), 21 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index cef4eff832ebe9..5690208a7c84a6 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -198,6 +198,21 @@ if(CMAKE_HOST_WIN32) endif() if("dawn" IN_LIST FEATURES) + + if (VCPKG_TARGET_IS_LINUX) + message(WARNING +[[ +dawn support requires the following libraries from the system package manager: + + libx11-xcb-dev mesa-common-dev + +They can be installed on Debian based systems via + + apt-get install libx11-xcb-dev mesa-common-dev +]] + ) + endif() + set(OPTIONS "${OPTIONS} skia_use_dawn=true") list(APPEND SKIA_PUBLIC_DEFINITIONS SK_DAWN) diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json index b9b405f4674f7d..bf4a29c57b2609 100644 --- a/ports/skia/vcpkg.json +++ b/ports/skia/vcpkg.json @@ -10,9 +10,6 @@ "homepage": "https://skia.org", "license": "BSD-3-Clause", "supports": "(osx | windows | linux) & !(windows & x86)", - "default-features": [ - "gl" - ], "dependencies": [ "expat", "fontconfig", @@ -20,9 +17,7 @@ "name": "freetype", "default-features": false }, - { - "name": "harfbuzz" - }, + "harfbuzz", "icu", "libjpeg-turbo", "libpng", @@ -37,21 +32,24 @@ }, "zlib" ], + "default-features": [ + "gl" + ], "features": { + "dawn": { + "description": "dawn support for skia" + }, + "direct3d": { + "description": "Direct3D support for skia" + }, + "gl": { + "description": "OpenGL support for skia" + }, "metal": { "description": "Metal support for skia" - }, - "vulkan": { - "description": "Vulkan support for skia" - }, - "direct3d": { - "description": "Direct3D support for skia" - }, - "dawn": { - "description": "dawn support for skia" - }, - "gl": { - "description": "OpenGL support for skia" + }, + "vulkan": { + "description": "Vulkan support for skia" } } } diff --git a/ports/zeroc-ice/vcpkg.json b/ports/zeroc-ice/vcpkg.json index e5b946193a6a12..2335597fc32261 100644 --- a/ports/zeroc-ice/vcpkg.json +++ b/ports/zeroc-ice/vcpkg.json @@ -1,7 +1,7 @@ { "name": "zeroc-ice", "version": "3.7.7", - "port-version": 1, + "port-version": 2, "maintainers": "Benjamin Oldenburg ", "description": "Comprehensive RPC framework with support for C++, CSharp, Java, JavaScript, Python and more.", "homepage": "https://github.com/zeroc-ice/ice", diff --git a/versions/baseline.json b/versions/baseline.json index 2da26b85e29635..ad14108321b28d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6522,7 +6522,7 @@ }, "skia": { "baseline": "2022-04-15", - "port-version": 9 + "port-version": 10 }, "skyr-url": { "baseline": "1.13.0", @@ -7666,7 +7666,7 @@ }, "zeroc-ice": { "baseline": "3.7.7", - "port-version": 1 + "port-version": 2 }, "zeromq": { "baseline": "4.3.4", diff --git a/versions/z-/zeroc-ice.json b/versions/z-/zeroc-ice.json index a7e67f3bedc6f9..b8778e2ebb95be 100644 --- a/versions/z-/zeroc-ice.json +++ b/versions/z-/zeroc-ice.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b60bcae5a77b8f5cdc2643d6136bb5aa5c40db40", + "version": "3.7.7", + "port-version": 2 + }, { "git-tree": "d7eb1800fd6ab2b18666af779f818263d1f92d97", "version": "3.7.7", From 9a5c30deb4ea0e4b7206d6e054c06a005e693d5d Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Tue, 19 Apr 2022 09:11:22 +0700 Subject: [PATCH 38/50] don't install dawn when not built --- ports/skia/portfile.cmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 5690208a7c84a6..2cfd9efaa55ce4 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -328,13 +328,19 @@ else() set(DAWN_LINKAGE "static") endif() -vcpkg_install_gn( - SOURCE_PATH "${SOURCE_PATH}" - TARGETS - ":skia" +vcpkg_list(SET SKIA_TARGETS ":skia") +if("dawn" IN_LIST FEATURES) + vcpkg_list(APPEND SKIA_TARGETS "third_party/externals/dawn/src/dawn:proc_${DAWN_LINKAGE}" "third_party/externals/dawn/src/dawn/native:${DAWN_LINKAGE}" "third_party/externals/dawn/src/dawn/platform:${DAWN_LINKAGE}" + ) +endif() + +vcpkg_install_gn( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS + ${SKIA_TARGETS} ) message(STATUS "Installing: ${CURRENT_PACKAGES_DIR}/include/${PORT}") From f3ec20b5f04ecf1d72db8de5494e4fbbbe6ed5be Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 14:53:33 +0700 Subject: [PATCH 39/50] Update ports/chromium-base/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/chromium-base/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/chromium-base/vcpkg.json b/ports/chromium-base/vcpkg.json index d036177733fa0c..d84ea24e0f5bed 100644 --- a/ports/chromium-base/vcpkg.json +++ b/ports/chromium-base/vcpkg.json @@ -1,7 +1,7 @@ { "name": "chromium-base", "version": "86.0.4199.1", - "port-version": 3, + "port-version": 4, "description": "Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.", "homepage": "https://chromium.googlesource.com/chromium/src", "license": "BSD-3-Clause", From 1c28cf6d1cb6e1078b0390df2d3124f817268bb5 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 14:54:30 +0700 Subject: [PATCH 40/50] Update ports/crashpad/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/crashpad/portfile.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/crashpad/portfile.cmake b/ports/crashpad/portfile.cmake index 4255ff29a99191..6c8eb1f35f0cc0 100644 --- a/ports/crashpad/portfile.cmake +++ b/ports/crashpad/portfile.cmake @@ -7,9 +7,7 @@ vcpkg_from_git( ) vcpkg_find_acquire_program(PYTHON3) -file(READ "${SOURCE_PATH}/.gn" GN_FILE_CONTENT) -string(REPLACE "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"" GN_FILE_CONTENT ${GN_FILE_CONTENT}) -file(WRITE "${SOURCE_PATH}/.gn" ${GN_FILE_CONTENT}) +vcpkg_replace_string("${SOURCE_PATH}/.gn" "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"") function(checkout_in_path PATH URL REF) if(EXISTS "${PATH}") From 7e98b341afa7932d1f3a5fb455e7062ee3ed2cff Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 14:54:53 +0700 Subject: [PATCH 41/50] Update ports/crashpad/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/crashpad/vcpkg.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json index de30fcc6ef88f9..c506e340940c4c 100644 --- a/ports/crashpad/vcpkg.json +++ b/ports/crashpad/vcpkg.json @@ -1,7 +1,6 @@ { "name": "crashpad", "version-date": "2022-04-16", - "port-version": 2, "description": [ "Crashpad is a crash-reporting system.", "Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss." From 16026fc1bd2b7b1b2a8a58b2f2dfbfa0453e4499 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 15:20:26 +0700 Subject: [PATCH 42/50] fixed git-tree issue --- versions/baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index ad14108321b28d..38dc007c68c756 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6522,7 +6522,7 @@ }, "skia": { "baseline": "2022-04-15", - "port-version": 10 + "port-version": 9 }, "skyr-url": { "baseline": "1.13.0", From b97dd23429c9e0792cb3d25f4c3b4232c27efd52 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 15:05:14 +0700 Subject: [PATCH 43/50] Update ports/skia/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/skia/portfile.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 2cfd9efaa55ce4..cc6cf854a7db15 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -8,9 +8,7 @@ vcpkg_from_git( # Replace hardcoded python paths vcpkg_find_acquire_program(PYTHON3) -file(READ "${SOURCE_PATH}/.gn" GN_FILE_CONTENT) -string(REPLACE "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"" GN_FILE_CONTENT ${GN_FILE_CONTENT}) -file(WRITE "${SOURCE_PATH}/.gn" ${GN_FILE_CONTENT}) +vcpkg_replace_string("${SOURCE_PATH}/.gn" "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"") file(READ "${SOURCE_PATH}/gn/toolchain/BUILD.gn" GN_FILE_CONTENT) string(REPLACE "command = \"$shell python" "command = \"$shell '${PYTHON3}'" GN_FILE_CONTENT ${GN_FILE_CONTENT}) From 06426cf39e4002f5ce36f8d2756c7aa44590f68a Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 15:23:19 +0700 Subject: [PATCH 44/50] Fixed versioning / git-tree --- ports/crashpad/vcpkg.json | 1 + ports/skia/fontconfig.gn | 3 ++- ports/v8/vcpkg.json | 2 +- versions/baseline.json | 6 +++--- versions/c-/chromium-base.json | 7 ++++++- versions/c-/crashpad.json | 4 ++-- versions/v-/v8.json | 7 ++++++- versions/z-/zeroc-ice.json | 2 +- 8 files changed, 22 insertions(+), 10 deletions(-) diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json index c506e340940c4c..ed275c993a90d7 100644 --- a/ports/crashpad/vcpkg.json +++ b/ports/crashpad/vcpkg.json @@ -1,6 +1,7 @@ { "name": "crashpad", "version-date": "2022-04-16", + "port-version": 3, "description": [ "Crashpad is a crash-reporting system.", "Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss." diff --git a/ports/skia/fontconfig.gn b/ports/skia/fontconfig.gn index cded75c8f2d994..d7cccb21d096db 100644 --- a/ports/skia/fontconfig.gn +++ b/ports/skia/fontconfig.gn @@ -7,4 +7,5 @@ import("../third_party.gni") } else { libs = @_LIBS_REL@ } - } \ No newline at end of file + } + \ No newline at end of file diff --git a/ports/v8/vcpkg.json b/ports/v8/vcpkg.json index 07de8ce62880a9..eae65fcd0c5a3d 100644 --- a/ports/v8/vcpkg.json +++ b/ports/v8/vcpkg.json @@ -1,7 +1,7 @@ { "name": "v8", "version": "9.1.269.39", - "port-version": 3, + "port-version": 4, "description": "Google Chrome's JavaScript engine", "homepage": "https://v8.dev", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index 38dc007c68c756..b23eaadbed0a74 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1366,7 +1366,7 @@ }, "chromium-base": { "baseline": "86.0.4199.1", - "port-version": 3 + "port-version": 4 }, "cimg": { "baseline": "2.9.9", @@ -1670,7 +1670,7 @@ }, "crashpad": { "baseline": "2022-04-16", - "port-version": 2 + "port-version": 3 }, "crashrpt": { "baseline": "1.4.3", @@ -7274,7 +7274,7 @@ }, "v8": { "baseline": "9.1.269.39", - "port-version": 3 + "port-version": 4 }, "valijson": { "baseline": "0.6", diff --git a/versions/c-/chromium-base.json b/versions/c-/chromium-base.json index 92979f3aee27de..c539ab612d0a42 100644 --- a/versions/c-/chromium-base.json +++ b/versions/c-/chromium-base.json @@ -1,8 +1,13 @@ { "versions": [ { - "git-tree": "e0883d228c02f1b6a2bcb9372f0ba0f7ded330a7", + "git-tree": "3dbf253ab140a0d754230e2cffa7b4f94686a9e9", "version": "86.0.4199.1", + "port-version": 4 + }, + { + "git-tree": "36e6dbafdea0e90a8717907171efa375d2580d8b", + "version-string": "86.0.4199.1", "port-version": 3 }, { diff --git a/versions/c-/crashpad.json b/versions/c-/crashpad.json index 48bcbce62b8473..8ff87ef7782474 100644 --- a/versions/c-/crashpad.json +++ b/versions/c-/crashpad.json @@ -1,9 +1,9 @@ { "versions": [ { - "git-tree": "baf22648c3011b81827b03f1b5a5c8d5ba5da1e6", + "git-tree": "5ea0cd42046179f200f8a5b099dbb6f092b2d6dc", "version-date": "2022-04-16", - "port-version": 2 + "port-version": 3 }, { "git-tree": "88ee612aa949155b1e363bb710578811d3283033", diff --git a/versions/v-/v8.json b/versions/v-/v8.json index 8f5ef52ef12965..3be97ab880e29a 100644 --- a/versions/v-/v8.json +++ b/versions/v-/v8.json @@ -1,7 +1,12 @@ { "versions": [ { - "git-tree": "5dd64fe575529fc0d7700772326c76b23c12c135", + "git-tree": "f57ec75cb9169900555359752c65e8e4c79c34ec", + "version": "9.1.269.39", + "port-version": 4 + }, + { + "git-tree": "3abf0953ae7dcf4bb4b4ede21adb27ad850b1e1c", "version": "9.1.269.39", "port-version": 3 }, diff --git a/versions/z-/zeroc-ice.json b/versions/z-/zeroc-ice.json index b8778e2ebb95be..57bb07d85ae814 100644 --- a/versions/z-/zeroc-ice.json +++ b/versions/z-/zeroc-ice.json @@ -6,7 +6,7 @@ "port-version": 2 }, { - "git-tree": "d7eb1800fd6ab2b18666af779f818263d1f92d97", + "git-tree": "f32e4c338e25d36018095348e632c794b13fc513", "version": "3.7.7", "port-version": 1 }, From 92861587ac35c49c60a21314fd39b69375fe4e04 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 16:46:19 +0700 Subject: [PATCH 45/50] Update ports/skia/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/skia/portfile.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index cc6cf854a7db15..327a508c80613c 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -10,9 +10,7 @@ vcpkg_from_git( vcpkg_find_acquire_program(PYTHON3) vcpkg_replace_string("${SOURCE_PATH}/.gn" "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"") -file(READ "${SOURCE_PATH}/gn/toolchain/BUILD.gn" GN_FILE_CONTENT) -string(REPLACE "command = \"$shell python" "command = \"$shell '${PYTHON3}'" GN_FILE_CONTENT ${GN_FILE_CONTENT}) -file(WRITE "${SOURCE_PATH}/gn/toolchain/BUILD.gn" ${GN_FILE_CONTENT}) +vcpkg_replace_string("${SOURCE_PATH}/gn/toolchain/BUILD.gn" "command = \"$shell python" "command = \"$shell '${PYTHON3}'") function(checkout_in_path PATH URL REF) if(EXISTS "${PATH}") From f9d5fedcf4f8e9d0e6b7f93c78c1b13a98528071 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 17:42:18 +0700 Subject: [PATCH 46/50] Update ports/skia/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/skia/vcpkg.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json index bf4a29c57b2609..39f604a2d52a82 100644 --- a/ports/skia/vcpkg.json +++ b/ports/skia/vcpkg.json @@ -1,7 +1,6 @@ { "name": "skia", - "version-date": "2020-05-18", - "port-version": 9, + "version-date": "2022-04-15", "description": [ "Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms.", "It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products.", From 5d3cbb33906448dd4d0d203759172b8aa1752c2d Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 17:42:33 +0700 Subject: [PATCH 47/50] Update ports/crashpad/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/crashpad/vcpkg.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json index ed275c993a90d7..c506e340940c4c 100644 --- a/ports/crashpad/vcpkg.json +++ b/ports/crashpad/vcpkg.json @@ -1,7 +1,6 @@ { "name": "crashpad", "version-date": "2022-04-16", - "port-version": 3, "description": [ "Crashpad is a crash-reporting system.", "Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss." From add7e30da6827d66cc0f3ab0ae52c051f414b49a Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 17:48:08 +0700 Subject: [PATCH 48/50] updated ci.ci.baseline.txt --- scripts/ci.baseline.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 7926f5fa2d9498..2ab6bde42a2ad2 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1155,9 +1155,7 @@ shogun:x86-windows = skip signalrclient:x64-uwp=fail signalrclient:arm-uwp=fail skia:arm-uwp=fail -skia:x64-linux=fail skia:x64-uwp=fail -skia:x86-windows=fail # skia doesn't support x86 builds with local MSVC installations sleef:x86-windows=fail slikenet:arm-uwp=fail slikenet:x64-uwp=fail From c06050b6f3fc99016887dc3c5f62a0025a4ea670 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Wed, 20 Apr 2022 17:54:05 +0700 Subject: [PATCH 49/50] fixed versions --- versions/baseline.json | 4 ++-- versions/c-/crashpad.json | 5 +++++ versions/s-/skia.json | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index b23eaadbed0a74..49133580381718 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1670,7 +1670,7 @@ }, "crashpad": { "baseline": "2022-04-16", - "port-version": 3 + "port-version": 0 }, "crashrpt": { "baseline": "1.4.3", @@ -6522,7 +6522,7 @@ }, "skia": { "baseline": "2022-04-15", - "port-version": 9 + "port-version": 0 }, "skyr-url": { "baseline": "1.13.0", diff --git a/versions/c-/crashpad.json b/versions/c-/crashpad.json index 8ff87ef7782474..6a033f4d327410 100644 --- a/versions/c-/crashpad.json +++ b/versions/c-/crashpad.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "448abcac90e97d8b5ee03843775dd7fcba971979", + "version-date": "2022-04-16", + "port-version": 0 + }, { "git-tree": "5ea0cd42046179f200f8a5b099dbb6f092b2d6dc", "version-date": "2022-04-16", diff --git a/versions/s-/skia.json b/versions/s-/skia.json index 7499ae3b7cd593..d4ca59fe382ebd 100644 --- a/versions/s-/skia.json +++ b/versions/s-/skia.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7f5ca0f37edc11f7f05dec351628ce512c116070", + "version-date": "2022-04-15", + "port-version": 0 + }, { "git-tree": "cdf8cda1612a4770f3a01e35ae5da93654abc17d", "version-date": "2020-05-18", From c232b6eabb9823323dc7b37cf714fbb62016b403 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Fri, 22 Apr 2022 09:42:11 -0700 Subject: [PATCH 50/50] versions + space changes --- ports/skia/dawn_use_vcpkg_spirv.patch | 26 +++--- ports/skia/fontconfig.gn | 21 +++-- ports/skia/portfile.cmake | 2 +- ports/skia/use_vcpkg_fontconfig.patch | 84 +++++++++---------- ports/zeroc-ice/change_to_mt.ps1 | 106 ++++++++++++------------ ports/zeroc-ice/portfile.cmake | 3 +- ports/zeroc-ice/prepare_for_build.cmake | 29 ++++--- versions/c-/crashpad.json | 5 -- versions/s-/skia.json | 2 +- versions/z-/zeroc-ice.json | 2 +- 10 files changed, 136 insertions(+), 144 deletions(-) diff --git a/ports/skia/dawn_use_vcpkg_spirv.patch b/ports/skia/dawn_use_vcpkg_spirv.patch index 08cfa51ab0119f..02e25148c7507f 100644 --- a/ports/skia/dawn_use_vcpkg_spirv.patch +++ b/ports/skia/dawn_use_vcpkg_spirv.patch @@ -1,13 +1,13 @@ -diff --git a/src/dawn_native/BUILD.gn b/src/dawn_native/BUILD.gn -index f73bfe24..e37792a0 100644 ---- a/src/dawn_native/BUILD.gn -+++ b/src/dawn_native/BUILD.gn -@@ -145,7 +145,7 @@ source_set("dawn_native_sources") { - ":dawn_native_headers", - ":dawn_native_utils_gen", - "${dawn_root}/src/common", -- "${dawn_root}/third_party/gn/spirv_cross:spirv_cross", -+ "//third_party/spirv-cross:spirv_cross", - "${dawn_spirv_tools_dir}:spvtools_opt", - "${dawn_spirv_tools_dir}:spvtools_val", - "${dawn_tint_dir}/src:libtint", +diff --git a/src/dawn_native/BUILD.gn b/src/dawn_native/BUILD.gn +index f73bfe24..e37792a0 100644 +--- a/src/dawn_native/BUILD.gn ++++ b/src/dawn_native/BUILD.gn +@@ -145,7 +145,7 @@ source_set("dawn_native_sources") { + ":dawn_native_headers", + ":dawn_native_utils_gen", + "${dawn_root}/src/common", +- "${dawn_root}/third_party/gn/spirv_cross:spirv_cross", ++ "//third_party/spirv-cross:spirv_cross", + "${dawn_spirv_tools_dir}:spvtools_opt", + "${dawn_spirv_tools_dir}:spvtools_val", + "${dawn_tint_dir}/src:libtint", diff --git a/ports/skia/fontconfig.gn b/ports/skia/fontconfig.gn index d7cccb21d096db..ae4fe7b46bff52 100644 --- a/ports/skia/fontconfig.gn +++ b/ports/skia/fontconfig.gn @@ -1,11 +1,10 @@ -import("../third_party.gni") - - system("fontconfig") { - include_dirs = @_INCLUDES@ - if(is_debug) { - libs = @_LIBS_DBG@ - } else { - libs = @_LIBS_REL@ - } - } - \ No newline at end of file +import("../third_party.gni") + + system("fontconfig") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } + } diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 327a508c80613c..6c68b7fc94ec3d 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -202,7 +202,7 @@ dawn support requires the following libraries from the system package manager: libx11-xcb-dev mesa-common-dev -They can be installed on Debian based systems via +They can be installed on Debian based systems via apt-get install libx11-xcb-dev mesa-common-dev ]] diff --git a/ports/skia/use_vcpkg_fontconfig.patch b/ports/skia/use_vcpkg_fontconfig.patch index 3533e8cf3d5835..56bfd2c2b7a4dc 100644 --- a/ports/skia/use_vcpkg_fontconfig.patch +++ b/ports/skia/use_vcpkg_fontconfig.patch @@ -1,42 +1,42 @@ -diff --git a/BUILD.gn b/BUILD.gn -index aeb46b4664..2ddbcd0ebe 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -452,7 +452,7 @@ optional("fontmgr_fontconfig") { - enabled = skia_enable_fontmgr_fontconfig - - # The public header includes fontconfig.h and uses FcConfig* -- public_deps = [ "//third_party:fontconfig" ] -+ public_deps = [ "//third_party/fontconfig" ] - public = [ "include/ports/SkFontMgr_fontconfig.h" ] - deps = [ ":typeface_freetype" ] - sources = [ "src/ports/SkFontMgr_fontconfig.cpp" ] -@@ -469,7 +469,7 @@ optional("fontmgr_FontConfigInterface") { - - deps = [ - ":typeface_freetype", -- "//third_party:fontconfig", -+ "//third_party/fontconfig", - ] - public = [ - "include/ports/SkFontConfigInterface.h", -diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn -index 63fa748d16..6760e0f41b 100644 ---- a/third_party/BUILD.gn -+++ b/third_party/BUILD.gn -@@ -6,9 +6,9 @@ - declare_args() { - } - --config("system_fontconfig") { -- libs = [ "fontconfig" ] --} --group("fontconfig") { -- public_configs = [ ":system_fontconfig" ] --} -+#config("system_fontconfig") { -+# libs = [ "fontconfig" ] -+#} -+#group("fontconfig") { -+# public_configs = [ ":system_fontconfig" ] -+#} +diff --git a/BUILD.gn b/BUILD.gn +index aeb46b4664..2ddbcd0ebe 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -452,7 +452,7 @@ optional("fontmgr_fontconfig") { + enabled = skia_enable_fontmgr_fontconfig + + # The public header includes fontconfig.h and uses FcConfig* +- public_deps = [ "//third_party:fontconfig" ] ++ public_deps = [ "//third_party/fontconfig" ] + public = [ "include/ports/SkFontMgr_fontconfig.h" ] + deps = [ ":typeface_freetype" ] + sources = [ "src/ports/SkFontMgr_fontconfig.cpp" ] +@@ -469,7 +469,7 @@ optional("fontmgr_FontConfigInterface") { + + deps = [ + ":typeface_freetype", +- "//third_party:fontconfig", ++ "//third_party/fontconfig", + ] + public = [ + "include/ports/SkFontConfigInterface.h", +diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn +index 63fa748d16..6760e0f41b 100644 +--- a/third_party/BUILD.gn ++++ b/third_party/BUILD.gn +@@ -6,9 +6,9 @@ + declare_args() { + } + +-config("system_fontconfig") { +- libs = [ "fontconfig" ] +-} +-group("fontconfig") { +- public_configs = [ ":system_fontconfig" ] +-} ++#config("system_fontconfig") { ++# libs = [ "fontconfig" ] ++#} ++#group("fontconfig") { ++# public_configs = [ ":system_fontconfig" ] ++#} diff --git a/ports/zeroc-ice/change_to_mt.ps1 b/ports/zeroc-ice/change_to_mt.ps1 index d538236b3be433..91306095423bd0 100644 --- a/ports/zeroc-ice/change_to_mt.ps1 +++ b/ports/zeroc-ice/change_to_mt.ps1 @@ -1,53 +1,53 @@ - -$projFilePath = $args[0] -$crtLinkage = $args[1] - -if($projFilePath) -{ - $xpath = "/rs:Project/rs:ItemGroup/rs:ProjectConfiguration" - $xmldoc = New-Object System.Xml.XmlDocument - $xmldoc.load($projFilePath) - $nsmgr = New-Object System.Xml.XmlNamespaceManager($xmldoc.NameTable); - $nsmgr.AddNamespace("rs", "http://schemas.microsoft.com/developer/msbuild/2003"); - $root = $xmldoc.DocumentElement - - foreach($conf in $root.ItemDefinitionGroup) - { - if($conf.Condition) - { - if(-Not ($conf.ClCompile.RuntimeLibrary)) - { - $rtl = $xmldoc.CreateElement("RuntimeLibrary", $conf.ClCompile.NamespaceURI) - $conf.ClCompile.AppendChild($rtl) - } - - if($conf.Condition.Contains("Debug")) - { - if($crtLinkage -eq "static") - { - $conf.ClCompile.RuntimeLibrary = "MultithreadedDebug" - } - else - { - $conf.ClCompile.RuntimeLibrary = "MultithreadedDebugDLL" - } - } - else - { - if($crtLinkage -eq "static") - { - $conf.ClCompile.RuntimeLibrary = "Multithreaded" - } - else - { - $conf.ClCompile.RuntimeLibrary = "MultithreadedDLL" - } - } - } - } - $xmldoc.save($projFilePath) -} -else -{ - Write-Error "Error: No path defined!" -} \ No newline at end of file + +$projFilePath = $args[0] +$crtLinkage = $args[1] + +if($projFilePath) +{ + $xpath = "/rs:Project/rs:ItemGroup/rs:ProjectConfiguration" + $xmldoc = New-Object System.Xml.XmlDocument + $xmldoc.load($projFilePath) + $nsmgr = New-Object System.Xml.XmlNamespaceManager($xmldoc.NameTable); + $nsmgr.AddNamespace("rs", "http://schemas.microsoft.com/developer/msbuild/2003"); + $root = $xmldoc.DocumentElement + + foreach($conf in $root.ItemDefinitionGroup) + { + if($conf.Condition) + { + if(-Not ($conf.ClCompile.RuntimeLibrary)) + { + $rtl = $xmldoc.CreateElement("RuntimeLibrary", $conf.ClCompile.NamespaceURI) + $conf.ClCompile.AppendChild($rtl) + } + + if($conf.Condition.Contains("Debug")) + { + if($crtLinkage -eq "static") + { + $conf.ClCompile.RuntimeLibrary = "MultithreadedDebug" + } + else + { + $conf.ClCompile.RuntimeLibrary = "MultithreadedDebugDLL" + } + } + else + { + if($crtLinkage -eq "static") + { + $conf.ClCompile.RuntimeLibrary = "Multithreaded" + } + else + { + $conf.ClCompile.RuntimeLibrary = "MultithreadedDLL" + } + } + } + } + $xmldoc.save($projFilePath) +} +else +{ + Write-Error "Error: No path defined!" +} diff --git a/ports/zeroc-ice/portfile.cmake b/ports/zeroc-ice/portfile.cmake index 8102b045fac17a..c1cf8c1d36fc35 100644 --- a/ports/zeroc-ice/portfile.cmake +++ b/ports/zeroc-ice/portfile.cmake @@ -257,7 +257,7 @@ else() # VCPKG_TARGET_IS_WINDOWS include("${CURRENT_PORT_DIR}/prepare_for_build.cmake") prepare_for_build("${SOURCE_PATH}") - vcpkg_list(SET MSBUILD_OPTIONS + vcpkg_list(SET MSBUILD_OPTIONS "/p:UseVcpkg=yes" "/p:IceBuildingSrc=yes" ${ICE_OPTIONAL_COMPONENTS_MSBUILD} @@ -272,7 +272,6 @@ else() # VCPKG_TARGET_IS_WINDOWS USE_VCPKG_INTEGRATION OPTIONS ${MSBUILD_OPTIONS} - ) if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/zeroc.icebuilder.msbuild.dll") diff --git a/ports/zeroc-ice/prepare_for_build.cmake b/ports/zeroc-ice/prepare_for_build.cmake index 0f5e4261246029..df3e93003d0efa 100644 --- a/ports/zeroc-ice/prepare_for_build.cmake +++ b/ports/zeroc-ice/prepare_for_build.cmake @@ -1,7 +1,7 @@ # This function modifies hardcoded RuntimeLibrary directives in Ice's .vcxproj files and downloads # Ice Builder for MSBuild, which is required to generate C++ files based on the interface definition -# files (.ice). +# files (.ice). function(prepare_for_build ICE_SOURCE_DIR) @@ -10,29 +10,29 @@ function(prepare_for_build ICE_SOURCE_DIR) file(GLOB_RECURSE PROJ_FILES "${CPP_SOURCE_DIR}/*.vcxproj") foreach(PROJ_FILE ${PROJ_FILES}) file(READ ${PROJ_FILE} PROJ_FILE_CONTENT) - STRING(REGEX - REPLACE - "" + STRING(REGEX + REPLACE + "" "" PROJ_FILE_CONTENT "${PROJ_FILE_CONTENT}" ) - if((NOT ${PROJ_FILE} MATCHES ".*slice\.vcxproj") AND - (NOT ${PROJ_FILE} MATCHES ".*iceutil\.vcxproj") AND + if((NOT ${PROJ_FILE} MATCHES ".*slice\.vcxproj") AND + (NOT ${PROJ_FILE} MATCHES ".*iceutil\.vcxproj") AND (NOT ${PROJ_FILE} MATCHES ".*slice2cpp\.vcxproj")) - + if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") - STRING(REGEX - REPLACE + STRING(REGEX + REPLACE "DynamicLibrary" "StaticLibrary" PROJ_FILE_CONTENT "${PROJ_FILE_CONTENT}" ) else() - STRING(REGEX - REPLACE + STRING(REGEX + REPLACE "StaticLibrary" "DynamicLibrary" PROJ_FILE_CONTENT @@ -40,7 +40,7 @@ function(prepare_for_build ICE_SOURCE_DIR) ) endif() endif() - + file(WRITE ${PROJ_FILE} "${PROJ_FILE_CONTENT}") vcpkg_execute_required_process( @@ -48,7 +48,6 @@ function(prepare_for_build ICE_SOURCE_DIR) WORKING_DIRECTORY ${SOURCE_PATH} LOGNAME change_to_mt-${TARGET_TRIPLET}-rel ) - endforeach() set(ICE_CPP_MSBUILD_PACKAGES_DIR "${ICE_SOURCE_DIR}/cpp/msbuild/packages") @@ -63,8 +62,8 @@ function(prepare_for_build ICE_SOURCE_DIR) ) vcpkg_extract_source_archive( - ICE_BUILDER_MSBUILD_DIRECTORY - ARCHIVE + ICE_BUILDER_MSBUILD_DIRECTORY + ARCHIVE "${ICE_BUILDER_MSBUILD_ARCHIVE}" NO_REMOVE_ONE_LEVEL SOURCE_BASE icebuilder diff --git a/versions/c-/crashpad.json b/versions/c-/crashpad.json index 6a033f4d327410..013a9dacf385e9 100644 --- a/versions/c-/crashpad.json +++ b/versions/c-/crashpad.json @@ -5,11 +5,6 @@ "version-date": "2022-04-16", "port-version": 0 }, - { - "git-tree": "5ea0cd42046179f200f8a5b099dbb6f092b2d6dc", - "version-date": "2022-04-16", - "port-version": 3 - }, { "git-tree": "88ee612aa949155b1e363bb710578811d3283033", "version-date": "2020-03-18", diff --git a/versions/s-/skia.json b/versions/s-/skia.json index d4ca59fe382ebd..00a465e3e9ca34 100644 --- a/versions/s-/skia.json +++ b/versions/s-/skia.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7f5ca0f37edc11f7f05dec351628ce512c116070", + "git-tree": "d167d79c12796fb226b9a869705fde2f4594e789", "version-date": "2022-04-15", "port-version": 0 }, diff --git a/versions/z-/zeroc-ice.json b/versions/z-/zeroc-ice.json index 57bb07d85ae814..905dc77c32195e 100644 --- a/versions/z-/zeroc-ice.json +++ b/versions/z-/zeroc-ice.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b60bcae5a77b8f5cdc2643d6136bb5aa5c40db40", + "git-tree": "1ddc4746c1f19fca41706071fac4575ea99fe6b9", "version": "3.7.7", "port-version": 2 },