From 4048762e48265c781eaa29c8f07083713129e9ff Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sat, 27 Apr 2019 18:43:07 +0800 Subject: [PATCH 0001/1066] [sx] Add new port --- ports/sx/CONTROL | 3 +++ ports/sx/portfile.cmake | 41 ++++++++++++++++++++++++++++++++++ ports/sx/win32-sharedlib.patch | 14 ++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 ports/sx/CONTROL create mode 100644 ports/sx/portfile.cmake create mode 100644 ports/sx/win32-sharedlib.patch diff --git a/ports/sx/CONTROL b/ports/sx/CONTROL new file mode 100644 index 000000000..4d641071d --- /dev/null +++ b/ports/sx/CONTROL @@ -0,0 +1,3 @@ +Source: sx +Version: 2019-04-27 +Description: Portable base library for C programmers, designed for performance and simplicity. diff --git a/ports/sx/portfile.cmake b/ports/sx/portfile.cmake new file mode 100644 index 000000000..cb3eca760 --- /dev/null +++ b/ports/sx/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO septag/sx + REF 161d7d77a3bdcc8a55846e2dd1791773888fce24 + SHA512 198476793c921d8859f5f5b9ffe8915a7bc4b1d9d518e6772b3d90ccd03a7f5debe5bde32d7d5164f64a0beda53c5dcd06849814e7df447bccb93aa13bbca8b0 + HEAD_REF master + PATCHES + win32-sharedlib.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SX_SHARED_LIB) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DSX_BUILD_TESTS=OFF + -DSX_SHARED_LIB=${SX_SHARED_LIB} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/sx/config.h + "define SX_CONFIG_SHARED_LIB 0" + "define SX_CONFIG_SHARED_LIB 1" + ) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/sx/win32-sharedlib.patch b/ports/sx/win32-sharedlib.patch new file mode 100644 index 000000000..41b39ec3d --- /dev/null +++ b/ports/sx/win32-sharedlib.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 840692e..8a4eb9e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -226,7 +226,8 @@ install( + TARGETS sx + EXPORT sx-config + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + install( + EXPORT sx-config From 3cdfad0fb12f8e65d4f10fe49b9c6600c4c93cd3 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 7 May 2019 18:54:49 +0800 Subject: [PATCH 0002/1066] [septag-sx] Rename --- ports/{sx => septag-sx}/CONTROL | 0 ports/{sx => septag-sx}/portfile.cmake | 0 ports/{sx => septag-sx}/win32-sharedlib.patch | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename ports/{sx => septag-sx}/CONTROL (100%) rename ports/{sx => septag-sx}/portfile.cmake (100%) rename ports/{sx => septag-sx}/win32-sharedlib.patch (100%) diff --git a/ports/sx/CONTROL b/ports/septag-sx/CONTROL similarity index 100% rename from ports/sx/CONTROL rename to ports/septag-sx/CONTROL diff --git a/ports/sx/portfile.cmake b/ports/septag-sx/portfile.cmake similarity index 100% rename from ports/sx/portfile.cmake rename to ports/septag-sx/portfile.cmake diff --git a/ports/sx/win32-sharedlib.patch b/ports/septag-sx/win32-sharedlib.patch similarity index 100% rename from ports/sx/win32-sharedlib.patch rename to ports/septag-sx/win32-sharedlib.patch From b37854348a9dab3e9121a3f08dd404fa09e0e80e Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 7 May 2019 19:03:57 +0800 Subject: [PATCH 0003/1066] [septag-sx] Update to 2019-05-07 --- ports/septag-sx/CONTROL | 4 ++-- ports/septag-sx/portfile.cmake | 12 +++++------- ports/septag-sx/win32-sharedlib.patch | 14 -------------- 3 files changed, 7 insertions(+), 23 deletions(-) delete mode 100644 ports/septag-sx/win32-sharedlib.patch diff --git a/ports/septag-sx/CONTROL b/ports/septag-sx/CONTROL index 4d641071d..4c329f1a6 100644 --- a/ports/septag-sx/CONTROL +++ b/ports/septag-sx/CONTROL @@ -1,3 +1,3 @@ -Source: sx -Version: 2019-04-27 +Source: septag-sx +Version: 2019-05-07 Description: Portable base library for C programmers, designed for performance and simplicity. diff --git a/ports/septag-sx/portfile.cmake b/ports/septag-sx/portfile.cmake index cb3eca760..0c2e85fa4 100644 --- a/ports/septag-sx/portfile.cmake +++ b/ports/septag-sx/portfile.cmake @@ -3,11 +3,9 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO septag/sx - REF 161d7d77a3bdcc8a55846e2dd1791773888fce24 - SHA512 198476793c921d8859f5f5b9ffe8915a7bc4b1d9d518e6772b3d90ccd03a7f5debe5bde32d7d5164f64a0beda53c5dcd06849814e7df447bccb93aa13bbca8b0 + REF b70567a52636f9ecfdb904c586a957a806efc990 + SHA512 8945476b428418d3c7845afd831503f43fd44672a9b3506576c5baf50f55739327275a8be97a323f3ae146f84b76bbe266ac7b5df1b85cb05a826ed5e30b9547 HEAD_REF master - PATCHES - win32-sharedlib.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SX_SHARED_LIB) @@ -23,9 +21,9 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sx TARGET_PATH share/sx) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/sx/config.h "define SX_CONFIG_SHARED_LIB 0" "define SX_CONFIG_SHARED_LIB 1" @@ -38,4 +36,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) # CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +vcpkg_test_cmake(PACKAGE_NAME sx) diff --git a/ports/septag-sx/win32-sharedlib.patch b/ports/septag-sx/win32-sharedlib.patch deleted file mode 100644 index 41b39ec3d..000000000 --- a/ports/septag-sx/win32-sharedlib.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 840692e..8a4eb9e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -226,7 +226,8 @@ install( - TARGETS sx - EXPORT sx-config - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - - install( - EXPORT sx-config From 8ae4f08dec59f048921d4475053f5f364a09d2a9 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Mon, 11 Mar 2019 17:59:31 +0800 Subject: [PATCH 0004/1066] [librdkafka] Add new port (fix #5920) --- ports/rdkafka/CONTROL | 4 +++ ports/rdkafka/portfile.cmake | 55 ++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 ports/rdkafka/CONTROL create mode 100644 ports/rdkafka/portfile.cmake diff --git a/ports/rdkafka/CONTROL b/ports/rdkafka/CONTROL new file mode 100644 index 000000000..39f5b3e83 --- /dev/null +++ b/ports/rdkafka/CONTROL @@ -0,0 +1,4 @@ +Source: rdkafka +Version: v1.0.0-RC8-test-deps13 +Description: The Apache Kafka C/C++ library +Build-Depends: openssl, zlib, zstd diff --git a/ports/rdkafka/portfile.cmake b/ports/rdkafka/portfile.cmake new file mode 100644 index 000000000..20ff5e1b9 --- /dev/null +++ b/ports/rdkafka/portfile.cmake @@ -0,0 +1,55 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO edenhill/librdkafka + REF v1.0.0-RC8-test-deps13 + SHA512 08c48494eb2412335d0729ee831375da7ab21c7a9f00710f50f99d7fdac40b2520ece70d55919b6944372d852bd7b7d08166ca5c7557922d41df6ca2b6e2cf81 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRDKAFKA_BUILD_STATIC=${RDKAFKA_BUILD_STATIC} + -DRDKAFKA_BUILD_EXAMPLES=OFF + -DRDKAFKA_BUILD_TESTS=OFF + OPTIONS_DEBUG + -DENABLE_DEVEL=ON + -DENABLE_REFCNT_DEBUG=ON + -DENABLE_SHAREDPTR_DEBUG=ON + OPTIONS_RELEASE + -DENABLE_DEVEL=OFF + -DENABLE_REFCNT_DEBUG=OFF + -DENABLE_SHAREDPTR_DEBUG=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + foreach(hdr rdkafka.h rdkafkacpp.h) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/librdkafka/${hdr} + "#ifdef LIBRDKAFKA_STATICLIB" + "#if 1 // #ifdef LIBRDKAFKA_STATICLIB" + ) + endforeach() +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +#vcpkg_test_cmake(PACKAGE_NAME ${PORT}) From af8fa46a03dad85068aa21e6fe6040d2adcb7dcf Mon Sep 17 00:00:00 2001 From: myd7349 Date: Wed, 3 Apr 2019 18:18:15 +0800 Subject: [PATCH 0005/1066] [librdkafka] Update to v1.0.0 --- ports/rdkafka/CONTROL | 2 +- ports/rdkafka/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/rdkafka/CONTROL b/ports/rdkafka/CONTROL index 39f5b3e83..6d2d9c00f 100644 --- a/ports/rdkafka/CONTROL +++ b/ports/rdkafka/CONTROL @@ -1,4 +1,4 @@ Source: rdkafka -Version: v1.0.0-RC8-test-deps13 +Version: v1.0.0 Description: The Apache Kafka C/C++ library Build-Depends: openssl, zlib, zstd diff --git a/ports/rdkafka/portfile.cmake b/ports/rdkafka/portfile.cmake index 20ff5e1b9..17b2b18de 100644 --- a/ports/rdkafka/portfile.cmake +++ b/ports/rdkafka/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edenhill/librdkafka - REF v1.0.0-RC8-test-deps13 - SHA512 08c48494eb2412335d0729ee831375da7ab21c7a9f00710f50f99d7fdac40b2520ece70d55919b6944372d852bd7b7d08166ca5c7557922d41df6ca2b6e2cf81 + REF v1.0.0 + SHA512 15ac1e4c9042debf8d4df602ccdc5eccae3a37b305be24d724fcaffc3d1d0aafa708fc8e29d6af51f51ed6c7daf74b3041b8b9b0444e6702cd73479c8078859a HEAD_REF master ) From 7c73e98b9f82af47d5a5282582d1935361055a6b Mon Sep 17 00:00:00 2001 From: myd7349 Date: Wed, 3 Apr 2019 18:50:39 +0800 Subject: [PATCH 0006/1066] [librdkafka] Add features --- ports/rdkafka/CONTROL | 18 +++++++++++++++++- ports/rdkafka/portfile.cmake | 30 ++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/ports/rdkafka/CONTROL b/ports/rdkafka/CONTROL index 6d2d9c00f..a278915c8 100644 --- a/ports/rdkafka/CONTROL +++ b/ports/rdkafka/CONTROL @@ -1,4 +1,20 @@ Source: rdkafka Version: v1.0.0 Description: The Apache Kafka C/C++ library -Build-Depends: openssl, zlib, zstd +Default-Features: ssl + +Feature: lz4 +Description: Enable external LZ4 library support +Build-Depends: lz4 + +Feature: ssl +Description: Build with OpenSSL +Build-Depends: openssl + +Feature: zlib +Description: Build with zlib +Build-Depends: zlib + +Feature: zstd +Description: Build with zstd +Build-Depends: zstd diff --git a/ports/rdkafka/portfile.cmake b/ports/rdkafka/portfile.cmake index 17b2b18de..7db996bb4 100644 --- a/ports/rdkafka/portfile.cmake +++ b/ports/rdkafka/portfile.cmake @@ -10,6 +10,30 @@ vcpkg_from_github( string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) +if("lz4" IN_LIST FEATURES) + set(ENABLE_LZ4_EXT ON) +else() + set(ENABLE_LZ4_EXT OFF) +endif() + +if("ssl" IN_LIST FEATURES) + set(WITH_SSL ON) +else() + set(WITH_SSL OFF) +endif() + +if("zlib" IN_LIST FEATURES) + set(WITH_ZLIB ON) +else() + set(WITH_ZLIB OFF) +endif() + +if("zstd" IN_LIST FEATURES) + set(WITH_ZSTD ON) +else() + set(WITH_ZSTD OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -17,14 +41,20 @@ vcpkg_configure_cmake( -DRDKAFKA_BUILD_STATIC=${RDKAFKA_BUILD_STATIC} -DRDKAFKA_BUILD_EXAMPLES=OFF -DRDKAFKA_BUILD_TESTS=OFF + -DENABLE_LZ4_EXT=${ENABLE_LZ4_EXT} + -DWITH_SSL=${WITH_SSL} + -DWITH_ZLIB=${WITH_ZLIB} + -DWITH_ZSTD=${WITH_ZSTD} OPTIONS_DEBUG -DENABLE_DEVEL=ON -DENABLE_REFCNT_DEBUG=ON -DENABLE_SHAREDPTR_DEBUG=ON + -DWITHOUT_OPTIMIZATION=ON OPTIONS_RELEASE -DENABLE_DEVEL=OFF -DENABLE_REFCNT_DEBUG=OFF -DENABLE_SHAREDPTR_DEBUG=OFF + -DWITHOUT_OPTIMIZATION=OFF ) vcpkg_install_cmake() From d1b1ae1a102a801f28c0f7aee976dace396a95ff Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sun, 7 Apr 2019 20:13:27 +0800 Subject: [PATCH 0007/1066] [librdkafka] Rename package to librdkafka (#5927) --- ports/{rdkafka => librdkafka}/CONTROL | 4 ++-- ports/{rdkafka => librdkafka}/portfile.cmake | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) rename ports/{rdkafka => librdkafka}/CONTROL (85%) rename ports/{rdkafka => librdkafka}/portfile.cmake (90%) diff --git a/ports/rdkafka/CONTROL b/ports/librdkafka/CONTROL similarity index 85% rename from ports/rdkafka/CONTROL rename to ports/librdkafka/CONTROL index a278915c8..ceeb970f0 100644 --- a/ports/rdkafka/CONTROL +++ b/ports/librdkafka/CONTROL @@ -1,5 +1,5 @@ -Source: rdkafka -Version: v1.0.0 +Source: librdkafka +Version: v1.0.0-1 Description: The Apache Kafka C/C++ library Default-Features: ssl diff --git a/ports/rdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake similarity index 90% rename from ports/rdkafka/portfile.cmake rename to ports/librdkafka/portfile.cmake index 7db996bb4..ee008a14d 100644 --- a/ports/rdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -43,6 +43,7 @@ vcpkg_configure_cmake( -DRDKAFKA_BUILD_TESTS=OFF -DENABLE_LZ4_EXT=${ENABLE_LZ4_EXT} -DWITH_SSL=${WITH_SSL} + -DWITH_BUNDLED_SSL=OFF -DWITH_ZLIB=${WITH_ZLIB} -DWITH_ZSTD=${WITH_ZSTD} OPTIONS_DEBUG @@ -61,7 +62,10 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/RdKafka + TARGET_PATH share/rdkafka +) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include From f6ae18f51a0ba43baa20bf3dfb5f4f52acb46ecd Mon Sep 17 00:00:00 2001 From: myd7349 Date: Wed, 17 Apr 2019 08:15:33 +0800 Subject: [PATCH 0008/1066] [librdkafka] Update to 2019-04-16 --- ports/librdkafka/CONTROL | 2 +- ports/librdkafka/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/librdkafka/CONTROL b/ports/librdkafka/CONTROL index ceeb970f0..76b8e7683 100644 --- a/ports/librdkafka/CONTROL +++ b/ports/librdkafka/CONTROL @@ -1,5 +1,5 @@ Source: librdkafka -Version: v1.0.0-1 +Version: 2019-04-16 Description: The Apache Kafka C/C++ library Default-Features: ssl diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index ee008a14d..2f9446ad7 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edenhill/librdkafka - REF v1.0.0 - SHA512 15ac1e4c9042debf8d4df602ccdc5eccae3a37b305be24d724fcaffc3d1d0aafa708fc8e29d6af51f51ed6c7daf74b3041b8b9b0444e6702cd73479c8078859a + REF 384565a66b85efdce413d2e22f60e72f1b7d739a + SHA512 c6ba0f6246465526c3ecd7c23bf24466863a0fbe6c34eb7d89a6ee2d7b28a4e5daba0d85e3d5774f7c65c7b4e8c9c829a458f83f7540d480fed931c7fbffd5d2 HEAD_REF master ) From c89d08d1bafaa7d3c92e5b6eeeace885772eb6bd Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 30 Apr 2019 18:28:17 +0800 Subject: [PATCH 0009/1066] [librdkafka] Update to 2019-04-30 --- ports/librdkafka/CONTROL | 2 +- ports/librdkafka/FindZstd.cmake | 31 +++++++++++++++++++++++++++++++ ports/librdkafka/find_zstd.patch | 28 ++++++++++++++++++++++++++++ ports/librdkafka/portfile.cmake | 24 ++++++++++++++++++++++-- 4 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 ports/librdkafka/FindZstd.cmake create mode 100644 ports/librdkafka/find_zstd.patch diff --git a/ports/librdkafka/CONTROL b/ports/librdkafka/CONTROL index 76b8e7683..2612ead87 100644 --- a/ports/librdkafka/CONTROL +++ b/ports/librdkafka/CONTROL @@ -1,5 +1,5 @@ Source: librdkafka -Version: 2019-04-16 +Version: 2019-04-30 Description: The Apache Kafka C/C++ library Default-Features: ssl diff --git a/ports/librdkafka/FindZstd.cmake b/ports/librdkafka/FindZstd.cmake new file mode 100644 index 000000000..415f61324 --- /dev/null +++ b/ports/librdkafka/FindZstd.cmake @@ -0,0 +1,31 @@ +# +# - Try to find Facebook zstd library +# This will define +# ZSTD_FOUND +# ZSTD_INCLUDE_DIR +# ZSTD_LIBRARY +# + +find_path(ZSTD_INCLUDE_DIR NAMES zstd.h) + +find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd zstd_staticd) +find_library(ZSTD_LIBRARY_RELEASE NAMES zstd zstd_static) + +include(SelectLibraryConfigurations) +SELECT_LIBRARY_CONFIGURATIONS(ZSTD) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + ZSTD DEFAULT_MSG + ZSTD_LIBRARY ZSTD_INCLUDE_DIR +) + +if (ZSTD_FOUND) + message(STATUS "Found Zstd: ${ZSTD_LIBRARY}") +endif() + +mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARY) + + +# References: +# https://github.com/facebook/folly/blob/master/CMake/FindZstd.cmake diff --git a/ports/librdkafka/find_zstd.patch b/ports/librdkafka/find_zstd.patch new file mode 100644 index 000000000..8d14a5b73 --- /dev/null +++ b/ports/librdkafka/find_zstd.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 76e92b70..38b7d5a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,8 +55,8 @@ endif() + # } + + # ZSTD { +-find_library (ZSTD zstd) +-if(ZSTD) ++find_package(Zstd) ++if(ZSTD_FOUND) + set(with_zstd_default ON) + else() + set(with_zstd_default OFF) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index aecb3917..52ba9fa4 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -169,8 +169,6 @@ if(WITH_ZLIB) + endif() + + if(WITH_ZSTD) +- find_library (ZSTD_LIBRARY zstd) +- find_path (ZSTD_INCLUDE_DIR NAMES zstd.h) + target_link_libraries(rdkafka PUBLIC ${ZSTD_LIBRARY}) + target_include_directories(rdkafka PUBLIC ${ZSTD_INCLUDE_DIR}) + message(STATUS "Found ZSTD: ${ZSTD_LIBRARY}") diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index 2f9446ad7..3acdbbf53 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -3,9 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edenhill/librdkafka - REF 384565a66b85efdce413d2e22f60e72f1b7d739a - SHA512 c6ba0f6246465526c3ecd7c23bf24466863a0fbe6c34eb7d89a6ee2d7b28a4e5daba0d85e3d5774f7c65c7b4e8c9c829a458f83f7540d480fed931c7fbffd5d2 + REF 9b3fce7b882b43302fb983d0e0e555225e672f92 + SHA512 7edda198fb10a3a005fe4f47af55940051cdb7a350b8f06e7186e70ee9f3b44c7468134f42867303184a807a274507e4fa5b2f7997cd2fd5876993de04949140 HEAD_REF master + PATCHES + find_zstd.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) @@ -34,6 +36,11 @@ else() set(WITH_ZSTD OFF) endif() +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/FindZstd.cmake + DESTINATION ${SOURCE_PATH}/packaging/cmake/Modules +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -67,6 +74,19 @@ vcpkg_fixup_cmake_targets( TARGET_PATH share/rdkafka ) +if(ENABLE_LZ4_EXT) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/rdkafka/RdKafkaConfig.cmake + "find_dependency(LZ4)" + "include(\"\${CMAKE_CURRENT_LIST_DIR}/FindLZ4.cmake\")\n find_dependency(LZ4)" + ) +endif() + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/FindZstd.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/rdkafka +) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share From 6b2423eced39ac4190add8215c4bb64dbfa5c3e8 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 7 May 2019 08:13:10 +0800 Subject: [PATCH 0010/1066] [librdkafka] Update to 2019-05-07 --- ports/librdkafka/CONTROL | 2 +- ports/librdkafka/FindZstd.cmake | 31 ------------------ ports/librdkafka/find_zstd.patch | 28 ---------------- ports/librdkafka/portfile.cmake | 56 ++++++++++---------------------- ports/librdkafka/usage | 4 +++ 5 files changed, 23 insertions(+), 98 deletions(-) delete mode 100644 ports/librdkafka/FindZstd.cmake delete mode 100644 ports/librdkafka/find_zstd.patch create mode 100644 ports/librdkafka/usage diff --git a/ports/librdkafka/CONTROL b/ports/librdkafka/CONTROL index 2612ead87..398856e9e 100644 --- a/ports/librdkafka/CONTROL +++ b/ports/librdkafka/CONTROL @@ -1,5 +1,5 @@ Source: librdkafka -Version: 2019-04-30 +Version: 2019-05-07 Description: The Apache Kafka C/C++ library Default-Features: ssl diff --git a/ports/librdkafka/FindZstd.cmake b/ports/librdkafka/FindZstd.cmake deleted file mode 100644 index 415f61324..000000000 --- a/ports/librdkafka/FindZstd.cmake +++ /dev/null @@ -1,31 +0,0 @@ -# -# - Try to find Facebook zstd library -# This will define -# ZSTD_FOUND -# ZSTD_INCLUDE_DIR -# ZSTD_LIBRARY -# - -find_path(ZSTD_INCLUDE_DIR NAMES zstd.h) - -find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd zstd_staticd) -find_library(ZSTD_LIBRARY_RELEASE NAMES zstd zstd_static) - -include(SelectLibraryConfigurations) -SELECT_LIBRARY_CONFIGURATIONS(ZSTD) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( - ZSTD DEFAULT_MSG - ZSTD_LIBRARY ZSTD_INCLUDE_DIR -) - -if (ZSTD_FOUND) - message(STATUS "Found Zstd: ${ZSTD_LIBRARY}") -endif() - -mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARY) - - -# References: -# https://github.com/facebook/folly/blob/master/CMake/FindZstd.cmake diff --git a/ports/librdkafka/find_zstd.patch b/ports/librdkafka/find_zstd.patch deleted file mode 100644 index 8d14a5b73..000000000 --- a/ports/librdkafka/find_zstd.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 76e92b70..38b7d5a9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -55,8 +55,8 @@ endif() - # } - - # ZSTD { --find_library (ZSTD zstd) --if(ZSTD) -+find_package(Zstd) -+if(ZSTD_FOUND) - set(with_zstd_default ON) - else() - set(with_zstd_default OFF) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index aecb3917..52ba9fa4 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -169,8 +169,6 @@ if(WITH_ZLIB) - endif() - - if(WITH_ZSTD) -- find_library (ZSTD_LIBRARY zstd) -- find_path (ZSTD_INCLUDE_DIR NAMES zstd.h) - target_link_libraries(rdkafka PUBLIC ${ZSTD_LIBRARY}) - target_include_directories(rdkafka PUBLIC ${ZSTD_INCLUDE_DIR}) - message(STATUS "Found ZSTD: ${ZSTD_LIBRARY}") diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index 3acdbbf53..92d137b1f 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -3,43 +3,25 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edenhill/librdkafka - REF 9b3fce7b882b43302fb983d0e0e555225e672f92 - SHA512 7edda198fb10a3a005fe4f47af55940051cdb7a350b8f06e7186e70ee9f3b44c7468134f42867303184a807a274507e4fa5b2f7997cd2fd5876993de04949140 + REF 1f3203c8b647d865dffeb76c2af82ea34ca9b746 + SHA512 7e0a48142acfa886daaeec98bc304f41de1270075215ccc90e5a8dcd2c11222179ed6c68a353dae55fe8a47f8080e15f05d2ac0a86fa74a2103119a286257cba HEAD_REF master - PATCHES - find_zstd.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) -if("lz4" IN_LIST FEATURES) - set(ENABLE_LZ4_EXT ON) -else() - set(ENABLE_LZ4_EXT OFF) -endif() +macro(check_feature _feature_name _var) + if("${_feature_name}" IN_LIST FEATURES) + set(${_var} ON) + else() + set(${_var} OFF) + endif() +endmacro() -if("ssl" IN_LIST FEATURES) - set(WITH_SSL ON) -else() - set(WITH_SSL OFF) -endif() - -if("zlib" IN_LIST FEATURES) - set(WITH_ZLIB ON) -else() - set(WITH_ZLIB OFF) -endif() - -if("zstd" IN_LIST FEATURES) - set(WITH_ZSTD ON) -else() - set(WITH_ZSTD OFF) -endif() - -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/FindZstd.cmake - DESTINATION ${SOURCE_PATH}/packaging/cmake/Modules -) +check_feature(lz4 ENABLE_LZ4_EXT) +check_feature(ssl WITH_SSL) +check_feature(zlib WITH_ZLIB) +check_feature(zstd WITH_ZSTD) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -82,11 +64,6 @@ if(ENABLE_LZ4_EXT) ) endif() -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/FindZstd.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/rdkafka -) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share @@ -103,7 +80,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSES.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# Install usage +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) # CMake integration test -#vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +vcpkg_test_cmake(PACKAGE_NAME RdKafka) diff --git a/ports/librdkafka/usage b/ports/librdkafka/usage new file mode 100644 index 000000000..4f00a6a73 --- /dev/null +++ b/ports/librdkafka/usage @@ -0,0 +1,4 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: + + find_package(RdKafka CONFIG REQUIRED) + target_link_libraries(main PRIVATE RdKafka::rdkafka RdKafka::rdkafka++) From 6f691d7a9b1a03620aaffe4364b342b76bb5b10a Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 7 May 2019 19:20:05 +0800 Subject: [PATCH 0011/1066] [librdkafka] Update --- ports/librdkafka/CONTROL | 2 +- ports/librdkafka/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/librdkafka/CONTROL b/ports/librdkafka/CONTROL index 398856e9e..a1d1b64c6 100644 --- a/ports/librdkafka/CONTROL +++ b/ports/librdkafka/CONTROL @@ -1,5 +1,5 @@ Source: librdkafka -Version: 2019-05-07 +Version: 2019-05-07-1 Description: The Apache Kafka C/C++ library Default-Features: ssl diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index 92d137b1f..fb637cd1d 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edenhill/librdkafka - REF 1f3203c8b647d865dffeb76c2af82ea34ca9b746 - SHA512 7e0a48142acfa886daaeec98bc304f41de1270075215ccc90e5a8dcd2c11222179ed6c68a353dae55fe8a47f8080e15f05d2ac0a86fa74a2103119a286257cba + REF dc85ffc8068c18dfdf118666b4c78de1c7ac640b + SHA512 b21be356806125ab8bdb74de41eef2c56714cfd2003065be362d9fab7e177a07675e95a13ed6d7fbd3dc38502194000b0e378ff6c43c7d54a0234ada0df881eb HEAD_REF master ) From f1870ae02bedbaa5a501ddf3a7ba5d0a743a1053 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sat, 11 May 2019 12:16:24 +0800 Subject: [PATCH 0012/1066] [septag-sx] Add error message --- ports/septag-sx/CONTROL | 2 +- ports/septag-sx/portfile.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/septag-sx/CONTROL b/ports/septag-sx/CONTROL index 4c329f1a6..a9748b910 100644 --- a/ports/septag-sx/CONTROL +++ b/ports/septag-sx/CONTROL @@ -1,3 +1,3 @@ Source: septag-sx -Version: 2019-05-07 +Version: 2019-05-07-1 Description: Portable base library for C programmers, designed for performance and simplicity. diff --git a/ports/septag-sx/portfile.cmake b/ports/septag-sx/portfile.cmake index 0c2e85fa4..d77545134 100644 --- a/ports/septag-sx/portfile.cmake +++ b/ports/septag-sx/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if(TARGET_TRIPLET MATCHES "(uwp|arm)") + message(FATAL_ERROR "septag-sx doesn't support ${TARGET_TRIPLET} currently.") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO septag/sx From 2bf491b4264f07c0669fbe10d6e5d373215ae737 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Thu, 9 May 2019 19:10:42 +0800 Subject: [PATCH 0013/1066] [librdkafka] Fix ARM build error --- ports/librdkafka/CONTROL | 2 +- ports/librdkafka/fix-arm-msvc-build.patch | 157 ++++++++++++++++++++++ ports/librdkafka/portfile.cmake | 2 + 3 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 ports/librdkafka/fix-arm-msvc-build.patch diff --git a/ports/librdkafka/CONTROL b/ports/librdkafka/CONTROL index a1d1b64c6..5a652ec54 100644 --- a/ports/librdkafka/CONTROL +++ b/ports/librdkafka/CONTROL @@ -1,5 +1,5 @@ Source: librdkafka -Version: 2019-05-07-1 +Version: 2019-05-07-2 Description: The Apache Kafka C/C++ library Default-Features: ssl diff --git a/ports/librdkafka/fix-arm-msvc-build.patch b/ports/librdkafka/fix-arm-msvc-build.patch new file mode 100644 index 000000000..07600130b --- /dev/null +++ b/ports/librdkafka/fix-arm-msvc-build.patch @@ -0,0 +1,157 @@ +diff --git a/src/snappy.c b/src/snappy.c +index c3b6ea8a..e74e6903 100644 +--- a/src/snappy.c ++++ b/src/snappy.c +@@ -63,9 +63,6 @@ + + #include "rd.h" + +-#ifdef _MSC_VER +-#define inline __inline +-#endif + + #define CRASH_UNLESS(x) BUG_ON(!(x)) + #define CHECK(cond) CRASH_UNLESS(cond) +@@ -76,12 +73,12 @@ + #define CHECK_LT(a, b) CRASH_UNLESS((a) < (b)) + #define CHECK_GT(a, b) CRASH_UNLESS((a) > (b)) + +-#define UNALIGNED_LOAD16(_p) get_unaligned((u16 *)(_p)) +-#define UNALIGNED_LOAD32(_p) get_unaligned((u32 *)(_p)) ++#define UNALIGNED_LOAD16(_p) get_unaligned16((u16 *)(_p)) ++#define UNALIGNED_LOAD32(_p) get_unaligned32((u32 *)(_p)) + #define UNALIGNED_LOAD64(_p) get_unaligned64((u64 *)(_p)) + +-#define UNALIGNED_STORE16(_p, _val) put_unaligned(_val, (u16 *)(_p)) +-#define UNALIGNED_STORE32(_p, _val) put_unaligned(_val, (u32 *)(_p)) ++#define UNALIGNED_STORE16(_p, _val) put_unaligned16(_val, (u16 *)(_p)) ++#define UNALIGNED_STORE32(_p, _val) put_unaligned32(_val, (u32 *)(_p)) + #define UNALIGNED_STORE64(_p, _val) put_unaligned64(_val, (u64 *)(_p)) + + /* +diff --git a/src/snappy_compat.h b/src/snappy_compat.h +index 77606552..21e0ea6b 100644 +--- a/src/snappy_compat.h ++++ b/src/snappy_compat.h +@@ -44,23 +44,65 @@ struct iovec { + }; + #endif + +-#define get_unaligned_memcpy(x) ({ \ +- typeof(*(x)) _ret; \ +- memcpy(&_ret, (x), sizeof(*(x))); \ +- _ret; }) +-#define put_unaligned_memcpy(v,x) ({ \ +- typeof((v)) _v = (v); \ +- memcpy((x), &_v, sizeof(*(x))); }) ++#ifdef _MSC_VER ++#define inline __inline ++#endif ++ ++typedef unsigned char u8; ++typedef unsigned short u16; ++typedef unsigned u32; ++typedef unsigned long long u64; ++ ++ ++static inline u16 get_unaligned16_memcpy(const void *p) ++{ ++ u16 t; ++ memcpy(&t, p, sizeof t); ++ return t; ++} ++ ++static inline u32 get_unaligned32_memcpy(const void *p) ++{ ++ u32 t; ++ memcpy(&t, p, sizeof t); ++ return t; ++} ++ ++static inline u64 get_unaligned64_memcpy(const void *p) ++{ ++ u64 t; ++ memcpy(&t, p, sizeof t); ++ return t; ++} ++ ++static inline void put_unaligned16_memcpy(u16 v, void *p) ++{ ++ memcpy(p, &v, sizeof v); ++} ++ ++static inline void put_unaligned32_memcpy(u32 v, void *p) ++{ ++ memcpy(p, &v, sizeof v); ++} ++ ++static inline void put_unaligned64_memcpy(u64 v, void *p) ++{ ++ memcpy(p, &v, sizeof v); ++} + + #define get_unaligned_direct(x) (*(x)) + #define put_unaligned_direct(v,x) (*(x) = (v)) + + // Potentially unaligned loads and stores. +-// x86 and PowerPC can simply do these loads and stores native. +-#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) +- +-#define get_unaligned get_unaligned_direct +-#define put_unaligned put_unaligned_direct ++// x86, PowerPC, and ARM64 can simply do these loads and stores native. ++#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || \ ++ defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ ++ defined(__aarch64__) ++ ++#define get_unaligned16 get_unaligned_direct ++#define put_unaligned16 put_unaligned_direct ++#define get_unaligned32 get_unaligned_direct ++#define put_unaligned32 put_unaligned_direct + #define get_unaligned64 get_unaligned_direct + #define put_unaligned64 put_unaligned_direct + +@@ -86,29 +128,29 @@ struct iovec { + !defined(__ARM_ARCH_6ZK__) && \ + !defined(__ARM_ARCH_6T2__) + +-#define get_unaligned get_unaligned_direct +-#define put_unaligned put_unaligned_direct +-#define get_unaligned64 get_unaligned_memcpy +-#define put_unaligned64 put_unaligned_memcpy ++#define get_unaligned16 get_unaligned_direct ++#define put_unaligned16 put_unaligned_direct ++#define get_unaligned32 get_unaligned_direct ++#define put_unaligned32 put_unaligned_direct ++#define get_unaligned64 get_unaligned64_memcpy ++#define put_unaligned64 put_unaligned64_memcpy + + // These macroses are provided for architectures that don't support + // unaligned loads and stores. + #else + +-#define get_unaligned get_unaligned_memcpy +-#define put_unaligned put_unaligned_memcpy +-#define get_unaligned64 get_unaligned_memcpy +-#define put_unaligned64 put_unaligned_memcpy ++#define get_unaligned16 get_unaligned16_memcpy ++#define put_unaligned16 put_unaligned16_memcpy ++#define get_unaligned32 get_unaligned32_memcpy ++#define put_unaligned32 put_unaligned32_memcpy ++#define get_unaligned64 get_unaligned64_memcpy ++#define put_unaligned64 put_unaligned64_memcpy + + #endif + +-#define get_unaligned_le32(x) (le32toh(get_unaligned((u32 *)(x)))) +-#define put_unaligned_le16(v,x) (put_unaligned(htole16(v), (u16 *)(x))) ++#define get_unaligned_le32(x) (le32toh(get_unaligned32((u32 *)(x)))) ++#define put_unaligned_le16(v,x) (put_unaligned16(htole16(v), (u16 *)(x))) + +-typedef unsigned char u8; +-typedef unsigned short u16; +-typedef unsigned u32; +-typedef unsigned long long u64; + + #ifdef _MSC_VER + #define BUG_ON(x) do { if (unlikely((x))) abort(); } while (0) diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index fb637cd1d..d5beca2ec 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_github( REF dc85ffc8068c18dfdf118666b4c78de1c7ac640b SHA512 b21be356806125ab8bdb74de41eef2c56714cfd2003065be362d9fab7e177a07675e95a13ed6d7fbd3dc38502194000b0e378ff6c43c7d54a0234ada0df881eb HEAD_REF master + PATCHES + fix-arm-msvc-build ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) From 5495513ef45eb97d8453d15007714f1b4d3391f9 Mon Sep 17 00:00:00 2001 From: Andrei Lebedev Date: Sat, 18 May 2019 02:27:26 +0300 Subject: [PATCH 0014/1066] [openssl-unix] Shared library support Signed-off-by: Andrei Lebedev --- ports/openssl-unix/CMakeLists.txt | 22 ++++++++++++++++++++-- ports/openssl-unix/CONTROL | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ports/openssl-unix/CMakeLists.txt b/ports/openssl-unix/CMakeLists.txt index e8d916392..f9d94b1a2 100644 --- a/ports/openssl-unix/CMakeLists.txt +++ b/ports/openssl-unix/CMakeLists.txt @@ -76,9 +76,27 @@ file(WRITE "${BUILDDIR}/Configure" "${_contents}") if(BUILD_SHARED_LIBS) set(SHARED shared) + file(STRINGS "${BUILDDIR}/crypto/opensslv.h" SHLIB_VERSION + REGEX "^#[\t ]*define[\t ]+SHLIB_VERSION_NUMBER[\t ]+\".*\".*") + string(REGEX REPLACE "^.*SHLIB_VERSION_NUMBER[\t ]+\"([^\"]*)\".*$" "\\1" + SHLIB_VERSION "${SHLIB_VERSION}") + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(LIB_EXT dylib) + set(LIB_EXTS ${SHLIB_VERSION}.${LIB_EXT}) + else() + set(LIB_EXT so) + set(LIB_EXTS ${LIB_EXT}.${SHLIB_VERSION}) + endif() + list(APPEND LIB_EXTS ${LIB_EXT}) else() set(SHARED no-shared) + set(LIB_EXTS a) endif() +foreach(lib ssl crypto) + foreach(ext ${LIB_EXTS}) + list(APPEND INSTALL_LIBS "${BUILDDIR}/lib${lib}.${ext}") + endforeach() +endforeach() if(CMAKE_HOST_WIN32) set(ENV_COMMAND set) @@ -130,10 +148,10 @@ add_custom_target(build_libs ALL VERBATIM WORKING_DIRECTORY "${BUILDDIR}" DEPENDS depend - BYPRODUCTS "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a" + BYPRODUCTS ${INSTALL_LIBS} ) install( - FILES "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a" + FILES ${INSTALL_LIBS} DESTINATION lib ) diff --git a/ports/openssl-unix/CONTROL b/ports/openssl-unix/CONTROL index 59f686133..e5873f6cb 100644 --- a/ports/openssl-unix/CONTROL +++ b/ports/openssl-unix/CONTROL @@ -1,3 +1,3 @@ Source: openssl-unix -Version: 1.0.2q +Version: 1.0.2q-1 Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. From a7ac12c90afed0a13e3b24d509927d2fca506115 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Fri, 24 May 2019 18:58:15 +0800 Subject: [PATCH 0015/1066] [librdkafka] Fix patch file name --- ports/librdkafka/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index d5beca2ec..216b90ced 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -7,7 +7,7 @@ vcpkg_from_github( SHA512 b21be356806125ab8bdb74de41eef2c56714cfd2003065be362d9fab7e177a07675e95a13ed6d7fbd3dc38502194000b0e378ff6c43c7d54a0234ada0df881eb HEAD_REF master PATCHES - fix-arm-msvc-build + fix-arm-msvc-build.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) From 8b64e981fb7e863e6850cdd6626286e474db856a Mon Sep 17 00:00:00 2001 From: myd7349 Date: Mon, 27 May 2019 19:52:26 +0800 Subject: [PATCH 0016/1066] [librdkafka] Turn on tests temporarily --- ports/librdkafka/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index 216b90ced..0cba857b9 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -31,7 +31,7 @@ vcpkg_configure_cmake( OPTIONS -DRDKAFKA_BUILD_STATIC=${RDKAFKA_BUILD_STATIC} -DRDKAFKA_BUILD_EXAMPLES=OFF - -DRDKAFKA_BUILD_TESTS=OFF + -DRDKAFKA_BUILD_TESTS=ON -DENABLE_LZ4_EXT=${ENABLE_LZ4_EXT} -DWITH_SSL=${WITH_SSL} -DWITH_BUNDLED_SSL=OFF From 7cd35529736837e2e74dad231717bda76327ac79 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 28 May 2019 08:21:20 +0800 Subject: [PATCH 0017/1066] [librdkafka] Update to 2019-05-27 --- ports/librdkafka/CONTROL | 2 +- ports/librdkafka/fix-arm-msvc-build.patch | 157 ---------------------- ports/librdkafka/portfile.cmake | 8 +- 3 files changed, 4 insertions(+), 163 deletions(-) delete mode 100644 ports/librdkafka/fix-arm-msvc-build.patch diff --git a/ports/librdkafka/CONTROL b/ports/librdkafka/CONTROL index 5a652ec54..dcc15f8ec 100644 --- a/ports/librdkafka/CONTROL +++ b/ports/librdkafka/CONTROL @@ -1,5 +1,5 @@ Source: librdkafka -Version: 2019-05-07-2 +Version: 2019-05-27 Description: The Apache Kafka C/C++ library Default-Features: ssl diff --git a/ports/librdkafka/fix-arm-msvc-build.patch b/ports/librdkafka/fix-arm-msvc-build.patch deleted file mode 100644 index 07600130b..000000000 --- a/ports/librdkafka/fix-arm-msvc-build.patch +++ /dev/null @@ -1,157 +0,0 @@ -diff --git a/src/snappy.c b/src/snappy.c -index c3b6ea8a..e74e6903 100644 ---- a/src/snappy.c -+++ b/src/snappy.c -@@ -63,9 +63,6 @@ - - #include "rd.h" - --#ifdef _MSC_VER --#define inline __inline --#endif - - #define CRASH_UNLESS(x) BUG_ON(!(x)) - #define CHECK(cond) CRASH_UNLESS(cond) -@@ -76,12 +73,12 @@ - #define CHECK_LT(a, b) CRASH_UNLESS((a) < (b)) - #define CHECK_GT(a, b) CRASH_UNLESS((a) > (b)) - --#define UNALIGNED_LOAD16(_p) get_unaligned((u16 *)(_p)) --#define UNALIGNED_LOAD32(_p) get_unaligned((u32 *)(_p)) -+#define UNALIGNED_LOAD16(_p) get_unaligned16((u16 *)(_p)) -+#define UNALIGNED_LOAD32(_p) get_unaligned32((u32 *)(_p)) - #define UNALIGNED_LOAD64(_p) get_unaligned64((u64 *)(_p)) - --#define UNALIGNED_STORE16(_p, _val) put_unaligned(_val, (u16 *)(_p)) --#define UNALIGNED_STORE32(_p, _val) put_unaligned(_val, (u32 *)(_p)) -+#define UNALIGNED_STORE16(_p, _val) put_unaligned16(_val, (u16 *)(_p)) -+#define UNALIGNED_STORE32(_p, _val) put_unaligned32(_val, (u32 *)(_p)) - #define UNALIGNED_STORE64(_p, _val) put_unaligned64(_val, (u64 *)(_p)) - - /* -diff --git a/src/snappy_compat.h b/src/snappy_compat.h -index 77606552..21e0ea6b 100644 ---- a/src/snappy_compat.h -+++ b/src/snappy_compat.h -@@ -44,23 +44,65 @@ struct iovec { - }; - #endif - --#define get_unaligned_memcpy(x) ({ \ -- typeof(*(x)) _ret; \ -- memcpy(&_ret, (x), sizeof(*(x))); \ -- _ret; }) --#define put_unaligned_memcpy(v,x) ({ \ -- typeof((v)) _v = (v); \ -- memcpy((x), &_v, sizeof(*(x))); }) -+#ifdef _MSC_VER -+#define inline __inline -+#endif -+ -+typedef unsigned char u8; -+typedef unsigned short u16; -+typedef unsigned u32; -+typedef unsigned long long u64; -+ -+ -+static inline u16 get_unaligned16_memcpy(const void *p) -+{ -+ u16 t; -+ memcpy(&t, p, sizeof t); -+ return t; -+} -+ -+static inline u32 get_unaligned32_memcpy(const void *p) -+{ -+ u32 t; -+ memcpy(&t, p, sizeof t); -+ return t; -+} -+ -+static inline u64 get_unaligned64_memcpy(const void *p) -+{ -+ u64 t; -+ memcpy(&t, p, sizeof t); -+ return t; -+} -+ -+static inline void put_unaligned16_memcpy(u16 v, void *p) -+{ -+ memcpy(p, &v, sizeof v); -+} -+ -+static inline void put_unaligned32_memcpy(u32 v, void *p) -+{ -+ memcpy(p, &v, sizeof v); -+} -+ -+static inline void put_unaligned64_memcpy(u64 v, void *p) -+{ -+ memcpy(p, &v, sizeof v); -+} - - #define get_unaligned_direct(x) (*(x)) - #define put_unaligned_direct(v,x) (*(x) = (v)) - - // Potentially unaligned loads and stores. --// x86 and PowerPC can simply do these loads and stores native. --#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) -- --#define get_unaligned get_unaligned_direct --#define put_unaligned put_unaligned_direct -+// x86, PowerPC, and ARM64 can simply do these loads and stores native. -+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || \ -+ defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ -+ defined(__aarch64__) -+ -+#define get_unaligned16 get_unaligned_direct -+#define put_unaligned16 put_unaligned_direct -+#define get_unaligned32 get_unaligned_direct -+#define put_unaligned32 put_unaligned_direct - #define get_unaligned64 get_unaligned_direct - #define put_unaligned64 put_unaligned_direct - -@@ -86,29 +128,29 @@ struct iovec { - !defined(__ARM_ARCH_6ZK__) && \ - !defined(__ARM_ARCH_6T2__) - --#define get_unaligned get_unaligned_direct --#define put_unaligned put_unaligned_direct --#define get_unaligned64 get_unaligned_memcpy --#define put_unaligned64 put_unaligned_memcpy -+#define get_unaligned16 get_unaligned_direct -+#define put_unaligned16 put_unaligned_direct -+#define get_unaligned32 get_unaligned_direct -+#define put_unaligned32 put_unaligned_direct -+#define get_unaligned64 get_unaligned64_memcpy -+#define put_unaligned64 put_unaligned64_memcpy - - // These macroses are provided for architectures that don't support - // unaligned loads and stores. - #else - --#define get_unaligned get_unaligned_memcpy --#define put_unaligned put_unaligned_memcpy --#define get_unaligned64 get_unaligned_memcpy --#define put_unaligned64 put_unaligned_memcpy -+#define get_unaligned16 get_unaligned16_memcpy -+#define put_unaligned16 put_unaligned16_memcpy -+#define get_unaligned32 get_unaligned32_memcpy -+#define put_unaligned32 put_unaligned32_memcpy -+#define get_unaligned64 get_unaligned64_memcpy -+#define put_unaligned64 put_unaligned64_memcpy - - #endif - --#define get_unaligned_le32(x) (le32toh(get_unaligned((u32 *)(x)))) --#define put_unaligned_le16(v,x) (put_unaligned(htole16(v), (u16 *)(x))) -+#define get_unaligned_le32(x) (le32toh(get_unaligned32((u32 *)(x)))) -+#define put_unaligned_le16(v,x) (put_unaligned16(htole16(v), (u16 *)(x))) - --typedef unsigned char u8; --typedef unsigned short u16; --typedef unsigned u32; --typedef unsigned long long u64; - - #ifdef _MSC_VER - #define BUG_ON(x) do { if (unlikely((x))) abort(); } while (0) diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index 0cba857b9..ef344b15f 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -3,11 +3,9 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edenhill/librdkafka - REF dc85ffc8068c18dfdf118666b4c78de1c7ac640b - SHA512 b21be356806125ab8bdb74de41eef2c56714cfd2003065be362d9fab7e177a07675e95a13ed6d7fbd3dc38502194000b0e378ff6c43c7d54a0234ada0df881eb + REF 0d525ba1252074732aac575f88f04831f2656b8f + SHA512 f86d2a150b7c835b7de1a524d02a93ee3fcf4ff4f5f5b52fd49d6802bcb22f9829e562e8faef0842af7b4617aa49925622366f8290ada824be2602bf728dbdf0 HEAD_REF master - PATCHES - fix-arm-msvc-build.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) @@ -31,7 +29,7 @@ vcpkg_configure_cmake( OPTIONS -DRDKAFKA_BUILD_STATIC=${RDKAFKA_BUILD_STATIC} -DRDKAFKA_BUILD_EXAMPLES=OFF - -DRDKAFKA_BUILD_TESTS=ON + -DRDKAFKA_BUILD_TESTS=OFF -DENABLE_LZ4_EXT=${ENABLE_LZ4_EXT} -DWITH_SSL=${WITH_SSL} -DWITH_BUNDLED_SSL=OFF From bb111f26452058570714075f8cf4c58a53ad1961 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Tue, 28 May 2019 15:37:07 +0200 Subject: [PATCH 0018/1066] Add libraqm --- ports/libraqm/CMakeLists.txt | 34 +++++++++++++++++++++++++++++++++ ports/libraqm/CONTROL | 4 ++++ ports/libraqm/FindFribidi.cmake | 12 ++++++++++++ ports/libraqm/portfile.cmake | 29 ++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 ports/libraqm/CMakeLists.txt create mode 100644 ports/libraqm/CONTROL create mode 100644 ports/libraqm/FindFribidi.cmake create mode 100644 ports/libraqm/portfile.cmake diff --git a/ports/libraqm/CMakeLists.txt b/ports/libraqm/CMakeLists.txt new file mode 100644 index 000000000..18d1a776b --- /dev/null +++ b/ports/libraqm/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.11) + +project(raqm) + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_MODULE_PATH}") + +find_package(Freetype REQUIRED) +find_package(Fribidi REQUIRED) +find_package(harfbuzz CONFIG REQUIRED) + +find_path(HARFBUZZ_INCLUDE_DIRS + NAMES hb.h + PATH_SUFFIXES harfbuzz) +find_path(FREETYPE_ADDITIONAL_INCLUDE_DIRS NAMES ft2build.h) +add_library(raqm ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.c ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h) + +target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_ADDITIONAL_INCLUDE_DIRS}) +target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_INCLUDE_DIRS}) +target_include_directories(raqm SYSTEM PUBLIC ${HARFBUZZ_INCLUDE_DIRS}) +target_include_directories(raqm SYSTEM PUBLIC ${FRIBIDI_INCLUDE_DIR}) + +target_link_libraries(raqm PRIVATE Freetype::Freetype) +target_link_libraries(raqm PRIVATE harfbuzz::harfbuzz ${FRIBIDI_LIBRARY}) + +install(TARGETS raqm + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +set(RAQM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") +set(RAQM_LIBRARY raqm) +set(RAQM_LIBRARIES ${HARFBUZZ_LIBRARY} ${FRIBIDI_LIBRARY} ${RAQM_LIBRARY}) +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) \ No newline at end of file diff --git a/ports/libraqm/CONTROL b/ports/libraqm/CONTROL new file mode 100644 index 000000000..131527a4a --- /dev/null +++ b/ports/libraqm/CONTROL @@ -0,0 +1,4 @@ +Source: libraqm +Version: 0.6.0 +Description: A library for complex text layout +Build-Depends: freetype, harfbuzz, fribidi \ No newline at end of file diff --git a/ports/libraqm/FindFribidi.cmake b/ports/libraqm/FindFribidi.cmake new file mode 100644 index 000000000..a12bdb60e --- /dev/null +++ b/ports/libraqm/FindFribidi.cmake @@ -0,0 +1,12 @@ +find_path(FRIBIDI_INCLUDE_DIR + NAMES fribidi/fribidi.h) + +set(FRIBIDI_INCLUDE_DIR "${FRIBIDI_INCLUDE_DIR}/fribidi") +find_library(FRIBIDI_LIBRARY NAMES fribidi) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(FriBidi + FOUND_VAR FRIBIDI_FOUND + REQUIRED_VARS FRIBIDI_LIBRARY FRIBIDI_INCLUDE_DIR + VERSION_VAR FRIBIDI_VERSION_STRING +) \ No newline at end of file diff --git a/ports/libraqm/portfile.cmake b/ports/libraqm/portfile.cmake new file mode 100644 index 000000000..198e4b6eb --- /dev/null +++ b/ports/libraqm/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO HOST-Oman/libraqm + REF v0.6.0 + SHA512 cd223d97b80e9d2cf26a5b68fbb84a87e53df819f12ffd06f84f1786a2207b34828d0888058a40c1d89a1466bb68b75dd326e25415afab029d51e1ed98f6a924 +HEAD_REF master) + +file(COPY ${CURRENT_PORT_DIR}/FindFribidi.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraqm RENAME copyright) + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME raqm) From 45e57f319657222eda39891fba73cb51b2cf3469 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Thu, 30 May 2019 13:30:16 -0700 Subject: [PATCH 0019/1066] [libraqm] Whitespace changes to force rebuild --- ports/libraqm/CMakeLists.txt | 2 +- ports/libraqm/portfile.cmake | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/libraqm/CMakeLists.txt b/ports/libraqm/CMakeLists.txt index 18d1a776b..f50153e63 100644 --- a/ports/libraqm/CMakeLists.txt +++ b/ports/libraqm/CMakeLists.txt @@ -31,4 +31,4 @@ install(TARGETS raqm set(RAQM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") set(RAQM_LIBRARY raqm) set(RAQM_LIBRARIES ${HARFBUZZ_LIBRARY} ${FRIBIDI_LIBRARY} ${RAQM_LIBRARY}) -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) \ No newline at end of file +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/libraqm/portfile.cmake b/ports/libraqm/portfile.cmake index 198e4b6eb..0978bd013 100644 --- a/ports/libraqm/portfile.cmake +++ b/ports/libraqm/portfile.cmake @@ -1,4 +1,5 @@ include(vcpkg_common_functions) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -6,7 +7,7 @@ vcpkg_from_github( REPO HOST-Oman/libraqm REF v0.6.0 SHA512 cd223d97b80e9d2cf26a5b68fbb84a87e53df819f12ffd06f84f1786a2207b34828d0888058a40c1d89a1466bb68b75dd326e25415afab029d51e1ed98f6a924 -HEAD_REF master) + HEAD_REF master) file(COPY ${CURRENT_PORT_DIR}/FindFribidi.cmake DESTINATION ${SOURCE_PATH}) file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -15,7 +16,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DCURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR} + -DCURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR} ) vcpkg_install_cmake() From a7a5dcd0e0ed213ef2dde5a4969e704dc6661ff3 Mon Sep 17 00:00:00 2001 From: the-j0k3r <31389848+the-j0k3r@users.noreply.github.com> Date: Tue, 11 Jun 2019 09:57:10 +0100 Subject: [PATCH 0020/1066] [openssl] unix/windows bump to 1.0.2s --- ports/openssl-unix/CONTROL | 2 +- ports/openssl-unix/portfile.cmake | 4 ++-- ports/openssl-windows/CONTROL | 2 +- ports/openssl-windows/portfile.cmake | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/openssl-unix/CONTROL b/ports/openssl-unix/CONTROL index 59f686133..4b6ec7405 100644 --- a/ports/openssl-unix/CONTROL +++ b/ports/openssl-unix/CONTROL @@ -1,3 +1,3 @@ Source: openssl-unix -Version: 1.0.2q +Version: 1.0.2s Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl-unix/portfile.cmake b/ports/openssl-unix/portfile.cmake index b0064cdf4..df9b6b69f 100644 --- a/ports/openssl-unix/portfile.cmake +++ b/ports/openssl-unix/portfile.cmake @@ -3,14 +3,14 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAM endif() include(vcpkg_common_functions) -set(OPENSSL_VERSION 1.0.2q) +set(OPENSSL_VERSION 1.0.2s) vcpkg_find_acquire_program(PERL) vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 403e6cad42db3ba860c3fa4fa81c1b7b02f0b873259e5c19a7fc8e42de0854602555f1b1ca74f4e3a7737a4cbd3aac063061e628ec86534586500819fae7fec0 + SHA512 9f745452c4f777df694158e95003cde78a2cf8199bc481a563ec36644664c3c1415a774779b9791dd18f2aeb57fa1721cb52b3db12d025955e970071d5b66d2a ) vcpkg_extract_source_archive_ex( diff --git a/ports/openssl-windows/CONTROL b/ports/openssl-windows/CONTROL index bdbf764ab..33c30e638 100644 --- a/ports/openssl-windows/CONTROL +++ b/ports/openssl-windows/CONTROL @@ -1,3 +1,3 @@ Source: openssl-windows -Version: 1.0.2q-2 +Version: 1.0.2s-1 Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl-windows/portfile.cmake b/ports/openssl-windows/portfile.cmake index b5e505a3d..21191681d 100644 --- a/ports/openssl-windows/portfile.cmake +++ b/ports/openssl-windows/portfile.cmake @@ -3,7 +3,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME) endif() include(vcpkg_common_functions) -set(OPENSSL_VERSION 1.0.2q) +set(OPENSSL_VERSION 1.0.2s) vcpkg_find_acquire_program(PERL) @@ -13,7 +13,7 @@ set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") vcpkg_download_distfile(ARCHIVE URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 403e6cad42db3ba860c3fa4fa81c1b7b02f0b873259e5c19a7fc8e42de0854602555f1b1ca74f4e3a7737a4cbd3aac063061e628ec86534586500819fae7fec0 + SHA512 9f745452c4f777df694158e95003cde78a2cf8199bc481a563ec36644664c3c1415a774779b9791dd18f2aeb57fa1721cb52b3db12d025955e970071d5b66d2a ) vcpkg_extract_source_archive_ex( From 874eadc574b94a05607a8408958401a524c10447 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Tue, 11 Jun 2019 13:39:40 -0700 Subject: [PATCH 0021/1066] [harfbuzz] Propagate dependency on glib downstream --- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 133d0bc0e..d0e544d7a 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,5 +1,5 @@ Source: harfbuzz -Version: 2.5.1 +Version: 2.5.1-1 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, ragel, gettext (osx) Default-Features: ucdn diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index d28bd656f..08b20f270 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -68,9 +68,22 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() + vcpkg_fixup_cmake_targets(CONFIG_PATH share/harfbuzz TARGET_PATH share/harfbuzz) + vcpkg_copy_pdbs() +if (HAVE_GLIB) + # Propagate dependency on glib downstream + file(READ "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" _contents) + file(WRITE "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-glib CONFIG) + +${_contents} +") +endif() + # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz RENAME copyright) From 35cb935cbaee60baaf66fc82a73246561b092876 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Wed, 12 Jun 2019 15:23:32 -0700 Subject: [PATCH 0022/1066] [fribidi] Force rebuild on CI --- ports/fribidi/portfile.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/fribidi/portfile.cmake b/ports/fribidi/portfile.cmake index ec5dc1553..5b45a17b1 100644 --- a/ports/fribidi/portfile.cmake +++ b/ports/fribidi/portfile.cmake @@ -5,12 +5,15 @@ vcpkg_from_github( REPO fribidi/fribidi REF 58c6cb390a9a18c98b2cbaac555d8ea9352a9e4f SHA512 1ec9c19faa87886786ce1589e2c66cab173b48e34d0e43487becc8606001f21f6ed17d0abd1c322fbbcaeb96a47ed882cad228be2e9beb019020ca2a475fc298 -HEAD_REF master) + HEAD_REF master +) -vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH} +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} OPTIONS -Ddocs=false - --backend=ninja) + --backend=ninja +) vcpkg_install_meson() vcpkg_copy_pdbs() @@ -28,4 +31,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fribidi RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fribidi RENAME copyright) From da4fd28a025119b020d04973b937fa9131ddee6f Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Wed, 12 Jun 2019 15:33:39 -0700 Subject: [PATCH 0023/1066] [libraqm] Force CI build --- ports/harfbuzz/portfile.cmake | 2 ++ ports/libraqm/portfile.cmake | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 08b20f270..48cfaf1b7 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -17,9 +17,11 @@ vcpkg_from_github( ) file(READ ${SOURCE_PATH}/CMakeLists.txt _contents) + if("${_contents}" MATCHES "include \\(FindFreetype\\)") message(FATAL_ERROR "Harfbuzz's cmake must not directly include() FindFreetype.") endif() + if("${_contents}" MATCHES "find_library\\(GLIB_LIBRARIES") message(FATAL_ERROR "Harfbuzz's cmake must not directly find_library() glib.") endif() diff --git a/ports/libraqm/portfile.cmake b/ports/libraqm/portfile.cmake index 0978bd013..067f63dde 100644 --- a/ports/libraqm/portfile.cmake +++ b/ports/libraqm/portfile.cmake @@ -7,7 +7,8 @@ vcpkg_from_github( REPO HOST-Oman/libraqm REF v0.6.0 SHA512 cd223d97b80e9d2cf26a5b68fbb84a87e53df819f12ffd06f84f1786a2207b34828d0888058a40c1d89a1466bb68b75dd326e25415afab029d51e1ed98f6a924 - HEAD_REF master) + HEAD_REF master +) file(COPY ${CURRENT_PORT_DIR}/FindFribidi.cmake DESTINATION ${SOURCE_PATH}) file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) From 3efdcef0e62aa6df7ff9088c001cff8d47304386 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Fri, 14 Jun 2019 08:04:44 +0800 Subject: [PATCH 0024/1066] [librdkafka] Update to 2019-06-13 --- ports/librdkafka/CONTROL | 5 +++-- ports/librdkafka/fix-arm64.patch | 21 +++++++++++++++++++++ ports/librdkafka/portfile.cmake | 6 ++++-- 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 ports/librdkafka/fix-arm64.patch diff --git a/ports/librdkafka/CONTROL b/ports/librdkafka/CONTROL index dcc15f8ec..2c8346a12 100644 --- a/ports/librdkafka/CONTROL +++ b/ports/librdkafka/CONTROL @@ -1,6 +1,7 @@ Source: librdkafka -Version: 2019-05-27 -Description: The Apache Kafka C/C++ library +Version: 2019-06-13 +Description: The Apache Kafka C/C++ library +Homepage: https://github.com/edenhill/librdkafka Default-Features: ssl Feature: lz4 diff --git a/ports/librdkafka/fix-arm64.patch b/ports/librdkafka/fix-arm64.patch new file mode 100644 index 000000000..6a7750cec --- /dev/null +++ b/ports/librdkafka/fix-arm64.patch @@ -0,0 +1,21 @@ +diff --git a/src/snappy_compat.h b/src/snappy_compat.h +index acda21ec..bf2fe4c7 100644 +--- a/src/snappy_compat.h ++++ b/src/snappy_compat.h +@@ -89,7 +89,7 @@ struct iovec { + // x86, PowerPC, and ARM64 can simply do these loads and stores native. + #if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || \ + defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ +- defined(__aarch64__) ++ defined(__arm64) || defined(__aarch64__) || defined(__AARCH64EL__) || defined(_M_ARM64) + + #define get_unaligned get_unaligned_direct + #define put_unaligned put_unaligned_direct +@@ -115,6 +115,7 @@ struct iovec { + !defined(__ARM_ARCH_6J__) && \ + !defined(__ARM_ARCH_6K__) && \ + !defined(__ARM_ARCH_6Z__) && \ ++ !defined(__ARM_ARCH_6KZ__) && \ + !defined(__ARM_ARCH_6ZK__) && \ + !defined(__ARM_ARCH_6T2__) + diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index ef344b15f..1069aa234 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -3,9 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edenhill/librdkafka - REF 0d525ba1252074732aac575f88f04831f2656b8f - SHA512 f86d2a150b7c835b7de1a524d02a93ee3fcf4ff4f5f5b52fd49d6802bcb22f9829e562e8faef0842af7b4617aa49925622366f8290ada824be2602bf728dbdf0 + REF b25436e6325e7c941eaed1d80a3ed65b6f404e47 + SHA512 4de86fb14f932a67569cd79f924182559cb9bcc957635c36be493ec3233981755ff751982e48f6999fac50acb153f5c28a23e30538af1a2ad69af87be606a81f HEAD_REF master + PATCHES + fix-arm64.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) From 989d0497025e59c9f9946bb6c7b1c742604bb589 Mon Sep 17 00:00:00 2001 From: Norbert Nemec Date: Wed, 19 Jun 2019 22:32:39 +0200 Subject: [PATCH 0025/1066] mesonbuild - Update to 0.51.0 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 451f4bcd3..024840223 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -154,10 +154,10 @@ function(vcpkg_find_acquire_program VAR) else() set(SCRIPTNAME meson) endif() - set(PATHS ${DOWNLOADS}/tools/meson/meson-0.50.0) - set(URL "https://github.com/mesonbuild/meson/archive/0.50.0.zip") - set(ARCHIVE "meson-0.50.0.zip") - set(HASH 587cafe0cd551e3fb3507ecab904912dc3e053aa95c864b435526a20d52406536ba970a50be6c9f20d83314c5853aaefa102c5ca14623d0928b091a43e7b6d64) + set(PATHS ${DOWNLOADS}/tools/meson/meson-0.51.0) + set(URL "https://github.com/mesonbuild/meson/archive/0.51.0.zip") + set(ARCHIVE "meson-0.51.0.zip") + set(HASH bf1df65cde7e0e0a44e4b4be7d68de9897a77c4ea4c694f1d77fe82cd3c7e7818dc034a3313ce885ba6883b4ba6d282b7a589f665fa499d9eb79fc7a23e415cc) elseif(VAR MATCHES "FLEX") if(CMAKE_HOST_WIN32) set(PROGNAME win_flex) From 11506d1426163df3c867a99bacd84b8911ea3224 Mon Sep 17 00:00:00 2001 From: Norbert Nemec Date: Wed, 19 Jun 2019 22:35:08 +0200 Subject: [PATCH 0026/1066] set cmake_prefix_path correctly within vcpkg_configure_meson --- scripts/cmake/vcpkg_configure_meson.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake index f1ae0e65f..f907c76f1 100644 --- a/scripts/cmake/vcpkg_configure_meson.cmake +++ b/scripts/cmake/vcpkg_configure_meson.cmake @@ -26,6 +26,7 @@ function(vcpkg_configure_meson) set(MESON_RELEASE_LDFLAGS "${MESON_RELEASE_LDFLAGS} /INCREMENTAL:NO /OPT:REF /OPT:ICF") # select meson cmd-line options + list(APPEND _vcm_OPTIONS -Dcmake_prefix_path=${CURRENT_INSTALLED_DIR}) list(APPEND _vcm_OPTIONS --buildtype plain --backend ninja --wrap-mode nodownload) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) list(APPEND _vcm_OPTIONS --default-library shared) From dfd5bb46a149bbc2d9b4f4fa6a5fd4df5992cbdb Mon Sep 17 00:00:00 2001 From: Jackie Ng Date: Fri, 21 Jun 2019 02:40:50 +1000 Subject: [PATCH 0027/1066] [sqlite3]: Shared library support for Linux (#6856) * [sqlite]: Shared library support for Linux * [sqlite3]: Switch back to CMAKE_SYSTEM_NAME checks per original PR (#6122) * [sqlite3]: Remove redundant "WindowsStore" system name check as "Windows" should already catch it. * [sqlite3]: Re-bump portfile * [sqlite3] added error message --- ports/sqlite3/CMakeLists.txt | 8 +++++++- ports/sqlite3/CONTROL | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index a2f0aeb03..16f529daf 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -3,7 +3,13 @@ project(sqlite3 C) include_directories(.) if(BUILD_SHARED_LIBS) - set(API "-DSQLITE_API=__declspec(dllexport)") + if(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(API "-DSQLITE_API=__attribute__((visibility(\"default\")))") + elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") + set(API "-DSQLITE_API=__declspec(dllexport)") + else() + message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}") + endif() else() set(API "-DSQLITE_API=extern") endif() diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index 7bba4d78c..829b66254 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,5 +1,5 @@ Source: sqlite3 -Version: 3.28.0 +Version: 3.28.0-1 Homepage: https://sqlite.org/ Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. From f0902b35370fbebcf257de88e43ee47379185a10 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 20 Jun 2019 11:46:55 -0700 Subject: [PATCH 0028/1066] VS 2019 16.3 deprecates . (#6968) VS 2019 16.3 will contain a couple of source-breaking changes: * will be deprecated via an impossible-to-miss preprocessor "#error The header providing std::experimental::filesystem is deprecated by Microsoft and will be REMOVED. It is superseded by the C++17 header providing std::filesystem. You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to acknowledge that you have received this warning." * will no longer include . In the long term, I believe that vcpkg should detect when it's being built with VS 2017 15.7 or newer, compile in C++17 mode, include , and use std::filesystem. (Activating this for VS 2019 16.0 or newer would also be reasonable.) Similarly for other toolsets supporting std::filesystem. In the short term, this commit makes vcpkg compatible with the upcoming deprecation. First, we need to define the silencing macro before including the appropriate header. I've chosen to define it unconditionally (without checking for platform or version), since it has no effect for other platforms or versions. Second, we need to deal with no longer including . I verified that VS 2015 Update 3 contained (back then, it simply included the header, where the experimental implementation was defined; this was later reorganized). Therefore, all of vcpkg's supported MSVC toolsets have , so we can simply always include it. I've verified that this builds with both VS 2015 Update 3 and VS 2019 16.1.3 (the current production version). --- toolsrc/include/pch.h | 5 +---- toolsrc/include/vcpkg/base/files.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index fa2c2bb72..15ec25e76 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -37,11 +37,8 @@ #include #include #include -#if defined(_WIN32) -#include -#else +#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING #include -#endif #include #include #include diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 02e2b8db8..3ea0d6036 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -2,11 +2,8 @@ #include -#if defined(_WIN32) -#include -#else +#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING #include -#endif namespace fs { From 83520dbc36e644951829f1a94fe47395314d9a4c Mon Sep 17 00:00:00 2001 From: Phoebe <925731795@qq.com> Date: Fri, 21 Jun 2019 05:13:53 +0800 Subject: [PATCH 0029/1066] [Folly] define _CRT_INTERNAL_NONSTDC_NAMES to 0 to disable non-underscore posix names on windows (#6974) --- ports/folly/CONTROL | 2 +- .../disable-non-underscore-posix-names.patch | 27 +++++++++++++++++++ ports/folly/portfile.cmake | 1 + 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 ports/folly/disable-non-underscore-posix-names.patch diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 1709a4515..268039ac7 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2019.05.20.00 +Version: 2019.05.20.00-1 Homepage: https://github.com/facebook/folly Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread, boost-smart-ptr diff --git a/ports/folly/disable-non-underscore-posix-names.patch b/ports/folly/disable-non-underscore-posix-names.patch new file mode 100644 index 000000000..bbe79481c --- /dev/null +++ b/ports/folly/disable-non-underscore-posix-names.patch @@ -0,0 +1,27 @@ +diff --git a/folly/portability/Windows.h b/folly/portability/Windows.h +index f7990ca..b22fac5 100644 +--- a/folly/portability/Windows.h ++++ b/folly/portability/Windows.h +@@ -26,16 +26,12 @@ + // These have to be this way because we define our own versions + // of close(), because the normal Windows versions don't handle + // sockets at all. +-#ifndef __STDC__ +-/* nolint */ +-#define __STDC__ 1 +-#include // @manual nolint +-#include // @manual nolint +-#undef __STDC__ +-#else +-#include // @manual nolint +-#include // @manual nolint +-#endif ++#include ++#pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES") ++#define _CRT_INTERNAL_NONSTDC_NAMES 0 ++#include ++#include ++#pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES") + + #if defined(min) || defined(max) + #error Windows.h needs to be included by this header, or else NOMINMAX needs \ diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 7e7f40565..abf32aa99 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -21,6 +21,7 @@ vcpkg_from_github( missing-include-atomic.patch boost-1.70.patch reorder-glog-gflags.patch + disable-non-underscore-posix-names.patch ) file(COPY From 321540a82abec73f280847df10af6aa1fe9e472b Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 21 Jun 2019 05:44:03 +0800 Subject: [PATCH 0030/1066] [xerces-c]Replace the macro DLL_EXPORT with the macro XERCES_DLL_EXPORT (#6970) * [xerces-c]Disable defining DLL_EXPORT to avoid affecting other ports * [xerces-c]Replace the macro DLL_EXPORT with the macro XERCES_DLL_EXPORT --- ports/xerces-c/CONTROL | 2 +- ports/xerces-c/portfile.cmake | 4 ++- ports/xerces-c/remove-dll-export-macro.patch | 27 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 ports/xerces-c/remove-dll-export-macro.patch diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL index 2fde766e1..3d2a4337e 100644 --- a/ports/xerces-c/CONTROL +++ b/ports/xerces-c/CONTROL @@ -1,5 +1,5 @@ Source: xerces-c -Version: 3.2.2-9 +Version: 3.2.2-10 Homepage: https://github.com/apache/xerces-c Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index ad3c6d79e..5f8fa4c11 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -6,7 +6,9 @@ vcpkg_from_github( REF Xerces-C_3_2_2 SHA512 66f60fe9194376ac0ca99d13ea5bce23ada86e0261dde30686c21ceb5499e754dab8eb0a98adadd83522bda62709377715501f6dac49763e3a686f9171cc63ea HEAD_REF trunk - PATCHES disable-tests.patch + PATCHES + disable-tests.patch + remove-dll-export-macro.patch ) set(DISABLE_ICU ON) diff --git a/ports/xerces-c/remove-dll-export-macro.patch b/ports/xerces-c/remove-dll-export-macro.patch new file mode 100644 index 000000000..f6f0e6975 --- /dev/null +++ b/ports/xerces-c/remove-dll-export-macro.patch @@ -0,0 +1,27 @@ +diff --git a/src/xercesc/util/XercesDefs.hpp b/src/xercesc/util/XercesDefs.hpp +index 8071260..cd6bd68 100644 +--- a/src/xercesc/util/XercesDefs.hpp ++++ b/src/xercesc/util/XercesDefs.hpp +@@ -133,7 +133,7 @@ typedef XMLUInt32 UCS4Ch; + // The DLL_EXPORT flag should be defined on the command line during the build of a DLL + // configure conspires to make this happen. + +-#if defined(DLL_EXPORT) ++#if defined(XERCES_DLL_EXPORT) + #if defined(XERCES_BUILDING_LIBRARY) + #define XMLUTIL_EXPORT XERCES_PLATFORM_EXPORT + #define XMLPARSER_EXPORT XERCES_PLATFORM_EXPORT +diff --git a/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in b/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in +index e849e08..69fe3bf 100644 +--- a/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in ++++ b/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in +@@ -85,9 +85,6 @@ + #define XERCES_PLATFORM_EXPORT @XERCES_PLATFORM_EXPORT@ + #define XERCES_PLATFORM_IMPORT @XERCES_PLATFORM_IMPORT@ + #define XERCES_TEMPLATE_EXTERN @XERCES_TEMPLATE_EXTERN@ +-#ifdef XERCES_DLL_EXPORT +-# define DLL_EXPORT +-#endif + + // --------------------------------------------------------------------------- + // Include standard headers, if available, that we may rely on below. From 5f72d97b6e8e8dbd648567d2601c9a5c2e69eb85 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 21 Jun 2019 05:52:28 +0800 Subject: [PATCH 0031/1066] [bond]Upgrade version to 8.1.0 and add Linux/OSX support. (#6954) --- ports/bond/0002_omit_rapidjson.patch | 12 ---- ports/bond/CONTROL | 2 +- ports/bond/fix-install-path.patch | 56 +++++++++++++++++ ports/bond/portfile.cmake | 91 +++++++++++++--------------- 4 files changed, 100 insertions(+), 61 deletions(-) delete mode 100644 ports/bond/0002_omit_rapidjson.patch create mode 100644 ports/bond/fix-install-path.patch diff --git a/ports/bond/0002_omit_rapidjson.patch b/ports/bond/0002_omit_rapidjson.patch deleted file mode 100644 index 7d502353d..000000000 --- a/ports/bond/0002_omit_rapidjson.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fe0f629e..54b6d8ec 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -49,7 +49,6 @@ install (DIRECTORY - cpp/inc/bond - cpp/generated/bond - python/inc/bond -- thirdparty/rapidjson/include/rapidjson - DESTINATION include - PATTERN *.cpp EXCLUDE) - diff --git a/ports/bond/CONTROL b/ports/bond/CONTROL index 940b0dc05..0d1b82bc3 100644 --- a/ports/bond/CONTROL +++ b/ports/bond/CONTROL @@ -1,6 +1,6 @@ Source: bond Maintainer: bond@microsoft.com -Version: 7.0.2-2 +Version: 8.1.0 Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services. Homepage: https://github.com/Microsoft/bond Build-Depends: rapidjson, boost-config, boost-utility, boost-assign diff --git a/ports/bond/fix-install-path.patch b/ports/bond/fix-install-path.patch new file mode 100644 index 000000000..e5fa270c1 --- /dev/null +++ b/ports/bond/fix-install-path.patch @@ -0,0 +1,56 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f2f8eaa..1b0c01c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,7 @@ set (BOND_FIND_RAPIDJSON + # settings so that we don't apply our settings to third-party code. + add_subdirectory (thirdparty) + +-enable_testing() ++#enable_testing() + + set (BOND_IDL ${CMAKE_CURRENT_SOURCE_DIR}/idl) + set (BOND_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/cpp/inc) +@@ -80,6 +80,6 @@ if (BOND_GBC_PATH) + + install ( + FILES ${BOND_GBC_PATH} +- DESTINATION bin ++ DESTINATION tools + RENAME ${INSTALLED_GBC_NAME}) + endif() +diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt +index 1dff9d0..9a11575 100644 +--- a/compiler/CMakeLists.txt ++++ b/compiler/CMakeLists.txt +@@ -108,7 +108,7 @@ set (test_sources + tests/TestMain.hs + ${tests}) + +-set (completion_dir etc/bash_completion.d) ++set (completion_dir tools/bond) + set (completion ${CMAKE_CURRENT_BINARY_DIR}/gbc.comp) + set (output ${CMAKE_CURRENT_BINARY_DIR}/build/gbc/gbc${CMAKE_EXECUTABLE_SUFFIX}) + set (GBC_EXECUTABLE ${output} PARENT_SCOPE) +@@ -130,7 +130,7 @@ endif() + + install (FILES ${output} + PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE +- DESTINATION bin) ++ DESTINATION ${completion_dir}) + + install (FILES ${completion} + RENAME gbc +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index b45078e..1eebe9c 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -110,7 +110,7 @@ target_include_directories (bond_apply BEFORE PRIVATE + + install (TARGETS bond bond_apply + EXPORT bond +- ARCHIVE DESTINATION lib/bond ++ ARCHIVE DESTINATION lib + INCLUDES DESTINATION include) + + install (DIRECTORY ${BOND_IDL}/bond/core DESTINATION include/bond) diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index a508e6a35..42755dbf9 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -4,77 +4,72 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bond-7.0.2) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/bond/archive/7.0.2.zip" - FILENAME "bond-7.0.2.zip" - SHA512 4ae3b88fafbede6c1433d171713bdbfcbed61a3d2a983d7df4e33af893a50f233be0e95c1ea8e5f30dafb017b2a8100a23721292b04184159e5fd796b1a43398 -) -vcpkg_download_distfile(GBC_ARCHIVE - URLS "https://github.com/Microsoft/bond/releases/download/7.0.2/gbc-7.0.2-amd64.exe.zip" - FILENAME "gbc-7.0.2-amd64.exe.zip" - SHA512 069eafd7641ebd719425037cb8249d2d214eb09c6ce38fbf1d1811c01d1839b0a0987c55217075b6ae9f477f750d582250134387a530edb2aee407b21d973915 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/bond + REF 8.1.0 + SHA512 287a2d299036b57e0576903b1f5372bf8071243ada57153c4bf231cdc660faab1e70c60ddde57ac759d941b74af4ba25d81a5d58e8dbf391032b7b226c4cd18c + HEAD_REF master + PATCHES fix-install-path.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_download_distfile(GBC_ARCHIVE + URLS "https://github.com/microsoft/bond/releases/download/8.1.0/gbc-8.1.0-amd64.zip" + FILENAME "gbc-8.1.0-amd64.zip" + SHA512 896c9a78fc714e0ea44c37ed36400ec8e5f52d495a8d81aa80834ff6cd6303c7c94e06129f7b2269416a9e0ffb61423e87406db798fb5be7ff00f14981530089 + ) + + # Extract the precompiled gbc + vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/) + set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc.exe) -# Extract the precompiled gbc -vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/) -set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-7.0.2-amd64.exe) - -if (NOT EXISTS "${FETCHED_GBC_PATH}") - message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.") + if (NOT EXISTS "${FETCHED_GBC_PATH}") + message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.") + endif() + +else() + message(STATUS "Installing stack...") + vcpkg_download_distfile( + ARCHIVE + URLS "https://get.haskellstack.org/" + FILENAME "stack-install.sh" + SHA512 6db2008297416ad856aa498908bf695737cf3cc466440397720a458358e9661d07abdba762662080ee8bbd8171cdcb05eec6d3696382575c099adfb8427e05fd + ) + + set(BASH /bin/bash) + + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc "${ARCHIVE}" -f + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME install-stack + ) + endif() -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - # Don't install rapidjson from the (empty) submodule. With vcpkg, we get - # rapidjson from vcpkg - ${CMAKE_CURRENT_LIST_DIR}/0002_omit_rapidjson.patch -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DBOND_LIBRARIES_ONLY=TRUE -DBOND_GBC_PATH=${FETCHED_GBC_PATH} + -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_ENABLE_COMM=FALSE -DBOND_ENABLE_GRPC=FALSE + -DBOND_FIND_RAPIDJSON=TRUE ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/bond TARGET_PATH share/bond) + # Put the license file where vcpkg expects it file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/bond) file(RENAME ${CURRENT_PACKAGES_DIR}/share/bond/LICENSE ${CURRENT_PACKAGES_DIR}/share/bond/copyright) -# Drop a copy of gbc in tools/ so that it can be used -file(COPY ${CURRENT_PACKAGES_DIR}/bin/gbc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) - -# vcpkg doesn't--as of version 0.0.30--like executables such as gbc.exe in -# the output. Just delete the bin/ directories for now. -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin/ - ${CURRENT_PACKAGES_DIR}/debug/bin/) - # There's no way to supress installation of the headers in the debug build, # so we just delete them. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -# Bond's install target installs to lib/bond, but vcpkg expects the lib -# files to end up in lib/, so move them up a directory. -file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/bond/bond.lib - ${CURRENT_PACKAGES_DIR}/lib/bond.lib) -file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/bond/bond_apply.lib - ${CURRENT_PACKAGES_DIR}/lib/bond_apply.lib) -file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/bond/bond.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/bond.lib) -file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/bond/bond_apply.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/bond_apply.lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_copy_pdbs() From e16efa4d6aa6f36247eb6dfd646fdf81af0c36e0 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Thu, 20 Jun 2019 14:52:54 -0700 Subject: [PATCH 0032/1066] [thor] Fix error on Linux. (#6953) --- ports/thor/CONTROL | 3 +-- ports/thor/portfile.cmake | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL index afdc2aafb..5391f5d62 100644 --- a/ports/thor/CONTROL +++ b/ports/thor/CONTROL @@ -1,5 +1,4 @@ Source: thor -Version: 2.0-2 -Homepage: https://github.com/Bromeon/Thor +Version: 2.0-3 Description: Extends the multimedia library SFML with higher-level features Build-Depends: sfml, aurora diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index 572853064..19f65f806 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -49,6 +49,9 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/Aurora) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endif() file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) From 47d206e149e88201333b5ca8fe55c30e2b1a8177 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Fri, 21 Jun 2019 04:11:54 +0200 Subject: [PATCH 0033/1066] [many ports] improvements for linux/wsl (#6730) * [many ports] improve compatibility with WSL and mixed case filesystems * [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there * [libharu] add compatibility with non-win32 platforms * [geogram] fix openblas on linux [clapack] better integration with linux environment [visit-struct] put cmake config file in the expected folder [geogram] remove trailing underscore to enable compatibility with OpenBLAS * [openblas] playing with underscore, without success * [openblas/lapack] fix library integration * [clapack] improve target handling in cmake module * [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs * [clapack,openblas] improve libraries integration * [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags * [suitesparse] improve integration with new lapack/openblas mechanism * [suitesparse] add no underscore postfix also for linux * [ceres] fix integration with newer openblas/lapack configs * [aws-c-event-stream] fix regression * [systemc] fix regression * [libwebp,geogram] trigger rebuild * [libwebp,pthread4w] fix regressions * [glbinding] fix cmake module installation * [globjects] disentangle unnecessary dependency from qt5 * [jasper] remove broken and unnecessary patches * [libwebp] fix regression * [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files * [clapack] correctly find dlls * [clapack] use a generic blas as dependency * [fizz,g2o] restore expected version * fix mistake * [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports * [libressl,openssl] do not try to build one if the other is already installed * [itk] update ref and patch to avoid regression * [libressl,openssl] implement full strategy to fix CI * [libwebp] disable components that are broken on macOS * [ogre] enable macOS build * [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169 * [ogre] add missing install command * [ffmpeg] enable wrapper for cmake module * [ffmpeg] add avresample module finder * [ffmpeg] improve module detection and exported symbols * [ffmpeg] add variables to cache * [thrift] remove unnecessary build option * [allegro5] fix shared/static inversion * [protobuf] cleanup * [libressl] cleanup * [moos-core] cleanup * commented features must not be separated from other features, otherwise vcpkg complains * [itk] fix regression * [shogun,itk] fix regressions * [ogre] fix regression * [opusfile] add compatibility with non-win32 * [itk] fix regression * [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile * add missing dependencies * [ismrmrd] fix regression * [ffmpeg] trigger rebuild * [clapack,openblas,libogg] fix regressions on macOS * [libtins] fix regression * force rebuild windows regressions, unable to reproduce locally * [mosquitto] enable non-win32 builds * [json-dto] force rebuild, unable to reproduce regression locally * [many ports] uniform naming and path length requests * fix regression * fix regression * [ffmpeg] fixes for downstream projects * clean up - thanks to reviewers * trigger rebuild of regressions on macOS * trigger rebuild of regressions on macOS - part2 * Add core back * Use VCPKG_CONCURRENCY * Add core back to suitesparse * Add core back to curl * Add core back to magnum * Add core back to magnum * Add core back to magnum * Add core back to cgal --- ports/alembic/CONTROL | 2 +- ports/alembic/portfile.cmake | 4 +- ports/allegro5/portfile.cmake | 42 +- ports/angelscript/CONTROL | 4 +- ports/angelscript/portfile.cmake | 24 +- ports/armadillo/CONTROL | 2 +- ports/armadillo/portfile.cmake | 2 +- ports/arrow/portfile.cmake | 2 +- ports/assimp/CONTROL | 2 +- ports/assimp/portfile.cmake | 10 +- ports/avro-c/portfile.cmake | 2 +- ports/aws-c-common/CONTROL | 4 +- ports/aws-c-common/portfile.cmake | 4 +- ports/aws-c-event-stream/portfile.cmake | 4 +- ports/aws-sdk-cpp/portfile.cmake | 4 +- ports/azure-storage-cpp/CONTROL | 2 +- ports/botan/CONTROL | 4 +- ports/botan/portfile.cmake | 31 +- ports/c-ares/CONTROL | 3 +- ports/c-ares/portfile.cmake | 2 +- ports/capnproto/CONTROL | 2 +- ports/capnproto/portfile.cmake | 4 +- ports/cartographer/CONTROL | 2 +- ports/cartographer/portfile.cmake | 2 +- ports/catch2/CONTROL | 2 +- ports/catch2/portfile.cmake | 2 +- ports/ccd/CONTROL | 2 +- ports/ccd/portfile.cmake | 10 +- ports/cereal/CONTROL | 2 +- ports/cereal/portfile.cmake | 3 +- .../ceres/0001_add_missing_include_path.patch | 13 - ...ixes.patch => 0001_cmakelists_fixes.patch} | 11 +- ...arget.patch => 0002_use_glog_target.patch} | 0 ...h => 0003_fix_exported_ceres_config.patch} | 0 ports/ceres/0004_blas_linux_fix.patch | 22 + ports/ceres/CONTROL | 2 +- ports/ceres/portfile.cmake | 18 +- ports/cgal/portfile.cmake | 2 +- ports/clapack/CONTROL | 2 +- ports/clapack/FindLAPACK.cmake | 225 ++-- ports/clapack/enable_openblas_compat.patch | 112 ++ ports/clapack/openblas_linux.patch | 12 - ports/clapack/portfile.cmake | 10 +- ports/clapack/remove_internal_blas.patch | 13 +- ports/clapack/vcpkg-cmake-wrapper.cmake | 6 +- ports/clblas/CONTROL | 2 +- ports/clblas/portfile.cmake | 4 +- ports/clfft/CONTROL | 2 +- ports/clfft/portfile.cmake | 4 +- ports/cli/CONTROL | 2 +- ports/cli/portfile.cmake | 4 +- ports/clp/CMakeLists.txt | 2 +- ports/clp/CONTROL | 2 +- ports/clp/portfile.cmake | 6 +- ports/coinutils/CMakeLists.txt | 2 +- ports/coinutils/CONTROL | 2 +- ports/coinutils/portfile.cmake | 6 +- ports/collada-dom/CONTROL | 4 +- ports/collada-dom/portfile.cmake | 4 +- ports/console-bridge/CONTROL | 2 +- ports/console-bridge/portfile.cmake | 4 +- ports/cpp-netlib/CONTROL | 4 +- ports/cpp-netlib/portfile.cmake | 9 +- ports/crc32c/CONTROL | 2 +- ports/crc32c/portfile.cmake | 2 +- ports/cryptopp/CONTROL | 2 +- ports/cryptopp/portfile.cmake | 2 +- ports/curl/CONTROL | 2 +- ports/curl/portfile.cmake | 2 +- ports/cxxopts/CONTROL | 2 +- ports/cxxopts/portfile.cmake | 2 +- ports/eigen3/CONTROL | 2 +- ports/eigen3/portfile.cmake | 2 +- ports/exiv2/CONTROL | 4 +- ports/exiv2/portfile.cmake | 3 +- ports/fcl/CONTROL | 2 +- ports/fcl/portfile.cmake | 4 +- ports/ffmpeg/CONTROL | 2 +- ports/ffmpeg/FindFFMPEG.cmake | 138 ++- ports/ffmpeg/portfile.cmake | 9 +- ports/ffmpeg/vcpkg-cmake-wrapper.cmake | 8 + ports/fizz/CONTROL | 2 +- ports/fizz/portfile.cmake | 4 +- ports/flatbuffers/CONTROL | 10 +- ports/flatbuffers/portfile.cmake | 2 +- ports/folly/portfile.cmake | 2 +- ports/freeimage/CMakeLists.txt | 3 - ports/freeimage/CONTROL | 2 +- ports/freerdp/CONTROL | 2 +- ports/freerdp/portfile.cmake | 2 +- ports/g2o/CONTROL | 2 +- ports/g2o/portfile.cmake | 2 +- ports/gdcm/CONTROL | 2 +- ports/gdcm/portfile.cmake | 10 +- ports/geogram/CONTROL | 2 +- .../enable_openblas_compatibility.patch | 1008 +++++++++++++++++ ports/geogram/fix_underscore.patch | 10 + ports/geogram/portfile.cmake | 10 +- ports/geographiclib/CONTROL | 2 +- ports/geographiclib/portfile.cmake | 4 +- ports/gl3w/CONTROL | 2 +- ports/gl3w/portfile.cmake | 3 +- ....patch => 0001_force-system-install.patch} | 0 ...uwpmacro.patch => 0002_fix-uwpmacro.patch} | 0 .../0003_fix-cmake-configs-paths.patch | 62 + .../0004_fix-config-expected-paths.patch | 35 + ports/glbinding/portfile.cmake | 26 +- ports/glew/portfile.cmake | 3 +- ports/globjects/CONTROL | 3 +- ports/globjects/portfile.cmake | 2 +- ports/glog/CONTROL | 2 +- ports/glog/portfile.cmake | 2 +- ports/graphite2/CONTROL | 4 +- ports/graphite2/portfile.cmake | 3 +- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 6 +- ports/harfbuzz/portfile.cmake | 4 +- ports/hdf5/CONTROL | 24 +- ports/hdf5/portfile.cmake | 9 +- ports/http-parser/CONTROL | 2 +- ports/http-parser/portfile.cmake | 2 +- ports/imgui/CONTROL | 2 +- ports/imgui/portfile.cmake | 2 +- ports/ismrmrd/CONTROL | 4 +- ports/ismrmrd/fix_static.patch | 9 + ports/ismrmrd/portfile.cmake | 50 +- ports/itk/CONTROL | 2 +- ports/itk/fix_conflict_with_openjp2_pc.patch | 33 - ports/itk/fix_libminc_config_path.patch | 13 + ports/itk/fix_openjpeg_search.patch | 13 + ports/itk/portfile.cmake | 18 +- ports/jansson/CONTROL | 2 +- ports/jansson/portfile.cmake | 3 +- ports/jasper/CONTROL | 4 +- ports/jasper/jasper-fix-uwp.patch | 32 - ports/jasper/opengl-not-required.patch | 14 - ports/jasper/portfile.cmake | 12 +- ports/json-dto/CONTROL | 2 +- ports/json-dto/portfile.cmake | 2 +- ports/jxrlib/CONTROL | 2 +- ports/jxrlib/portfile.cmake | 9 +- ports/jxrlib/vcpkg-cmake-wrapper.cmake | 8 + ports/kangaru/CONTROL | 2 +- ports/kangaru/portfile.cmake | 6 +- ports/kinectsdk2/portfile.cmake | 14 +- ports/leptonica/CONTROL | 2 +- ports/leptonica/portfile.cmake | 2 +- ports/libbson/CONTROL | 2 +- ports/libbson/portfile.cmake | 4 +- ports/libfreenect2/CONTROL | 2 +- ports/libfreenect2/portfile.cmake | 2 +- ports/libharu/CONTROL | 2 +- ports/libharu/portfile.cmake | 18 +- ports/libmodbus/CONTROL | 2 +- ports/libmodbus/portfile.cmake | 5 +- ports/libogg/CONTROL | 2 +- ports/libogg/portfile.cmake | 3 +- ports/libpff/CONTROL | 2 +- ports/libpff/portfile.cmake | 2 +- ports/libpng/CONTROL | 2 +- ports/libpng/portfile.cmake | 2 +- ports/libressl/CONTROL | 4 +- ports/libressl/portfile.cmake | 16 +- ports/libsndfile/CONTROL | 2 +- ports/libsndfile/portfile.cmake | 5 +- ports/libtins/CONTROL | 2 +- ports/libtins/portfile.cmake | 8 +- ports/libusb/CONTROL | 2 +- ports/libusb/portfile.cmake | 108 +- ports/libwebp/CONTROL | 2 +- ports/libwebp/portfile.cmake | 15 +- ports/libwebsockets/CONTROL | 2 +- ports/libwebsockets/portfile.cmake | 4 +- ports/lmdb/CONTROL | 2 +- ports/lmdb/portfile.cmake | 5 +- ports/magnum-extras/CONTROL | 5 +- ports/magnum-extras/portfile.cmake | 2 +- ports/magnum-integration/CONTROL | 6 +- ports/magnum-plugins/CONTROL | 3 +- ports/mathgl/CONTROL | 2 +- ports/mathgl/portfile.cmake | 4 +- ports/mongo-c-driver/CONTROL | 2 +- ports/mongo-c-driver/portfile.cmake | 6 +- ports/mongo-cxx-driver/CONTROL | 2 +- ports/mongo-cxx-driver/portfile.cmake | 2 +- ports/moos-core/CONTROL | 4 +- ports/moos-core/portfile.cmake | 11 +- ports/mosquitto/portfile.cmake | 32 +- ports/ms-angle/CONTROL | 2 +- ports/ms-angle/portfile.cmake | 4 +- ports/nanomsg/CONTROL | 2 +- ports/nanomsg/portfile.cmake | 4 +- ports/nlopt/portfile.cmake | 2 +- ports/octomap/CONTROL | 2 +- ports/octomap/portfile.cmake | 3 +- ports/ogre/001-cmake-install-dir.patch | 42 - .../002-link-optimized-lib-workaround.patch | 37 - ports/ogre/CONTROL | 2 +- ports/ogre/portfile.cmake | 29 +- ports/ogre/toolchain_fixes.patch | 533 +++++++++ ports/ompl/portfile.cmake | 5 +- ports/openblas/CONTROL | 2 +- ports/openblas/enable_underscore.patch | 70 ++ ...-space-path.patch => fix_space_path.patch} | 0 ports/openblas/openblas_common.h | 72 -- ports/openblas/portfile.cmake | 50 +- ports/openblas/vcpkg-cmake-wrapper.cmake | 49 + ports/openexr/CONTROL | 2 +- ports/openexr/FindOpenEXR.cmake | 7 + ports/openexr/portfile.cmake | 9 +- ports/openexr/vcpkg-cmake-wrapper.cmake | 8 + ports/openmama/CONTROL | 2 +- ports/openmvg/CONTROL | 2 +- ports/openmvg/portfile.cmake | 2 +- ports/openmvs/CONTROL | 2 +- ports/openmvs/portfile.cmake | 4 +- ports/openni2/CONTROL | 2 +- ports/openni2/portfile.cmake | 2 +- ports/openssl-unix/portfile.cmake | 9 +- ports/openssl-uwp/portfile.cmake | 10 +- ports/openssl-windows/portfile.cmake | 9 +- ports/openssl/CONTROL | 2 +- ports/openssl/portfile.cmake | 2 + ports/opentracing/CONTROL | 4 +- ports/opentracing/portfile.cmake | 45 +- ports/opusfile/CMakeLists.txt | 2 + ports/opusfile/CONTROL | 2 +- ports/orocos-kdl/CONTROL | 2 +- ports/orocos-kdl/portfile.cmake | 6 +- ports/osi/CMakeLists.txt | 2 +- ports/osi/CONTROL | 2 +- ports/osi/portfile.cmake | 6 +- ports/pangolin/CONTROL | 2 +- ports/pangolin/portfile.cmake | 2 +- ports/pcl/CONTROL | 4 +- ports/pcl/portfile.cmake | 2 +- ports/pdal/CONTROL | 2 +- ports/pdal/portfile.cmake | 12 +- ports/poco/CONTROL | 2 +- ports/poco/portfile.cmake | 8 +- ports/proj4/CONTROL | 2 +- ports/proj4/portfile.cmake | 10 +- ports/protobuf/CONTROL | 2 +- ports/protobuf/disable-lite.patch | 41 - ports/protobuf/portfile.cmake | 29 +- ports/pthreads/portfile.cmake | 10 +- ports/pugixml/CONTROL | 2 +- ports/pugixml/portfile.cmake | 16 +- ports/qt5-base/portfile.cmake | 2 +- .../qt_modular_library.cmake | 6 +- ports/re2/CONTROL | 4 +- ports/re2/portfile.cmake | 4 +- ports/restclient-cpp/CONTROL | 2 +- ports/restinio/CONTROL | 8 +- ports/restinio/portfile.cmake | 3 +- ports/sdl2-image/CONTROL | 2 +- ports/sdl2-image/portfile.cmake | 6 +- ports/sdl2-mixer/portfile.cmake | 2 +- ports/sdl2-net/CONTROL | 2 +- ports/sdl2-net/portfile.cmake | 2 +- ports/sdl2-ttf/CONTROL | 2 +- ports/sdl2-ttf/portfile.cmake | 2 +- ports/sdl2/CONTROL | 2 +- ports/sdl2/portfile.cmake | 6 +- ports/selene/CONTROL | 2 +- ports/selene/portfile.cmake | 2 +- ports/sf2cute/CONTROL | 4 +- ports/sf2cute/portfile.cmake | 4 +- ports/shogun/CONTROL | 2 +- ports/shogun/portfile.cmake | 17 +- ports/sndfile/CONTROL | 6 +- ports/sndfile/portfile.cmake | 2 +- ports/so5extra/CONTROL | 2 +- ports/so5extra/portfile.cmake | 3 +- ports/sobjectizer/CONTROL | 2 +- ports/sobjectizer/portfile.cmake | 2 +- ports/sophus/CONTROL | 2 +- ports/sophus/portfile.cmake | 2 +- ports/string-theory/CONTROL | 2 +- ports/string-theory/portfile.cmake | 3 +- ports/suitesparse/CONTROL | 2 +- ports/suitesparse/portfile.cmake | 15 +- ports/suitesparse/suitesparse.patch | 85 +- ports/systemc/CONTROL | 2 +- ports/systemc/install.patch | 54 +- ports/systemc/portfile.cmake | 11 +- ports/szip/CONTROL | 2 +- ports/szip/portfile.cmake | 3 +- ports/tesseract/CONTROL | 2 +- ports/tesseract/portfile.cmake | 2 +- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 3 +- ports/tinyexif/CONTROL | 2 +- ports/tinyexif/portfile.cmake | 2 +- ports/tinyobjloader/CONTROL | 2 +- ports/tinyobjloader/portfile.cmake | 2 +- ports/tinyxml2/CONTROL | 3 +- ports/tinyxml2/portfile.cmake | 2 +- ports/tmx/CONTROL | 2 +- ports/tmx/portfile.cmake | 2 +- ports/treehopper/CONTROL | 3 +- ports/treehopper/portfile.cmake | 3 +- ports/trompeloeil/CONTROL | 2 +- ports/trompeloeil/portfile.cmake | 2 +- ports/urdfdom-headers/CONTROL | 2 +- ports/urdfdom-headers/portfile.cmake | 4 +- ports/urdfdom/CONTROL | 2 +- ports/urdfdom/portfile.cmake | 4 +- ports/usd/CONTROL | 2 +- ports/usd/portfile.cmake | 2 +- ports/uvw/CONTROL | 2 +- ports/uvw/portfile.cmake | 10 +- ports/visit-struct/CONTROL | 2 +- ports/visit-struct/portfile.cmake | 5 +- ports/wangle/CONTROL | 2 +- ports/wangle/portfile.cmake | 6 +- ports/wt/portfile.cmake | 4 +- ports/xalan-c/portfile.cmake | 2 +- ports/z3/CONTROL | 2 +- ports/z3/portfile.cmake | 2 +- ports/zopfli/CONTROL | 2 +- ports/zopfli/portfile.cmake | 2 +- ports/zserge-webview/CONTROL | 2 +- ports/zserge-webview/portfile.cmake | 8 +- ports/zxing-cpp/CONTROL | 4 +- ports/zxing-cpp/portfile.cmake | 10 +- 326 files changed, 3141 insertions(+), 1198 deletions(-) delete mode 100644 ports/ceres/0001_add_missing_include_path.patch rename ports/ceres/{0002_cmakelists_fixes.patch => 0001_cmakelists_fixes.patch} (81%) rename ports/ceres/{0003_use_glog_target.patch => 0002_use_glog_target.patch} (100%) rename ports/ceres/{0004_fix_exported_ceres_config.patch => 0003_fix_exported_ceres_config.patch} (100%) create mode 100644 ports/ceres/0004_blas_linux_fix.patch create mode 100644 ports/clapack/enable_openblas_compat.patch delete mode 100644 ports/clapack/openblas_linux.patch create mode 100644 ports/ffmpeg/vcpkg-cmake-wrapper.cmake create mode 100644 ports/geogram/enable_openblas_compatibility.patch create mode 100644 ports/geogram/fix_underscore.patch rename ports/glbinding/{force-system-install.patch => 0001_force-system-install.patch} (100%) rename ports/glbinding/{fix-uwpmacro.patch => 0002_fix-uwpmacro.patch} (100%) create mode 100644 ports/glbinding/0003_fix-cmake-configs-paths.patch create mode 100644 ports/glbinding/0004_fix-config-expected-paths.patch create mode 100644 ports/ismrmrd/fix_static.patch delete mode 100644 ports/itk/fix_conflict_with_openjp2_pc.patch create mode 100644 ports/itk/fix_libminc_config_path.patch create mode 100644 ports/itk/fix_openjpeg_search.patch delete mode 100644 ports/jasper/jasper-fix-uwp.patch delete mode 100644 ports/jasper/opengl-not-required.patch create mode 100644 ports/jxrlib/vcpkg-cmake-wrapper.cmake delete mode 100644 ports/ogre/001-cmake-install-dir.patch delete mode 100644 ports/ogre/002-link-optimized-lib-workaround.patch create mode 100644 ports/ogre/toolchain_fixes.patch create mode 100644 ports/openblas/enable_underscore.patch rename ports/openblas/{fix-space-path.patch => fix_space_path.patch} (100%) delete mode 100644 ports/openblas/openblas_common.h create mode 100644 ports/openblas/vcpkg-cmake-wrapper.cmake create mode 100644 ports/openexr/vcpkg-cmake-wrapper.cmake delete mode 100644 ports/protobuf/disable-lite.patch diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index 0adc152bb..a1a47a3ff 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,5 +1,5 @@ Source: alembic -Version: 1.7.11 +Version: 1.7.11-2 Build-Depends: ilmbase, hdf5 Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications. Homepage: https://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 9e97ac89d..8b3e8568d 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "Alembic's buildsystem uses very long paths and may fail on your system.\n" + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() @@ -30,7 +30,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Alembic") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Alembic) vcpkg_copy_pdbs() diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index b8619f99b..37eea0756 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -1,44 +1,29 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO liballeg/allegro5 REF 5.2.5.0 SHA512 9b97a46f0fd146c3958a5f8333822665ae06b984b3dbedc1356afdac8fe3248203347cb08b30ebda049a7320948c7844e9d00dc055c317836c2557b5bfc2ab04 HEAD_REF master -) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(ALLEGRO_USE_STATIC ON) -else() - set(ALLEGRO_USE_STATIC OFF) -endif() - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-pdb-install.patch + fix-pdb-install.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS -DWANT_DOCS=OFF -DALLEGRO_SDL=OFF -DWANT_DEMO=OFF - -DSHARED=${ALLEGRO_USE_STATIC} + -DSHARED=${VCPKG_BUILD_SHARED_LIBS} -DWANT_EXAMPLES=OFF -DWANT_CURL_EXAMPLE=OFF -DWANT_TESTS=OFF @@ -81,14 +66,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/allegro5) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/allegro5/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/allegro5/copyright) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.pdb) file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug) file(COPY ${PDB_GLOB} DESTINATION ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug) vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/allegro5 RENAME copyright) diff --git a/ports/angelscript/CONTROL b/ports/angelscript/CONTROL index 7c12ea845..7315b1a90 100644 --- a/ports/angelscript/CONTROL +++ b/ports/angelscript/CONTROL @@ -1,3 +1,3 @@ Source: angelscript -Version: 2.33.0 -Description: The AngelCode Scripting Library, or AngelScript as it is also known, is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts. It has been designed from the beginning to be an easy to use component, both for the application programmer and the script writer. +Version: 2.33.0-1 +Description: The AngelCode Scripting Library, or AngelScript as it is also known, is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts. It has been designed from the beginning to be an easy to use component, both for the application programmer and the script writer. diff --git a/ports/angelscript/portfile.cmake b/ports/angelscript/portfile.cmake index 18128d220..f6521df29 100644 --- a/ports/angelscript/portfile.cmake +++ b/ports/angelscript/portfile.cmake @@ -1,15 +1,3 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE @@ -20,14 +8,9 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag). - # REF 1.0.0 - # (Optional) Read the docs for how to generate patches at: - # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md + ARCHIVE ${ARCHIVE} PATCHES mark-threads-private.patch - # 002_more_port_fixes.patch ) vcpkg_configure_cmake( @@ -41,10 +24,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Angelscript") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Angelscript) # Handle copyright file(INSTALL ${CURRENT_PORT_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/angelscript RENAME copyright) - -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME angelscript) diff --git a/ports/armadillo/CONTROL b/ports/armadillo/CONTROL index a162b1ced..5baafdfdf 100644 --- a/ports/armadillo/CONTROL +++ b/ports/armadillo/CONTROL @@ -1,4 +1,4 @@ Source: armadillo -Version: 2019-04-16-1 +Version: 2019-04-16-2 Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use Build-Depends: openblas (!osx), clapack (!osx) diff --git a/ports/armadillo/portfile.cmake b/ports/armadillo/portfile.cmake index 6b9b3790a..437f174dd 100644 --- a/ports/armadillo/portfile.cmake +++ b/ports/armadillo/portfile.cmake @@ -25,7 +25,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/armadillo/CMake TARGET_PATH share/armadillo) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/armadillo/CMake) vcpkg_copy_pdbs() diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index ed49d406e..fd8fd52fc 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -42,7 +42,7 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib) message(FATAL_ERROR "Installed lib file should be named 'arrow.lib' via patching the upstream build.") endif() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/arrow TARGET_PATH share/arrow) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/arrow) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index ddc2627f0..0b2d58a51 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,5 +1,5 @@ Source: assimp -Version: 4.1.0-5 +Version: 4.1.0-8 Homepage: https://github.com/assimp/assimp Description: The Open Asset import library Build-Depends: zlib, rapidjson diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 559dd249c..b690b79d0 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -18,13 +18,19 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/zlib ${SOURCE_PATH}/contrib/gtest ${S set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DASSIMP_BUILD_TESTS=OFF -DASSIMP_BUILD_ASSIMP_VIEW=OFF -DASSIMP_BUILD_ZLIB=OFF - -DASSIMP_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} + -DASSIMP_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_INSTALL_PDB=OFF #-DSYSTEM_IRRXML=ON # Wait for the built-in irrxml to synchronize with port irrlich, add dependencies and enable this macro @@ -46,7 +52,7 @@ file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)" "set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG}) -if(WIN32) +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) diff --git a/ports/avro-c/portfile.cmake b/ports/avro-c/portfile.cmake index ee0b6f7ca..553e694d8 100644 --- a/ports/avro-c/portfile.cmake +++ b/ports/avro-c/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "Avro-c's buildsystem uses very long paths and may fail on your system.\n" + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() diff --git a/ports/aws-c-common/CONTROL b/ports/aws-c-common/CONTROL index d80e99091..f9e0fc9af 100644 --- a/ports/aws-c-common/CONTROL +++ b/ports/aws-c-common/CONTROL @@ -1,3 +1,3 @@ Source: aws-c-common -Version: 0.3.11 -Description: AWS common library for C \ No newline at end of file +Version: 0.3.11-1 +Description: AWS common library for C diff --git a/ports/aws-c-common/portfile.cmake b/ports/aws-c-common/portfile.cmake index 609d7269d..53d85abb0 100644 --- a/ports/aws-c-common/portfile.cmake +++ b/ports/aws-c-common/portfile.cmake @@ -19,7 +19,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/aws-c-common/cmake) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include @@ -34,4 +34,4 @@ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aw file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share -) \ No newline at end of file +) diff --git a/ports/aws-c-event-stream/portfile.cmake b/ports/aws-c-event-stream/portfile.cmake index c5ee56933..8d1b0ec70 100644 --- a/ports/aws-c-event-stream/portfile.cmake +++ b/ports/aws-c-event-stream/portfile.cmake @@ -12,7 +12,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/cmake" + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" ) vcpkg_install_cmake() @@ -32,4 +32,4 @@ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aw file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share -) \ No newline at end of file +) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index c6b527816..dc7bc19fc 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "Aws-sdk-cpp's buildsystem uses very long paths and may fail on your system.\n" + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() @@ -10,7 +10,7 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.7.116 + REF 1.7.116 SHA512 2d10aebf1c10bb7e7a0efa1fd930b8743d9bce1d7d36f72c55fd13612be4fd30cf0a67ebe4f8d7c05146306084b10d8657ff26ac3bafaaa9efaa4c67707acb49 HEAD_REF master ) diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 9eabe9faf..720f07efb 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -3,4 +3,4 @@ Version: 6.1.0 Build-Depends: cpprestsdk[core], atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp&!osx), gettext Description: Microsoft Azure Storage Client SDK for C++ A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. -Homepage: https://blogs.msdn.com/b/windowsazurestorage/ \ No newline at end of file +Homepage: https://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL index 8ceb0118c..9221e7f66 100644 --- a/ports/botan/CONTROL +++ b/ports/botan/CONTROL @@ -1,4 +1,4 @@ Source: botan -Version: 2.9.0 +Version: 2.9.0-1 Homepage: https://botan.randombit.net -Description: A cryptography library written in C++11 \ No newline at end of file +Description: A cryptography library written in C++11 diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index 8b9a200d4..4dc02d588 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -10,32 +10,14 @@ vcpkg_from_github( HEAD_REF master ) -set(NUMBER_OF_PROCESSORS "1") -if(DEFINED ENV{NUMBER_OF_PROCESSORS}) - set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS}) -else() - if(APPLE) - set(job_count_command sysctl -n hw.physicalcpu) - else() - set(job_count_command nproc) - endif() - execute_process( - COMMAND ${job_count_command} - OUTPUT_VARIABLE NUMBER_OF_PROCESSORS - ) - string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") - string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") - if(NOT NUMBER_OF_PROCESSORS) - set(NUMBER_OF_PROCESSORS "1") - endif() -endif() - if(CMAKE_HOST_WIN32) vcpkg_find_acquire_program(JOM) - set(build_tool "${JOM}" /J ${NUMBER_OF_PROCESSORS}) + set(build_tool "${JOM}") + set(parallel_build "/J ${VCPKG_CONCURRENCY}") else() find_program(MAKE make) - set(build_tool "${MAKE}" -j${NUMBER_OF_PROCESSORS}) + set(build_tool "${MAKE}") + set(parallel_build "-j${VCPKG_CONCURRENCY}") endif() vcpkg_find_acquire_program(PYTHON3) @@ -93,7 +75,7 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) --link-method=copy) if(CMAKE_HOST_WIN32) list(APPEND configure_arguments ${BOTAN_MSVC_RUNTIME}${BOTAN_MSVC_RUNTIME_SUFFIX}) - endif() + endif() vcpkg_execute_required_process( COMMAND "${PYTHON3}" "${SOURCE_PATH}/configure.py" ${configure_arguments} @@ -102,8 +84,9 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}") - vcpkg_execute_required_process( + vcpkg_execute_build_process( COMMAND ${build_tool} + NO_PARALLEL_COMMAND "${build_tool} ${parallel_build}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" LOGNAME build-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") diff --git a/ports/c-ares/CONTROL b/ports/c-ares/CONTROL index dda2acde0..c8a5f4854 100644 --- a/ports/c-ares/CONTROL +++ b/ports/c-ares/CONTROL @@ -1,5 +1,4 @@ Source: c-ares -Version: 2019-5-2 +Version: 2019-5-2-1 Homepage: https://github.com/c-ares/c-ares Description: A C library for asynchronous DNS requests -Build-Depends: diff --git a/ports/c-ares/portfile.cmake b/ports/c-ares/portfile.cmake index 094b52ff4..6d3769b1c 100644 --- a/ports/c-ares/portfile.cmake +++ b/ports/c-ares/portfile.cmake @@ -30,7 +30,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/c-ares") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/c-ares) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) diff --git a/ports/capnproto/CONTROL b/ports/capnproto/CONTROL index 2bb136b7a..694469b1f 100644 --- a/ports/capnproto/CONTROL +++ b/ports/capnproto/CONTROL @@ -1,5 +1,5 @@ Source: capnproto -Version: 0.7.0-1 +Version: 0.7.0-2 Description: Data interchange format and capability-based RPC system Homepage: https://capnproto.org/ Build-Depends: zlib diff --git a/ports/capnproto/portfile.cmake b/ports/capnproto/portfile.cmake index a9916a70a..4043a53c5 100644 --- a/ports/capnproto/portfile.cmake +++ b/ports/capnproto/portfile.cmake @@ -23,7 +23,7 @@ vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/CapnProto") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CapnProto) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools") file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/capnproto") @@ -39,4 +39,4 @@ file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/capnp file(RENAME ${CURRENT_PACKAGES_DIR}/share/capnproto/LICENSE ${CURRENT_PACKAGES_DIR}/share/capnproto/copyright) # Disabled for now, see #5630 and #5635 -# vcpkg_test_cmake(PACKAGE_NAME CapnProto) \ No newline at end of file +# vcpkg_test_cmake(PACKAGE_NAME CapnProto) diff --git a/ports/cartographer/CONTROL b/ports/cartographer/CONTROL index b91c4a52e..bf2916b69 100644 --- a/ports/cartographer/CONTROL +++ b/ports/cartographer/CONTROL @@ -1,5 +1,5 @@ Source: cartographer -Version: 1.0.0 +Version: 1.0.0-1 Build-Depends: ceres[suitesparse], gflags, glog, lua, cairo, boost-iostreams, gtest, protobuf Homepage: https://github.com/googlecartographer/cartographer Description: Google 2D & 3D SLAM package diff --git a/ports/cartographer/portfile.cmake b/ports/cartographer/portfile.cmake index 889adddfb..f8b1ddcd8 100644 --- a/ports/cartographer/portfile.cmake +++ b/ports/cartographer/portfile.cmake @@ -27,7 +27,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/cartographer) +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() # Clean diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index b3cd3c33d..1a8c9265d 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.7.2 +Version: 2.7.2-2 Description: A modern, header-only test framework for unit testing. Homepage: https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index 372b627ac..d79098572 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -18,7 +18,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Catch2 TARGET_PATH share/catch2) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Catch2) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) diff --git a/ports/ccd/CONTROL b/ports/ccd/CONTROL index e2b4463ba..7820a1455 100644 --- a/ports/ccd/CONTROL +++ b/ports/ccd/CONTROL @@ -1,4 +1,4 @@ Source: ccd -Version: 2.1 +Version: 2.1-1 Homepage: https://github.com/danfis/libccd Description: Library for collision detection between two convex shapes diff --git a/ports/ccd/portfile.cmake b/ports/ccd/portfile.cmake index ba9b3a6f6..45674918e 100644 --- a/ports/ccd/portfile.cmake +++ b/ports/ccd/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH REPO danfis/libccd REF v2.1 SHA512 ff037d9c4df50f09600cf9b3514b259b2850ff43f74817853f5665d22812891168f70bd3cc3969b2c9e3c706f6254991a65421476349607fbd04d894b217456d - HEAD_REF master -) + HEAD_REF master +) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -21,7 +21,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/ccd") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/ccd) file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccd RENAME copyright) diff --git a/ports/cereal/CONTROL b/ports/cereal/CONTROL index ce879198f..05175d91d 100644 --- a/ports/cereal/CONTROL +++ b/ports/cereal/CONTROL @@ -1,4 +1,4 @@ Source: cereal -Version: 1.2.2-1 +Version: 1.2.2-2 Homepage: https://github.com/USCiLab/cereal Description: a header-only C++11 serialization library (built in support for binary, XML and JSon) diff --git a/ports/cereal/portfile.cmake b/ports/cereal/portfile.cmake index 47eb76c49..de056150d 100644 --- a/ports/cereal/portfile.cmake +++ b/ports/cereal/portfile.cmake @@ -18,8 +18,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/cmake/cereal") +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/cereal) # Clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/ceres/0001_add_missing_include_path.patch b/ports/ceres/0001_add_missing_include_path.patch deleted file mode 100644 index 8bb8dfb50..000000000 --- a/ports/ceres/0001_add_missing_include_path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 02c72b5..15a947e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -582,7 +582,7 @@ include_directories( - # Note that this is *not* propagated to clients, ie CERES_INCLUDE_DIRS - # used by clients after find_package(Ceres) does not identify Eigen as - # as system headers. --include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) -+include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}/Eigen) - - if (SUITESPARSE) - include_directories(${SUITESPARSE_INCLUDE_DIRS}) diff --git a/ports/ceres/0002_cmakelists_fixes.patch b/ports/ceres/0001_cmakelists_fixes.patch similarity index 81% rename from ports/ceres/0002_cmakelists_fixes.patch rename to ports/ceres/0001_cmakelists_fixes.patch index f806794a8..f269f05ee 100644 --- a/ports/ceres/0002_cmakelists_fixes.patch +++ b/ports/ceres/0001_cmakelists_fixes.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 15a947e..62d8c59 100644 +index 02c72b5..62d8c59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -374,27 +374,7 @@ if (MINIGLOG) @@ -31,6 +31,15 @@ index 15a947e..62d8c59 100644 endif (MINIGLOG) if (NOT SCHUR_SPECIALIZATIONS) +@@ -582,7 +562,7 @@ include_directories( + # Note that this is *not* propagated to clients, ie CERES_INCLUDE_DIRS + # used by clients after find_package(Ceres) does not identify Eigen as + # as system headers. +-include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) ++include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}/Eigen) + + if (SUITESPARSE) + include_directories(${SUITESPARSE_INCLUDE_DIRS}) @@ -917,8 +897,6 @@ install(FILES "${Ceres_BINARY_DIR}/CeresConfig-install.cmake" DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR}) install(FILES "${Ceres_BINARY_DIR}/CeresConfigVersion.cmake" diff --git a/ports/ceres/0003_use_glog_target.patch b/ports/ceres/0002_use_glog_target.patch similarity index 100% rename from ports/ceres/0003_use_glog_target.patch rename to ports/ceres/0002_use_glog_target.patch diff --git a/ports/ceres/0004_fix_exported_ceres_config.patch b/ports/ceres/0003_fix_exported_ceres_config.patch similarity index 100% rename from ports/ceres/0004_fix_exported_ceres_config.patch rename to ports/ceres/0003_fix_exported_ceres_config.patch diff --git a/ports/ceres/0004_blas_linux_fix.patch b/ports/ceres/0004_blas_linux_fix.patch new file mode 100644 index 000000000..5fffee5e2 --- /dev/null +++ b/ports/ceres/0004_blas_linux_fix.patch @@ -0,0 +1,22 @@ +diff --git a/internal/ceres/blas.cc b/internal/ceres/blas.cc +index 3ba63bb..071a26e 100644 +--- a/internal/ceres/blas.cc ++++ b/internal/ceres/blas.cc +@@ -33,7 +33,7 @@ + #include "glog/logging.h" + + #ifndef CERES_NO_LAPACK +-extern "C" void dsyrk_(char* uplo, ++extern "C" void dsyrk(char* uplo, + char* trans, + int* n, + int* k, +@@ -64,7 +64,7 @@ void BLAS::SymmetricRankKUpdate(int num_rows, + int k = transpose ? num_rows : num_cols; + int lda = k; + int ldc = n; +- dsyrk_(&uplo, ++ dsyrk(&uplo, + &trans, + &n, + &k, diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index 8cd34102e..850da31a6 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,5 +1,5 @@ Source: ceres -Version: 1.14.0-4 +Version: 1.14.0-6 Build-Depends: glog, eigen3 Homepage: https://github.com/ceres-solver/ceres-solver Description: non-linear optimization package diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index f1b21d647..66481fc09 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -1,3 +1,5 @@ +include(vcpkg_common_functions) + set(MSVC_USE_STATIC_CRT_VALUE OFF) if(VCPKG_CRT_LINKAGE STREQUAL "static") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -6,7 +8,9 @@ if(VCPKG_CRT_LINKAGE STREQUAL "static") set(MSVC_USE_STATIC_CRT_VALUE ON) endif() -include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(ADDITIONAL_PATCH "0004_blas_linux_fix.patch") +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -15,10 +19,10 @@ vcpkg_from_github( SHA512 6dddddf5bd5834332a69add468578ad527e4d94fe85c9751ddf5fe9ad11a34918bdd9c994c49dd6ffc398333d0ac9752ac89aaef1293e2fe0a55524e303d415d HEAD_REF master PATCHES - 0001_add_missing_include_path.patch - 0002_cmakelists_fixes.patch - 0003_use_glog_target.patch - 0004_fix_exported_ceres_config.patch + 0001_cmakelists_fixes.patch + 0002_use_glog_target.patch + 0003_fix_exported_ceres_config.patch + ${ADDITIONAL_PATCH} ) file(REMOVE ${SOURCE_PATH}/cmake/FindGflags.cmake) @@ -70,9 +74,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib${LIB_SUFFIX}/cmake/Ceres") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib${LIB_SUFFIX}/cmake/Ceres) endif() vcpkg_copy_pdbs() diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 873298305..e152f7b76 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "Cgal's buildsystem uses very long paths and may fail on your system.\n" + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() diff --git a/ports/clapack/CONTROL b/ports/clapack/CONTROL index 75755fe21..2b5d137fc 100644 --- a/ports/clapack/CONTROL +++ b/ports/clapack/CONTROL @@ -1,5 +1,5 @@ Source: clapack -Version: 3.2.1-6 +Version: 3.2.1-9 Homepage: https://www.netlib.org/clapack Description: CLAPACK (f2c'ed version of LAPACK) Build-Depends: openblas (!osx) diff --git a/ports/clapack/FindLAPACK.cmake b/ports/clapack/FindLAPACK.cmake index dfbf2c73e..002218eb8 100644 --- a/ports/clapack/FindLAPACK.cmake +++ b/ports/clapack/FindLAPACK.cmake @@ -66,39 +66,62 @@ include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) include(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake) set(CLAPACK_VERSION "3.2.1") +set(CMAKE_THREAD_PREFER_PTHREAD TRUE) +find_dependency(Threads) + if(UNIX) find_library(ADDITIONAL_LAPACK_LIBRARY m) + set(PTHREAD_LINK_NAME "-pthread") endif() if(NOT F2C_LIBRARY) - find_library(F2C_LIBRARY_RELEASE NAMES f2c libf2c) - find_library(F2C_LIBRARY_DEBUG NAMES f2cd libf2cd) - list(APPEND F2C_LIBRARY_RELEASE ${ADDITIONAL_LAPACK_LIBRARY}) - list(APPEND F2C_LIBRARY_DEBUG ${ADDITIONAL_LAPACK_LIBRARY}) - select_library_configurations(F2C) -endif() + find_library(F2C_LIBRARY_RELEASE NAMES f2c libf2c) + find_library(F2C_LIBRARY_DEBUG NAMES f2cd libf2cd) + select_library_configurations(F2C) -find_package(BLAS) + #keep a list of "pure" f2c libs, without dependencies + set(oF2C_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE}) + set(oF2C_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG}) + set(oF2C_LIBRARY ${F2C_LIBRARY}) + + list(APPEND F2C_LIBRARY ${ADDITIONAL_LAPACK_LIBRARY}) +endif() if(NOT LAPACK_LIBRARY) - find_library(LAPACK_LIBRARY_RELEASE NAMES lapack) - find_library(LAPACK_LIBRARY_DEBUG NAMES lapackd) - list(APPEND LAPACK_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE}) - list(APPEND LAPACK_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG}) - select_library_configurations(LAPACK) + find_library(LAPACK_LIBRARY_RELEASE NAMES lapack) + find_library(LAPACK_LIBRARY_DEBUG NAMES lapackd) + + #keep a list of "pure" lapack libs, without dependencies + set(oLAPACK_LIBRARY_RELEASE ${LAPACK_LIBRARY_RELEASE}) + set(oLAPACK_LIBRARY_DEBUG ${LAPACK_LIBRARY_DEBUG}) + select_library_configurations(oLAPACK) + + list(APPEND LAPACK_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE}) + list(APPEND LAPACK_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG}) + + find_dependency(BLAS) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_RELEASE) + if(NOT _loc) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_RELEASE) + endif() + set(LAPACK_BLAS_LIBRARY_RELEASE ${_loc}) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_DEBUG) + if(NOT _loc) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_DEBUG) + endif() + set(LAPACK_BLAS_LIBRARY_DEBUG ${_loc}) + select_library_configurations(LAPACK_BLAS) + list(APPEND LAPACK_LIBRARY_RELEASE ${LAPACK_BLAS_LIBRARY_RELEASE}) + list(APPEND LAPACK_LIBRARY_DEBUG ${LAPACK_BLAS_LIBRARY_DEBUG}) + + select_library_configurations(LAPACK) + list(APPEND LAPACK_LIBRARY Threads::Threads) endif() -list(APPEND LAPACK_LIBRARY ${BLAS_LIBRARIES}) - -set(F2C_LIBRARIES "${F2C_LIBRARY}" CACHE STRING "" FORCE) -set(LAPACK_VERSION "${CLAPACK_VERSION}" CACHE STRING "" FORCE) -set(LAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) -set(CLAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) -set(CLAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) - if(NOT F2C_INCLUDE_DIR) find_path(F2C_INCLUDE_DIR NAMES f2c.h) endif() @@ -108,87 +131,29 @@ if(NOT LAPACK_INCLUDE_DIR) endif() list(APPEND LAPACK_INCLUDE_DIR ${F2C_INCLUDE_DIR}) +set(LAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) set(LAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) set(CLAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) set(CLAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) set(F2C_INCLUDE_DIRS "${F2C_INCLUDE_DIR}" CACHE PATH "" FORCE) +set(LAPACK_DLL_DIR ${LAPACK_INCLUDE_DIR}) +list(TRANSFORM LAPACK_DLL_DIR APPEND "/../bin") +message(STATUS "LAPACK_DLL_DIR: ${LAPACK_DLL_DIR}") + if(WIN32) - string( REPLACE ".lib" ".dll" LAPACK_LIBRARY_RELEASE_DLL "${LAPACK_LIBRARY_RELEASE}" ) - string( REPLACE ".lib" ".dll" LAPACK_LIBRARY_DEBUG_DLL "${LAPACK_LIBRARY_DEBUG}" ) - string( REPLACE ".lib" ".dll" F2C_LIBRARY_RELEASE_DLL "${F2C_LIBRARY_RELEASE}" ) - string( REPLACE ".lib" ".dll" F2C_LIBRARY_DEBUG_DLL "${F2C_LIBRARY_DEBUG}" ) + find_file(LAPACK_LIBRARY_RELEASE_DLL NAMES lapack.dll PATHS ${LAPACK_DLL_DIR}) + find_file(LAPACK_LIBRARY_DEBUG_FOLDER NAMES lapackd.dll PATHS ${LAPACK_DLL_DIR}) + find_file(F2C_LIBRARY_RELEASE_DLL NAMES f2c.dll libf2c.dll PATHS ${LAPACK_DLL_DIR}) + find_file(F2C_LIBRARY_DEBUG_DLL NAMES f2cd.dll libf2cd.dll PATHS ${LAPACK_DLL_DIR}) endif() -find_package_handle_standard_args(CLAPACK DEFAULT_MSG CLAPACK_LIBRARY CLAPACK_INCLUDE_DIR) -mark_as_advanced(CLAPACK_INCLUDE_DIR CLAPACK_LIBRARY) - -find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARY LAPACK_INCLUDE_DIR) -mark_as_advanced(LAPACK_INCLUDE_DIR LAPACK_LIBRARY) - -find_package_handle_standard_args(F2C DEFAULT_MSG F2C_LIBRARY F2C_INCLUDE_DIR) -mark_as_advanced(F2C_INCLUDE_DIR F2C_LIBRARY) - -#TARGETS -if( CLAPACK_FOUND AND NOT TARGET clapack::clapack ) - if( EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}" ) - add_library( clapack::clapack SHARED IMPORTED ) - set_target_properties( clapack::clapack PROPERTIES - IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" - IMPORTED_IMPLIB "${LAPACK_LIBRARY_RELEASE}" - INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" - IMPORTED_CONFIGURATIONS Release - IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) - if( EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}" ) - set_property( TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) - set_target_properties( clapack::clapack PROPERTIES - IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" - IMPORTED_IMPLIB_DEBUG "${LAPACK_LIBRARY_DEBUG}" ) - endif() - else() - add_library( clapack::clapack UNKNOWN IMPORTED ) - set_target_properties( clapack::clapack PROPERTIES - IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE}" - INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" - IMPORTED_CONFIGURATIONS Release - IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) - if( EXISTS "${LAPACK_LIBRARY_DEBUG}" ) - set_property( TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) - set_target_properties( clapack::clapack PROPERTIES - IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG}" ) - endif() - endif() -endif() - -if( CLAPACK_FOUND AND NOT TARGET lapack ) - if( EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}" ) - add_library( lapack SHARED IMPORTED ) - set_target_properties( lapack PROPERTIES - IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" - IMPORTED_IMPLIB "${LAPACK_LIBRARY_RELEASE}" - INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" - IMPORTED_CONFIGURATIONS Release - IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) - if( EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}" ) - set_property( TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) - set_target_properties( lapack PROPERTIES - IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" - IMPORTED_IMPLIB_DEBUG "${LAPACK_LIBRARY_DEBUG}" ) - endif() - else() - add_library( lapack UNKNOWN IMPORTED ) - set_target_properties( lapack PROPERTIES - IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE}" - INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" - IMPORTED_CONFIGURATIONS Release - IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) - if( EXISTS "${LAPACK_LIBRARY_DEBUG}" ) - set_property( TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) - set_target_properties( lapack PROPERTIES - IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG}" ) - endif() - endif() -endif() +set(LAPACK_BLAS_LIBRARY "${LAPACK_BLAS_LIBRARY}" CACHE STRING "" FORCE) +set(F2C_LIBRARIES "${F2C_LIBRARY}" CACHE STRING "" FORCE) +set(LAPACK_VERSION "${CLAPACK_VERSION}" CACHE STRING "" FORCE) +set(LAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) +set(CLAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) +set(CLAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) set(LAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) set(F2C_LIBRARY "${F2C_LIBRARY}" CACHE STRING "" FORCE) @@ -196,3 +161,77 @@ set(LAPACK_LIBRARY_RELEASE "${LAPACK_LIBRARY_RELEASE}" CACHE STRING "" FORCE) set(LAPACK_LIBRARY_DEBUG "${LAPACK_LIBRARY_DEBUG}" CACHE STRING "" FORCE) set(F2C_LIBRARY_RELEASE "${F2C_LIBRARY_RELEASE}" CACHE STRING "" FORCE) set(F2C_LIBRARY_DEBUG "${F2C_LIBRARY_DEBUG}" CACHE STRING "" FORCE) + +find_package_handle_standard_args(CLAPACK DEFAULT_MSG CLAPACK_LIBRARY CLAPACK_INCLUDE_DIR) +mark_as_advanced(CLAPACK_INCLUDE_DIR CLAPACK_LIBRARY) + +find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARY LAPACK_INCLUDE_DIR) +mark_as_advanced(LAPACK_INCLUDE_DIR LAPACK_LIBRARY) + +find_package_handle_standard_args(F2C DEFAULT_MSG F2C_LIBRARY F2C_INCLUDE_DIR) +mark_as_advanced(F2C_INCLUDE_DIR F2C_LIBRARY) + +#TARGETS +if(CLAPACK_FOUND AND NOT TARGET clapack::clapack) + if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}") + add_library(clapack::clapack SHARED IMPORTED) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}") + set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + else() + add_library(clapack::clapack UNKNOWN IMPORTED) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG}") + set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + endif() +endif() + +if(CLAPACK_FOUND AND NOT TARGET lapack) + if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}") + add_library(lapack SHARED IMPORTED) + set_target_properties(lapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}") + set_property(TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(lapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + else() + add_library(lapack UNKNOWN IMPORTED) + set_target_properties(lapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG}") + set_property(TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(lapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + endif() +endif() diff --git a/ports/clapack/enable_openblas_compat.patch b/ports/clapack/enable_openblas_compat.patch new file mode 100644 index 000000000..319935475 --- /dev/null +++ b/ports/clapack/enable_openblas_compat.patch @@ -0,0 +1,112 @@ +diff --git a/INCLUDE/blaswrap.h b/INCLUDE/blaswrap.h +index 333a17a..fb6750a 100644 +--- a/INCLUDE/blaswrap.h ++++ b/INCLUDE/blaswrap.h +@@ -155,6 +155,107 @@ + #define ctrsm_ f2c_ctrsm + #define ztrsm_ f2c_ztrsm + ++#else ++ ++#define sswap_ sswap ++#define saxpy_ saxpy ++#define sasum_ sasum ++#define isamax_ isamax ++#define scopy_ scopy ++#define sscal_ sscal ++#define sger_ sger ++#define snrm2_ snrm2 ++#define ssymv_ ssymv ++#define sdot_ sdot ++#define saxpy_ saxpy ++#define ssyr2_ ssyr2 ++#define srot_ srot ++#define sgemv_ sgemv ++#define strsv_ strsv ++#define sgemm_ sgemm ++#define strsm_ strsm ++ ++#define dswap_ dswap ++#define daxpy_ daxpy ++#define dasum_ dasum ++#define idamax_ idamax ++#define dcopy_ dcopy ++#define dscal_ dscal ++#define dger_ dger ++#define dnrm2_ dnrm2 ++#define dsymv_ dsymv ++#define ddot_ ddot ++#define dsyr2_ dsyr2 ++#define drot_ drot ++#define dgemv_ dgemv ++#define dtrsv_ dtrsv ++#define dgemm_ dgemm ++#define dtrsm_ dtrsm ++ ++#define cswap_ cswap ++#define caxpy_ caxpy ++#define scasum_ scasum ++#define icamax_ icamax ++#define ccopy_ ccopy ++#define cscal_ cscal ++#define scnrm2_ scnrm2 ++#define cgemv_ cgemv ++#define ctrsv_ ctrsv ++#define cgemm_ cgemm ++#define ctrsm_ ctrsm ++#define cgerc_ cgerc ++#define chemv_ chemv ++#define cher2_ cher2 ++ ++#define zswap_ zswap ++#define zaxpy_ zaxpy ++#define dzasum_ dzasum ++#define izamax_ izamax ++#define zcopy_ zcopy ++#define zscal_ zscal ++#define dznrm2_ dznrm2 ++#define zgemv_ zgemv ++#define ztrsv_ ztrsv ++#define zgemm_ zgemm ++#define ztrsm_ ztrsm ++#define zgerc_ zgerc ++#define zhemv_ zhemv ++#define zher2_ zher2 ++ ++/* LAPACK */ ++#define dlacon_ dlacon ++#define slacon_ slacon ++#define icmax1_ icmax1 ++#define scsum1_ scsum1 ++#define clacon_ clacon ++#define dzsum1_ dzsum1 ++#define izmax1_ izmax1 ++#define zlacon_ zlacon ++ ++/* Fortran interface */ ++#define c_bridge_dgssv_ c_bridge_dgssv ++#define c_fortran_sgssv_ c_fortran_sgssv ++#define c_fortran_dgssv_ c_fortran_dgssv ++#define c_fortran_cgssv_ c_fortran_cgssv ++#define c_fortran_zgssv_ c_fortran_zgssv ++ ++#define cdotc_ cdotc ++#define cdotu_ cdotu ++#define csscal_ csscal ++#define zdscal_ zdscal ++#define zdotc_ zdotc ++#define zdotu_ zdotu ++#define ctrmm_ ctrmm ++#define dtrmm_ dtrmm ++#define strmm_ strmm ++#define ztrmm_ ztrmm ++#define cgeru_ cgeru ++#define zgeru_ zgeru ++#define xerbla_ xerbla ++#define dtrmv_ dtrmv ++#define dsyrk_ dsyrk ++#define zherk_ zherk ++ + #endif /* NO_BLAS_WRAP */ + + #endif /* __BLASWRAP_H */ diff --git a/ports/clapack/openblas_linux.patch b/ports/clapack/openblas_linux.patch deleted file mode 100644 index e2b7b6e82..000000000 --- a/ports/clapack/openblas_linux.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c729d95..2b15e31 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,6 +1,6 @@ - cmake_minimum_required(VERSION 2.6) - project(CLAPACK C) --find_package(BLAS REQUIRED) -+find_package(OpenBLAS REQUIRED) - - if(WIN32 AND NOT CYGWIN) - set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c) diff --git a/ports/clapack/portfile.cmake b/ports/clapack/portfile.cmake index ecdf51c87..2845bbdc2 100644 --- a/ports/clapack/portfile.cmake +++ b/ports/clapack/portfile.cmake @@ -1,5 +1,11 @@ include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + message(WARNING "You do not need this package on macOS, since you already have the Accelerate Framework") + return() +endif() + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_download_distfile(ARCHIVE @@ -9,7 +15,7 @@ vcpkg_download_distfile(ARCHIVE ) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(ADDITIONAL_PATCH "openblas_linux.patch") + set(ADDITIONAL_PATCH "enable_openblas_compat.patch") endif() vcpkg_extract_source_archive_ex( @@ -31,7 +37,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() #TODO: fix the official exported targets, since they are broken (luckily it seems that no-one uses them for now) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/clapack) +vcpkg_fixup_cmake_targets() #we install a cmake wrapper since the official FindLAPACK module in cmake does find clapack easily, unfortunately... file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) diff --git a/ports/clapack/remove_internal_blas.patch b/ports/clapack/remove_internal_blas.patch index 471d87a87..3b8c59b4c 100644 --- a/ports/clapack/remove_internal_blas.patch +++ b/ports/clapack/remove_internal_blas.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 320ccc6..284e9d3 100755 +index 320ccc6..414ac8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,6 @@ @@ -45,7 +45,7 @@ index 320ccc6..284e9d3 100755 + DESTINATION include) + diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt -index 43d7b3f..6fa3598 100755 +index 43d7b3f..6fa3598 100644 --- a/F2CLIBS/libf2c/CMakeLists.txt +++ b/F2CLIBS/libf2c/CMakeLists.txt @@ -60,3 +60,11 @@ include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c) @@ -61,7 +61,7 @@ index 43d7b3f..6fa3598 100755 + ARCHIVE DESTINATION lib) + diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt -index ac4cce3..07dc8c7 100755 +index ac4cce3..07dc8c7 100644 --- a/SRC/CMakeLists.txt +++ b/SRC/CMakeLists.txt @@ -376,5 +376,9 @@ if(BUILD_COMPLEX16) @@ -75,10 +75,3 @@ index ac4cce3..07dc8c7 100755 + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) -diff --git a/clapack-config.cmake.in b/clapack-config.cmake.in -index cd19f1d..597f474 100755 ---- a/clapack-config.cmake.in -+++ b/clapack-config.cmake.in -@@ -1 +1 @@ --include("@CLAPACK_BINARY_DIR@/clapack-targets.cmake") -+include("@CLAPACK_BINARY_DIR@/clapack-targets.cmake") diff --git a/ports/clapack/vcpkg-cmake-wrapper.cmake b/ports/clapack/vcpkg-cmake-wrapper.cmake index 69c54ea0d..aee3e1e08 100644 --- a/ports/clapack/vcpkg-cmake-wrapper.cmake +++ b/ports/clapack/vcpkg-cmake-wrapper.cmake @@ -1,4 +1,8 @@ set(LAPACK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -_find_package(${ARGS}) + +if(NOT LAPACK_LIBRARIES) + _find_package(${ARGS}) +endif() + set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH}) diff --git a/ports/clblas/CONTROL b/ports/clblas/CONTROL index 416376579..3837fcbca 100644 --- a/ports/clblas/CONTROL +++ b/ports/clblas/CONTROL @@ -1,4 +1,4 @@ Source: clblas -Version: 2.12-1 +Version: 2.12-2 Build-Depends: opencl Description: clBLAS is an OpenCL 1.2 accelerated BLAS (Basic Linear Algebra Subsystem) library. diff --git a/ports/clblas/portfile.cmake b/ports/clblas/portfile.cmake index 9088fc2e9..5619cea8f 100644 --- a/ports/clblas/portfile.cmake +++ b/ports/clblas/portfile.cmake @@ -53,6 +53,6 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vcruntime140d.dll ) -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/clfft/CONTROL b/ports/clfft/CONTROL index d65da1995..4cc887f47 100644 --- a/ports/clfft/CONTROL +++ b/ports/clfft/CONTROL @@ -1,5 +1,5 @@ Source: clfft -Version: 2.12.2 +Version: 2.12.2-1 Build-Depends: opencl Homepage: https://github.com/clMathLibraries/clFFT Description: clFFT is an OpenCL 1.2 accelerated Fast Fourier Transform library. diff --git a/ports/clfft/portfile.cmake b/ports/clfft/portfile.cmake index 4e314b5d9..6ef4ec6f7 100644 --- a/ports/clfft/portfile.cmake +++ b/ports/clfft/portfile.cmake @@ -32,6 +32,6 @@ file(INSTALL ${CURRENT_PACKAGES_DIR}/share/clfft/copyright ) -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/cli/CONTROL b/ports/cli/CONTROL index 13fa3d73b..a7db9c2ed 100644 --- a/ports/cli/CONTROL +++ b/ports/cli/CONTROL @@ -1,4 +1,4 @@ Source: cli -Version: 1.1 +Version: 1.1-1 Description: A library for interactive command line interfaces in modern C++ Build-Depends: boost-asio diff --git a/ports/cli/portfile.cmake b/ports/cli/portfile.cmake index 3a340b50f..c83f75dd8 100644 --- a/ports/cli/portfile.cmake +++ b/ports/cli/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO daniele77/cli REF v1.1.0 - SHA512 a3aeac666567359521d625442f5a03b35ea1e6cf7bd63cdc52dfea20397a1726ce34aeab08ffd7181b9390fb791c56e5aba0260e300329ff327282f1547940c8 + SHA512 a3aeac666567359521d625442f5a03b35ea1e6cf7bd63cdc52dfea20397a1726ce34aeab08ffd7181b9390fb791c56e5aba0260e300329ff327282f1547940c8 HEAD_REF master ) @@ -14,7 +14,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cli TARGET_PATH share/cli) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cli) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cli RENAME copyright) diff --git a/ports/clp/CMakeLists.txt b/ports/clp/CMakeLists.txt index 94f6559d9..cced65c98 100644 --- a/ports/clp/CMakeLists.txt +++ b/ports/clp/CMakeLists.txt @@ -12,7 +12,7 @@ set(CMAKE_CXX_STANDARD 14) set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed") -set(INSTALL_CMAKE_DIR "share/${PROJECT_NAME}" CACHE PATH "Path where cmake configs will be installed") +set(INSTALL_CMAKE_DIR "share/clp" CACHE PATH "Path where cmake configs will be installed") # Make relative paths absolute (needed later on) set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) diff --git a/ports/clp/CONTROL b/ports/clp/CONTROL index a0bdee5d3..adf2036bf 100644 --- a/ports/clp/CONTROL +++ b/ports/clp/CONTROL @@ -1,4 +1,4 @@ Source: clp -Version: 1.17.2-1 +Version: 1.17.2-2 Description: Clp (Coin-or linear programming) is an open-source linear programming solver written in C++. It is primarily meant to be used as a callable library, but a basic, stand-alone executable version is also available. Build-Depends: coinutils, osi diff --git a/ports/clp/portfile.cmake b/ports/clp/portfile.cmake index 83581af35..945a38199 100644 --- a/ports/clp/portfile.cmake +++ b/ports/clp/portfile.cmake @@ -19,11 +19,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") #on case-sensitive filesystems, it's necessary to rename and make it lowercase - vcpkg_fixup_cmake_targets(CONFIG_PATH share/Clp) -else() - vcpkg_fixup_cmake_targets() -endif() +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/coinutils/CMakeLists.txt b/ports/coinutils/CMakeLists.txt index bdaf5969b..643bbec44 100644 --- a/ports/coinutils/CMakeLists.txt +++ b/ports/coinutils/CMakeLists.txt @@ -12,7 +12,7 @@ set(CMAKE_CXX_STANDARD 14) set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed") -set(INSTALL_CMAKE_DIR "share/${PROJECT_NAME}" CACHE PATH "Path where cmake configs will be installed") +set(INSTALL_CMAKE_DIR "share/coinutils" CACHE PATH "Path where cmake configs will be installed") # Make relative paths absolute (needed later on) set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) diff --git a/ports/coinutils/CONTROL b/ports/coinutils/CONTROL index fd495d62d..13db5a937 100644 --- a/ports/coinutils/CONTROL +++ b/ports/coinutils/CONTROL @@ -1,3 +1,3 @@ Source: coinutils -Version: 2.11.2-1 +Version: 2.11.2-2 Description: CoinUtils (Coin-or Utilities) is an open-source collection of classes and functions that are generally useful to more than one COIN-OR project diff --git a/ports/coinutils/portfile.cmake b/ports/coinutils/portfile.cmake index 42bd8d2d1..23a2a673d 100644 --- a/ports/coinutils/portfile.cmake +++ b/ports/coinutils/portfile.cmake @@ -19,11 +19,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") #on case-sensitive filesystems, it's necessary to rename and make it lowercase - vcpkg_fixup_cmake_targets(CONFIG_PATH share/CoinUtils) -else() - vcpkg_fixup_cmake_targets() -endif() +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/collada-dom/CONTROL b/ports/collada-dom/CONTROL index 6625c5a4a..952f4ae50 100644 --- a/ports/collada-dom/CONTROL +++ b/ports/collada-dom/CONTROL @@ -1,4 +1,4 @@ Source: collada-dom -Version: 2.5.0 +Version: 2.5.0-1 Description: The COLLADA Document Object Model (DOM) is an application programming interface (API) that provides a C++ object representation of a COLLADA XML instance document. -Build-Depends: zlib, libxml2, minizip, pcre, uriparser, boost-filesystem, boost-system \ No newline at end of file +Build-Depends: zlib, libxml2, minizip, pcre, uriparser, boost-filesystem, boost-system diff --git a/ports/collada-dom/portfile.cmake b/ports/collada-dom/portfile.cmake index eda714af1..f36d8e4a9 100644 --- a/ports/collada-dom/portfile.cmake +++ b/ports/collada-dom/portfile.cmake @@ -18,11 +18,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/collada_dom-2.5") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/collada_dom-2.5) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright file(INSTALL ${SOURCE_PATH}/licenses/license_e.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/collada-dom - RENAME copyright) \ No newline at end of file + RENAME copyright) diff --git a/ports/console-bridge/CONTROL b/ports/console-bridge/CONTROL index f9d10b7e0..47870b72e 100644 --- a/ports/console-bridge/CONTROL +++ b/ports/console-bridge/CONTROL @@ -1,4 +1,4 @@ Source: console-bridge -Version: 0.3.2-3 +Version: 0.3.2-4 Homepage: https://github.com/ros/console_bridge Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages. diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake index dc618b4b9..8b99e125b 100644 --- a/ports/console-bridge/portfile.cmake +++ b/ports/console-bridge/portfile.cmake @@ -22,9 +22,9 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/console_bridge) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/console_bridge) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/console_bridge/cmake" TARGET_PATH share/console_bridge) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/console_bridge/cmake TARGET_PATH share/console_bridge) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/console_bridge) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/console_bridge) endif() diff --git a/ports/cpp-netlib/CONTROL b/ports/cpp-netlib/CONTROL index 361c4dced..9d33aa289 100644 --- a/ports/cpp-netlib/CONTROL +++ b/ports/cpp-netlib/CONTROL @@ -1,4 +1,4 @@ Source: cpp-netlib -Version: 0.13.0-final +Version: 0.13.0-2 +Build-Depends: boost Description: A collection of network-related routines/implementations geared towards providing a robust cross-platform networking library -Build-Depends: boost \ No newline at end of file diff --git a/ports/cpp-netlib/portfile.cmake b/ports/cpp-netlib/portfile.cmake index b57efdbf1..abea253d8 100644 --- a/ports/cpp-netlib/portfile.cmake +++ b/ports/cpp-netlib/portfile.cmake @@ -9,7 +9,7 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cpp-netlib/cpp-netlib - REF cpp-netlib-0.13.0-final + REF cpp-netlib-0.13.0-final SHA512 1839bf1acb7917acd2957f1008a44ed26a38849afb5843bfa0d5c557dde530afab4183d8d273a87d6416aad2b3a59fdecdef5fbb62bc91ed484486c80a1de5eb HEAD_REF master ) @@ -20,18 +20,17 @@ vcpkg_from_github( OPTIONS -DCPP-NETLIB_BUILD_TESTS=off -DCPP-NETLIB_BUILD_EXAMPLES=off - + ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(WIN32 AND NOT CYGWIN) - vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/${PORT}) +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) else() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cppnetlib) endif() file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - diff --git a/ports/crc32c/CONTROL b/ports/crc32c/CONTROL index 329b5a3bf..764a0f2d8 100644 --- a/ports/crc32c/CONTROL +++ b/ports/crc32c/CONTROL @@ -1,4 +1,4 @@ Source: crc32c -Version: 1.0.7 +Version: 1.0.7-1 Homepage: https://github.com/google/crc32c Description: CRC32C implementation with support for CPU-specific acceleration instructions. diff --git a/ports/crc32c/portfile.cmake b/ports/crc32c/portfile.cmake index 1802c0c35..a15961f94 100644 --- a/ports/crc32c/portfile.cmake +++ b/ports/crc32c/portfile.cmake @@ -20,7 +20,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Crc32c") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Crc32c) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/cryptopp/CONTROL b/ports/cryptopp/CONTROL index 76c754565..04c25da70 100644 --- a/ports/cryptopp/CONTROL +++ b/ports/cryptopp/CONTROL @@ -1,4 +1,4 @@ Source: cryptopp -Version: 8.1.0-1 +Version: 8.1.0-2 Homepage: https://github.com/weidai11/cryptopp Description: Crypto++ is a free C++ class library of cryptographic schemes. diff --git a/ports/cryptopp/portfile.cmake b/ports/cryptopp/portfile.cmake index ad6557f77..728436d59 100644 --- a/ports/cryptopp/portfile.cmake +++ b/ports/cryptopp/portfile.cmake @@ -27,7 +27,7 @@ file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) # disable assembly on OSX to fix broken build -if(APPLE) +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(CRYPTOPP_DISABLE_ASM "ON") else() set(CRYPTOPP_DISABLE_ASM "OFF") diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 1c607bce3..bd7c4b39b 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.65.0-1 +Version: 7.65.0-2 Build-Depends: zlib Homepage: https://github.com/curl/curl Description: A library for transferring data with URLs diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 294c7a758..5366fe88c 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -113,7 +113,7 @@ vcpkg_install_cmake() if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/CURL) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CURL) elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/curl) - vcpkg_fixup_cmake_targets(CONFIG_PATH share/curl) + vcpkg_fixup_cmake_targets() else() message(FATAL_ERROR "Could not locate the curl config files") endif() diff --git a/ports/cxxopts/CONTROL b/ports/cxxopts/CONTROL index 5d1a92d91..1d5664cec 100644 --- a/ports/cxxopts/CONTROL +++ b/ports/cxxopts/CONTROL @@ -1,4 +1,4 @@ Source: cxxopts -Version: 2.1.2 +Version: 2.1.2-1 Homepage: https://github.com/jarro2783/cxxopts Description: This is a lightweight C++ option parser library, supporting the standard GNU style syntax for options diff --git a/ports/cxxopts/portfile.cmake b/ports/cxxopts/portfile.cmake index d3b4fec56..dd5981e7d 100644 --- a/ports/cxxopts/portfile.cmake +++ b/ports/cxxopts/portfile.cmake @@ -16,7 +16,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cxxopts TARGET_PATH share/cxxopts) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cxxopts) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index b67376ced..898b9ae71 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,4 +1,4 @@ Source: eigen3 -Version: 3.3.7-1 +Version: 3.3.7-2 Homepage: https://bitbucket.org/eigen/eigen Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake index 31806319f..ef6135373 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "eigen3's buildsystem uses very long paths and may fail on your system.\n" + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index a4ea22030..1868de82d 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,8 +1,8 @@ Source: exiv2 -Version: 0.27.1 +Version: 0.27.1-1 Build-Depends: zlib, expat, libiconv, gettext Description: Image metadata library and tools Homepage: https://www.exiv2.org Feature: unicode -Description: Compile with unicode support on windows \ No newline at end of file +Description: Compile with unicode support on windows diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 64ecfc28f..d9e1ecb4d 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -28,8 +28,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/exiv2/cmake") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/exiv2/cmake) configure_file( ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL index bc1a27ccc..aaae4f57b 100644 --- a/ports/fcl/CONTROL +++ b/ports/fcl/CONTROL @@ -1,5 +1,5 @@ Source: fcl -Version: 0.5.0-5 +Version: 0.5.0-6 Homepage: https://github.com/flexible-collision-library/fcl Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles Build-Depends: ccd, octomap diff --git a/ports/fcl/portfile.cmake b/ports/fcl/portfile.cmake index 1bb4e9a15..65ff738d0 100644 --- a/ports/fcl/portfile.cmake +++ b/ports/fcl/portfile.cmake @@ -34,9 +34,9 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/fcl") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fcl) endif() diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 209bb2306..4c1565679 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,5 +1,5 @@ Source: ffmpeg -Version: 4.1-6 +Version: 4.1-8 Homepage: https://ffmpeg.org Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. diff --git a/ports/ffmpeg/FindFFMPEG.cmake b/ports/ffmpeg/FindFFMPEG.cmake index f8e65f53a..65ab59e90 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake +++ b/ports/ffmpeg/FindFFMPEG.cmake @@ -1,13 +1,131 @@ -include(FindPackageHandleStandardArgs) +# Distributed under the OSI-approved BSD 3-Clause License. +# +#.rst: +# FindFFMPEG +# -------- +# +# Find the FFPMEG libraries +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# The following variables will be defined: +# +# ``FFMPEG_FOUND`` +# True if FFMPEG found on the local system +# +# ``FFMPEG_INCLUDE_DIRS`` +# Location of FFMPEG header files +# +# ``FFMPEG_LIBRARY_DIRS`` +# Location of FFMPEG libraries +# +# ``FFMPEG_LIBRARIES`` +# List of the FFMPEG libraries found +# +# Hints +# ^^^^^ +# +# ``FFMPEG_ROOT`` +# Set this variable to a directory that contains a FFMPEG installation +# +# -find_path(FFMPEG_INCLUDE_DIRS NAMES libavcodec/avcodec.h) -unset(FFMPEG_LIBRARIES) -foreach(FFMPEG_SUBLIBRARY avformat avdevice avcodec avutil swscale) - find_library(FFMPEG_lib${FFMPEG_SUBLIBRARY}_LIBRARY NAMES ${FFMPEG_SUBLIBRARY}) - list(APPEND FFMPEG_LIBRARIES ${FFMPEG_lib${FFMPEG_SUBLIBRARY}_LIBRARY}) -endforeach() -if(WIN32) - list(APPEND FFMPEG_LIBRARIES wsock32 ws2_32 Secur32) +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) +include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake) + +find_dependency(Threads) +#list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS Threads::Threads) +if(UNIX) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread) endif() -find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS) +# Platform dependent libraries required by FFMPEG +if(WIN32) + if(NOT CYGWIN) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS wsock32 ws2_32 Secur32) + endif() +else() + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS m) +endif() + +macro(FFMPEG_FIND varname shortname headername) + if(NOT FFMPEG_${varname}_INCLUDE_DIRS) + find_path(FFMPEG_${varname}_INCLUDE_DIRS NAMES lib${shortname}/${headername} ${headername} PATH_SUFFIXES ffmpeg) + endif() + if(NOT FFMPEG_${varname}_LIBRARY) + find_library(FFMPEG_${varname}_LIBRARY_RELEASE NAMES ${shortname} PATH_SUFFIXES ffmpeg ffmpeg/lib) + get_filename_component(FFMPEG_${varname}_LIBRARY_RELEASE_DIR ${FFMPEG_${varname}_LIBRARY_RELEASE} DIRECTORY) + find_library(FFMPEG_${varname}_LIBRARY_DEBUG NAMES ${shortname}d ${shortname} PATHS debug PATH_SUFFIXES ffmpeg ffmpeg/lib ffmpeg/debug/lib debug/ffmpeg/lib) + get_filename_component(FFMPEG_${varname}_LIBRARY_DEBUG_DIR ${FFMPEG_${varname}_LIBRARY_DEBUG} DIRECTORY) + select_library_configurations(FFMPEG_${varname}) + endif() + if (FFMPEG_${varname}_LIBRARY AND FFMPEG_${varname}_INCLUDE_DIRS) + set(FFMPEG_${varname}_FOUND 1) + list(APPEND FFMPEG_LIBRARY_DIRS ${FFMPEG_${varname}_LIBRARY_RELEASE_DIR} ${FFMPEG_${varname}_LIBRARY_DEBUG_DIR}) + endif() +endmacro(FFMPEG_FIND) + +macro(FFMPEG_FIND_GENEX varname shortname headername) + if(NOT FFMPEG_${varname}_INCLUDE_DIRS) + find_path(FFMPEG_${varname}_INCLUDE_DIRS NAMES lib${shortname}/${headername} ${headername} PATH_SUFFIXES ffmpeg) + endif() + if(NOT FFMPEG_${varname}_LIBRARY) + find_library(FFMPEG_${varname}_LIBRARY_RELEASE NAMES ${shortname} PATH_SUFFIXES ffmpeg ffmpeg/lib) + get_filename_component(FFMPEG_${varname}_LIBRARY_RELEASE_DIR ${FFMPEG_${varname}_LIBRARY_RELEASE} DIRECTORY) + find_library(FFMPEG_${varname}_LIBRARY_DEBUG NAMES ${shortname}d ${shortname} PATHS debug PATH_SUFFIXES ffmpeg ffmpeg/lib ffmpeg/debug/lib debug/ffmpeg/lib) + get_filename_component(FFMPEG_${varname}_LIBRARY_DEBUG_DIR ${FFMPEG_${varname}_LIBRARY_DEBUG} DIRECTORY) + set(FFMPEG_${varname}_LIBRARY "$<$:${FFMPEG_${varname}_LIBRARY_DEBUG}>$<$:${FFMPEG_${varname}_LIBRARY_RELEASE}>" CACHE STRING "") + set(FFMPEG_${varname}_LIBRARIES ${FFMPEG_${varname}_LIBRARY} CACHE STRING "") + endif() + if (FFMPEG_${varname}_LIBRARY AND FFMPEG_${varname}_INCLUDE_DIRS) + set(FFMPEG_${varname}_FOUND 1) + list(APPEND FFMPEG_LIBRARY_DIRS ${FFMPEG_${varname}_LIBRARY_RELEASE_DIR} ${FFMPEG_${varname}_LIBRARY_DEBUG_DIR}) + endif() +endmacro(FFMPEG_FIND) + +if(WIN32) + if(NOT FFMPEG_${varname}_INCLUDE_DIRS) + find_path(FFMPEG_stdint_INCLUDE_DIRS NAMES stdint.h PATH_SUFFIXES ffmpeg) + endif() + if (FFMPEG_stdint_INCLUDE_DIRS) + set(STDINT_OK TRUE) + endif() +else() + set(STDINT_OK TRUE) +endif() + +FFMPEG_FIND(libavcodec avcodec avcodec.h) +FFMPEG_FIND(libavdevice avdevice avdevice.h) +FFMPEG_FIND(libavfilter avfilter avfilter.h) +FFMPEG_FIND(libavformat avformat avformat.h) +FFMPEG_FIND(libavutil avutil avutil.h) +FFMPEG_FIND(libswresample swresample swresample.h) +FFMPEG_FIND(libswscale swscale swscale.h) +FFMPEG_FIND_GENEX(libzlib zlib zlib.h) + +if (FFMPEG_libavcodec_FOUND AND FFMPEG_libavdevice_FOUND AND FFMPEG_libavfilter_FOUND AND FFMPEG_libavformat_FOUND AND FFMPEG_libavutil_FOUND AND FFMPEG_libswresample_FOUND AND FFMPEG_libswscale_FOUND AND FFMPEG_libzlib_FOUND AND STDINT_OK) + list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_libavformat_INCLUDE_DIRS} ${FFMPEG_libavdevice_INCLUDE_DIRS} ${FFMPEG_libavcodec_INCLUDE_DIRS} ${FFMPEG_libavutil_INCLUDE_DIRS} ${FFMPEG_libswscale_INCLUDE_DIRS} ${FFMPEG_stdint_INCLUDE_DIRS}) + list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS) + list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS) + + list(APPEND FFMPEG_LIBRARIES + ${FFMPEG_libavformat_LIBRARY} + ${FFMPEG_libavdevice_LIBRARY} + ${FFMPEG_libavcodec_LIBRARY} + ${FFMPEG_libavutil_LIBRARY} + ${FFMPEG_libswscale_LIBRARY} + ${FFMPEG_libavfilter_LIBRARY} + ${FFMPEG_libswresample_LIBRARY} + ${FFMPEG_libzlib_LIBRARY} + ${FFMPEG_PLATFORM_DEPENDENT_LIBS} + ) + set(FFMPEG_LIBRARY ${FFMPEG_LIBRARIES}) + + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "") + set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "") + set(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBRARY_DIRS} CACHE STRING "") +endif() + +find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_LIBRARY_DIRS FFMPEG_INCLUDE_DIRS) diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 1ce53a996..15be7468b 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -36,7 +36,7 @@ else() set(LIB_PATH_VAR "LIBRARY_PATH") endif() -if (WIN32) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh) @@ -243,8 +243,7 @@ vcpkg_copy_pdbs() # Handle copyright # TODO: Examine build log and confirm that this license matches the build output -file(COPY ${SOURCE_PATH}/COPYING.LGPLv2.1 DESTINATION ${CURRENT_PACKAGES_DIR}/share/ffmpeg) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ffmpeg/COPYING.LGPLv2.1 ${CURRENT_PACKAGES_DIR}/share/ffmpeg/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LGPLv2.1 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -# Used by OpenCV -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ffmpeg) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/ffmpeg/vcpkg-cmake-wrapper.cmake b/ports/ffmpeg/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..322387565 --- /dev/null +++ b/ports/ffmpeg/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,8 @@ +set(FFMPEG_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +if(NOT FFMPEG_LIBRARIES) + _find_package(${ARGS}) +endif() + +set(CMAKE_MODULE_PATH ${FFMPEG_PREV_MODULE_PATH}) diff --git a/ports/fizz/CONTROL b/ports/fizz/CONTROL index 4f4856c47..ab3acb20e 100644 --- a/ports/fizz/CONTROL +++ b/ports/fizz/CONTROL @@ -1,4 +1,4 @@ Source: fizz -Version: 2019.05.20.00 +Version: 2019.05.20.00-1 Build-Depends: folly, openssl, libsodium, zlib Description: a TLS 1.3 implementation by Facebook diff --git a/ports/fizz/portfile.cmake b/ports/fizz/portfile.cmake index 0eb0f81bf..373f1d407 100644 --- a/ports/fizz/portfile.cmake +++ b/ports/fizz/portfile.cmake @@ -5,7 +5,7 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebookincubator/fizz - REF 6d26a1be8d7a20d8d89c374ee3dc5c452d18c18d + REF 6d26a1be8d7a20d8d89c374ee3dc5c452d18c18d SHA512 bc6aa17a97fdfc53d0a247b876cbd1fea8214608b7e463dcf21e34df65015fe77e617c5a6c6bfa84b87e60e56b6aeb89aa2d8d774f97fc1f76f415869948a48a HEAD_REF master PATCHES find-zlib.patch @@ -28,7 +28,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/fizz") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fizz) vcpkg_copy_pdbs() file(READ ${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake _contents) diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL index 8d553c197..3baf26b02 100644 --- a/ports/flatbuffers/CONTROL +++ b/ports/flatbuffers/CONTROL @@ -1,5 +1,5 @@ -Source: flatbuffers -Version: 1.11.0 -Description: Memory Efficient Serialization Library - FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility. -Homepage: https://google.github.io/flatbuffers/ +Source: flatbuffers +Version: 1.11.0-1 +Description: Memory Efficient Serialization Library + FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility. +Homepage: https://google.github.io/flatbuffers/ diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake index b954affe8..c619ac9ee 100644 --- a/ports/flatbuffers/portfile.cmake +++ b/ports/flatbuffers/portfile.cmake @@ -29,7 +29,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/flatbuffers") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/flatbuffers) file(GLOB flatc_path ${CURRENT_PACKAGES_DIR}/bin/flatc*) if(flatc_path) diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index abf32aa99..2317c780e 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -73,7 +73,7 @@ vcpkg_install_cmake(ADD_BIN_TO_PATH) vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/folly) +vcpkg_fixup_cmake_targets() # Release folly-targets.cmake does not link to the right libraries in debug mode. # We substitute with generator expressions so that the right libraries are linked for debug and release. diff --git a/ports/freeimage/CMakeLists.txt b/ports/freeimage/CMakeLists.txt index 60c7f9bd8..af3d1c37f 100644 --- a/ports/freeimage/CMakeLists.txt +++ b/ports/freeimage/CMakeLists.txt @@ -4,9 +4,6 @@ include(GNUInstallDirs) project(FreeImage C CXX) -set(CMAKE_MODULE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/share/JXR" ${CMAKE_MODULE_PATH}) -set(CMAKE_MODULE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/share/OpenEXR" ${CMAKE_MODULE_PATH}) - if(MSVC) add_definitions("-D_CRT_SECURE_NO_WARNINGS") set(CMAKE_CXX_FLAGS "/wd4828 ${CMAKE_CXX_FLAGS}") diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL index 2420b5a56..9d9a006c6 100644 --- a/ports/freeimage/CONTROL +++ b/ports/freeimage/CONTROL @@ -1,5 +1,5 @@ Source: freeimage -Version: 3.18.0-5 +Version: 3.18.0-6 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp[all], libraw, jxrlib, openexr Homepage: https://sourceforge.net/projects/freeimage/ Description: Support library for graphics image formats diff --git a/ports/freerdp/CONTROL b/ports/freerdp/CONTROL index f880f30a3..c5c3d657e 100644 --- a/ports/freerdp/CONTROL +++ b/ports/freerdp/CONTROL @@ -1,5 +1,5 @@ Source: freerdp -Version: 2.0.0-rc4-1 +Version: 2.0.0-rc4-2 Homepage: https://github.com/FreeRDP/FreeRDP Description: A free implementation of the Remote Desktop Protocol (RDP) Build-Depends: openssl diff --git a/ports/freerdp/portfile.cmake b/ports/freerdp/portfile.cmake index 7fa0b3c72..ca42af8a0 100644 --- a/ports/freerdp/portfile.cmake +++ b/ports/freerdp/portfile.cmake @@ -62,7 +62,7 @@ foreach(PACKAGE FreeRDP-Client2 FreeRDP2 WinPR2) endforeach() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP-Client2_temp/FreeRDP-Client2 TARGET_PATH share/freerdp-client) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2 TARGET_PATH share/freerdp) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WinPR2_temp/WinPR2 TARGET_PATH share/winpr) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/g2o/CONTROL b/ports/g2o/CONTROL index 483824107..0e6b43f7d 100644 --- a/ports/g2o/CONTROL +++ b/ports/g2o/CONTROL @@ -1,5 +1,5 @@ Source: g2o -Version: 20170730_git-4 +Version: 20170730_git-5 Build-Depends: suitesparse, eigen3, clapack (!osx), ceres Description: g2o: A General Framework for Graph Optimization Homepage: https://openslam.org/g2o.html diff --git a/ports/g2o/portfile.cmake b/ports/g2o/portfile.cmake index 6d09b8a8c..312bbc8e8 100644 --- a/ports/g2o/portfile.cmake +++ b/ports/g2o/portfile.cmake @@ -24,7 +24,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() if(VCPKG_USE_HEAD_VERSION) - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/g2o") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g2o) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/gdcm/CONTROL b/ports/gdcm/CONTROL index d0dbcc652..32a962eb4 100644 --- a/ports/gdcm/CONTROL +++ b/ports/gdcm/CONTROL @@ -1,4 +1,4 @@ Source: gdcm -Version: 3.0.0-1 +Version: 3.0.0-3 Description: Grassroots DICOM library Build-Depends: zlib, expat, openjpeg diff --git a/ports/gdcm/portfile.cmake b/ports/gdcm/portfile.cmake index 3fba69409..36a3e0e1f 100644 --- a/ports/gdcm/portfile.cmake +++ b/ports/gdcm/portfile.cmake @@ -15,12 +15,18 @@ vcpkg_from_github( file(REMOVE ${SOURCE_PATH}/CMake/FindOpenJPEG.cmake) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF - -DGDCM_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} + -DGDCM_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} -DGDCM_INSTALL_INCLUDE_DIR=include -DGDCM_USE_SYSTEM_EXPAT=ON -DGDCM_USE_SYSTEM_ZLIB=ON @@ -29,7 +35,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/gdcm TARGET_PATH share/gdcm) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/gdcm) vcpkg_copy_pdbs() file(REMOVE_RECURSE diff --git a/ports/geogram/CONTROL b/ports/geogram/CONTROL index 6d449c882..8fd66be95 100644 --- a/ports/geogram/CONTROL +++ b/ports/geogram/CONTROL @@ -1,5 +1,5 @@ Source: geogram -Version: 1.6.9-3 +Version: 1.6.9-6 Homepage: https://gforge.inria.fr/projects/geogram/ Description: Geogram is a programming library of geometric algorithms. Build-Depends: openblas (!osx), clapack (!osx) diff --git a/ports/geogram/enable_openblas_compatibility.patch b/ports/geogram/enable_openblas_compatibility.patch new file mode 100644 index 000000000..e6ab75a4c --- /dev/null +++ b/ports/geogram/enable_openblas_compatibility.patch @@ -0,0 +1,1008 @@ +diff --git a/src/lib/third_party/numerics/ARPACK/arpack_cnames.h b/src/lib/third_party/numerics/ARPACK/arpack_cnames.h +new file mode 100644 +index 0000000..e6f2c48 +--- /dev/null ++++ b/src/lib/third_party/numerics/ARPACK/arpack_cnames.h +@@ -0,0 +1,105 @@ ++#ifndef __ARPACK_CNAMES ++#define __ARPACK_CNAMES ++ ++/* ++ * These defines set up the naming scheme required to have a fortran 77 ++ * routine call a C routine ++ * for following Fortran to C interface: ++ * FORTRAN CALL C DECLARATION ++ * call dgemm(...) void dgemm(...) ++ */ ++/* BLAS */ ++#define sswap_ sswap ++#define saxpy_ saxpy ++#define sasum_ sasum ++#define isamax_ isamax ++#define scopy_ scopy ++#define sscal_ sscal ++#define sger_ sger ++#define snrm2_ snrm2 ++#define ssymv_ ssymv ++#define sdot_ sdot ++#define saxpy_ saxpy ++#define ssyr2_ ssyr2 ++#define srot_ srot ++#define sgemv_ sgemv ++#define strsv_ strsv ++#define sgemm_ sgemm ++#define strsm_ strsm ++ ++#define dswap_ dswap ++#define daxpy_ daxpy ++#define dasum_ dasum ++#define idamax_ idamax ++#define dcopy_ dcopy ++#define dscal_ dscal ++#define dger_ dger ++#define dnrm2_ dnrm2 ++#define dsymv_ dsymv ++#define ddot_ ddot ++#define dsyr2_ dsyr2 ++#define drot_ drot ++#define dgemv_ dgemv ++#define dtrsv_ dtrsv ++#define dgemm_ dgemm ++#define dtrsm_ dtrsm ++ ++#define cswap_ cswap ++#define caxpy_ caxpy ++#define scasum_ scasum ++#define icamax_ icamax ++#define ccopy_ ccopy ++#define cscal_ cscal ++#define scnrm2_ scnrm2 ++#define cgemv_ cgemv ++#define ctrsv_ ctrsv ++#define cgemm_ cgemm ++#define ctrsm_ ctrsm ++#define cgerc_ cgerc ++#define chemv_ chemv ++#define cher2_ cher2 ++ ++#define zswap_ zswap ++#define zaxpy_ zaxpy ++#define dzasum_ dzasum ++#define izamax_ izamax ++#define zcopy_ zcopy ++#define zscal_ zscal ++#define dznrm2_ dznrm2 ++#define zgemv_ zgemv ++#define ztrsv_ ztrsv ++#define zgemm_ zgemm ++#define ztrsm_ ztrsm ++#define zgerc_ zgerc ++#define zhemv_ zhemv ++#define zher2_ zher2 ++ ++/* LAPACK */ ++#define dlacon_ dlacon ++#define slacon_ slacon ++#define icmax1_ icmax1 ++#define scsum1_ scsum1 ++#define clacon_ clacon ++#define dzsum1_ dzsum1 ++#define izmax1_ izmax1 ++#define zlacon_ zlacon ++ ++/* Fortran interface */ ++#define c_bridge_dgssv_ c_bridge_dgssv ++#define c_fortran_sgssv_ c_fortran_sgssv ++#define c_fortran_dgssv_ c_fortran_dgssv ++#define c_fortran_cgssv_ c_fortran_cgssv ++#define c_fortran_zgssv_ c_fortran_zgssv ++ ++#define cdotc_ cdotc ++#define csscal_ csscal ++#define zdscal_ zdscal ++#define zdotc_ zdotc ++#define ctrmm_ ctrmm ++#define dtrmm_ dtrmm ++#define strmm_ strmm ++#define ztrmm_ ztrmm ++#define cgeru_ cgeru ++#define zgeru_ zgeru ++ ++#endif /* __ARPACK_CNAMES */ +diff --git a/src/lib/third_party/numerics/ARPACK/cgetv0.c b/src/lib/third_party/numerics/ARPACK/cgetv0.c +index 48e8677..871d7b0 100755 +--- a/src/lib/third_party/numerics/ARPACK/cgetv0.c ++++ b/src/lib/third_party/numerics/ARPACK/cgetv0.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/cnaitr.c b/src/lib/third_party/numerics/ARPACK/cnaitr.c +index ee9318b..693f399 100755 +--- a/src/lib/third_party/numerics/ARPACK/cnaitr.c ++++ b/src/lib/third_party/numerics/ARPACK/cnaitr.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/cnapps.c b/src/lib/third_party/numerics/ARPACK/cnapps.c +index 0c4a6a2..4929fc1 100755 +--- a/src/lib/third_party/numerics/ARPACK/cnapps.c ++++ b/src/lib/third_party/numerics/ARPACK/cnapps.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/cnaup2.c b/src/lib/third_party/numerics/ARPACK/cnaup2.c +index 8322446..2d98e4b 100755 +--- a/src/lib/third_party/numerics/ARPACK/cnaup2.c ++++ b/src/lib/third_party/numerics/ARPACK/cnaup2.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/cnaupd.c b/src/lib/third_party/numerics/ARPACK/cnaupd.c +index e51f72e..4fe5dca 100755 +--- a/src/lib/third_party/numerics/ARPACK/cnaupd.c ++++ b/src/lib/third_party/numerics/ARPACK/cnaupd.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/cneigh.c b/src/lib/third_party/numerics/ARPACK/cneigh.c +index d96bebd..adfa279 100755 +--- a/src/lib/third_party/numerics/ARPACK/cneigh.c ++++ b/src/lib/third_party/numerics/ARPACK/cneigh.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/cneupd.c b/src/lib/third_party/numerics/ARPACK/cneupd.c +index 6a839e7..35fc426 100755 +--- a/src/lib/third_party/numerics/ARPACK/cneupd.c ++++ b/src/lib/third_party/numerics/ARPACK/cneupd.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/cngets.c b/src/lib/third_party/numerics/ARPACK/cngets.c +index 9788d00..663406f 100755 +--- a/src/lib/third_party/numerics/ARPACK/cngets.c ++++ b/src/lib/third_party/numerics/ARPACK/cngets.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/csortc.c b/src/lib/third_party/numerics/ARPACK/csortc.c +index 8c6cedb..0d330fe 100755 +--- a/src/lib/third_party/numerics/ARPACK/csortc.c ++++ b/src/lib/third_party/numerics/ARPACK/csortc.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* \BeginDoc */ + + /* \Name: csortc */ +diff --git a/src/lib/third_party/numerics/ARPACK/cstatn.c b/src/lib/third_party/numerics/ARPACK/cstatn.c +index 6fcde6d..4eb47dc 100755 +--- a/src/lib/third_party/numerics/ARPACK/cstatn.c ++++ b/src/lib/third_party/numerics/ARPACK/cstatn.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dgetv0.c b/src/lib/third_party/numerics/ARPACK/dgetv0.c +index 0f4c2bb..2206708 100755 +--- a/src/lib/third_party/numerics/ARPACK/dgetv0.c ++++ b/src/lib/third_party/numerics/ARPACK/dgetv0.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dlaqrb.c b/src/lib/third_party/numerics/ARPACK/dlaqrb.c +index baa4f12..d4275a7 100755 +--- a/src/lib/third_party/numerics/ARPACK/dlaqrb.c ++++ b/src/lib/third_party/numerics/ARPACK/dlaqrb.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Table of constant values */ + + static integer c__1 = 1; +diff --git a/src/lib/third_party/numerics/ARPACK/dnaitr.c b/src/lib/third_party/numerics/ARPACK/dnaitr.c +index 8fffe7f..74eca38 100755 +--- a/src/lib/third_party/numerics/ARPACK/dnaitr.c ++++ b/src/lib/third_party/numerics/ARPACK/dnaitr.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dnapps.c b/src/lib/third_party/numerics/ARPACK/dnapps.c +index 67dac36..b0083a1 100755 +--- a/src/lib/third_party/numerics/ARPACK/dnapps.c ++++ b/src/lib/third_party/numerics/ARPACK/dnapps.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dnaup2.c b/src/lib/third_party/numerics/ARPACK/dnaup2.c +index 28dabb6..8b48f33 100755 +--- a/src/lib/third_party/numerics/ARPACK/dnaup2.c ++++ b/src/lib/third_party/numerics/ARPACK/dnaup2.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dnaupd.c b/src/lib/third_party/numerics/ARPACK/dnaupd.c +index e20298c..dcfaf47 100755 +--- a/src/lib/third_party/numerics/ARPACK/dnaupd.c ++++ b/src/lib/third_party/numerics/ARPACK/dnaupd.c +@@ -11,7 +11,7 @@ + */ + + #include "protos.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dnconv.c b/src/lib/third_party/numerics/ARPACK/dnconv.c +index e2324b7..aa0bf91 100755 +--- a/src/lib/third_party/numerics/ARPACK/dnconv.c ++++ b/src/lib/third_party/numerics/ARPACK/dnconv.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dneigh.c b/src/lib/third_party/numerics/ARPACK/dneigh.c +index b7057eb..94e3680 100755 +--- a/src/lib/third_party/numerics/ARPACK/dneigh.c ++++ b/src/lib/third_party/numerics/ARPACK/dneigh.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dneupd.c b/src/lib/third_party/numerics/ARPACK/dneupd.c +index 141255d..067041b 100755 +--- a/src/lib/third_party/numerics/ARPACK/dneupd.c ++++ b/src/lib/third_party/numerics/ARPACK/dneupd.c +@@ -11,7 +11,7 @@ + */ + + #include "protos.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dngets.c b/src/lib/third_party/numerics/ARPACK/dngets.c +index 9b0ee73..e39848f 100755 +--- a/src/lib/third_party/numerics/ARPACK/dngets.c ++++ b/src/lib/third_party/numerics/ARPACK/dngets.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dsaitr.c b/src/lib/third_party/numerics/ARPACK/dsaitr.c +index 2f3df52..89a597a 100755 +--- a/src/lib/third_party/numerics/ARPACK/dsaitr.c ++++ b/src/lib/third_party/numerics/ARPACK/dsaitr.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dsapps.c b/src/lib/third_party/numerics/ARPACK/dsapps.c +index e87b27d..4a320c9 100755 +--- a/src/lib/third_party/numerics/ARPACK/dsapps.c ++++ b/src/lib/third_party/numerics/ARPACK/dsapps.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dsaup2.c b/src/lib/third_party/numerics/ARPACK/dsaup2.c +index e5f224f..b93e80b 100755 +--- a/src/lib/third_party/numerics/ARPACK/dsaup2.c ++++ b/src/lib/third_party/numerics/ARPACK/dsaup2.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dsaupd.c b/src/lib/third_party/numerics/ARPACK/dsaupd.c +index a9e456f..d20ebe2 100755 +--- a/src/lib/third_party/numerics/ARPACK/dsaupd.c ++++ b/src/lib/third_party/numerics/ARPACK/dsaupd.c +@@ -11,7 +11,7 @@ + */ + + #include "protos.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dsconv.c b/src/lib/third_party/numerics/ARPACK/dsconv.c +index 843ac29..25e3b8f 100755 +--- a/src/lib/third_party/numerics/ARPACK/dsconv.c ++++ b/src/lib/third_party/numerics/ARPACK/dsconv.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dseigt.c b/src/lib/third_party/numerics/ARPACK/dseigt.c +index c7e975b..ba74d2f 100755 +--- a/src/lib/third_party/numerics/ARPACK/dseigt.c ++++ b/src/lib/third_party/numerics/ARPACK/dseigt.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dsesrt.c b/src/lib/third_party/numerics/ARPACK/dsesrt.c +index 1bf99ee..8a2030f 100755 +--- a/src/lib/third_party/numerics/ARPACK/dsesrt.c ++++ b/src/lib/third_party/numerics/ARPACK/dsesrt.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Table of constant values */ + + static integer c__1 = 1; +diff --git a/src/lib/third_party/numerics/ARPACK/dseupd.c b/src/lib/third_party/numerics/ARPACK/dseupd.c +index 9b81477..065e4d8 100755 +--- a/src/lib/third_party/numerics/ARPACK/dseupd.c ++++ b/src/lib/third_party/numerics/ARPACK/dseupd.c +@@ -11,7 +11,7 @@ + */ + + #include "protos.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dsgets.c b/src/lib/third_party/numerics/ARPACK/dsgets.c +index 7983ec8..19a33d9 100755 +--- a/src/lib/third_party/numerics/ARPACK/dsgets.c ++++ b/src/lib/third_party/numerics/ARPACK/dsgets.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dsortc.c b/src/lib/third_party/numerics/ARPACK/dsortc.c +index 2170fcc..131ae2f 100755 +--- a/src/lib/third_party/numerics/ARPACK/dsortc.c ++++ b/src/lib/third_party/numerics/ARPACK/dsortc.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* ----------------------------------------------------------------------- */ + /* \BeginDoc */ + +diff --git a/src/lib/third_party/numerics/ARPACK/dsortr.c b/src/lib/third_party/numerics/ARPACK/dsortr.c +index 5f8dca8..335d9a9 100755 +--- a/src/lib/third_party/numerics/ARPACK/dsortr.c ++++ b/src/lib/third_party/numerics/ARPACK/dsortr.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* ----------------------------------------------------------------------- */ + /* \BeginDoc */ + +diff --git a/src/lib/third_party/numerics/ARPACK/dstatn.c b/src/lib/third_party/numerics/ARPACK/dstatn.c +index 50c15f2..1909d6d 100755 +--- a/src/lib/third_party/numerics/ARPACK/dstatn.c ++++ b/src/lib/third_party/numerics/ARPACK/dstatn.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dstats.c b/src/lib/third_party/numerics/ARPACK/dstats.c +index 4341eea..02f4024 100755 +--- a/src/lib/third_party/numerics/ARPACK/dstats.c ++++ b/src/lib/third_party/numerics/ARPACK/dstats.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/dstqrb.c b/src/lib/third_party/numerics/ARPACK/dstqrb.c +index 2a10880..c25f44d 100755 +--- a/src/lib/third_party/numerics/ARPACK/dstqrb.c ++++ b/src/lib/third_party/numerics/ARPACK/dstqrb.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Table of constant values */ + + static integer c__0 = 0; +diff --git a/src/lib/third_party/numerics/ARPACK/protos.h b/src/lib/third_party/numerics/ARPACK/protos.h +index 2e87fe7..09a89fc 100755 +--- a/src/lib/third_party/numerics/ARPACK/protos.h ++++ b/src/lib/third_party/numerics/ARPACK/protos.h +@@ -8,7 +8,7 @@ + + #include + #include "f2c.h" +- ++#include "arpack_cnames.h" + int NUMERICS_API dnaupd_( + integer *ido, char *bmat, integer *n, char * + which, integer *nev, doublereal *tol, doublereal *resid, integer *ncv, +diff --git a/src/lib/third_party/numerics/ARPACK/sgetv0.c b/src/lib/third_party/numerics/ARPACK/sgetv0.c +index 206122a..314252f 100755 +--- a/src/lib/third_party/numerics/ARPACK/sgetv0.c ++++ b/src/lib/third_party/numerics/ARPACK/sgetv0.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/slaqrb.c b/src/lib/third_party/numerics/ARPACK/slaqrb.c +index 335faa2..12cc92a 100755 +--- a/src/lib/third_party/numerics/ARPACK/slaqrb.c ++++ b/src/lib/third_party/numerics/ARPACK/slaqrb.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Table of constant values */ + + static integer c__1 = 1; +diff --git a/src/lib/third_party/numerics/ARPACK/snaitr.c b/src/lib/third_party/numerics/ARPACK/snaitr.c +index 5e24f6c..f3bc2fa 100755 +--- a/src/lib/third_party/numerics/ARPACK/snaitr.c ++++ b/src/lib/third_party/numerics/ARPACK/snaitr.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/snapps.c b/src/lib/third_party/numerics/ARPACK/snapps.c +index 37470fc..9ae03e4 100755 +--- a/src/lib/third_party/numerics/ARPACK/snapps.c ++++ b/src/lib/third_party/numerics/ARPACK/snapps.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/snaup2.c b/src/lib/third_party/numerics/ARPACK/snaup2.c +index 4028150..f893a8e 100755 +--- a/src/lib/third_party/numerics/ARPACK/snaup2.c ++++ b/src/lib/third_party/numerics/ARPACK/snaup2.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/snaupd.c b/src/lib/third_party/numerics/ARPACK/snaupd.c +index 88118f0..66fac19 100755 +--- a/src/lib/third_party/numerics/ARPACK/snaupd.c ++++ b/src/lib/third_party/numerics/ARPACK/snaupd.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/snconv.c b/src/lib/third_party/numerics/ARPACK/snconv.c +index 4984455..cb42561 100755 +--- a/src/lib/third_party/numerics/ARPACK/snconv.c ++++ b/src/lib/third_party/numerics/ARPACK/snconv.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/sneigh.c b/src/lib/third_party/numerics/ARPACK/sneigh.c +index 4ff7d7a..a8b3ffc 100755 +--- a/src/lib/third_party/numerics/ARPACK/sneigh.c ++++ b/src/lib/third_party/numerics/ARPACK/sneigh.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/sneupd.c b/src/lib/third_party/numerics/ARPACK/sneupd.c +index e2a7205..430f033 100755 +--- a/src/lib/third_party/numerics/ARPACK/sneupd.c ++++ b/src/lib/third_party/numerics/ARPACK/sneupd.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/sngets.c b/src/lib/third_party/numerics/ARPACK/sngets.c +index 5a13f94..1c34e92 100755 +--- a/src/lib/third_party/numerics/ARPACK/sngets.c ++++ b/src/lib/third_party/numerics/ARPACK/sngets.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/ssaitr.c b/src/lib/third_party/numerics/ARPACK/ssaitr.c +index 65a61f6..98fbb1c 100755 +--- a/src/lib/third_party/numerics/ARPACK/ssaitr.c ++++ b/src/lib/third_party/numerics/ARPACK/ssaitr.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/ssapps.c b/src/lib/third_party/numerics/ARPACK/ssapps.c +index 9537c2f..b979fb1 100755 +--- a/src/lib/third_party/numerics/ARPACK/ssapps.c ++++ b/src/lib/third_party/numerics/ARPACK/ssapps.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/ssaup2.c b/src/lib/third_party/numerics/ARPACK/ssaup2.c +index a5123dc..59e08aa 100755 +--- a/src/lib/third_party/numerics/ARPACK/ssaup2.c ++++ b/src/lib/third_party/numerics/ARPACK/ssaup2.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/ssaupd.c b/src/lib/third_party/numerics/ARPACK/ssaupd.c +index 5898148..32ba0b0 100755 +--- a/src/lib/third_party/numerics/ARPACK/ssaupd.c ++++ b/src/lib/third_party/numerics/ARPACK/ssaupd.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/ssconv.c b/src/lib/third_party/numerics/ARPACK/ssconv.c +index 0e1c9c2..90faa50 100755 +--- a/src/lib/third_party/numerics/ARPACK/ssconv.c ++++ b/src/lib/third_party/numerics/ARPACK/ssconv.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/sseigt.c b/src/lib/third_party/numerics/ARPACK/sseigt.c +index 6b9e407..6652b74 100755 +--- a/src/lib/third_party/numerics/ARPACK/sseigt.c ++++ b/src/lib/third_party/numerics/ARPACK/sseigt.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/ssesrt.c b/src/lib/third_party/numerics/ARPACK/ssesrt.c +index 9287d6a..d6bcd6d 100755 +--- a/src/lib/third_party/numerics/ARPACK/ssesrt.c ++++ b/src/lib/third_party/numerics/ARPACK/ssesrt.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Table of constant values */ + + static integer c__1 = 1; +diff --git a/src/lib/third_party/numerics/ARPACK/sseupd.c b/src/lib/third_party/numerics/ARPACK/sseupd.c +index 163df3a..b0e825f 100755 +--- a/src/lib/third_party/numerics/ARPACK/sseupd.c ++++ b/src/lib/third_party/numerics/ARPACK/sseupd.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/ssgets.c b/src/lib/third_party/numerics/ARPACK/ssgets.c +index 244f2ab..52127c2 100755 +--- a/src/lib/third_party/numerics/ARPACK/ssgets.c ++++ b/src/lib/third_party/numerics/ARPACK/ssgets.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/ssortc.c b/src/lib/third_party/numerics/ARPACK/ssortc.c +index aa836f7..38b5fbd 100755 +--- a/src/lib/third_party/numerics/ARPACK/ssortc.c ++++ b/src/lib/third_party/numerics/ARPACK/ssortc.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* ----------------------------------------------------------------------- */ + /* \BeginDoc */ + +diff --git a/src/lib/third_party/numerics/ARPACK/ssortr.c b/src/lib/third_party/numerics/ARPACK/ssortr.c +index e48fb1c..88db423 100755 +--- a/src/lib/third_party/numerics/ARPACK/ssortr.c ++++ b/src/lib/third_party/numerics/ARPACK/ssortr.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* ----------------------------------------------------------------------- */ + /* \BeginDoc */ + +diff --git a/src/lib/third_party/numerics/ARPACK/sstatn.c b/src/lib/third_party/numerics/ARPACK/sstatn.c +index fc899df..26d49b9 100755 +--- a/src/lib/third_party/numerics/ARPACK/sstatn.c ++++ b/src/lib/third_party/numerics/ARPACK/sstatn.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/sstats.c b/src/lib/third_party/numerics/ARPACK/sstats.c +index 6601d2e..61577e2 100755 +--- a/src/lib/third_party/numerics/ARPACK/sstats.c ++++ b/src/lib/third_party/numerics/ARPACK/sstats.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/sstqrb.c b/src/lib/third_party/numerics/ARPACK/sstqrb.c +index 4c7bf91..2a416e2 100755 +--- a/src/lib/third_party/numerics/ARPACK/sstqrb.c ++++ b/src/lib/third_party/numerics/ARPACK/sstqrb.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Table of constant values */ + + static integer c__0 = 0; +diff --git a/src/lib/third_party/numerics/ARPACK/zgetv0.c b/src/lib/third_party/numerics/ARPACK/zgetv0.c +index 96d3c48..d868c1f 100755 +--- a/src/lib/third_party/numerics/ARPACK/zgetv0.c ++++ b/src/lib/third_party/numerics/ARPACK/zgetv0.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/znaitr.c b/src/lib/third_party/numerics/ARPACK/znaitr.c +index 2ce6b9c..c8cf0f6 100755 +--- a/src/lib/third_party/numerics/ARPACK/znaitr.c ++++ b/src/lib/third_party/numerics/ARPACK/znaitr.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/znapps.c b/src/lib/third_party/numerics/ARPACK/znapps.c +index 732aed0..30f46e6 100755 +--- a/src/lib/third_party/numerics/ARPACK/znapps.c ++++ b/src/lib/third_party/numerics/ARPACK/znapps.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/znaup2.c b/src/lib/third_party/numerics/ARPACK/znaup2.c +index b7caa42..7164775 100755 +--- a/src/lib/third_party/numerics/ARPACK/znaup2.c ++++ b/src/lib/third_party/numerics/ARPACK/znaup2.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/znaupd.c b/src/lib/third_party/numerics/ARPACK/znaupd.c +index ed251ee..f960959 100755 +--- a/src/lib/third_party/numerics/ARPACK/znaupd.c ++++ b/src/lib/third_party/numerics/ARPACK/znaupd.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/zneigh.c b/src/lib/third_party/numerics/ARPACK/zneigh.c +index 4157ab3..4ee3c1e 100755 +--- a/src/lib/third_party/numerics/ARPACK/zneigh.c ++++ b/src/lib/third_party/numerics/ARPACK/zneigh.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/zneupd.c b/src/lib/third_party/numerics/ARPACK/zneupd.c +index 3f684f4..3ef32c1 100755 +--- a/src/lib/third_party/numerics/ARPACK/zneupd.c ++++ b/src/lib/third_party/numerics/ARPACK/zneupd.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/zngets.c b/src/lib/third_party/numerics/ARPACK/zngets.c +index a2e461b..97bbebd 100755 +--- a/src/lib/third_party/numerics/ARPACK/zngets.c ++++ b/src/lib/third_party/numerics/ARPACK/zngets.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { +diff --git a/src/lib/third_party/numerics/ARPACK/zsortc.c b/src/lib/third_party/numerics/ARPACK/zsortc.c +index a35748c..38dbc42 100755 +--- a/src/lib/third_party/numerics/ARPACK/zsortc.c ++++ b/src/lib/third_party/numerics/ARPACK/zsortc.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* \BeginDoc */ + + /* \Name: zsortc */ +diff --git a/src/lib/third_party/numerics/ARPACK/zstatn.c b/src/lib/third_party/numerics/ARPACK/zstatn.c +index d433e97..5a8bd1e 100755 +--- a/src/lib/third_party/numerics/ARPACK/zstatn.c ++++ b/src/lib/third_party/numerics/ARPACK/zstatn.c +@@ -11,7 +11,7 @@ + */ + + #include "f2c.h" +- ++#include "arpack_cnames.h" + /* Common Block Declarations */ + + struct { diff --git a/ports/geogram/fix_underscore.patch b/ports/geogram/fix_underscore.patch new file mode 100644 index 000000000..eeb5a30cb --- /dev/null +++ b/ports/geogram/fix_underscore.patch @@ -0,0 +1,10 @@ +diff --git a/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h b/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h +index 68b3afe..0369a68 100755 +--- a/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h ++++ b/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h +@@ -1,4 +1,4 @@ +-#define Add_ /* Bruno */ ++#define NoChange + + /*! \file + Copyright (c) 2003, The Regents of the University of California, through diff --git a/ports/geogram/portfile.cmake b/ports/geogram/portfile.cmake index 44f74f107..9584e6619 100644 --- a/ports/geogram/portfile.cmake +++ b/ports/geogram/portfile.cmake @@ -8,11 +8,17 @@ vcpkg_download_distfile(ARCHIVE SHA512 1b5c7540bef734c1908f213f26780aba63b4911a8022d5eb3f7c90eabe2cb69efd1f298b30cdc8e2c636a5b37c8c25832dd4aad0b7c2ff5f0a5b5caa17970136 ) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(ADDITIONAL_PATCHES "fix_underscore.patch" "enable_openblas_compatibility.patch") +endif() + vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${GEOGRAM_VERSION} - PATCHES fix-cmake-config-and-install.patch + PATCHES + fix-cmake-config-and-install.patch + ${ADDITIONAL_PATCHES} ) file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake) @@ -65,7 +71,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/geogram") +vcpkg_fixup_cmake_targets() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) diff --git a/ports/geographiclib/CONTROL b/ports/geographiclib/CONTROL index 0d585a281..1c4c5a17d 100644 --- a/ports/geographiclib/CONTROL +++ b/ports/geographiclib/CONTROL @@ -1,4 +1,4 @@ Source: geographiclib -Version: 1.47-patch1-5 +Version: 1.47-patch1-6 Homepage: https://sourceforge.net/projects/geographiclib/ Description: a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems. diff --git a/ports/geographiclib/portfile.cmake b/ports/geographiclib/portfile.cmake index 95db365cf..8f4a716dc 100644 --- a/ports/geographiclib/portfile.cmake +++ b/ports/geographiclib/portfile.cmake @@ -46,7 +46,7 @@ endif() vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/geographiclib) +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) vcpkg_copy_pdbs() file(COPY ${CURRENT_PACKAGES_DIR}/lib/pkgconfig DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib) @@ -55,4 +55,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/00README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib RENAME readme) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib RENAME copyright) diff --git a/ports/gl3w/CONTROL b/ports/gl3w/CONTROL index ff4f51206..7ce058fbc 100644 --- a/ports/gl3w/CONTROL +++ b/ports/gl3w/CONTROL @@ -1,5 +1,5 @@ Source: gl3w -Version: 99ed3211 +Version: 2018-05-31-1 Homepage: https://github.com/skaslev/gl3w Description: Simple OpenGL core profile loading Build-Depends: opengl-registry diff --git a/ports/gl3w/portfile.cmake b/ports/gl3w/portfile.cmake index c5010491a..ca35eb2bf 100644 --- a/ports/gl3w/portfile.cmake +++ b/ports/gl3w/portfile.cmake @@ -32,8 +32,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/gl3w) +vcpkg_fixup_cmake_targets() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(HEADER ${CURRENT_PACKAGES_DIR}/include/GL/gl3w.h) diff --git a/ports/glbinding/force-system-install.patch b/ports/glbinding/0001_force-system-install.patch similarity index 100% rename from ports/glbinding/force-system-install.patch rename to ports/glbinding/0001_force-system-install.patch diff --git a/ports/glbinding/fix-uwpmacro.patch b/ports/glbinding/0002_fix-uwpmacro.patch similarity index 100% rename from ports/glbinding/fix-uwpmacro.patch rename to ports/glbinding/0002_fix-uwpmacro.patch diff --git a/ports/glbinding/0003_fix-cmake-configs-paths.patch b/ports/glbinding/0003_fix-cmake-configs-paths.patch new file mode 100644 index 000000000..359837784 --- /dev/null +++ b/ports/glbinding/0003_fix-cmake-configs-paths.patch @@ -0,0 +1,62 @@ +diff --git a/3rdparty/KHR/CMakeLists.txt b/3rdparty/KHR/CMakeLists.txt +index 25fac3a..429544f 100644 +--- a/3rdparty/KHR/CMakeLists.txt ++++ b/3rdparty/KHR/CMakeLists.txt +@@ -43,7 +43,7 @@ add_library(${target} INTERFACE) + add_library(externals::${target} ALIAS ${target}) + + # Export library for downstream projects +-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake) ++export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake) + + + # +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 700b48b..8aaab8d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -141,15 +141,15 @@ endif() + if(1) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ +- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake ++ set(INSTALL_CMAKE "share/${project}") # /usr/[local]/share//cmake + set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/ + set(INSTALL_DATA "share/${project}") # /usr/[local]/share/ + set(INSTALL_BIN "bin") # /usr/[local]/bin + set(INSTALL_SHARED "lib") # /usr/[local]/lib + set(INSTALL_LIB "lib") # /usr/[local]/lib + set(INSTALL_INCLUDE "include") # /usr/[local]/include +- set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/ +- set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications ++ set(INSTALL_DOC "share/${project}/doc") # /usr/[local]/share/doc/ ++ set(INSTALL_SHORTCUTS "share/${project}/applications") # /usr/[local]/share/applications + set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps + set(INSTALL_INIT "etc/init") # /etc/init (upstart init scripts) + else() +diff --git a/source/glbinding-aux/CMakeLists.txt b/source/glbinding-aux/CMakeLists.txt +index 61cc166..cb0758a 100644 +--- a/source/glbinding-aux/CMakeLists.txt ++++ b/source/glbinding-aux/CMakeLists.txt +@@ -137,7 +137,7 @@ add_library(${target} + add_library(${META_PROJECT_NAME}::${target} ALIAS ${target}) + + # Export library for downstream projects +-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake) ++export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake) + + # Create API export header + generate_export_header(${target} +diff --git a/source/glbinding/CMakeLists.txt b/source/glbinding/CMakeLists.txt +index bca68d1..f014494 100644 +--- a/source/glbinding/CMakeLists.txt ++++ b/source/glbinding/CMakeLists.txt +@@ -172,7 +172,7 @@ add_library(${target} + add_library(${META_PROJECT_NAME}::${target} ALIAS ${target}) + + # Export library for downstream projects +-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake) ++export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake) + + # Create API export header + generate_export_header(${target} diff --git a/ports/glbinding/0004_fix-config-expected-paths.patch b/ports/glbinding/0004_fix-config-expected-paths.patch new file mode 100644 index 000000000..e6fb16440 --- /dev/null +++ b/ports/glbinding/0004_fix-config-expected-paths.patch @@ -0,0 +1,35 @@ +diff --git a/glbinding-config.cmake b/glbinding-config.cmake +index 03fc505..01b6cc8 100644 +--- a/glbinding-config.cmake ++++ b/glbinding-config.cmake +@@ -1,7 +1,7 @@ + + # This config script tries to locate the project either in its source tree + # or from an install location. +-# ++# + # Please adjust the list of submodules to search for. + + +@@ -35,20 +35,11 @@ endmacro() + + # Try install location + set(MODULE_FOUND FALSE) +-find_modules("cmake") ++find_modules(".") + + if(MODULE_FOUND) + return() + endif() + +-# Try common build locations +-if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") +- find_modules("build-debug/cmake") +- find_modules("build/cmake") +-else() +- find_modules("build/cmake") +- find_modules("build-debug/cmake") +-endif() +- + # Signal success/failure to CMake + set(glbinding_FOUND ${MODULE_FOUND}) diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake index 99f233982..d9fb5c0b2 100644 --- a/ports/glbinding/portfile.cmake +++ b/ports/glbinding/portfile.cmake @@ -5,9 +5,11 @@ vcpkg_from_github( REF v3.1.0 SHA512 d7294c9a0dc47a7c107b134e5dfa78c5812fc6bf739b9fd778fa7ce946d5ea971839a65c3985e0915fd75311e4a85fb221d33a71856c460199eab0e7622f7151 HEAD_REF master - PATCHES - force-system-install.patch - fix-uwpmacro.patch + PATCHES + 0001_force-system-install.patch + 0002_fix-uwpmacro.patch + 0003_fix-cmake-configs-paths.patch + 0004_fix-config-expected-paths.patch ) vcpkg_configure_cmake( @@ -16,25 +18,21 @@ vcpkg_configure_cmake( -DOPTION_BUILD_TESTS=OFF -DOPTION_BUILD_GPU_TESTS=OFF -DOPTION_BUILD_TOOLS=OFF + -DOPTION_BUILD_EXAMPLES=OFF -DGIT_REV=0 -DCMAKE_DISABLE_FIND_PACKAGE_cpplocate=ON -DOPTION_BUILD_EXAMPLES=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/glbinding) +vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/glbinding/cmake) - -# _IMPORT_PREFIX needs to go up one extra level in the directory tree. -# These files should be modified. -# /share/glbinding/glbinding-export.cmake -# /share/glbinding-aux/glbinding-aux-export.cmake +## _IMPORT_PREFIX needs to go up one extra level in the directory tree. file(GLOB_RECURSE TARGET_CMAKES "${CURRENT_PACKAGES_DIR}/*-export.cmake") foreach(TARGET_CMAKE IN LISTS TARGET_CMAKES) file(READ ${TARGET_CMAKE} _contents) - string(REPLACE + string(REPLACE [[ get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) @@ -50,13 +48,11 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) file(WRITE ${TARGET_CMAKE} "${_contents}") endforeach() -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-config.cmake "include(\${CMAKE_CURRENT_LIST_DIR}/glbinding/glbinding-export.cmake)\ninclude(\${CMAKE_CURRENT_LIST_DIR}/glbinding-aux/glbinding-aux-export.cmake)\ninclude(\${CMAKE_CURRENT_LIST_DIR}/KHRplatform/KHRplatform-export.cmake)\nset(glbinding_FOUND TRUE)\n") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Remove files already published by egl-registry file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/KHR) # Handle copyright file(RENAME ${CURRENT_PACKAGES_DIR}/share/glbinding/LICENSE ${CURRENT_PACKAGES_DIR}/share/glbinding/copyright) - -vcpkg_copy_pdbs() diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index f05934f05..2637b2091 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -24,8 +24,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glew") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glew) set(_targets_cmake_files) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") diff --git a/ports/globjects/CONTROL b/ports/globjects/CONTROL index fb9ca9a1f..0de66a3b2 100644 --- a/ports/globjects/CONTROL +++ b/ports/globjects/CONTROL @@ -1,6 +1,5 @@ Source: globjects -Maintainer: mattias@mattiascibien.net -Version: 1.1.0-2018-09-19-1 +Version: 1.1.0-2 Build-Depends: glbinding, glm Description: C++ library strictly wrapping OpenGL objects. Homepage: https://github.com/cginternals/globjects diff --git a/ports/globjects/portfile.cmake b/ports/globjects/portfile.cmake index 164edec71..524014a8b 100644 --- a/ports/globjects/portfile.cmake +++ b/ports/globjects/portfile.cmake @@ -20,7 +20,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/globjects/cmake/globjects TARGET_PATH share/globjects/cmake/globjects) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/globjects/cmake/globjects) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/glog/CONTROL b/ports/glog/CONTROL index 21625e159..a94938acd 100644 --- a/ports/glog/CONTROL +++ b/ports/glog/CONTROL @@ -1,5 +1,5 @@ Source: glog -Version: 0.4.0 +Version: 0.4.0-1 Homepage: https://github.com/google/glog Description: C++ implementation of the Google logging module Build-Depends: gflags diff --git a/ports/glog/portfile.cmake b/ports/glog/portfile.cmake index da6b76f4f..978539217 100644 --- a/ports/glog/portfile.cmake +++ b/ports/glog/portfile.cmake @@ -25,7 +25,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glog") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glog) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/graphite2/CONTROL b/ports/graphite2/CONTROL index e8af4d4a1..faf867a97 100644 --- a/ports/graphite2/CONTROL +++ b/ports/graphite2/CONTROL @@ -1,5 +1,5 @@ Source: graphite2 -Version: 1.3.12 +Version: 1.3.12-1 Homepage: https://github.com/silnrsi/graphite Description: Graphite is a "smart font" system developed specifically to handle the complexities of lesser-known languages of the world. - Graphite2 is a rework of the original Graphite engine that is faster, smaller, and uses an API that is better suited to the layout architecture of most text-processing applications. \ No newline at end of file + Graphite2 is a rework of the original Graphite engine that is faster, smaller, and uses an API that is better suited to the layout architecture of most text-processing applications. diff --git a/ports/graphite2/portfile.cmake b/ports/graphite2/portfile.cmake index f5292ba83..679d95679 100644 --- a/ports/graphite2/portfile.cmake +++ b/ports/graphite2/portfile.cmake @@ -19,8 +19,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/graphite2) +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 5edad1a16..079fd91f6 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,5 +1,5 @@ Source: grpc -Version: 1.21.1 +Version: 1.21.1-1 Build-Depends: zlib, openssl, protobuf, c-ares (!uwp) Homepage: https://github.com/grpc/grpc Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index e97082ede..b71a55420 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -16,7 +16,7 @@ vcpkg_from_github( REF 75475f090875e737ad6909a6057c59577f0c79b1 SHA512 db9ff82dee38cb0f4ba10874d10bf6cb20c8a4d49e7dd24bcd9f71388c54c782ee12fda6f1bfedd79ad988b0275d3f96df4686217465acfafcfb5e4c30093a5b HEAD_REF master - PATCHES + PATCHES 00001-fix-uwp.patch 00002-static-linking-in-linux.patch 00003-undef-base64-macro.patch @@ -72,7 +72,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake(ADD_BIN_TO_PATH) -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/grpc") +vcpkg_fixup_cmake_targets() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright) @@ -94,4 +94,4 @@ SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -## \ No newline at end of file +## diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 48cfaf1b7..93c1da645 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -70,9 +70,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/harfbuzz TARGET_PATH share/harfbuzz) - +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() if (HAVE_GLIB) diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL index b22ee7b8e..18f03e487 100644 --- a/ports/hdf5/CONTROL +++ b/ports/hdf5/CONTROL @@ -1,12 +1,12 @@ -Source: hdf5 -Version: 1.10.5-6 -Homepage: https://www.hdfgroup.org/downloads/hdf5/ -Description: HDF5 is a data model, library, and file format for storing and managing data -Build-Depends: zlib, szip - -Feature: parallel -Description: parallel support for HDF5 -Build-Depends: msmpi - -Feature: cpp -Description: Builds cpp lib +Source: hdf5 +Version: 1.10.5-7 +Homepage: https://www.hdfgroup.org/downloads/hdf5/ +Description: HDF5 is a data model, library, and file format for storing and managing data +Build-Depends: zlib, szip + +Feature: parallel +Description: parallel support for HDF5 +Build-Depends: msmpi + +Feature: cpp +Description: Builds cpp lib diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index 593b38abf..1a148c2c3 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -30,10 +30,8 @@ else() set(ENABLE_CPP OFF) endif() -#Note: HDF5 Builds by default static as well as shared libraries. Set BUILD_SHARED_LIBS to OFF to only get static libraries -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS) - file(REMOVE ${SOURCE_PATH}/config/cmake_ext_mod/FindSZIP.cmake)#Outdated; does not find debug szip + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} DISABLE_PARALLEL_CONFIGURE @@ -54,10 +52,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/hdf5) - -#Linux build create additional scripts here. I dont know what they are doing so I am deleting them and hope for the best +#Linux build create additional scripts here. I dont know what they are doing so I am deleting them and hope for the best if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL index 76cf87859..d97927cd2 100644 --- a/ports/http-parser/CONTROL +++ b/ports/http-parser/CONTROL @@ -1,4 +1,4 @@ Source: http-parser -Version: 2.9.2 +Version: 2.9.2-1 Homepage: https://github.com/nodejs/http-parser Description: HTTP Parser. diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake index 8a208a5e7..f3cc67ec1 100644 --- a/ports/http-parser/portfile.cmake +++ b/ports/http-parser/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/unofficial-http-parser" TARGET_PATH "share/unofficial-http-parser") +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-http-parser TARGET_PATH share/unofficial-http-parser) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/http-parser) diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index 87364545a..6de881a9a 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,4 +1,4 @@ Source: imgui -Version: 1.70 +Version: 1.70-1 Homepage: https://github.com/ocornut/imgui Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 3fa363886..2acebc0c8 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -21,6 +21,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/imgui) +vcpkg_fixup_cmake_targets() configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright COPYONLY) diff --git a/ports/ismrmrd/CONTROL b/ports/ismrmrd/CONTROL index 7f7c26ef7..f876416d4 100644 --- a/ports/ismrmrd/CONTROL +++ b/ports/ismrmrd/CONTROL @@ -1,4 +1,4 @@ Source: ismrmrd -Version: 1.4.0 +Version: 1.4.0-1 Description: ISMRM Raw Data Format -Build-Depends: pugixml, hdf5 +Build-Depends: pugixml, hdf5, boost, fftw3 diff --git a/ports/ismrmrd/fix_static.patch b/ports/ismrmrd/fix_static.patch new file mode 100644 index 000000000..e9bd5f360 --- /dev/null +++ b/ports/ismrmrd/fix_static.patch @@ -0,0 +1,9 @@ +diff --git a/tests/test_main.cpp b/tests/test_main.cpp +index 4b1809d..7ec1414 100644 +--- a/tests/test_main.cpp ++++ b/tests/test_main.cpp +@@ -1,4 +1,3 @@ +-#define BOOST_TEST_DYN_LINK + #define BOOST_TEST_MODULE "ISMRMRD Unit Tests" + #include + diff --git a/ports/ismrmrd/portfile.cmake b/ports/ismrmrd/portfile.cmake index 7427cb1b2..4b6f7e6d6 100644 --- a/ports/ismrmrd/portfile.cmake +++ b/ports/ismrmrd/portfile.cmake @@ -1,34 +1,34 @@ include(vcpkg_common_functions) -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) - if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - set(WIN32_INCLUDE_STDDEF "x86-windows-include-stddef.patch") + set(WIN32_INCLUDE_STDDEF_PATCH "x86-windows-include-stddef.patch") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(STATIC_PATCH "fix_static.patch") endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ismrmrd/ismrmrd - REF 4d4004d91ccadd41ddb30b019f970a69bb23a1bc - SHA512 648901de4629c8b11574894763a5fa61a3cb0420c5aa62cdff02c4641ba702ca73efba12b403076301e44a4f0a7c915da1f2c7a34b24377d0385af92f2eda892 + REF 4d4004d91ccadd41ddb30b019f970a69bb23a1bc + SHA512 648901de4629c8b11574894763a5fa61a3cb0420c5aa62cdff02c4641ba702ca73efba12b403076301e44a4f0a7c915da1f2c7a34b24377d0385af92f2eda892 HEAD_REF master PATCHES - ${WIN32_INCLUDE_STDDEF} + ${STATIC_PATCH} + ${WIN32_INCLUDE_STDDEF_PATCH} ) - - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DUSE_SYSTEM_PUGIXML=ON - -DUSE_HDF5_DATASET_SUPPORT=ON + OPTIONS + -DUSE_SYSTEM_PUGIXML=ON + -DUSE_HDF5_DATASET_SUPPORT=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() - vcpkg_fixup_cmake_targets(CONFIG_PATH share/ismrmrd/cmake) if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll) @@ -62,15 +62,27 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${ISMRMRD_CMAKE_DIRS}) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + set(EXECUTABLE_SUFFIX ".exe") +endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info.exe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_c_example${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_c_example${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_generate_cartesian_shepp_logan${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_generate_cartesian_shepp_logan${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_read_timing_test${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_read_timing_test${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_recon_cartesian_2d${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_recon_cartesian_2d${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_test_xml${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_test_xml${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_c_example.exe) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_c_example.exe) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_read_timing_test.exe) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_read_timing_test.exe) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/) +endif() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd) file(RENAME ${CURRENT_PACKAGES_DIR}/share/ismrmrd/LICENSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/copyright) diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL index b8ba70d0f..b77968554 100644 --- a/ports/itk/CONTROL +++ b/ports/itk/CONTROL @@ -1,5 +1,5 @@ Source: itk -Version: 5.0.0-1 +Version: 5.0.0-2 Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis. Homepage: https://github.com/InsightSoftwareConsortium/ITK Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[cpp], openjpeg diff --git a/ports/itk/fix_conflict_with_openjp2_pc.patch b/ports/itk/fix_conflict_with_openjp2_pc.patch deleted file mode 100644 index b1a2fb6ec..000000000 --- a/ports/itk/fix_conflict_with_openjp2_pc.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt -index 6ac16ab6..2bde9952 100644 ---- a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt -+++ b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt -@@ -373,7 +373,8 @@ else() - endif() - - if(GDCM_USE_SYSTEM_OPENJPEG) -- find_package(OpenJPEG 2.0.0 REQUIRED) -+ # openjpeg version in vcpkg is already greater than 2.0.0 and openjpeg has no version.cmake file -+ find_package(OpenJPEG REQUIRED) - set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES}) - else() - set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2) -diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt -index 565cc338..ec126ef9 100644 ---- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt -+++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt -@@ -359,12 +359,8 @@ endif() - - #----------------------------------------------------------------------------- - # pkgconfig support --# enabled by default on Unix, disabled by default on other platforms --if(UNIX) -- option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON) --else() -- option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF) --endif() -+# Cannot use the built-in openjp2 because the configuration path is under buildtrees -+option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF) - if(BUILD_PKGCONFIG_FILES) - # install in lib and not share (see multi-arch note above) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in diff --git a/ports/itk/fix_libminc_config_path.patch b/ports/itk/fix_libminc_config_path.patch new file mode 100644 index 000000000..3ff305d4b --- /dev/null +++ b/ports/itk/fix_libminc_config_path.patch @@ -0,0 +1,13 @@ +diff --git a/Modules/ThirdParty/MINC/src/libminc/CMakeLists.txt b/Modules/ThirdParty/MINC/src/libminc/CMakeLists.txt +index 305b2c63..63f81a53 100644 +--- a/Modules/ThirdParty/MINC/src/libminc/CMakeLists.txt ++++ b/Modules/ThirdParty/MINC/src/libminc/CMakeLists.txt +@@ -550,7 +550,7 @@ IF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT) + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Use${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINC.cmake + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINCConfig.cmake + DESTINATION +- ${LIBMINC_INSTALL_LIB_DIR}/cmake ++ share/itk + COMPONENT Development) + ENDIF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT) + diff --git a/ports/itk/fix_openjpeg_search.patch b/ports/itk/fix_openjpeg_search.patch new file mode 100644 index 000000000..d17a1ab84 --- /dev/null +++ b/ports/itk/fix_openjpeg_search.patch @@ -0,0 +1,13 @@ +diff --git a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt +index 6ac16ab6..4638f13c 100644 +--- a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt ++++ b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt +@@ -373,7 +373,7 @@ else() + endif() + + if(GDCM_USE_SYSTEM_OPENJPEG) +- find_package(OpenJPEG 2.0.0 REQUIRED) ++ find_package(OpenJPEG REQUIRED) + set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES}) + else() + set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2) diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index 77dd88d9d..a83527a51 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -1,8 +1,8 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 50 AND CMAKE_HOST_WIN32) - message(WARNING "ITKs buildsystem uses very long paths and may fail on your system.\n" +if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() @@ -10,10 +10,12 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO InsightSoftwareConsortium/ITK - REF 3e12e7006a5881136414be54216a35bbacb55baa - SHA512 9796429f8750faffc87e44052455740d1a560883e83c3ed9614d1c7ae9cc1ae22a360b572d9bb1c5ec62ca12ac81d3aa0b8dbaffff3e4ad4c2f85077ed04a10b + REF v5.0.0 + SHA512 7eecd62ab3124147f0abce482699dfdc43610703959d4a3f667c8ce12a6ecacf836a863d146f3cc7d5220b4aa05adf70a0d4dc6fa8e87bac215565badc96acff HEAD_REF master - PATCHES fix_conflict_with_openjp2_pc.patch + PATCHES + fix_openjpeg_search.patch + fix_libminc_config_path.patch ) if ("vtk" IN_LIST FEATURES) @@ -66,12 +68,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) # combines release and debug build configurations file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/itk) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/itk/LICENSE ${CURRENT_PACKAGES_DIR}/share/itk/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL index 0ebcd2a5a..19b1224ef 100644 --- a/ports/jansson/CONTROL +++ b/ports/jansson/CONTROL @@ -1,4 +1,4 @@ Source: jansson -Version: 2.12 +Version: 2.12-1 Homepage: https://github.com/akheron/jansson Description: Jansson is a C library for encoding, decoding and manipulating JSON data diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index b6f3caef0..62086e99d 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -42,8 +42,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/jansson) +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright) diff --git a/ports/jasper/CONTROL b/ports/jasper/CONTROL index 858264411..43c657dd4 100644 --- a/ports/jasper/CONTROL +++ b/ports/jasper/CONTROL @@ -1,5 +1,5 @@ Source: jasper -Version: 2.0.16-1 +Version: 2.0.16-2 Homepage: https://github.com/mdadams/jasper Description: Open source implementation of the JPEG-2000 Part-1 standard -Build-Depends: libjpeg-turbo +Build-Depends: libjpeg-turbo, opengl, freeglut diff --git a/ports/jasper/jasper-fix-uwp.patch b/ports/jasper/jasper-fix-uwp.patch deleted file mode 100644 index 2b67d6c93..000000000 --- a/ports/jasper/jasper-fix-uwp.patch +++ /dev/null @@ -1,32 +0,0 @@ -From bad33461a302ed8db02e0d9875e7b59b9e8f6032 Mon Sep 17 00:00:00 2001 -From: Mikhail Paulyshka -Date: Tue, 7 Nov 2017 20:10:31 +0300 -Subject: [PATCH] Fixed build for Windows 10 UWP - ---- - src/libjasper/CMakeLists.txt | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/libjasper/CMakeLists.txt b/src/libjasper/CMakeLists.txt -index 234ae67..9d0a522 100644 ---- a/src/libjasper/CMakeLists.txt -+++ b/src/libjasper/CMakeLists.txt -@@ -145,6 +145,15 @@ target_include_directories(libjasper BEFORE PRIVATE - set_target_properties(libjasper PROPERTIES OUTPUT_NAME jasper) - set_target_properties(libjasper PROPERTIES LINKER_LANGUAGE C) - -+if(MSVC) -+ target_compile_definitions(libjasper PRIVATE -+ "-D_CRT_SECURE_NO_WARNINGS") -+ target_compile_definitions(libjasper PRIVATE -+ "-D_CRT_SECURE_NO_DEPRECATE") -+ target_compile_definitions(libjasper PRIVATE -+ "-D_CRT_NONSTDC_NO_DEPRECATE") -+endif() -+ - if (UNIX) - set_target_properties(libjasper PROPERTIES - VERSION ${JAS_SO_NAME} SOVERSION ${JAS_SO_VERSION}) --- -2.14.1.windows.1 - diff --git a/ports/jasper/opengl-not-required.patch b/ports/jasper/opengl-not-required.patch deleted file mode 100644 index 5c40a6b67..000000000 --- a/ports/jasper/opengl-not-required.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c432ba2..c67598f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -267,7 +267,9 @@ message("JAS_HAVE_LIBJPEG: ${JAS_HAVE_LIBJPEG}") - # Check for the OpenGL and GLUT libraries. - ################################################################################ - -+if(JAS_ENABLE_OPENGL) - find_package(OpenGL ${JAS_REQUIRED}) -+endif() - message("JAS_ENABLE_OPENGL: ${JAS_ENABLE_OPENGL}") - message("OpenGL library found: ${OPENGL_FOUND}") - if (JAS_ENABLE_OPENGL AND OPENGL_FOUND) diff --git a/ports/jasper/portfile.cmake b/ports/jasper/portfile.cmake index 6d11d166b..ae42d2a22 100644 --- a/ports/jasper/portfile.cmake +++ b/ports/jasper/portfile.cmake @@ -5,13 +5,7 @@ vcpkg_from_github( REPO mdadams/jasper REF version-2.0.16 SHA512 b3bca227f833567c9061c4a29c0599784ed6a131b5cceddfd1696542d19add821eda445ce6d83782b454b266723b24d0f028cbc644a25c0e3a75304e615b34ee - HEAD_REF master) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/jasper-fix-uwp.patch - ${CMAKE_CURRENT_LIST_DIR}/opengl-not-required.patch + HEAD_REF master ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -26,7 +20,6 @@ vcpkg_configure_cmake( OPTIONS -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF -DJAS_ENABLE_LIBJPEG=ON - -DJAS_ENABLE_OPENGL=OFF # not needed for the library -DJAS_ENABLE_DOC=OFF -DJAS_ENABLE_PROGRAMS=OFF -DJAS_ENABLE_SHARED=${JAS_ENABLE_SHARED} @@ -43,5 +36,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jasper) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/jasper/LICENSE ${CURRENT_PACKAGES_DIR}/share/jasper/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jasper RENAME copyright) diff --git a/ports/json-dto/CONTROL b/ports/json-dto/CONTROL index 1d8b7b24b..dbd64c3c1 100644 --- a/ports/json-dto/CONTROL +++ b/ports/json-dto/CONTROL @@ -1,4 +1,4 @@ Source: json-dto -Version: 0.2.8 +Version: 0.2.8-2 Description: A small header-only library for converting data between json representation and c++ structs. Build-Depends: rapidjson diff --git a/ports/json-dto/portfile.cmake b/ports/json-dto/portfile.cmake index 212ef87aa..7600433ea 100644 --- a/ports/json-dto/portfile.cmake +++ b/ports/json-dto/portfile.cmake @@ -19,7 +19,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/json-dto") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/json-dto) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/jxrlib/CONTROL b/ports/jxrlib/CONTROL index 908778681..f104c4c84 100644 --- a/ports/jxrlib/CONTROL +++ b/ports/jxrlib/CONTROL @@ -1,4 +1,4 @@ Source: jxrlib -Version: 1.1-6 +Version: 1.1-7 Homepage: https://github.com/4creators/jxrlib Description: Open source implementation of the jpegxr image format standard. diff --git a/ports/jxrlib/portfile.cmake b/ports/jxrlib/portfile.cmake index 49869b43f..43358fa15 100644 --- a/ports/jxrlib/portfile.cmake +++ b/ports/jxrlib/portfile.cmake @@ -25,14 +25,13 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxrlib) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/jxrlib/LICENSE ${CURRENT_PACKAGES_DIR}/share/jxrlib/copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) #install FindJXR.cmake file -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindJXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/JXR) - -vcpkg_copy_pdbs() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindJXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) diff --git a/ports/jxrlib/vcpkg-cmake-wrapper.cmake b/ports/jxrlib/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..e95a66bdc --- /dev/null +++ b/ports/jxrlib/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,8 @@ +set(JXR_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +if(NOT JXR_LIBRARIES) + _find_package(${ARGS}) +endif() + +set(CMAKE_MODULE_PATH ${JXR_PREV_MODULE_PATH}) diff --git a/ports/kangaru/CONTROL b/ports/kangaru/CONTROL index 278546bad..6990d5190 100644 --- a/ports/kangaru/CONTROL +++ b/ports/kangaru/CONTROL @@ -1,3 +1,3 @@ Source: kangaru -Version: 4.1.3 +Version: 4.1.3-1 Description: A dependency injection container for C++11, C++14 and later diff --git a/ports/kangaru/portfile.cmake b/ports/kangaru/portfile.cmake index ffcb68bfb..15af5ded0 100644 --- a/ports/kangaru/portfile.cmake +++ b/ports/kangaru/portfile.cmake @@ -15,11 +15,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/kangaru") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/kangaru) file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug ) diff --git a/ports/kinectsdk2/portfile.cmake b/ports/kinectsdk2/portfile.cmake index a4b89b521..bd2080c04 100644 --- a/ports/kinectsdk2/portfile.cmake +++ b/ports/kinectsdk2/portfile.cmake @@ -1,20 +1,8 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "Kinectsdk2's buildsystem uses very long paths and may fail on your system.\n" + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL index 2f48aa0d2..39a0a5e5c 100644 --- a/ports/leptonica/CONTROL +++ b/ports/leptonica/CONTROL @@ -1,5 +1,5 @@ Source: leptonica -Version: 1.76.0 +Version: 1.76.0-1 Homepage: https://github.com/DanBloomberg/leptonica Description: An open source library containing software that is broadly useful for image processing and image analysis applications Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib diff --git a/ports/leptonica/portfile.cmake b/ports/leptonica/portfile.cmake index d42fa6b90..34a1c379e 100644 --- a/ports/leptonica/portfile.cmake +++ b/ports/leptonica/portfile.cmake @@ -24,7 +24,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) vcpkg_copy_pdbs() diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL index eaa533a61..f5ae2330d 100644 --- a/ports/libbson/CONTROL +++ b/ports/libbson/CONTROL @@ -1,4 +1,4 @@ Source: libbson -Version: 1.14.0 +Version: 1.14.0-1 Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. Homepage: https://github.com/mongodb/libbson diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index 18f567b71..c682ae086 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -30,9 +30,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libbson-static-1.0") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-static-1.0) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libbson-1.0") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-1.0) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) diff --git a/ports/libfreenect2/CONTROL b/ports/libfreenect2/CONTROL index 82befaac0..bb0b63871 100644 --- a/ports/libfreenect2/CONTROL +++ b/ports/libfreenect2/CONTROL @@ -1,5 +1,5 @@ Source: libfreenect2 -Version: 0.2.0-1 +Version: 0.2.0-2 Build-Depends: libusb, libjpeg-turbo Homepage: https://github.com/OpenKinect/libfreenect2 Description: Open source drivers for the Kinect for Windows v2 device diff --git a/ports/libfreenect2/portfile.cmake b/ports/libfreenect2/portfile.cmake index ba41bb904..839c7073e 100644 --- a/ports/libfreenect2/portfile.cmake +++ b/ports/libfreenect2/portfile.cmake @@ -26,7 +26,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/freenect2") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/freenect2) vcpkg_copy_pdbs() diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL index 33fa2e3cb..f8d2ca29a 100644 --- a/ports/libharu/CONTROL +++ b/ports/libharu/CONTROL @@ -1,5 +1,5 @@ Source: libharu -Version: 2017-08-15-d84867ebf9f-6 +Version: 2017-08-15-8 Homepage: https://github.com/libharu/libharu Description: libharu - free PDF library Build-Depends: zlib, libpng diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake index 7855dedc7..962550ca8 100644 --- a/ports/libharu/portfile.cmake +++ b/ports/libharu/portfile.cmake @@ -19,22 +19,32 @@ vcpkg_from_github( ${SHADING_PR} ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LIBHPDF_STATIC) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "shared" LIBHPDF_SHARED) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) + set(VCPKG_BUILD_STATIC_LIBS OFF) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) + set(VCPKG_BUILD_STATIC_LIBS ON) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DLIBHPDF_STATIC=${LIBHPDF_STATIC} - -DLIBHPDF_SHARED=${LIBHPDF_SHARED} + -DLIBHPDF_STATIC=${VCPKG_BUILD_STATIC_LIBS} + -DLIBHPDF_SHARED=${VCPKG_BUILD_SHARED_LIBS} ) vcpkg_install_cmake() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib ${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.a ${CURRENT_PACKAGES_DIR}/lib/libhpdf.a) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfs.a ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.a) + endif() endif() file(REMOVE_RECURSE diff --git a/ports/libmodbus/CONTROL b/ports/libmodbus/CONTROL index ef880d2a0..44cededd2 100644 --- a/ports/libmodbus/CONTROL +++ b/ports/libmodbus/CONTROL @@ -1,3 +1,3 @@ Source: libmodbus -Version: 3.1.4-2 +Version: 3.1.4-3 Description: libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol diff --git a/ports/libmodbus/portfile.cmake b/ports/libmodbus/portfile.cmake index 95e3b8720..3b5e27c2a 100644 --- a/ports/libmodbus/portfile.cmake +++ b/ports/libmodbus/portfile.cmake @@ -19,10 +19,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodbus RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/libogg/CONTROL b/ports/libogg/CONTROL index abce41839..497ec9a6d 100644 --- a/ports/libogg/CONTROL +++ b/ports/libogg/CONTROL @@ -1,4 +1,4 @@ Source: libogg -Version: 1.3.3-3 +Version: 1.3.3-4 Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. Homepage: https://github.com/xiph/ogg diff --git a/ports/libogg/portfile.cmake b/ports/libogg/portfile.cmake index b42ad8136..0b3b8be7b 100644 --- a/ports/libogg/portfile.cmake +++ b/ports/libogg/portfile.cmake @@ -24,4 +24,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libogg RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/ports/libpff/CONTROL b/ports/libpff/CONTROL index 0aeb07a19..8520aa188 100644 --- a/ports/libpff/CONTROL +++ b/ports/libpff/CONTROL @@ -1,4 +1,4 @@ Source: libpff -Version: 2018-07-14 +Version: 2018-07-14-1 Build-Depends: zlib Description: Library and tools to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. diff --git a/ports/libpff/portfile.cmake b/ports/libpff/portfile.cmake index f9a56a86e..6d327d8a5 100644 --- a/ports/libpff/portfile.cmake +++ b/ports/libpff/portfile.cmake @@ -29,7 +29,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libpff" TARGET_PATH "share/unofficial-libpff") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libpff TARGET_PATH share/unofficial-libpff) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 1b07ce1e2..f813439d8 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,5 +1,5 @@ Source: libpng -Version: 1.6.37-1 +Version: 1.6.37-2 Build-Depends: zlib Homepage: https://github.com/glennrp/libpng Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index ab552b8e6..7262d34c7 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -44,7 +44,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() endif() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/libpng TARGET_PATH share/libpng) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/libpng) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share/) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpng) diff --git a/ports/libressl/CONTROL b/ports/libressl/CONTROL index 989dbfdeb..2cb09fb6c 100644 --- a/ports/libressl/CONTROL +++ b/ports/libressl/CONTROL @@ -1,6 +1,6 @@ Source: libressl -Version: 2.9.1 +Version: 2.9.1-2 Description: LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes. Feature: tools -Description: Build openssl and ocspcheck executables \ No newline at end of file +Description: Build openssl and ocspcheck executables diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index d99ee1b62..5c8e5b964 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.13) +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(WARNING "Can't build libressl if openssl is installed. Please remove openssl, and try install libressl again if you need it. Build will continue since libressl is a subset of openssl") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() @@ -28,11 +34,6 @@ vcpkg_extract_source_archive_ex( 0002-suppress-msvc-warnings.patch ) -set(BUILD_SHARED_LIBS OFF) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_SHARED_LIBS ON) -endif() - set(LIBRESSL_APPS OFF) if("tools" IN_LIST FEATURES) set(LIBRESSL_APPS ON) @@ -44,7 +45,6 @@ vcpkg_configure_cmake( OPTIONS -DLIBRESSL_APPS=${LIBRESSL_APPS} -DLIBRESSL_TESTS=OFF - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} OPTIONS_DEBUG -DLIBRESSL_APPS=OFF ) @@ -61,7 +61,7 @@ if(LIBRESSL_APPS) vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/openssl") endif() -if(NOT BUILD_SHARED_LIBS) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" @@ -81,7 +81,7 @@ vcpkg_copy_pdbs() file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -if((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) AND BUILD_SHARED_LIBS) +if((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) AND (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")) file(GLOB_RECURSE LIBS "${CURRENT_PACKAGES_DIR}/*.lib") foreach(LIB ${LIBS}) string(REGEX REPLACE "(.+)-[0-9]+\\.lib" "\\1.lib" LINK "${LIB}") diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL index 91a28e6b3..2547637a8 100644 --- a/ports/libsndfile/CONTROL +++ b/ports/libsndfile/CONTROL @@ -1,5 +1,5 @@ Source: libsndfile -Version: 1.0.29-6830c42-7 +Version: 1.0.29-8 Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo Homepage: https://github.com/erikd/libsndfile Default-Features: external-libs diff --git a/ports/libsndfile/portfile.cmake b/ports/libsndfile/portfile.cmake index 7c103b6a2..1e86fbffb 100644 --- a/ports/libsndfile/portfile.cmake +++ b/ports/libsndfile/portfile.cmake @@ -26,7 +26,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS -DBUILD_EXAMPLES=OFF -DBUILD_REGTEST=OFF -DBUILD_TESTING=OFF @@ -41,8 +41,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/libsndfile) +vcpkg_fixup_cmake_targets() # Fix applied for 6830c421899e32f8d413a903a21a9b6cf384d369 file(READ "${CURRENT_PACKAGES_DIR}/share/libsndfile/LibSndFileTargets.cmake" _contents) diff --git a/ports/libtins/CONTROL b/ports/libtins/CONTROL index e2a7f43a2..4bd5d3755 100644 --- a/ports/libtins/CONTROL +++ b/ports/libtins/CONTROL @@ -1,4 +1,4 @@ Source: libtins -Version: 4.0-2 +Version: 4.0-3 Description: High-level, multiplatform C++ network packet sniffing and crafting library Build-Depends: winpcap (windows) diff --git a/ports/libtins/portfile.cmake b/ports/libtins/portfile.cmake index 6890fe64c..1839d118c 100644 --- a/ports/libtins/portfile.cmake +++ b/ports/libtins/portfile.cmake @@ -10,16 +10,22 @@ vcpkg_from_github( string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTINS_BUILD_SHARED) +set(ENABLE_PCAP FALSE) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(ENABLE_PCAP TRUE) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DLIBTINS_BUILD_SHARED=${LIBTINS_BUILD_SHARED} + -DLIBTINS_ENABLE_PCAP=${ENABLE_PCAP} ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/libtins) +vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index ecd230144..e4229daed 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -1,4 +1,4 @@ Source: libusb -Version: 1.0.22-2 +Version: 1.0.22-3 Homepage: https://github.com/libusb/libusb Description: a cross-platform library to access USB devices diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index d2a96c73b..d5047841f 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -1,7 +1,11 @@ include(vcpkg_common_functions) -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds are currently not supported.") +if (VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "Error: the port is unsupported on your platform. Please open an issue on github.com/Microsoft/vcpkg to request a fix") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + message("${PORT} currently requires the following tools and libraries from the system package manager:\n autoreconf\n libudev\n\nThese can be installed on Ubuntu systems via apt-get install autoreconf libudev-dev") endif() vcpkg_from_github( @@ -11,28 +15,96 @@ vcpkg_from_github( SHA512 b1fed66aafa82490889ee488832c6884a95d38ce7b28fb7c3234b9bce1f749455d7b91cde397a0abc25101410edb13ab2f9832c59aa7b0ea8c19ba2cf4c63b00 HEAD_REF master PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix_c2001.patch" + fix_c2001.patch ) -if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(MSVS_VERSION 2017) -else() - set(MSVS_VERSION 2015) -endif() +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(MSVS_VERSION 2017) #they are abi compatible, so it should work + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(MSVS_VERSION 2017) + else() + set(MSVS_VERSION 2015) + endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(LIBUSB_PROJECT_TYPE dll) -else() - set(LIBUSB_PROJECT_TYPE static) -endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(LIBUSB_PROJECT_TYPE dll) + else() + set(LIBUSB_PROJECT_TYPE static) + endif() -vcpkg_install_msbuild( - SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj - LICENSE_SUBPATH COPYING -) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj + LICENSE_SUBPATH COPYING + ) +else() + set(BASH /bin/bash) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + # Copy sources + message(STATUS "Copying source files...") + file(GLOB PORT_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${PORT_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + endforeach() + message(STATUS "Copying source files... done") + # Configure release + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + execute_process( + COMMAND "${BASH} --noprofile --norc -c \"./autogen.sh\"" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + execute_process( + COMMAND "${BASH} --noprofile --norc -c \"./configure --prefix=${CURRENT_PACKAGES_DIR}\"" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + # Copy sources + message(STATUS "Copying source files...") + file(GLOB PORT_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${PORT_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + endforeach() + message(STATUS "Copying source files... done") + # Configure debug + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + execute_process( + COMMAND "${BASH} --noprofile --norc -c \"./autogen.sh\"" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + execute_process( + COMMAND "${BASH} --noprofile --norc -c \"./configure --prefix=${CURRENT_PACKAGES_DIR}/debug\"" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # Build release + message(STATUS "Package ${TARGET_TRIPLET}-rel") + execute_process( + COMMAND "${BASH} --noprofile --norc -c \"make install\"" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + message(STATUS "Package ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Build debug + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + execute_process( + COMMAND "${BASH} --noprofile --norc -c \"make install\"" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + endif() +endif() file(INSTALL ${SOURCE_PATH}/libusb/libusb.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/libusb-1.0 ) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index a22b389b4..90dffdc77 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,5 +1,5 @@ Source: libwebp -Version: 1.0.2-4 +Version: 1.0.2-6 Homepage: https://github.com/webmproject/libwebp Description: Lossy compression of digital photographic images. Build-Depends: opengl diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 49590a982..11b0b7904 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -37,6 +37,12 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") message("WebP currently requires the following library from the system package manager:\n Xxf86vm\n\nThis can be installed on Ubuntu systems via apt-get install libxxf86vm-dev") endif() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(WEBP_BUILD_VWEBP OFF) + set(WEBP_BUILD_EXTRAS OFF) + message("Due to GLUT Framework problems with CMake, at the moment it's not possible to build VWebP on Mac. It has been disabled together with extras.") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -63,8 +69,12 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/WebP/cmake/" TARGET_PATH "share/WebP/") +vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/WebP) +file(GLOB CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/${PORT}/*) +file(COPY ${CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/webp/) #somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it if(CMAKE_HOST_WIN32) @@ -114,5 +124,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebp/COPYING ${CURRENT_PACKAGES_DIR}/share/libwebp/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp RENAME copyright) diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index ae9c3d6ee..1b091480a 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,5 +1,5 @@ Source: libwebsockets -Version: 3.1.0-1 +Version: 3.1.0-2 Build-Depends: zlib, openssl Homepage: https://github.com/warmcat/libwebsockets Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server. diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake index c23f99042..b2b90cccf 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -27,9 +27,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libwebsockets" TARGET_PATH "share/libwebsockets") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libwebsockets) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/lmdb/CONTROL b/ports/lmdb/CONTROL index 247d812d5..eea847401 100644 --- a/ports/lmdb/CONTROL +++ b/ports/lmdb/CONTROL @@ -1,4 +1,4 @@ Source: lmdb -Version: 0.9.23 +Version: 0.9.23-1 Homepage: https://github.com/LMDB/lmdb Description: LMDB is an extraordinarily fast, memory-efficient database diff --git a/ports/lmdb/portfile.cmake b/ports/lmdb/portfile.cmake index 504c3935c..9dc1aeeb2 100644 --- a/ports/lmdb/portfile.cmake +++ b/ports/lmdb/portfile.cmake @@ -18,9 +18,8 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/lmdb) +vcpkg_fixup_cmake_targets() file(INSTALL ${SOURCE_PATH}/libraries/liblmdb/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lmdb RENAME copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/magnum-extras/CONTROL b/ports/magnum-extras/CONTROL index 7ff04cb63..e065088af 100644 --- a/ports/magnum-extras/CONTROL +++ b/ports/magnum-extras/CONTROL @@ -1,9 +1,8 @@ Source: magnum-extras -Version: 2019.01-1 +Version: 2019.01-2 Build-Depends: magnum[core] -Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization +Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization Homepage: https://magnum.graphics/ -Default-Features: Feature: ui Description: Ui library diff --git a/ports/magnum-extras/portfile.cmake b/ports/magnum-extras/portfile.cmake index 7941aeee9..41faca02c 100644 --- a/ports/magnum-extras/portfile.cmake +++ b/ports/magnum-extras/portfile.cmake @@ -37,7 +37,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/MagnumExtras TARGET_PATH share/MagnumExtras) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/MagnumExtras TARGET_PATH share/magnumextras) # Messages to the user if("ui" IN_LIST FEATURES) diff --git a/ports/magnum-integration/CONTROL b/ports/magnum-integration/CONTROL index 538320497..68a481b8c 100644 --- a/ports/magnum-integration/CONTROL +++ b/ports/magnum-integration/CONTROL @@ -1,9 +1,8 @@ Source: magnum-integration -Version: 2019.01-1 +Version: 2019.01-2 Build-Depends: magnum[core] -Description: Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization +Description: Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization Homepage: https://magnum.graphics/ -Default-Features: Feature: bullet Description: BulletIntegration library @@ -22,4 +21,3 @@ Build-Depends: imgui #Feature: dart #Description: DartIntegration library #Build-Depends: dart - diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index ef4c4084c..abe303a90 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,7 +1,7 @@ Source: magnum-plugins Version: 2019.01-1 Build-Depends: magnum[core] -Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization +Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization Homepage: https://magnum.graphics/ Default-Features: ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter @@ -27,7 +27,6 @@ Build-Depends: magnum[audio] Feature: drwavaudioimporter Description: DrWavAudioImporter plugin Build-Depends: magnum[audio] -# #Feature: faad2audioimporter #Description: Faad2AudioImporter plugin #Build-Depends: magnum[audio], faad2 diff --git a/ports/mathgl/CONTROL b/ports/mathgl/CONTROL index 211c435e8..9337e5f2d 100644 --- a/ports/mathgl/CONTROL +++ b/ports/mathgl/CONTROL @@ -1,5 +1,5 @@ Source: mathgl -Version: 2.4.3 +Version: 2.4.3-1 Description: MathGL is a free library of fast C++ routines for the plotting of the data varied in one or more dimensions Default-Features: opengl, jpeg, png, zlib diff --git a/ports/mathgl/portfile.cmake b/ports/mathgl/portfile.cmake index dd44353e0..d17707c64 100644 --- a/ports/mathgl/portfile.cmake +++ b/ports/mathgl/portfile.cmake @@ -91,11 +91,11 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/mathgl) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) file(REMOVE ${CURRENT_PACKAGES_DIR}/mathgl2-config.cmake) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/mathgl2-config.cmake) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mathgl TARGET_PATH share/mathgl) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mathgl) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index 35f29143d..0a02b9dd1 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,5 +1,5 @@ Source: mongo-c-driver -Version: 1.14.0-1 +Version: 1.14.0-2 Build-Depends: libbson, openssl (!windows), zlib Description: Client library written in C for MongoDB. Homepage: https://github.com/mongodb/mongo-c-driver diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index 5a0c484c0..3db262c2f 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -40,9 +40,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libmongoc-static-1.0") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libmongoc-static-1.0) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libmongoc-1.0") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libmongoc-1.0) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) @@ -96,7 +96,7 @@ endif() file(READ ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake LIBMONGOC_CONFIG_CMAKE) # Patch: Set _IMPORT_PREFIX and replace PACKAGE_PREFIX_DIR -string(REPLACE +string(REPLACE [[ get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) ]] diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL index 50a2a6efd..c1d85e636 100644 --- a/ports/mongo-cxx-driver/CONTROL +++ b/ports/mongo-cxx-driver/CONTROL @@ -1,5 +1,5 @@ Source: mongo-cxx-driver -Version: 3.4.0-1 +Version: 3.4.0-2 Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility Homepage: https://github.com/mongodb/mongo-cxx-driver Description: MongoDB C++ Driver. diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index a5a1c6f39..3ff200da3 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -26,7 +26,7 @@ elseif ("boost" IN_LIST FEATURES) elseif("std-experimental" IN_LIST FEATURES) set(BSONCXX_POLY STD_EXPERIMENTAL) else() - if (WIN32) + if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(BSONCXX_POLY BOOST) else() set(BSONCXX_POLY MNMLSTC) diff --git a/ports/moos-core/CONTROL b/ports/moos-core/CONTROL index 33e68c93f..2534bb905 100644 --- a/ports/moos-core/CONTROL +++ b/ports/moos-core/CONTROL @@ -1,4 +1,4 @@ Source: moos-core -Version: 10.4.0-2 +Version: 10.4.0-3 Description: A very light weight, easy to use middleware. -Homepage: https://sites.google.com/site/moossoftware/ \ No newline at end of file +Homepage: https://sites.google.com/site/moossoftware/ diff --git a/ports/moos-core/portfile.cmake b/ports/moos-core/portfile.cmake index 646fde9e2..663ad6df2 100644 --- a/ports/moos-core/portfile.cmake +++ b/ports/moos-core/portfile.cmake @@ -12,25 +12,16 @@ vcpkg_from_github( cmake_fix.patch ) -message(STATUS "MOOS VCPKG SOURCE_PATH ${SOURCE_PATH}") -message(STATUS "MOOS INSTALL -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}") - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_SHARED_LIBS=OFF -DCMAKE_ENABLE_EXPORT=OFF ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/MOOS") - -set(MOOS_EXEC_SUFFIX "") -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(MOOS_EXEC_SUFFIX ".exe") -endif() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/MOOS) # Stage tools file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) diff --git a/ports/mosquitto/portfile.cmake b/ports/mosquitto/portfile.cmake index f3b2f9715..901e80fd7 100644 --- a/ports/mosquitto/portfile.cmake +++ b/ports/mosquitto/portfile.cmake @@ -30,17 +30,31 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_copy_pdbs() -# Remove debug/include file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE ${EXE}) -file(REMOVE ${DEBUG_EXE}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/mosquitto RENAME copyright) +if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() -# Copy pdb -vcpkg_copy_pdbs() +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_passwd${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_passwd${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_pub${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_pub${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_rr${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_rr${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_sub${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_sub${EXECUTABLE_SUFFIX}) + +#if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +#endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/mosquitto RENAME copyright) diff --git a/ports/ms-angle/CONTROL b/ports/ms-angle/CONTROL index 6d68b4e56..4fadc5994 100644 --- a/ports/ms-angle/CONTROL +++ b/ports/ms-angle/CONTROL @@ -1,4 +1,4 @@ Source: ms-angle -Version: 2018-04-18-1 +Version: 2018-04-18-2 Description: The UWP version of a conformant OpenGL ES implementation for Windows, Mac and Linux. The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support. diff --git a/ports/ms-angle/portfile.cmake b/ports/ms-angle/portfile.cmake index 0a8dc8c9b..0e10fa1cc 100644 --- a/ports/ms-angle/portfile.cmake +++ b/ports/ms-angle/portfile.cmake @@ -25,9 +25,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/ms-angle) - +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ms-angle RENAME copyright) diff --git a/ports/nanomsg/CONTROL b/ports/nanomsg/CONTROL index c560edbd1..8693cfef3 100644 --- a/ports/nanomsg/CONTROL +++ b/ports/nanomsg/CONTROL @@ -1,5 +1,5 @@ Source: nanomsg -Version: 1.1.5 +Version: 1.1.5-1 Description: a simple high-performance implementation of several "scalability protocols". These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket. diff --git a/ports/nanomsg/portfile.cmake b/ports/nanomsg/portfile.cmake index 71b26ea5e..d07685f60 100644 --- a/ports/nanomsg/portfile.cmake +++ b/ports/nanomsg/portfile.cmake @@ -32,7 +32,7 @@ vcpkg_install_cmake() file(STRINGS ${SOURCE_PATH}/.version NN_PACKAGE_VERSION) -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/nanomsg-${NN_PACKAGE_VERSION}") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nanomsg-${NN_PACKAGE_VERSION}) vcpkg_replace_string( ${CURRENT_PACKAGES_DIR}/share/${PORT}/nanomsg-config.cmake @@ -64,7 +64,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ) - + vcpkg_replace_string( ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h "defined(NN_STATIC_LIB)" diff --git a/ports/nlopt/portfile.cmake b/ports/nlopt/portfile.cmake index c5017f4f8..5fb068145 100644 --- a/ports/nlopt/portfile.cmake +++ b/ports/nlopt/portfile.cmake @@ -25,7 +25,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/nlopt") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nlopt) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/octomap/CONTROL b/ports/octomap/CONTROL index 3669f3850..afac685c6 100644 --- a/ports/octomap/CONTROL +++ b/ports/octomap/CONTROL @@ -1,3 +1,3 @@ Source: octomap -Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-6 +Version: 2017-03-11-7 Description: An Efficient Probabilistic 3D Mapping Framework Based on Octrees diff --git a/ports/octomap/portfile.cmake b/ports/octomap/portfile.cmake index d260d4409..203adce4d 100644 --- a/ports/octomap/portfile.cmake +++ b/ports/octomap/portfile.cmake @@ -49,8 +49,7 @@ else() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/octomap) - +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/ogre/001-cmake-install-dir.patch b/ports/ogre/001-cmake-install-dir.patch deleted file mode 100644 index d0df419eb..000000000 --- a/ports/ogre/001-cmake-install-dir.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt -index a7a3796..2e21403 100644 ---- a/CMake/CMakeLists.txt -+++ b/CMake/CMakeLists.txt -@@ -13,10 +13,12 @@ - # directory, but can also be used for custom projects. - ############################################################# - --if(WIN32 OR APPLE) -- set(OGRE_CMAKE_DIR "CMake") --else() -- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") -+if(NOT DEFINED OGRE_CMAKE_DIR) -+ if(WIN32 OR APPLE) -+ set(OGRE_CMAKE_DIR "CMake") -+ else() -+ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") -+ endif() - endif() - - set(INST_FILES Utils/FindPkgMacros.cmake) -diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake -index 783755e..79f7514 100644 ---- a/CMake/InstallResources.cmake -+++ b/CMake/InstallResources.cmake -@@ -208,10 +208,12 @@ endif () - # Create the CMake package files - include(CMakePackageConfigHelpers) - --if(WIN32 OR APPLE) -- set(OGRE_CMAKE_DIR "CMake") --else() -- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") -+if(NOT DEFINED OGRE_CMAKE_DIR) -+ if(WIN32 OR APPLE) -+ set(OGRE_CMAKE_DIR "CMake") -+ else() -+ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") -+ endif() - endif() - configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake - INSTALL_DESTINATION ${OGRE_CMAKE_DIR} diff --git a/ports/ogre/002-link-optimized-lib-workaround.patch b/ports/ogre/002-link-optimized-lib-workaround.patch deleted file mode 100644 index b2678f488..000000000 --- a/ports/ogre/002-link-optimized-lib-workaround.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/CMake/Dependencies.cmake -+++ b/CMake/Dependencies.cmake -@@ -199,6 +199,11 @@ - # Find zlib - find_package(ZLIB) - macro_log_feature(ZLIB_FOUND "zlib" "Simple data compression library" "http://www.zlib.net" FALSE "" "") -+# replace optimized/debug keyword with generator expression -+unset(ZLIB_LIBRARY) -+set(ZLIB_LIBRARY $<$:${ZLIB_LIBRARY_RELEASE}> $<$:${ZLIB_LIBRARY_DEBUG}>) -+unset(ZLIB_LIBRARIES) -+set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) - - if (ZLIB_FOUND) - # Find zziplib -@@ -213,6 +218,11 @@ - # Find FreeType - find_package(Freetype) - macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" FALSE "" "") -+# replace optimized/debug keyword with generator expression -+unset(FREETYPE_LIBRARY) -+set(FREETYPE_LIBRARY $<$:${FREETYPE_LIBRARY_RELEASE}> $<$:${FREETYPE_LIBRARY_DEBUG}>) -+unset(FREETYPE_LIBRARIES) -+set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY}) - - # Find X11 - if (UNIX AND NOT APPLE AND NOT ANDROID AND NOT EMSCRIPTEN) ---- src.orig/CMake/Utils/FindPkgMacros.cmake -+++ src.new/CMake/Utils/FindPkgMacros.cmake -@@ -82,7 +82,7 @@ - if (${PREFIX}_FWK) - set(${PREFIX} ${${PREFIX}_FWK}) - elseif (${PREFIX}_REL AND ${PREFIX}_DBG) -- set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG}) -+ set(${PREFIX} $<$:${${PREFIX}_REL}> $<$:${${PREFIX}_DBG}>) - elseif (${PREFIX}_REL) - set(${PREFIX} ${${PREFIX}_REL}) - elseif (${PREFIX}_DBG) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index a454a69f1..d7a4dd3f5 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,5 +1,5 @@ Source: ogre -Version: 1.12.0 +Version: 1.12.0-1 Build-Depends: freeimage, freetype, zlib, zziplib Homepage: https://github.com/OGRECave/ogre Description: 3D Object-Oriented Graphics Rendering Engine diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake index 1b9087aca..04b4fe608 100644 --- a/ports/ogre/portfile.cmake +++ b/ports/ogre/portfile.cmake @@ -4,13 +4,14 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OGRECave/ogre REF c14f8847f743f4dc1b3abc947b1725c87d8b10ce - SHA512 a2fd7ffd653c1578bc860b58cf4c899f27cc967f75e2254dc3e372044f118d5951e42b35bfc711aa8996e1885f372d3cfa5a768b8674e0b3d844811990eb87fc + SHA512 a2fd7ffd653c1578bc860b58cf4c899f27cc967f75e2254dc3e372044f118d5951e42b35bfc711aa8996e1885f372d3cfa5a768b8674e0b3d844811990eb87fc HEAD_REF master PATCHES - 001-cmake-install-dir.patch - 002-link-optimized-lib-workaround.patch + toolchain_fixes.patch ) +file(REMOVE "${SOURCE_PATH}/CMake/Packages/FindOpenEXR.cmake") + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(OGRE_STATIC ON) else() @@ -70,27 +71,29 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() -# Remove unwanted files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/ogre) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - file(GLOB REL_CFGS ${CURRENT_PACKAGES_DIR}/bin/*.cfg) -file(COPY ${REL_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(REL_CFGS) + file(COPY ${REL_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE ${REL_CFGS}) +endif() file(GLOB DBG_CFGS ${CURRENT_PACKAGES_DIR}/debug/bin/*.cfg) -file(COPY ${DBG_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -file(REMOVE ${REL_CFGS} ${DBG_CFGS}) +if(DBG_CFGS) + file(COPY ${DBG_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE ${DBG_CFGS}) +endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() if(NOT VCPKG_CMAKE_SYSTEM_NAME) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMain.lib) @@ -98,7 +101,7 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMainStatic.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMainStatic.lib) endif() endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMain_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMain_d.lib) diff --git a/ports/ogre/toolchain_fixes.patch b/ports/ogre/toolchain_fixes.patch new file mode 100644 index 000000000..1af384bdf --- /dev/null +++ b/ports/ogre/toolchain_fixes.patch @@ -0,0 +1,533 @@ +diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt +index a7a3796..2e21403 100755 +--- a/CMake/CMakeLists.txt ++++ b/CMake/CMakeLists.txt +@@ -13,10 +13,12 @@ + # directory, but can also be used for custom projects. + ############################################################# + +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++if(NOT DEFINED OGRE_CMAKE_DIR) ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() + endif() + + set(INST_FILES Utils/FindPkgMacros.cmake) +diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake +index 783755e..79f7514 100644 +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake +@@ -208,10 +208,12 @@ endif () + # Create the CMake package files + include(CMakePackageConfigHelpers) + +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++if(NOT DEFINED OGRE_CMAKE_DIR) ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() + endif() + configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake + INSTALL_DESTINATION ${OGRE_CMAKE_DIR} +diff --git a/CMake/Packages/FindCg.cmake b/CMake/Packages/FindCg.cmake +index 4501cf9..e91bfd0 100644 +--- a/CMake/Packages/FindCg.cmake ++++ b/CMake/Packages/FindCg.cmake +@@ -11,7 +11,7 @@ + # Once done, this will define + # + # Cg_FOUND - system has Cg +-# Cg_INCLUDE_DIRS - the Cg include directories ++# Cg_INCLUDE_DIRS - the Cg include directories + # Cg_LIBRARIES - link these to use Cg + + include(FindPkgMacros) +@@ -56,7 +56,7 @@ endif() + + find_library(Cg_LIBRARY_REL NAMES ${Cg_LIBRARY_NAMES} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(Cg_LIBRARY_DBG NAMES ${Cg_LIBRARY_NAMES_DBG} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(Cg_LIBRARY) ++make_library_set(Cg) + + if (WIN32) + if (CMAKE_CL_64) +diff --git a/CMake/Packages/FindFreeImage.cmake b/CMake/Packages/FindFreeImage.cmake +index 7c89ec5..445d86a 100644 +--- a/CMake/Packages/FindFreeImage.cmake ++++ b/CMake/Packages/FindFreeImage.cmake +@@ -11,7 +11,7 @@ + # Once done, this will define + # + # FreeImage_FOUND - system has FreeImage +-# FreeImage_INCLUDE_DIRS - the FreeImage include directories ++# FreeImage_INCLUDE_DIRS - the FreeImage include directories + # FreeImage_LIBRARIES - link these to use FreeImage + + include(FindPkgMacros) +@@ -43,7 +43,6 @@ find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${FreeImage_INC_SEARCH_P + find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) + +-make_library_set(FreeImage_LIBRARY) ++make_library_set(FreeImage) + + findpkg_finish(FreeImage) +- +diff --git a/CMake/Packages/FindGLSLOptimizer.cmake b/CMake/Packages/FindGLSLOptimizer.cmake +index dd4b179..8e51d2f 100644 +--- a/CMake/Packages/FindGLSLOptimizer.cmake ++++ b/CMake/Packages/FindGLSLOptimizer.cmake +@@ -11,7 +11,7 @@ + # Once done, this will define + # + # GLSL_Optimizer_FOUND - system has GLSL_Optimizer +-# GLSL_Optimizer_INCLUDE_DIRS - the GLSL_Optimizer include directories ++# GLSL_Optimizer_INCLUDE_DIRS - the GLSL_Optimizer include directories + # GLSL_Optimizer_LIBRARIES - link these to use GLSL_Optimizer + + include(FindPkgMacros) +@@ -38,8 +38,7 @@ findpkg_framework(GLSL_Optimizer) + find_path(GLSL_Optimizer_INCLUDE_DIR NAMES glsl_optimizer.h HINTS ${GLSL_Optimizer_INC_SEARCH_PATH} ${GLSL_Optimizer_PKGC_INCLUDE_DIRS} PATH_SUFFIXES GLSL_Optimizer) + find_library(GLSL_Optimizer_LIBRARY_REL NAMES ${GLSL_Optimizer_LIBRARY_NAMES} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(GLSL_Optimizer_LIBRARY_DBG NAMES ${GLSL_Optimizer_LIBRARY_NAMES_DBG} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(GLSL_Optimizer_LIBRARY) ++make_library_set(GLSL_Optimizer) + + findpkg_finish(GLSL_Optimizer) + add_parent_dir(GLSL_Optimizer_INCLUDE_DIRS GLSL_Optimizer_INCLUDE_DIR) +- +diff --git a/CMake/Packages/FindHLSL2GLSL.cmake b/CMake/Packages/FindHLSL2GLSL.cmake +index 7125895..f73c928 100644 +--- a/CMake/Packages/FindHLSL2GLSL.cmake ++++ b/CMake/Packages/FindHLSL2GLSL.cmake +@@ -11,7 +11,7 @@ + # Once done, this will define + # + # HLSL2GLSL_FOUND - system has HLSL2GLSL +-# HLSL2GLSL_INCLUDE_DIRS - the HLSL2GLSL include directories ++# HLSL2GLSL_INCLUDE_DIRS - the HLSL2GLSL include directories + # HLSL2GLSL_LIBRARIES - link these to use HLSL2GLSL + + include(FindPkgMacros) +@@ -38,8 +38,7 @@ findpkg_framework(HLSL2GLSL) + find_path(HLSL2GLSL_INCLUDE_DIR NAMES hlsl2glsl.h HINTS ${HLSL2GLSL_INC_SEARCH_PATH} ${HLSL2GLSL_PKGC_INCLUDE_DIRS} PATH_SUFFIXES HLSL2GLSL) + find_library(HLSL2GLSL_LIBRARY_REL NAMES ${HLSL2GLSL_LIBRARY_NAMES} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(HLSL2GLSL_LIBRARY_DBG NAMES ${HLSL2GLSL_LIBRARY_NAMES_DBG} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(HLSL2GLSL_LIBRARY) ++make_library_set(HLSL2GLSL) + + findpkg_finish(HLSL2GLSL) + add_parent_dir(HLSL2GLSL_INCLUDE_DIRS HLSL2GLSL_INCLUDE_DIR) +- +diff --git a/CMake/Packages/FindNVAPI.cmake b/CMake/Packages/FindNVAPI.cmake +index 95c70cd..17dabb8 100644 +--- a/CMake/Packages/FindNVAPI.cmake ++++ b/CMake/Packages/FindNVAPI.cmake +@@ -11,7 +11,7 @@ + # Once done, this will define + # + # NVAPI_FOUND - system has NVAPI +-# NVAPI_INCLUDE_DIRS - the NVAPI include directories ++# NVAPI_INCLUDE_DIRS - the NVAPI include directories + # NVAPI_LIBRARIES - link these to use NVAPI + + include(FindPkgMacros) +@@ -44,7 +44,7 @@ findpkg_framework(NVAPI) + find_path(NVAPI_INCLUDE_DIR NAMES nvapi.h HINTS ${NVAPI_FRAMEWORK_INCLUDES} ${NVAPI_INC_SEARCH_PATH} ${NVAPI_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NVAPI) + find_library(NVAPI_LIBRARY_REL NAMES ${NVAPI_LIBRARY_NAMES} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel) + find_library(NVAPI_LIBRARY_DBG NAMES ${NVAPI_LIBRARY_NAMES_DBG} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug) +-make_library_set(NVAPI_LIBRARY) ++make_library_set(NVAPI) + + findpkg_finish(NVAPI) +-add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR) +\ No newline at end of file ++add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR) +diff --git a/CMake/Packages/FindPOCO.cmake b/CMake/Packages/FindPOCO.cmake +index 6b6d7fa..c2cb80e 100644 +--- a/CMake/Packages/FindPOCO.cmake ++++ b/CMake/Packages/FindPOCO.cmake +@@ -11,7 +11,7 @@ + # Once done, this will define + # + # POCO_FOUND - system has POCO +-# POCO_INCLUDE_DIRS - the POCO include directories ++# POCO_INCLUDE_DIRS - the POCO include directories + # POCO_LIBRARIES - link these to use POCO + + include(FindPkgMacros) +@@ -23,8 +23,8 @@ getenv_path(POCO_ROOT) + getenv_path(POCO_BASE) + + # construct search paths +-set(POCO_PREFIX_PATH +- ${POCO_HOME} ${ENV_POCO_HOME} ++set(POCO_PREFIX_PATH ++ ${POCO_HOME} ${ENV_POCO_HOME} + ${POCO_ROOT} ${ENV_POCO_ROOT} + ${POCO_BASE} ${ENV_POCO_BASE} + ) +@@ -50,7 +50,7 @@ findpkg_framework(POCO) + find_path(POCO_INCLUDE_DIR NAMES Poco/Foundation.h HINTS ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Foundation/include) + find_library(POCO_LIBRARY_REL NAMES ${POCO_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_LIBRARY_DBG NAMES ${POCO_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_LIBRARY) ++make_library_set(POCO) + + findpkg_finish(POCO) + +@@ -66,7 +66,7 @@ get_debug_names(POCO_Util_LIBRARY_NAMES) + find_path(POCO_Util_INCLUDE_DIR NAMES Poco/Util/Util.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Util/include) + find_library(POCO_Util_LIBRARY_REL NAMES ${POCO_Util_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_Util_LIBRARY_DBG NAMES ${POCO_Util_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_Util_LIBRARY) ++make_library_set(POCO_Util) + findpkg_finish(POCO_Util) + + # Look for Poco's Net package +@@ -76,7 +76,7 @@ get_debug_names(POCO_Net_LIBRARY_NAMES) + find_path(POCO_Net_INCLUDE_DIR NAMES Poco/Net/Net.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Net/include) + find_library(POCO_Net_LIBRARY_REL NAMES ${POCO_Net_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_Net_LIBRARY_DBG NAMES ${POCO_Net_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_Net_LIBRARY) ++make_library_set(POCO_Net) + findpkg_finish(POCO_Net) + + # Look for Poco's NetSSL package +@@ -86,7 +86,7 @@ get_debug_names(POCO_NetSSL_LIBRARY_NAMES) + find_path(POCO_NetSSL_INCLUDE_DIR NAMES Poco/Net/NetSSL.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NetSSL/include) + find_library(POCO_NetSSL_LIBRARY_REL NAMES ${POCO_NetSSL_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_NetSSL_LIBRARY_DBG NAMES ${POCO_NetSSL_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_NetSSL_LIBRARY) ++make_library_set(POCO_NetSSL) + findpkg_finish(POCO_NetSSL) + + # Look for Poco's XML package +@@ -96,6 +96,5 @@ get_debug_names(POCO_XML_LIBRARY_NAMES) + find_path(POCO_XML_INCLUDE_DIR NAMES Poco/XML/XML.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES XML/include) + find_library(POCO_XML_LIBRARY_REL NAMES ${POCO_XML_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_XML_LIBRARY_DBG NAMES ${POCO_XML_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_XML_LIBRARY) ++make_library_set(POCO_XML) + findpkg_finish(POCO_XML) +- +diff --git a/CMake/Packages/FindTBB.cmake b/CMake/Packages/FindTBB.cmake +index 0c48510..7f0c8f6 100644 +--- a/CMake/Packages/FindTBB.cmake ++++ b/CMake/Packages/FindTBB.cmake +@@ -11,7 +11,7 @@ + # Once done, this will define + # + # TBB_FOUND - system has TBB +-# TBB_INCLUDE_DIRS - the TBB include directories ++# TBB_INCLUDE_DIRS - the TBB include directories + # TBB_LIBRARIES - link these to use TBB + + include(FindPkgMacros) +@@ -23,8 +23,8 @@ getenv_path(TBB_ROOT) + getenv_path(TBB_BASE) + + # construct search paths +-set(TBB_PREFIX_PATH +- ${TBB_HOME} ${ENV_TBB_HOME} ++set(TBB_PREFIX_PATH ++ ${TBB_HOME} ${ENV_TBB_HOME} + ${TBB_ROOT} ${ENV_TBB_ROOT} + ${TBB_BASE} ${ENV_TBB_BASE} + ) +@@ -68,11 +68,11 @@ if (WIN32 AND MSVC) + endif () + if (MSVC_VERSION EQUAL 1900) + set(COMPILER_PREFIX "vc13") +- endif () ++ endif () + if (MSVC_VERSION EQUAL 1911) + set(COMPILER_PREFIX "vc14") + endif () +- ++ + # for each prefix path, add ia32/64\${COMPILER_PREFIX}\lib to the lib search path + foreach (dir ${TBB_PREFIX_PATH}) + if (CMAKE_CL_64) +@@ -104,7 +104,7 @@ findpkg_framework(TBB) + find_path(TBB_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS}) + find_library(TBB_LIBRARY_REL NAMES ${TBB_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) + find_library(TBB_LIBRARY_DBG NAMES ${TBB_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) +-make_library_set(TBB_LIBRARY) ++make_library_set(TBB) + + findpkg_finish(TBB) + +@@ -120,7 +120,7 @@ get_debug_names(TBB_MALLOC_LIBRARY_NAMES) + find_path(TBB_MALLOC_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS} ) + find_library(TBB_MALLOC_LIBRARY_REL NAMES ${TBB_MALLOC_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} ) + find_library(TBB_MALLOC_LIBRARY_DBG NAMES ${TBB_MALLOC_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} ) +-make_library_set(TBB_MALLOC_LIBRARY) ++make_library_set(TBB_MALLOC) + findpkg_finish(TBB_MALLOC) + + # Look for TBB's malloc proxy package +@@ -130,5 +130,5 @@ get_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES) + find_path(TBB_MALLOC_PROXY_INCLUDE_DIR NAMES tbb/tbbmalloc_proxy.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS}) + find_library(TBB_MALLOC_PROXY_LIBRARY_REL NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) + find_library(TBB_MALLOC_PROXY_LIBRARY_DBG NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) +-make_library_set(TBB_MALLOC_PROXY_LIBRARY) ++make_library_set(TBB_MALLOC_PROXY) + findpkg_finish(TBB_MALLOC_PROXY) +diff --git a/CMake/Packages/FindZZip.cmake b/CMake/Packages/FindZZip.cmake +index e97951e..1c7cf00 100644 +--- a/CMake/Packages/FindZZip.cmake ++++ b/CMake/Packages/FindZZip.cmake +@@ -11,7 +11,7 @@ + # Once done, this will define + # + # ZZip_FOUND - system has ZZip +-# ZZip_INCLUDE_DIRS - the ZZip include directories ++# ZZip_INCLUDE_DIRS - the ZZip include directories + # ZZip_LIBRARIES - link these to use ZZip + + include(FindPkgMacros) +@@ -39,12 +39,11 @@ use_pkgconfig(ZZip_PKGC zziplib) + + findpkg_framework(ZZip) + +-find_path(ZZip_INCLUDE_DIR NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS}) ++find_path(ZZip_INCLUDE_DIRS NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS}) + + find_library(ZZip_LIBRARY_REL NAMES ${ZZip_LIBRARY_NAMES} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(ZZip_LIBRARY_DBG NAMES ${ZZip_LIBRARY_NAMES_DBG} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) + +-make_library_set(ZZip_LIBRARY) ++make_library_set(ZZip) + + findpkg_finish(ZZip) +- +diff --git a/CMake/Utils/FindPkgMacros.cmake b/CMake/Utils/FindPkgMacros.cmake +index 374f84b..dc7066d 100644 +--- a/CMake/Utils/FindPkgMacros.cmake ++++ b/CMake/Utils/FindPkgMacros.cmake +@@ -79,15 +79,21 @@ endmacro (use_pkgconfig) + + # Couple a set of release AND debug libraries (or frameworks) + macro(make_library_set PREFIX) +- if (${PREFIX}_FWK) +- set(${PREFIX} ${${PREFIX}_FWK}) +- elseif (${PREFIX}_REL AND ${PREFIX}_DBG) +- set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG}) +- elseif (${PREFIX}_REL) +- set(${PREFIX} ${${PREFIX}_REL}) +- elseif (${PREFIX}_DBG) +- set(${PREFIX} ${${PREFIX}_DBG}) +- endif () ++ include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) ++ set(PREFIX_LIB "${PREFIX}_LIBRARY") ++ if (${PREFIX_LIB}_FWK) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_FWK}) ++ elseif (${PREFIX_LIB}_REL AND ${PREFIX_LIB}_DBG) ++ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL} CACHE STRING "") ++ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG} CACHE STRING "") ++ select_library_configurations(${PREFIX}) ++ elseif (${PREFIX_LIB}_REL) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_REL}) ++ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL}) ++ elseif (${PREFIX_LIB}_DBG) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_DBG}) ++ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG}) ++ endif() + endmacro(make_library_set) + + # Generate debug names from given release names +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d2819f0..8b54b38 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -142,7 +142,7 @@ if (MSVC) + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /bigobj") + endif () + +- if (OGRE_PROJECT_FOLDERS) ++ if (OGRE_PROJECT_FOLDERS) + # Turn on the ability to create folders to organize projects (.vcproj) + # It creates "CMakePredefinedTargets" folder by default and adds CMake + # defined projects like INSTALL.vcproj and ZERO_CHECK.vcproj +@@ -274,14 +274,9 @@ elseif(EMSCRIPTEN) + elseif (APPLE AND NOT APPLE_IOS) + + set(XCODE_ATTRIBUTE_SDKROOT macosx) +- if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") + execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT) + string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") +- else() +- set(CMAKE_OSX_SYSROOT macosx) +- endif() + +- # Make sure that the OpenGL render system is selected for non-iOS Apple builds + set(OGRE_BUILD_RENDERSYSTEM_GLES2 FALSE) + endif () + +@@ -310,7 +305,7 @@ include(Dependencies) + # Customise what to build + option(OGRE_STATIC "Static build" FALSE) + option(OGRE_ENABLE_PRECOMPILED_HEADERS "Use precompiled headers to speed up build" TRUE) +-set(OGRE_RESOURCEMANAGER_STRICT "2" CACHE STRING ++set(OGRE_RESOURCEMANAGER_STRICT "2" CACHE STRING + "Make ResourceManager strict for faster operation. Possible values: + 0 - OFF search in all groups twice - for case sensitive and insensitive lookup [DEPRECATED] + 1 - PEDANTIC require an explicit resource group. Case sensitive lookup. +@@ -352,7 +347,7 @@ cmake_dependent_option(OGRE_BUILD_LIBS_AS_FRAMEWORKS "Build frameworks for libra + option(OGRE_BUILD_TESTS "Build the unit tests & PlayPen" FALSE) + option(OGRE_CONFIG_DOUBLE "Use doubles instead of floats in Ogre" FALSE) + option(OGRE_CONFIG_NODE_INHERIT_TRANSFORM "Tells the node whether it should inherit full transform from it's parent node or derived position, orientation and scale" FALSE) +-set(OGRE_CONFIG_THREADS "3" CACHE STRING ++set(OGRE_CONFIG_THREADS "3" CACHE STRING + "Enable Ogre thread safety support for multithreading. Possible values: + 0 - no thread safety. DefaultWorkQueue is not threaded. + 1 - background resource preparation and loading is thread safe. Threaded DefaultWorkQueue. [DEPRECATED] +diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt +index bdb303d..e8031d1 100644 +--- a/Components/Overlay/CMakeLists.txt ++++ b/Components/Overlay/CMakeLists.txt +@@ -13,7 +13,7 @@ + + # define header and source files for the library + file(GLOB HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") +-list(APPEND HEADER_FILES ++list(APPEND HEADER_FILES + ${PROJECT_BINARY_DIR}/include/OgreOverlayPrerequisites.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/OgreOverlay.i) + file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") +@@ -21,17 +21,17 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") + # setup target + add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES}) + set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION}) +-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB) +-target_include_directories(OgreOverlay PUBLIC ++target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE ${FREETYPE_LIBRARIES} ZLIB::ZLIB) ++target_include_directories(OgreOverlay PUBLIC + "$" + $ + PRIVATE ${FREETYPE_INCLUDE_DIRS}) + +-generate_export_header(OgreOverlay ++generate_export_header(OgreOverlay + EXPORT_MACRO_NAME _OgreOverlayExport + EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreOverlayPrerequisites.h) + +-# install ++# install + ogre_config_framework(OgreOverlay) + ogre_config_component(OgreOverlay) + +@@ -40,4 +40,4 @@ install(FILES ${HEADER_FILES} + ) + install(FILES "${PROJECT_SOURCE_DIR}/Media/packs/profiler.zip" + DESTINATION "${OGRE_MEDIA_PATH}/packs/" +-) +\ No newline at end of file ++) +diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt +index 6ec4e34..666a736 100644 +--- a/OgreMain/CMakeLists.txt ++++ b/OgreMain/CMakeLists.txt +@@ -188,21 +188,21 @@ if (WINDOWS_STORE OR WINDOWS_PHONE) + set_target_properties(OgreMain PROPERTIES VS_WINRT_COMPONENT "true") + endif () + +-generate_export_header(OgreMain ++generate_export_header(OgreMain + EXPORT_MACRO_NAME _OgreExport + NO_EXPORT_MACRO_NAME _OgrePrivate + DEPRECATED_MACRO_NAME OGRE_DEPRECATED + EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreExports.h) + +-target_include_directories(OgreMain PUBLIC +- "$" ++target_include_directories(OgreMain PUBLIC ++ "$" + "$" + $ + PRIVATE "${OGRE_PROFILING_REMOTERY_PATH}") + + # In visual studio 2010 - 64 bit we get this error: "LINK : fatal error LNK1210: exceeded internal ILK size limit; link with /INCREMENTAL:NO" + if(WIN32 AND MSVC10 AND CMAKE_CL_64) +- set_target_properties(OgreMain PROPERTIES ++ set_target_properties(OgreMain PROPERTIES + VERSION ${OGRE_SOVERSION} + LINK_FLAGS "/INCREMENTAL:NO" + ) +@@ -211,7 +211,7 @@ else() + endif() + + if(OGRE_GCC_VERSION VERSION_EQUAL 4.8 OR OGRE_GCC_VERSION VERSION_GREATER 4.8) +- if(CMAKE_SYSTEM_NAME STREQUAL "Android") ++ if(CMAKE_SYSTEM_NAME STREQUAL "Android") + list(APPEND LIBRARIES "atomic") + else() + list(APPEND LIBRARIES "-latomic") +@@ -226,8 +226,6 @@ if (APPLE) + LINK_FLAGS "-framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo" + ) + +- set(OGRE_OSX_BUILD_CONFIGURATION "$(PLATFORM_NAME)/$(CONFIGURATION)") +- + if(OGRE_BUILD_LIBS_AS_FRAMEWORKS) + add_custom_command(TARGET OgreMain POST_BUILD + COMMAND mkdir ARGS -p ${PROJECT_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/Ogre.framework/Headers/Threading +diff --git a/PlugIns/EXRCodec/CMakeLists.txt b/PlugIns/EXRCodec/CMakeLists.txt +index e9c936a..a83d793 100644 +--- a/PlugIns/EXRCodec/CMakeLists.txt ++++ b/PlugIns/EXRCodec/CMakeLists.txt +@@ -13,14 +13,14 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") + + add_library(Codec_EXR ${OGRE_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES}) + target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES}) +-target_include_directories(Codec_EXR PUBLIC ++target_include_directories(Codec_EXR PUBLIC + "$" + $) +-target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}/OpenEXR") ++target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}") + + ogre_config_framework(Codec_EXR) + ogre_config_plugin(Codec_EXR) +-generate_export_header(Codec_EXR ++generate_export_header(Codec_EXR + EXPORT_MACRO_NAME _OgreEXRPluginExport + EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreEXRCodecExports.h) + install(FILES ${HEADER_FILES} DESTINATION include/OGRE/Plugins/EXRCodec) +diff --git a/RenderSystems/GL3Plus/CMakeLists.txt b/RenderSystems/GL3Plus/CMakeLists.txt +index ba55b43..66c2758 100644 +--- a/RenderSystems/GL3Plus/CMakeLists.txt ++++ b/RenderSystems/GL3Plus/CMakeLists.txt +@@ -21,12 +21,12 @@ set(HEADER_FILES ${HEADER_FILES} ${GLSL_HEADERS}) + add_definitions(${OGRE_VISIBILITY_FLAGS}) + + if(OGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT) +- set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/OgreGL3PlusStateCacheManager.cpp ++ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/OgreGL3PlusStateCacheManager.cpp + PROPERTIES COMPILE_DEFINITIONS OGRE_ENABLE_STATE_CACHE) + endif() + add_library(RenderSystem_GL3Plus ${OGRE_LIB_TYPE} ${HEADER_FILES} ${GLSL_SOURCE} ${SOURCE_FILES}) + target_link_libraries(RenderSystem_GL3Plus OgreMain OgreGLSupport ${OPENGL_gl_LIBRARY} ${CMAKE_DL_LIBS}) +-target_include_directories(RenderSystem_GL3Plus PUBLIC ++target_include_directories(RenderSystem_GL3Plus PUBLIC + "$" + "$" + $ +@@ -44,4 +44,4 @@ ogre_config_plugin(RenderSystem_GL3Plus) + + install(FILES ${HEADER_FILES} ${GLSUPPORT_HEADERS} DESTINATION include/OGRE/RenderSystems/GL3Plus) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/GL DESTINATION include/OGRE/RenderSystems/GL3Plus) +-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/GLSL/ DESTINATION include/OGRE/RenderSystems/GL3Plus) ++install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/GLSL DESTINATION include/OGRE/RenderSystems/GL3Plus) diff --git a/ports/ompl/portfile.cmake b/ports/ompl/portfile.cmake index c8fdc9927..87af91de8 100644 --- a/ports/ompl/portfile.cmake +++ b/ports/ompl/portfile.cmake @@ -2,12 +2,11 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "OMPL's buildsystem uses very long paths and may fail on your system.\n" + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() - set(OMPL_VERSION 1.4.2) set(OMPL_DISTNAME "ompl") set(OMPL_CHECKSUM "1dc477ee471c0570fd94838b072105960e09186f29634e2f61d885153df36532ab40e30912b534c61f222c09dad63fc6097d324b53c265f9284f20c585d3095c") @@ -31,7 +30,7 @@ vcpkg_extract_source_archive_ex( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS -DOMPL_VERSIONED_INSTALL=OFF -DOMPL_REGISTRATION=OFF -DOMPL_BUILD_DEMOS=OFF diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index dd4e01732..1c01d8363 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,4 +1,4 @@ Source: openblas -Version: 0.3.6-2 +Version: 0.3.6-4 Homepage: https://github.com/xianyi/OpenBLAS Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/openblas/enable_underscore.patch b/ports/openblas/enable_underscore.patch new file mode 100644 index 000000000..d2eb3ff22 --- /dev/null +++ b/ports/openblas/enable_underscore.patch @@ -0,0 +1,70 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9696961..47ef712 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,7 +29,7 @@ option(BUILD_RELAPACK "Build with ReLAPACK (recursive implementation of several + # 64 bit integer interfaces in OpenBLAS. + + set(SYMBOLPREFIX "" CACHE STRING "Add a prefix to all exported symbol names in the shared library to avoid conflicts with other BLAS libraries" ) +-set(SYMBOLSUFFIX "" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" ) ++set(SYMBOLSUFFIX "_" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" ) + ####### + if(BUILD_WITHOUT_LAPACK) + set(NO_LAPACK 1) +@@ -232,7 +232,7 @@ if (BUILD_SHARED_LIBS AND BUILD_RELAPACK) + endif() + endif() + +-if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFIX} STREQUAL "") ++if (NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "") + if (NOT DEFINED ARCH) + set(ARCH_IN "x86_64") + else() +@@ -289,12 +289,14 @@ endif() + if (NOT ${SYMBOLSUFFIX} STREQUAL "") + message(STATUS "adding suffix ${SYMBOLSUFFIX} to names of exported symbols in ${OpenBLAS_LIBNAME}") + endif() ++if(BUILD_SHARED_LIBS) + add_custom_command(TARGET ${OpenBLAS_LIBNAME} POST_BUILD + COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BUILD_LAPACK_DEPRECATED}" > ${PROJECT_BINARY_DIR}/objcopy.def + COMMAND objcopy -v --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so + COMMENT "renaming symbols" + ) + endif() ++endif() + + + # Install project +@@ -385,4 +387,3 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake + install(EXPORT "${PN}${SUFFIX64}Targets" + NAMESPACE "${PN}${SUFFIX64}::" + DESTINATION ${CMAKECONFIG_INSTALL_DIR}) +- +diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake +index 259ef16..936fbf7 100644 +--- a/cmake/prebuild.cmake ++++ b/cmake/prebuild.cmake +@@ -58,10 +58,8 @@ endif () + set(TARGET_CONF_TEMP "${PROJECT_BINARY_DIR}/${TARGET_CONF}.tmp") + + # c_check +-set(FU "") +-if (APPLE OR (MSVC AND NOT ${CMAKE_C_COMPILER_ID} MATCHES "Clang")) +- set(FU "_") +-endif() ++set(FU "") ++set(BU "") + + set(COMPILER_ID ${CMAKE_C_COMPILER_ID}) + if (${COMPILER_ID} STREQUAL "GNU") +@@ -75,7 +73,9 @@ file(WRITE ${TARGET_CONF_TEMP} + "#define ARCH_${UC_ARCH}\t1\n" + "#define C_${COMPILER_ID}\t1\n" + "#define __${BINARY}BIT__\t1\n" +- "#define FUNDERSCORE\t${FU}\n") ++ "#define FUNDERSCORE\t${FU}\n" ++ "#define BUNDERSCORE\t${BU}\n" ++ "//#define NEEDBUNDERSCORE 1\n") + + if (${HOST_OS} STREQUAL "WINDOWSSTORE") + file(APPEND ${TARGET_CONF_TEMP} diff --git a/ports/openblas/fix-space-path.patch b/ports/openblas/fix_space_path.patch similarity index 100% rename from ports/openblas/fix-space-path.patch rename to ports/openblas/fix_space_path.patch diff --git a/ports/openblas/openblas_common.h b/ports/openblas/openblas_common.h deleted file mode 100644 index 10b25d4c7..000000000 --- a/ports/openblas/openblas_common.h +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once -#include "openblas_config.h" - -#if defined(OPENBLAS_OS_WINNT) || defined(OPENBLAS_OS_CYGWIN_NT) || defined(OPENBLAS_OS_INTERIX) -#define OPENBLAS_WINDOWS_ABI -#define OPENBLAS_OS_WINDOWS - -#ifdef DOUBLE -#define DOUBLE_DEFINED DOUBLE -#undef DOUBLE -#endif -#endif - -#ifdef NEEDBUNDERSCORE -#define BLASFUNC(FUNC) FUNC##_ -#else -#define BLASFUNC(FUNC) FUNC -#endif - - -#ifdef OPENBLAS_QUAD_PRECISION -typedef struct { - unsigned long x[2]; -} xdouble; -#elif defined OPENBLAS_EXPRECISION -#define xdouble long double -#else -#define xdouble double -#endif - -#if defined(OS_WINNT) && defined(__64BIT__) -typedef long long BLASLONG; -typedef unsigned long long BLASULONG; -#else -typedef long BLASLONG; -typedef unsigned long BLASULONG; -#endif - -#ifdef OPENBLAS_USE64BITINT -typedef BLASLONG blasint; -#else -typedef int blasint; -#endif - -#if defined(XDOUBLE) || defined(DOUBLE) -#define FLOATRET FLOAT -#else -#ifdef NEED_F2CCONV -#define FLOATRET double -#else -#define FLOATRET float -#endif -#endif - - -/* Inclusion of a standard header file is needed for definition of __STDC_* - predefined macros with some compilers (e.g. GCC 4.7 on Linux). This occurs - as a side effect of including either or . */ -#include -#define OPENBLAS_COMPLEX_STRUCT -typedef struct { float real, imag; } openblas_complex_float; -typedef struct { double real, imag; } openblas_complex_double; -typedef struct { xdouble real, imag; } openblas_complex_xdouble; -#define openblas_make_complex_float(real, imag) {(real), (imag)} -#define openblas_make_complex_double(real, imag) {(real), (imag)} -#define openblas_make_complex_xdouble(real, imag) {(real), (imag)} -#define openblas_complex_float_real(z) ((z).real) -#define openblas_complex_float_imag(z) ((z).imag) -#define openblas_complex_double_real(z) ((z).real) -#define openblas_complex_double_imag(z) ((z).imag) -#define openblas_complex_xdouble_real(z) ((z).real) -#define openblas_complex_xdouble_imag(z) ((z).imag) diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index 1bd7b6157..45260c78a 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -1,9 +1,26 @@ include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + message(WARNING "You do not need this package on macOS, since you already have the Accelerate Framework") + return() +endif() + if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") message(FATAL_ERROR "openblas can only be built for x64 currently") endif() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(ADDITIONAL_PATCH "enable_underscore.patch") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(NO_SHARED 1) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(NO_STATIC 1) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xianyi/OpenBLAS @@ -12,7 +29,8 @@ vcpkg_from_github( HEAD_REF develop PATCHES uwp.patch - fix-space-path.patch + fix_space_path.patch + ${ADDITIONAL_PATCH} ) find_program(GIT NAMES git git.cmd) @@ -26,8 +44,7 @@ vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${SED_EXE_PATH}") -set(COMMON_OPTIONS - -DBUILD_WITHOUT_LAPACK=ON) +set(COMMON_OPTIONS -DBUILD_WITHOUT_LAPACK=ON) # for UWP version, must build non uwp first for helper # binaries. @@ -60,7 +77,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS + OPTIONS ${COMMON_OPTIONS} -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DVS_WINRT_COMPONENT=TRUE @@ -76,28 +93,21 @@ else() SOURCE_PATH ${SOURCE_PATH} OPTIONS ${COMMON_OPTIONS} + -DTARGET=SANDYBRIDGE -DCMAKE_SYSTEM_PROCESSOR=AMD64 + -DBINARY=64 + -DNO_SHARED=${NO_SHARED} + -DNO_STATIC=${NO_STATIC} -DNOFORTRAN=ON) endif() vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/OpenBLAS TARGET_PATH share/openblas) -#maybe we need also to write a wrapper inside share/blas to search implicitly for openblas, whenever we feel it's ready for its own -config.cmake file - -# openblas do not make the config file , so I manually made this -# but I think in most case, libraries will not include these files, they define their own used function prototypes -# this is only to quite vcpkg -file(COPY ${CMAKE_CURRENT_LIST_DIR}/openblas_common.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -file(READ ${SOURCE_PATH}/cblas.h CBLAS_H) -string(REPLACE "#include \"common.h\"" "#include \"openblas_common.h\"" CBLAS_H "${CBLAS_H}") -file(WRITE ${CURRENT_PACKAGES_DIR}/include/cblas.h "${CBLAS_H}") - -# openblas is BSD -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/openblas/LICENSE ${CURRENT_PACKAGES_DIR}/share/openblas/copyright) - +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/OpenBLAS) +#we install a cmake wrapper since the official FindBLAS thinks that OpenBLAS can solve also LAPACK libraries, while it cannot because we disabled it and we use CLAPACK... maybe we have to trigger finding one package when requesting the other and vice-versa. Wrappers should be ready also to avoid an infinite loop +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/blas) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas RENAME copyright) diff --git a/ports/openblas/vcpkg-cmake-wrapper.cmake b/ports/openblas/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..e0791bde8 --- /dev/null +++ b/ports/openblas/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,49 @@ +list(REMOVE_ITEM ARGS "BLAS") +list(REMOVE_ITEM ARGS "blas") +list(REMOVE_ITEM ARGS "Blas") +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") +if(NOT BLAS_LIBRARY OR BLAS_LIBRARIES OR OpenBLAS_LIBRARY OR OpenBLAS_LIBRARIES OR BLAS_LIB OR BLAS_LIBS) + include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) + + _find_package(OpenBLAS CONFIG ${ARGS}) + + set(CMAKE_THREAD_PREFER_PTHREAD TRUE) + _find_package(Threads) + + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES) + set(BLAS_INCLUDE_DIR ${_loc}) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_RELEASE) + if(NOT _loc) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_RELEASE) + endif() + set(BLAS_LIBRARY_RELEASE ${_loc}) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_DEBUG) + if(NOT _loc) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_DEBUG) + endif() + set(BLAS_LIBRARY_DEBUG ${_loc}) + list(APPEND BLAS_LIBRARY_RELEASE Threads::Threads) + list(APPEND BLAS_LIBRARY_DEBUG Threads::Threads) + select_library_configurations(BLAS) + + set(BLAS_LIBRARY "${BLAS_LIBRARY}" CACHE STRING "" FORCE) + set(BLAS_LIBRARIES "${BLAS_LIBRARY}" CACHE STRING "" FORCE) + set(OpenBLAS_LIBRARY "${BLAS_LIBRARY}" CACHE STRING "" FORCE) + set(OpenBLAS_LIBRARIES "${BLAS_LIBRARY}" CACHE STRING "" FORCE) + set(BLAS_LIB "${BLAS_LIBRARY}" CACHE STRING "" FORCE) + set(BLAS_LIBS "${BLAS_LIBRARY}" CACHE STRING "" FORCE) + + set(BLAS_INCLUDE_DIR "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) + set(BLAS_INCLUDE_DIRS "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) + set(OpenBLAS_INCLUDE_DIR "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) + set(OpenBLAS_INCLUDE_DIRS "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) + set(BLAS_INC "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) + + find_package_handle_standard_args(BLAS DEFAULT_MSG BLAS_LIBRARY BLAS_INCLUDE_DIR) + mark_as_advanced(BLAS_INCLUDE_DIR BLAS_LIBRARY) + find_package_handle_standard_args(OpenBLAS DEFAULT_MSG OpenBLAS_LIBRARY OpenBLAS_INCLUDE_DIR) + mark_as_advanced(OpenBLAS_INCLUDE_DIR OpenBLAS_LIBRARY) +endif() diff --git a/ports/openexr/CONTROL b/ports/openexr/CONTROL index 8795b9dce..5fc8b52d6 100644 --- a/ports/openexr/CONTROL +++ b/ports/openexr/CONTROL @@ -1,5 +1,5 @@ Source: openexr -Version: 2.3.0-3 +Version: 2.3.0-4 Homepage: https://www.openexr.com/ Description: OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications Build-Depends: zlib diff --git a/ports/openexr/FindOpenEXR.cmake b/ports/openexr/FindOpenEXR.cmake index a381c6db9..4b5b280a0 100644 --- a/ports/openexr/FindOpenEXR.cmake +++ b/ports/openexr/FindOpenEXR.cmake @@ -54,9 +54,12 @@ if(NOT OpenEXR_IEXMATH_LIBRARY) endif() set(OPENEXR_HALF_LIBRARY "${OpenEXR_HALF_LIBRARY}") +set(OPENEXR_Half_LIBRARY "${OpenEXR_HALF_LIBRARY}") set(OPENEXR_IEX_LIBRARY "${OpenEXR_IEX_LIBRARY}") +set(OPENEXR_Iex_LIBRARY "${OpenEXR_IEX_LIBRARY}") set(OPENEXR_IMATH_LIBRARY "${OpenEXR_MATH_LIBRARY}") set(OPENEXR_ILMIMF_LIBRARY "${OpenEXR_BASE_LIBRARY}") +set(OPENEXR_IlmImf_LIBRARY "${OpenEXR_BASE_LIBRARY}") set(OPENEXR_ILMIMFUTIL_LIBRARY "${OpenEXR_UTIL_LIBRARY}") set(OPENEXR_ILMTHREAD_LIBRARY "${OpenEXR_THREAD_LIBRARY}") @@ -80,6 +83,10 @@ set(OPENEXR_LIBRARIES ${OPENEXR_ILMTHREAD_LIBRARY} ) +set(OpenEXR_INCLUDE_DIR ${OpenEXR_INCLUDE_DIRS}) +set(OPENEXR_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIRS}) +set(OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_PATHS}) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR REQUIRED_VARS OpenEXR_LIBRARIES OpenEXR_INCLUDE_DIRS) if(OpenEXR_FOUND) diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index e3bfc9592..0cdd30b2e 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -62,9 +62,6 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -set(OPENEXR_PORT_DIR "openexr") - -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${OPENEXR_PORT_DIR}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${OPENEXR_PORT_DIR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${OPENEXR_PORT_DIR}/copyright) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOpenEXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${OPENEXR_PORT_DIR}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOpenEXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/openexr/vcpkg-cmake-wrapper.cmake b/ports/openexr/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..a977a420e --- /dev/null +++ b/ports/openexr/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,8 @@ +set(OPENEXR_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +if(NOT OpenEXR_LIBRARIES OR OPENEXR_LIBRARIES) + _find_package(${ARGS}) +endif() + +set(CMAKE_MODULE_PATH ${OPENEXR_PREV_MODULE_PATH}) diff --git a/ports/openmama/CONTROL b/ports/openmama/CONTROL index 899f47b93..fbfb815c3 100644 --- a/ports/openmama/CONTROL +++ b/ports/openmama/CONTROL @@ -1,5 +1,5 @@ Source: openmama -Version: 6.2.3 +Version: 6.2.3-1 Build-Depends: libevent, apr, qpid-proton Homepage: https://github.com/OpenMAMA/OpenMAMA Description: OpenMAMA is a high performance vendor neutral lightweight wrapper that provides a common API interface to different middleware and messaging solutions across a variety of platforms and languages. diff --git a/ports/openmvg/CONTROL b/ports/openmvg/CONTROL index 90c10f3cd..b08351664 100644 --- a/ports/openmvg/CONTROL +++ b/ports/openmvg/CONTROL @@ -1,5 +1,5 @@ Source: openmvg -Version: 1.4-4 +Version: 1.4-5 Description: open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion. Build-Depends: coinutils, clp, osi, liblemon, flann, eigen3, ceres, cereal, libjpeg-turbo, tiff, libpng, zlib, suitesparse diff --git a/ports/openmvg/portfile.cmake b/ports/openmvg/portfile.cmake index 04a7e57ee..a5dea72fa 100644 --- a/ports/openmvg/portfile.cmake +++ b/ports/openmvg/portfile.cmake @@ -74,7 +74,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/openMVG/cmake") +vcpkg_fixup_cmake_targets(CONFIG_PATH share/openMVG/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/openmvs/CONTROL b/ports/openmvs/CONTROL index f4863e175..6cbbe4119 100644 --- a/ports/openmvs/CONTROL +++ b/ports/openmvs/CONTROL @@ -1,4 +1,4 @@ Source: openmvs -Version: 1.0 +Version: 1.0-1 Description: OpenMVS: open Multi-View Stereo reconstruction library Build-Depends: zlib, boost-iostreams, boost-program-options, boost-system, boost-serialization, eigen3, ceres, opencv, cgal[core], glew, glfw3, vcglib diff --git a/ports/openmvs/portfile.cmake b/ports/openmvs/portfile.cmake index 22945ab2e..97f789383 100644 --- a/ports/openmvs/portfile.cmake +++ b/ports/openmvs/portfile.cmake @@ -22,9 +22,9 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/openmvs) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/CMake/OpenMVS TARGET_PATH share/openmvs) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/CMake/OpenMVS) endif() #somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL index 3d13ea26b..9dca0b47a 100644 --- a/ports/openni2/CONTROL +++ b/ports/openni2/CONTROL @@ -1,5 +1,5 @@ Source: openni2 -Version: 2.2.0.33-8 +Version: 2.2.0.33-9 Build-Depends: kinectsdk1 Homepage: https://github.com/OpenNI/OpenNI2 Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera. diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake index 8ef2514b3..d5be0e3d4 100644 --- a/ports/openni2/portfile.cmake +++ b/ports/openni2/portfile.cmake @@ -46,7 +46,7 @@ endif() set(SOURCE_INCLUDE_PATH "${SOURCE_PATH}/Include") set(SOURCE_BIN_PATH_RELEASE "${SOURCE_PATH}/Bin/${PLATFORM}-Release") set(SOURCE_BIN_PATH_DEBUG "${SOURCE_PATH}/Bin/${PLATFORM}-Debug") -set(SOURCE_CONFIG_PATH "${SOURCE_PATH}/Config") +set(SOURCE_CONFIG_PATH ${SOURCE_PATH}/Config) set(SOURCE_THIRDPARTY_PATH "${SOURCE_PATH}/ThirdParty") file( diff --git a/ports/openssl-unix/portfile.cmake b/ports/openssl-unix/portfile.cmake index b0064cdf4..03e358b4b 100644 --- a/ports/openssl-unix/portfile.cmake +++ b/ports/openssl-unix/portfile.cmake @@ -1,8 +1,15 @@ +include(vcpkg_common_functions) + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) message(FATAL_ERROR "This port is only for openssl on Unix-like systems") endif() -include(vcpkg_common_functions) +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + set(OPENSSL_VERSION 1.0.2q) vcpkg_find_acquire_program(PERL) diff --git a/ports/openssl-uwp/portfile.cmake b/ports/openssl-uwp/portfile.cmake index 8efd7bd20..239f98d2b 100644 --- a/ports/openssl-uwp/portfile.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -1,11 +1,17 @@ include(vcpkg_common_functions) -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "This portfile only supports UWP") endif() +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") set(UWP_PLATFORM "arm") elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") diff --git a/ports/openssl-windows/portfile.cmake b/ports/openssl-windows/portfile.cmake index b5e505a3d..856e0979e 100644 --- a/ports/openssl-windows/portfile.cmake +++ b/ports/openssl-windows/portfile.cmake @@ -1,8 +1,15 @@ +include(vcpkg_common_functions) + if(VCPKG_CMAKE_SYSTEM_NAME) message(FATAL_ERROR "This port is only for building openssl on Windows Desktop") endif() -include(vcpkg_common_functions) +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + set(OPENSSL_VERSION 1.0.2q) vcpkg_find_acquire_program(PERL) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index a398b409d..b495ce0c3 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,5 +1,5 @@ Source: openssl -Version: 0 +Version: 1 Homepage: https://www.openssl.org Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. Build-Depends: openssl-windows (windows), openssl-uwp (uwp), openssl-unix (!uwp&!windows) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 3d55c367f..4d25eff6b 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -1,2 +1,4 @@ +include(vcpkg_common_functions) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl/) diff --git a/ports/opentracing/CONTROL b/ports/opentracing/CONTROL index c533de1f8..62f6dd303 100644 --- a/ports/opentracing/CONTROL +++ b/ports/opentracing/CONTROL @@ -1,4 +1,4 @@ Source: opentracing -Version: 1.5.1 -Description: C++ implementation of the OpenTracing API +Version: 1.5.1-1 +Description: C++ implementation of the OpenTracing API Homepage: https://opentracing.io diff --git a/ports/opentracing/portfile.cmake b/ports/opentracing/portfile.cmake index cf82ddbf6..595faf1cf 100644 --- a/ports/opentracing/portfile.cmake +++ b/ports/opentracing/portfile.cmake @@ -5,9 +5,9 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set( LOCAL_OPTIONS - -DBUILD_STATIC_LIBS=OFF - ) + set( LOCAL_OPTIONS + -DBUILD_STATIC_LIBS=OFF + ) else() message("Static building is only possible when compiling static and dynamic versions at the same time. Enabling both.") set(VCPKG_LIBRARY_LINKAGE dynamic) @@ -23,37 +23,36 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - ${OPTIONS} - ${LOCAL_OPTIONS} + OPTIONS + ${OPTIONS} + ${LOCAL_OPTIONS} ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/OpenTracing") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenTracing) vcpkg_copy_pdbs() # Move DLLs to /bin if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/bin/opentracing.dll) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/bin/opentracing.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/debug/bin/opentracing.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/debug/bin/opentracing.dll) - # Fix targets - file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake RELEASE_CONFIG) - string(REPLACE "\${_IMPORT_PREFIX}/lib/opentracing.dll" - "\${_IMPORT_PREFIX}/bin/opentracing.dll" RELEASE_CONFIG ${RELEASE_CONFIG}) - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake "${RELEASE_CONFIG}") + # Fix targets + file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake RELEASE_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/lib/opentracing.dll" + "\${_IMPORT_PREFIX}/bin/opentracing.dll" RELEASE_CONFIG ${RELEASE_CONFIG}) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake "${RELEASE_CONFIG}") - file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake DEBUG_CONFIG) - string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/opentracing.dll" - "\${_IMPORT_PREFIX}/debug/bin/opentracing.dll" DEBUG_CONFIG ${DEBUG_CONFIG}) - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake "${DEBUG_CONFIG}") - endif() + file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake DEBUG_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/opentracing.dll" + "\${_IMPORT_PREFIX}/debug/bin/opentracing.dll" DEBUG_CONFIG ${DEBUG_CONFIG}) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake "${DEBUG_CONFIG}") + endif() endif() # Handle copyright diff --git a/ports/opusfile/CMakeLists.txt b/ports/opusfile/CMakeLists.txt index c70ea98bc..ecef1d01f 100644 --- a/ports/opusfile/CMakeLists.txt +++ b/ports/opusfile/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.4) project(opusfile C) +if(MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267 /wd4244 /wd4090") +endif() find_path(OGG_INCLUDE_DIR ogg/ogg.h) find_library(OGG_LIBRARY ogg) diff --git a/ports/opusfile/CONTROL b/ports/opusfile/CONTROL index 3e80d4777..0ba3167a6 100644 --- a/ports/opusfile/CONTROL +++ b/ports/opusfile/CONTROL @@ -1,5 +1,5 @@ Source: opusfile -Version: 0.11-2 +Version: 0.11-3 Homepage: https://github.com/xiph/opusfile Description: Stand-alone decoder library for .opus streams Build-Depends: libogg, opus diff --git a/ports/orocos-kdl/CONTROL b/ports/orocos-kdl/CONTROL index af590b4b3..983219ca0 100644 --- a/ports/orocos-kdl/CONTROL +++ b/ports/orocos-kdl/CONTROL @@ -1,4 +1,4 @@ Source: orocos-kdl -Version: 1.4 +Version: 1.4-1 Description: Kinematics and Dynamics Library Build-Depends: eigen3 diff --git a/ports/orocos-kdl/portfile.cmake b/ports/orocos-kdl/portfile.cmake index 622a9da93..58e28a045 100644 --- a/ports/orocos-kdl/portfile.cmake +++ b/ports/orocos-kdl/portfile.cmake @@ -30,14 +30,14 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/orocos_kdl/cmake" TARGET_PATH share/orocos_kdl) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/orocos_kdl/cmake TARGET_PATH share/orocos_kdl) -file(REMOVE_RECURSE +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/doc/liborocos-kdl) - + # Handle copyright diff --git a/ports/osi/CMakeLists.txt b/ports/osi/CMakeLists.txt index 1aa44d262..0542339eb 100644 --- a/ports/osi/CMakeLists.txt +++ b/ports/osi/CMakeLists.txt @@ -12,7 +12,7 @@ set(CMAKE_CXX_STANDARD 14) set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed") -set(INSTALL_CMAKE_DIR "share/${PROJECT_NAME}" CACHE PATH "Path where cmake configs will be installed") +set(INSTALL_CMAKE_DIR "share/osi" CACHE PATH "Path where cmake configs will be installed") # Make relative paths absolute (needed later on) set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) diff --git a/ports/osi/CONTROL b/ports/osi/CONTROL index 01190fb21..5f65e3cf2 100644 --- a/ports/osi/CONTROL +++ b/ports/osi/CONTROL @@ -1,4 +1,4 @@ Source: osi -Version: 0.108.4-1 +Version: 0.108.4-2 Description: Osi (Open Solver Interface) provides an abstract base class to a generic linear programming (LP) solver, along with derived classes for specific solvers. Many applications may be able to use the Osi to insulate themselves from a specific LP solver. Build-Depends: coinutils diff --git a/ports/osi/portfile.cmake b/ports/osi/portfile.cmake index dc0dc7857..bb340eaca 100644 --- a/ports/osi/portfile.cmake +++ b/ports/osi/portfile.cmake @@ -19,11 +19,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") #on case-sensitive filesystems, it's necessary to rename and make it lowercase - vcpkg_fixup_cmake_targets(CONFIG_PATH "share/Osi") -else() - vcpkg_fixup_cmake_targets() -endif() +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index 77e836cb3..8963cc26b 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,5 +1,5 @@ Source: pangolin -Version: 0.5-6 +Version: 0.5-7 Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg Homepage: https://github.com/stevenlovegrove/Pangolin Description: Lightweight GUI Library diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index ac4d31625..e22672ec0 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -29,7 +29,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Pangolin") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Pangolin) vcpkg_copy_pdbs() diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index dcd8c7aad..1a9852c8e 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,5 +1,5 @@ Source: pcl -Version: 1.9.1-3 +Version: 1.9.1-4 Homepage: https://github.com/PointCloudLibrary/pcl Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. Build-Depends: eigen3, flann, qhull, vtk, libpng, boost-system, boost-filesystem, boost-thread, boost-date-time, boost-iostreams, boost-random, boost-foreach, boost-dynamic-bitset, boost-property-map, boost-graph, boost-multi-array, boost-signals2, boost-ptr-container, boost-uuid, boost-interprocess, boost-asio @@ -22,4 +22,4 @@ Build-Depends: boost-accumulators Feature: cuda Description: CUDA support for PCL -Build-Depends: cuda \ No newline at end of file +Build-Depends: cuda diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 971abe025..b30ceb0d8 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -68,7 +68,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/pcl) +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/pdal/CONTROL b/ports/pdal/CONTROL index 743f77c8e..7c465df4e 100644 --- a/ports/pdal/CONTROL +++ b/ports/pdal/CONTROL @@ -1,4 +1,4 @@ Source: pdal -Version: 1.7.1-4 +Version: 1.7.1-5 Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data. Build-Depends: gdal, geos, jsoncpp, libgeotiff, laszip diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake index 566fc08e4..650849224 100644 --- a/ports/pdal/portfile.cmake +++ b/ports/pdal/portfile.cmake @@ -27,26 +27,26 @@ file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") foreach(_module IN ITEMS FindGDAL FindGEOS FindGeoTIFF FindCurl) # Outdated; Supplied by CMake file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake") endforeach() -foreach(_module IN ITEMS FindGEOS) # Overwritten Modules. +foreach(_module IN ITEMS FindGEOS) # Overwritten Modules. file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake") file(COPY ${CMAKE_CURRENT_LIST_DIR}/${_module}.cmake DESTINATION ${SOURCE_PATH}/cmake/modules/ ) endforeach() -# NOTE: CMake native BUILD_SHARED_LIBS option will be set by vcpkg_configure_cmake -# TODO: Remove this as soon as PDAL switches to use BUILD_SHARED_LIBS if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(PDAL_BUILD_STATIC OFF) + set(VCPKG_BUILD_SHARED_LIBS ON) + set(VCPKG_BUILD_STATIC_LIBS OFF) else() - set(PDAL_BUILD_STATIC ON) + set(VCPKG_BUILD_SHARED_LIBS OFF) + set(VCPKG_BUILD_STATIC_LIBS ON) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DPDAL_BUILD_STATIC:BOOL=${PDAL_BUILD_STATIC} + -DPDAL_BUILD_STATIC:BOOL=${VCPKG_BUILD_STATIC_LIBS} -DWITH_TESTS:BOOL=OFF -DWITH_COMPLETION:BOOL=OFF ) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 4503529c6..1e98ccc74 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,5 +1,5 @@ Source: poco -Version: 2.0.0-pre-1 +Version: 2.0.0-pre-2 Build-Depends: expat, libpq, pcre, sqlite3, zlib Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. Homepage: https://github.com/pocoproject/poco diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 36a127489..46d9a439c 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -76,7 +76,7 @@ vcpkg_configure_cmake( -DPOCO_ENABLE_WSTRING=ON -DPOCO_ENABLE_FPENVIRONMENT=ON -DPOCO_ENABLE_CPPUNIT=ON - # + # -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} OPTIONS_RELEASE -DMYSQL_LIBRARY=${MYSQL_LIBRARY} @@ -144,9 +144,9 @@ endif() # if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") - vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/Poco") - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Poco") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Poco) endif() # remove unused files @@ -156,4 +156,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/poco) file(RENAME ${CURRENT_PACKAGES_DIR}/share/poco/LICENSE ${CURRENT_PACKAGES_DIR}/share/poco/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/proj4/CONTROL b/ports/proj4/CONTROL index d1aecc21f..265b8173d 100644 --- a/ports/proj4/CONTROL +++ b/ports/proj4/CONTROL @@ -1,4 +1,4 @@ Source: proj4 -Version: 4.9.3-1 +Version: 4.9.3-3 Homepage: https://download.osgeo.org/proj Description: PROJ.4 library for cartographic projections diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index 64974e4ba..b34f04ac3 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -18,10 +18,16 @@ vcpkg_extract_source_archive_ex( 0003-CMake-configurable-cmake-config-install-location.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DBUILD_LIBPROJ_SHARED=${BUILD_SHARED_LIBS} + -DBUILD_LIBPROJ_SHARED=${VCPKG_BUILD_SHARED_LIBS} -DPROJ_LIB_SUBDIR=lib -DPROJ_INCLUDE_SUBDIR=include -DPROJ_DATA_SUBDIR=share/proj4 @@ -34,7 +40,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/proj4) +vcpkg_fixup_cmake_targets() # Rename library and adapt cmake configuration if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index bce258d24..0dc2aa6dc 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.8.0 +Version: 3.8.0-1 Homepage: https://github.com/google/protobuf Description: Protocol Buffers - Google's data interchange format diff --git a/ports/protobuf/disable-lite.patch b/ports/protobuf/disable-lite.patch deleted file mode 100644 index 3a372e68f..000000000 --- a/ports/protobuf/disable-lite.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/cmake/install.cmake b/cmake/install.cmake -index 9b2ae93c..7c9670a3 100644 ---- a/cmake/install.cmake -+++ b/cmake/install.cmake -@@ -22,10 +22,12 @@ foreach(_library ${_protobuf_libraries}) - set_property(TARGET ${_library} - PROPERTY INSTALL_RPATH "@loader_path") - endif() -+ if(NOT "${_library}" STREQUAL "libprotobuf-lite") - install(TARGETS ${_library} EXPORT protobuf-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${_library} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}) -+ endif() - endforeach() - - if (protobuf_BUILD_PROTOC_BINARIES) -@@ -40,7 +42,7 @@ if (protobuf_BUILD_PROTOC_BINARIES) - endif() - endif (protobuf_BUILD_PROTOC_BINARIES) - --install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") -+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") - - file(STRINGS extract_includes.bat.in _extract_strings - REGEX "^copy") -@@ -121,12 +123,12 @@ configure_file(protobuf-options.cmake - # Allows the build directory to be used as a find directory. - - if (protobuf_BUILD_PROTOC_BINARIES) -- export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc -+ export(TARGETS libprotobuf libprotoc protoc - NAMESPACE protobuf:: - FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake - ) - else (protobuf_BUILD_PROTOC_BINARIES) -- export(TARGETS libprotobuf-lite libprotobuf -+ export(TARGETS libprotobuf - NAMESPACE protobuf:: - FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake - ) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 982345db1..7c04158a8 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -8,7 +8,6 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-uwp.patch - disable-lite.patch ) if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86") @@ -24,15 +23,15 @@ if(NOT protobuf_BUILD_PROTOC_BINARIES AND NOT EXISTS ${CURRENT_INSTALLED_DIR}/.. endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(protobuf_BUILD_SHARED_LIBS ON) + set(VCPKG_BUILD_SHARED_LIBS ON) else() - set(protobuf_BUILD_SHARED_LIBS OFF) + set(VCPKG_BUILD_SHARED_LIBS OFF) endif() -if(VCPKG_CRT_LINKAGE STREQUAL "static") - set(protobuf_MSVC_STATIC_RUNTIME ON) +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_STATIC_CRT OFF) else() - set(protobuf_MSVC_STATIC_RUNTIME OFF) + set(VCPKG_BUILD_STATIC_CRT ON) endif() if("zlib" IN_LIST FEATURES) @@ -45,8 +44,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake PREFER_NINJA OPTIONS - -Dprotobuf_BUILD_SHARED_LIBS=${protobuf_BUILD_SHARED_LIBS} - -Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME} + -Dprotobuf_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} + -Dprotobuf_MSVC_STATIC_RUNTIME=${VCPKG_BUILD_STATIC_CRT} -Dprotobuf_WITH_ZLIB=${protobuf_WITH_ZLIB} -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_CMAKEDIR:STRING=share/protobuf @@ -91,10 +90,10 @@ protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share) if(CMAKE_HOST_WIN32) if(protobuf_BUILD_PROTOC_BINARIES) - file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/protobuf) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/protobuf) + file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) else() - file(COPY ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/protobuf DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(COPY ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -107,22 +106,18 @@ if(CMAKE_HOST_WIN32) else() file(GLOB EXECUTABLES ${CURRENT_PACKAGES_DIR}/bin/protoc*) foreach(E IN LISTS EXECUTABLES) - file(INSTALL ${E} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/protobuf + file(INSTALL ${E} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ) endforeach() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libprotobuf-lite.lib) - message(FATAL_ERROR "Expected to not build the lite runtime because it contains some of the same symbols as the full runtime.") -endif() - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(READ ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h _contents) string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h "${_contents}") endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 4debe0d26..393fefddc 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -1,14 +1,16 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + message(FATAL_ERROR "${PORT} does not currently support UWP platform nor ARM architectures") endif() -if(VCPKG_CMAKE_SYSTEM_NAME) + +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) return() endif() set(PTHREADS4W_VERSION "3.0.0") -include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE URLS "https://sourceforge.net/projects/pthreads4w/files/pthreads4w-code-v${PTHREADS4W_VERSION}.zip/download" FILENAME "pthreads4w-code-v${PTHREADS4W_VERSION}.zip" diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL index 96adad3fb..a68f43833 100644 --- a/ports/pugixml/CONTROL +++ b/ports/pugixml/CONTROL @@ -1,4 +1,4 @@ Source: pugixml -Version: 1.9-1 +Version: 1.9-2 Homepage: https://github.com/zeux/pugixml Description: C++ XML processing library diff --git a/ports/pugixml/portfile.cmake b/ports/pugixml/portfile.cmake index b0ec2cc58..62d0a4b74 100644 --- a/ports/pugixml/portfile.cmake +++ b/ports/pugixml/portfile.cmake @@ -1,14 +1,3 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# include(vcpkg_common_functions) vcpkg_from_github( @@ -20,14 +9,13 @@ vcpkg_from_github( ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH} ) vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/pugixml") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/pugixml) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pugixml RENAME copyright) diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 47d6ce2e7..6020376ba 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n" + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake index 206c04002..61eea306b 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -2,8 +2,8 @@ set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}") function(qt_modular_fetch_library NAME HASH TARGET_SOURCE_PATH) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) - if(BUILDTREES_PATH_LENGTH GREATER 45) - message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n" + if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() @@ -110,7 +110,7 @@ function(qt_modular_build_library SOURCE_PATH) #Move release and debug dlls to the correct directory if(EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5) - file(RENAME ${CURRENT_PACKAGES_DIR}/tools/qt5 ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/qt5 ${CURRENT_PACKAGES_DIR}/tools/${PORT}) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 32a1726ab..4bf7106e7 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,4 +1,4 @@ Source: re2 -Version: 2019-05-07 +Version: 2019-05-07-1 Homepage: https://github.com/google/re2 -Description: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. \ No newline at end of file +Description: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index 3cb43876a..ef2c9e842 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -3,7 +3,7 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/re2 - REF cd23be77c716bf75ebb3ddc07fa3ef0c943da6d2 + REF cd23be77c716bf75ebb3ddc07fa3ef0c943da6d2 SHA512 c307fc9294497dc3b4ae95db117f310e0db8f91a90c32bb316fe7e32414b2ade48264471e7a7bb0860aa9b0afe7dd460dadc552b1173ac35235ad3624c6f2ed5 HEAD_REF master ) @@ -14,7 +14,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/re2 TARGET_PATH share/re2) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/re2) vcpkg_copy_pdbs() diff --git a/ports/restclient-cpp/CONTROL b/ports/restclient-cpp/CONTROL index 5cb43b1d4..975f5df7a 100644 --- a/ports/restclient-cpp/CONTROL +++ b/ports/restclient-cpp/CONTROL @@ -1,4 +1,4 @@ Source: restclient-cpp -Version: 0.5.1 +Version: 0.5.1-1 Build-Depends: curl Description: Binn is a binary data serialization format designed to be compact, fast and easy to use. diff --git a/ports/restinio/CONTROL b/ports/restinio/CONTROL index b608f12b5..a7c81a55f 100644 --- a/ports/restinio/CONTROL +++ b/ports/restinio/CONTROL @@ -1,4 +1,4 @@ -Source: restinio -Version: 0.5.1 -Description: A header-only C++14 library that gives you an embedded HTTP/Websocket server targeted primarily for asynchronous processing of HTTP-requests. -Build-Depends: asio, fmt, http-parser +Source: restinio +Version: 0.5.1-1 +Description: A header-only C++14 library that gives you an embedded HTTP/Websocket server targeted primarily for asynchronous processing of HTTP-requests. +Build-Depends: asio, fmt, http-parser diff --git a/ports/restinio/portfile.cmake b/ports/restinio/portfile.cmake index 9ab82bc4a..5ae3cc2e2 100644 --- a/ports/restinio/portfile.cmake +++ b/ports/restinio/portfile.cmake @@ -13,8 +13,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/restinio") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/restinio) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index 388e08d5a..1c28b50f0 100644 --- a/ports/sdl2-image/CONTROL +++ b/ports/sdl2-image/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-image -Version: 2.0.4-2 +Version: 2.0.4-3 Build-Depends: sdl2, libpng Homepage: https://www.libsdl.org/projects/SDL_image Description: SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV diff --git a/ports/sdl2-image/portfile.cmake b/ports/sdl2-image/portfile.cmake index 4d02e93f4..a1e69af54 100644 --- a/ports/sdl2-image/portfile.cmake +++ b/ports/sdl2-image/portfile.cmake @@ -11,7 +11,7 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - REF ${SDL2_IMAGE_VERSION} + REF ${SDL2_IMAGE_VERSION} ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -43,12 +43,12 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/sdl2-image") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-image) file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-image/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-image/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/sdl2-mixer/portfile.cmake b/ports/sdl2-mixer/portfile.cmake index 0b1b6dcea..977062a19 100644 --- a/ports/sdl2-mixer/portfile.cmake +++ b/ports/sdl2-mixer/portfile.cmake @@ -53,8 +53,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/sdl2-mixer") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-mixer) diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL index 848691145..9270c5a82 100644 --- a/ports/sdl2-net/CONTROL +++ b/ports/sdl2-net/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-net -Version: 2.0.1-6 +Version: 2.0.1-7 Homepage: https://www.libsdl.org/projects/SDL_net Description: Networking library for SDL Build-Depends: sdl2 diff --git a/ports/sdl2-net/portfile.cmake b/ports/sdl2-net/portfile.cmake index 2a8928e16..b047be96b 100644 --- a/ports/sdl2-net/portfile.cmake +++ b/ports/sdl2-net/portfile.cmake @@ -17,8 +17,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/sdl2-net") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-net) diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL index 9154c52da..34d12bafd 100644 --- a/ports/sdl2-ttf/CONTROL +++ b/ports/sdl2-ttf/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-ttf -Version: 2.0.15-2 +Version: 2.0.15-3 Homepage: https://www.libsdl.org/projects/SDL_ttf/ Description: A library for rendering TrueType fonts with SDL Build-Depends: sdl2, freetype diff --git a/ports/sdl2-ttf/portfile.cmake b/ports/sdl2-ttf/portfile.cmake index 55451dcf1..eb623e13e 100644 --- a/ports/sdl2-ttf/portfile.cmake +++ b/ports/sdl2-ttf/portfile.cmake @@ -24,8 +24,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/sdl2-ttf") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index bfda1f10b..d76db966f 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,5 +1,5 @@ Source: sdl2 -Version: 2.0.9-3 +Version: 2.0.9-4 Homepage: https://github.com/SDL-Mirror/SDL Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 468560575..a2bc6363a 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -36,11 +36,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") - vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/SDL2") - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/SDL2") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SDL2) elseif(EXISTS "${CURRENT_PACKAGES_DIR}/SDL2.framework/Resources") - vcpkg_fixup_cmake_targets(CONFIG_PATH "SDL2.framework/Resources") + vcpkg_fixup_cmake_targets(CONFIG_PATH SDL2.framework/Resources) endif() file(REMOVE_RECURSE diff --git a/ports/selene/CONTROL b/ports/selene/CONTROL index ce266e859..b3bbed2b6 100644 --- a/ports/selene/CONTROL +++ b/ports/selene/CONTROL @@ -1,4 +1,4 @@ Source: selene -Version: 0.3.1 +Version: 0.3.1-1 Description: A C++17 image representation, processing and I/O library. Build-Depends: zlib, libpng, libjpeg-turbo, tiff diff --git a/ports/selene/portfile.cmake b/ports/selene/portfile.cmake index f45c84460..11a2e89eb 100644 --- a/ports/selene/portfile.cmake +++ b/ports/selene/portfile.cmake @@ -18,7 +18,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/selene") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/selene) vcpkg_copy_pdbs() # Include files should not be duplicated into the /debug/include directory. diff --git a/ports/sf2cute/CONTROL b/ports/sf2cute/CONTROL index 7d850c694..bdba56cc7 100644 --- a/ports/sf2cute/CONTROL +++ b/ports/sf2cute/CONTROL @@ -1,6 +1,6 @@ Source: sf2cute -Version: 0.2.0 +Version: 0.2.0-1 Description: C++14 Library for SoundFont 2 Feature: example -Description: Installs an example application \ No newline at end of file +Description: Installs an example application diff --git a/ports/sf2cute/portfile.cmake b/ports/sf2cute/portfile.cmake index 5a99ca11b..e46222396 100644 --- a/ports/sf2cute/portfile.cmake +++ b/ports/sf2cute/portfile.cmake @@ -26,12 +26,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# move the .cmake files from the given directory to the expected directory by vcpkg -vcpkg_fixup_cmake_targets(CONFIG_PATH share/sf2cute) - # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sf2cute RENAME copyright) diff --git a/ports/shogun/CONTROL b/ports/shogun/CONTROL index 69b7968db..e57f129fe 100644 --- a/ports/shogun/CONTROL +++ b/ports/shogun/CONTROL @@ -1,4 +1,4 @@ Source: shogun -Version: 6.1.3-4 +Version: 6.1.3-3 Build-Depends: bzip2, eigen3, liblzma, libxml2, openblas (x64&!osx), nlopt, rxcpp, snappy, zlib, protobuf, curl, lzo, dirent Description: Unified and efficient Machine Learning diff --git a/ports/shogun/portfile.cmake b/ports/shogun/portfile.cmake index 1f46e6ba7..37a755894 100644 --- a/ports/shogun/portfile.cmake +++ b/ports/shogun/portfile.cmake @@ -2,6 +2,12 @@ include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CMAKE_DISABLE_FIND_PACKAGE_BLAS 0) +else() + set(CMAKE_DISABLE_FIND_PACKAGE_BLAS 1) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO shogun-toolbox/shogun @@ -16,12 +22,6 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/external) file(MAKE_DIRECTORY ${SOURCE_PATH}/cmake/external) file(COPY ${CMAKE_CURRENT_LIST_DIR}/MSDirent.cmake DESTINATION ${SOURCE_PATH}/cmake/external) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(CMAKE_DISABLE_FIND_PACKAGE_BLAS 0) -else() - set(CMAKE_DISABLE_FIND_PACKAGE_BLAS 1) -endif() - vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) vcpkg_add_to_path(${PYTHON3_DIR}) @@ -36,9 +36,6 @@ vcpkg_configure_cmake( -DENABLE_TESTING=OFF -DLICENSE_GPL_SHOGUN=OFF -DLIBSHOGUN_BUILD_STATIC=ON - # Conflicting definitions in OpenBLAS and Eigen - -DENABLE_EIGEN_LAPACK=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_JSON=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_ViennaCL=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_TFLogger=TRUE @@ -53,13 +50,13 @@ vcpkg_configure_cmake( -DCMAKE_DISABLE_FIND_PACKAGE_CCache=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_LAPACK=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_CURL=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_BLAS=${CMAKE_DISABLE_FIND_PACKAGE_BLAS} -DINSTALL_TARGETS=shogun-static ) vcpkg_install_cmake() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shogun) file(REMOVE_RECURSE diff --git a/ports/sndfile/CONTROL b/ports/sndfile/CONTROL index 8c020a5f9..fb01b6408 100644 --- a/ports/sndfile/CONTROL +++ b/ports/sndfile/CONTROL @@ -1,9 +1,9 @@ Source: sndfile -Version: deprecated -Description: Deprecated port, use libsndfile instead +Version: 0 +Description:x Library to read, write and manipulate many soundfile types. Build-Depends: libsndfile Default-Features: external-libs Feature: external-libs -Description: Deprecated port, use libsndfile[external-libs] instead +Description: Support Ogg Vorbis and FLAC audio files Build-Depends: libsndfile[external-libs] diff --git a/ports/sndfile/portfile.cmake b/ports/sndfile/portfile.cmake index 47fe8ca23..d3910bb2c 100644 --- a/ports/sndfile/portfile.cmake +++ b/ports/sndfile/portfile.cmake @@ -1,3 +1,3 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -message(WARNING "The sndfile port is deprecated, use libsndfile instead") +message(WARNING "The sndfile port is deprecated, using libsndfile instead") diff --git a/ports/so5extra/CONTROL b/ports/so5extra/CONTROL index af3be50a0..882ac0712 100644 --- a/ports/so5extra/CONTROL +++ b/ports/so5extra/CONTROL @@ -1,4 +1,4 @@ Source: so5extra -Version: 1.2.3 +Version: 1.2.3-1 Description: A set of additional tools for SObjectizer framework. Build-Depends: sobjectizer diff --git a/ports/so5extra/portfile.cmake b/ports/so5extra/portfile.cmake index 4bd7e0787..26472935e 100644 --- a/ports/so5extra/portfile.cmake +++ b/ports/so5extra/portfile.cmake @@ -17,8 +17,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/so5extra") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/so5extra) # Remove unnecessary stuff. # These paths are empty and should be removed too. diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 12b0968d9..3e37f70e3 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,4 +1,4 @@ Source: sobjectizer -Version: 5.5.24.4 +Version: 5.5.24.4-1 Homepage: https://sourceforge.net/projects/sobjectizer Description: SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels. diff --git a/ports/sobjectizer/portfile.cmake b/ports/sobjectizer/portfile.cmake index 659e1192a..4588ea4f2 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -29,7 +29,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sobjectizer") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sobjectizer) # Handle copyright file(COPY ${SOURCE_PATH}/../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sobjectizer) diff --git a/ports/sophus/CONTROL b/ports/sophus/CONTROL index 91e97c90b..d3c81de77 100644 --- a/ports/sophus/CONTROL +++ b/ports/sophus/CONTROL @@ -1,5 +1,5 @@ Source: sophus -Version: 1.0.0-3 +Version: 1.0.0-6 Build-Depends: eigen3, ceres, suitesparse Homepage: https://github.com/strasdat/Sophus Description: Lie group library for C++ diff --git a/ports/sophus/portfile.cmake b/ports/sophus/portfile.cmake index f33260c4d..c7480b904 100644 --- a/ports/sophus/portfile.cmake +++ b/ports/sophus/portfile.cmake @@ -16,7 +16,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Sophus") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Sophus) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/string-theory/CONTROL b/ports/string-theory/CONTROL index e1c0c8af0..538b4a989 100644 --- a/ports/string-theory/CONTROL +++ b/ports/string-theory/CONTROL @@ -1,4 +1,4 @@ Source: string-theory -Version: 2.1 +Version: 2.1-1 Homepage: https://github.com/zrax/string_theory Description: Flexible C++11 string library with type-safe formatting. diff --git a/ports/string-theory/portfile.cmake b/ports/string-theory/portfile.cmake index 3cfb24c92..002eae1b1 100644 --- a/ports/string-theory/portfile.cmake +++ b/ports/string-theory/portfile.cmake @@ -22,8 +22,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/string_theory") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/string_theory) file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory ${CURRENT_PACKAGES_DIR}/share/string_theory) diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL index 352a28a6d..82ee5e5e0 100644 --- a/ports/suitesparse/CONTROL +++ b/ports/suitesparse/CONTROL @@ -1,5 +1,5 @@ Source: suitesparse -Version: 5.4.0-1 +Version: 5.4.0-3 Build-Depends: clapack (!osx) Homepage: http://faculty.cse.tamu.edu/davis/SuiteSparse Description: algebra library diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake index a527f8825..8fb2c26b2 100644 --- a/ports/suitesparse/portfile.cmake +++ b/ports/suitesparse/portfile.cmake @@ -34,6 +34,10 @@ foreach(SOURCE_FILE ${SUITESPARSE_SOURCE_FILES}) file(COPY ${SOURCE_FILE} DESTINATION "${SUITESPARSEWIN_SOURCE_PATH}/SuiteSparse") endforeach() message(STATUS "Copying SuiteSparse source files... done") +message(STATUS "Removing integrated lapack and metis libs...") +file(REMOVE_RECURSE ${SUITESPARSEWIN_SOURCE_PATH}/lapack_windows) +file(REMOVE_RECURSE ${SUITESPARSEWIN_SOURCE_PATH}/metis) +message(STATUS "Removing integrated lapack and metis libs... done") set(USE_VCPKG_METIS OFF) if("metis" IN_LIST FEATURES) @@ -56,14 +60,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/suitesparse-${SUITESPARSE_VER}" TARGET_PATH "share/suitesparse") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/suitesparse-${SUITESPARSE_VER}) -#clean folders file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright of suitesparse and suitesparse-metis-for-windows -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/suitesparse/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/suitesparse/copyright) - -file(COPY ${SUITESPARSEWIN_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/suitesparse/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/suitesparse/copyright_suitesparse-metis-for-windows) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse RENAME copyright) +file(INSTALL ${SUITESPARSEWIN_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse RENAME copyright_suitesparse-metis-for-windows) diff --git a/ports/suitesparse/suitesparse.patch b/ports/suitesparse/suitesparse.patch index 394355606..e26a5b8cb 100644 --- a/ports/suitesparse/suitesparse.patch +++ b/ports/suitesparse/suitesparse.patch @@ -1,17 +1,82 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3486f05..98badb6 100644 +index 3486f05..b8c2e63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -252,7 +252,7 @@ if(SuiteSparse_LAPACK_BLAS_LIB_DIR) # "Export" the imported targets in config.cm - set_property(TARGET lapack PROPERTY IMPORTED_IMPLIB \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/liblapack.lib)") +@@ -191,68 +191,14 @@ if(WITH_CUDA) + ENDIF(${CUDA_FOUND}) endif() +-find_package(BLAS) +-find_package(LAPACK) +-if (LAPACK_FOUND AND BLAS_FOUND) ++find_package(BLAS REQUIRED) ++find_package(LAPACK REQUIRED) ++if(LAPACK_FOUND AND BLAS_FOUND) + message(STATUS "found lapack and blas config file. Linking targets lapack and blas") + set(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) +-else () # LAPACK is not found +- +-## Need to use SuiteSparse_LINKER_LAPACK_BLAS_LIBS in our subproject in case of SHARED flag is set to ON +-SET(SUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS OFF CACHE BOOL "Check if you have custom LAPACK/BLAS libraries (AMD,...)") +-IF (SUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS) +- SET(SUITESPARSE_CUSTOM_BLAS_LIB "" CACHE FILE "Path to custom library file for BLAS") +- SET(SUITESPARSE_CUSTOM_LAPACK_LIB "" CACHE FILE "Path to custom library file for LAPACK") +- IF (NOT EXISTS "${SUITESPARSE_CUSTOM_BLAS_LIB}" OR NOT EXISTS "${SUITESPARSE_CUSTOM_LAPACK_LIB}") +- MESSAGE("*Error*: Correctly set SUITESPARSE_CUSTOM_BLAS_LIB and SUITESPARSE_CUSTOM_LAPACK_LIB or uncheck SUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS") +- ELSE() +- SET(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${SUITESPARSE_CUSTOM_BLAS_LIB} ${SUITESPARSE_CUSTOM_LAPACK_LIB}) +- ENDIF() +-ELSE() +- IF (UNIX) +- SET(SuiteSparse_LINKER_LAPACK_BLAS_LIBS lapack blas rt) +- ELSE() +- IF(CMAKE_SIZEOF_VOID_P EQUAL 8) # Size in bytes! +- set(PATH_WORD_SIZE "x64") +- ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8) # Size in bytes! +- set(PATH_WORD_SIZE "x32") +- ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8) +- +- add_library(blas SHARED IMPORTED) +- set_property(TARGET blas PROPERTY IMPORTED_LOCATION ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/libblas.dll) +- set_property(TARGET blas PROPERTY IMPORTED_IMPLIB ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/libblas.lib) +- +- add_library(lapack SHARED IMPORTED) +- set_property(TARGET lapack PROPERTY IMPORTED_LOCATION ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/liblapack.dll) +- set_property(TARGET lapack PROPERTY IMPORTED_IMPLIB ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/liblapack.lib) +- +- SET(SuiteSparse_LINKER_LAPACK_BLAS_LIBS blas lapack) +- +- ## install lapack and blas dependencies +- file(GLOB lapack_blas_windows_libs "${CMAKE_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/*.lib") +- file(GLOB lapack_blas_windows_dll "${CMAKE_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/*.dll") +- if(lapack_blas_windows_dll AND lapack_blas_windows_libs) +- set(SuiteSparse_LAPACK_BLAS_LIB_DIR "lib${LIB_POSTFIX}/lapack_blas_windows") +- install(FILES ${lapack_blas_windows_libs} +- ${lapack_blas_windows_dll} +- DESTINATION ${SuiteSparse_LAPACK_BLAS_LIB_DIR} +- ) +- endif() +- ENDIF() +-ENDIF() +-ENDIF() # LAPACK found +- +-if(SuiteSparse_LAPACK_BLAS_LIB_DIR) # "Export" the imported targets in config.cmake manually +- set(ExternConfig "add_library(blas SHARED IMPORTED) +- set_property(TARGET blas PROPERTY IMPORTED_LOCATION \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/libblas.dll) +- set_property(TARGET blas PROPERTY IMPORTED_IMPLIB \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/libblas.lib) +- +- add_library(lapack SHARED IMPORTED) +- set_property(TARGET lapack PROPERTY IMPORTED_LOCATION \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/liblapack.dll) +- set_property(TARGET lapack PROPERTY IMPORTED_IMPLIB \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/liblapack.lib)") +-endif() ++endif() # LAPACK is not found + -IF(BUILD_METIS) +IF(BUILD_METIS OR USE_VCPKG_METIS) set(SuiteSparse_LINKER_METIS_LIBS "metis") ## namespaced library target for config set(SuiteSparse_EXPORTED_METIS_LIBS "SuiteSparse::metis") -@@ -311,7 +311,7 @@ configure_file(cmake/SuiteSparse-config-install.cmake.in +@@ -311,7 +257,7 @@ configure_file(cmake/SuiteSparse-config-install.cmake.in ## do the EXPORT for allowing other project to easily use suitesparse with cmake install(EXPORT SuiteSparseTargets FILE @@ -20,6 +85,18 @@ index 3486f05..98badb6 100644 NAMESPACE SuiteSparse:: DESTINATION +diff --git a/SuiteSparse/CHOLMOD/Include/cholmod_blas.h b/SuiteSparse/CHOLMOD/Include/cholmod_blas.h +index aef3e63..907512b 100644 +--- a/SuiteSparse/CHOLMOD/Include/cholmod_blas.h ++++ b/SuiteSparse/CHOLMOD/Include/cholmod_blas.h +@@ -27,6 +27,7 @@ + #elif defined (__linux) || defined (MGLNX86) || defined (ARCH_GLNX86) + #define CHOLMOD_LINUX + #define CHOLMOD_ARCHITECTURE "Linux" ++#define BLAS_NO_UNDERSCORE + + #elif defined (__APPLE__) + #define CHOLMOD_MAC diff --git a/SuiteSparse/CMakeLists.txt b/SuiteSparse/CMakeLists.txt index c6e2834..5ef08a6 100644 --- a/SuiteSparse/CMakeLists.txt diff --git a/ports/systemc/CONTROL b/ports/systemc/CONTROL index 488a06338..4f1bd67d9 100644 --- a/ports/systemc/CONTROL +++ b/ports/systemc/CONTROL @@ -1,3 +1,3 @@ Source: systemc -Version: 2.3.3-2 +Version: 2.3.3-3 Description: A set of C++ classes and macros which provide an event-driven simulation kernel in C++ diff --git a/ports/systemc/install.patch b/ports/systemc/install.patch index d335a8b18..ef133a14f 100644 --- a/ports/systemc/install.patch +++ b/ports/systemc/install.patch @@ -1,23 +1,31 @@ ---- CMakeLists.txt Sat Oct 13 00:19:07 2018 -+++ CMakeLists.txt.fixed Mon Jan 28 15:51:38 2019 -@@ -555,7 +555,7 @@ - endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - - # Set the installation paths for headers, libraries, and documentation. --set (CMAKE_INSTALL_DOCDIR "share/doc/systemc" CACHE PATH -+set (CMAKE_INSTALL_DOCDIR "share/systemc" CACHE PATH - "Documentation installation directory") # otherwise mixed-case - if (INSTALL_TO_LIB_BUILD_TYPE_DIR) - # Install libraries to lib-${CMAKE_BUILD_TYPE} so that different build variants -@@ -589,9 +589,9 @@ - set (SystemCTLM_INSTALL_CMAKEDIR share/cmake/SystemCTLM CACHE PATH - "CMake package configuration installation directory" FORCE) - else (INSTALL_TO_LIB_BUILD_TYPE_DIR OR INSTALL_TO_LIB_TARGET_ARCH_DIR) -- set (SystemCLanguage_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/SystemCLanguage CACHE PATH -+ set (SystemCLanguage_INSTALL_CMAKEDIR share/SystemCLanguage CACHE PATH - "CMake package configuration installation directory for the SystemCLanguage package.") -- set (SystemCTLM_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/SystemCTLM CACHE PATH -+ set (SystemCTLM_INSTALL_CMAKEDIR share/SystemCTLM CACHE PATH - "CMake package configuration installation directory for the SystemCTLM package.") - endif (INSTALL_TO_LIB_BUILD_TYPE_DIR OR INSTALL_TO_LIB_TARGET_ARCH_DIR) - mark_as_advanced(SystemCLanguage_INSTALL_CMAKEDIR SystemCTLM_INSTALL_CMAKEDIR) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b7815ae..86d79d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -555,7 +555,7 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + + # Set the installation paths for headers, libraries, and documentation. +-set (CMAKE_INSTALL_DOCDIR "share/doc/systemc" CACHE PATH ++set (CMAKE_INSTALL_DOCDIR "share/systemc/doc" CACHE PATH + "Documentation installation directory") # otherwise mixed-case + if (INSTALL_TO_LIB_BUILD_TYPE_DIR) + # Install libraries to lib-${CMAKE_BUILD_TYPE} so that different build variants +@@ -584,14 +584,14 @@ if (INSTALL_LIB_TARGET_ARCH_SYMLINK AND CMAKE_HOST_UNIX) + endif (INSTALL_LIB_TARGET_ARCH_SYMLINK AND CMAKE_HOST_UNIX) + + if (INSTALL_TO_LIB_BUILD_TYPE_DIR OR INSTALL_TO_LIB_TARGET_ARCH_DIR) +- set (SystemCLanguage_INSTALL_CMAKEDIR share/cmake/SystemCLanguage CACHE PATH ++ set (SystemCLanguage_INSTALL_CMAKEDIR lib/cmake/SystemCLanguage CACHE PATH + "CMake package configuration installation directory" FORCE) + set (SystemCTLM_INSTALL_CMAKEDIR share/cmake/SystemCTLM CACHE PATH + "CMake package configuration installation directory" FORCE) + else (INSTALL_TO_LIB_BUILD_TYPE_DIR OR INSTALL_TO_LIB_TARGET_ARCH_DIR) +- set (SystemCLanguage_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/SystemCLanguage CACHE PATH ++ set (SystemCLanguage_INSTALL_CMAKEDIR lib/cmake/SystemCLanguage CACHE PATH + "CMake package configuration installation directory for the SystemCLanguage package.") +- set (SystemCTLM_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/SystemCTLM CACHE PATH ++ set (SystemCTLM_INSTALL_CMAKEDIR share/cmake/SystemCTLM CACHE PATH + "CMake package configuration installation directory for the SystemCTLM package.") + endif (INSTALL_TO_LIB_BUILD_TYPE_DIR OR INSTALL_TO_LIB_TARGET_ARCH_DIR) + mark_as_advanced(SystemCLanguage_INSTALL_CMAKEDIR SystemCTLM_INSTALL_CMAKEDIR) diff --git a/ports/systemc/portfile.cmake b/ports/systemc/portfile.cmake index 0165b8270..8ecb7e8fb 100644 --- a/ports/systemc/portfile.cmake +++ b/ports/systemc/portfile.cmake @@ -26,16 +26,11 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SystemCLanguage TARGET_PATH share/systemclanguage) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/SystemCTLM TARGET_PATH share/systemctlm) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/SystemCLanguage TARGET_PATH share/SystemCLanguage) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/SystemCTLM TARGET_PATH share/SystemCTLM) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/systemc RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/sysc/packages/qt/time) -# Post-build test for cmake libraries (disabled for now due to issues with vcpkg_test_cmake) -#vcpkg_test_cmake(PACKAGE_NAME SystemCLanguage) -#vcpkg_test_cmake(PACKAGE_NAME SystemCTLM) +file(INSTALL ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/systemc RENAME copyright) diff --git a/ports/szip/CONTROL b/ports/szip/CONTROL index a2ea5f275..ac60f1a9d 100644 --- a/ports/szip/CONTROL +++ b/ports/szip/CONTROL @@ -1,4 +1,4 @@ Source: szip -Version: 2.1.1-3 +Version: 2.1.1-4 Homepage: https://support.hdfgroup.org/ftp/lib-external/szip Description: Szip compression software, providing lossless compression of scientific data diff --git a/ports/szip/portfile.cmake b/ports/szip/portfile.cmake index fa10d58a2..047abf392 100644 --- a/ports/szip/portfile.cmake +++ b/ports/szip/portfile.cmake @@ -24,8 +24,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/szip) +vcpkg_fixup_cmake_targets() file(RENAME ${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING ${CURRENT_PACKAGES_DIR}/share/szip/copyright) diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL index 85e76cc03..df6e60fec 100644 --- a/ports/tesseract/CONTROL +++ b/ports/tesseract/CONTROL @@ -1,5 +1,5 @@ Source: tesseract -Version: 4.0.0-2 +Version: 4.0.0-3 Homepage: https://github.com/tesseract-ocr/tesseract Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. Build-Depends: leptonica, icu diff --git a/ports/tesseract/portfile.cmake b/ports/tesseract/portfile.cmake index d21908b19..18b63cab6 100644 --- a/ports/tesseract/portfile.cmake +++ b/ports/tesseract/portfile.cmake @@ -27,7 +27,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) # Install tool file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/tesseract) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 47a85dfa5..c3f2f83c9 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -2,4 +2,4 @@ Source: thrift Version: 2019-05-07-1 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit Homepage: https://github.com/apache/thrift -Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008. Thrift became an Apache TLP in October, 2010. +Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index efd76472b..c19b38c31 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -17,7 +17,6 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_SHARED_LIBS=OFF -DWITH_STDTHREADS=ON -DBUILD_TESTING=off -DBUILD_JAVA=off @@ -36,7 +35,7 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright) # Move CMake config files to the right place -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/thrift") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/thrift) file(GLOB COMPILER "${CURRENT_PACKAGES_DIR}/bin/thrift*") if(COMPILER) diff --git a/ports/tinyexif/CONTROL b/ports/tinyexif/CONTROL index 861520321..24350d8be 100644 --- a/ports/tinyexif/CONTROL +++ b/ports/tinyexif/CONTROL @@ -1,5 +1,5 @@ Source: tinyexif -Version: 1.0.2-4 +Version: 1.0.2-5 Build-Depends: tinyxml2 Homepage: https://github.com/cdcseacave/TinyEXIF Description: tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG images diff --git a/ports/tinyexif/portfile.cmake b/ports/tinyexif/portfile.cmake index 5a10d422f..b6e489384 100644 --- a/ports/tinyexif/portfile.cmake +++ b/ports/tinyexif/portfile.cmake @@ -20,7 +20,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tinyexif") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/tinyexif) vcpkg_copy_pdbs() diff --git a/ports/tinyobjloader/CONTROL b/ports/tinyobjloader/CONTROL index f80f52f96..4dc5eebb2 100644 --- a/ports/tinyobjloader/CONTROL +++ b/ports/tinyobjloader/CONTROL @@ -1,3 +1,3 @@ Source: tinyobjloader -Version: 1.0.7 +Version: 1.0.7-1 Description: Tiny but powerful single file wavefront obj loader diff --git a/ports/tinyobjloader/portfile.cmake b/ports/tinyobjloader/portfile.cmake index b33a2dd74..7b8741d34 100644 --- a/ports/tinyobjloader/portfile.cmake +++ b/ports/tinyobjloader/portfile.cmake @@ -19,7 +19,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/tinyobjloader/cmake") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/tinyobjloader/cmake) file( REMOVE_RECURSE diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index f3b7655e9..5a33ae078 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,4 +1,5 @@ Source: tinyxml2 -Version: 7.0.1 +Version: 7.0.1-1 Homepage: https://github.com/leethomason/tinyxml2 Description: A simple, small, efficient, C++ XML parser + diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index d1e7d4ce6..7d4ceaff1 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -14,7 +14,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tinyxml2") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/tinyxml2) vcpkg_copy_pdbs() diff --git a/ports/tmx/CONTROL b/ports/tmx/CONTROL index 9079cb85e..6f55421cc 100644 --- a/ports/tmx/CONTROL +++ b/ports/tmx/CONTROL @@ -1,4 +1,4 @@ Source: tmx -Version: 1.0.0 +Version: 1.0.0-1 Description: A portable C library to load tiled maps in your games. Build-Depends: zlib, libxml2 diff --git a/ports/tmx/portfile.cmake b/ports/tmx/portfile.cmake index b3f70f4d1..4faec9b9d 100644 --- a/ports/tmx/portfile.cmake +++ b/ports/tmx/portfile.cmake @@ -17,7 +17,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/tmx/tmxExports.cmake ${CURRENT_PACKAGES_DIR}/lib/cmake/tmx/tmxTargets.cmake) -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tmx") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/tmx) file(RENAME ${CURRENT_PACKAGES_DIR}/share/tmx/tmxTargets.cmake ${CURRENT_PACKAGES_DIR}/share/tmx/tmxExports.cmake) file(REMOVE_RECURSE diff --git a/ports/treehopper/CONTROL b/ports/treehopper/CONTROL index 673e0cb7c..f50e84f1b 100644 --- a/ports/treehopper/CONTROL +++ b/ports/treehopper/CONTROL @@ -1,4 +1,5 @@ Source: treehopper -Version: 1.11.3-2 +Version: 1.11.3-3 Description: Treehopper connects the physical world to your computer, tablet, or smartphone. Homepage: https://treehopper.io +Build-Depends: libusb diff --git a/ports/treehopper/portfile.cmake b/ports/treehopper/portfile.cmake index 68cf07bb9..46ed0d85e 100644 --- a/ports/treehopper/portfile.cmake +++ b/ports/treehopper/portfile.cmake @@ -16,8 +16,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/treehopper) +vcpkg_fixup_cmake_targets() file(INSTALL ${SOURCE_PATH}/C++/API/inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/Treehopper/) diff --git a/ports/trompeloeil/CONTROL b/ports/trompeloeil/CONTROL index b00d5f8aa..135a473f3 100644 --- a/ports/trompeloeil/CONTROL +++ b/ports/trompeloeil/CONTROL @@ -1,4 +1,4 @@ Source: trompeloeil -Version: 34 +Version: 34-1 Description: A thread-safe header-only mocking framework for C++11/14 using the Boost Software License 1.0 Homepage: https://github.com/rollbear/trompeloeil diff --git a/ports/trompeloeil/portfile.cmake b/ports/trompeloeil/portfile.cmake index db8367d22..03385928f 100644 --- a/ports/trompeloeil/portfile.cmake +++ b/ports/trompeloeil/portfile.cmake @@ -18,7 +18,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/trompeloeil TARGET_PATH share/trompeloeil) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/trompeloeil) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) diff --git a/ports/urdfdom-headers/CONTROL b/ports/urdfdom-headers/CONTROL index 3d005dd60..d2399647f 100644 --- a/ports/urdfdom-headers/CONTROL +++ b/ports/urdfdom-headers/CONTROL @@ -1,4 +1,4 @@ Source: urdfdom-headers -Version: 1.0.4 +Version: 1.0.4-1 Homepage: https://github.com/ros/urdfdom_headers Description: The URDF (U-Robot Description Format) headers provides core data structure headers for URDF. diff --git a/ports/urdfdom-headers/portfile.cmake b/ports/urdfdom-headers/portfile.cmake index 8670716f3..5f7430f76 100644 --- a/ports/urdfdom-headers/portfile.cmake +++ b/ports/urdfdom-headers/portfile.cmake @@ -16,9 +16,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/urdfdom_headers) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/urdfdom_headers) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/urdfdom_headers/cmake" TARGET_PATH share/urdfdom_headers) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/urdfdom_headers/cmake TARGET_PATH share/urdfdom_headers) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/urdfdom_headers) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom_headers) endif() diff --git a/ports/urdfdom/CONTROL b/ports/urdfdom/CONTROL index 0d81ec662..7420aaca6 100644 --- a/ports/urdfdom/CONTROL +++ b/ports/urdfdom/CONTROL @@ -1,5 +1,5 @@ Source: urdfdom -Version: 1.0.3 +Version: 1.0.3-1 Homepage: https://github.com/ros/urdfdom Description: Provides core data structures and a simple XML parsers for populating the class data structures from an URDF file. Build-Depends: console-bridge, tinyxml, urdfdom-headers diff --git a/ports/urdfdom/portfile.cmake b/ports/urdfdom/portfile.cmake index f10c6cc47..cf5b3220b 100644 --- a/ports/urdfdom/portfile.cmake +++ b/ports/urdfdom/portfile.cmake @@ -26,9 +26,9 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/urdfdom) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/urdfdom/cmake" TARGET_PATH share/urdfdom) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/urdfdom/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/urdfdom) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom) endif() diff --git a/ports/usd/CONTROL b/ports/usd/CONTROL index 58a564ad7..e04784de4 100644 --- a/ports/usd/CONTROL +++ b/ports/usd/CONTROL @@ -1,4 +1,4 @@ Source: usd -Version: 0.8.4 +Version: 0.8.4-1 Build-Depends: boost-assign, boost-crc, boost-date-time, boost-filesystem, boost-format, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-vmd, tbb, zlib Description: Universal Scene Description (USD) is an efficient, scalable system for authoring, reading, and streaming time-sampled scene description for interchange between graphics applications. diff --git a/ports/usd/portfile.cmake b/ports/usd/portfile.cmake index a648e334a..cada7b4e1 100644 --- a/ports/usd/portfile.cmake +++ b/ports/usd/portfile.cmake @@ -35,7 +35,7 @@ file( "${CURRENT_PACKAGES_DIR}/pxrConfig.cmake" "${CURRENT_PACKAGES_DIR}/cmake/pxrConfig.cmake") -vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) vcpkg_copy_pdbs() diff --git a/ports/uvw/CONTROL b/ports/uvw/CONTROL index 0db70d086..a3507632b 100644 --- a/ports/uvw/CONTROL +++ b/ports/uvw/CONTROL @@ -1,5 +1,5 @@ Source: uvw -Version: 1.17.0_libuv-v1.29 +Version: 1.17.0_libuv-v1.29-1 Description: Header-only, event based, tiny and easy to use libuv wrapper in modern C++. Homepage: https://github.com/skypjack/uvw Build-Depends: libuv diff --git a/ports/uvw/portfile.cmake b/ports/uvw/portfile.cmake index 27fcea15a..ba640b597 100644 --- a/ports/uvw/portfile.cmake +++ b/ports/uvw/portfile.cmake @@ -13,13 +13,11 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/uvw") -file(INSTALL - ${CMAKE_CURRENT_LIST_DIR}/uvw-config.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvw/ -) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/uvw-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvw/) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright/readme/package files diff --git a/ports/visit-struct/CONTROL b/ports/visit-struct/CONTROL index 98ad6e2e9..bf895349d 100644 --- a/ports/visit-struct/CONTROL +++ b/ports/visit-struct/CONTROL @@ -1,3 +1,3 @@ Source: visit-struct -Version: 1.0 +Version: 1.0-1 Description: A header-only library providing structure visitors for C++11 and C++14 diff --git a/ports/visit-struct/portfile.cmake b/ports/visit-struct/portfile.cmake index e3daf0c47..8a87471c5 100644 --- a/ports/visit-struct/portfile.cmake +++ b/ports/visit-struct/portfile.cmake @@ -16,11 +16,8 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/visit_struct TARGET_PATH share/visit_struct) -vcpkg_fixup_cmake_targets( - CONFIG_PATH share/visit_struct - TARGET_PATH TARGET_PATH share/visit_struct -) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) file(INSTALL ${SOURCE_PATH}/LICENSE diff --git a/ports/wangle/CONTROL b/ports/wangle/CONTROL index 6484356ba..2597d8afd 100644 --- a/ports/wangle/CONTROL +++ b/ports/wangle/CONTROL @@ -1,4 +1,4 @@ Source: wangle -Version: 2019.05.20.00 +Version: 2019.05.20.00-1 Build-Depends: fizz, folly, openssl, glog, libevent, double-conversion, boost-system, boost-thread, boost-filesystem, boost-regex, boost-context Description: Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way. diff --git a/ports/wangle/portfile.cmake b/ports/wangle/portfile.cmake index 44dc8f9f3..2ae73025a 100644 --- a/ports/wangle/portfile.cmake +++ b/ports/wangle/portfile.cmake @@ -5,7 +5,7 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/wangle - REF 19300a75c27759339c44cf06ecedf7ab00703e8b + REF 19300a75c27759339c44cf06ecedf7ab00703e8b SHA512 cc9a5a956862e9d4321df7c0394fbb877c5f0b0f8eae1da6aad88239a2cc0b4cd694bd25e0f70f3da8a24c34f4f035bcfb53919fd99634219e0816c78477cee2 HEAD_REF master PATCHES @@ -24,7 +24,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/wangle") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/wangle) file(READ ${CURRENT_PACKAGES_DIR}/share/wangle/wangle-targets.cmake _contents) STRING(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/\$<\$:debug/>lib/" _contents "${_contents}") @@ -33,7 +33,7 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/wangle/wangle-targets.cmake "${_content vcpkg_copy_pdbs() -file(REMOVE_RECURSE +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/wangle/util/test ${CURRENT_PACKAGES_DIR}/include/wangle/ssl/test/certs diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index 8fb8af205..bc39a7a64 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -41,9 +41,9 @@ vcpkg_configure_cmake( -DCMAKE_INSTALL_DIR=share ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/wt) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() # There is no way to suppress installation of the headers and resource files in debug build. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake index afd1b38bc..52e8b34fa 100644 --- a/ports/xalan-c/portfile.cmake +++ b/ports/xalan-c/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "Xalan-c's buildsystem uses very long paths and may fail on your system.\n" + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() diff --git a/ports/z3/CONTROL b/ports/z3/CONTROL index 861c3eab4..5a806da95 100644 --- a/ports/z3/CONTROL +++ b/ports/z3/CONTROL @@ -1,3 +1,3 @@ Source: z3 -Version: 4.8.5 +Version: 4.8.5-1 Description: An SMT solver diff --git a/ports/z3/portfile.cmake b/ports/z3/portfile.cmake index 72da20dd9..e3adeabb0 100644 --- a/ports/z3/portfile.cmake +++ b/ports/z3/portfile.cmake @@ -34,7 +34,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/z3 TARGET_PATH share/z3) +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/zopfli/CONTROL b/ports/zopfli/CONTROL index 8b7a02399..9db22d105 100644 --- a/ports/zopfli/CONTROL +++ b/ports/zopfli/CONTROL @@ -1,3 +1,3 @@ Source: zopfli -Version: 2019-01-19 +Version: 2019-01-19-1 Description: Zopfli Compression Algorithm compression library programmed in C diff --git a/ports/zopfli/portfile.cmake b/ports/zopfli/portfile.cmake index d19902027..bb5b9c211 100644 --- a/ports/zopfli/portfile.cmake +++ b/ports/zopfli/portfile.cmake @@ -19,7 +19,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -if (WIN32) +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(EXECUTABLE_SUFFIX ".exe") else() set(EXECUTABLE_SUFFIX "") diff --git a/ports/zserge-webview/CONTROL b/ports/zserge-webview/CONTROL index 558f47bd7..a595bee39 100644 --- a/ports/zserge-webview/CONTROL +++ b/ports/zserge-webview/CONTROL @@ -1,3 +1,3 @@ Source: zserge-webview -Version: 2019-04-27-1 +Version: 2019-04-27-2 Description: Tiny cross-platform webview library for C/C++/Golang. diff --git a/ports/zserge-webview/portfile.cmake b/ports/zserge-webview/portfile.cmake index d6707ee8b..7f0603d88 100644 --- a/ports/zserge-webview/portfile.cmake +++ b/ports/zserge-webview/portfile.cmake @@ -16,14 +16,12 @@ set(WEBVIEW_GTK "0") set(WEBVIEW_WINAPI "0") set(WEBVIEW_COCOA "0") -if(WIN32) +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(WEBVIEW_WINAPI "1") -elseif(UNIX) - if(APPLE) +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(WEBVIEW_COCOA "1") - else() +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") set(WEBVIEW_GTK "1") - endif() endif() file(READ ${CURRENT_PACKAGES_DIR}/include/webview.h _contents) diff --git a/ports/zxing-cpp/CONTROL b/ports/zxing-cpp/CONTROL index c51ccb60d..c97ad1734 100644 --- a/ports/zxing-cpp/CONTROL +++ b/ports/zxing-cpp/CONTROL @@ -1,4 +1,4 @@ Source: zxing-cpp -Version: 3.3.3-4 -Build-Depends: opencv[core] +Version: 3.3.3-5 +Build-Depends: opencv Description: Barcode detection and decoding library. diff --git a/ports/zxing-cpp/portfile.cmake b/ports/zxing-cpp/portfile.cmake index 1d063de7c..044342ed6 100644 --- a/ports/zxing-cpp/portfile.cmake +++ b/ports/zxing-cpp/portfile.cmake @@ -20,15 +20,15 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/zxing/cmake" TARGET_PATH share/zxing) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/zxing/cmake TARGET_PATH share/zxing) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/zxing-cpp) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/zxing-cpp) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) else() - file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing DESTINATION ${CURRENT_PACKAGES_DIR}/tools/zxing-cpp) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) endif() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/zxing-cpp) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) From edf3d75eb7050a8acaf41889d51bb976fa627410 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Thu, 20 Jun 2019 22:08:51 -0700 Subject: [PATCH 0034/1066] [netcdf-c] Fix link error. (#6971) * [netcdf-c] Fix linkage error. * remove unused code --- ports/netcdf-c/CONTROL | 2 +- ports/netcdf-c/hdf5_3.patch | 12 ++++++++++++ ports/netcdf-c/portfile.cmake | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 ports/netcdf-c/hdf5_3.patch diff --git a/ports/netcdf-c/CONTROL b/ports/netcdf-c/CONTROL index c82acf055..684c54ba6 100644 --- a/ports/netcdf-c/CONTROL +++ b/ports/netcdf-c/CONTROL @@ -1,5 +1,5 @@ Source: netcdf-c -Version: 4.7.0-2 +Version: 4.7.0-3 Build-Depends: hdf5, curl Homepage: https://github.com/Unidata/netcdf-c Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/ports/netcdf-c/hdf5_3.patch b/ports/netcdf-c/hdf5_3.patch new file mode 100644 index 000000000..ba9a168c8 --- /dev/null +++ b/ports/netcdf-c/hdf5_3.patch @@ -0,0 +1,12 @@ +diff --git a/libhdf5/CMakeLists.txt b/libhdf5/CMakeLists.txt +index f3c7bbc..34fc2ab 100644 +--- a/libhdf5/CMakeLists.txt ++++ b/libhdf5/CMakeLists.txt +@@ -20,3 +20,7 @@ add_library(netcdfhdf5 OBJECT ${libnchdf5_SOURCES}) + + # Remember to package this file for CMake builds. + ADD_EXTRA_DIST(${libnchdf5_SOURCES} CMakeLists.txt) ++ ++if(BUILD_SHARED_LIBS) ++target_link_libraries(netcdfhdf5 PRIVATE hdf5::hdf5-shared hdf5::hdf5-static hdf5::hdf5_hl-shared hdf5::hdf5_hl-static) ++endif() diff --git a/ports/netcdf-c/portfile.cmake b/ports/netcdf-c/portfile.cmake index a2f81cdb0..21b214524 100644 --- a/ports/netcdf-c/portfile.cmake +++ b/ports/netcdf-c/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_from_github( hdf5.patch hdf5_2.patch fix-build-error-on-linux.patch + hdf5_3.patch ) #Remove outdated find modules From 31184ac70d6b96e52eff60ee8eace9af2f24e2a2 Mon Sep 17 00:00:00 2001 From: Farwaykorse Date: Sat, 22 Jun 2019 06:26:10 +0200 Subject: [PATCH 0035/1066] Bump version to 2019.06.21 (#6987) --- toolsrc/VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index ce62ec959..c2116e0e8 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"2018.11.23" \ No newline at end of file +"2019.06.21" \ No newline at end of file From 9cfcc711469778370af64830086cc62afd523dfc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 21 Jun 2019 21:33:29 -0700 Subject: [PATCH 0036/1066] [docs] Add maintainer guidelines (#6871) * [maintainer-guide] Initial commit of maintainer guidelines * [maintainer-guide] Rearrange sections * [maintainer-guide] Add note about GitHub Draft PRs * [maintainer-guide] Improvements * [maintainer-guide] Address comments about versioning conventions * [maintainer-guide] Add section about how portfiles interact with CMakeLists.txt * [maintainer-guidelines] Add link from docs index --- docs/index.md | 1 + docs/maintainers/control-files.md | 17 ++- docs/maintainers/maintainer-guide.md | 178 +++++++++++++++++++++++++++ 3 files changed, 193 insertions(+), 3 deletions(-) create mode 100644 docs/maintainers/maintainer-guide.md diff --git a/docs/index.md b/docs/index.md index cde241e92..5d83b5804 100644 --- a/docs/index.md +++ b/docs/index.md @@ -19,6 +19,7 @@ Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This too - [Control files](maintainers/control-files.md) - [Portfile functions](maintainers/portfile-functions.md) +- [Maintainer Guidelines](maintainers/maintainer-guide.md) ### Specifications diff --git a/docs/maintainers/control-files.md b/docs/maintainers/control-files.md index ac4afa265..03bfa113a 100644 --- a/docs/maintainers/control-files.md +++ b/docs/maintainers/control-files.md @@ -43,16 +43,27 @@ The port version. This field is an alphanumeric string that may also contain `.`, `_`, or `-`. No attempt at ordering versions is made; all versions are treated as bit strings and are only evaluated for equality. -By convention, if a portfile is modified without incrementing the "upstream" version, a `-#` is appended to create a unique version string. +For tagged-release ports, we follow the following convention: -Some projects do not have named releases. In these cases use the date of the version do not have labeled releases, in these cases use the date of the last commit in `YYYY-MM-DD` format. See the `abseil` port as an example. +1. If the port follows a scheme like `va.b.c`, we remove the leading `v`. In this case, it becomes `a.b.c`. +2. If the port includes its own name in the version like `curl-7_65_1`, we remove the leading name: `7_65_1` +3. If the port has been modified, we append a `-N` to distinguish the versions: `1.2.1-4` + +For rolling-release ports, we use the date that the _commit was accessed by you_, formatted as `YYYY-MM-DD`. Stated another way: if someone had a time machine and went to that date, they would see this commit as the latest master. + +For example, given: +1. The latest commit was made on 2019-04-19 +2. The current version string is `2019-02-14-1` +3. Today's date is 2019-06-01. + +Then if you update the source version today, you should give it version `2019-06-01`. If you need to make a change which doesn't adjust the source version, you should give it version `2019-02-14-2`. Example: ```no-highlight Version: 1.0.5-2 ``` ```no-highlight -Version: 2019-3-21 +Version: 2019-03-21 ``` #### Description diff --git a/docs/maintainers/maintainer-guide.md b/docs/maintainers/maintainer-guide.md new file mode 100644 index 000000000..0baa45a02 --- /dev/null +++ b/docs/maintainers/maintainer-guide.md @@ -0,0 +1,178 @@ +# Maintainer Guidelines and Policies + +This document lists a set of policies that you should apply when adding or updating a port recipe. It is intended to serve the role of [Debian's Policy Manual](https://www.debian.org/doc/debian-policy/), [Homebrew's Maintainer Guidelines](https://docs.brew.sh/Maintainer-Guidelines), and [Homebrew's Formula Cookbook](https://docs.brew.sh/Formula-Cookbook). + +## PR Structure + +### Make separate Pull Requests per port + +Whenever possible, separate changes into multiple PR's. This makes them significantly easier to review and prevents issues with one set of changes from holding up every other change. + +### Avoid trivial changes in untouched files + +For example, avoid reformatting or renaming variables in portfiles that otherwise have no reason to be modified for the issue at hand. However, if you need to modify the file for the primary purpose of the PR (updating the library), then obviously beneficial changes like fixing typos are appreciated! + +### Check names against other repositories + +A good service to check many at once is [Repology](https://repology.org/). If the library you are adding could be confused with another one, consider renaming to make it clear. + +### Use GitHub Draft PRs + +GitHub Draft PRs are a great way to get CI or human feedback on work that isn't yet ready to merge. Most new PRs should be opened as drafts and converted to normal PRs once the CI passes. + +More information about GitHub Draft PRs: https://github.blog/2019-02-14-introducing-draft-pull-requests/ + +## Portfiles + +### Avoid deprecated helper functions + +At this time, the following helpers are deprecated: + +1. `vcpkg_extract_archive()` should be replaced by `vcpkg_extract_archive_ex()` +2. `vcpkg_apply_patches()` should be replaced by the `PATCHES` arguments to the "extract" helpers (e.g. `vcpkg_from_github()`) +3. `vcpkg_build_msbuild()` should be replaced by `vcpkg_install_msbuild()` + +### Avoid excessive comments in portfiles + +Ideally, portfiles should be short, simple, and as declarative as possible. Remove any helper comments introduced by the `create` command before submitting a PR. + +## Build Techniques + +### Do not use vendored dependencies + +Do not use embedded copies of libraries. All dependencies should be split out and packaged separately so they can be updated and maintained. + +### Prefer using CMake + +When multiple buildsystems are available, prefer using CMake. Additionally, when appropriate, it can be easier and more maintainable to rewrite alternative buildsystems into CMake using `file(GLOB)` directives. + +Examples: [abseil](../../ports/abseil/portfile.cmake) + +### Choose either static or shared binaries + +By default, `vcpkg_configure_cmake()` will pass in the appropriate setting for `BUILD_SHARED_LIBS`, however for libraries that don't respect that variable, you can switch on `VCPKG_LIBRARY_LINKAGE`: + +```cmake +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DKEYSTONE_BUILD_STATIC=${KEYSTONE_BUILD_STATIC} + -DKEYSTONE_BUILD_SHARED=${KEYSTONE_BUILD_SHARED} +) +``` + +### When defining features, explicitly control dependencies + +When defining a feature that captures an optional dependency, ensure that the dependency will not be used accidentally when the feature is not explicitly enabled. For example: + +```cmake +set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB ON) +if("zlib" IN_LIST FEATURES) + set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB} +) +``` + +Note that `ZLIB` in the above is case-sensitive. See the [cmake documentation](https://cmake.org/cmake/help/v3.15/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html) for more details. + +## Versioning + +### Follow common conventions for the `Version:` field + +See our [CONTROL files document](control-files.md#version) for a full explanation of our conventions. + +### Update the `Version:` field in the `CONTROL` file of any modified ports + +Vcpkg uses this field to determine whether a given port is out-of-date and should be changed whenever the port's behavior changes. + +Our convention for this field is to append a `-N` to the upstream version when changes need to be made. + +For Example: + +- Zlib's package version is currently `1.2.1`. +- You've discovered that the wrong copyright file has been deployed, and fixed that in the portfile. +- You should update the `Version:` field in the control file to `1.2.1-1`. + +See our [CONTROL files document](control-files.md#version) for a full explanation of our conventions. + +## Patching + +### Prefer options over patching + +It is preferable to set options in a call to `vcpkg_configure_xyz()` over patching the settings directly. + +Common options that allow avoiding patching: +1. [MSBUILD] `` settings inside the project file can be overridden via `/p:` parameters +2. [CMAKE] Calls to `find_package(XYz)` in CMake scripts can be disabled via [`-DCMAKE_DISABLE_FIND_PACKAGE_XYz=ON`](https://cmake.org/cmake/help/v3.15/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html) +3. [CMAKE] Cache variables (declared as `set(VAR "value" CACHE STRING "Documentation")` or `option(VAR "Documentation" "Default Value")`) can be overriden by just passing them in on the command line as `-DVAR:STRING=Foo`. One notable exception is if the `FORCE` parameter is passed to `set()`. See also the [CMake `set` documentation](https://cmake.org/cmake/help/v3.15/command/set.html) + +### Minimize patches + +When making changes to a library, strive to minimize the final diff. This means you should _not_ reformat the upstream source code when making changes that affect a region. Also, when disabling a conditional, it is better to add a `AND FALSE` or `&& 0` to the condition than to delete every line of the conditional. + +This helps to keep the size of the vcpkg repository down as well as improves the likelihood that the patch will apply to future code versions. + +### Do not implement features in patches + +The purpose of patching in vcpkg is to enable compatibility with compilers, libraries, and platforms. It is not to implement new features in lieu of following proper Open Source procedure (submitting an Issue/PR/etc). + +## Do not build tests/docs/examples by default + +When submitting a new port, check for any options like `BUILD_TESTS` or `WITH_TESTS` or `POCO_ENABLE_SAMPLES` and ensure the additional binaries are disabled. This minimizes build times and dependencies for the average user. + +Optionally, you can add a `test` feature which enables building the tests, however this should not be in the `Default-Features` list. + +## Enable existing users of the library to switch to vcpkg + +### Do not add `CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS` + +Unless the author of the library is already using it, we should not use this CMake functionality because it interacts poorly with C++ templates and breaks certain compiler features. Libraries that don't provide a .def file and do not use __declspec() declarations simply do not support shared builds for Windows and should be marked as such with `vcpkg_check_linkage(ONLY_STATIC_LIBRARY)`. + +### Do not rename binaries outside the names given by upstream + +This means that if the upstream library has different names in release and debug (libx versus libxd), then the debug library should not be renamed to `libx`. Vice versa, if the upstream library has the same name in release and debug, we should not introduce a new name. + +Important caveat: +- Static and shared variants often should be renamed to a common scheme. This enables consumers to use a common name and be ignorant of the downstream linkage. This is safe because we only make one at a time available. + +Note that if a library generates CMake integration files (`foo-config.cmake`), renaming must be done through patching the CMake build itself instead of simply calling `file(RENAME)` on the output archives/LIBs. + +Finally, DLL files on Windows should never be renamed post-build because it breaks the generated LIBs. + +## Useful implementation notes + +### Portfiles are run in Script Mode + +While `portfile.cmake`'s and `CMakeLists.txt`'s share a common syntax and core CMake language constructs, portfiles run in "Script Mode", whereas `CMakeLists.txt` files run in "Build Mode" (unofficial term). The most important difference between these two modes is that "Script Mode" does not have a concept of "Target" -- any behaviors that depend on the "target" machine (`CMAKE_CXX_COMPILER`, `CMAKE_EXECUTABLE_SUFFIX`, `CMAKE_SYSTEM_NAME`, etc) will not be correct. + +Portfiles have direct access to variables set in the triplet file, but `CMakeLists.txt`s do not (though there is often a translation that happens -- `VCPKG_LIBRARY_LINKAGE` versus `BUILD_SHARED_LIBS`). + +Finally, portfiles and CMake builds invoked by portfiles are run in different processes. Conceptually: + +```no-highlight ++----------------------------+ +------------------------------------+ +| CMake.exe | | CMake.exe | ++----------------------------+ +------------------------------------+ +| Triplet file | ====> | Toolchain file | +| (x64-windows.cmake) | | (scripts/buildsystems/vcpkg.cmake) | ++----------------------------+ +------------------------------------+ +| Portfile | ====> | CMakeLists.txt | +| (ports/foo/portfile.cmake) | | (buildtrees/../CMakeLists.txt) | ++----------------------------+ +------------------------------------+ +``` + +To determine the host in a portfile, the standard CMake variables are fine (`CMAKE_HOST_WIN32`). + +To determine the target in a portfile, the vcpkg triplet variables should be used (`VCPKG_CMAKE_SYSTEM_NAME`). + +See also our [triplet documentation](../users/triplets.md) for a full enumeration of possible settings. From d1b4e88d3c1bd714069f10009c6f9cef172cc822 Mon Sep 17 00:00:00 2001 From: Sean Yen Date: Fri, 21 Jun 2019 22:45:40 -0700 Subject: [PATCH 0037/1066] [libftdi-compat] Add new port (#6843) * [libftdi-compat] v0.20 port * Fixed wrong version number in CONTROL file. * Download source archive file instead. * restrict to shared library build only. * Remove dlls from static build. * [libftdi-compat] Update to 1.4. Replace CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS with a def file. Minimize patching. * [libftdi] Rename from libftdi-compat * [libftdi][libftdi1] Restore v0.20 as libftdi, move 1.4 to libftdi1 --- ports/libftdi/CONTROL | 4 ++ ports/libftdi/export-cmake.patch | 24 +++++++++++ ports/libftdi/exports.def | 56 ++++++++++++++++++++++++++ ports/libftdi/libusb-win32.patch | 43 ++++++++++++++++++++ ports/libftdi/portfile.cmake | 45 +++++++++++++++++++++ ports/libftdi/shared-static.patch | 52 ++++++++++++++++++++++++ ports/libftdi1/CONTROL | 4 ++ ports/libftdi1/cmake-fix.patch | 13 ++++++ ports/libftdi1/exports.def | 67 +++++++++++++++++++++++++++++++ ports/libftdi1/portfile.cmake | 47 ++++++++++++++++++++++ ports/libftdi1/win32.patch | 28 +++++++++++++ 11 files changed, 383 insertions(+) create mode 100644 ports/libftdi/CONTROL create mode 100644 ports/libftdi/export-cmake.patch create mode 100644 ports/libftdi/exports.def create mode 100644 ports/libftdi/libusb-win32.patch create mode 100644 ports/libftdi/portfile.cmake create mode 100644 ports/libftdi/shared-static.patch create mode 100644 ports/libftdi1/CONTROL create mode 100644 ports/libftdi1/cmake-fix.patch create mode 100644 ports/libftdi1/exports.def create mode 100644 ports/libftdi1/portfile.cmake create mode 100644 ports/libftdi1/win32.patch diff --git a/ports/libftdi/CONTROL b/ports/libftdi/CONTROL new file mode 100644 index 000000000..3c50a00e2 --- /dev/null +++ b/ports/libftdi/CONTROL @@ -0,0 +1,4 @@ +Source: libftdi +Version: 0.20 +Build-Depends: libusb-win32 +Description: FTDI USB driver with bitbang mode (v0.20) diff --git a/ports/libftdi/export-cmake.patch b/ports/libftdi/export-cmake.patch new file mode 100644 index 000000000..29078c25d --- /dev/null +++ b/ports/libftdi/export-cmake.patch @@ -0,0 +1,24 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 1c326fe..3c1d9ab 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -47,14 +47,19 @@ if(WIN32 OR 1) + + if(BUILD_SHARED_LIBS) + install( TARGETS ftdi ++ EXPORT ftdi + COMPONENT sharedlibs + ) + ++ target_link_libraries(ftdi PUBLIC $) + else() + install( TARGETS ftdi-static ++ EXPORT ftdi + COMPONENT staticlibs + ) ++ target_link_libraries(ftdi-static PUBLIC $) + endif() ++ install(EXPORT ftdi FILE libftdi-config.cmake NAMESPACE libftdi:: DESTINATION share/libftdi) + + install( FILES ${c_headers} + DESTINATION include diff --git a/ports/libftdi/exports.def b/ports/libftdi/exports.def new file mode 100644 index 000000000..31ebd214e --- /dev/null +++ b/ports/libftdi/exports.def @@ -0,0 +1,56 @@ +EXPORTS + ftdi_deinit + ftdi_disable_bitbang + ftdi_eeprom_build + ftdi_eeprom_decode + ftdi_eeprom_free + ftdi_eeprom_initdefaults + ftdi_eeprom_setsize + ftdi_enable_bitbang + ftdi_erase_eeprom + ftdi_free + ftdi_get_error_string + ftdi_get_latency_timer + ftdi_init + ftdi_list_free + ftdi_list_free2 + ftdi_new + ftdi_poll_modem_status + ftdi_read_chipid + ftdi_read_data + ftdi_read_data_get_chunksize + ftdi_read_data_set_chunksize + ftdi_read_eeprom + ftdi_read_eeprom_getsize + ftdi_read_eeprom_location + ftdi_read_pins + ftdi_set_baudrate + ftdi_set_bitmode + ftdi_set_error_char + ftdi_set_event_char + ftdi_set_interface + ftdi_set_latency_timer + ftdi_set_line_property + ftdi_set_line_property2 + ftdi_set_usbdev + ftdi_setdtr + ftdi_setdtr_rts + ftdi_setflowctrl + ftdi_setrts + ftdi_usb_close + ftdi_usb_find_all + ftdi_usb_get_strings + ftdi_usb_open + ftdi_usb_open_desc + ftdi_usb_open_desc_index + ftdi_usb_open_dev + ftdi_usb_open_string + ftdi_usb_purge_buffers + ftdi_usb_purge_rx_buffer + ftdi_usb_purge_tx_buffer + ftdi_usb_reset + ftdi_write_data + ftdi_write_data_get_chunksize + ftdi_write_data_set_chunksize + ftdi_write_eeprom + ftdi_write_eeprom_location diff --git a/ports/libftdi/libusb-win32.patch b/ports/libftdi/libusb-win32.patch new file mode 100644 index 000000000..55bc1c3f1 --- /dev/null +++ b/ports/libftdi/libusb-win32.patch @@ -0,0 +1,43 @@ +diff --git a/FindUSB.cmake b/FindUSB.cmake +index 566cdd8..0710345 100644 +--- a/FindUSB.cmake ++++ b/FindUSB.cmake +@@ -24,10 +24,10 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) + pkg_check_modules(PC_LIBUSB libusb) + ENDIF(NOT WIN32) + +- FIND_PATH(LIBUSB_INCLUDE_DIR usb.h ++ FIND_PATH(LIBUSB_INCLUDE_DIR lusb0_usb.h + PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) + +- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb ++ FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb0 libusb0 + PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) + + include(FindPackageHandleStandardArgs) +diff --git a/src/ftdi.c b/src/ftdi.c +index 980622d..8f6ab67 100644 +--- a/src/ftdi.c ++++ b/src/ftdi.c +@@ -28,7 +28,7 @@ + /** \addtogroup libftdi */ + /* @{ */ + +-#include ++#include + #include + #include + #include +diff --git a/src/ftdi.h b/src/ftdi.h +index 6bb7a3e..d4472c2 100644 +--- a/src/ftdi.h ++++ b/src/ftdi.h +@@ -17,7 +17,7 @@ + #ifndef __libftdi_h__ + #define __libftdi_h__ + +-#include ++#include + + #define FTDI_DEFAULT_EEPROM_SIZE 128 + diff --git a/ports/libftdi/portfile.cmake b/ports/libftdi/portfile.cmake new file mode 100644 index 000000000..29e5bc42d --- /dev/null +++ b/ports/libftdi/portfile.cmake @@ -0,0 +1,45 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.intra2net.com/en/developer/libftdi/download/libftdi-0.20.tar.gz" + FILENAME "libftdi-0.20.tar.gz" + SHA512 540e5eb201a65936c3dbabff70c251deba1615874b11ff27c5ca16c39d71c150cf61758a68b541135a444fe32ab403b0fba0daf55c587647aaf9b3f400f1dee7 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF 0.20 + PATCHES + libusb-win32.patch + shared-static.patch + export-cmake.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}/src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDOCUMENTATION=OFF + -DEXAMPLES=OFF + -DPYTHON_BINDINGS=OFF + -DFTDIPP=OFF + + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON + + -DLIBUSB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libftdi) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libftdi/LICENSE ${CURRENT_PACKAGES_DIR}/share/libftdi/copyright) + +vcpkg_copy_pdbs() diff --git a/ports/libftdi/shared-static.patch b/ports/libftdi/shared-static.patch new file mode 100644 index 000000000..dad7aa0c5 --- /dev/null +++ b/ports/libftdi/shared-static.patch @@ -0,0 +1,52 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 071ae90..b42bbcd 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -4,7 +4,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} + ) + + # Targets +-set(c_sources ftdi.c) ++set(c_sources ftdi.c exports.def) + set(c_headers ftdi.h) + + add_library(ftdi SHARED ${c_sources}) +@@ -24,7 +24,7 @@ set_target_properties(ftdi-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + target_link_libraries(ftdi ${LIBUSB_LIBRARIES}) + + # Install +-if(${UNIX}) ++if(UNIX AND 0) + + install( TARGETS ftdi + LIBRARY DESTINATION lib${LIB_SUFFIX} +@@ -41,23 +41,24 @@ if(${UNIX}) + COMPONENT headers + ) + +-endif(${UNIX}) ++endif() + +-if(${WIN32}) ++if(WIN32 OR 1) + ++ if(BUILD_SHARED_LIBS) + install( TARGETS ftdi +- DESTINATION bin + COMPONENT sharedlibs + ) + ++ else() + install( TARGETS ftdi-static +- DESTINATION bin + COMPONENT staticlibs + ) ++ endif() + + install( FILES ${c_headers} + DESTINATION include + COMPONENT headers + ) + +-endif(${WIN32}) ++endif() diff --git a/ports/libftdi1/CONTROL b/ports/libftdi1/CONTROL new file mode 100644 index 000000000..d282ad9eb --- /dev/null +++ b/ports/libftdi1/CONTROL @@ -0,0 +1,4 @@ +Source: libftdi1 +Version: 1.4 +Build-Depends: libusb +Description: FTDI USB driver with bitbang mode (v1.4) diff --git a/ports/libftdi1/cmake-fix.patch b/ports/libftdi1/cmake-fix.patch new file mode 100644 index 000000000..ea541f719 --- /dev/null +++ b/ports/libftdi1/cmake-fix.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindUSB1.cmake b/cmake/FindUSB1.cmake +index b90e297..6cc97a0 100644 +--- a/cmake/FindUSB1.cmake ++++ b/cmake/FindUSB1.cmake +@@ -26,7 +26,7 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) + PATH_SUFFIXES libusb-1.0 + PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) + +- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 ++ FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 libusb-1.0 + PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) + + include(FindPackageHandleStandardArgs) diff --git a/ports/libftdi1/exports.def b/ports/libftdi1/exports.def new file mode 100644 index 000000000..f5179c59d --- /dev/null +++ b/ports/libftdi1/exports.def @@ -0,0 +1,67 @@ +EXPORTS + convert_baudrate_UT_export + ftdi_deinit + ftdi_disable_bitbang + ftdi_eeprom_build + ftdi_eeprom_decode + ftdi_eeprom_get_strings + ftdi_eeprom_initdefaults + ftdi_eeprom_set_strings + ftdi_erase_eeprom + ftdi_free + ftdi_get_eeprom_buf + ftdi_get_eeprom_value + ftdi_get_error_string + ftdi_get_latency_timer + ftdi_get_library_version + ftdi_init + ftdi_list_free + ftdi_list_free2 + ftdi_new + ftdi_poll_modem_status + ftdi_read_chipid + ftdi_read_data + ftdi_read_data_get_chunksize + ftdi_read_data_set_chunksize + ftdi_read_data_submit + ftdi_read_eeprom + ftdi_read_eeprom_location + ftdi_read_pins + ftdi_set_baudrate + ftdi_set_bitmode + ftdi_set_eeprom_buf + ftdi_set_eeprom_user_data + ftdi_set_eeprom_value + ftdi_set_error_char + ftdi_set_event_char + ftdi_set_interface + ftdi_set_latency_timer + ftdi_set_line_property + ftdi_set_line_property2 + ftdi_set_usbdev + ftdi_setdtr + ftdi_setdtr_rts + ftdi_setflowctrl + ftdi_setrts + ftdi_transfer_data_cancel + ftdi_transfer_data_done + ftdi_usb_close + ftdi_usb_find_all + ftdi_usb_get_strings + ftdi_usb_get_strings2 + ftdi_usb_open + ftdi_usb_open_bus_addr + ftdi_usb_open_desc + ftdi_usb_open_desc_index + ftdi_usb_open_dev + ftdi_usb_open_string + ftdi_usb_purge_buffers + ftdi_usb_purge_rx_buffer + ftdi_usb_purge_tx_buffer + ftdi_usb_reset + ftdi_write_data + ftdi_write_data_get_chunksize + ftdi_write_data_set_chunksize + ftdi_write_data_submit + ftdi_write_eeprom + ftdi_write_eeprom_location diff --git a/ports/libftdi1/portfile.cmake b/ports/libftdi1/portfile.cmake new file mode 100644 index 000000000..4007e9122 --- /dev/null +++ b/ports/libftdi1/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.4.tar.bz2" + FILENAME "libftdi1-1.4.tar.bz2" + SHA512 dbab74f7bc35ca835b9c6dd5b70a64816948d65da1f73a9ece37a0f0f630bd0df1a676543acc517b02a718bc34ba4f7a30cbc48b6eed1c154c917f8ef0a358fc +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF 1.4 + PATCHES + cmake-fix.patch + win32.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}/src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DDOCUMENTATION=OFF + -DEXAMPLES=OFF + -DPYTHON_BINDINGS=OFF + -DLINK_PYTHON_LIBRARY=OFF + + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Confuse=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Libintl=ON + -DCMAKE_DISABLE_FIND_PACKAGE_PythonLibs=ON + -DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libftdi1 TARGET_PATH share/libftdi1) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libftdi1) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libftdi1/LICENSE ${CURRENT_PACKAGES_DIR}/share/libftdi1/copyright) + +vcpkg_copy_pdbs() diff --git a/ports/libftdi1/win32.patch b/ports/libftdi1/win32.patch new file mode 100644 index 000000000..8cf35c920 --- /dev/null +++ b/ports/libftdi1/win32.patch @@ -0,0 +1,28 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9fd86a6..e1e848c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -18,9 +18,14 @@ message(STATUS "Detected git snapshot version: ${SNAPSHOT_VERSION}") + configure_file(ftdi_version_i.h.in "${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h" @ONLY) + + # Targets ++if(WIN32) ++set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/exports.def CACHE INTERNAL "List of c sources" ) ++else() + set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/ftdi_stream.c CACHE INTERNAL "List of c sources" ) ++endif() + set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.h CACHE INTERNAL "List of c headers" ) + ++if(BUILD_SHARED_LIBS) + add_library(ftdi1 SHARED ${c_sources}) + + math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases +@@ -38,7 +43,7 @@ install ( TARGETS ftdi1 + ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) + +-if ( STATICLIBS ) ++else() + add_library(ftdi1-static STATIC ${c_sources}) + target_link_libraries(ftdi1-static ${LIBUSB_LIBRARIES}) + set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1") From f3db66b403840b24ea2612d09cca30a5285f5ea3 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Fri, 21 Jun 2019 23:50:05 -0700 Subject: [PATCH 0038/1066] Ports Overlay partial implementation (#6981) * Ports Overlay feature spec * Ports Overlay implementation * [--overlay-ports] Refactor handling of additional paths * Code cleanup * [--overlay-ports] Add help * [depend-info] Support --overlay-ports * Add method to load all ports using PathsPortFileProvider * Make PortFileProvider::load_all_control_files() const * Remove unused code * [vcpkg] Avoid double-load of source control file between Build::perform_and_exit and Build::perform_and_exit_ex * [vcpkg] Clang format * [vcpkg] Fixup build failure introduced in b069ceb2f231 * Report errors from Paragraphs::try_load_port() --- docs/specifications/ports-overlay.md | 178 ++++++++++++++++++ toolsrc/include/vcpkg/build.h | 2 +- toolsrc/include/vcpkg/dependencies.h | 27 +-- toolsrc/include/vcpkg/postbuildlint.h | 3 +- toolsrc/include/vcpkg/sourceparagraph.h | 9 + toolsrc/include/vcpkg/vcpkgcmdarguments.h | 16 +- toolsrc/include/vcpkg/vcpkgpaths.h | 2 - toolsrc/src/tests.plan.cpp | 8 +- toolsrc/src/tests.update.cpp | 16 +- toolsrc/src/vcpkg/build.cpp | 45 +++-- toolsrc/src/vcpkg/commands.autocomplete.cpp | 3 +- toolsrc/src/vcpkg/commands.buildexternal.cpp | 9 +- toolsrc/src/vcpkg/commands.ci.cpp | 21 ++- toolsrc/src/vcpkg/commands.dependinfo.cpp | 19 +- toolsrc/src/vcpkg/commands.edit.cpp | 1 + toolsrc/src/vcpkg/commands.search.cpp | 8 +- toolsrc/src/vcpkg/commands.upgrade.cpp | 9 +- toolsrc/src/vcpkg/dependencies.cpp | 170 ++++++++++++++--- toolsrc/src/vcpkg/export.cpp | 5 +- toolsrc/src/vcpkg/help.cpp | 4 +- toolsrc/src/vcpkg/install.cpp | 14 +- toolsrc/src/vcpkg/postbuildlint.cpp | 5 +- toolsrc/src/vcpkg/remove.cpp | 3 +- toolsrc/src/vcpkg/update.cpp | 8 +- toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 115 ++++++++++- toolsrc/src/vcpkg/vcpkgpaths.cpp | 3 - toolsrc/vcpkg/vcpkg.vcxproj | 4 +- toolsrc/vcpkglib/vcpkglib.vcxproj | 4 +- .../vcpkgmetricsuploader.vcxproj | 4 +- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 6 +- 30 files changed, 598 insertions(+), 123 deletions(-) create mode 100644 docs/specifications/ports-overlay.md diff --git a/docs/specifications/ports-overlay.md b/docs/specifications/ports-overlay.md new file mode 100644 index 000000000..e877f5010 --- /dev/null +++ b/docs/specifications/ports-overlay.md @@ -0,0 +1,178 @@ +# Ports Overlay (Jun 19, 2019) + + +## 1. Motivation + +### A. Allow users to override ports with alternate versions + +It's a common scenario for `vcpkg` users to keep specific versions of libraries to use in their own projects. The current recommendation for users is to fork `vcpkg`'s repository and create tags for commits containing the specific versions of the ports they want to use. + +This proposal adds an alternative to solve this problem. By allowing `vcpkg` users to specify additional locations in their file system containing ports for: + + * older or newer versions of libraries, + * modified libraries, or + * libraries not available in `vcpkg`. + +These locations will be searched when resolving port names during package installation, and override ports in `/ports`. + +### B. Allow users to keep unmodified upstream ports + +Users will be able to keep unmodified versions of the ports shipped with `vcpkg` and update them via `vcpkg update` and `vcpkg upgrade` without having to solve merge conflicts. + + +## 2. Other design concerns + +* Allow a set of `vcpkg` commands to optionally accept additional paths to be used when searching for ports. +* Additional paths must take precedence when resolving names of ports to install. +* Allow users to specify multiple additional paths. +* Provide a simple disambiguation mechanism to resolve ambiguous port names. +* After resolving a port name, the installation process has to work the same as for ports shipped by `vcpkg`. +* This **DOES NOT ENABLE MULTIPLE VERSIONS** of a same library to be **INSTALLED SIDE-BY-SIDE**. + + +## 3. Proposed solution + +This document proposes allowing additional locations to search for ports during package installation that will override and complement the set of ports provided by `vcpkg` (ports under the `/ports` directory).` + +A new option `--overlay-ports` will be added to the `vcpkg install`, `vcpkg update`, `vcpkg upgrade`, `vcpkg export`, and `vcpkg depend-info` commands to specify additional paths containing ports. + +From a user experience perspective, a user expresses interest in adding additional lookup locations by passing the `--overlay-ports` option followed by a path to: + +* an individual port (directory containing a `CONTROL` file), + * `vcpkg install sqlite3 --overlay-ports="C:\custom-ports\sqlite3"` + +* a directory containing ports, + * `vcpkg install sqlite3 --overlay-ports=\\share\org\custom-ports` + +* a file listing paths to the former two. + * `vcpkg install sqlite3 --overlay-ports=..\port-repos.txt` + + _port-repos.txt_ + + ``` + .\experimental-ports\sqlite3 + C:\custom-ports + \\share\team\custom-ports + \\share\org\custom-ports + ``` + *Relative paths inside this file are resolved relatively to the file's location. In this case a `experimental-ports` directory should exist at the same level as the `port-repos.txt` file.* + +_NOTE: It is not the goal of this document to discuss library versioning or project dependency management solutions, which require the ability to install multiple versions of a same library side-by-side._ + +### Multiple additional paths + +Users can provide multiple additional paths by repeating the `--overlay-ports` option. + +``` +vcpkg install sqlite3 + --overlay-ports="..\experimental-ports\sqlite3" + --overlay-ports="C:\custom-ports" + --overlay-ports="\\share\team\custom-ports +``` + +### Overlaying ports + +Port name resolution follows the order in which additional paths are specified, with the first match being selected for installation, and falling back to `/ports` if the port is not found in any of the additional paths. + +No effort is made to compare version numbers inside the `CONTROL` files, or to determine which port contains newer or older files. + +### Examples + +Given the following directory structure: + + ``` + team-ports/ + |-- sqlite3/ + |---- CONTROL + |-- rapidjson/ + |---- CONTROL + |-- curl/ + |---- CONTROL + + my-ports/ + |-- sqlite3/ + |---- CONTROL + |-- rapidjson/ + |---- CONTROL + + vcpkg + |-- ports/ + |---- + |-- vcpkg.exe + |-- preferred-ports.txt + ``` +* #### Example #1: + + Running: + + ``` + vcpkg/vcpkg.exe install sqlite3 --overlay-ports=my-ports --overlay-ports=team-ports + ``` + + Results in `my-ports/sqlite3` getting installed as that location appears first in the command line arguments. + +* #### Example #2: + + A specific version of a port can be given priority by adding its path first in the list of arguments: + + ``` + vcpkg/vcpkg.exe install sqlite3 rapidjson curl + --overlay-ports=my-ports/rapidjson + --overlay-ports=vcpkg/ports/curl + --overlay-ports=team-ports + ``` + + Installs: + * `sqlite3` from `team-ports/sqlite3` + * `rapidjson` from `my-ports/rapidjson` + * `curl` from `vcpkg/ports/curl` + +* #### Example #3: + + Given the content of `preferred-ports.txt` as: + + ``` + ./ports/curl + /my-ports/rapidjson + /team-ports + ``` + + A location can be appended or prepended to those included in `preferred-ports.txt` via the command line, like this: + + ``` + vcpkg/vcpkg.exe install sqlite3 curl --overlay-ports=my-ports --overlay-ports=vcpkg/preferred-ports.txt + ``` + + Which results in `my-ports/sqlite3` and `vcpkg/ports/curl` getting installed. + + +## 4. Proposed User experience + +### i. User wants to preserve an older version of a port + +Developer Alice and her team use `vcpkg` to acquire **OpenCV** and some other packages. She has even contributed many patches to add features to the **OpenCV 3** port in `vcpkg`. But, one day, she notices that a PR to update **OpenCV** to the next major version has been merged. + +Alice wants to update some packages available in `vcpkg`. Unfortunately, updating her project to use the latest **OpenCV** is not immediately possible. + +Alice creates a private GitHub repository and checks in the set of ports that she wants to preserve. Then provides her teammates with the link to clone her private ports repository. + +``` +mkdir vcpkg-custom-ports +cd vcpkg-custom-ports +git init +cp -r %VCPKG_ROOT%/ports/opencv . +git add . +git commit -m "[opencv] Add OpenCV 3 port" +git remote add origin https://github.com//vcpkg-custom-ports.git +git push -u origin master +``` + +Now her team is able to use: + +``` +git clone https://github.com//vcpkg-custom-ports.git +vcpkg update --overlay-ports=./vcpkg-custom-ports +vcpkg upgrade --no-dry-run --overlay-ports=./vcpkg-custom-ports +``` + +to upgrade their packages and preserve the old version of **OpenCV** they require. diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 9044cb556..04cd7cf87 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -20,7 +20,7 @@ namespace vcpkg::Build namespace Command { void perform_and_exit_ex(const FullPackageSpec& full_spec, - const fs::path& port_dir, + const SourceControlFileLocation& scfl, const ParsedArguments& options, const VcpkgPaths& paths); diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 16fdb3f73..8c2050b3d 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -48,7 +48,7 @@ namespace vcpkg::Dependencies const RequestType& request_type); InstallPlanAction(const PackageSpec& spec, - const SourceControlFile& scf, + const SourceControlFileLocation& scfl, const std::set& features, const RequestType& request_type, std::vector&& dependencies); @@ -57,7 +57,7 @@ namespace vcpkg::Dependencies PackageSpec spec; - Optional source_control_file; + Optional source_control_file_location; Optional installed_package; InstallPlanType plan_type; @@ -129,26 +129,31 @@ namespace vcpkg::Dependencies struct PortFileProvider { - virtual Optional get_control_file(const std::string& src_name) const = 0; + virtual Optional get_control_file(const std::string& src_name) const = 0; + virtual std::vector load_all_control_files() const = 0; }; struct MapPortFileProvider : Util::ResourceBase, PortFileProvider { - explicit MapPortFileProvider(const std::unordered_map& map); - Optional get_control_file(const std::string& src_name) const override; + explicit MapPortFileProvider(const std::unordered_map& map); + Optional get_control_file(const std::string& src_name) const override; + std::vector load_all_control_files() const override; private: - const std::unordered_map& ports; + const std::unordered_map& ports; }; struct PathsPortFileProvider : Util::ResourceBase, PortFileProvider { - explicit PathsPortFileProvider(const VcpkgPaths& paths); - Optional get_control_file(const std::string& src_name) const override; + explicit PathsPortFileProvider(const vcpkg::VcpkgPaths& paths, + const std::vector* ports_dirs_paths); + Optional get_control_file(const std::string& src_name) const override; + std::vector load_all_control_files() const override; private: - const VcpkgPaths& ports; - mutable std::unordered_map cache; + Files::Filesystem& filesystem; + std::vector ports_dirs; + mutable std::unordered_map cache; }; struct ClusterGraph; @@ -181,7 +186,7 @@ namespace vcpkg::Dependencies std::vector create_export_plan(const std::vector& specs, const StatusParagraphs& status_db); - std::vector create_feature_install_plan(const std::unordered_map& map, + std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db); diff --git a/toolsrc/include/vcpkg/postbuildlint.h b/toolsrc/include/vcpkg/postbuildlint.h index 5dcfeb8df..027619eb8 100644 --- a/toolsrc/include/vcpkg/postbuildlint.h +++ b/toolsrc/include/vcpkg/postbuildlint.h @@ -9,5 +9,6 @@ namespace vcpkg::PostBuildLint size_t perform_all_checks(const PackageSpec& spec, const VcpkgPaths& paths, const Build::PreBuildInfo& pre_build_info, - const Build::BuildInfo& build_info); + const Build::BuildInfo& build_info, + const fs::path& port_dir); } diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index d70fd4337..6232a3fd2 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -68,6 +68,15 @@ namespace vcpkg Optional find_feature(const std::string& featurename) const; }; + /// + /// Full metadata of a package: core and other features. As well as the location the SourceControlFile was loaded from. + /// + struct SourceControlFileLocation + { + std::unique_ptr source_control_file; + fs::path source_location; + }; + void print_error_message(Span> error_info_list); inline void print_error_message(const std::unique_ptr& error_info_list) { diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index de65eec28..cad013eb8 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -15,6 +15,7 @@ namespace vcpkg { std::unordered_set switches; std::unordered_map settings; + std::unordered_map> multisettings; }; struct VcpkgPaths; @@ -41,10 +42,22 @@ namespace vcpkg StringLiteral short_help_text; }; + struct CommandMultiSetting + { + constexpr CommandMultiSetting(const StringLiteral& name, const StringLiteral& short_help_text) + : name(name), short_help_text(short_help_text) + { + } + + StringLiteral name; + StringLiteral short_help_text; + }; + struct CommandOptionsStructure { Span switches; Span settings; + Span multisettings; }; struct CommandStructure @@ -74,6 +87,7 @@ namespace vcpkg std::unique_ptr vcpkg_root_dir; std::unique_ptr triplet; + std::unique_ptr> overlay_ports; Optional debug = nullopt; Optional sendmetrics = nullopt; Optional printmetrics = nullopt; @@ -88,6 +102,6 @@ namespace vcpkg ParsedArguments parse_arguments(const CommandStructure& command_structure) const; private: - std::unordered_map> optional_command_arguments; + std::unordered_map>> optional_command_arguments; }; } diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 42de40d9c..b09169b02 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -50,8 +50,6 @@ namespace vcpkg static Expected create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path); fs::path package_dir(const PackageSpec& spec) const; - fs::path port_dir(const PackageSpec& spec) const; - fs::path port_dir(const std::string& name) const; fs::path build_info_file_path(const PackageSpec& spec) const; fs::path listfile_path(const BinaryParagraph& pgh) const; diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 238aa7032..ab24266b4 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -47,7 +47,8 @@ namespace UnitTest1 Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); - Assert::AreEqual(pkg_name.c_str(), plan.source_control_file.get()->core_paragraph->name.c_str()); + auto* scfl = plan.source_control_file_location.get(); + Assert::AreEqual(pkg_name.c_str(), scfl->source_control_file->core_paragraph->name.c_str()); Assert::AreEqual(size_t(vec.size()), feature_list.size()); for (auto&& feature_name : vec) @@ -79,7 +80,7 @@ namespace UnitTest1 /// struct PackageSpecMap { - std::unordered_map map; + std::unordered_map map; Triplet triplet; PackageSpecMap(const Triplet& t = Triplet::X86_WINDOWS) noexcept { triplet = t; } @@ -94,7 +95,8 @@ namespace UnitTest1 { auto spec = PackageSpec::from_name_and_triplet(scf.core_paragraph->name, triplet); Assert::IsTrue(spec.has_value()); - map.emplace(scf.core_paragraph->name, std::move(scf)); + map.emplace(scf.core_paragraph->name, + SourceControlFileLocation{std::unique_ptr(std::move(&scf)), ""}); return PackageSpec{*spec.get()}; } }; diff --git a/toolsrc/src/tests.update.cpp b/toolsrc/src/tests.update.cpp index b6e487c17..5e3f9f3e2 100644 --- a/toolsrc/src/tests.update.cpp +++ b/toolsrc/src/tests.update.cpp @@ -21,9 +21,9 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::unordered_map map; + std::unordered_map map; auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); - map.emplace("a", std::move(*scf)); + map.emplace("a", SourceControlFileLocation { std::move(scf), "" }); Dependencies::MapPortFileProvider provider(map); auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), @@ -45,9 +45,9 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::unordered_map map; + std::unordered_map map; auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); - map.emplace("a", std::move(*scf)); + map.emplace("a", SourceControlFileLocation { std::move(scf), "" }); Dependencies::MapPortFileProvider provider(map); auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), @@ -71,9 +71,9 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::unordered_map map; + std::unordered_map map; auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); - map.emplace("a", std::move(*scf)); + map.emplace("a", SourceControlFileLocation{ std::move(scf), "" }); Dependencies::MapPortFileProvider provider(map); auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), @@ -92,9 +92,9 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::unordered_map map; + std::unordered_map map; auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "2"}}})); - map.emplace("a", std::move(*scf)); + map.emplace("a", SourceControlFileLocation{ std::move(scf), "" }); Dependencies::MapPortFileProvider provider(map); auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index daff7e6c8..059a09432 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -23,6 +23,7 @@ #include using vcpkg::Build::BuildResult; +using vcpkg::Dependencies::PathsPortFileProvider; using vcpkg::Parse::ParseControlErrorInfo; using vcpkg::Parse::ParseExpected; @@ -34,34 +35,26 @@ namespace vcpkg::Build::Command static constexpr StringLiteral OPTION_CHECKS_ONLY = "--checks-only"; void perform_and_exit_ex(const FullPackageSpec& full_spec, - const fs::path& port_dir, + const SourceControlFileLocation& scfl, const ParsedArguments& options, const VcpkgPaths& paths) { const PackageSpec& spec = full_spec.package_spec; + const auto& scf = *scfl.source_control_file; if (Util::Sets::contains(options.switches, OPTION_CHECKS_ONLY)) { const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, spec.triplet()); const auto build_info = Build::read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec)); - const size_t error_count = PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info); + const size_t error_count = + PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info, scfl.source_location); Checks::check_exit(VCPKG_LINE_INFO, error_count == 0); Checks::exit_success(VCPKG_LINE_INFO); } - const ParseExpected source_control_file = - Paragraphs::try_load_port(paths.get_filesystem(), port_dir); - - if (!source_control_file.has_value()) - { - print_error_message(source_control_file.error()); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - const auto& scf = source_control_file.value_or_exit(VCPKG_LINE_INFO); Checks::check_exit(VCPKG_LINE_INFO, - spec.name() == scf->core_paragraph->name, + spec.name() == scf.core_paragraph->name, "The Source field inside the CONTROL file does not match the port directory: '%s' != '%s'", - scf->core_paragraph->name, + scf.core_paragraph->name, spec.name()); const StatusParagraphs status_db = database_load_check(paths); @@ -80,7 +73,7 @@ namespace vcpkg::Build::Command features_as_set.emplace("core"); const Build::BuildPackageConfig build_config{ - *scf, spec.triplet(), fs::path{port_dir}, build_package_options, features_as_set}; + scf, spec.triplet(), fs::path(scfl.source_location), build_package_options, features_as_set}; const auto build_timer = Chrono::ElapsedTimer::create_started(); const auto result = Build::build_package(paths, build_config, status_db); @@ -128,10 +121,19 @@ namespace vcpkg::Build::Command // Build only takes a single package and all dependencies must already be installed const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); std::string first_arg = args.command_arguments.at(0); + const FullPackageSpec spec = Input::check_and_get_full_package_spec( std::move(first_arg), default_triplet, COMMAND_STRUCTURE.example_text); + Input::check_triplet(spec.package_spec.triplet(), paths); - perform_and_exit_ex(spec, paths.port_dir(spec.package_spec), options, paths); + + PathsPortFileProvider provider(paths, args.overlay_ports.get()); + const auto port_name = spec.package_spec.name(); + const auto* scfl = provider.get_control_file(port_name).get(); + + Checks::check_exit(VCPKG_LINE_INFO, scfl != nullptr, "Error: Couldn't find port '%s'", port_name); + + perform_and_exit_ex(spec, *scfl, options, paths); } } @@ -360,6 +362,12 @@ namespace vcpkg::Build auto& fs = paths.get_filesystem(); const Triplet& triplet = spec.triplet(); + if (!Strings::starts_with(Strings::ascii_to_lowercase(config.port_dir.u8string()), + Strings::ascii_to_lowercase(paths.ports.u8string()))) + { + System::printf("-- Installing port from location: %s\n", config.port_dir.u8string()); + } + #if !defined(_WIN32) // TODO: remove when vcpkg.exe is in charge for acquiring tools. Change introduced in vcpkg v0.0.107. // bootstrap should have already downloaded ninja, but making sure it is present in case it was deleted. @@ -428,7 +436,8 @@ namespace vcpkg::Build } const BuildInfo build_info = read_build_info(fs, paths.build_info_file_path(spec)); - const size_t error_count = PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info); + const size_t error_count = + PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info, config.port_dir); auto bcf = create_binary_control_file(*config.scf.core_paragraph, triplet, build_info, abi_tag); @@ -705,7 +714,7 @@ namespace vcpkg::Build } } - System::print2("Could not locate cached archive: ", archive_path.u8string(), "\n"); + System::printf("Could not locate cached archive: %s\n", archive_path.u8string()); ExtendedBuildResult result = do_build_package_and_clean_buildtrees( paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config); diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index afef518eb..3cf4dd98f 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -90,7 +90,8 @@ namespace vcpkg::Commands::Autocomplete const auto port_name = match[2].str(); const auto triplet_prefix = match[3].str(); - auto maybe_port = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(port_name)); + // TODO: Support autocomplete for ports in --overlay-ports + auto maybe_port = Paragraphs::try_load_port(paths.get_filesystem(), paths.ports / port_name); if (maybe_port.error()) { Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/commands.buildexternal.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp index 19b89c2f5..1c3c511c2 100644 --- a/toolsrc/src/vcpkg/commands.buildexternal.cpp +++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp @@ -23,7 +23,12 @@ namespace vcpkg::Commands::BuildExternal std::string(args.command_arguments.at(0)), default_triplet, COMMAND_STRUCTURE.example_text); Input::check_triplet(spec.package_spec.triplet(), paths); - const fs::path port_dir = args.command_arguments.at(1); - Build::Command::perform_and_exit_ex(spec, port_dir, options, paths); + auto overlays = args.overlay_ports ? *args.overlay_ports : std::vector(); + overlays.insert(overlays.begin(), args.command_arguments.at(1)); + Dependencies::PathsPortFileProvider provider(paths, &overlays); + auto maybe_scfl = provider.get_control_file(spec.package_spec.name()); + Checks::check_exit( + VCPKG_LINE_INFO, maybe_scfl.has_value(), "could not load control file for %s", spec.package_spec.name()); + Build::Command::perform_and_exit_ex(spec, maybe_scfl.value_or_exit(VCPKG_LINE_INFO), options, paths); } } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index de66d917b..8cab79504 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -232,12 +232,17 @@ namespace vcpkg::Commands::CI { // determine abi tag std::string abi; - if (auto scf = p->source_control_file.get()) + if (auto scfl = p->source_control_file_location.get()) { auto triplet = p->spec.triplet(); const Build::BuildPackageConfig build_config{ - *scf, triplet, paths.port_dir(p->spec), build_options, p->feature_list}; + *scfl->source_control_file, + triplet, + static_cast(scfl->source_location), + build_options, + p->feature_list + }; auto dependency_abis = Util::fmap(p->computed_dependencies, [&](const PackageSpec& spec) -> Build::AbiEntry { @@ -351,7 +356,8 @@ namespace vcpkg::Commands::CI } StatusParagraphs status_db = database_load_check(paths); - const auto& paths_port_file = Dependencies::PathsPortFileProvider(paths); + + Dependencies::PathsPortFileProvider provider(paths, args.overlay_ports.get()); const Build::BuildPackageOptions install_plan_options = { Build::UseHeadVersion::NO, @@ -369,7 +375,10 @@ namespace vcpkg::Commands::CI XunitTestResults xunitTestResults; - std::vector all_ports = Install::get_all_port_names(paths); + std::vector all_ports = + Util::fmap(provider.load_all_control_files(), [](auto&& scfl) -> std::string { + return scfl->source_control_file.get()->core_paragraph->name; + }); std::vector results; auto timer = Chrono::ElapsedTimer::create_started(); for (const Triplet& triplet : triplets) @@ -378,13 +387,13 @@ namespace vcpkg::Commands::CI xunitTestResults.push_collection(triplet.canonical_name()); - Dependencies::PackageGraph pgraph(paths_port_file, status_db); + Dependencies::PackageGraph pgraph(provider, status_db); std::vector specs = PackageSpec::to_package_specs(all_ports, triplet); // Install the default features for every package auto all_feature_specs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); auto split_specs = - find_unknown_ports_for_ci(paths, exclusions_set, paths_port_file, all_feature_specs, purge_tombstones); + find_unknown_ports_for_ci(paths, exclusions_set, provider, all_feature_specs, purge_tombstones); auto feature_specs = FullPackageSpec::to_feature_specs(split_specs->unknown); for (auto&& fspec : feature_specs) diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index 48a289fa5..c0800a4b5 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -6,6 +6,9 @@ #include #include #include +#include + +using vcpkg::Dependencies::PathsPortFileProvider; namespace vcpkg::Commands::DependInfo { @@ -35,7 +38,7 @@ namespace vcpkg::Commands::DependInfo return output; } - std::string create_dot_as_string(const std::vector>& source_control_files) + std::string create_dot_as_string(const std::vector& source_control_files) { int empty_node_count = 0; @@ -64,7 +67,7 @@ namespace vcpkg::Commands::DependInfo return s; } - std::string create_dgml_as_string(const std::vector>& source_control_files) + std::string create_dgml_as_string(const std::vector& source_control_files) { std::string s; s.append(""); @@ -109,7 +112,7 @@ namespace vcpkg::Commands::DependInfo } std::string create_graph_as_string(const std::unordered_set& switches, - const std::vector>& source_control_files) + const std::vector& source_control_files) { if (Util::Sets::contains(switches, OPTION_DOT)) { @@ -124,7 +127,7 @@ namespace vcpkg::Commands::DependInfo void build_dependencies_list(std::set& packages_to_keep, const std::string& requested_package, - const std::vector>& source_control_files, + const std::vector& source_control_files, const std::unordered_set& switches) { const auto source_control_file = @@ -154,7 +157,11 @@ namespace vcpkg::Commands::DependInfo { const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); - auto source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + // TODO: Optimize implementation, current implementation needs to load all ports from disk which is too slow. + PathsPortFileProvider provider(paths, args.overlay_ports.get()); + auto source_control_files = Util::fmap(provider.load_all_control_files(), [](auto&& scfl) -> const SourceControlFile * { + return scfl->source_control_file.get(); + }); if (args.command_arguments.size() >= 1) { @@ -178,7 +185,7 @@ namespace vcpkg::Commands::DependInfo for (auto&& source_control_file : source_control_files) { - const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; + const SourceParagraph& source_paragraph = *source_control_file->core_paragraph.get(); const auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); }); System::print2(source_paragraph.name, ": ", s, "\n"); } diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 98176b2b0..f2f0b1569 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -79,6 +79,7 @@ namespace vcpkg::Commands::Edit const auto& fs = paths.get_filesystem(); auto packages = fs.get_files_non_recursive(paths.packages); + // TODO: Support edit for --overlay-ports return Util::fmap(ports, [&](const std::string& port_name) -> std::string { const auto portpath = paths.ports / port_name; const auto portfile = portpath / "portfile.cmake"; diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index a0afd69e1..3d8387ee1 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -7,6 +7,9 @@ #include #include #include +#include + +using vcpkg::Dependencies::PathsPortFileProvider; namespace vcpkg::Commands::Search { @@ -63,7 +66,10 @@ namespace vcpkg::Commands::Search const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const bool full_description = Util::Sets::contains(options.switches, OPTION_FULLDESC); - auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + PathsPortFileProvider provider(paths, args.overlay_ports.get()); + auto source_paragraphs = Util::fmap(provider.load_all_control_files(), [](auto&& port) -> const SourceControlFile * { + return port->source_control_file.get(); + }); if (args.command_arguments.empty()) { diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp index 29815ca94..77183ceaf 100644 --- a/toolsrc/src/vcpkg/commands.upgrade.cpp +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -43,7 +43,8 @@ namespace vcpkg::Commands::Upgrade StatusParagraphs status_db = database_load_check(paths); - Dependencies::PathsPortFileProvider provider(paths); + // Load ports from ports dirs + Dependencies::PathsPortFileProvider provider(paths, args.overlay_ports.get()); Dependencies::PackageGraph graph(provider, status_db); // input sanitization @@ -85,12 +86,12 @@ namespace vcpkg::Commands::Upgrade not_installed.push_back(spec); } - auto maybe_scf = provider.get_control_file(spec.name()); - if (auto p_scf = maybe_scf.get()) + auto maybe_scfl = provider.get_control_file(spec.name()); + if (auto p_scfl = maybe_scfl.get()) { if (it != status_db.end()) { - if (p_scf->core_paragraph->version != (*it)->package.version) + if (p_scfl->source_control_file->core_paragraph->version != (*it)->package.version) { to_upgrade.push_back(spec); } diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index f4a05e7dc..df472515f 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -22,7 +22,7 @@ namespace vcpkg::Dependencies struct ClusterSource { - const SourceControlFile* scf = nullptr; + const SourceControlFileLocation* scfl = nullptr; std::unordered_map> build_edges; }; @@ -92,12 +92,12 @@ namespace vcpkg::Dependencies if (it == m_graph.end()) { // Load on-demand from m_provider - auto maybe_scf = m_provider.get_control_file(spec.name()); + auto maybe_scfl = m_provider.get_control_file(spec.name()); auto& clust = m_graph[spec]; clust.spec = spec; - if (auto p_scf = maybe_scf.get()) + if (auto p_scfl = maybe_scfl.get()) { - clust.source = cluster_from_scf(*p_scf, clust.spec.triplet()); + clust.source = cluster_from_scf(*p_scfl, clust.spec.triplet()); } return clust; } @@ -105,15 +105,17 @@ namespace vcpkg::Dependencies } private: - static ClusterSource cluster_from_scf(const SourceControlFile& scf, Triplet t) + static ClusterSource cluster_from_scf(const SourceControlFileLocation& scfl, Triplet t) { ClusterSource ret; - ret.build_edges.emplace("core", filter_dependencies_to_specs(scf.core_paragraph->depends, t)); + ret.build_edges.emplace("core", + filter_dependencies_to_specs(scfl.source_control_file->core_paragraph->depends, + t)); - for (const auto& feature : scf.feature_paragraphs) + for (const auto& feature : scfl.source_control_file->feature_paragraphs) ret.build_edges.emplace(feature->name, filter_dependencies_to_specs(feature->depends, t)); - ret.scf = &scf; + ret.scfl = &scfl; return ret; } @@ -151,12 +153,12 @@ namespace vcpkg::Dependencies } InstallPlanAction::InstallPlanAction(const PackageSpec& spec, - const SourceControlFile& scf, + const SourceControlFileLocation& scfl, const std::set& features, const RequestType& request_type, std::vector&& dependencies) : spec(spec) - , source_control_file(scf) + , source_control_file_location(scfl) , plan_type(InstallPlanType::BUILD_AND_INSTALL) , request_type(request_type) , build_options{} @@ -268,37 +270,145 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - MapPortFileProvider::MapPortFileProvider(const std::unordered_map& map) : ports(map) - { - } + MapPortFileProvider::MapPortFileProvider(const std::unordered_map& map) + : ports(map) + {} - Optional MapPortFileProvider::get_control_file(const std::string& spec) const + Optional MapPortFileProvider::get_control_file(const std::string& spec) const { auto scf = ports.find(spec); if (scf == ports.end()) return nullopt; return scf->second; } - PathsPortFileProvider::PathsPortFileProvider(const VcpkgPaths& paths) : ports(paths) {} + std::vector MapPortFileProvider::load_all_control_files() const + { + return Util::fmap(ports, [](auto&& kvpair) -> const SourceControlFileLocation * { return &kvpair.second; }); + } - Optional PathsPortFileProvider::get_control_file(const std::string& spec) const + PathsPortFileProvider::PathsPortFileProvider(const vcpkg::VcpkgPaths& paths, + const std::vector* ports_dirs_paths) + : filesystem(paths.get_filesystem()) + { + if (ports_dirs_paths) + { + for (auto&& overlay_path : *ports_dirs_paths) + { + if (!overlay_path.empty()) + { + auto overlay = fs::stdfs::canonical(fs::u8path(overlay_path)); + + Checks::check_exit(VCPKG_LINE_INFO, + filesystem.exists(overlay), + "Error: Path \"%s\" does not exist", + overlay.string()); + + Checks::check_exit(VCPKG_LINE_INFO, + fs::stdfs::is_directory(overlay), + "Error: Path \"%s\" must be a directory", + overlay.string()); + + ports_dirs.emplace_back(overlay); + } + } + } + ports_dirs.emplace_back(paths.ports); + } + + Optional PathsPortFileProvider::get_control_file(const std::string& spec) const { auto cache_it = cache.find(spec); if (cache_it != cache.end()) { return cache_it->second; } - Parse::ParseExpected source_control_file = - Paragraphs::try_load_port(ports.get_filesystem(), ports.port_dir(spec)); - if (auto scf = source_control_file.get()) + for (auto&& ports_dir : ports_dirs) { - auto it = cache.emplace(spec, std::move(*scf->get())); - return it.first->second; + // Try loading individual port + if (filesystem.exists(ports_dir / "CONTROL")) + { + auto maybe_scf = Paragraphs::try_load_port(filesystem, ports_dir); + if (auto scf = maybe_scf.get()) + { + if (scf->get()->core_paragraph->name == spec) + { + SourceControlFileLocation scfl{ std::move(*scf), ports_dir }; + auto it = cache.emplace(spec, std::move(scfl)); + return it.first->second; + } + } + else + { + vcpkg::print_error_message(maybe_scf.error()); + Checks::exit_with_message(VCPKG_LINE_INFO, + "Error: Failed to load port from %s", + spec, ports_dir.u8string()); + } + } + + auto found_scf = Paragraphs::try_load_port(filesystem, ports_dir / spec); + if (auto scf = found_scf.get()) + { + if (scf->get()->core_paragraph->name == spec) + { + SourceControlFileLocation scfl{ std::move(*scf), ports_dir / spec }; + auto it = cache.emplace(spec, std::move(scfl)); + return it.first->second; + } + } } + return nullopt; } + std::vector PathsPortFileProvider::load_all_control_files() const + { + // Reload cache with ports contained in all ports_dirs + cache.clear(); + std::vector ret; + for (auto&& ports_dir : ports_dirs) + { + // Try loading individual port + if (filesystem.exists(ports_dir / "CONTROL")) + { + auto maybe_scf = Paragraphs::try_load_port(filesystem, ports_dir); + if (auto scf = maybe_scf.get()) + { + auto port_name = scf->get()->core_paragraph->name; + if (cache.find(port_name) == cache.end()) + { + SourceControlFileLocation scfl{ std::move(*scf), ports_dir }; + auto it = cache.emplace(port_name, std::move(scfl)); + ret.emplace_back(&it.first->second); + } + } + else + { + vcpkg::print_error_message(maybe_scf.error()); + Checks::exit_with_message(VCPKG_LINE_INFO, + "Error: Failed to load port from %s", + ports_dir.u8string()); + } + continue; + } + + // Try loading all ports inside ports_dir + auto found_scf = Paragraphs::load_all_ports(filesystem, ports_dir); + for (auto&& scf : found_scf) + { + auto port_name = scf->core_paragraph->name; + if (cache.find(port_name) == cache.end()) + { + SourceControlFileLocation scfl{ std::move(scf), ports_dir / port_name }; + auto it = cache.emplace(port_name, std::move(scfl)); + ret.emplace_back(&it.first->second); + } + } + } + return ret; + } + std::vector create_remove_plan(const std::vector& specs, const StatusParagraphs& status_db) { @@ -495,10 +605,11 @@ namespace vcpkg::Dependencies VCPKG_LINE_INFO, "Error: Cannot find definition for package `%s`.", cluster.spec.name()); } + auto&& control_file = *p_source->scfl->source_control_file.get(); if (feature.empty()) { // Add default features for this package. This is an exact reference, so ignore prevent_default_features. - for (auto&& default_feature : p_source->scf->core_paragraph.get()->default_features) + for (auto&& default_feature : control_file.core_paragraph.get()->default_features) { auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features); if (res != MarkPlusResult::SUCCESS) @@ -513,7 +624,7 @@ namespace vcpkg::Dependencies if (feature == "*") { - for (auto&& fpgh : p_source->scf->feature_paragraphs) + for (auto&& fpgh : control_file.feature_paragraphs) { auto res = mark_plus(fpgh->name, cluster, graph, graph_plan, prevent_default_features); @@ -590,7 +701,8 @@ namespace vcpkg::Dependencies // Check if any default features have been added auto& previous_df = p_installed->ipv.core->package.default_features; - for (auto&& default_feature : p_source->scf->core_paragraph->default_features) + auto&& control_file = *p_source->scfl->source_control_file.get(); + for (auto&& default_feature : control_file.core_paragraph->default_features) { if (std::find(previous_df.begin(), previous_df.end(), default_feature) == previous_df.end()) { @@ -635,7 +747,7 @@ namespace vcpkg::Dependencies /// Map of all source control files in the current environment. /// Feature specifications to resolve dependencies for. /// Status of installed packages in the current environment. - std::vector create_feature_install_plan(const std::unordered_map& map, + std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db) { @@ -698,7 +810,11 @@ namespace vcpkg::Dependencies if (p_cluster->transient_uninstalled) { // If it will be transiently uninstalled, we need to issue a full installation command - auto pscf = p_cluster->source.value_or_exit(VCPKG_LINE_INFO).scf; + auto* pscfl = p_cluster->source.value_or_exit(VCPKG_LINE_INFO).scfl; + Checks::check_exit(VCPKG_LINE_INFO, + pscfl != nullptr, + "Error: Expected a SourceControlFileLocation to exist"); + auto&& scfl = *pscfl; auto dep_specs = Util::fmap(m_graph_plan->install_graph.adjacency_list(p_cluster), [](ClusterPtr const& p) { return p->spec; }); @@ -706,7 +822,7 @@ namespace vcpkg::Dependencies plan.emplace_back(InstallPlanAction{ p_cluster->spec, - *pscf, + scfl, p_cluster->to_install_features, p_cluster->request_type, std::move(dep_specs), diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 23fc7441a..88c1526c5 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -488,7 +488,10 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console // create the plan const StatusParagraphs status_db = database_load_check(paths); - Dependencies::PathsPortFileProvider provider(paths); + + // Load ports from ports dirs + Dependencies::PathsPortFileProvider provider(paths, args.overlay_ports.get()); + std::vector export_plan = Dependencies::create_export_plan(opts.specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !export_plan.empty(), "Export plan cannot be empty"); diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index b92e9ca59..6ee573dfc 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -111,10 +111,12 @@ namespace vcpkg::Help " vcpkg contact Display contact information to send feedback\n" "\n" "Options:\n" - " --triplet Specify the target architecture triplet.\n" + " --triplet Specify the target architecture triplet\n" " (default: " ENVVAR(VCPKG_DEFAULT_TRIPLET) // ", see 'vcpkg help triplet')\n" "\n" + " --overlay-ports= Specify directories to be used when searching for ports\n" + "\n" " --vcpkg-root Specify the vcpkg root " "directory\n" " (default: " ENVVAR(VCPKG_ROOT) // diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 88b15fe7a..781629236 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -330,9 +330,10 @@ namespace vcpkg::Install System::printf("Building package %s...\n", display_name_with_features); auto result = [&]() -> Build::ExtendedBuildResult { - const Build::BuildPackageConfig build_config{action.source_control_file.value_or_exit(VCPKG_LINE_INFO), + const auto& scfl = action.source_control_file_location.value_or_exit(VCPKG_LINE_INFO); + const Build::BuildPackageConfig build_config{*scfl.source_control_file, action.spec.triplet(), - paths.port_dir(action.spec), + static_cast(scfl.source_location), action.build_options, action.feature_list}; return Build::build_package(paths, build_config, status_db); @@ -652,13 +653,10 @@ namespace vcpkg::Install Build::FailOnTombstone::NO, }; - auto all_ports = Paragraphs::load_all_ports(fs, paths.ports); - std::unordered_map scf_map; - for (auto&& port : all_ports) - scf_map[port->core_paragraph->name] = std::move(*port); - MapPortFileProvider provider(scf_map); + //// Load ports from ports dirs + PathsPortFileProvider provider(paths, args.overlay_ports.get()); - // Note: action_plan will hold raw pointers to SourceControlFiles from this map + // Note: action_plan will hold raw pointers to SourceControlFileLocations from this map std::vector action_plan = create_feature_install_plan(provider, FullPackageSpec::to_feature_specs(specs), status_db); diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index d6581c2b4..c760a034f 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -857,14 +857,15 @@ namespace vcpkg::PostBuildLint size_t perform_all_checks(const PackageSpec& spec, const VcpkgPaths& paths, const PreBuildInfo& pre_build_info, - const BuildInfo& build_info) + const BuildInfo& build_info, + const fs::path& port_dir) { System::print2("-- Performing post-build validation\n"); const size_t error_count = perform_all_checks_and_return_error_count(spec, paths, pre_build_info, build_info); if (error_count != 0) { - const fs::path portfile = paths.ports / spec.name() / "portfile.cmake"; + const fs::path portfile = port_dir / "portfile.cmake"; System::print2(System::Color::error, "Found ", error_count, diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index f997667ac..a40b27bd7 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -229,7 +229,8 @@ namespace vcpkg::Remove Checks::exit_fail(VCPKG_LINE_INFO); } - Dependencies::PathsPortFileProvider provider(paths); + // Load ports from ports dirs + Dependencies::PathsPortFileProvider provider(paths, args.overlay_ports.get()); specs = Util::fmap(Update::find_outdated_packages(provider, status_db), [](auto&& outdated) { return outdated.spec; }); diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 2c52d5952..6320bae5b 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -23,10 +23,10 @@ namespace vcpkg::Update for (auto&& ipv : installed_packages) { const auto& pgh = ipv.core; - auto maybe_scf = provider.get_control_file(pgh->package.spec.name()); - if (auto p_scf = maybe_scf.get()) + auto maybe_scfl = provider.get_control_file(pgh->package.spec.name()); + if (auto p_scfl = maybe_scfl.get()) { - auto&& port_version = p_scf->core_paragraph->version; + auto&& port_version = p_scfl->source_control_file->core_paragraph->version; auto&& installed_version = pgh->package.version; if (installed_version != port_version) { @@ -57,7 +57,7 @@ namespace vcpkg::Update const StatusParagraphs status_db = database_load_check(paths); - Dependencies::PathsPortFileProvider provider(paths); + Dependencies::PathsPortFileProvider provider(paths, args.overlay_ports.get()); const auto outdated_packages = SortedVector(find_outdated_packages(provider, status_db), &OutdatedPackage::compare_by_name); diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 8565c28f9..21bf4d028 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -45,6 +45,45 @@ namespace vcpkg option_field = new_setting; } + static void parse_multivalue(const std::string* arg_begin, + const std::string* arg_end, + const std::string& option_name, + std::unique_ptr>& option_field) + { + if (arg_begin == arg_end) + { + System::print2(System::Color::error, "Error: expected value after ", option_name, '\n'); + Metrics::g_metrics.lock()->track_property("error", "error option name"); + Help::print_usage(); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + if (!option_field) + { + option_field = std::make_unique>(); + } + option_field->emplace_back(*arg_begin); + } + + static void parse_cojoined_multivalue(std::string new_value, + const std::string& option_name, + std::unique_ptr>& option_field) + { + if (new_value.empty()) + { + System::print2(System::Color::error, "Error: expected value after ", option_name, '\n'); + Metrics::g_metrics.lock()->track_property("error", "error option name"); + Help::print_usage(); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + if (!option_field) + { + option_field = std::make_unique>(); + } + option_field->emplace_back(std::move(new_value)); + } + VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const CommandLineCharType* const* const argv) { @@ -117,6 +156,13 @@ namespace vcpkg parse_value(arg_begin, arg_end, "--triplet", args.triplet); continue; } + if (Strings::starts_with(arg, "--overlay-ports=")) + { + parse_cojoined_multivalue(arg.substr(sizeof("--overlay-ports=") - 1), + "--overlay-ports", + args.overlay_ports); + continue; + } if (arg == "--debug") { parse_switch(true, "debug", args.debug); @@ -166,7 +212,21 @@ namespace vcpkg const auto eq_pos = arg.find('='); if (eq_pos != std::string::npos) { - args.optional_command_arguments.emplace(arg.substr(0, eq_pos), arg.substr(eq_pos + 1)); + const auto& key = arg.substr(0, eq_pos); + const auto& value = arg.substr(eq_pos + 1); + + auto it = args.optional_command_arguments.find(key); + if (args.optional_command_arguments.end() == it) + { + args.optional_command_arguments.emplace(key, std::vector { value }); + } + else + { + if (auto* maybe_values = it->second.get()) + { + maybe_values->emplace_back(value); + } + } } else { @@ -264,7 +324,51 @@ namespace vcpkg } else { - output.settings.emplace(option.name, it->second.value_or_exit(VCPKG_LINE_INFO)); + const auto& value = it->second.value_or_exit(VCPKG_LINE_INFO); + if (value.front().empty()) + { + // Fail when not given a value, e.g.: "vcpkg install sqlite3 --additional-ports=" + System::printf( + System::Color::error, "Error: The option '%s' must be passed an argument.\n", option.name); + failed = true; + } + else + { + output.settings.emplace(option.name, value.front()); + options_copy.erase(it); + } + } + } + } + + for (auto&& option : command_structure.options.multisettings) + { + const auto it = options_copy.find(option.name); + if (it != options_copy.end()) + { + if (!it->second.has_value()) + { + // Not having a string value indicates it was passed like '--a' + System::printf( + System::Color::error, "Error: The option '%s' must be passed an argument.\n", option.name); + failed = true; + } + else + { + const auto& value = it->second.value_or_exit(VCPKG_LINE_INFO); + for (auto&& v : value) + { + if (v.empty()) + { + System::printf( + System::Color::error, "Error: The option '%s' must be passed an argument.\n", option.name); + failed = true; + } + else + { + output.multisettings[option.name].emplace_back(v); + } + } options_copy.erase(it); } } @@ -306,7 +410,14 @@ namespace vcpkg { System::printf(" %-40s %s\n", (option.name + "=..."), option.short_help_text); } + for (auto&& option : command_structure.options.multisettings) + { + System::printf(" %-40s %s\n", (option.name + "=..."), option.short_help_text); + } System::printf(" %-40s %s\n", "--triplet ", "Set the default triplet for unqualified packages"); + System::printf(" %-40s %s\n", + "--overlay-ports=", + "Specify directories to be used when searching for ports"); System::printf(" %-40s %s\n", "--vcpkg-root ", "Specify the vcpkg directory to use instead of current directory or tool directory"); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 512bcfc35..562a18c9b 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -81,9 +81,6 @@ namespace vcpkg fs::path VcpkgPaths::package_dir(const PackageSpec& spec) const { return this->packages / spec.dir(); } - fs::path VcpkgPaths::port_dir(const PackageSpec& spec) const { return this->ports / spec.name(); } - fs::path VcpkgPaths::port_dir(const std::string& name) const { return this->ports / name; } - fs::path VcpkgPaths::build_info_file_path(const PackageSpec& spec) const { return this->package_dir(spec) / "BUILD_INFO"; diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj index 8edea2244..06d849a74 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj +++ b/toolsrc/vcpkg/vcpkg.vcxproj @@ -21,8 +21,8 @@ {34671B80-54F9-46F5-8310-AC429C11D4FB} vcpkg - 8.1 - v140 + 10.0 + v142 diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index a64eb42fd..2a6853b8a 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -21,8 +21,8 @@ {B98C92B7-2874-4537-9D46-D14E5C237F04} vcpkglib - 8.1 - v140 + 10.0 + v142 diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj index e533d0e15..2e689c7fc 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj @@ -21,8 +21,8 @@ {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE} vcpkgmetricsuploader - 8.1 - v140 + 10.0 + v142 diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index 4cda29461..a7517ec54 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -48,8 +48,8 @@ {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D} Win32Proj vcpkgtest - 8.1 - v140 + 10.0 + v142 @@ -84,7 +84,7 @@ - + $(SolutionDir)msbuild.x86.debug\$(ProjectName)\ $(SolutionDir)msbuild.x86.debug\ From 17b8cd9d0520ba5941d25de7e1373b62f7e53b5c Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Sat, 22 Jun 2019 23:30:45 -0700 Subject: [PATCH 0039/1066] [ppconsul] remove conflict with json11 (#6967) * [ppconsol] remove conflict with json11 --- ports/json11/CONTROL | 2 +- ports/json11/destination.patch | 14 ++++ ports/json11/json11-config.cmake | 25 ++++++++ ports/json11/portfile.cmake | 3 + ports/ppconsul/CONTROL | 4 +- ports/ppconsul/cmake_build.patch | 107 ++++++++++++++++++++----------- ports/ppconsul/portfile.cmake | 4 ++ 7 files changed, 119 insertions(+), 40 deletions(-) create mode 100644 ports/json11/destination.patch create mode 100644 ports/json11/json11-config.cmake diff --git a/ports/json11/CONTROL b/ports/json11/CONTROL index d624f9e7b..34cee37de 100644 --- a/ports/json11/CONTROL +++ b/ports/json11/CONTROL @@ -1,3 +1,3 @@ Source: json11 -Version: 2017-06-20-1 +Version: 2017-06-20-2 Description: json11 is a tiny JSON library for C++11, providing JSON parsing and serialization. diff --git a/ports/json11/destination.patch b/ports/json11/destination.patch new file mode 100644 index 000000000..6d1630329 --- /dev/null +++ b/ports/json11/destination.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 819c36f..847489e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,6 +52,6 @@ if (JSON11_BUILD_TESTS) + target_link_libraries(json11_test json11) + endif() + +-install(TARGETS json11 DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}) +-install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/json11.hpp" DESTINATION include/${CMAKE_LIBRARY_ARCHITECTURE}) +-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/json11.pc" DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig) ++install(TARGETS json11 DESTINATION lib) ++install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/json11.hpp" DESTINATION include) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/json11.pc" DESTINATION lib/pkgconfig) diff --git a/ports/json11/json11-config.cmake b/ports/json11/json11-config.cmake new file mode 100644 index 000000000..0bc3bb27c --- /dev/null +++ b/ports/json11/json11-config.cmake @@ -0,0 +1,25 @@ +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +if(NOT JSON11_FIND_COMPONENTS) + set(JSON11_FIND_COMPONENTS json11 json11) + if(JSON11_FIND_REQUIRED) + set(JSON11_FIND_REQUIRED_json11 TRUE) + endif() + + set(JSON11_FOUND TRUE) +endif() + +set(JSON11_INCLUDE_DIRS ${_DIR}/../../include) +set(JSON11_LIBRARIES) +if (EXISTS ${_DIR}/../../lib/libjson11.a) + list(APPEND JSON11_LIBRARIES optimized ${_DIR}/../../lib/libjson11.a) +endif() +if (EXISTS ${_DIR}/../../debug/lib/libjson11.a) + list(APPEND JSON11_LIBRARIES debug ${_DIR}/../../debug/lib/libjson11.a) +endif() +if (EXISTS ${_DIR}/../../lib/json11.lib) + list(APPEND JSON11_LIBRARIES optimized ${_DIR}/../../lib/json11.lib) +endif() +if (EXISTS ${_DIR}/../../debug/lib/json11.lib) + list(APPEND JSON11_LIBRARIES debug ${_DIR}/../../debug/lib/json11.lib) +endif() diff --git a/ports/json11/portfile.cmake b/ports/json11/portfile.cmake index f6592693a..a3c2b9cab 100644 --- a/ports/json11/portfile.cmake +++ b/ports/json11/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( REF ec4e45219af1d7cde3d58b49ed762376fccf1ace SHA512 2129e048d8dee027dc1ba789d9901e017b7d698465e15236802ef68639161e1cc7c8665d5f50079333801717fd41ffbe2cb90fa2165b9a85629e8ced8f2b3cd8 HEAD_REF master + PATCHES destination.patch ) vcpkg_configure_cmake( @@ -20,6 +21,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +file(INSTALL ${CURRENT_PORT_DIR}/json11-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/json11) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright diff --git a/ports/ppconsul/CONTROL b/ports/ppconsul/CONTROL index 4591b6a01..cc122ecf6 100644 --- a/ports/ppconsul/CONTROL +++ b/ports/ppconsul/CONTROL @@ -1,5 +1,5 @@ Source: ppconsul -Version: 0.3 +Version: 0.3-1 Homepage: https://github.com/oliora/ppconsul Description: A C++ client library for Consul. Consul is a distributed tool for discovering and configuring services in your infrastructure. -Build-Depends: boost-core, boost-variant, curl[openssl] +Build-Depends: boost-core, boost-variant, curl[openssl], json11 diff --git a/ports/ppconsul/cmake_build.patch b/ports/ppconsul/cmake_build.patch index f607e37e4..95c795743 100644 --- a/ports/ppconsul/cmake_build.patch +++ b/ports/ppconsul/cmake_build.patch @@ -1,37 +1,70 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 92e4698..002981e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -75,6 +75,8 @@ else () - set (CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${CURL_ROOT}/lib") - endif () - find_package(CURL REQUIRED) -+ find_package(OpenSSL REQUIRED) -+ find_package(ZLIB REQUIRED) - endif () - - set(LIBB64_DIR "${PROJECT_SOURCE_DIR}/ext/b64") -@@ -89,7 +91,6 @@ endif() - - add_subdirectory(ext/json11) - add_subdirectory(src) --add_subdirectory(tests) - - install( - DIRECTORY "${HEADERS_DIR}" -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 8e24aab..beaac68 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -85,7 +85,10 @@ if (${USE_CPPNETLIB}) - target_link_libraries(${PROJECT_NAME} PRIVATE ${CPPNETLIB_LIBRARIES}) - else () - target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIR}) -- target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES}) -+ target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ZLIB::ZLIB) -+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") -+ target_link_libraries(${PROJECT_NAME} PRIVATE "-framework CoreFoundation" "-framework Security") -+ endif () - endif () - - source_group(${PROJECT_NAME} FILES ${SOURCES}) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92e4698..aa643aa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,6 +52,8 @@ endif() + + enable_testing() + ++find_package(json11 REQUIRED) ++ + if (${USE_CPPNETLIB}) + find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS thread filesystem system date_time chrono regex) + +@@ -75,6 +77,8 @@ else () + set (CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${CURL_ROOT}/lib") + endif () + find_package(CURL REQUIRED) ++ find_package(OpenSSL REQUIRED) ++ find_package(ZLIB REQUIRED) + endif () + + set(LIBB64_DIR "${PROJECT_SOURCE_DIR}/ext/b64") +@@ -87,9 +91,7 @@ if (WIN32 AND NOT BUILD_STATIC_LIB) + message(FATAL_ERROR "Building Ppconsul as dynamic library on Windows is not supported, see https://github.com/oliora/ppconsul/issues/25") + endif() + +-add_subdirectory(ext/json11) + add_subdirectory(src) +-add_subdirectory(tests) + + install( + DIRECTORY "${HEADERS_DIR}" +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d747100..966c7e2 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -78,7 +78,7 @@ target_include_directories(${PROJECT_NAME} + + target_link_libraries(${PROJECT_NAME} + PRIVATE +- json11 ++ ${JSON11_LIBRARIES} + ${Boost_LIBRARIES} + ) + +@@ -87,7 +87,10 @@ if (${USE_CPPNETLIB}) + target_link_libraries(${PROJECT_NAME} PRIVATE ${CPPNETLIB_LIBRARIES}) + else () + target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIR}) +- target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES}) ++ target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ZLIB::ZLIB) ++ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ++ target_link_libraries(${PROJECT_NAME} PRIVATE "-framework CoreFoundation" "-framework Security") ++ endif () + endif () + + source_group(${PROJECT_NAME} FILES ${SOURCES}) +diff --git a/src/s11n.h b/src/s11n.h +index 962a1ac..6ab7f3b 100644 +--- a/src/s11n.h ++++ b/src/s11n.h +@@ -6,7 +6,7 @@ + + #include "ppconsul/config.h" + #include "ppconsul/error.h" +-#include ++#include + #include + #include + #include diff --git a/ports/ppconsul/portfile.cmake b/ports/ppconsul/portfile.cmake index 43e7eaeca..a1290019f 100644 --- a/ports/ppconsul/portfile.cmake +++ b/ports/ppconsul/portfile.cmake @@ -9,6 +9,10 @@ vcpkg_from_github( PATCHES "cmake_build.patch" ) +# Force the use of the vcpkg installed versions +file(REMOVE_RECURSE ${SOURCE_PATH}/ext/json11) +file(REMOVE_RECURSE ${SOURCE_PATH}/ext/catch) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA From 25f628e05f8f6a838b68ad25cc52a4ee221bd8ec Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Tue, 25 Jun 2019 01:46:37 +0800 Subject: [PATCH 0040/1066] [flann]Upgrade version to 1.9.1 and fix build error. (#6931) * [flann]Upgrade version to 1.9.1 and fix build error. * [flann]apply new patches. * [flann]Regenerate patches. * [flann]Combine all patches. --- ports/flann/CONTROL | 2 +- ...ix_targets.patch => fix-build-error.patch} | 109 ++++++------------ ports/flann/portfile.cmake | 7 +- 3 files changed, 41 insertions(+), 77 deletions(-) rename ports/flann/{fix_targets.patch => fix-build-error.patch} (71%) diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index fd8ecebc1..c2aba2e18 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,5 +1,5 @@ Source: flann -Version: jan2019 +Version: 1.9.1 Homepage: https://github.com/mariusmuja/flann Build-Depends: lz4 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/fix_targets.patch b/ports/flann/fix-build-error.patch similarity index 71% rename from ports/flann/fix_targets.patch rename to ports/flann/fix-build-error.patch index b9ebe7cb7..f4867cba9 100644 --- a/ports/flann/fix_targets.patch +++ b/ports/flann/fix-build-error.patch @@ -1,19 +1,19 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index f4b94d2..e55195b 100644 +index f4b94d2..7ff331a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -146,9 +146,6 @@ if (BUILD_CUDA_LIB) +@@ -146,8 +146,7 @@ if (BUILD_CUDA_LIB) endif(CUDA_FOUND) endif(BUILD_CUDA_LIB) -find_package(PkgConfig REQUIRED) -pkg_check_modules(LZ4 REQUIRED liblz4) -- ++find_package(lz4 REQUIRED) + #set the C/C++ include path to the "include" directory include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src/cpp) - diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in -index 6b95a71..2c95b6e 100644 +index 6b95a71..778aec4 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -3,3 +3,5 @@ @@ -22,8 +22,9 @@ index 6b95a71..2c95b6e 100644 +include(CMakeFindDependencyMacro) +find_dependency(lz4) +\ No newline at end of file diff --git a/cmake/flann_utils.cmake b/cmake/flann_utils.cmake -index afe4742..0cf8289 100644 +index afe4742..8aef8e0 100644 --- a/cmake/flann_utils.cmake +++ b/cmake/flann_utils.cmake @@ -1,8 +1,7 @@ @@ -37,26 +38,8 @@ index afe4742..0cf8289 100644 endmacro(GET_OS_INFO) -@@ -27,7 +26,7 @@ macro(find_hdf5) - set( HDF5_IS_PARALLEL FALSE ) - foreach( _dir ${HDF5_INCLUDE_DIRS} ) - if( EXISTS "${_dir}/H5pubconf.h" ) -- file( STRINGS "${_dir}/H5pubconf.h" -+ file( STRINGS "${_dir}/H5pubconf.h" - HDF5_HAVE_PARALLEL_DEFINE - REGEX "HAVE_PARALLEL 1" ) - if( HDF5_HAVE_PARALLEL_DEFINE ) -@@ -106,7 +105,7 @@ endmacro(flann_add_pyunit) - - macro(flann_download_test_data _name _md5) - string(REPLACE "/" "_" _dataset_name dataset_${_name}) -- -+ - add_custom_target(${_dataset_name} - COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/bin/download_checkmd5.py http://people.cs.ubc.ca/~mariusm/uploads/FLANN/datasets/${_name} ${TEST_OUTPUT_PATH}/${_name} ${_md5} - VERBATIM) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 3f4655a..918b94a 100644 +index 3f4655a..bc1d758 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,9 +1,10 @@ @@ -89,19 +72,19 @@ index 3f4655a..918b94a 100644 target_link_libraries(flann_example_mpi flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES}) add_dependencies(examples flann_example_mpi) -@@ -36,7 +37,3 @@ if (HDF5_FOUND) - else() - message("hdf5 library not found, not compiling flann_example.cpp") - endif() -- -- -- -- diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt -index b30f3da..1535d37 100644 +index b421abb..78f9a64 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt -@@ -8,12 +8,13 @@ file(GLOB_RECURSE C_SOURCES flann.cpp) +@@ -1,6 +1,6 @@ + #include_directories(${CMAKE_SOURCE_DIR}/include algorithms ext util nn .) + +-add_definitions(-D_FLANN_VERSION=${FLANN_VERSION}) ++add_definitions(-D_FLANN_VERSION=${FLANN_VERSION} -std=c++11) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h) + +@@ -8,12 +8,11 @@ file(GLOB_RECURSE C_SOURCES flann.cpp) file(GLOB_RECURSE CPP_SOURCES flann_cpp.cpp) file(GLOB_RECURSE CU_SOURCES *.cu) @@ -112,16 +95,14 @@ index b30f3da..1535d37 100644 -endif() -set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC FLANN_USE_CUDA) +find_package(lz4 REQUIRED) -+ +set(CMAKE_POSITION_INDEPENDENT_CODE ON) -+ +add_library(flann_cpp STATIC ${CPP_SOURCES}) +target_link_libraries(flann_cpp PRIVATE lz4::lz4) +set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) if (BUILD_CUDA_LIB) SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-DFLANN_USE_CUDA") -@@ -25,48 +26,11 @@ if (BUILD_CUDA_LIB) +@@ -25,45 +24,9 @@ if (BUILD_CUDA_LIB) else() set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};" ) endif() @@ -169,46 +150,27 @@ index b30f3da..1535d37 100644 + set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) endif() -- - if (USE_MPI AND HDF5_IS_PARALLEL) - add_executable(flann_mpi_server flann/mpi/flann_mpi_server.cpp) - target_link_libraries(flann_mpi_server flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES}) -@@ -80,31 +44,9 @@ endif() + +@@ -80,6 +43,7 @@ endif() if (BUILD_C_BINDINGS) -- add_library(flann_s STATIC ${C_SOURCES}) -- target_link_libraries(flann_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) -- if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) -- set_target_properties(flann_s PROPERTIES COMPILE_FLAGS -fPIC) -- endif() -- set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) -- -- if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) -- add_library(flann SHARED "") -- set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) -- target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) -- else() -- add_library(flann SHARED ${C_SOURCES}) -- target_link_libraries(flann_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) -- -- if(MINGW AND OPENMP_FOUND) -- target_link_libraries(flann gomp) -- endif() -- endif() -- -- set_target_properties(flann PROPERTIES -- VERSION ${FLANN_VERSION} -- SOVERSION ${FLANN_SOVERSION} -- DEFINE_SYMBOL FLANN_EXPORTS -- ) ++ if (0) + add_library(flann_s STATIC ${C_SOURCES}) + target_link_libraries(flann_s -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) + if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) +@@ -105,6 +69,10 @@ if (BUILD_C_BINDINGS) + SOVERSION ${FLANN_SOVERSION} + DEFINE_SYMBOL FLANN_EXPORTS + ) ++ endif() + add_library(flann STATIC ${C_SOURCES}) + target_link_libraries(flann PRIVATE lz4::lz4) + set_property(TARGET flann PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) endif() if(WIN32) -@@ -118,9 +60,9 @@ endif(WIN32) +@@ -118,9 +86,9 @@ endif(WIN32) install ( @@ -220,7 +182,7 @@ index b30f3da..1535d37 100644 RUNTIME DESTINATION bin LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} -@@ -128,9 +70,9 @@ install ( +@@ -128,9 +96,9 @@ install ( if (BUILD_CUDA_LIB) install ( @@ -232,12 +194,15 @@ index b30f3da..1535d37 100644 RUNTIME DESTINATION bin LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} -@@ -139,7 +81,7 @@ endif() +@@ -139,9 +107,9 @@ endif() if (BUILD_C_BINDINGS) install ( - TARGETS flann flann_s + TARGETS flann EXPORT ${targets_export_name} - INCLUDES DESTINATION include +- INCLUDES DESTINATION include ++ INCLUDES DESTINATION ${FLANN_INCLUDE_INSTALL_DIR} RUNTIME DESTINATION bin + LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index 17770bd29..baf79035a 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -7,11 +7,10 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mariusmuja/flann - REF aa40936816f4feaa714d3a09f92a495da017d95c - SHA512 f6f2e75f4ce4bc4bc4cc1feab27fe683b8a5f9f5dcea35de4df5136a683b5dff5e68776008821a16ccf1a52a9807cb053c0062deba4fe121948248acd52864ef + REF 1d04523268c388dabf1c0865d69e1b638c8c7d9d + SHA512 61e322222c2daa0b9677095e5ca231cba7c305ce754ad8e659eee350111c1e04351181c3af04e45ab6e5c9edea49c7b9ec6499bb0dbc080b87af36eb11c6ef7c HEAD_REF master - PATCHES - fix_targets.patch + PATCHES fix-build-error.patch ) vcpkg_configure_cmake( From 4f675eafb64afc103f7cb1dc14cbfe07a65559ec Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Tue, 25 Jun 2019 02:38:10 +0800 Subject: [PATCH 0041/1066] [libtins]Upgrade version to 4.2 and adds dependent ports to new version. (#7008) --- ports/libtins/CONTROL | 4 ++-- ports/libtins/portfile.cmake | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ports/libtins/CONTROL b/ports/libtins/CONTROL index 4bd5d3755..11cb86ea8 100644 --- a/ports/libtins/CONTROL +++ b/ports/libtins/CONTROL @@ -1,4 +1,4 @@ Source: libtins -Version: 4.0-3 +Version: 4.2 Description: High-level, multiplatform C++ network packet sniffing and crafting library -Build-Depends: winpcap (windows) +Build-Depends: winpcap (windows), boost-icl, boost-any diff --git a/ports/libtins/portfile.cmake b/ports/libtins/portfile.cmake index 1839d118c..dabd283d0 100644 --- a/ports/libtins/portfile.cmake +++ b/ports/libtins/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mfontanini/libtins - REF v4.0 - SHA512 8a497617ca68f4bad331452778b92c51ce87e42d1ceae493ecd6799cabbe71609214ca962c4a8c83d205f76277f2a82f92d3d17341984caa1592cf237eb3cf3b + REF v4.2 + SHA512 46d07712604c780e418135c996f195046fd85a9e1411962c9bcee3c8d0fc64f494aa50164236ffd1e77ff8a398e9617bbf040b3e01a5771c5621c0faa1ce312f HEAD_REF master ) @@ -25,12 +25,16 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") #Windows + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() #Linux/Unix/Darwin + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libtins) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtins/copyright COPYONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtins RENAME copyright) # Post-build test for cmake libraries vcpkg_test_cmake(PACKAGE_NAME libtins) From 9e565e986789cf273de12fe1b07ce31800d10417 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Mon, 24 Jun 2019 12:09:48 -0700 Subject: [PATCH 0042/1066] [--overlay-ports] Show location of overriden ports during install plan (#7002) * [--overlay-ports] Show source location of overlayed ports during install plan * Code cleanup * Code cleanup --- toolsrc/include/vcpkg/dependencies.h | 4 ++- toolsrc/src/vcpkg/commands.ci.cpp | 2 +- toolsrc/src/vcpkg/commands.upgrade.cpp | 2 +- toolsrc/src/vcpkg/dependencies.cpp | 40 ++++++++++++++++++++++---- toolsrc/src/vcpkg/install.cpp | 2 +- 5 files changed, 41 insertions(+), 9 deletions(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 8c2050b3d..964158026 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -199,5 +199,7 @@ namespace vcpkg::Dependencies const StatusParagraphs& status_db, const CreateInstallPlanOptions& options = {}); - void print_plan(const std::vector& action_plan, const bool is_recursive = true); + void print_plan(const std::vector& action_plan, + const bool is_recursive = true, + const fs::path& default_ports_dir = ""); } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 8cab79504..c12c26ff7 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -451,7 +451,7 @@ namespace vcpkg::Commands::CI if (is_dry_run) { - Dependencies::print_plan(action_plan); + Dependencies::print_plan(action_plan, true, paths.ports); } else { diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp index 77183ceaf..1e64b2eb6 100644 --- a/toolsrc/src/vcpkg/commands.upgrade.cpp +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -171,7 +171,7 @@ namespace vcpkg::Commands::Upgrade } } - Dependencies::print_plan(plan, true); + Dependencies::print_plan(plan, true, paths.ports); if (!no_dry_run) { diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index df472515f..b604c9acf 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -123,6 +123,27 @@ namespace vcpkg::Dependencies const PortFileProvider& m_provider; }; + std::string to_output_string(RequestType request_type, + const CStringView s, + const Build::BuildPackageOptions& options, + const fs::path& install_port_path, + const fs::path& default_port_path) + { + if (!default_port_path.empty() + && !Strings::case_insensitive_ascii_starts_with(install_port_path.u8string(), + default_port_path.u8string())) + { + const char* const from_head = options.use_head_version == Build::UseHeadVersion::YES ? " (from HEAD)" : ""; + switch (request_type) + { + case RequestType::AUTO_SELECTED: return Strings::format(" * %s%s -- %s", s, from_head, install_port_path.u8string()); + case RequestType::USER_REQUESTED: return Strings::format(" %s%s -- %s", s, from_head, install_port_path.u8string()); + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + return to_output_string(request_type, s, options); + } + std::string to_output_string(RequestType request_type, const CStringView s, const Build::BuildPackageOptions& options) @@ -131,7 +152,7 @@ namespace vcpkg::Dependencies switch (request_type) { - case RequestType::AUTO_SELECTED: return Strings::format(" * %s%s", s, from_head); + case RequestType::AUTO_SELECTED: return Strings::format(" * %s%s", s, from_head); case RequestType::USER_REQUESTED: return Strings::format(" %s%s", s, from_head); default: Checks::unreachable(VCPKG_LINE_INFO); } @@ -141,7 +162,7 @@ namespace vcpkg::Dependencies { switch (request_type) { - case RequestType::AUTO_SELECTED: return Strings::format(" * %s", s); + case RequestType::AUTO_SELECTED: return Strings::format(" * %s", s); case RequestType::USER_REQUESTED: return Strings::format(" %s", s); default: Checks::unreachable(VCPKG_LINE_INFO); } @@ -893,7 +914,7 @@ namespace vcpkg::Dependencies PackageGraph::~PackageGraph() = default; - void print_plan(const std::vector& action_plan, const bool is_recursive) + void print_plan(const std::vector& action_plan, const bool is_recursive, const fs::path& default_ports_dir) { std::vector remove_plans; std::vector rebuilt_plans; @@ -948,8 +969,17 @@ namespace vcpkg::Dependencies std::sort(already_installed_plans.begin(), already_installed_plans.end(), &InstallPlanAction::compare_by_name); std::sort(excluded.begin(), excluded.end(), &InstallPlanAction::compare_by_name); - static auto actions_to_output_string = [](const std::vector& v) { - return Strings::join("\n", v, [](const InstallPlanAction* p) { + static auto actions_to_output_string = [&](const std::vector& v) { + return Strings::join("\n", v, [&](const InstallPlanAction* p) { + if (auto * pscfl = p->source_control_file_location.get()) + { + return to_output_string(p->request_type, + p->displayname(), + p->build_options, + pscfl->source_location, + default_ports_dir); + } + return to_output_string(p->request_type, p->displayname(), p->build_options); }); }; diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 781629236..de19c360a 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -684,7 +684,7 @@ namespace vcpkg::Install Metrics::g_metrics.lock()->track_property("installplan", specs_string); - Dependencies::print_plan(action_plan, is_recursive); + Dependencies::print_plan(action_plan, is_recursive, paths.ports); if (dry_run) { From 92a86a1e54359edaf17eadf5784078d671304fb6 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 25 Jun 2019 04:23:55 +0800 Subject: [PATCH 0043/1066] [sprout] Add new port (#6997) --- ports/sprout/CONTROL | 5 +++++ ports/sprout/portfile.cmake | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ports/sprout/CONTROL create mode 100644 ports/sprout/portfile.cmake diff --git a/ports/sprout/CONTROL b/ports/sprout/CONTROL new file mode 100644 index 000000000..67240a5e1 --- /dev/null +++ b/ports/sprout/CONTROL @@ -0,0 +1,5 @@ +Source: sprout +Version: 2019-06-20 +Homepage: https://github.com/bolero-MURAKAMI/Sprout +Description: C++11/14 constexpr based Containers, Algorithms, Random numbers, Parsing, Ray tracing, Synthesizer, and others +Build-Depends: boost-array, boost-mpl diff --git a/ports/sprout/portfile.cmake b/ports/sprout/portfile.cmake new file mode 100644 index 000000000..7be1c1985 --- /dev/null +++ b/ports/sprout/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bolero-MURAKAMI/Sprout + REF 6b5addba9face0a6403e66e7db2aa94d87387f61 + SHA512 b81c299842c48626a7fbedb5b70932623ddb128bd5c71115269253b2c82a331d4f5d5adeab24529be2c886d293de96c15c9641280b4eb31bd60379b284556900 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/sprout DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) From bc08706eecf6a4c2174b737ffe7d1b8bae596752 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 25 Jun 2019 04:36:41 +0800 Subject: [PATCH 0044/1066] [doctest] Update to 2.3.3 (#6998) --- ports/doctest/CONTROL | 2 +- ports/doctest/portfile.cmake | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index e623f8b85..135b8a4d8 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,4 +1,4 @@ Source: doctest -Version: 2.3.2 +Version: 2.3.3 Homepage: https://github.com/onqtam/doctest Description: The fastest feature-rich C++ single-header testing framework for unit tests and TDD diff --git a/ports/doctest/portfile.cmake b/ports/doctest/portfile.cmake index dbb94990e..7c9c4bfed 100644 --- a/ports/doctest/portfile.cmake +++ b/ports/doctest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO onqtam/doctest - REF 2.3.2 - SHA512 316c804d04c51e38ee54edb321c3f6c11e8b45d542add865e930a36430bb2b768c4302ec85a7470d2df7952981432ec4c1da662be46021eff0fa377f5cea85ba + REF 2.3.3 + SHA512 9ef94de93906f3c43918f232b3baa64756fdaee883afc5b2e785e76b108f1aa0d526a49dac58ffb0475ebfd8d8394ef266aec499c29282eea9a2752fb60b663f HEAD_REF master ) @@ -21,3 +21,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/doctest) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/doctest/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) From aefbaa1ba9c7b44af0c91c89018ae3f65f3e73ab Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Tue, 25 Jun 2019 00:22:57 +0200 Subject: [PATCH 0045/1066] [darknet] update to latest release (#6787) * [darknet] update to latest release * [darknet] Reduce patch size * update to latest release, does not require any patch :) --- ports/darknet/CONTROL | 4 ++-- ports/darknet/fix_cmakelists.patch | 22 ---------------------- ports/darknet/portfile.cmake | 10 ++++++---- 3 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 ports/darknet/fix_cmakelists.patch diff --git a/ports/darknet/CONTROL b/ports/darknet/CONTROL index 88b4cdb7b..393503485 100644 --- a/ports/darknet/CONTROL +++ b/ports/darknet/CONTROL @@ -1,5 +1,5 @@ Source: darknet -Version: 0.2.5-1 +Version: 0.2.5-3 Description: Darknet is an open source neural network framework written in C and CUDA. You only look once (YOLO) is a state-of-the-art, real-time object detection system, best example of darknet functionalities. Build-Depends: pthreads (windows), stb Default-Features: weights @@ -16,5 +16,5 @@ Feature: weights Description: Download common weights from official websites, using vcpkg proxy-enabled functions Feature: opencv-cuda -Build-Depends: opencv[ffmpeg],opencv[cuda] +Build-Depends: opencv[ffmpeg], opencv[cuda] Description: Build darknet with support for a CUDA-enabled OpenCV diff --git a/ports/darknet/fix_cmakelists.patch b/ports/darknet/fix_cmakelists.patch deleted file mode 100644 index 68451de45..000000000 --- a/ports/darknet/fix_cmakelists.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 585eb0e..7515d98 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -28,8 +28,7 @@ enable_language(CXX) - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH}) - --set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Install prefix" FORCE) --set(INSTALL_BIN_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Path where exe and dll will be installed") -+set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") - set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") - set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed") - set(INSTALL_CMAKE_DIR "share/darknet" CACHE PATH "Path where cmake configs will be installed") -@@ -88,7 +87,6 @@ if(USE_INTEGRATED_LIBS) - set(PThreads_windows_DIR ${CMAKE_CURRENT_LIST_DIR}/3rdparty/pthreads CACHE PATH "Path where pthreads for windows can be located") - add_definitions(-D_TIMESPEC_DEFINED) - endif() --set(Stb_DIR ${CMAKE_CURRENT_LIST_DIR}/3rdparty/stb CACHE PATH "Path where Stb image library can be located") - - set(CMAKE_DEBUG_POSTFIX d) - add_definitions(-DUSE_CMAKE_LIBS) diff --git a/ports/darknet/portfile.cmake b/ports/darknet/portfile.cmake index 986bdb03d..3733420ad 100644 --- a/ports/darknet/portfile.cmake +++ b/ports/darknet/portfile.cmake @@ -11,11 +11,9 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO AlexeyAB/darknet - REF 8c970498a296ed129ffef7d872ccc25d42d1afda - SHA512 70dda24656469b8a61a645533ac227b644d365c7d5f4dbc93077a3f46563dd45ae88c563fb1c8f8d02a2021760aba24bea35d81f0f307975d051d0f9bfe92265 + REF a1abd07e23fc5b143a6197de9908fe4f33791c6a + SHA512 df91bf595666a4db5beb5cc55f6c60be19667ab987a784faef04cf2215317c9a340cfc0a200640741fcc88c29cff077d5153b86ff497c31ad5ad132f05987516 HEAD_REF master - PATCHES - fix_cmakelists.patch ) set(ENABLE_CUDA OFF) @@ -61,7 +59,11 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE #since darknet configures a file inside source tree, it is better to disable parallel configure + #PREFER_NINJA #it does not work with cuda on windows https://gitlab.kitware.com/cmake/cmake/issues/19173 OPTIONS + -DINSTALL_BIN_DIR:STRING=bin + -DINSTALL_LIB_DIR:STRING=lib -DENABLE_CUDA=${ENABLE_CUDA} -DENABLE_OPENCV=${ENABLE_OPENCV} ) From ecc4b1631f7e3252a8b84ab7564c83ecda8a6763 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Mon, 24 Jun 2019 15:38:04 -0700 Subject: [PATCH 0046/1066] [ixwebsocket] add new port (#6835) * Add ixwebsocket * remove commented cmake directives * add dependencies * directive to remove share folder * try again with 4.0.3 which is using find_library for external code instead of vendoring it by default * use vcpkg feature flag to detect ssl backend + compile ws * do not build ws command line tool * add a feature for osx / control file closer to curl one * stop using features, as this makes CI unhappy * Revert "stop using features, as this makes CI unhappy" This reverts commit 4666b185671a9e37de5252334965fd63c060aea0. * play again with Build-Depends to fix error which appears to be only on uwp * call vcpkg_from_github instead * share folder not created --- ports/ixwebsocket/CONTROL | 21 +++++++++++++++++++++ ports/ixwebsocket/portfile.cmake | 24 ++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 ports/ixwebsocket/CONTROL create mode 100644 ports/ixwebsocket/portfile.cmake diff --git a/ports/ixwebsocket/CONTROL b/ports/ixwebsocket/CONTROL new file mode 100644 index 000000000..98b64cd28 --- /dev/null +++ b/ports/ixwebsocket/CONTROL @@ -0,0 +1,21 @@ +Source: ixwebsocket +Version: 4.0.3 +Build-Depends: zlib +Description: Lightweight WebSocket Client and Server + HTTP Client +Default-Features: ssl + +Feature: ssl +Build-Depends: ixwebsocket[openssl] (!uwp&!windows&!osx), ixwebsocket[mbedtls] (windows), ixwebsocket[mbedtls] (uwp), ixwebsocket[sectransp] (osx) +Description: Default SSL backend + +# SSL backends +Feature: openssl +Build-Depends: openssl +Description: SSL support (OpenSSL) + +Feature: mbedtls +Build-Depends: mbedtls +Description: SSL support (mbedTLS) + +Feature: sectransp +Description: SSL support (sectransp) diff --git a/ports/ixwebsocket/portfile.cmake b/ports/ixwebsocket/portfile.cmake new file mode 100644 index 000000000..b4beeed9b --- /dev/null +++ b/ports/ixwebsocket/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO machinezone/IXWebSocket + REF v4.0.3 + SHA512 41cda81ef28ae2a51d77bf09158f4c07350f22b17ed4b6645a87c7defd2a901b7656de260bc785c42990ddbea0ab23ad6e099694d2712537de0ca328aee8e229 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DUSE_TLS=1 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ixwebsocket RENAME copyright) + +# Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME ixwebsocket) From 54b3be6b60466370d37edbe64fb6c6ede8487f04 Mon Sep 17 00:00:00 2001 From: tarcila Date: Tue, 25 Jun 2019 02:21:30 -0400 Subject: [PATCH 0047/1066] [scripts] Fix vcpkg_fixup_cmake on non Windows platforms (#5630) * [scripts] Fix vcpkg_fixup_cmake on non Windows platforms Script was only handling tools executables ending with .exe. Changed it so anything under /bin/ in transformed. This fixes for instance FlatcTargets-release.cmake from flatbuffers port on osx. --- ports/grpc/portfile.cmake | 17 +++-------------- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 14 +++++++++++--- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index b71a55420..2dca1c34c 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -63,7 +63,7 @@ vcpkg_configure_cmake( -DgRPC_GFLAGS_PROVIDER=none -DgRPC_BENCHMARK_PROVIDER=none -DgRPC_INSTALL_CSHARP_EXT=OFF - -DgRPC_INSTALL_BINDIR:STRING=bin + -DgRPC_INSTALL_BINDIR:STRING=tools/grpc -DgRPC_INSTALL_LIBDIR:STRING=lib -DgRPC_INSTALL_INCLUDEDIR:STRING=include -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc @@ -76,22 +76,11 @@ vcpkg_fixup_cmake_targets() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright) -# Install tools -file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") -if(TOOLS) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/grpc) - file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc) -endif() - -file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe" "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -if(EXES) - file(REMOVE ${EXES}) -endif() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools") # Ignore the C# extension DLL in bin/ SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -## diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 982f414b6..1e0f2493d 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -4,7 +4,8 @@ # Transform all /debug/share//*targets-debug.cmake files and move them to /share/. # Removes all /debug/share//*targets.cmake and /debug/share//*config.cmake # -# Transform all references matching /bin/*.exe to /tools//*.exe +# Transform all references matching /bin/*.exe to /tools//*.exe on Windows +# Transform all references matching /bin/* to /tools//* on other platforms # # Fix ${_IMPORT_PREFIX} in auto generated targets to be one folder deeper. # Replace ${CURRENT_INSTALLED_DIR} with ${_IMPORT_PREFIX} in configs/targets. @@ -27,6 +28,13 @@ function(vcpkg_fixup_cmake_targets) set(_vfct_TARGET_PATH share/${PORT}) endif() + + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(EXECUTABLE_SUFFIX "\\.exe") + else() + set(EXECUTABLE_SUFFIX) + endif() + set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/${_vfct_TARGET_PATH}) set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH}) @@ -107,7 +115,7 @@ function(vcpkg_fixup_cmake_targets) foreach(RELEASE_TARGET IN LISTS RELEASE_TARGETS) file(READ ${RELEASE_TARGET} _contents) string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") - string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") file(WRITE ${RELEASE_TARGET} "${_contents}") endforeach() @@ -120,7 +128,7 @@ function(vcpkg_fixup_cmake_targets) file(READ ${DEBUG_TARGET} _contents) string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") - string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") file(WRITE ${RELEASE_SHARE}/${DEBUG_TARGET_REL} "${_contents}") From 40a78054f50ed5eb5bf24cd9a522b48b62725f34 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Tue, 25 Jun 2019 10:55:24 -0700 Subject: [PATCH 0048/1066] [cnl] Update cnl to latest(#7031) --- ports/cnl/CONTROL | 2 +- ports/cnl/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/cnl/CONTROL b/ports/cnl/CONTROL index 7aa93f60e..8daea5ae6 100644 --- a/ports/cnl/CONTROL +++ b/ports/cnl/CONTROL @@ -1,3 +1,3 @@ Source: cnl -Version: 2019-01-09 +Version: 2019-06-23 Description: A Compositional Numeric Library for C++ diff --git a/ports/cnl/portfile.cmake b/ports/cnl/portfile.cmake index 0eb23e1c9..885cad137 100644 --- a/ports/cnl/portfile.cmake +++ b/ports/cnl/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO johnmcfarlane/cnl - REF 9f632898a4738b9e41de90e66d4f6ddb84bda08b - SHA512 ffde0b5aa58e79b5a03eee588c0e43d17ab2ddb2ffb12508f9d1b0e05aa54bb6c653986f183ce339e73c562efd749af6bd3907d816c9f79bf48f1e84ded3ac13 + REF 48428242e72b8239cb14c963e40f724929d54df7 + SHA512 c7e012d99409977137a44915dd7a4df5014b6e8540ceee3e82492052541ce77a254d79e624d766b510e7d3a6b17a9d9b02391c6993ae55d3904334116e747983 HEAD_REF develop ) From 6a6d350d49e6a3bee55d7f644b43e57ccfc9f98a Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Wed, 26 Jun 2019 01:56:21 +0800 Subject: [PATCH 0049/1066] [armadillo] Fix build error in Linux (#7022) [armadillo] Fix installation path --- ports/armadillo/CONTROL | 2 +- ports/armadillo/portfile.cmake | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/armadillo/CONTROL b/ports/armadillo/CONTROL index 5baafdfdf..78f0a66c3 100644 --- a/ports/armadillo/CONTROL +++ b/ports/armadillo/CONTROL @@ -1,4 +1,4 @@ Source: armadillo -Version: 2019-04-16-2 +Version: 2019-04-16-3 Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use Build-Depends: openblas (!osx), clapack (!osx) diff --git a/ports/armadillo/portfile.cmake b/ports/armadillo/portfile.cmake index 437f174dd..143591de6 100644 --- a/ports/armadillo/portfile.cmake +++ b/ports/armadillo/portfile.cmake @@ -25,11 +25,12 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/armadillo/CMake) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/Armadillo/CMake) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Armadillo) file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/armadillo RENAME copyright) From 14d1575e0b1e77d2308891966f7aac5515266487 Mon Sep 17 00:00:00 2001 From: tarcila Date: Tue, 25 Jun 2019 13:59:52 -0400 Subject: [PATCH 0050/1066] [capnproto] Enable Linux and OSX support (#7024) Now that #5630 is fix, this package is fully supported on both Linux and Mac OS X. --- ports/capnproto/portfile.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/capnproto/portfile.cmake b/ports/capnproto/portfile.cmake index 4043a53c5..5c189acc7 100644 --- a/ports/capnproto/portfile.cmake +++ b/ports/capnproto/portfile.cmake @@ -2,10 +2,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP build is not supported.") endif() -if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "Error: CapnProto only build on Windows for now. See #5630 and #5635") -endif() - include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) From 90ad82908e85ff4b6cd385b82da3e8b66692a8b1 Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Wed, 26 Jun 2019 02:00:48 +0800 Subject: [PATCH 0051/1066] [nana, fmi4cpp] Fix Visual Studio 2019 deprecates . (#7021) --- ports/fmi4cpp/CONTROL | 2 +- ports/fmi4cpp/fix-build_error.patch | 25 +++++++++++++++++++++++++ ports/fmi4cpp/portfile.cmake | 2 ++ ports/nana/CONTROL | 2 +- ports/nana/fix-build-error.patch | 12 ++++++++++++ ports/nana/portfile.cmake | 2 ++ 6 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 ports/fmi4cpp/fix-build_error.patch create mode 100644 ports/nana/fix-build-error.patch diff --git a/ports/fmi4cpp/CONTROL b/ports/fmi4cpp/CONTROL index 2a05be3b5..4659e9d1a 100644 --- a/ports/fmi4cpp/CONTROL +++ b/ports/fmi4cpp/CONTROL @@ -1,5 +1,5 @@ Source: fmi4cpp -Version: 0.7.0 +Version: 0.7.0-1 Description: FMI 2.0 implementation written in modern C++ Build-Depends: boost-property-tree, libzip[openssl] diff --git a/ports/fmi4cpp/fix-build_error.patch b/ports/fmi4cpp/fix-build_error.patch new file mode 100644 index 000000000..ef0950e87 --- /dev/null +++ b/ports/fmi4cpp/fix-build_error.patch @@ -0,0 +1,25 @@ +diff --git a/include/fmi4cpp/fmu_resource.hpp b/include/fmi4cpp/fmu_resource.hpp +index 98f2067..8e88dcf 100644 +--- a/include/fmi4cpp/fmu_resource.hpp ++++ b/include/fmi4cpp/fmu_resource.hpp +@@ -24,6 +24,7 @@ + + #ifndef FMI4CPP_FMURESOURCE_HPP + #define FMI4CPP_FMURESOURCE_HPP ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING + + #include + #include +diff --git a/src/fmi2/fmu.cpp b/src/fmi2/fmu.cpp +index a0d5f75..bd01487 100644 +--- a/src/fmi2/fmu.cpp ++++ b/src/fmi2/fmu.cpp +@@ -26,6 +26,8 @@ + #include + #endif + ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING ++ + #include + #include + diff --git a/ports/fmi4cpp/portfile.cmake b/ports/fmi4cpp/portfile.cmake index 0952f5c5a..ad45b5abe 100644 --- a/ports/fmi4cpp/portfile.cmake +++ b/ports/fmi4cpp/portfile.cmake @@ -18,6 +18,8 @@ vcpkg_from_github( REF v0.7.0 SHA512 5846f5b28badb5b4836ffd9d284f602dd243df20d3c82cab5e2b62b8be37e0ab05b7422bca066f37ca67ee0d5b35abd2febe87f623fc3b9854d245e86e1e21fe HEAD_REF master + PATCHES + fix-build_error.patch ) set(WITH_CURL OFF) diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index 0e832f7e8..4038c6f9e 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,5 +1,5 @@ Source: nana -Version: 1.7.1 +Version: 1.7.1-1 Homepage: https://github.com/cnjinhao/nana Description: Cross-platform library for GUI programming in modern C++ style. Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows) diff --git a/ports/nana/fix-build-error.patch b/ports/nana/fix-build-error.patch new file mode 100644 index 000000000..3894f9600 --- /dev/null +++ b/ports/nana/fix-build-error.patch @@ -0,0 +1,12 @@ +diff --git a/include/nana/filesystem/filesystem.hpp b/include/nana/filesystem/filesystem.hpp +index 86b907a..ea8db75 100644 +--- a/include/nana/filesystem/filesystem.hpp ++++ b/include/nana/filesystem/filesystem.hpp +@@ -30,6 +30,7 @@ + #ifndef NANA_FILESYSTEM_HPP + #define NANA_FILESYSTEM_HPP + #include ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING + + //Filesystem Selection + #include diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index 981bc4244..fa0815813 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -12,6 +12,8 @@ vcpkg_from_github( REF v1.7.1 SHA512 43bd6f6321557184431935b4fdd636427458e79333879f6310685a70ee25f4344851910e67c52145382c38a3cea9d1761b40c8edbc072a7cc9c62406ed402549 HEAD_REF develop + PATCHES + fix-build-error.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) From 728c767817d594d6043a305e254048d43da33e75 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Tue, 25 Jun 2019 11:01:19 -0700 Subject: [PATCH 0052/1066] [libpmemobj-cpp] Add new port (#7020) --- ports/libpmemobj-cpp/CONTROL | 4 ++++ ports/libpmemobj-cpp/portfile.cmake | 30 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 ports/libpmemobj-cpp/CONTROL create mode 100644 ports/libpmemobj-cpp/portfile.cmake diff --git a/ports/libpmemobj-cpp/CONTROL b/ports/libpmemobj-cpp/CONTROL new file mode 100644 index 000000000..ebc46931b --- /dev/null +++ b/ports/libpmemobj-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: libpmemobj-cpp +Version: 1.6 +#Build-Depends: pmdk +Description: C++ bindings for libpmemobj (https://github.com/pmem/pmdk). \ No newline at end of file diff --git a/ports/libpmemobj-cpp/portfile.cmake b/ports/libpmemobj-cpp/portfile.cmake new file mode 100644 index 000000000..563dd67d7 --- /dev/null +++ b/ports/libpmemobj-cpp/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pmem/libpmemobj-cpp + REF 1.6 + SHA512 c9a90ebc6e3231b9fcc86c9c55cc8dc219b663b39828680fb58ad7229dba1d60428c34824445f627350013bf32b83e5f0f9c2d4c17054f2321d5200832e6fea0 + HEAD_REF master +) + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_DOC=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + From b9764f8d89b4713fad3ff4573f2b7504ae79a771 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 26 Jun 2019 02:02:43 +0800 Subject: [PATCH 0053/1066] [qt5-base]Add execute permission when installing executables in Linux. (#7019) --- ports/qt5-base/CONTROL | 2 +- ports/qt5-base/portfile.cmake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 0082dc46c..562a9cc9d 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,5 +1,5 @@ Source: qt5-base -Version: 5.12.3-1 +Version: 5.12.3-2 Homepage: https://www.qt.io/ Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 6020376ba..a57411562 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -153,7 +153,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*") list(FILTER BINARY_TOOLS EXCLUDE REGEX "\\.dll\$") - file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) + file(INSTALL ${BINARY_TOOLS} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) From 1004b2ea11f67c59f2b3388ac4fb7947d0fa5e87 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Tue, 25 Jun 2019 14:19:57 -0700 Subject: [PATCH 0054/1066] [libmikmod] patch cmake warning (#7035) * [libmikmod] Address cmake warnings --- ports/libmikmod/CONTROL | 2 +- ports/libmikmod/cmake_policy.patch | 13 +++++++++++++ ports/libmikmod/portfile.cmake | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ports/libmikmod/cmake_policy.patch diff --git a/ports/libmikmod/CONTROL b/ports/libmikmod/CONTROL index 57d399a26..6a02a4ae4 100644 --- a/ports/libmikmod/CONTROL +++ b/ports/libmikmod/CONTROL @@ -1,5 +1,5 @@ Source: libmikmod -Version: 3.3.11.1-2 +Version: 3.3.11.1-3 Homepage: https://sourceforge.net/projects/mikmod/ Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm. Build-Depends: openal-soft diff --git a/ports/libmikmod/cmake_policy.patch b/ports/libmikmod/cmake_policy.patch new file mode 100644 index 000000000..17d48278a --- /dev/null +++ b/ports/libmikmod/cmake_policy.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b4d31d3..67951e6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,6 +23,8 @@ + # + # (This copyright notice applies only to this file) + ++cmake_policy(SET CMP0003 NEW) ++ + PROJECT(libmikmod C) + CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + LIST(APPEND CMAKE_MODULE_PATH "${libmikmod_SOURCE_DIR}/cmake") diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake index 3ff7ecb52..1ec5d6773 100644 --- a/ports/libmikmod/portfile.cmake +++ b/ports/libmikmod/portfile.cmake @@ -23,6 +23,7 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH PATCHES fix-missing-dll.patch + cmake_policy.patch ) vcpkg_configure_cmake( From ab81312c6300519ecf67f7e459f0921065e42872 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Tue, 25 Jun 2019 14:52:31 -0700 Subject: [PATCH 0055/1066] [libfabric] reorder patch (#7036) --- ports/libfabric/CONTROL | 2 +- ports/libfabric/add_additional_includes.patch | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/libfabric/CONTROL b/ports/libfabric/CONTROL index 931d10f5e..9666bc228 100644 --- a/ports/libfabric/CONTROL +++ b/ports/libfabric/CONTROL @@ -1,5 +1,5 @@ Source: libfabric -Version: 1.7.1 +Version: 1.7.1-1 Description: The OpenFabrics Interfaces Working Group (OFIWG) and the Libfabric open-source community are pleased to announce the release of version v1.6.2 of libfabric. See NEWS.md for the list of features and enhancements that have been added since the last release. Homepage: https://github.com/ofiwg/libfabric Build-Depends: networkdirect-sdk (windows) diff --git a/ports/libfabric/add_additional_includes.patch b/ports/libfabric/add_additional_includes.patch index 377a810d2..da3d3254c 100644 --- a/ports/libfabric/add_additional_includes.patch +++ b/ports/libfabric/add_additional_includes.patch @@ -7,7 +7,7 @@ index 43a05e7..ceb596f 100644 WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) true - $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include -+ $(AdditionalIncludeDirectories);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); CompileAsC 4127;4200;4204;4221;4115;4201;4100 true @@ -16,7 +16,7 @@ index 43a05e7..ceb596f 100644 WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) true - $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; -+ $(AdditionalIncludeDirectories);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); CompileAsC 4127;4200;4204;4221;4115;4201;4100 true @@ -25,7 +25,7 @@ index 43a05e7..ceb596f 100644 WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) true - $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include -+ $(AdditionalIncludeDirectories);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); CompileAsC 4127;4200;94;4204;4221;869 true @@ -34,7 +34,7 @@ index 43a05e7..ceb596f 100644 WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) true - $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include -+ $(AdditionalIncludeDirectories);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); 4127;4200;4204;4221;4115;4201;4100 true false @@ -43,7 +43,7 @@ index 43a05e7..ceb596f 100644 WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) true - $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; -+ $(AdditionalIncludeDirectories);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); 4127;4200;4204;4221;4115;4201;4100 true false @@ -52,7 +52,7 @@ index 43a05e7..ceb596f 100644 WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) true - $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; -+ $(AdditionalIncludeDirectories);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); 4127;4200;94;4204;4221;869 true false From 1ce24dd0db6d9cf6cdb348ff29aa8454b3f1b028 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Tue, 25 Jun 2019 16:08:18 -0700 Subject: [PATCH 0056/1066] [docs]Update cmake docs (#7039) --- docs/maintainers/portfile-functions.md | 1 + docs/maintainers/vcpkg_configure_cmake.md | 1 + .../vcpkg_execute_build_process.md | 36 +++++++++++++++++++ .../vcpkg_extract_source_archive_ex.md | 2 +- .../maintainers/vcpkg_find_acquire_program.md | 1 + scripts/cmake/vcpkg_configure_cmake.cmake | 1 + .../vcpkg_extract_source_archive_ex.cmake | 2 +- 7 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 docs/maintainers/vcpkg_execute_build_process.md diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md index f159f7f64..c4b810dc0 100644 --- a/docs/maintainers/portfile-functions.md +++ b/docs/maintainers/portfile-functions.md @@ -12,6 +12,7 @@ - [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md) - [vcpkg\_copy\_tool\_dependencies](vcpkg_copy_tool_dependencies.md) - [vcpkg\_download\_distfile](vcpkg_download_distfile.md) +- [vcpkg\_execute\_build\_process](vcpkg_execute_build_process.md) - [vcpkg\_execute\_required\_process](vcpkg_execute_required_process.md) - [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md) - [vcpkg\_extract\_source\_archive\_ex](vcpkg_extract_source_archive_ex.md) diff --git a/docs/maintainers/vcpkg_configure_cmake.md b/docs/maintainers/vcpkg_configure_cmake.md index 200d358ae..f61a6fa20 100644 --- a/docs/maintainers/vcpkg_configure_cmake.md +++ b/docs/maintainers/vcpkg_configure_cmake.md @@ -7,6 +7,7 @@ Configure CMake for Debug and Release builds of a project. vcpkg_configure_cmake( SOURCE_PATH <${SOURCE_PATH}> [PREFER_NINJA] + [DISABLE_PARALLEL_CONFIGURE] [GENERATOR <"NMake Makefiles">] [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] [OPTIONS_RELEASE <-DOPTIMIZE=1>...] diff --git a/docs/maintainers/vcpkg_execute_build_process.md b/docs/maintainers/vcpkg_execute_build_process.md new file mode 100644 index 000000000..d5b3593d9 --- /dev/null +++ b/docs/maintainers/vcpkg_execute_build_process.md @@ -0,0 +1,36 @@ +# vcpkg_execute_build_process + +Execute a required build process + +## Usage +```cmake +vcpkg_execute_build_process( + COMMAND [...] + [NO_PARALLEL_COMMAND [...]] + WORKING_DIRECTORY + LOGNAME ) +) +``` +## Parameters +### COMMAND +The command to be executed, along with its arguments. + +### NO_PARALLEL_COMMAND +Optional parameter which specifies a non-parallel command to attempt if a +failure potentially due to parallelism is detected. + +### WORKING_DIRECTORY +The directory to execute the command in. + +### LOGNAME +The prefix to use for the log files. + +This should be a unique name for different triplets so that the logs don't +conflict when building multiple at once. + +## Examples + +* [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_execute_build_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_build_process.cmake) diff --git a/docs/maintainers/vcpkg_extract_source_archive_ex.md b/docs/maintainers/vcpkg_extract_source_archive_ex.md index 92c90b296..8f525c3ce 100644 --- a/docs/maintainers/vcpkg_extract_source_archive_ex.md +++ b/docs/maintainers/vcpkg_extract_source_archive_ex.md @@ -25,7 +25,7 @@ The full path to the archive to be extracted. This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). ### REF -A friendly name that will be used instead of the filename of the archive. +A friendly name that will be used instead of the filename of the archive. If more than 10 characters it will be truncated. By convention, this is set to the version number or tag fetched diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md index 57a2bf75a..b868ea418 100644 --- a/docs/maintainers/vcpkg_find_acquire_program.md +++ b/docs/maintainers/vcpkg_find_acquire_program.md @@ -24,6 +24,7 @@ The current list of programs includes: - MESON - NASM - NINJA +- NUGET - YASM - ARIA2 (Downloader) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 8f3aa6425..c17bd68c8 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -7,6 +7,7 @@ ## vcpkg_configure_cmake( ## SOURCE_PATH <${SOURCE_PATH}> ## [PREFER_NINJA] +## [DISABLE_PARALLEL_CONFIGURE] ## [GENERATOR <"NMake Makefiles">] ## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] ## [OPTIONS_RELEASE <-DOPTIMIZE=1>...] diff --git a/scripts/cmake/vcpkg_extract_source_archive_ex.cmake b/scripts/cmake/vcpkg_extract_source_archive_ex.cmake index a70a5e4a3..a775c2094 100644 --- a/scripts/cmake/vcpkg_extract_source_archive_ex.cmake +++ b/scripts/cmake/vcpkg_extract_source_archive_ex.cmake @@ -25,7 +25,7 @@ ## This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). ## ## ### REF -## A friendly name that will be used instead of the filename of the archive. +## A friendly name that will be used instead of the filename of the archive. If more than 10 characters it will be truncated. ## ## By convention, this is set to the version number or tag fetched ## From 7401e2ff644779be3a1d0ec90be90282990e704b Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Wed, 26 Jun 2019 07:11:45 +0800 Subject: [PATCH 0057/1066] [libevent] Upgrade to version 2.1.10 (#6969) --- ports/fizz/fix-build_error.patch | 13 ++++++++++ ports/fizz/portfile.cmake | 4 ++- ports/libevent/CONTROL | 2 +- ports/libevent/fix-arm_build.patch | 36 +++++++++++++++++++++++++++ ports/libevent/fix-file_path.patch | 26 +++++++++++++++++++ ports/libevent/fix-target-files.patch | 36 --------------------------- ports/libevent/portfile.cmake | 23 ++++++++++++++--- 7 files changed, 98 insertions(+), 42 deletions(-) create mode 100644 ports/fizz/fix-build_error.patch create mode 100644 ports/libevent/fix-arm_build.patch create mode 100644 ports/libevent/fix-file_path.patch delete mode 100644 ports/libevent/fix-target-files.patch diff --git a/ports/fizz/fix-build_error.patch b/ports/fizz/fix-build_error.patch new file mode 100644 index 000000000..e85f16c6e --- /dev/null +++ b/ports/fizz/fix-build_error.patch @@ -0,0 +1,13 @@ +diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt +index 7f8769a..debac4e 100644 +--- a/fizz/CMakeLists.txt ++++ b/fizz/CMakeLists.txt +@@ -81,7 +81,7 @@ if(TARGET event) + message(STATUS "Found libevent from package config") + list(APPEND FIZZ_SHINY_DEPENDENCIES event) + else() +- find_package(Libevent MODULE REQUIRED) ++ find_package(Libevent CONFIG REQUIRED) + list(APPEND FIZZ_LINK_LIBRARIES ${LIBEVENT_LIB}) + list(APPEND FIZZ_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) + endif() diff --git a/ports/fizz/portfile.cmake b/ports/fizz/portfile.cmake index 373f1d407..16459cbf4 100644 --- a/ports/fizz/portfile.cmake +++ b/ports/fizz/portfile.cmake @@ -8,7 +8,9 @@ vcpkg_from_github( REF 6d26a1be8d7a20d8d89c374ee3dc5c452d18c18d SHA512 bc6aa17a97fdfc53d0a247b876cbd1fea8214608b7e463dcf21e34df65015fe77e617c5a6c6bfa84b87e60e56b6aeb89aa2d8d774f97fc1f76f415869948a48a HEAD_REF master - PATCHES find-zlib.patch + PATCHES + find-zlib.patch + fix-build_error.patch ) # Prefer installed config files diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL index 2534bf1f6..95a4c37da 100644 --- a/ports/libevent/CONTROL +++ b/ports/libevent/CONTROL @@ -1,5 +1,5 @@ Source: libevent -Version: 2.1.8-5 +Version: 2.1.10 Build-Depends: openssl Homepage: https://github.com/libevent/libevent Description: An event notification library diff --git a/ports/libevent/fix-arm_build.patch b/ports/libevent/fix-arm_build.patch new file mode 100644 index 000000000..7bfad0449 --- /dev/null +++ b/ports/libevent/fix-arm_build.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 44b6e18..19c024f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -322,7 +322,7 @@ endif() + # Winsock. + if(WIN32) + set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h ws2tcpip.h) +- set(CMAKE_REQUIRED_LIBRARIES ws2_32.lib) ++ set(CMAKE_REQUIRED_LIBRARIES ws2_32.lib advapi32.lib shell32.lib) + set(CMAKE_REQUIRED_DEFINITIONS -FIwinsock2.h -FIws2tcpip.h) + endif() + if (SOLARIS) +diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake +index 411ca9d..869735e 100644 +--- a/cmake/AddEventLibrary.cmake ++++ b/cmake/AddEventLibrary.cmake +@@ -73,6 +73,8 @@ macro(add_event_library LIB_NAME) + list(APPEND ADD_EVENT_LIBRARY_TARGETS "${LIB_NAME}_static") + + set(ADD_EVENT_LIBRARY_INTERFACE "${LIB_NAME}_static") ++ ++ target_link_libraries("${LIB_NAME}_static" PRIVATE ${CMAKE_REQUIRED_LIBRARIES}) + endif() + + if (${EVENT_LIBRARY_SHARED}) +@@ -81,7 +83,8 @@ macro(add_event_library LIB_NAME) + target_link_libraries("${LIB_NAME}_shared" + ${CMAKE_THREAD_LIBS_INIT} + ${LIB_PLATFORM} +- ${LIB_LIBRARIES}) ++ ${LIB_LIBRARIES} ++ ${CMAKE_REQUIRED_LIBRARIES}) + + if (EVENT_SHARED_FLAGS) + set_event_shared_lib_flags("${LIB_NAME}" "${EVENT_SHARED_FLAGS}") diff --git a/ports/libevent/fix-file_path.patch b/ports/libevent/fix-file_path.patch new file mode 100644 index 000000000..179700b7e --- /dev/null +++ b/ports/libevent/fix-file_path.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6e91c08..44b6e18 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1430,7 +1430,7 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigBuildTree.cmake.in + # Calculate the relative directory from the Cmake dir. + file(RELATIVE_PATH + REL_INCLUDE_DIR +- "${EVENT_INSTALL_CMAKE_DIR}" ++ "${CURRENT_PACKAGES_DIR}/${EVENT_INSTALL_CMAKE_DIR}" + "${CMAKE_INSTALL_PREFIX}/include") + + # Note the LIBEVENT_CMAKE_DIR is defined in LibeventConfig.cmake.in, +diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake +index 9de4484..411ca9d 100644 +--- a/cmake/AddEventLibrary.cmake ++++ b/cmake/AddEventLibrary.cmake +@@ -113,7 +113,7 @@ macro(add_event_library LIB_NAME) + EXPORT LibeventTargets + LIBRARY DESTINATION "lib" COMPONENT lib + ARCHIVE DESTINATION "lib" COMPONENT lib +- RUNTIME DESTINATION "lib" COMPONENT lib ++ RUNTIME DESTINATION "bin" COMPONENT bin + PUBLIC_HEADER DESTINATION "include/event2" + COMPONENT dev + ) diff --git a/ports/libevent/fix-target-files.patch b/ports/libevent/fix-target-files.patch deleted file mode 100644 index d1b2d5970..000000000 --- a/ports/libevent/fix-target-files.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b4a34f3d..4bd80d84 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1343,10 +1343,10 @@ endif() - set(EVENT_INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files") - - # Make sure the paths are absolute. --foreach(p LIB BIN INCLUDE CMAKE) -+foreach(p INCLUDE CMAKE) - set(var EVENT_INSTALL_${p}_DIR) - if(NOT IS_ABSOLUTE "${${var}}") -- set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") -+ set(${var}_FULL "${CMAKE_INSTALL_PREFIX}/${${var}}") - endif() - endforeach() - -@@ -1371,15 +1371,15 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigBuildTree.cmake.in - # Generate the config file for the installation tree. - file(RELATIVE_PATH - REL_INCLUDE_DIR -- "${EVENT_INSTALL_CMAKE_DIR}" -- "${EVENT_INSTALL_INCLUDE_DIR}") # Calculate the relative directory from the Cmake dir. -+ "${EVENT_INSTALL_CMAKE_DIR_FULL}" -+ "${EVENT_INSTALL_INCLUDE_DIR_FULL}") # Calculate the relative directory from the Cmake dir. - - # Note the EVENT_CMAKE_DIR is defined in LibeventConfig.cmake.in, - # we escape it here so it's evaluated when it is included instead - # so that the include dirs are givenrelative to where the - # config file is located. - set(EVENT__INCLUDE_DIRS -- "\${EVENT_CMAKE_DIR}/${REL_INCLUDE_DIR}") -+ "\${EVENT_CMAKE_DIR_FULL}/${REL_INCLUDE_DIR}") - - configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfig.cmake.in - ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LibeventConfig.cmake diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index 28028ce3c..ee3fdd3b6 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -7,17 +7,25 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libevent/libevent - REF release-2.1.8-stable - SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549 + REF release-2.1.10-stable + SHA512 8c336df258f7a12164da739b0ea68bebcc8b2ea4f4a839300aa1c5edfb673ac5d6517f882ba04ab35d406489ddd682a319e39fa6784ac0cab73227d42e503a55 PATCHES - "fix-target-files.patch" + fix-file_path.patch + fix-arm_build.patch ) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(LIBEVENT_LIB_TYPE SHARED) +else() + set(LIBEVENT_LIB_TYPE STATIC) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent + -DEVENT__LIBRARY_TYPE=${LIBEVENT_LIB_TYPE} -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_REGRESS=ON @@ -28,7 +36,14 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets() +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/libevent) +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +endif() + vcpkg_copy_pdbs() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) From abb7f546defc5c66f0a89523d81f474a05fd8446 Mon Sep 17 00:00:00 2001 From: Maxime Gervais Date: Wed, 26 Jun 2019 06:44:17 +0200 Subject: [PATCH 0058/1066] [libzen] Add new port (#7004) --- ports/libzen/CONTROL | 3 ++ ports/libzen/portfile.cmake | 31 +++++++++++++++++++ .../libzen/vcpkg_support_in_cmakelists.patch | 31 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 ports/libzen/CONTROL create mode 100644 ports/libzen/portfile.cmake create mode 100644 ports/libzen/vcpkg_support_in_cmakelists.patch diff --git a/ports/libzen/CONTROL b/ports/libzen/CONTROL new file mode 100644 index 000000000..aca3ff287 --- /dev/null +++ b/ports/libzen/CONTROL @@ -0,0 +1,3 @@ +Source: libzen +Version: 0.4.37 +Description: ZenLib is a C++ utility library for easiest cross-platform development diff --git a/ports/libzen/portfile.cmake b/ports/libzen/portfile.cmake new file mode 100644 index 000000000..52ad55ef6 --- /dev/null +++ b/ports/libzen/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MediaArea/ZenLib + REF v0.4.37 + SHA512 857091422d6425aeae59bf5a9dfedd72f5c9b4a18f29acf88842d812f2b470fc8b1b03a245af6b7d08d616dd5596a8905cc138daecee23dadea39ae4215f77d4 + HEAD_REF master + + PATCHES vcpkg_support_in_cmakelists.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/Project/CMake + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/zenlib TARGET_PATH share/zenlib) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzen RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME ZenLib MODULE) diff --git a/ports/libzen/vcpkg_support_in_cmakelists.patch b/ports/libzen/vcpkg_support_in_cmakelists.patch new file mode 100644 index 000000000..fb2ce81f7 --- /dev/null +++ b/ports/libzen/vcpkg_support_in_cmakelists.patch @@ -0,0 +1,31 @@ +diff --git a/Project/CMake/CMakeLists.txt b/Project/CMake/CMakeLists.txt +index cb96dc8..8b05a25 100644 +--- a/Project/CMake/CMakeLists.txt ++++ b/Project/CMake/CMakeLists.txt +@@ -33,10 +33,12 @@ set(BIN_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE STRING "Directory where + set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE STRING "Directory where library will install") + set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}" CACHE PATH "The directory the headers are installed in") + +-if(NOT MSVC) +- set(ZenLib_CONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/zenlib") ++if(VCPKG_TARGET_TRIPLET) ++ set(ZenLib_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/zenlib") ++elseif(MSVC) ++ set(ZenLib_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake") + else() +- set(ZenLib_CONFIG_INSTALL_DIR "cmake") ++ set(ZenLib_CONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/zenlib") + endif() + + set(ZenLib_HDRS +@@ -136,10 +138,6 @@ set_target_properties(zen PROPERTIES + PUBLIC_HEADER "${ZenLib_HDRS}" + ) + +-if(MSVC) +- install(FILES $ DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS "Debug;RelWithDebInfo" OPTIONAL) +-endif() +- + install(TARGETS zen EXPORT zen-export + PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/ZenLib + RUNTIME DESTINATION ${BIN_INSTALL_DIR} From 32ee6c96ce48beffd64fea04c676ffb0d297681b Mon Sep 17 00:00:00 2001 From: John Zhu Date: Tue, 25 Jun 2019 21:45:02 -0700 Subject: [PATCH 0059/1066] #5248 make vcpkg buildable as 'system' user (#7038) If we keep TMP, when run as 'system' user it is using Windows\Temp folder. --- scripts/cleanEnvironmentHelper.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cleanEnvironmentHelper.ps1 b/scripts/cleanEnvironmentHelper.ps1 index a3792ecd3..fa5fe869d 100644 --- a/scripts/cleanEnvironmentHelper.ps1 +++ b/scripts/cleanEnvironmentHelper.ps1 @@ -1,6 +1,6 @@ # Capture environment variables for the System and User. Also add some special/built-in variables. # These will be used to synthesize a clean environment -$specialEnvironmentMap = @{ "SystemDrive"=$env:SystemDrive; "SystemRoot"=$env:SystemRoot; "UserProfile"=$env:UserProfile } # These are built-in and not set in the registry +$specialEnvironmentMap = @{ "SystemDrive"=$env:SystemDrive; "SystemRoot"=$env:SystemRoot; "UserProfile"=$env:UserProfile; "TMP"=$env:TMP } # These are built-in and not set in the registry $machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment $userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment From 7b540fe2084bbe1fff46cfdfcde10fadbd021189 Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Wed, 26 Jun 2019 06:09:16 +0100 Subject: [PATCH 0060/1066] [tl] Update tl::expected and tl::optional, add tl::function_ref (#7028) * [tl] Update tl::expected and tl::optional, add tl::function_ref * [tl-expected][tl-function-ref][tl-optional] Always prepopulate FetchContent --- ports/tl-expected/CONTROL | 2 +- ports/tl-expected/portfile.cmake | 26 ++++++++++++++++++---- ports/tl-function-ref/CONTROL | 3 +++ ports/tl-function-ref/portfile.cmake | 33 ++++++++++++++++++++++++++++ ports/tl-optional/CONTROL | 2 +- ports/tl-optional/portfile.cmake | 26 ++++++++++++++++++---- 6 files changed, 82 insertions(+), 10 deletions(-) create mode 100644 ports/tl-function-ref/CONTROL create mode 100644 ports/tl-function-ref/portfile.cmake diff --git a/ports/tl-expected/CONTROL b/ports/tl-expected/CONTROL index 440efe9fa..b07479595 100644 --- a/ports/tl-expected/CONTROL +++ b/ports/tl-expected/CONTROL @@ -1,3 +1,3 @@ Source: tl-expected -Version: 0.3-1 +Version: 1.0.0-1 Description: C++11/14/17 std::expected implementation with functional-style extensions diff --git a/ports/tl-expected/portfile.cmake b/ports/tl-expected/portfile.cmake index 95a4861c2..80ec7e89b 100644 --- a/ports/tl-expected/portfile.cmake +++ b/ports/tl-expected/portfile.cmake @@ -3,13 +3,31 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO TartanLlama/expected - REF v0.3 - SHA512 a228399f7103020ed814f1c755b82cf831b3d8c6aaa23dbc3aedc226b3cbd39c22075952dda3af84c8cf6f74ab1131c6997a2431ee62314bd82ccafdc9ab23a3 + REF v1.0.0 + SHA512 747ea34b5540dfcf595896332851f10c52a823ab8ba3fc8152478b0a9e8ca01f0f26827348407249827f4106ff577bd6e697ea6f749c1f21bd1f0913a621075d HEAD_REF master ) -# Install header file -file(INSTALL ${SOURCE_PATH}/tl DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_from_github( + OUT_SOURCE_PATH TL_CMAKE_SOURCE_DIR + REPO TartanLlama/tl-cmake + REF 284c6a3f0f61823cc3871b0f193e8df699e2c4ce + SHA512 f611326d75d6e87e58cb05e91f9506b1d83e6fd3b214fe311c4c15604feabfb7a18bbf9c4b4c389a39d615eb468b1f4b15802ab9f44f334a12310cb183fa77a7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_SOURCE_DIR_TL_CMAKE=${TL_CMAKE_SOURCE_DIR} + -DEXPECTED_ENABLE_TESTS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tl-expected RENAME copyright) diff --git a/ports/tl-function-ref/CONTROL b/ports/tl-function-ref/CONTROL new file mode 100644 index 000000000..be89f7741 --- /dev/null +++ b/ports/tl-function-ref/CONTROL @@ -0,0 +1,3 @@ +Source: tl-function-ref +Version: 1.0.0-1 +Description: A lightweight, non-owning reference to a callable. \ No newline at end of file diff --git a/ports/tl-function-ref/portfile.cmake b/ports/tl-function-ref/portfile.cmake new file mode 100644 index 000000000..07df6a048 --- /dev/null +++ b/ports/tl-function-ref/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO TartanLlama/function_ref + REF v1.0.0 + SHA512 64324049021548361caa667a5ad61a8c0acc787d3966e5b132520da99af709970e37b5a5cb71f69523b6254c9d0d8bab441356e7a25880fe53a6998067c587bd + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH TL_CMAKE_SOURCE_DIR + REPO TartanLlama/tl-cmake + REF 284c6a3f0f61823cc3871b0f193e8df699e2c4ce + SHA512 f611326d75d6e87e58cb05e91f9506b1d83e6fd3b214fe311c4c15604feabfb7a18bbf9c4b4c389a39d615eb468b1f4b15802ab9f44f334a12310cb183fa77a7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_SOURCE_DIR_TL_CMAKE=${TL_CMAKE_SOURCE_DIR} + -DFUNCTION_REF_ENABLE_TESTS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tl-function-ref RENAME copyright) diff --git a/ports/tl-optional/CONTROL b/ports/tl-optional/CONTROL index 3be044dbe..5464d8054 100644 --- a/ports/tl-optional/CONTROL +++ b/ports/tl-optional/CONTROL @@ -1,3 +1,3 @@ Source: tl-optional -Version: 0.5-1 +Version: 1.0.0-1 Description: C++11/14/17 std::optional implementation with functional-style extensions diff --git a/ports/tl-optional/portfile.cmake b/ports/tl-optional/portfile.cmake index b6d98b9e0..3c3085cc9 100644 --- a/ports/tl-optional/portfile.cmake +++ b/ports/tl-optional/portfile.cmake @@ -3,13 +3,31 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO TartanLlama/optional - REF v0.5 - SHA512 f4f72c1ba431737fb7b1b6468b7dbbb025f299775e0a3401993490a60d5999d31ccf1e48c0cd57836293a5534ea4749b9f1c8f65f896144204af3389a5e512f9 + REF v1.0.0 + SHA512 6e5020808650ec312f5cdf4bc92be9067dc214c2e02d635511e99b325d34c360ce360cf93e67287dba4b9c0d674f3cbae96a75b83b13374fbb1291d2bb0f078a HEAD_REF master ) -# Install header file -file(INSTALL ${SOURCE_PATH}/tl DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_from_github( + OUT_SOURCE_PATH TL_CMAKE_SOURCE_DIR + REPO TartanLlama/tl-cmake + REF 284c6a3f0f61823cc3871b0f193e8df699e2c4ce + SHA512 f611326d75d6e87e58cb05e91f9506b1d83e6fd3b214fe311c4c15604feabfb7a18bbf9c4b4c389a39d615eb468b1f4b15802ab9f44f334a12310cb183fa77a7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_SOURCE_DIR_TL_CMAKE=${TL_CMAKE_SOURCE_DIR} + -DOPTIONAL_ENABLE_TESTS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tl-optional RENAME copyright) From 9c3e312d81f402ccd122255a464ea4e27e950483 Mon Sep 17 00:00:00 2001 From: John McNamara Date: Wed, 26 Jun 2019 06:11:41 +0100 Subject: [PATCH 0061/1066] [libxlsxwriter] upgrade to 0.8.7 (#7034) Upgrade to the latest version of libxlsxwriter. Closes #6982 --- ports/libxlsxwriter/0003-fix-include-file.patch | 14 ++++++++++++++ ports/libxlsxwriter/CONTROL | 2 +- ports/libxlsxwriter/portfile.cmake | 7 ++++--- 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 ports/libxlsxwriter/0003-fix-include-file.patch diff --git a/ports/libxlsxwriter/0003-fix-include-file.patch b/ports/libxlsxwriter/0003-fix-include-file.patch new file mode 100644 index 000000000..faa0517b8 --- /dev/null +++ b/ports/libxlsxwriter/0003-fix-include-file.patch @@ -0,0 +1,14 @@ +diff --git a/include/xlsxwriter/utility.h b/include/xlsxwriter/utility.h +index 5b4b365..5f86335 100644 +--- a/include/xlsxwriter/utility.h ++++ b/include/xlsxwriter/utility.h +@@ -17,7 +17,9 @@ + #define __LXW_UTILITY_H__ + + #include ++#ifndef _MSC_VER + #include ++#endif + #include "common.h" + #include "xmlwriter.h" + diff --git a/ports/libxlsxwriter/CONTROL b/ports/libxlsxwriter/CONTROL index 0cf7ed965..8848ce5f9 100644 --- a/ports/libxlsxwriter/CONTROL +++ b/ports/libxlsxwriter/CONTROL @@ -1,4 +1,4 @@ Source: libxlsxwriter -Version: 0.8.6-1 +Version: 0.8.7-1 Description: Libxlsxwriter is a C library that can be used to write text, numbers, formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file. Build-Depends: zlib diff --git a/ports/libxlsxwriter/portfile.cmake b/ports/libxlsxwriter/portfile.cmake index f60d2f88d..cf77a09e4 100644 --- a/ports/libxlsxwriter/portfile.cmake +++ b/ports/libxlsxwriter/portfile.cmake @@ -3,12 +3,13 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jmcnamara/libxlsxwriter - REF RELEASE_0.8.6 - SHA512 60822dc5f87531edc97cf774e234f25229a605d4430061c24b95c387318e6e05dde1b0f2f433cea14c6f84ee901c1dffe0d174bfd7e2a8459f59bcee900097db + REF RELEASE_0.8.7 + SHA512 20bf09f084808a8db00315848213c550fb809b587ea49ce3b25b310de981c176a44c518452507b6e00ca3f0a8e0056d88a6f575c031d54aa68791575cb9ab285 HEAD_REF master PATCHES 0001-fix-build-error.patch 0002-fix-uwp-build.patch + 0003-fix-include-file.patch ) if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") @@ -30,4 +31,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() file(COPY ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/License.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/License.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) From 9706c31c75ee4cf949b19276645a8a8dbe9596c3 Mon Sep 17 00:00:00 2001 From: lsparey Date: Wed, 26 Jun 2019 17:44:59 +0100 Subject: [PATCH 0062/1066] Do not delete the third_party include folder when building with mnmlstc --- ports/mongo-cxx-driver/CONTROL | 2 +- ports/mongo-cxx-driver/portfile.cmake | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL index c1d85e636..b4424e25b 100644 --- a/ports/mongo-cxx-driver/CONTROL +++ b/ports/mongo-cxx-driver/CONTROL @@ -1,5 +1,5 @@ Source: mongo-cxx-driver -Version: 3.4.0-2 +Version: 3.4.0-3 Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility Homepage: https://github.com/mongodb/mongo-cxx-driver Description: MongoDB C++ Driver. diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index 3ff200da3..9f05fedc8 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -83,13 +83,16 @@ set(LIBMONGOCXX_LIBRARIES optimized \${LIBMONGOCXX_LIBRARY_PATH_RELEASE} debug \ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +if (NOT BSONCXX_POLY STREQUAL MNMLSTC) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test_util - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private From eff0769b757481f0f3a42f195355abbd319b6f78 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Thu, 27 Jun 2019 01:33:36 +0800 Subject: [PATCH 0063/1066] [openvdb]Upgrade version to 6.1.0, regenerate patches and fix build errors. (#6864) --- ports/openvdb/0001-fix-cmake-modules.patch | 207 --- ports/openvdb/0001-remove-pkgconfig.patch | 129 ++ ports/openvdb/0002-add-custom-options.patch | 14 - ports/openvdb/0002-fix-cmake-modules.patch | 1125 +++++++++++++++++ .../0003-build-only-necessary-targets.patch | 282 ----- ports/openvdb/0003-fix-cmake.patch | 90 ++ ports/openvdb/0004-add-necessary-head.patch | 59 - ports/openvdb/CONTROL | 4 +- ports/openvdb/blosc.patch | 24 - ports/openvdb/portfile.cmake | 35 +- 10 files changed, 1366 insertions(+), 603 deletions(-) delete mode 100644 ports/openvdb/0001-fix-cmake-modules.patch create mode 100644 ports/openvdb/0001-remove-pkgconfig.patch delete mode 100644 ports/openvdb/0002-add-custom-options.patch create mode 100644 ports/openvdb/0002-fix-cmake-modules.patch delete mode 100644 ports/openvdb/0003-build-only-necessary-targets.patch create mode 100644 ports/openvdb/0003-fix-cmake.patch delete mode 100644 ports/openvdb/0004-add-necessary-head.patch delete mode 100644 ports/openvdb/blosc.patch diff --git a/ports/openvdb/0001-fix-cmake-modules.patch b/ports/openvdb/0001-fix-cmake-modules.patch deleted file mode 100644 index 03cc2461e..000000000 --- a/ports/openvdb/0001-fix-cmake-modules.patch +++ /dev/null @@ -1,207 +0,0 @@ -diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake -index 2d9d9d3..e9b4abc 100644 ---- a/cmake/FindBlosc.cmake -+++ b/cmake/FindBlosc.cmake -@@ -37,11 +37,7 @@ - - FIND_PACKAGE ( PackageHandleStandardArgs ) - --FIND_PATH( BLOSC_LOCATION include/blosc.h -- "$ENV{BLOSC_ROOT}" -- NO_DEFAULT_PATH -- NO_SYSTEM_ENVIRONMENT_PATH -- ) -+FIND_PATH( BLOSC_LOCATION include/blosc.h) - - FIND_PACKAGE_HANDLE_STANDARD_ARGS ( Blosc - REQUIRED_VARS BLOSC_LOCATION -@@ -53,7 +49,7 @@ IF ( BLOSC_FOUND ) - CACHE STRING "Blosc library directories") - - SET ( _blosc_library_name "blosc" ) -- -+ - # Static library setup - IF (Blosc_USE_STATIC_LIBS) - SET(CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP ${CMAKE_FIND_LIBRARY_SUFFIXES}) -@@ -69,7 +65,7 @@ IF ( BLOSC_FOUND ) - NO_DEFAULT_PATH - NO_SYSTEM_ENVIRONMENT_PATH - ) -- -+ - # Static library tear down - IF (Blosc_USE_STATIC_LIBS) - SET( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP} ) -diff --git a/cmake/FindGLEW.cmake b/cmake/FindGLEW.cmake -index 0b72457..75951a6 100644 ---- a/cmake/FindGLEW.cmake -+++ b/cmake/FindGLEW.cmake -@@ -39,11 +39,7 @@ - - FIND_PACKAGE ( PackageHandleStandardArgs ) - --FIND_PATH( GLEW_LOCATION include/GL/glew.h -- "$ENV{GLEW_ROOT}" -- NO_DEFAULT_PATH -- NO_SYSTEM_ENVIRONMENT_PATH -- ) -+FIND_PATH( GLEW_LOCATION include/GL/glew.h) - - FIND_PACKAGE_HANDLE_STANDARD_ARGS ( GLEW - REQUIRED_VARS GLEW_LOCATION -diff --git a/cmake/FindGLFW3.cmake b/cmake/FindGLFW3.cmake -index cea0b86..07ea09e 100644 ---- a/cmake/FindGLFW3.cmake -+++ b/cmake/FindGLFW3.cmake -@@ -39,11 +39,7 @@ - - FIND_PACKAGE ( PackageHandleStandardArgs ) - --FIND_PATH( GLFW3_LOCATION include/GLFW/glfw3.h -- "$ENV{GLFW3_ROOT}" -- NO_DEFAULT_PATH -- NO_SYSTEM_ENVIRONMENT_PATH --) -+FIND_PATH( GLFW3_LOCATION include/GLFW/glfw3.h) - - FIND_PACKAGE_HANDLE_STANDARD_ARGS ( GLFW3 - REQUIRED_VARS GLFW3_LOCATION -@@ -59,7 +59,7 @@ IF (GLFW3_FOUND) - NO_CMAKE_SYSTEM_PATH - ) - ELSE (GLFW3_USE_STATIC_LIBS) -- FIND_LIBRARY ( GLFW3_glfw_LIBRARY glfw -+ FIND_LIBRARY ( GLFW3_glfw_LIBRARY glfw3dll - PATHS ${GLFW3_LOCATION}/lib - PATH_SUFFIXES ${GLFW3_PATH_SUFFIXES} - NO_DEFAULT_PATH -diff --git a/cmake/FindILMBase.cmake b/cmake/FindILMBase.cmake -index 664affd..5197110 100644 ---- a/cmake/FindILMBase.cmake -+++ b/cmake/FindILMBase.cmake -@@ -43,11 +43,7 @@ - - FIND_PACKAGE ( PackageHandleStandardArgs ) - --FIND_PATH ( ILMBASE_LOCATION include/OpenEXR/IlmBaseConfig.h -- "$ENV{ILMBASE_ROOT}" -- NO_DEFAULT_PATH -- NO_SYSTEM_ENVIRONMENT_PATH -- ) -+FIND_PATH ( ILMBASE_LOCATION include/OpenEXR/IlmBaseConfig.h) - - FIND_PACKAGE_HANDLE_STANDARD_ARGS ( ILMBase - REQUIRED_VARS ILMBASE_LOCATION -@@ -70,11 +66,13 @@ IF ( ILMBASE_FOUND ) - SET ( IEXMATH_LIBRARY_NAME IexMath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) - SET ( ILMTHREAD_LIBRARY_NAME IlmThread-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) - SET ( IMATH_LIBRARY_NAME Imath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) -+ SET ( HALF_LIBRARY_NAME Half-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) - ELSE ( ILMBASE_NAMESPACE_VERSIONING ) - SET ( IEX_LIBRARY_NAME Iex ) - SET ( IEXMATH_LIBRARY_NAME IexMath ) - SET ( ILMTHREAD_LIBRARY_NAME IlmThread ) - SET ( IMATH_LIBRARY_NAME Imath ) -+ SET ( HALF_LIBRARY_NAME Half ) - ENDIF ( ILMBASE_NAMESPACE_VERSIONING ) - - SET ( ILMBASE_INCLUDE_DIRS -@@ -84,7 +82,7 @@ IF ( ILMBASE_FOUND ) - SET ( ILMBASE_LIBRARYDIR ${ILMBASE_LOCATION}/lib - CACHE STRING "ILMBase library directories") - SET ( ILMBASE_FOUND TRUE ) -- -+ - SET ( ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - IF (Ilmbase_USE_STATIC_LIBS) - IF (APPLE) -@@ -129,14 +127,14 @@ IF ( ILMBASE_FOUND ) - ELSEIF (WIN32) - # Link library - SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") -- FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) - FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) - FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) - FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) - FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) - # Load library - SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") -- FIND_LIBRARY ( Ilmbase_HALF_DLL Half PATHS ${ILMBASE_LOCATION}/bin -+ FIND_LIBRARY ( Ilmbase_HALF_DLL ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LOCATION}/bin - NO_DEFAULT_PATH - NO_SYSTEM_ENVIRONMENT_PATH - ) -@@ -157,7 +155,7 @@ IF ( ILMBASE_FOUND ) - NO_SYSTEM_ENVIRONMENT_PATH - ) - ELSE (APPLE) -- FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} -+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} - NO_DEFAULT_PATH - NO_SYSTEM_ENVIRONMENT_PATH - ) -diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake -index 6d69c03..5ecf8fa 100644 ---- a/cmake/FindOpenEXR.cmake -+++ b/cmake/FindOpenEXR.cmake -@@ -38,11 +38,7 @@ - - FIND_PACKAGE ( PackageHandleStandardArgs ) - --FIND_PATH ( OPENEXR_LOCATION include/OpenEXR/OpenEXRConfig.h -- ENV OPENEXR_ROOT -- NO_DEFAULT_PATH -- NO_SYSTEM_ENVIRONMENT_PATH -- ) -+FIND_PATH ( OPENEXR_LOCATION include/OpenEXR/OpenEXRConfig.h) - - FIND_PACKAGE_HANDLE_STANDARD_ARGS ( OpenEXR - REQUIRED_VARS OPENEXR_LOCATION -@@ -59,7 +55,7 @@ IF ( OPENEXR_FOUND ) - FILE ( STRINGS "${OPENEXR_LOCATION}/include/OpenEXR/OpenEXRConfig.h" _openexr_version_minor_string REGEX "#define OPENEXR_VERSION_MINOR ") - STRING ( REGEX REPLACE "#define OPENEXR_VERSION_MINOR" "" _openexr_version_minor_unstrip "${_openexr_version_minor_string}") - STRING ( STRIP "${_openexr_version_minor_unstrip}" OPENEXR_VERSION_MINOR ) -- -+ - MESSAGE ( STATUS "Found OpenEXR v${OPENEXR_VERSION_MAJOR}.${OPENEXR_VERSION_MINOR} at ${OPENEXR_LOCATION}" ) - - IF ( OPENEXR_NAMESPACE_VERSIONING ) -@@ -67,7 +63,7 @@ IF ( OPENEXR_FOUND ) - ELSE ( OPENEXR_NAMESPACE_VERSIONING ) - SET ( ILMIMF_LIBRARY_NAME IlmImf ) - ENDIF ( OPENEXR_NAMESPACE_VERSIONING ) -- -+ - SET ( OPENEXR_INCLUDE_DIRS - ${OPENEXR_LOCATION}/include - ${OPENEXR_LOCATION}/include/OpenEXR -@@ -120,6 +116,5 @@ IF ( OPENEXR_FOUND ) - ENDIF () - - # SET( Openexr_ILMIMF_LIBRARY ${OPENEXR_ILMIMF_LIBRARY_PATH} CACHE STRING "Openexr's IlmImf library") -- --ENDIF ( OPENEXR_FOUND ) - -+ENDIF ( OPENEXR_FOUND ) -diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake -index 8a56ec0..9f5a7b4 100644 ---- a/cmake/FindTBB.cmake -+++ b/cmake/FindTBB.cmake -@@ -42,14 +42,7 @@ FIND_PACKAGE ( PackageHandleStandardArgs ) - - # SET ( TBB_FOUND FALSE ) - --FIND_PATH( TBB_LOCATION include/tbb/tbb.h -- "$ENV{TBB_ROOT}" -- NO_DEFAULT_PATH -- NO_CMAKE_ENVIRONMENT_PATH -- NO_CMAKE_PATH -- NO_SYSTEM_ENVIRONMENT_PATH -- NO_CMAKE_SYSTEM_PATH -- ) -+FIND_PATH( TBB_LOCATION include/tbb/tbb.h) - - FIND_PACKAGE_HANDLE_STANDARD_ARGS ( TBB - REQUIRED_VARS TBB_LOCATION diff --git a/ports/openvdb/0001-remove-pkgconfig.patch b/ports/openvdb/0001-remove-pkgconfig.patch new file mode 100644 index 000000000..01803d531 --- /dev/null +++ b/ports/openvdb/0001-remove-pkgconfig.patch @@ -0,0 +1,129 @@ +diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake +index 03e361e..b44f46d 100644 +--- a/cmake/FindBlosc.cmake ++++ b/cmake/FindBlosc.cmake +@@ -104,11 +104,6 @@ else() + endif() + endif() + +-# Additionally try and use pkconfig to find blosc +- +-find_package(PkgConfig) +-pkg_check_modules(PC_Blosc QUIET blosc) +- + # ------------------------------------------------------------------------ + # Search for blosc include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindCppUnit.cmake b/cmake/FindCppUnit.cmake +index fb8a28b..fea685e 100644 +--- a/cmake/FindCppUnit.cmake ++++ b/cmake/FindCppUnit.cmake +@@ -106,11 +106,6 @@ else() + endif() + endif() + +-# Additionally try and use pkconfig to find cppunit +- +-find_package(PkgConfig) +-pkg_check_modules(PC_CppUnit QUIET cppunit) +- + # ------------------------------------------------------------------------ + # Search for CppUnit include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake +index f0a0d7f..9f31355 100644 +--- a/cmake/FindIlmBase.cmake ++++ b/cmake/FindIlmBase.cmake +@@ -152,11 +152,6 @@ else() + endif() + endif() + +-# Additionally try and use pkconfig to find IlmBase +- +-find_package(PkgConfig) +-pkg_check_modules(PC_IlmBase QUIET IlmBase) +- + # ------------------------------------------------------------------------ + # Search for IlmBase include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindLog4cplus.cmake b/cmake/FindLog4cplus.cmake +index 6890724..10dc931 100644 +--- a/cmake/FindLog4cplus.cmake ++++ b/cmake/FindLog4cplus.cmake +@@ -106,11 +106,6 @@ else() + endif() + endif() + +-# Additionally try and use pkconfig to find log4cplus +- +-find_package(PkgConfig) +-pkg_check_modules(PC_Log4cplus QUIET log4cplus) +- + # ------------------------------------------------------------------------ + # Search for Log4cplus include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake +index 302c1df..3d00c3d 100644 +--- a/cmake/FindOpenEXR.cmake ++++ b/cmake/FindOpenEXR.cmake +@@ -145,11 +145,6 @@ else() + endif() + endif() + +-# Additionally try and use pkconfig to find OpenEXR +- +-find_package(PkgConfig) +-pkg_check_modules(PC_OpenEXR QUIET OpenEXR) +- + # ------------------------------------------------------------------------ + # Search for OpenEXR include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake +index 783dfed..1fd43be 100644 +--- a/cmake/FindOpenVDB.cmake ++++ b/cmake/FindOpenVDB.cmake +@@ -153,11 +153,6 @@ else() + endif() + endif() + +-# Additionally try and use pkconfig to find OpenVDB +- +-find_package(PkgConfig) +-pkg_check_modules(PC_OpenVDB QUIET OpenVDB) +- + # This CMake module supports being called from external packages AND from + # within the OpenVDB repository for building openvdb components with the + # core library build disabled. Determine where we are being called from: +diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake +index 01696ce..8fe73e5 100644 +--- a/cmake/FindTBB.cmake ++++ b/cmake/FindTBB.cmake +@@ -141,11 +141,6 @@ else() + endif() + endif() + +-# Additionally try and use pkconfig to find Tbb +- +-find_package(PkgConfig) +-pkg_check_modules(PC_Tbb QUIET tbb) +- + # ------------------------------------------------------------------------ + # Search for tbb include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/OpenVDBGLFW3Setup.cmake b/cmake/OpenVDBGLFW3Setup.cmake +index 3a29dc7..4dc6269 100644 +--- a/cmake/OpenVDBGLFW3Setup.cmake ++++ b/cmake/OpenVDBGLFW3Setup.cmake +@@ -77,12 +77,6 @@ else() + endif() + endif() + +-# Additionally try and use pkconfig to find glfw, though we only use +-# pkg-config to re-direct to the cmake. In other words, glfw's cmake is +-# expected to be installed +-find_package(PkgConfig) +-pkg_check_modules(PC_glfw3 QUIET glfw3) +- + if(PC_glfw3_FOUND) + foreach(DIR ${PC_glfw3_LIBRARY_DIRS}) + list(APPEND _GLFW3_ROOT_SEARCH_DIR ${DIR}) diff --git a/ports/openvdb/0002-add-custom-options.patch b/ports/openvdb/0002-add-custom-options.patch deleted file mode 100644 index 5e8d49091..000000000 --- a/ports/openvdb/0002-add-custom-options.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b35ec70..801e7df 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -38,6 +38,9 @@ if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) - endif(CCACHE_FOUND) - -+OPTION ( OPENVDB_BUILD_TOOLS "Build OpenVDB utilities" OFF ) -+OPTION ( OPENVDB_STATIC "Build statically linked library" OFF ) -+OPTION ( OPENVDB_SHARED "Build dynamically linked library" ON ) - OPTION ( OPENVDB_BUILD_UNITTESTS "Build the OpenVDB unit tests" ON ) - OPTION ( OPENVDB_BUILD_DOCS "Build the OpenVDB documentation" OFF ) - OPTION ( OPENVDB_BUILD_PYTHON_MODULE "Build the pyopenvdb Python module" ON ) diff --git a/ports/openvdb/0002-fix-cmake-modules.patch b/ports/openvdb/0002-fix-cmake-modules.patch new file mode 100644 index 000000000..7b36161c5 --- /dev/null +++ b/ports/openvdb/0002-fix-cmake-modules.patch @@ -0,0 +1,1125 @@ +diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake +index e8b57a2..61ba83b 100644 +--- a/cmake/FindBlosc.cmake ++++ b/cmake/FindBlosc.cmake +@@ -1,4 +1,4 @@ +-# Copyright (c) 2012-2019 DreamWorks Animation LLC ++# Copyright (c) 2012-2016 DreamWorks Animation LLC + # + # All rights reserved. This software is distributed under the + # Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ ) +@@ -24,190 +24,51 @@ + # IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE + # LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00. + # +-#[=======================================================================[.rst: + +-FindBlosc +---------- +- +-Find Blosc include dirs and libraries +- +-Use this module by invoking find_package with the form:: +- +- find_package(Blosc +- [version] [EXACT] # Minimum or EXACT version e.g. 1.5.0 +- [REQUIRED] # Fail with error if Blosc is not found +- ) +- +-IMPORTED Targets +-^^^^^^^^^^^^^^^^ +- +-``Blosc::blosc`` +- This module defines IMPORTED target Blosc::Blosc, if Blosc has been found. +- +-Result Variables +-^^^^^^^^^^^^^^^^ +- +-This will define the following variables: +- +-``Blosc_FOUND`` +- True if the system has the Blosc library. +-``Blosc_VERSION`` +- The version of the Blosc library which was found. +-``Blosc_INCLUDE_DIRS`` +- Include directories needed to use Blosc. +-``Blosc_LIBRARIES`` +- Libraries needed to link to Blosc. +-``Blosc_LIBRARY_DIRS`` +- Blosc library directories. +- +-Cache Variables +-^^^^^^^^^^^^^^^ +- +-The following cache variables may also be set: +- +-``Blosc_INCLUDE_DIR`` +- The directory containing ``blosc.h``. +-``Blosc_LIBRARY`` +- The path to the Blosc library. +- +-Hints +-^^^^^ +- +-Instead of explicitly setting the cache variables, the following variables +-may be provided to tell this module where to look. +- +-``BLOSC_ROOT`` +- Preferred installation prefix. +-``BLOSC_INCLUDEDIR`` +- Preferred include directory e.g. /include +-``BLOSC_LIBRARYDIR`` +- Preferred library directory e.g. /lib +-``SYSTEM_LIBRARY_PATHS`` +- Paths appended to all include and lib searches. +- +-#]=======================================================================] +- +-mark_as_advanced( +- Blosc_INCLUDE_DIR +- Blosc_LIBRARY +-) +- +-# Append BLOSC_ROOT or $ENV{BLOSC_ROOT} if set (prioritize the direct cmake var) +-set(_BLOSC_ROOT_SEARCH_DIR "") +- +-if(BLOSC_ROOT) +- list(APPEND _BLOSC_ROOT_SEARCH_DIR ${BLOSC_ROOT}) +-else() +- set(_ENV_BLOSC_ROOT $ENV{BLOSC_ROOT}) +- if(_ENV_BLOSC_ROOT) +- list(APPEND _BLOSC_ROOT_SEARCH_DIR ${_ENV_BLOSC_ROOT}) +- endif() +-endif() +- +-# ------------------------------------------------------------------------ +-# Search for blosc include DIR +-# ------------------------------------------------------------------------ +- +-set(_BLOSC_INCLUDE_SEARCH_DIRS "") +-list(APPEND _BLOSC_INCLUDE_SEARCH_DIRS +- ${BLOSC_INCLUDEDIR} +- ${_BLOSC_ROOT_SEARCH_DIR} +- ${PC_Blosc_INCLUDE_DIRS} +- ${SYSTEM_LIBRARY_PATHS} +-) ++# -*- cmake -*- ++# - Find Blosc ++# ++# Author : Nicholas Yue yue.nicholas@gmail.com ++# ++# BLOSC_FOUND set if Blosc is found. ++# BLOSC_INCLUDE_DIR Blosc's include directory ++# BLOSC_LIBRARYDIR Blosc's library directory ++# BLOSC_LIBRARIES all Blosc libraries + +-# Look for a standard blosc header file. +-find_path(Blosc_INCLUDE_DIR blosc.h +- NO_DEFAULT_PATH +- PATHS ${_BLOSC_INCLUDE_SEARCH_DIRS} +- PATH_SUFFIXES include +-) ++FIND_PACKAGE ( PackageHandleStandardArgs ) + +-if(EXISTS "${Blosc_INCLUDE_DIR}/blosc.h") +- file(STRINGS "${Blosc_INCLUDE_DIR}/blosc.h" +- _blosc_version_major_string REGEX "#define BLOSC_VERSION_MAJOR +[0-9]+ " +- ) +- string(REGEX REPLACE "#define BLOSC_VERSION_MAJOR +([0-9]+).*$" "\\1" +- _blosc_version_major_string "${_blosc_version_major_string}" +- ) +- string(STRIP "${_blosc_version_major_string}" Blosc_VERSION_MAJOR) ++FIND_PATH( BLOSC_LOCATION include/blosc.h) + +- file(STRINGS "${Blosc_INCLUDE_DIR}/blosc.h" +- _blosc_version_minor_string REGEX "#define BLOSC_VERSION_MINOR +[0-9]+ " ++FIND_PACKAGE_HANDLE_STANDARD_ARGS ( Blosc ++ REQUIRED_VARS BLOSC_LOCATION + ) +- string(REGEX REPLACE "#define BLOSC_VERSION_MINOR +([0-9]+).*$" "\\1" +- _blosc_version_minor_string "${_blosc_version_minor_string}" +- ) +- string(STRIP "${_blosc_version_minor_string}" Blosc_VERSION_MINOR) +- +- unset(_blosc_version_major_string) +- unset(_blosc_version_minor_string) +- +- set(Blosc_VERSION ${Blosc_VERSION_MAJOR}.${Blosc_VERSION_MINOR}) +-endif() +- +-# ------------------------------------------------------------------------ +-# Search for blosc lib DIR +-# ------------------------------------------------------------------------ + +-set(_BLOSC_LIBRARYDIR_SEARCH_DIRS "") +-list(APPEND _BLOSC_LIBRARYDIR_SEARCH_DIRS +- ${BLOSC_LIBRARYDIR} +- ${_BLOSC_ROOT_SEARCH_DIR} +- ${PC_Blosc_LIBRARY_DIRS} +- ${SYSTEM_LIBRARY_PATHS} +-) ++IF ( BLOSC_FOUND ) + +-# Static library setup +-if(UNIX AND BLOSC_USE_STATIC_LIBS) +- set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) +- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") +-endif() ++# SET ( BLOSC_LIBRARYDIR ${BLOSC_LOCATION}/lib ++# CACHE STRING "Blosc library directories") + +-set(BLOSC_PATH_SUFFIXES +- lib64 +- lib +-) ++ SET ( _blosc_library_name "blosc" ) + +-find_library(Blosc_LIBRARY blosc +- NO_DEFAULT_PATH +- PATHS ${_BLOSC_LIBRARYDIR_SEARCH_DIRS} +- PATH_SUFFIXES ${BLOSC_PATH_SUFFIXES} +-) ++ # Static library setup ++ IF (Blosc_USE_STATIC_LIBS) ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP ${CMAKE_FIND_LIBRARY_SUFFIXES}) ++ IF (WIN32) ++ SET ( _blosc_library_name "libblosc" ) ++ ELSE () ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") ++ ENDIF () ++ ENDIF() + +-if(UNIX AND BLOSC_USE_STATIC_LIBS) +- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) +- unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) +-endif() +- +-# ------------------------------------------------------------------------ +-# Cache and set Blosc_FOUND +-# ------------------------------------------------------------------------ +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(Blosc +- FOUND_VAR Blosc_FOUND +- REQUIRED_VARS +- Blosc_LIBRARY +- Blosc_INCLUDE_DIR +- VERSION_VAR Blosc_VERSION +-) ++ FIND_LIBRARY ( BLOSC_blosc_LIBRARY ${_blosc_library_name} ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) + +-if(Blosc_FOUND) +- set(Blosc_LIBRARIES ${Blosc_LIBRARY}) +- set(Blosc_INCLUDE_DIRS ${Blosc_INCLUDE_DIR}) +- set(Blosc_DEFINITIONS ${PC_Blosc_CFLAGS_OTHER}) ++ # Static library tear down ++ IF (Blosc_USE_STATIC_LIBS) ++ SET( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP} ) ++ ENDIF() + +- get_filename_component(Blosc_LIBRARY_DIRS ${Blosc_LIBRARY} DIRECTORY) ++ SET( BLOSC_INCLUDE_DIR "${BLOSC_LOCATION}/include" CACHE STRING "Blosc include directory" ) + +- if(NOT TARGET Blosc::blosc) +- add_library(Blosc::blosc UNKNOWN IMPORTED) +- set_target_properties(Blosc::blosc PROPERTIES +- IMPORTED_LOCATION "${Blosc_LIBRARIES}" +- INTERFACE_COMPILE_DEFINITIONS "${Blosc_DEFINITIONS}" +- INTERFACE_INCLUDE_DIRECTORIES "${Blosc_INCLUDE_DIRS}" +- ) +- endif() +-elseif(Blosc_FIND_REQUIRED) +- message(FATAL_ERROR "Unable to find Blosc") +-endif() ++ENDIF ( BLOSC_FOUND ) +diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake +index 7f71a72..bb14fb4 100644 +--- a/cmake/FindIlmBase.cmake ++++ b/cmake/FindIlmBase.cmake +@@ -1,4 +1,4 @@ +-# Copyright (c) 2012-2019 DreamWorks Animation LLC ++# Copyright (c) 2012-2016 DreamWorks Animation LLC + # + # All rights reserved. This software is distributed under the + # Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ ) +@@ -24,309 +24,162 @@ + # IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE + # LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00. + # +-#[=======================================================================[.rst: + +-FindIlmBase +------------ +- +-Find IlmBase include dirs and libraries +- +-Use this module by invoking find_package with the form:: +- +- find_package(IlmBase +- [version] [EXACT] # Minimum or EXACT version +- [REQUIRED] # Fail with error if IlmBase is not found +- [COMPONENTS ...] # IlmBase libraries by their canonical name +- # e.g. "Half" for "libHalf" +- ) +- +-IMPORTED Targets +-^^^^^^^^^^^^^^^^ +- +-``IlmBase::Half`` +- The Half library target. +-``IlmBase::Iex`` +- The Iex library target. +-``IlmBase::IexMath`` +- The IexMath library target. +-``IlmBase::IlmThread`` +- The IlmThread library target. +-``IlmBase::Imath`` +- The Imath library target. +- +-Result Variables +-^^^^^^^^^^^^^^^^ +- +-This will define the following variables: +- +-``IlmBase_FOUND`` +- True if the system has the IlmBase library. +-``IlmBase_VERSION`` +- The version of the IlmBase library which was found. +-``IlmBase_INCLUDE_DIRS`` +- Include directories needed to use IlmBase. +-``IlmBase_LIBRARIES`` +- Libraries needed to link to IlmBase. +-``IlmBase_LIBRARY_DIRS`` +- IlmBase library directories. +-``IlmBase_{COMPONENT}_FOUND`` +- True if the system has the named IlmBase component. +- +-Cache Variables +-^^^^^^^^^^^^^^^ +- +-The following cache variables may also be set: +- +-``IlmBase_INCLUDE_DIR`` +- The directory containing ``IlmBase/config-auto.h``. +-``IlmBase_{COMPONENT}_LIBRARY`` +- Individual component libraries for IlmBase +-``IlmBase_{COMPONENT}_DLL`` +- Individual component dlls for IlmBase on Windows. +- +-Hints +-^^^^^ +- +-Instead of explicitly setting the cache variables, the following variables +-may be provided to tell this module where to look. +- +-``ILMBASE_ROOT`` +- Preferred installation prefix. +-``ILMBASE_INCLUDEDIR`` +- Preferred include directory e.g. /include +-``ILMBASE_LIBRARYDIR`` +- Preferred library directory e.g. /lib +-``SYSTEM_LIBRARY_PATHS`` +- Paths appended to all include and lib searches. +- +-#]=======================================================================] +- +-# Support new if() IN_LIST operator +-if(POLICY CMP0057) +- cmake_policy(SET CMP0057 NEW) +-endif() +- +-mark_as_advanced( +- IlmBase_INCLUDE_DIR +- IlmBase_LIBRARY +-) +- +-set(_ILMBASE_COMPONENT_LIST +- Half +- Iex +- IexMath +- IlmThread +- Imath +-) +- +-if(IlmBase_FIND_COMPONENTS) +- set(ILMBASE_COMPONENTS_PROVIDED TRUE) +- set(_IGNORED_COMPONENTS "") +- foreach(COMPONENT ${IlmBase_FIND_COMPONENTS}) +- if(NOT ${COMPONENT} IN_LIST _ILMBASE_COMPONENT_LIST) +- list(APPEND _IGNORED_COMPONENTS ${COMPONENT}) +- endif() +- endforeach() +- +- if(_IGNORED_COMPONENTS) +- message(STATUS "Ignoring unknown components of IlmBase:") +- foreach(COMPONENT ${_IGNORED_COMPONENTS}) +- message(STATUS " ${COMPONENT}") +- endforeach() +- list(REMOVE_ITEM IlmBase_FIND_COMPONENTS ${_IGNORED_COMPONENTS}) +- endif() +-else() +- set(ILMBASE_COMPONENTS_PROVIDED FALSE) +- set(IlmBase_FIND_COMPONENTS ${_ILMBASE_COMPONENT_LIST}) +-endif() +- +-# Append ILMBASE_ROOT or $ENV{ILMBASE_ROOT} if set (prioritize the direct cmake var) +-set(_ILMBASE_ROOT_SEARCH_DIR "") +- +-if(ILMBASE_ROOT) +- list(APPEND _ILMBASE_ROOT_SEARCH_DIR ${ILMBASE_ROOT}) +-else() +- set(_ENV_ILMBASE_ROOT $ENV{ILMBASE_ROOT}) +- if(_ENV_ILMBASE_ROOT) +- list(APPEND _ILMBASE_ROOT_SEARCH_DIR ${_ENV_ILMBASE_ROOT}) +- endif() +-endif() +- +-# ------------------------------------------------------------------------ +-# Search for IlmBase include DIR +-# ------------------------------------------------------------------------ +- +-set(_ILMBASE_INCLUDE_SEARCH_DIRS "") +-list(APPEND _ILMBASE_INCLUDE_SEARCH_DIRS +- ${ILMBASE_INCLUDEDIR} +- ${_ILMBASE_ROOT_SEARCH_DIR} +- ${PC_IlmBase_INCLUDEDIR} +- ${SYSTEM_LIBRARY_PATHS} +-) +- +-# Look for a standard IlmBase header file. +-find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h +- NO_DEFAULT_PATH +- PATHS ${_ILMBASE_INCLUDE_SEARCH_DIRS} +- PATH_SUFFIXES include/OpenEXR OpenEXR +-) +- +-if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h") +- # Get the ILMBASE version information from the config header +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" +- _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR " +- ) +- string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" +- _ilmbase_version_major_string "${_ilmbase_version_major_string}" +- ) +- string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR) +- +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" +- _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR " +- ) +- string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" +- _ilmbase_version_minor_string "${_ilmbase_version_minor_string}" +- ) +- string(STRIP "${_ilmbase_version_minor_string}" IlmBase_VERSION_MINOR) +- +- unset(_ilmbase_version_major_string) +- unset(_ilmbase_version_minor_string) +- +- set(IlmBase_VERSION ${IlmBase_VERSION_MAJOR}.${IlmBase_VERSION_MINOR}) +-endif() +- +-# ------------------------------------------------------------------------ +-# Search for ILMBASE lib DIR +-# ------------------------------------------------------------------------ +- +-set(_ILMBASE_LIBRARYDIR_SEARCH_DIRS "") +- +-# Append to _ILMBASE_LIBRARYDIR_SEARCH_DIRS in priority order +- +-list(APPEND _ILMBASE_LIBRARYDIR_SEARCH_DIRS +- ${ILMBASE_LIBRARYDIR} +- ${_ILMBASE_ROOT_SEARCH_DIR} +- ${PC_IlmBase_LIBDIR} +- ${SYSTEM_LIBRARY_PATHS} +-) +- +-# Build suffix directories +- +-set(ILMBASE_PATH_SUFFIXES +- lib64 +- lib +-) +- +-if(UNIX) +- list(INSERT ILMBASE_PATH_SUFFIXES 0 lib/x86_64-linux-gnu) +-endif() +- +-set(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) +- +-# library suffix handling +-if(WIN32) +- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES +- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.lib" +- ) +-else() +- if(ILMBASE_USE_STATIC_LIBS) +- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES +- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.a" +- ) +- else() +- if(APPLE) +- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES +- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.dylib" +- ) +- else() +- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES +- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.so" +- ) +- endif() +- endif() +-endif() +- +-set(IlmBase_LIB_COMPONENTS "") +- +-foreach(COMPONENT ${IlmBase_FIND_COMPONENTS}) +- find_library(IlmBase_${COMPONENT}_LIBRARY ${COMPONENT} +- NO_DEFAULT_PATH +- PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS} +- PATH_SUFFIXES ${ILMBASE_PATH_SUFFIXES} +- ) +- list(APPEND IlmBase_LIB_COMPONENTS ${IlmBase_${COMPONENT}_LIBRARY}) +- +- if(WIN32 AND NOT ILMBASE_USE_STATIC_LIBS) +- set(_ILMBASE_TMP ${CMAKE_FIND_LIBRARY_SUFFIXES}) +- set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") +- find_library(IlmBase_${COMPONENT}_DLL ${COMPONENT} +- NO_DEFAULT_PATH +- PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS} +- PATH_SUFFIXES bin +- ) +- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_TMP}) +- unset(_ILMBASE_TMP) +- endif() +- +- if(IlmBase_${COMPONENT}_LIBRARY) +- set(IlmBase_${COMPONENT}_FOUND TRUE) +- else() +- set(IlmBase_${COMPONENT}_FOUND FALSE) +- endif() +-endforeach() +- +-# reset lib suffix +- +-set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) +-unset(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) +- +-# ------------------------------------------------------------------------ +-# Cache and set ILMBASE_FOUND +-# ------------------------------------------------------------------------ +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(IlmBase +- FOUND_VAR IlmBase_FOUND +- REQUIRED_VARS +- IlmBase_INCLUDE_DIR +- IlmBase_LIB_COMPONENTS +- VERSION_VAR IlmBase_VERSION +- HANDLE_COMPONENTS +-) ++#-*-cmake-*- ++# - Find ILMBase ++# ++# Author : Nicholas Yue yue.nicholas@gmail.com ++# ++# This auxiliary CMake file helps in find the ILMBASE headers and libraries ++# ++# ILMBASE_FOUND set if ILMBASE is found. ++# ILMBASE_INCLUDE_DIR ILMBASE's include directory ++# ILMBASE_LIBRARYDIR ILMBASE's include directory ++# Ilmbase_HALF_LIBRARY ILMBASE's Half libraries ++# Ilmbase_IEX_LIBRARY ILMBASE's Iex libraries ++# Ilmbase_IEXMATH_LIBRARY ILMBASE's IexMath libraries ++# Ilmbase_ILMTHREAD_LIBRARY ILMBASE's IlmThread libraries ++# Ilmbase_IMATH_LIBRARY ILMBASE's Imath libraries + +-if(IlmBase_FOUND) +- set(IlmBase_LIBRARIES ${IlmBase_LIB_COMPONENTS}) ++FIND_PACKAGE ( PackageHandleStandardArgs ) + +- # We have to add both include and include/OpenEXR to the include +- # path in case OpenEXR and IlmBase are installed separately ++FIND_PATH ( ILMBASE_LOCATION include/OpenEXR/IlmBaseConfig.h) + +- set(IlmBase_INCLUDE_DIRS) +- list(APPEND IlmBase_INCLUDE_DIRS +- ${IlmBase_INCLUDE_DIR}/../ +- ${IlmBase_INCLUDE_DIR} ++FIND_PACKAGE_HANDLE_STANDARD_ARGS ( ILMBase ++ REQUIRED_VARS ILMBASE_LOCATION + ) +- set(IlmBase_DEFINITIONS ${PC_IlmBase_CFLAGS_OTHER}) +- +- set(IlmBase_LIBRARY_DIRS "") +- foreach(LIB ${IlmBase_LIB_COMPONENTS}) +- get_filename_component(_ILMBASE_LIBDIR ${LIB} DIRECTORY) +- list(APPEND IlmBase_LIBRARY_DIRS ${_ILMBASE_LIBDIR}) +- endforeach() +- list(REMOVE_DUPLICATES IlmBase_LIBRARY_DIRS) +- +- # Configure imported targets +- +- foreach(COMPONENT ${IlmBase_FIND_COMPONENTS}) +- if(NOT TARGET IlmBase::${COMPONENT}) +- add_library(IlmBase::${COMPONENT} UNKNOWN IMPORTED) +- set_target_properties(IlmBase::${COMPONENT} PROPERTIES +- IMPORTED_LOCATION "${IlmBase_${COMPONENT}_LIBRARY}" +- INTERFACE_COMPILE_OPTIONS "${IlmBase_DEFINITIONS}" +- INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}" +- ) +- endif() +- endforeach() + +-elseif(IlmBase_FIND_REQUIRED) +- message(FATAL_ERROR "Unable to find IlmBase") +-endif() ++OPTION ( ILMBASE_NAMESPACE_VERSIONING "Namespace versioning of libraries" ON ) ++ ++IF ( ILMBASE_FOUND ) ++ ++ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR ") ++ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" _ilmbase_version_major_unstrip "${_ilmbase_version_major_string}") ++ STRING ( STRIP "${_ilmbase_version_major_unstrip}" ILMBASE_VERSION_MAJOR ) ++ ++ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR ") ++ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" _ilmbase_version_minor_unstrip "${_ilmbase_version_minor_string}") ++ STRING ( STRIP "${_ilmbase_version_minor_unstrip}" ILMBASE_VERSION_MINOR ) ++ ++ IF ( ILMBASE_NAMESPACE_VERSIONING ) ++ SET ( IEX_LIBRARY_NAME Iex-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ SET ( IEXMATH_LIBRARY_NAME IexMath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ SET ( ILMTHREAD_LIBRARY_NAME IlmThread-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ SET ( IMATH_LIBRARY_NAME Imath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ SET ( HALF_LIBRARY_NAME Half-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ ELSE ( ILMBASE_NAMESPACE_VERSIONING ) ++ SET ( IEX_LIBRARY_NAME Iex ) ++ SET ( IEXMATH_LIBRARY_NAME IexMath ) ++ SET ( ILMTHREAD_LIBRARY_NAME IlmThread ) ++ SET ( IMATH_LIBRARY_NAME Imath ) ++ SET ( HALF_LIBRARY_NAME Half ) ++ ENDIF ( ILMBASE_NAMESPACE_VERSIONING ) ++ ++ SET ( ILMBASE_INCLUDE_DIRS ++ ${ILMBASE_LOCATION}/include ++ ${ILMBASE_LOCATION}/include/OpenEXR ++ CACHE STRING "ILMBase include directories") ++ SET ( ILMBASE_LIBRARYDIR ${ILMBASE_LOCATION}/lib ++ CACHE STRING "ILMBase library directories") ++ SET ( ILMBASE_FOUND TRUE ) ++ ++ SET ( ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) ++ IF (Ilmbase_USE_STATIC_LIBS) ++ IF (APPLE) ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} ) ++ ELSEIF (WIN32) ++ # Link library ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half_static PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex_static PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread_static PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath_static PATHS ${ILMBASE_LIBRARYDIR} ) ++ ELSE (APPLE) ++ SET ( CMAKE_FIND_LIBRARY_SUFFIXES ".a") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ ENDIF (APPLE) ++ ELSE (Ilmbase_USE_STATIC_LIBS) ++ IF (APPLE) ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} ) ++ ELSEIF (WIN32) ++ # Link library ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ # Load library ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") ++ FIND_LIBRARY ( Ilmbase_HALF_DLL ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LOCATION}/bin ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEX_DLL ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEXMATH_DLL ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_DLL ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IMATH_DLL ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ ELSE (APPLE) ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ ENDIF (APPLE) ++ ENDIF () ++ # MUST reset ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ${ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES}) ++ ++ELSE ( ILMBASE_FOUND ) ++ MESSAGE ( FATAL_ERROR "Unable to find ILMBase, ILMBASE_ROOT = $ENV{ILMBASE_ROOT}") ++ENDIF ( ILMBASE_FOUND ) +diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake +index 2f771ad..a381c6d 100644 +--- a/cmake/FindOpenEXR.cmake ++++ b/cmake/FindOpenEXR.cmake +@@ -1,324 +1,87 @@ +-# Copyright (c) 2012-2019 DreamWorks Animation LLC +-# +-# All rights reserved. This software is distributed under the +-# Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ ) +-# +-# Redistributions of source code must retain the above copyright +-# and license notice and the following restrictions and disclaimer. +-# +-# * Neither the name of DreamWorks Animation nor the names of +-# its contributors may be used to endorse or promote products derived +-# from this software without specific prior written permission. +-# +-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL, +-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-# IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE +-# LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00. +-# +-#[=======================================================================[.rst: +- +-FindOpenEXR +------------ +- +-Find OpenEXR include dirs and libraries +- +-Use this module by invoking find_package with the form:: +- +- find_package(OpenEXR +- [version] [EXACT] # Minimum or EXACT version +- [REQUIRED] # Fail with error if OpenEXR is not found +- [COMPONENTS ...] # OpenEXR libraries by their canonical name +- # e.g. "IlmImf" for "libIlmImf" +- ) +- +-IMPORTED Targets +-^^^^^^^^^^^^^^^^ +- +-``OpenEXR::IlmImf`` +- The IlmImf library target. +-``OpenEXR::IlmImfUtil`` +- The IlmImfUtil library target. +- +-Result Variables +-^^^^^^^^^^^^^^^^ +- +-This will define the following variables: +- +-``OpenEXR_FOUND`` +- True if the system has the OpenEXR library. +-``OpenEXR_VERSION`` +- The version of the OpenEXR library which was found. +-``OpenEXR_INCLUDE_DIRS`` +- Include directories needed to use OpenEXR. +-``OpenEXR_LIBRARIES`` +- Libraries needed to link to OpenEXR. +-``OpenEXR_LIBRARY_DIRS`` +- OpenEXR library directories. +-``OpenEXR_DEFINITIONS`` +- Definitions to use when compiling code that uses OpenEXR. +-``OpenEXR_{COMPONENT}_FOUND`` +- True if the system has the named OpenEXR component. +- +-Cache Variables +-^^^^^^^^^^^^^^^ +- +-The following cache variables may also be set: +- +-``OpenEXR_INCLUDE_DIR`` +- The directory containing ``OpenEXR/config-auto.h``. +-``OpenEXR_{COMPONENT}_LIBRARY`` +- Individual component libraries for OpenEXR +-``OpenEXR_{COMPONENT}_DLL`` +- Individual component dlls for OpenEXR on Windows. +- +-Hints +-^^^^^ +- +-Instead of explicitly setting the cache variables, the following variables +-may be provided to tell this module where to look. +- +-``OPENEXR_ROOT`` +- Preferred installation prefix. +-``OPENEXR_INCLUDEDIR`` +- Preferred include directory e.g. /include +-``OPENEXR_LIBRARYDIR`` +- Preferred library directory e.g. /lib +-``SYSTEM_LIBRARY_PATHS`` +- Paths appended to all include and lib searches. +- +-#]=======================================================================] +- +-# Support new if() IN_LIST operator +-if(POLICY CMP0057) +- cmake_policy(SET CMP0057 NEW) +-endif() +- +-mark_as_advanced( +- OpenEXR_INCLUDE_DIR +- OpenEXR_LIBRARY +-) +- +-set(_OPENEXR_COMPONENT_LIST +- IlmImf +- IlmImfUtil +-) +- +-if(OpenEXR_FIND_COMPONENTS) +- set(OPENEXR_COMPONENTS_PROVIDED TRUE) +- set(_IGNORED_COMPONENTS "") +- foreach(COMPONENT ${OpenEXR_FIND_COMPONENTS}) +- if(NOT ${COMPONENT} IN_LIST _OPENEXR_COMPONENT_LIST) +- list(APPEND _IGNORED_COMPONENTS ${COMPONENT}) +- endif() +- endforeach() +- +- if(_IGNORED_COMPONENTS) +- message(STATUS "Ignoring unknown components of OpenEXR:") +- foreach(COMPONENT ${_IGNORED_COMPONENTS}) +- message(STATUS " ${COMPONENT}") +- endforeach() +- list(REMOVE_ITEM OpenEXR_FIND_COMPONENTS ${_IGNORED_COMPONENTS}) +- endif() +-else() +- set(OPENEXR_COMPONENTS_PROVIDED FALSE) +- set(OpenEXR_FIND_COMPONENTS ${_OPENEXR_COMPONENT_LIST}) +-endif() +- +-# Append OPENEXR_ROOT or $ENV{OPENEXR_ROOT} if set (prioritize the direct cmake var) +-set(_OPENEXR_ROOT_SEARCH_DIR "") +- +-if(OPENEXR_ROOT) +- list(APPEND _OPENEXR_ROOT_SEARCH_DIR ${OPENEXR_ROOT}) +-else() +- set(_ENV_OPENEXR_ROOT $ENV{OPENEXR_ROOT}) +- if(_ENV_OPENEXR_ROOT) +- list(APPEND _OPENEXR_ROOT_SEARCH_DIR ${_ENV_OPENEXR_ROOT}) +- endif() +-endif() +- +-# ------------------------------------------------------------------------ +-# Search for OpenEXR include DIR +-# ------------------------------------------------------------------------ +- +-set(_OPENEXR_INCLUDE_SEARCH_DIRS "") +-list(APPEND _OPENEXR_INCLUDE_SEARCH_DIRS +- ${OPENEXR_INCLUDEDIR} +- ${_OPENEXR_ROOT_SEARCH_DIR} +- ${PC_OpenEXR_INCLUDEDIR} +- ${SYSTEM_LIBRARY_PATHS} +-) +- +-# Look for a standard OpenEXR header file. +-find_path(OpenEXR_INCLUDE_DIR OpenEXRConfig.h +- NO_DEFAULT_PATH +- PATHS ${_OPENEXR_INCLUDE_SEARCH_DIRS} +- PATH_SUFFIXES include/OpenEXR OpenEXR +-) +- +-if(EXISTS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h") +- # Get the EXR version information from the config header +- file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h" +- _openexr_version_major_string REGEX "#define OPENEXR_VERSION_MAJOR " +- ) +- string(REGEX REPLACE "#define OPENEXR_VERSION_MAJOR" "" +- _openexr_version_major_string "${_openexr_version_major_string}" +- ) +- string(STRIP "${_openexr_version_major_string}" OpenEXR_VERSION_MAJOR) +- +- file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h" +- _openexr_version_minor_string REGEX "#define OPENEXR_VERSION_MINOR " +- ) +- string(REGEX REPLACE "#define OPENEXR_VERSION_MINOR" "" +- _openexr_version_minor_string "${_openexr_version_minor_string}" +- ) +- string(STRIP "${_openexr_version_minor_string}" OpenEXR_VERSION_MINOR) +- +- unset(_openexr_version_major_string) +- unset(_openexr_version_minor_string) +- +- set(OpenEXR_VERSION ${OpenEXR_VERSION_MAJOR}.${OpenEXR_VERSION_MINOR}) +-endif() +- +-# ------------------------------------------------------------------------ +-# Search for OPENEXR lib DIR +-# ------------------------------------------------------------------------ +- +-set(_OPENEXR_LIBRARYDIR_SEARCH_DIRS "") +- +-# Append to _OPENEXR_LIBRARYDIR_SEARCH_DIRS in priority order +- +-list(APPEND _OPENEXR_LIBRARYDIR_SEARCH_DIRS +- ${OPENEXR_LIBRARYDIR} +- ${_OPENEXR_ROOT_SEARCH_DIR} +- ${PC_OpenEXR_LIBDIR} +- ${SYSTEM_LIBRARY_PATHS} +-) +- +-# Build suffix directories +- +-set(OPENEXR_PATH_SUFFIXES +- lib64 +- lib +-) +- +-if(UNIX ) +- list(INSERT OPENEXR_PATH_SUFFIXES 0 lib/x86_64-linux-gnu) +-endif() +- +-set(_OPENEXR_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) +- +-# library suffix handling +-if(WIN32) +- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES +- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.lib" +- ) +-else() +- if(OPENEXR_USE_STATIC_LIBS) +- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES +- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.a" +- ) +- else() +- if(APPLE) +- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES +- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.dylib" +- ) +- else() +- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES +- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.so" +- ) +- endif() +- endif() +-endif() +- +-set(OpenEXR_LIB_COMPONENTS "") +- +-foreach(COMPONENT ${OpenEXR_FIND_COMPONENTS}) +- find_library(OpenEXR_${COMPONENT}_LIBRARY ${COMPONENT} +- NO_DEFAULT_PATH +- PATHS ${_OPENEXR_LIBRARYDIR_SEARCH_DIRS} +- PATH_SUFFIXES ${OPENEXR_PATH_SUFFIXES} +- ) +- list(APPEND OpenEXR_LIB_COMPONENTS ${OpenEXR_${COMPONENT}_LIBRARY}) +- +- if(WIN32 AND NOT OPENEXR_USE_STATIC_LIBS) +- set(_OPENEXR_TMP ${CMAKE_FIND_LIBRARY_SUFFIXES}) +- set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") +- find_library(OpenEXR_${COMPONENT}_DLL ${COMPONENT} +- NO_DEFAULT_PATH +- PATHS ${_OPENEXR_LIBRARYDIR_SEARCH_DIRS} +- PATH_SUFFIXES bin +- ) +- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_OPENEXR_TMP}) +- unset(_OPENEXR_TMP) +- endif() +- +- if(OpenEXR_${COMPONENT}_LIBRARY) +- set(OpenEXR_${COMPONENT}_FOUND TRUE) +- else() +- set(OpenEXR_${COMPONENT}_FOUND FALSE) +- endif() +-endforeach() +- +-# reset lib suffix +- +-set(CMAKE_FIND_LIBRARY_SUFFIXES ${_OPENEXR_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) +-unset(_OPENEXR_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) +- +-# ------------------------------------------------------------------------ +-# Cache and set OPENEXR_FOUND +-# ------------------------------------------------------------------------ +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(OpenEXR +- FOUND_VAR OpenEXR_FOUND +- REQUIRED_VARS +- OpenEXR_INCLUDE_DIR +- OpenEXR_LIB_COMPONENTS +- VERSION_VAR OpenEXR_VERSION +- HANDLE_COMPONENTS +-) +- +-if(OpenEXR_FOUND) +- set(OpenEXR_LIBRARIES ${OpenEXR_LIB_COMPONENTS}) +- +- # We have to add both include and include/OpenEXR to the include +- # path in case OpenEXR and IlmBase are installed separately +- +- set(OpenEXR_INCLUDE_DIRS) +- list(APPEND OpenEXR_INCLUDE_DIRS +- ${OpenEXR_INCLUDE_DIR}/../ +- ${OpenEXR_INCLUDE_DIR} +- ) +- set(OpenEXR_DEFINITIONS ${PC_OpenEXR_CFLAGS_OTHER}) +- +- set(OpenEXR_LIBRARY_DIRS "") +- foreach(LIB ${OpenEXR_LIB_COMPONENTS}) +- get_filename_component(_OPENEXR_LIBDIR ${LIB} DIRECTORY) +- list(APPEND OpenEXR_LIBRARY_DIRS ${_OPENEXR_LIBDIR}) +- endforeach() +- list(REMOVE_DUPLICATES OpenEXR_LIBRARY_DIRS) +- +- # Configure imported target +- +- foreach(COMPONENT ${OpenEXR_FIND_COMPONENTS}) +- if(NOT TARGET OpenEXR::${COMPONENT}) +- add_library(OpenEXR::${COMPONENT} UNKNOWN IMPORTED) +- set_target_properties(OpenEXR::${COMPONENT} PROPERTIES +- IMPORTED_LOCATION "${OpenEXR_${COMPONENT}_LIBRARY}" +- INTERFACE_COMPILE_OPTIONS "${OpenEXR_DEFINITIONS}" +- INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIRS}" +- ) +- endif() +- endforeach() +-elseif(OpenEXR_FIND_REQUIRED) +- message(FATAL_ERROR "Unable to find OpenEXR") +-endif() ++include(FindPackageHandleStandardArgs) ++ ++find_path(OpenEXR_INCLUDE_DIRS OpenEXR/OpenEXRConfig.h) ++find_path(OPENEXR_INCLUDE_PATHS NAMES ImfRgbaFile.h PATH_SUFFIXES OpenEXR) ++ ++file(STRINGS "${OpenEXR_INCLUDE_DIRS}/OpenEXR/OpenEXRConfig.h" OPENEXR_CONFIG_H) ++ ++string(REGEX REPLACE "^.*define OPENEXR_VERSION_MAJOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MAJOR "${OPENEXR_CONFIG_H}") ++string(REGEX REPLACE "^.*define OPENEXR_VERSION_MINOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MINOR "${OPENEXR_CONFIG_H}") ++set(OpenEXR_LIB_SUFFIX "${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}") ++ ++include(SelectLibraryConfigurations) ++ ++if(NOT OpenEXR_BASE_LIBRARY) ++ find_library(OpenEXR_BASE_LIBRARY_RELEASE NAMES IlmImf-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_BASE_LIBRARY_DEBUG NAMES IlmImf-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_BASE) ++endif() ++ ++if(NOT OpenEXR_UTIL_LIBRARY) ++ find_library(OpenEXR_UTIL_LIBRARY_RELEASE NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_UTIL_LIBRARY_DEBUG NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_UTIL) ++endif() ++ ++if(NOT OpenEXR_HALF_LIBRARY) ++ find_library(OpenEXR_HALF_LIBRARY_RELEASE NAMES Half-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_HALF_LIBRARY_DEBUG NAMES Half-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_HALF) ++endif() ++ ++if(NOT OpenEXR_IEX_LIBRARY) ++ find_library(OpenEXR_IEX_LIBRARY_RELEASE NAMES Iex-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_IEX_LIBRARY_DEBUG NAMES Iex-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_IEX) ++endif() ++ ++if(NOT OpenEXR_MATH_LIBRARY) ++ find_library(OpenEXR_MATH_LIBRARY_RELEASE NAMES Imath-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_MATH_LIBRARY_DEBUG NAMES Imath-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_MATH) ++endif() ++ ++if(NOT OpenEXR_THREAD_LIBRARY) ++ find_library(OpenEXR_THREAD_LIBRARY_RELEASE NAMES IlmThread-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_THREAD_LIBRARY_DEBUG NAMES IlmThread-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_THREAD) ++endif() ++ ++if(NOT OpenEXR_IEXMATH_LIBRARY) ++ find_library(OpenEXR_IEXMATH_LIBRARY_RELEASE NAMES IexMath-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES IexMath-${OpenEXR_LIB_SUFFIX}d) ++ select_library_configurations(OpenEXR_IEXMATH) ++endif() ++ ++set(OPENEXR_HALF_LIBRARY "${OpenEXR_HALF_LIBRARY}") ++set(OPENEXR_IEX_LIBRARY "${OpenEXR_IEX_LIBRARY}") ++set(OPENEXR_IMATH_LIBRARY "${OpenEXR_MATH_LIBRARY}") ++set(OPENEXR_ILMIMF_LIBRARY "${OpenEXR_BASE_LIBRARY}") ++set(OPENEXR_ILMIMFUTIL_LIBRARY "${OpenEXR_UTIL_LIBRARY}") ++set(OPENEXR_ILMTHREAD_LIBRARY "${OpenEXR_THREAD_LIBRARY}") ++ ++set(OpenEXR_LIBRARY "${OpenEXR_BASE_LIBRARY}") ++ ++set(OpenEXR_LIBRARIES ++ ${OpenEXR_LIBRARY} ++ ${OpenEXR_MATH_LIBRARY} ++ ${OpenEXR_IEXMATH_LIBRARY} ++ ${OpenEXR_UTIL_LIBRARY} ++ ${OpenEXR_HALF_LIBRARY} ++ ${OpenEXR_IEX_LIBRARY} ++ ${OpenEXR_THREAD_LIBRARY} ++) ++ ++set(OPENEXR_LIBRARIES ++ ${OPENEXR_HALF_LIBRARY} ++ ${OPENEXR_IEX_LIBRARY} ++ ${OPENEXR_IMATH_LIBRARY} ++ ${OPENEXR_ILMIMF_LIBRARY} ++ ${OPENEXR_ILMTHREAD_LIBRARY} ++) ++ ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR REQUIRED_VARS OpenEXR_LIBRARIES OpenEXR_INCLUDE_DIRS) ++ ++if(OpenEXR_FOUND) ++ set(OPENEXR_FOUND 1) ++endif() diff --git a/ports/openvdb/0003-build-only-necessary-targets.patch b/ports/openvdb/0003-build-only-necessary-targets.patch deleted file mode 100644 index 8be8263a5..000000000 --- a/ports/openvdb/0003-build-only-necessary-targets.patch +++ /dev/null @@ -1,282 +0,0 @@ -diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt -index 9404dbc..94daf8c 100644 ---- a/openvdb/CMakeLists.txt -+++ b/openvdb/CMakeLists.txt -@@ -29,28 +29,31 @@ PROJECT ( OpenVDBCore ) - - set(CMAKE_CXX_STANDARD 11) - -+IF ( OPENVDB_BUILD_TOOLS ) - IF ( USE_GLFW3 ) - FIND_PACKAGE ( GLFW3 REQUIRED ) - SET ( OPENVDB_USE_GLFW_FLAG "-DOPENVDB_USE_GLFW_3" ) - IF ( UNIX AND NOT APPLE ) -- SET ( GLFW_DEPENDENT_LIBRARIES "X11;Xi;Xrandr;Xinerama;Xcursor;Xxf86vm" ) -- ENDIF ( UNIX AND NOT APPLE ) -+ SET ( GLFW_DEPENDENT_LIBRARIES "X11;Xi;Xrandr;Xinerama;Xcursor;Xxf86vm" ) -+ ENDIF () - SET ( GLFW_LINK_LIBRARY ${GLFW3_glfw_LIBRARY} ) - SET ( GLFW_INCLUDE_DIRECTORY ${GLFW3_INCLUDE_DIR} CACHE STRING "GLFW3 include directory") - ELSE () - FIND_PACKAGE ( GLFW REQUIRED ) - IF ( UNIX AND NOT APPLE ) -- SET ( GLFW_DEPENDENT_LIBRARIES "X11;Xi;Xrandr;Xinerama;Xcursor;Xxf86vm" ) -+ SET ( GLFW_DEPENDENT_LIBRARIES "X11;Xi;Xrandr;Xinerama;Xcursor;Xxf86vm" ) - ENDIF () - SET ( GLFW_LINK_LIBRARY ${GLFW_glfw_LIBRARY} ) - SET ( GLFW_INCLUDE_DIRECTORY ${GLFW_INCLUDE_DIR} CACHE STRING "GLFW include directory") - ENDIF () -+ENDIF () - -+IF ( OPENVDB_BUILD_TOOLS ) - IF (WIN32) - FIND_PACKAGE ( GLEW REQUIRED ) --ELSE () -- FIND_PACKAGE ( Threads REQUIRED ) --ENDIF() -+ENDIF () -+ENDIF () -+FIND_PACKAGE ( Threads REQUIRED ) - - # Determine OpenVDB version - #define OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER 4 -@@ -130,7 +133,12 @@ INCLUDE_DIRECTORIES ( SYSTEM ${BLOSC_INCLUDE_DIR} ) - INCLUDE_DIRECTORIES ( SYSTEM ${CPPUNIT_INCLUDE_DIR} ) - - IF (WIN32) -- ADD_DEFINITIONS ( -D_WIN32 -DNOMINMAX -DHALF_EXPORTS -DOPENVDB_DLL ) -+ ADD_DEFINITIONS ( -D__TBB_NO_IMPLICIT_LINKAGE ) -+ ADD_DEFINITIONS ( -D__TBBMALLOC_NO_IMPLICIT_LINKAGE ) -+ ADD_DEFINITIONS ( -D_WIN32 -DNOMINMAX ) -+ IF ( OPENVDB_SHARED ) -+ ADD_DEFINITIONS ( -DOPENEXR_DLL -DOPENVDB_DLL ) -+ ENDIF () - ELSE () - ADD_DEFINITIONS ( -pthread -fPIC ) - ENDIF () -@@ -170,16 +178,21 @@ SET ( OPENVDB_LIBRARY_SOURCE_FILES - - SET_SOURCE_FILES_PROPERTIES ( ${OPENVDB_LIBRARY_SOURCE_FILES} - PROPERTIES -- COMPILE_FLAGS "-DOPENVDB_PRIVATE -DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG}" -+ COMPILE_FLAGS "-DOPENVDB_PRIVATE -DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} $<$:/bigobj>" - ) -- -+ -+IF ( OPENVDB_STATIC ) - ADD_LIBRARY ( openvdb_static STATIC - ${OPENVDB_LIBRARY_SOURCE_FILES} - ) -+ENDIF () -+IF ( OPENVDB_SHARED ) - ADD_LIBRARY ( openvdb_shared SHARED - ${OPENVDB_LIBRARY_SOURCE_FILES} - ) -+ENDIF () - -+IF ( OPENVDB_STATIC ) - TARGET_LINK_LIBRARIES ( openvdb_static - ${Boost_IOSTREAMS_LIBRARY} - ${Boost_SYSTEM_LIBRARY} -@@ -188,6 +201,8 @@ TARGET_LINK_LIBRARIES ( openvdb_static - ${ZLIB_LIBRARY} - ${BLOSC_blosc_LIBRARY} - ) -+ENDIF () -+IF ( OPENVDB_SHARED ) - TARGET_LINK_LIBRARIES ( openvdb_shared - ${Boost_IOSTREAMS_LIBRARY} - ${Boost_SYSTEM_LIBRARY} -@@ -196,7 +211,9 @@ TARGET_LINK_LIBRARIES ( openvdb_shared - ${ZLIB_LIBRARY} - ${BLOSC_blosc_LIBRARY} - ) -+ENDIF () - -+IF ( OPENVDB_STATIC ) - IF (WIN32) - SET_TARGET_PROPERTIES ( openvdb_static - PROPERTIES OUTPUT_NAME libopenvdb -@@ -205,8 +222,10 @@ ELSE() - SET_TARGET_PROPERTIES ( openvdb_static - PROPERTIES OUTPUT_NAME openvdb - ) --ENDIF() -+ENDIF () -+ENDIF () - -+IF ( OPENVDB_SHARED ) - SET_TARGET_PROPERTIES( - openvdb_shared - PROPERTIES -@@ -214,13 +233,15 @@ SET_TARGET_PROPERTIES( - SOVERSION ${OPENVDB_MAJOR_VERSION_NUMBER}.${OPENVDB_MINOR_VERSION_NUMBER} - VERSION ${OPENVDB_MAJOR_VERSION_NUMBER}.${OPENVDB_MINOR_VERSION_NUMBER}.${OPENVDB_PATCH_VERSION_NUMBER} - ) -+ENDIF () - - SET ( VDB_PRINT_SOURCE_FILES cmd/openvdb_print/main.cc ) - SET_SOURCE_FILES_PROPERTIES ( ${VDB_PRINT_SOURCE_FILES} - PROPERTIES -- COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG}" -+ COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} $<$:/bigobj>" - ) - -+IF ( OPENVDB_BUILD_TOOLS ) - ADD_EXECUTABLE ( vdb_print - ${VDB_PRINT_SOURCE_FILES} - ) -@@ -229,14 +250,19 @@ TARGET_LINK_LIBRARIES ( vdb_print - openvdb_shared - ${CMAKE_THREAD_LIBS_INIT} - ${BLOSC_blosc_LIBRARY} -+ ) -+ -+IF (NOT WIN32) -+TARGET_LINK_LIBRARIES ( vdb_print - m - stdc++ - ) -+ENDIF () - - SET ( VDB_RENDER_SOURCE_FILES cmd/openvdb_render/main.cc ) - SET_SOURCE_FILES_PROPERTIES ( ${VDB_RENDER_SOURCE_FILES} - PROPERTIES -- COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG}" -+ COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} $<$:/bigobj>" - ) - ADD_EXECUTABLE ( vdb_render - ${VDB_RENDER_SOURCE_FILES} -@@ -249,9 +275,14 @@ TARGET_LINK_LIBRARIES ( vdb_render - ${Openexr_ILMIMF_LIBRARY} - ${Ilmbase_ILMTHREAD_LIBRARY} - ${Ilmbase_IEX_LIBRARY} -+ ) -+ -+IF (NOT WIN32) -+TARGET_LINK_LIBRARIES ( vdb_render - m - stdc++ - ) -+ENDIF () - - SET ( VDB_VIEW_SOURCE_FILES - cmd/openvdb_view/main.cc -@@ -263,29 +294,38 @@ SET ( VDB_VIEW_SOURCE_FILES - ) - SET_SOURCE_FILES_PROPERTIES ( ${VDB_VIEW_SOURCE_FILES} - PROPERTIES -- COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} -DGL_GLEXT_PROTOTYPES=1" -+ COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} -DGL_GLEXT_PROTOTYPES=1 $<$:/bigobj>" -+ ) -+ -+ADD_EXECUTABLE ( vdb_view -+ ${VDB_VIEW_SOURCE_FILES} - ) --IF (NOT WIN32) -- ADD_EXECUTABLE ( vdb_view -- ${VDB_VIEW_SOURCE_FILES} -- ) - -- target_include_directories ( vdb_view SYSTEM PRIVATE ${Boost_INCLUDE_DIR} ) -+target_include_directories ( vdb_view SYSTEM PRIVATE ${Boost_INCLUDE_DIR} ) - -- TARGET_LINK_LIBRARIES ( vdb_view -- openvdb_shared -- ${Boost_THREAD_LIBRARY} -- ${OPENGL_gl_LIBRARY} -- ${OPENGL_glu_LIBRARY} -- ${COCOA_LIBRARY} -- ${IOKIT_LIBRARY} -- ${COREVIDEO_LIBRARY} -- ${GLFW_LINK_LIBRARY} -- ${GLFW_DEPENDENT_LIBRARIES} -- ${GLEW_GLEW_LIBRARY} -- m -- stdc++ -- ) -+TARGET_LINK_LIBRARIES ( vdb_view -+ openvdb_shared -+ ${Boost_LIBRARIES} -+ ${OPENGL_gl_LIBRARY} -+ ${OPENGL_glu_LIBRARY} -+ ${GLFW_LINK_LIBRARY} -+ ${GLFW_DEPENDENT_LIBRARIES} -+ ${GLEW_GLEW_LIBRARY} -+ ) -+IF (APPLE) -+TARGET_LINK_LIBRARIES ( vdb_view -+ ${COCOA_LIBRARY} -+ ${IOKIT_LIBRARY} -+ ${COREVIDEO_LIBRARY} -+) -+ENDIF () -+IF (NOT WIN32) -+TARGET_LINK_LIBRARIES ( vdb_view -+ m -+ stdc++ -+ ) -+ -+ENDIF () - ENDIF () - - SET ( UNITTEST_SOURCE_FILES -@@ -398,7 +438,7 @@ IF ( OPENVDB_BUILD_UNITTESTS ) - - ADD_TEST ( vdb_unit_test vdb_test ) - --ENDIF (OPENVDB_BUILD_UNITTESTS) -+ENDIF () - - # Doxygen docmentation - IF (OPENVDB_BUILD_DOCS) -@@ -419,26 +459,29 @@ IF (OPENVDB_BUILD_DOCS) - ENDIF () - - # Installation --IF ( NOT WIN32 ) -+IF ( OPENVDB_BUILD_TOOLS ) - INSTALL ( TARGETS - vdb_view - DESTINATION - bin - ) -+ INSTALL ( TARGETS -+ vdb_print -+ vdb_render -+ DESTINATION -+ bin -+ ) - ENDIF () --INSTALL ( TARGETS -- vdb_print -- vdb_render -- DESTINATION -- bin -- ) - --INSTALL ( TARGETS -- openvdb_static -- DESTINATION -- lib -- ) -+IF ( OPENVDB_STATIC) -+ INSTALL ( TARGETS -+ openvdb_static -+ DESTINATION -+ lib -+ ) -+ENDIF () - -+IF ( OPENVDB_SHARED ) - IF (WIN32) - INSTALL ( TARGETS - openvdb_shared -@@ -452,6 +495,7 @@ ELSE() - lib - ) - ENDIF () -+ENDIF () - - INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR} DESTINATION include - FILES_MATCHING PATTERN "*.h" diff --git a/ports/openvdb/0003-fix-cmake.patch b/ports/openvdb/0003-fix-cmake.patch new file mode 100644 index 000000000..b70a4756f --- /dev/null +++ b/ports/openvdb/0003-fix-cmake.patch @@ -0,0 +1,90 @@ +diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt +index b84d3e6..524a59e 100644 +--- a/openvdb/CMakeLists.txt ++++ b/openvdb/CMakeLists.txt +@@ -71,13 +71,13 @@ message(STATUS "----------------------------------------------------") + # Collect and configure lib dependencies + + if(USE_EXR) +- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED) +- find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED) ++ find_package(IlmBase REQUIRED) ++ find_package(OpenEXR REQUIRED) + else() +- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half) ++ find_package(IlmBase REQUIRED COMPONENTS Half) + endif() + +-find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbb) ++find_package(TBB CONFIG REQUIRED) + find_package(ZLIB ${MINIMUM_ZLIB_VERSION} REQUIRED) + + if(USE_LOG4CPLUS) +@@ -115,15 +115,15 @@ endif() + set(OPENVDB_CORE_DEPENDENT_LIBS + Boost::iostreams + Boost::system +- IlmBase::Half ++ ${Ilmbase_HALF_LIBRARY} + ) + + if(USE_EXR) + list(APPEND OPENVDB_CORE_DEPENDENT_LIBS +- IlmBase::IlmThread +- IlmBase::Iex +- IlmBase::Imath +- OpenEXR::IlmImf ++ ${Ilmbase_ILMTHREAD_LIBRARY} ++ ${Ilmbase_IEX_LIBRARY} ++ ${Ilmbase_IMATH_LIBRARY} ++ ${OPENEXR_ILMIMF_LIBRARY} + ) + endif() + +@@ -135,7 +135,7 @@ endif() + # See FindOpenVDB.cmake + + if(USE_BLOSC) +- list(APPEND OPENVDB_CORE_DEPENDENT_LIBS Blosc::blosc) ++ list(APPEND OPENVDB_CORE_DEPENDENT_LIBS ${BLOSC_blosc_LIBRARY}) + endif() + + list(APPEND OPENVDB_CORE_DEPENDENT_LIBS +@@ -160,7 +160,11 @@ endif() + + # @todo Should be target definitions + if(WIN32) +- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL) ++ add_definitions(-D_WIN32 -DNOMINMAX) ++ add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE -D__TBBMALLOC_NO_IMPLICIT_LINKAGE) ++ if (OPENVDB_SHARED) ++ add_definitions(-DOPENEXR_DLL -DOPENVDB_DLL) ++ endif() + endif() + + ##### Core library configuration +@@ -374,6 +378,7 @@ list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_PRIVATE") + if(USE_BLOSC) + list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_USE_BLOSC") + endif() ++list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "$<$:/bigobj>") + + # Public defines + +diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt +index 124bc3c..d58b3fe 100644 +--- a/openvdb/cmd/CMakeLists.txt ++++ b/openvdb/cmd/CMakeLists.txt +@@ -155,9 +155,9 @@ if(OPENVDB_BUILD_VDB_RENDER) + # headers + + target_link_libraries(vdb_render +- OpenEXR::IlmImf +- IlmBase::IlmThread +- IlmBase::Iex ++ ${OPENEXR_ILMIMF_LIBRARY} ++ ${Ilmbase_ILMTHREAD_LIBRARY} ++ ${Ilmbase_IEX_LIBRARY} + ${OPENVDB_BINARIES_DEPENDENT_LIBS} + ) + diff --git a/ports/openvdb/0004-add-necessary-head.patch b/ports/openvdb/0004-add-necessary-head.patch deleted file mode 100644 index bbe7246b1..000000000 --- a/ports/openvdb/0004-add-necessary-head.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/openvdb/viewer/ClipBox.h b/openvdb/viewer/ClipBox.h -index ad62d39..c68c5be 100644 ---- a/openvdb/viewer/ClipBox.h -+++ b/openvdb/viewer/ClipBox.h -@@ -37,6 +37,7 @@ - #include - #include - #else -+#include - #include - #include - #endif -diff --git a/openvdb/viewer/Font.h b/openvdb/viewer/Font.h -index da62993..b341165 100644 ---- a/openvdb/viewer/Font.h -+++ b/openvdb/viewer/Font.h -@@ -37,6 +37,7 @@ - #include - #include - #else -+#include - #include - #include - #endif -diff --git a/openvdb/viewer/RenderModules.h b/openvdb/viewer/RenderModules.h -index b9fa5b1..fd38a50 100644 ---- a/openvdb/viewer/RenderModules.h -+++ b/openvdb/viewer/RenderModules.h -@@ -31,6 +31,7 @@ - #ifndef OPENVDB_VIEWER_RENDERMODULES_HAS_BEEN_INCLUDED - #define OPENVDB_VIEWER_RENDERMODULES_HAS_BEEN_INCLUDED - -+#include - #include - #include - #include -@@ -41,6 +42,7 @@ - #include - - #if defined(__APPLE__) || defined(MACOSX) -+#include - #include - #include - #else -diff --git a/openvdb/viewer/Viewer.cc b/openvdb/viewer/Viewer.cc -index 31bb7a4..88bd308 100644 ---- a/openvdb/viewer/Viewer.cc -+++ b/openvdb/viewer/Viewer.cc -@@ -31,9 +31,9 @@ - #include "Viewer.h" - - #include "Camera.h" -+#include "RenderModules.h" - #include "ClipBox.h" - #include "Font.h" --#include "RenderModules.h" - #include // for formattedInt() - #include - #include diff --git a/ports/openvdb/CONTROL b/ports/openvdb/CONTROL index 77a06c78c..5a49417d1 100644 --- a/ports/openvdb/CONTROL +++ b/ports/openvdb/CONTROL @@ -1,6 +1,6 @@ Source: openvdb -Version: 6.0.0-2 -Build-Depends: boost-ptr-container, openexr, tbb, blosc, boost-iostreams, boost-system, boost-thread, boost-date-time, boost-any, boost-uuid, boost-interprocess +Version: 6.1.0 +Build-Depends: boost-ptr-container, openexr, tbb, blosc, boost-iostreams, boost-system, boost-thread, boost-date-time, boost-any, boost-uuid, boost-interprocess, ilmbase Homepage: https://github.com/dreamworksanimation/openvdb Description: Sparse volume data structure and tools diff --git a/ports/openvdb/blosc.patch b/ports/openvdb/blosc.patch deleted file mode 100644 index 2b9782a1b..000000000 --- a/ports/openvdb/blosc.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake -index 5ac3780c..61ba83bc 100644 ---- a/cmake/FindBlosc.cmake -+++ b/cmake/FindBlosc.cmake -@@ -45,8 +45,8 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS ( Blosc - - IF ( BLOSC_FOUND ) - -- SET ( BLOSC_LIBRARYDIR ${BLOSC_LOCATION}/lib -- CACHE STRING "Blosc library directories") -+# SET ( BLOSC_LIBRARYDIR ${BLOSC_LOCATION}/lib -+# CACHE STRING "Blosc library directories") - - SET ( _blosc_library_name "blosc" ) - -@@ -61,8 +61,6 @@ IF ( BLOSC_FOUND ) - ENDIF() - - FIND_LIBRARY ( BLOSC_blosc_LIBRARY ${_blosc_library_name} -- PATHS ${BLOSC_LIBRARYDIR} -- NO_DEFAULT_PATH - NO_SYSTEM_ENVIRONMENT_PATH - ) - diff --git a/ports/openvdb/portfile.cmake b/ports/openvdb/portfile.cmake index d1c4cb8ce..1d837fcf9 100644 --- a/ports/openvdb/portfile.cmake +++ b/ports/openvdb/portfile.cmake @@ -3,15 +3,13 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO AcademySoftwareFoundation/openvdb - REF v6.0.0 - SHA512 6b9e267fff46647b39e1e6faa12059442196c1858df1fda1515cfc375e25bc3033e2828c80e63a652509cfba386376e022cebf81ec85aaccece421b0c721529b + REF v6.1.0 + SHA512 99ebbb50104ef87792ab73989e8714c4f283fb02d04c3033126b5f0d927ff7bbdebe35c8214ded841692941d8ed8ae551fd6d1bf90ad7dc07bedc3b38b9c4b38 HEAD_REF master PATCHES - 0001-fix-cmake-modules.patch - 0002-add-custom-options.patch - 0003-build-only-necessary-targets.patch - 0004-add-necessary-head.patch - blosc.patch + 0001-remove-pkgconfig.patch + 0002-fix-cmake-modules.patch + 0003-fix-cmake.patch ) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -38,29 +36,36 @@ vcpkg_configure_cmake( -DOPENVDB_BUILD_PYTHON_MODULE=OFF -DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF -DUSE_GLFW3=ON - -DOPENVDB_STATIC=${OPENVDB_STATIC} - -DOPENVDB_SHARED=${OPENVDB_SHARED} - -DOPENVDB_BUILD_TOOLS=${OPENVDB_BUILD_TOOLS} + -DOPENVDB_CORE_STATIC=${OPENVDB_STATIC} + -DOPENVDB_CORE_SHARED=${OPENVDB_SHARED} + -DOPENVDB_BUILD_VDB_PRINT=${OPENVDB_BUILD_TOOLS} + -DOPENVDB_BUILD_VDB_VIEW=${OPENVDB_BUILD_TOOLS} + #-DOPENVDB_BUILD_VDB_RENDER=${OPENVDB_BUILD_TOOLS} # Enable vdb_render when https://github.com/openexr/openexr/issues/302 is fixed + -DOPENVDB_BUILD_VDB_LOD=${OPENVDB_BUILD_TOOLS} ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenVDB TARGET_PATH share/openvdb) + vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) if (OPENVDB_BUILD_TOOLS) # copy tools to tools/openvdb directory file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_print.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_print.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_render.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_render.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_view.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_view.exe) + #file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_render.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_render.exe) + #file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_view.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_view.exe) # vdb_view does not support win32 currently. + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_lod.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_lod.exe) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) # remove debug versions of tools - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_render.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_print.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_view.exe) + #file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_render.exe) + #file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_view.exe) # vdb_view does not support win32 currently. + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_lod.exe) endif() # Handle copyright From faf17a0f4a497eb5ac28389f3be4aa3612aa5d86 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Wed, 26 Jun 2019 18:34:19 +0100 Subject: [PATCH 0064/1066] Fix homepage for range-v3(-vs2015) (#7049) --- ports/range-v3-vs2015/CONTROL | 1 + ports/range-v3/CONTROL | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/range-v3-vs2015/CONTROL b/ports/range-v3-vs2015/CONTROL index 62c9f63ce..34ce349e1 100644 --- a/ports/range-v3-vs2015/CONTROL +++ b/ports/range-v3-vs2015/CONTROL @@ -1,3 +1,4 @@ Source: range-v3-vs2015 Version: 20151130-vcpkg5 +Homepage: https://github.com/Microsoft/Range-V3-VS2015 Description: Range library for C++11/14/17. diff --git a/ports/range-v3/CONTROL b/ports/range-v3/CONTROL index fb534ac29..1e1274d4b 100644 --- a/ports/range-v3/CONTROL +++ b/ports/range-v3/CONTROL @@ -1,4 +1,4 @@ Source: range-v3 Version: 0.5.0 -Homepage: https://github.com/Microsoft/Range-V3-VS2015 +Homepage: https://github.com/ericniebler/range-v3 Description: Range library for C++11/14/17. From 64d8f9503120b8d51643129efd8e32341638e106 Mon Sep 17 00:00:00 2001 From: Phoebe <925731795@qq.com> Date: Thu, 27 Jun 2019 01:36:16 +0800 Subject: [PATCH 0065/1066] [Boost-variant] Upgrade to 1.70.0 (#7047) * [Boost-variant] Upgrade to 1.70.0 * Update patch --- ports/boost-variant/CONTROL | 2 +- ports/boost-variant/fix-regression-1.70.patch | 47 +++++++++++++++++++ ports/boost-variant/portfile.cmake | 6 ++- 3 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 ports/boost-variant/fix-regression-1.70.patch diff --git a/ports/boost-variant/CONTROL b/ports/boost-variant/CONTROL index 395d00758..5aec459fd 100644 --- a/ports/boost-variant/CONTROL +++ b/ports/boost-variant/CONTROL @@ -1,6 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-variant -Version: 1.69.0 +Version: 1.70.0 Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-move, boost-mpl, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers Homepage: https://github.com/boostorg/variant Description: Boost variant module diff --git a/ports/boost-variant/fix-regression-1.70.patch b/ports/boost-variant/fix-regression-1.70.patch new file mode 100644 index 000000000..79c0e2c23 --- /dev/null +++ b/ports/boost-variant/fix-regression-1.70.patch @@ -0,0 +1,47 @@ +diff --git a/include/boost/variant/detail/apply_visitor_unary.hpp b/include/boost/variant/detail/apply_visitor_unary.hpp +index 71610cb..c3a741e 100644 +--- a/include/boost/variant/detail/apply_visitor_unary.hpp ++++ b/include/boost/variant/detail/apply_visitor_unary.hpp +@@ -23,6 +23,7 @@ + # include + # include + # include ++# include + # include + # include + #endif +@@ -85,7 +86,7 @@ namespace detail { namespace variant { + // This class serves only metaprogramming purposes. none of its methods must be called at runtime! + template + struct result_multideduce1 { +- typedef typename Variant::types types; ++ typedef typename remove_reference::type::types types; + typedef typename boost::mpl::begin::type begin_it; + typedef typename boost::mpl::advance< + begin_it, boost::mpl::int_::type::value - 1> +@@ -95,14 +96,14 @@ struct result_multideduce1 { + struct deduce_impl { + typedef typename boost::mpl::next::type next_t; + typedef typename boost::mpl::deref::type value_t; +- typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< value_t >() ) ++ typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() ) + : boost::declval< typename deduce_impl::type >()) type; + }; + + template + struct deduce_impl { + typedef typename boost::mpl::deref::type value_t; +- typedef decltype(boost::declval< Visitor& >()( boost::declval< value_t >() )) type; ++ typedef decltype(boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )) type; + }; + + typedef typename deduce_impl::type type; +@@ -132,7 +133,7 @@ inline decltype(auto) apply_visitor(Visitor&& visitor, Visitable&& visitable, + boost::detail::variant::has_result_type + >::type* = 0) + { +- boost::detail::variant::result_wrapper1::type> cpp14_vis(::boost::forward(visitor)); ++ boost::detail::variant::result_wrapper1 cpp14_vis(::boost::forward(visitor)); + return ::boost::forward(visitable).apply_visitor(cpp14_vis); + } + diff --git a/ports/boost-variant/portfile.cmake b/ports/boost-variant/portfile.cmake index 95352b3f0..a1d8be528 100644 --- a/ports/boost-variant/portfile.cmake +++ b/ports/boost-variant/portfile.cmake @@ -5,9 +5,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/variant - REF boost-1.69.0 - SHA512 281f2a89317603e4875d35388d941c3a174024618f2f9c255344e69d43d43509de2947e35374d8498e337326c7637805160a84f3b2b4da8811660c8429e11be0 + REF boost-1.70.0 + SHA512 e5a555c666bd692a5ed6e556a66d93db82707357ae5f7e62af8565e5bf56b134adefb3049c38af72f420a969308f120b8270a9e9187eac984b74573b8e9e1d75 HEAD_REF master + PATCHES + fix-regression-1.70.patch ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) From af1c9e10fc573ade3824464e58799289b1d4b069 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Wed, 26 Jun 2019 10:37:04 -0700 Subject: [PATCH 0066/1066] [libmupdf] Update the port to version 1.15.0 (#7046) --- ports/libmupdf/CMakeLists.txt | 2 +- ports/libmupdf/CONTROL | 2 +- ports/libmupdf/portfile.cmake | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/libmupdf/CMakeLists.txt b/ports/libmupdf/CMakeLists.txt index 6018c50aa..daafef74c 100644 --- a/ports/libmupdf/CMakeLists.txt +++ b/ports/libmupdf/CMakeLists.txt @@ -22,7 +22,7 @@ file(GLOB_RECURSE SOURCES "source/*.c" "generated/*.c") list(FILTER SOURCES EXCLUDE REGEX "source/tools/[a-z]*\\.c$") add_library(libmupdf ${SOURCES}) -target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DNO_ICC) +target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0) target_include_directories(libmupdf PUBLIC include diff --git a/ports/libmupdf/CONTROL b/ports/libmupdf/CONTROL index 4de343cb3..1285b8c85 100644 --- a/ports/libmupdf/CONTROL +++ b/ports/libmupdf/CONTROL @@ -1,5 +1,5 @@ Source: libmupdf -Version: 1.12.0-2 +Version: 1.15.0 Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl, glfw3, openjpeg, jbig2dec Homepage: https://github.com/ArtifexSoftware/mupdf Description: a lightweight PDF, XPS, and E-book library diff --git a/ports/libmupdf/portfile.cmake b/ports/libmupdf/portfile.cmake index 0569b5505..937daa4c4 100644 --- a/ports/libmupdf/portfile.cmake +++ b/ports/libmupdf/portfile.cmake @@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArtifexSoftware/mupdf - REF 1.12.0 - SHA512 893a1958e34355acf73624e9c47f4a97adf13d5fe33604ac384df9ac22a56ef7c18e02143eaffc3c2a08f460e4c71fee00c094b6d6696f8446977bb18f65e3da + REF 1.15.0 + SHA512 9f47a79a2040ff3da885f54d143a7c44712f8a08650fca1d2be21199a7103364a35e28a1832708c2b7752b11c95bf0755ae6c922afc35ee8ae639da7a6ac03b0 HEAD_REF master PATCHES Fix-error-C2169.patch From 94494ddf6ccdc2d44b78b4df4c66af285cb1f2bf Mon Sep 17 00:00:00 2001 From: Leonid Pospelov Date: Wed, 26 Jun 2019 19:41:48 +0200 Subject: [PATCH 0067/1066] [cpp-httplib] Add new port (#7037) --- ports/cpp-httplib/CONTROL | 4 ++++ ports/cpp-httplib/portfile.cmake | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 ports/cpp-httplib/CONTROL create mode 100644 ports/cpp-httplib/portfile.cmake diff --git a/ports/cpp-httplib/CONTROL b/ports/cpp-httplib/CONTROL new file mode 100644 index 000000000..66d4938f0 --- /dev/null +++ b/ports/cpp-httplib/CONTROL @@ -0,0 +1,4 @@ +Source: cpp-httplib +Version: 0.2.0 +Homepage: https://github.com/yhirose/cpp-httplib +Description: A single file C++11 header-only HTTP/HTTPS server and client library diff --git a/ports/cpp-httplib/portfile.cmake b/ports/cpp-httplib/portfile.cmake new file mode 100644 index 000000000..9e85b57e3 --- /dev/null +++ b/ports/cpp-httplib/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +set(VERSION 0.2.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yhirose/cpp-httplib + REF 2f8479016fa9af9a63056571992b31c32741d89b + SHA512 2f17a6a95c849a5c873a65e8da8bf85311f0152e439a973354c24d02ee9e6c3b0f3a456b60f90637ea4588d9ac09f7e41f42199de61315754e5fe9eecbb657ed + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/httplib.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright +configure_file( + ${SOURCE_PATH}/LICENSE + ${CURRENT_PACKAGES_DIR}/share/cpp-httplib/copyright + COPYONLY +) From 7a3818f575fadf1ded97244f803930fe2464f190 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 26 Jun 2019 11:47:39 -0700 Subject: [PATCH 0068/1066] [angle] Update to latest master (#6892) * [angle] Update to latest master * [angle] Add gpu_info_util --- ports/angle/CMakeLists.txt | 57 ++++++++++++++++++++++++++++---------- ports/angle/CONTROL | 2 +- ports/angle/portfile.cmake | 4 +-- 3 files changed, 45 insertions(+), 18 deletions(-) diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index f83f6294e..7d791db84 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -42,25 +42,25 @@ include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) ########## # angle::common if(WIN32) - set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix") + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix|android_") elseif(LINUX) - set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac") + set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac|android_") elseif(APPLE) - set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win") + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win|android_") endif() file(GLOB ANGLE_COMMON_SOURCES - "src/common/*.h" - "src/common/*.inl" - "src/common/*.cpp" - "src/common/third_party/base/anglebase/*.h" - "src/common/third_party/base/anglebase/*.cc" - "src/common/third_party/base/anglebase/containers/*.h" - "src/common/third_party/base/anglebase/numerics/*.h" - "src/common/third_party/base/anglebase/numerics/*.cc" - "src/common/third_party/xxhash/*.h" - "src/common/third_party/xxhash/*.c" - "src/common/third_party/smhasher/src/*.h" - "src/common/third_party/smhasher/src/*.cpp") + "src/common/*.h" + "src/common/*.inl" + "src/common/*.cpp" + "src/common/third_party/base/anglebase/*.h" + "src/common/third_party/base/anglebase/*.cc" + "src/common/third_party/base/anglebase/containers/*.h" + "src/common/third_party/base/anglebase/numerics/*.h" + "src/common/third_party/base/anglebase/numerics/*.cc" + "src/common/third_party/xxhash/*.h" + "src/common/third_party/xxhash/*.c" + "src/common/third_party/smhasher/src/*.h" + "src/common/third_party/smhasher/src/*.cpp") list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}") add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) target_include_directories(angle_common PUBLIC src/common/third_party/base) @@ -191,6 +191,32 @@ if(WIN32) add_library(angle::renderer::d3d ALIAS angle_renderer_d3d) endif() +## angle::gpu_info_util +file(GLOB ANGLE_GPU_INFO_UTIL_SOURCES + "src/gpu_info_util/SystemInfo.h" + "src/gpu_info_util/SystemInfo_internal.h" + "src/gpu_info_util/SystemInfo.cpp" +) +add_library(angle_gpu_info_util STATIC ${ANGLE_GPU_INFO_UTIL_SOURCES}) +if(WIN32) + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_win.cpp") + target_link_libraries(angle_gpu_info_util PRIVATE setupapi.lib dxgi.lib) +elseif(APPLE) + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_mac.mm") + find_library(IOKit IOKit) + find_library(CoreFoundation CoreFoundation) + find_library(CoreGraphics CoreGraphics) + target_link_libraries(angle_gpu_info_util PRIVATE ${IOKit} ${CoreFoundation} ${CoreGraphics}) +elseif(LINUX) + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_linux.cpp" "src/gpu_info_util/SystemInfo_x11.cpp") + target_compile_definitions(angle_gpu_info_util PRIVATE GPU_INFO_USE_X11) + target_link_libraries(angle_gpu_info_util PRIVATE X11 Xi Xext) +elseif(ANDROID) + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_android.cpp") +endif() +target_link_libraries(angle_gpu_info_util PRIVATE angle::common) +add_library(angle::gpu_info_util ALIAS angle_gpu_info_util) + ## Core libANGLE library if(WIN32) set(LIBANGLE_SOURCES_PLATFORM @@ -252,6 +278,7 @@ add_library(libANGLE STATIC ${LIBANGLE_SOURCES}) target_link_libraries(libANGLE PRIVATE angle::common angle::image_util + angle::gpu_info_util angle::translator angle::preprocessor ${LIBANGLE_RENDERER_PLATFORM} diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL index cac71fae2..faa26f276 100644 --- a/ports/angle/CONTROL +++ b/ports/angle/CONTROL @@ -1,5 +1,5 @@ Source: angle -Version: 2019-03-13-c2ee2cc-3 +Version: 2019-06-13 Homepage: https://github.com/google/angle Description: A conformant OpenGL ES implementation for Windows, Mac and Linux. The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support. diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index f0bda4a3d..48a6f7a3c 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -15,8 +15,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/angle - REF chromium/3672 - SHA512 dd6a05f0f1f4544b8646c41ffcb4d5e3b41f5261771ada47889345a24d4e55e6370df55a26c354a7073efcde307644cec6c6064ea6fe498ed6b52c3017249f81 + REF 0d3cf7085c8e953e78d4fa0656b26ee93d005452 + SHA512 91550749933e278a72ae1094178ea28b36ee2b2fa553549477596ee772d1a39653386b3f3a9f168b0840a1511b7d31384b4e2d53cd5b5629028ca9c5a18a9288 PATCHES 001-fix-uwp.patch ) From db0c6043dcee80bbdbea6a320525f5fcf0b7dbda Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 26 Jun 2019 11:49:39 -0700 Subject: [PATCH 0069/1066] [curl] Revert revert of `-imp` suffix removal. (#6698) * [curl] Revert revert of `-imp` suffix removal. * [idevicerestore][libideviceactivation] Simplify dependency on curl * [curl] Trivial change to provoke rebuild --- ports/curl/0005_remove_imp_suffix.patch | 13 +++++++ ports/curl/portfile.cmake | 11 +++++- ports/idevicerestore/CONTROL | 2 +- ports/idevicerestore/libcurl_imp.patch | 40 -------------------- ports/idevicerestore/portfile.cmake | 13 +------ ports/libideviceactivation/CONTROL | 2 +- ports/libideviceactivation/libcurl_imp.patch | 40 -------------------- ports/libideviceactivation/portfile.cmake | 15 +------- 8 files changed, 27 insertions(+), 109 deletions(-) create mode 100644 ports/curl/0005_remove_imp_suffix.patch delete mode 100644 ports/idevicerestore/libcurl_imp.patch delete mode 100644 ports/libideviceactivation/libcurl_imp.patch diff --git a/ports/curl/0005_remove_imp_suffix.patch b/ports/curl/0005_remove_imp_suffix.patch new file mode 100644 index 000000000..356af2d52 --- /dev/null +++ b/ports/curl/0005_remove_imp_suffix.patch @@ -0,0 +1,13 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index eca9a8a..6f72955 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -97,7 +97,7 @@ endif() + set_target_properties(${LIB_NAME} PROPERTIES PREFIX "") + set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "") + +-if(WIN32) ++if(WIN32 AND 0) + if(BUILD_SHARED_LIBS) + # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib" + set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib") diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 5366fe88c..091fe9205 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( 0002_fix_uwp.patch 0003_fix_libraries.patch 0004_nghttp2_staticlib.patch + 0005_remove_imp_suffix.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) @@ -140,17 +141,23 @@ if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/curl${EXECUTABLE_SUFFIX}") endif() endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib OR EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib) + # Because vcpkg only ever installs one or the other, there is no need to have the libraries be different names. + # Using the same name improves compatibility, because downstream projects can always rely on "libcurl.lib" + message(FATAL_ERROR "Curl's import library name should be consistent with the static library name.") +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) else() file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) endif() file(READ ${CURRENT_PACKAGES_DIR}/include/curl/curl.h CURL_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") string(REPLACE "#ifdef CURL_STATICLIB" "#if 1" CURL_H "${CURL_H}") else() string(REPLACE "#ifdef CURL_STATICLIB" "#if 0" CURL_H "${CURL_H}") diff --git a/ports/idevicerestore/CONTROL b/ports/idevicerestore/CONTROL index 36c31d97c..ca6cabbd0 100644 --- a/ports/idevicerestore/CONTROL +++ b/ports/idevicerestore/CONTROL @@ -1,4 +1,4 @@ Source: idevicerestore -Version: 1.0.12-2 +Version: 1.0.12-3 Description: Restore/upgrade firmware of iOS devices Build-Depends: libimobiledevice, curl, libirecovery, libzip \ No newline at end of file diff --git a/ports/idevicerestore/libcurl_imp.patch b/ports/idevicerestore/libcurl_imp.patch deleted file mode 100644 index f93dfb2b5..000000000 --- a/ports/idevicerestore/libcurl_imp.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/idevicerestore.vcxproj b/idevicerestore.vcxproj -index fa209fae..cf89306b 100644 ---- a/idevicerestore.vcxproj -+++ b/idevicerestore.vcxproj -@@ -94,7 +94,7 @@ - _MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS - - -- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) -+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl-d_imp.lib;%(AdditionalDependencies) - - - -@@ -105,7 +105,7 @@ - _MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS - - -- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) -+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl-d_imp.lib;%(AdditionalDependencies) - - - -@@ -120,7 +120,7 @@ - - true - true -- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) -+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl_imp.lib;%(AdditionalDependencies) - - - -@@ -135,7 +135,7 @@ - - true - true -- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) -+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl_imp.lib;%(AdditionalDependencies) - - - diff --git a/ports/idevicerestore/portfile.cmake b/ports/idevicerestore/portfile.cmake index 271c249c6..67aeb4c37 100644 --- a/ports/idevicerestore/portfile.cmake +++ b/ports/idevicerestore/portfile.cmake @@ -6,20 +6,9 @@ vcpkg_from_github( REF 1.0.12 SHA512 ba623be56c2f37853516d7d4c32e16f1ec72f33d512f18aa812ce6830af4b9e389f7af5321888dd0ddd168e282b652e379b60f90970680e213eabf489f406915 HEAD_REF msvc-master + PATCHES libcurl_d.patch ) -if(${VCPKG_LIBRARY_LINKAGE} MATCHES dynamic) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - libcurl_imp.patch) -else() - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - libcurl_d.patch) -endif() - vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH idevicerestore.vcxproj diff --git a/ports/libideviceactivation/CONTROL b/ports/libideviceactivation/CONTROL index cbc1aef46..8ff0a857e 100644 --- a/ports/libideviceactivation/CONTROL +++ b/ports/libideviceactivation/CONTROL @@ -1,4 +1,4 @@ Source: libideviceactivation -Version: 1.2.68 +Version: 1.2.68-1 Description: A library to handle the activation process of iOS devices Build-Depends: libimobiledevice, libxml2, curl \ No newline at end of file diff --git a/ports/libideviceactivation/libcurl_imp.patch b/ports/libideviceactivation/libcurl_imp.patch deleted file mode 100644 index bf1bfefac..000000000 --- a/ports/libideviceactivation/libcurl_imp.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/libideviceactivation.vcxproj b/libideviceactivation.vcxproj -index ba473f7a..47a20d15 100644 ---- a/libideviceactivation.vcxproj -+++ b/libideviceactivation.vcxproj -@@ -76,7 +76,7 @@ - $(OutDir)$(ProjectName).pdb - - -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl-d_imp.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - -@@ -89,7 +89,7 @@ - $(OutDir)$(ProjectName).pdb - - -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl-d_imp.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - -@@ -106,7 +106,7 @@ - - true - true -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl_imp.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - -@@ -123,7 +123,7 @@ - - true - true -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl_imp.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - diff --git a/ports/libideviceactivation/portfile.cmake b/ports/libideviceactivation/portfile.cmake index a904b52ef..7e4776c69 100644 --- a/ports/libideviceactivation/portfile.cmake +++ b/ports/libideviceactivation/portfile.cmake @@ -5,23 +5,12 @@ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libimobiledevice-win32/libideviceactivation - REF v1.2.68 + REF v1.2.68 SHA512 c2742bba2d90c21e853255c9ef1b9a63560c3e65541a0a3daaace9b0c48d236b7947008dbcd6e42622251015b686758ebc6b564e379d831cb4f52af812430140 HEAD_REF msvc-master + PATCHES libcurl_d.patch ) -if(${VCPKG_LIBRARY_LINKAGE} MATCHES dynamic) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - libcurl_imp.patch) -else() - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - libcurl_d.patch) -endif() - vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH libideviceactivation.sln From 8c22bd9aadc510623cd082f1d9ad59b862be9f22 Mon Sep 17 00:00:00 2001 From: Jackie Ng Date: Thu, 27 Jun 2019 07:51:58 +1000 Subject: [PATCH 0070/1066] [freexl]: Linux build support (#6813) * [freexl]: Add linux build support * [freexl]: Remove various commented-out references to gdal (from which this initial Linux support was based from) * [freexl]: Port changes based on PR feedback * [freexl]: The CI error logs suggest the port has issues building for both debug/release in the same source directory on Linux. Split this off into separate debug/release source directories. --- ports/freexl/CONTROL | 2 +- ports/freexl/portfile.cmake | 242 +++++++++++++++++++++++++----------- 2 files changed, 167 insertions(+), 77 deletions(-) diff --git a/ports/freexl/CONTROL b/ports/freexl/CONTROL index 00f97f562..dc4ec446a 100644 --- a/ports/freexl/CONTROL +++ b/ports/freexl/CONTROL @@ -1,5 +1,5 @@ Source: freexl -Version: 1.0.4-1 +Version: 1.0.4-2 Homepage: https://www.gaia-gis.it/gaia-sins/freexl-sources Description: FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet Build-Depends: libiconv diff --git a/ports/freexl/portfile.cmake b/ports/freexl/portfile.cmake index ff8879fba..e770d61f1 100644 --- a/ports/freexl/portfile.cmake +++ b/ports/freexl/portfile.cmake @@ -1,90 +1,180 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freexl-1.0.4) +set(FREEXL_VERSION_STR "1.0.4") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freexl-${FREEXL_VERSION_STR}) vcpkg_download_distfile(ARCHIVE - URLS "http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-1.0.4.tar.gz" - FILENAME "freexl-1.0.4.tar.gz" + URLS "http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-${FREEXL_VERSION_STR}.tar.gz" + FILENAME "freexl-${FREEXL_VERSION_STR}.tar.gz" SHA512 d72561f7b82e0281cb211fbf249e5e45411a7cdd009cfb58da3696f0a0341ea7df210883bfde794be28738486aeb4ffc67ec2c98fd2acde5280e246e204ce788 ) -vcpkg_extract_source_archive(${ARCHIVE}) +if (CMAKE_HOST_WIN32) + vcpkg_extract_source_archive(${ARCHIVE}) + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-sources.patch + ) + find_program(NMAKE nmake) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-sources.patch -) -find_program(NMAKE nmake) - -set(LIBS_ALL_DBG - "\"${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib\" \ - \"${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib\"" - ) -set(LIBS_ALL_REL - "\"${CURRENT_INSTALLED_DIR}/lib/libiconv.lib\" \ - \"${CURRENT_INSTALLED_DIR}/lib/libcharset.lib\"" - ) - - -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(CL_FLAGS_DBG "/MDd /Zi") - set(CL_FLAGS_REL "/MD /Ox") -else() - set(CL_FLAGS_DBG "/MTd /Zi") - set(CL_FLAGS_REL "/MT /Ox") -endif() - - -################ -# Debug build -################ -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug + set(LIBS_ALL_DBG + "\"${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib\" \ + \"${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib\"" ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - vcpkg_copy_pdbs() -endif() - -################ -# Release build -################ -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Building ${TARGET_TRIPLET}-rel") - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-release + set(LIBS_ALL_REL + "\"${CURRENT_INSTALLED_DIR}/lib/libiconv.lib\" \ + \"${CURRENT_INSTALLED_DIR}/lib/libcharset.lib\"" ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") -endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl RENAME copyright) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CL_FLAGS_DBG "/MDd /Zi") + set(CL_FLAGS_REL "/MD /Ox") + else() + set(CL_FLAGS_DBG "/MTd /Zi") + set(CL_FLAGS_REL "/MT /Ox") endif() + + + ################ + # Debug build + ################ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) - endif() -endif() + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + vcpkg_copy_pdbs() + endif() + + ################ + # Release build + ################ + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-release + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + endif() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl RENAME copyright) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) + endif() + endif() + +elseif (CMAKE_HOST_UNIX OR CMAKE_HOST_APPLE) # Build in UNIX + + # Check build system first + find_program(MAKE make) + if (NOT MAKE) + message(FATAL_ERROR "MAKE not found") + endif() + + # CI error logs appear to indicate that it doesn't like ./configure in the same source dir + # so extract the source into separate debug/release source directories + set(SOURCE_ROOT_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug) + set(SOURCE_ROOT_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release) + set(SOURCE_PATH_DEBUG ${SOURCE_ROOT_DEBUG}/freexl-${FREEXL_VERSION_STR}) + set(SOURCE_PATH_RELEASE ${SOURCE_ROOT_RELEASE}/freexl-${FREEXL_VERSION_STR}) + + file(REMOVE_RECURSE ${SOURCE_ROOT_DEBUG}) + file(REMOVE_RECURSE ${SOURCE_ROOT_RELEASE}) + + vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_ROOT_DEBUG}) + vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_ROOT_RELEASE}) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + ################ + # Release build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release) + file(MAKE_DIRECTORY ${OUT_PATH_RELEASE}) + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH_RELEASE}/configure" --prefix=${OUT_PATH_RELEASE} "${FREEXL_CONFIGURE_ARGS_REL}" + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME make-build-${TARGET_TRIPLET}-release + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make install + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME make-install-${TARGET_TRIPLET}-release + ) + + file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) + file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR}) + file(COPY ${SOURCE_PATH_RELEASE}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/freexl/COPYING ${CURRENT_PACKAGES_DIR}/share/freexl/copyright) + message(STATUS "Installing ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + ################ + # Debug build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + set(OUT_PATH_DEBUG ${SOURCE_PATH_DEBUG}/../../make-build-${TARGET_TRIPLET}-debug) + file(MAKE_DIRECTORY ${OUT_PATH_DEBUG}) + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH_DEBUG}/configure" --prefix=${OUT_PATH_DEBUG} "${FREEXL_CONFIGURE_ARGS_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME config-${TARGET_TRIPLET}-debug + ) + + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME make-build-${TARGET_TRIPLET}-debug + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make install + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME make-install-${TARGET_TRIPLET}-debug + ) + + file(COPY ${OUT_PATH_DEBUG}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) + message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") + endif() + +else()# Other build system + message(FATAL_ERROR "Unsupported build system.") +endif() message(STATUS "Packaging ${TARGET_TRIPLET} done") From fd87a081bb6acc33ec4e581f1ce60edcad80eda1 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Thu, 27 Jun 2019 00:00:48 +0200 Subject: [PATCH 0071/1066] Introduce an easier way to identify target systems... (#6846) * Introduce an easier way to identify target systems... * fix missing () * move the include around. also added vcpkg_common_functions to be automatically included * remove warning message * added remaining VCPKG_CMAKE_SYSTEM_NAMEs found only in vcpkg_configure_cmake to load a toolchain. * remove warning again from messed up merge --- scripts/cmake/vcpkg_common_definitions.cmake | 14 ++++++++++++++ scripts/ports.cmake | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 scripts/cmake/vcpkg_common_definitions.cmake diff --git a/scripts/cmake/vcpkg_common_definitions.cmake b/scripts/cmake/vcpkg_common_definitions.cmake new file mode 100644 index 000000000..8dc05de3c --- /dev/null +++ b/scripts/cmake/vcpkg_common_definitions.cmake @@ -0,0 +1,14 @@ +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_TARGET_IS_WINDOWS 1) + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_TARGET_IS_UWP 1) + endif() +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_TARGET_IS_OSX 1) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(VCPKG_TARGET_IS_LINUX 1) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") + set(VCPKG_TARGET_IS_ANDROID 1) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(VCPKG_TARGET_IS_FREEBSD 1) +endif() diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 7a5f2749f..118cc9481 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -68,6 +68,8 @@ if(CMD MATCHES "^BUILD$") include(${CMAKE_TRIPLET_FILE}) set(TRIPLET_SYSTEM_ARCH ${VCPKG_TARGET_ARCHITECTURE}) + include(${CMAKE_CURRENT_LIST_DIR}/cmake/vcpkg_common_definitions.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/cmake/vcpkg_common_functions.cmake) include(${CURRENT_PORT_DIR}/portfile.cmake) set(BUILD_INFO_FILE_PATH ${CURRENT_PACKAGES_DIR}/BUILD_INFO) From 22ebb8ca681ed2dffbf931cf2ad72d53b846f2e2 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Wed, 26 Jun 2019 16:03:13 -0700 Subject: [PATCH 0072/1066] [libmikmod] resolve ninja error (-w dupbuild=err) (#7052) --- ports/libmikmod/CONTROL | 2 +- ports/libmikmod/cmake_policy.patch | 13 ------------- ports/libmikmod/name_conflict.patch | 13 +++++++++++++ ports/libmikmod/portfile.cmake | 9 ++++++++- 4 files changed, 22 insertions(+), 15 deletions(-) delete mode 100644 ports/libmikmod/cmake_policy.patch create mode 100644 ports/libmikmod/name_conflict.patch diff --git a/ports/libmikmod/CONTROL b/ports/libmikmod/CONTROL index 6a02a4ae4..bc289f59c 100644 --- a/ports/libmikmod/CONTROL +++ b/ports/libmikmod/CONTROL @@ -1,5 +1,5 @@ Source: libmikmod -Version: 3.3.11.1-3 +Version: 3.3.11.1-4 Homepage: https://sourceforge.net/projects/mikmod/ Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm. Build-Depends: openal-soft diff --git a/ports/libmikmod/cmake_policy.patch b/ports/libmikmod/cmake_policy.patch deleted file mode 100644 index 17d48278a..000000000 --- a/ports/libmikmod/cmake_policy.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b4d31d3..67951e6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -23,6 +23,8 @@ - # - # (This copyright notice applies only to this file) - -+cmake_policy(SET CMP0003 NEW) -+ - PROJECT(libmikmod C) - CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - LIST(APPEND CMAKE_MODULE_PATH "${libmikmod_SOURCE_DIR}/cmake") diff --git a/ports/libmikmod/name_conflict.patch b/ports/libmikmod/name_conflict.patch new file mode 100644 index 000000000..be0ba1d28 --- /dev/null +++ b/ports/libmikmod/name_conflict.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 53a174e..5983882 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -404,7 +404,7 @@ IF (ENABLE_STATIC) + + SET_TARGET_PROPERTIES( + mikmod-static +- PROPERTIES OUTPUT_NAME "mikmod" ++ PROPERTIES OUTPUT_NAME "mikmod-static" + ) + SET_TARGET_PROPERTIES( + ${LIBMIKMOD_LIBS} diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake index 1ec5d6773..ef0b6d5e0 100644 --- a/ports/libmikmod/portfile.cmake +++ b/ports/libmikmod/portfile.cmake @@ -23,9 +23,15 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH PATCHES fix-missing-dll.patch - cmake_policy.patch + name_conflict.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(ENABLE_STATIC ON) +else() + set(ENABLE_STATIC OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja @@ -42,6 +48,7 @@ vcpkg_configure_cmake( -DENABLE_STDOUT=ON -DENABLE_WAV=ON -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DENABLE_STATIC=${ENABLE_STATIC} OPTIONS_RELEASE -DENABLE_SIMD=ON OPTIONS_DEBUG -DENABLE_SIMD=OFF ) From 539695e5445a435db848ff76cd39bf4fd7ab414e Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Wed, 26 Jun 2019 16:03:27 -0700 Subject: [PATCH 0073/1066] [restclient-cpp] disable tests (#7054) --- ports/restclient-cpp/CONTROL | 2 +- ports/restclient-cpp/portfile.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/restclient-cpp/CONTROL b/ports/restclient-cpp/CONTROL index 975f5df7a..2aac1bbaf 100644 --- a/ports/restclient-cpp/CONTROL +++ b/ports/restclient-cpp/CONTROL @@ -1,4 +1,4 @@ Source: restclient-cpp -Version: 0.5.1-1 +Version: 0.5.1-2 Build-Depends: curl Description: Binn is a binary data serialization format designed to be compact, fast and easy to use. diff --git a/ports/restclient-cpp/portfile.cmake b/ports/restclient-cpp/portfile.cmake index 116e60920..6ad2fa7cf 100644 --- a/ports/restclient-cpp/portfile.cmake +++ b/ports/restclient-cpp/portfile.cmake @@ -13,6 +13,9 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_GTest=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_jsoncpp=TRUE ) vcpkg_install_cmake() From 40537b848b0ee9eaee2fb1bf08f838b1e75c9925 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Wed, 26 Jun 2019 16:35:03 -0700 Subject: [PATCH 0074/1066] [libftdi] resolve ninja error (-w dupbuild=err) (#7055) --- ports/libftdi/CONTROL | 2 +- ports/libftdi/export-cmake.patch | 24 ------------------------ ports/libftdi/portfile.cmake | 1 - ports/libftdi/shared-static.patch | 18 ++++++++++++++++-- 4 files changed, 17 insertions(+), 28 deletions(-) delete mode 100644 ports/libftdi/export-cmake.patch diff --git a/ports/libftdi/CONTROL b/ports/libftdi/CONTROL index 3c50a00e2..16ebe6fab 100644 --- a/ports/libftdi/CONTROL +++ b/ports/libftdi/CONTROL @@ -1,4 +1,4 @@ Source: libftdi -Version: 0.20 +Version: 0.20-1 Build-Depends: libusb-win32 Description: FTDI USB driver with bitbang mode (v0.20) diff --git a/ports/libftdi/export-cmake.patch b/ports/libftdi/export-cmake.patch deleted file mode 100644 index 29078c25d..000000000 --- a/ports/libftdi/export-cmake.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 1c326fe..3c1d9ab 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -47,14 +47,19 @@ if(WIN32 OR 1) - - if(BUILD_SHARED_LIBS) - install( TARGETS ftdi -+ EXPORT ftdi - COMPONENT sharedlibs - ) - -+ target_link_libraries(ftdi PUBLIC $) - else() - install( TARGETS ftdi-static -+ EXPORT ftdi - COMPONENT staticlibs - ) -+ target_link_libraries(ftdi-static PUBLIC $) - endif() -+ install(EXPORT ftdi FILE libftdi-config.cmake NAMESPACE libftdi:: DESTINATION share/libftdi) - - install( FILES ${c_headers} - DESTINATION include diff --git a/ports/libftdi/portfile.cmake b/ports/libftdi/portfile.cmake index 29e5bc42d..318e21a9e 100644 --- a/ports/libftdi/portfile.cmake +++ b/ports/libftdi/portfile.cmake @@ -13,7 +13,6 @@ vcpkg_extract_source_archive_ex( PATCHES libusb-win32.patch shared-static.patch - export-cmake.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}/src) diff --git a/ports/libftdi/shared-static.patch b/ports/libftdi/shared-static.patch index dad7aa0c5..df76b910b 100644 --- a/ports/libftdi/shared-static.patch +++ b/ports/libftdi/shared-static.patch @@ -1,5 +1,5 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 071ae90..b42bbcd 100644 +index 071ae90..f91f6f7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} @@ -11,6 +11,15 @@ index 071ae90..b42bbcd 100644 set(c_headers ftdi.h) add_library(ftdi SHARED ${c_sources}) +@@ -14,7 +14,7 @@ set_target_properties(ftdi PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}. + + # Static library + add_library(ftdi-static STATIC ${c_sources}) +-set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi") ++set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi-static") + + # Prevent clobbering each other during the build + set_target_properties(ftdi PROPERTIES CLEAN_DIRECT_OUTPUT 1) @@ -24,7 +24,7 @@ set_target_properties(ftdi-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) target_link_libraries(ftdi ${LIBUSB_LIBRARIES}) @@ -20,7 +29,7 @@ index 071ae90..b42bbcd 100644 install( TARGETS ftdi LIBRARY DESTINATION lib${LIB_SUFFIX} -@@ -41,23 +41,24 @@ if(${UNIX}) +@@ -41,23 +41,29 @@ if(${UNIX}) COMPONENT headers ) @@ -33,15 +42,20 @@ index 071ae90..b42bbcd 100644 + if(BUILD_SHARED_LIBS) install( TARGETS ftdi - DESTINATION bin ++ EXPORT ftdi COMPONENT sharedlibs ) ++ target_link_libraries(ftdi PUBLIC $) + else() install( TARGETS ftdi-static - DESTINATION bin ++ EXPORT ftdi COMPONENT staticlibs ) ++ target_link_libraries(ftdi-static PUBLIC $) + endif() ++ install(EXPORT ftdi FILE libftdi-config.cmake NAMESPACE libftdi:: DESTINATION share/libftdi) install( FILES ${c_headers} DESTINATION include From a6fe726ebb7fa39023342a91803d9c5de51d7c54 Mon Sep 17 00:00:00 2001 From: Sean Yen Date: Wed, 26 Jun 2019 22:20:04 -0700 Subject: [PATCH 0075/1066] Fix header path propagation. (#7015) --- ports/libftdi/shared-static.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libftdi/shared-static.patch b/ports/libftdi/shared-static.patch index df76b910b..3197fb823 100644 --- a/ports/libftdi/shared-static.patch +++ b/ports/libftdi/shared-static.patch @@ -46,14 +46,14 @@ index 071ae90..f91f6f7 100644 COMPONENT sharedlibs ) -+ target_link_libraries(ftdi PUBLIC $) ++ target_include_directories(ftdi PUBLIC $) + else() install( TARGETS ftdi-static - DESTINATION bin + EXPORT ftdi COMPONENT staticlibs ) -+ target_link_libraries(ftdi-static PUBLIC $) ++ target_include_directories(ftdi-static PUBLIC $) + endif() + install(EXPORT ftdi FILE libftdi-config.cmake NAMESPACE libftdi:: DESTINATION share/libftdi) From f362309178c05c3acde238f2eb2dbc816a195704 Mon Sep 17 00:00:00 2001 From: Thijs Withaar Date: Thu, 16 May 2019 18:30:43 +0200 Subject: [PATCH 0076/1066] [soxr] initial commit --- ports/soxr/CONTROL | 3 ++ ports/soxr/disable_cmake_settings.patch | 25 ++++++++++++ ports/soxr/portfile.cmake | 51 +++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 ports/soxr/CONTROL create mode 100644 ports/soxr/disable_cmake_settings.patch create mode 100644 ports/soxr/portfile.cmake diff --git a/ports/soxr/CONTROL b/ports/soxr/CONTROL new file mode 100644 index 000000000..ebf120c06 --- /dev/null +++ b/ports/soxr/CONTROL @@ -0,0 +1,3 @@ +Source: soxr +Version: 0.1.3. +Description: High quality audio resampling diff --git a/ports/soxr/disable_cmake_settings.patch b/ports/soxr/disable_cmake_settings.patch new file mode 100644 index 000000000..192e7bf54 --- /dev/null +++ b/ports/soxr/disable_cmake_settings.patch @@ -0,0 +1,25 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,10 +40,10 @@ + "Build type, one of: None Debug Release RelWithDebInfo MinSizeRel." FORCE) + endif () + +-option (BUILD_TESTS "Build sanity-tests." ON) ++option (BUILD_TESTS "Build sanity-tests." OFF) + option (BUILD_EXAMPLES "Build examples." OFF) +-option (WITH_OPENMP "Include OpenMP threading." ON) +-option (WITH_LSR_BINDINGS "Include a `libsamplerate'-like interface." ON) ++option (WITH_OPENMP "Include OpenMP threading." OFF) ++option (WITH_LSR_BINDINGS "Include a `libsamplerate'-like interface." OFF) + + cmake_dependent_option (BUILD_SHARED_LIBS + "Build shared (dynamic) soxr libraries." ON +@@ -75,7 +75,7 @@ + option (WITH_HI_PREC_CLOCK "Enable high-precision time-base." ON) + option (WITH_FLOAT_STD_PREC_CLOCK + "Use floating-point for standard-precision time-base." OFF) +-option (WITH_DEV_TRACE "Enable developer trace capability." ON) ++option (WITH_DEV_TRACE "Enable developer trace capability." OFF) + option (WITH_DEV_GPROF "Enable developer grpof output." OFF) + mark_as_advanced (WITH_HI_PREC_CLOCK WITH_FLOAT_STD_PREC_CLOCK + WITH_DEV_TRACE WITH_DEV_GPROF) diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake new file mode 100644 index 000000000..c7c624caa --- /dev/null +++ b/ports/soxr/portfile.cmake @@ -0,0 +1,51 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://netcologne.dl.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz" + FILENAME "soxr-0.1.3-Source.tar.xz" + SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag). + # REF 1.0.0 + # (Optional) Read the docs for how to generate patches at: + # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md + # PATCHES + # 001_port_fixes.patch + # 002_more_port_fixes.patch + disable_cmake_settings.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soxr RENAME copyright) + +# Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME soxr) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) From 60b96c3d0c0d99dccd6f710b89212af75f1b948c Mon Sep 17 00:00:00 2001 From: Thijs Withaar Date: Sun, 19 May 2019 19:21:27 +0200 Subject: [PATCH 0077/1066] [soxr] Set Cmake options through portfile.cmake rather than a patch. --- ports/soxr/disable_cmake_settings.patch | 25 ------------------------- ports/soxr/portfile.cmake | 3 +-- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 ports/soxr/disable_cmake_settings.patch diff --git a/ports/soxr/disable_cmake_settings.patch b/ports/soxr/disable_cmake_settings.patch deleted file mode 100644 index 192e7bf54..000000000 --- a/ports/soxr/disable_cmake_settings.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -40,10 +40,10 @@ - "Build type, one of: None Debug Release RelWithDebInfo MinSizeRel." FORCE) - endif () - --option (BUILD_TESTS "Build sanity-tests." ON) -+option (BUILD_TESTS "Build sanity-tests." OFF) - option (BUILD_EXAMPLES "Build examples." OFF) --option (WITH_OPENMP "Include OpenMP threading." ON) --option (WITH_LSR_BINDINGS "Include a `libsamplerate'-like interface." ON) -+option (WITH_OPENMP "Include OpenMP threading." OFF) -+option (WITH_LSR_BINDINGS "Include a `libsamplerate'-like interface." OFF) - - cmake_dependent_option (BUILD_SHARED_LIBS - "Build shared (dynamic) soxr libraries." ON -@@ -75,7 +75,7 @@ - option (WITH_HI_PREC_CLOCK "Enable high-precision time-base." ON) - option (WITH_FLOAT_STD_PREC_CLOCK - "Use floating-point for standard-precision time-base." OFF) --option (WITH_DEV_TRACE "Enable developer trace capability." ON) -+option (WITH_DEV_TRACE "Enable developer trace capability." OFF) - option (WITH_DEV_GPROF "Enable developer grpof output." OFF) - mark_as_advanced (WITH_HI_PREC_CLOCK WITH_FLOAT_STD_PREC_CLOCK - WITH_DEV_TRACE WITH_DEV_GPROF) diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index c7c624caa..6dbc65eb8 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -28,7 +28,6 @@ vcpkg_extract_source_archive_ex( # PATCHES # 001_port_fixes.patch # 002_more_port_fixes.patch - disable_cmake_settings.patch ) vcpkg_configure_cmake( @@ -37,9 +36,9 @@ vcpkg_configure_cmake( # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 + OPTIONS -DBUILD_TESTS=OFF -DWITH_OPENMP=OFF -DWITH_LSR_BINDINGS=OFF ) - vcpkg_install_cmake() # Handle copyright From f4993def219abaabf1527d66f584b2bc5c2f8e48 Mon Sep 17 00:00:00 2001 From: Thijs Withaar Date: Fri, 31 May 2019 14:09:35 +0200 Subject: [PATCH 0078/1066] [soxr] Fix macos build: remove share --- ports/soxr/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index 6dbc65eb8..d71f1acdd 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -20,10 +20,10 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + ARCHIVE ${ARCHIVE} # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag). # REF 1.0.0 - # (Optional) Read the docs for how to generate patches at: + # (Optional) Read the docs for how to generate patches at: # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md # PATCHES # 001_port_fixes.patch @@ -48,3 +48,4 @@ file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/so # vcpkg_test_cmake(PACKAGE_NAME soxr) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) From 93b9320fe40afeb921750206ac4be83b1e9fa6d2 Mon Sep 17 00:00:00 2001 From: Thijs Withaar Date: Tue, 4 Jun 2019 19:05:25 +0200 Subject: [PATCH 0079/1066] [soxr] skip examples --- ports/soxr/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index d71f1acdd..091c94e49 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -36,7 +36,7 @@ vcpkg_configure_cmake( # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 - OPTIONS -DBUILD_TESTS=OFF -DWITH_OPENMP=OFF -DWITH_LSR_BINDINGS=OFF + OPTIONS -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DWITH_OPENMP=OFF -DWITH_LSR_BINDINGS=OFF ) vcpkg_install_cmake() From f884a9e2ea75d623b4bf2d1d68e4680bdfeaacc8 Mon Sep 17 00:00:00 2001 From: Thijs Withaar Date: Tue, 4 Jun 2019 22:08:33 +0200 Subject: [PATCH 0080/1066] [soxr] patch potentially uninitialized variable, remove build warning --- ports/soxr/001_initialize-resampler.patch | 13 +++++++++++++ ports/soxr/002_disable_warning.patch | 12 ++++++++++++ ports/soxr/portfile.cmake | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 ports/soxr/001_initialize-resampler.patch create mode 100644 ports/soxr/002_disable_warning.patch diff --git a/ports/soxr/001_initialize-resampler.patch b/ports/soxr/001_initialize-resampler.patch new file mode 100644 index 000000000..6be5f29bd --- /dev/null +++ b/ports/soxr/001_initialize-resampler.patch @@ -0,0 +1,13 @@ +diff --git a/src/soxr.c b/src/soxr.c +index c2861ac..c95cfd4 100644 +--- a/src/soxr.c ++++ b/src/soxr.c +@@ -815,7 +815,7 @@ soxr_error_t soxr_oneshot( + soxr_quality_spec_t const * q_spec, + soxr_runtime_spec_t const * runtime_spec) + { +- soxr_t resampler; ++ soxr_t resampler = NULL; + soxr_error_t error = q_spec? q_spec->e : 0; + if (!error) { + soxr_quality_spec_t q_spec1; diff --git a/ports/soxr/002_disable_warning.patch b/ports/soxr/002_disable_warning.patch new file mode 100644 index 000000000..fc8550187 --- /dev/null +++ b/ports/soxr/002_disable_warning.patch @@ -0,0 +1,12 @@ +diff --git a/src/pffft.c b/src/pffft.c +index 46c841e..0686bef 100644 +--- a/src/pffft.c ++++ b/src/pffft.c +@@ -182,7 +182,6 @@ typedef float32x4_t v4sf; + # define VALIGNED(ptr) ((((long)(ptr)) & 0x3) == 0) + #else + # if !defined(PFFFT_SIMD_DISABLE) +-# warning "building with simd disabled !\n"; + # define PFFFT_SIMD_DISABLE /* fallback to scalar code */ + # endif + #endif diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index 091c94e49..344b725f2 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -28,6 +28,9 @@ vcpkg_extract_source_archive_ex( # PATCHES # 001_port_fixes.patch # 002_more_port_fixes.patch + PATCHES + 001_initialize-resampler.patch + 002_disable_warning.patch ) vcpkg_configure_cmake( From 0550221978d520e4e12c459a6fab5be16d5fa753 Mon Sep 17 00:00:00 2001 From: Thijs Withaar Date: Sun, 9 Jun 2019 11:46:09 +0200 Subject: [PATCH 0081/1066] [soxr]: define arm on windows --- ports/soxr/003_detect_arm_on_windows.h | 13 +++++++++++++ ports/soxr/portfile.cmake | 1 + 2 files changed, 14 insertions(+) create mode 100644 ports/soxr/003_detect_arm_on_windows.h diff --git a/ports/soxr/003_detect_arm_on_windows.h b/ports/soxr/003_detect_arm_on_windows.h new file mode 100644 index 000000000..f1643fb63 --- /dev/null +++ b/ports/soxr/003_detect_arm_on_windows.h @@ -0,0 +1,13 @@ +diff --git a/src/pffft.c b/src/pffft.c +index 0686bef..e4cb094 100644 +--- a/src/pffft.c ++++ b/src/pffft.c +@@ -157,7 +157,7 @@ typedef __m128 v4sf; + /* + ARM NEON support macros + */ +-#elif !defined(PFFFT_SIMD_DISABLE) && defined(__arm__) ++#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__arm__) || defined(_M_ARM)) + # include + typedef float32x4_t v4sf; + # define SIMD_SZ 4 diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index 344b725f2..c1a028114 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -31,6 +31,7 @@ vcpkg_extract_source_archive_ex( PATCHES 001_initialize-resampler.patch 002_disable_warning.patch + 003_detect_arm_on_windows.h ) vcpkg_configure_cmake( From 82cd021b42ddce34b487a9665cf2614b563919de Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Thu, 27 Jun 2019 11:08:20 -0700 Subject: [PATCH 0082/1066] [libxslt] Update the version to 1.1.33 and change the URL. (#7058) --- ports/libxslt/CONTROL | 2 +- ports/libxslt/portfile.cmake | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ports/libxslt/CONTROL b/ports/libxslt/CONTROL index 965079523..e1de01067 100644 --- a/ports/libxslt/CONTROL +++ b/ports/libxslt/CONTROL @@ -1,5 +1,5 @@ Source: libxslt -Version: 1.1.29 +Version: 1.1.33 Homepage: http://xmlsoft.org/XSLT/ Description: Libxslt is a XSLT library implemented in C for XSLT 1.0 and most of EXSLT Build-Depends: libxml2 diff --git a/ports/libxslt/portfile.cmake b/ports/libxslt/portfile.cmake index 2343ba99f..a688c374b 100644 --- a/ports/libxslt/portfile.cmake +++ b/ports/libxslt/portfile.cmake @@ -7,21 +7,19 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxslt-1.1.29) -vcpkg_download_distfile(ARCHIVE - URLS "ftp://xmlsoft.org/libxslt/libxslt-1.1.29.tar.gz" - FILENAME "libxslt-1.1.29.tar.gz" - SHA512 a1ce555a74a9dabe65e8f64bb66e27e77760fd76940d88f2d59f58dd63ca73c8ae59f3fcbd8e76c8f92ff992fb0c09328528c20ea38ccac83e63252106bf5f31 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GNOME/libxslt + REF v1.1.33 + SHA512 2c20b2af3c19952b25b10dca0d95fe227602f7f815db352b04dd061c52c458d745f92c597ce08ac9207ba0fbe0169ea2fb78263d8590743717553f84463fe1d9 + HEAD_REF master + PATCHES + 0001-Fix-makefile.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) find_program(NMAKE nmake) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH}/ - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-makefile.patch -) - set(SCRIPTS_DIR ${SOURCE_PATH}/win32) set(CONFIGURE_COMMAND_TEMPLATE cscript configure.js @@ -170,7 +168,7 @@ else() endif() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxslt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxslt/COPYING ${CURRENT_PACKAGES_DIR}/share/libxslt/copyright) +file(COPY ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxslt) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxslt/Copyright ${CURRENT_PACKAGES_DIR}/share/libxslt/copyright) vcpkg_copy_pdbs() \ No newline at end of file From 35e985d3ccf60235bc4881df4d934610cd507090 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Thu, 27 Jun 2019 12:20:12 -0700 Subject: [PATCH 0083/1066] Triplets Overlay Implementation (#7053) * Triplets Overlay Implementation * Use cache for get_triplet_file_path() * Code cleanup --- scripts/ports.cmake | 2 +- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 1 + toolsrc/include/vcpkg/vcpkgpaths.h | 11 +++- toolsrc/src/vcpkg.cpp | 4 +- toolsrc/src/vcpkg/build.cpp | 13 ++++- toolsrc/src/vcpkg/help.cpp | 2 + toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 30 ++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 67 ++++++++++++++++++----- 8 files changed, 87 insertions(+), 43 deletions(-) diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 118cc9481..860d08893 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -32,7 +32,7 @@ endif() if(CMD MATCHES "^BUILD$") - set(CMAKE_TRIPLET_FILE ${VCPKG_ROOT_DIR}/triplets/${TARGET_TRIPLET}.cmake) + set(CMAKE_TRIPLET_FILE ${TARGET_TRIPLET_FILE}) if(NOT EXISTS ${CMAKE_TRIPLET_FILE}) message(FATAL_ERROR "Unsupported target triplet. Triplet file does not exist: ${CMAKE_TRIPLET_FILE}") endif() diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index cad013eb8..ff13ae6bf 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -88,6 +88,7 @@ namespace vcpkg std::unique_ptr vcpkg_root_dir; std::unique_ptr triplet; std::unique_ptr> overlay_ports; + std::unique_ptr> overlay_triplets; Optional debug = nullopt; Optional sendmetrics = nullopt; Optional printmetrics = nullopt; diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index b09169b02..a30e0c653 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -47,14 +47,17 @@ namespace vcpkg struct VcpkgPaths { - static Expected create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path); + static Expected create(const fs::path& vcpkg_root_dir, + const std::string& default_vs_path, + const std::vector* triplets_dirs); fs::path package_dir(const PackageSpec& spec) const; fs::path build_info_file_path(const PackageSpec& spec) const; fs::path listfile_path(const BinaryParagraph& pgh) const; - - const std::vector& get_available_triplets() const; + bool is_valid_triplet(const Triplet& t) const; + const std::vector& get_available_triplets() const; + const fs::path get_triplet_file_path(const Triplet& triplet) const; fs::path root; fs::path packages; @@ -93,7 +96,9 @@ namespace vcpkg Lazy> toolsets_vs2013; fs::path default_vs_path; + std::vector triplets_dirs; mutable std::unique_ptr m_tool_cache; + mutable vcpkg::Cache m_triplets_cache; }; } diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index e02bdc71f..5da97b136 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -118,7 +118,9 @@ static void inner(const VcpkgCmdArguments& args) auto default_vs_path = System::get_environment_variable("VCPKG_VISUAL_STUDIO_PATH").value_or(""); - const Expected expected_paths = VcpkgPaths::create(vcpkg_root_dir, default_vs_path); + const Expected expected_paths = VcpkgPaths::create(vcpkg_root_dir, + default_vs_path, + args.overlay_triplets.get()); Checks::check_exit(VCPKG_LINE_INFO, !expected_paths.error(), "Error: Invalid vcpkg root directory %s: %s", diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 059a09432..f826a4865 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -361,9 +361,15 @@ namespace vcpkg::Build { auto& fs = paths.get_filesystem(); const Triplet& triplet = spec.triplet(); + const auto& triplet_file_path = paths.get_triplet_file_path(spec.triplet()).u8string(); - if (!Strings::starts_with(Strings::ascii_to_lowercase(config.port_dir.u8string()), - Strings::ascii_to_lowercase(paths.ports.u8string()))) + if (!Strings::case_insensitive_ascii_starts_with(triplet_file_path, + paths.triplets.u8string())) + { + System::printf("-- Loading triplet configuration from: %s\n", triplet_file_path); + } + if (!Strings::case_insensitive_ascii_starts_with(config.port_dir.u8string(), + paths.ports.u8string())) { System::printf("-- Installing port from location: %s\n", config.port_dir.u8string()); } @@ -390,6 +396,7 @@ namespace vcpkg::Build {"PORT", config.scf.core_paragraph->name}, {"CURRENT_PORT_DIR", config.port_dir}, {"TARGET_TRIPLET", spec.triplet().canonical_name()}, + {"TARGET_TRIPLET_FILE", triplet_file_path}, {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, {"VCPKG_USE_HEAD_VERSION", Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, {"DOWNLOADS", paths.downloads}, @@ -890,7 +897,7 @@ namespace vcpkg::Build const fs::path& cmake_exe_path = paths.get_tool_exe(Tools::CMAKE); const fs::path ports_cmake_script_path = paths.scripts / "get_triplet_environment.cmake"; - const fs::path triplet_file_path = paths.triplets / (triplet.canonical_name() + ".cmake"); + const fs::path triplet_file_path = paths.get_triplet_file_path(triplet); const auto cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, ports_cmake_script_path, diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 6ee573dfc..896f62661 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -117,6 +117,8 @@ namespace vcpkg::Help "\n" " --overlay-ports= Specify directories to be used when searching for ports\n" "\n" + " --overlay-triplets= Specify directories containing triplets files\n" + "\n" " --vcpkg-root Specify the vcpkg root " "directory\n" " (default: " ENVVAR(VCPKG_ROOT) // diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 21bf4d028..3c1452d47 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -45,26 +45,6 @@ namespace vcpkg option_field = new_setting; } - static void parse_multivalue(const std::string* arg_begin, - const std::string* arg_end, - const std::string& option_name, - std::unique_ptr>& option_field) - { - if (arg_begin == arg_end) - { - System::print2(System::Color::error, "Error: expected value after ", option_name, '\n'); - Metrics::g_metrics.lock()->track_property("error", "error option name"); - Help::print_usage(); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - if (!option_field) - { - option_field = std::make_unique>(); - } - option_field->emplace_back(*arg_begin); - } - static void parse_cojoined_multivalue(std::string new_value, const std::string& option_name, std::unique_ptr>& option_field) @@ -163,6 +143,13 @@ namespace vcpkg args.overlay_ports); continue; } + if (Strings::starts_with(arg, "--overlay-triplets=")) + { + parse_cojoined_multivalue(arg.substr(sizeof("--overlay-triplets=") - 1), + "--overlay-triplets", + args.overlay_triplets); + continue; + } if (arg == "--debug") { parse_switch(true, "debug", args.debug); @@ -418,6 +405,9 @@ namespace vcpkg System::printf(" %-40s %s\n", "--overlay-ports=", "Specify directories to be used when searching for ports"); + System::printf(" %-40s %s\n", + "--overlay-triplets=", + "Specify directories containing triplets files"); System::printf(" %-40s %s\n", "--vcpkg-root ", "Specify the vcpkg directory to use instead of current directory or tool directory"); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 562a18c9b..909fbeb44 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -13,7 +13,9 @@ namespace vcpkg { - Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path) + Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir, + const std::string& default_vs_path, + const std::vector* triplets_dirs) { std::error_code ec; const fs::path canonical_vcpkg_root_dir = fs::stdfs::canonical(vcpkg_root_dir, ec); @@ -76,6 +78,20 @@ namespace vcpkg paths.ports_cmake = paths.scripts / "ports.cmake"; + if (triplets_dirs) + { + for (auto&& triplets_dir : *triplets_dirs) + { + auto path = fs::u8path(triplets_dir); + Checks::check_exit(VCPKG_LINE_INFO, + paths.get_filesystem().exists(path), + "Error: Path does not exist '%s'", + triplets_dir); + paths.triplets_dirs.emplace_back(fs::stdfs::canonical(path)); + } + } + paths.triplets_dirs.emplace_back(fs::stdfs::canonical(paths.root / "triplets")); + return paths; } @@ -91,20 +107,6 @@ namespace vcpkg return this->vcpkg_dir_info / (pgh.fullstem() + ".list"); } - const std::vector& VcpkgPaths::get_available_triplets() const - { - return this->available_triplets.get_lazy([this]() -> std::vector { - std::vector output; - for (auto&& path : this->get_filesystem().get_files_non_recursive(this->triplets)) - { - output.push_back(path.stem().filename().string()); - } - Util::sort(output); - - return output; - }); - } - bool VcpkgPaths::is_valid_triplet(const Triplet& t) const { const auto it = Util::find_if(this->get_available_triplets(), [&](auto&& available_triplet) { @@ -113,6 +115,41 @@ namespace vcpkg return it != this->get_available_triplets().cend(); } + const std::vector& VcpkgPaths::get_available_triplets() const + { + return this->available_triplets.get_lazy([this]() -> std::vector { + std::vector output; + for (auto&& triplets_dir : triplets_dirs) + { + for (auto&& path : this->get_filesystem().get_files_non_recursive(triplets_dir)) + { + output.push_back(path.stem().filename().string()); + } + } + Util::sort_unique_erase(output); + return output; + }); + } + + const fs::path VcpkgPaths::get_triplet_file_path(const Triplet& triplet) const + { + return m_triplets_cache.get_lazy(triplet, [&]()-> auto { + for (auto&& triplet_dir : triplets_dirs) + { + auto&& path = triplet_dir / (triplet.canonical_name() + ".cmake"); + if (this->get_filesystem().exists(path)) + { + return path; + } + } + + Checks::exit_with_message(VCPKG_LINE_INFO, + "Error: Triplet file %s.cmake not found", + triplet.canonical_name()); + }); + + } + const fs::path& VcpkgPaths::get_tool_exe(const std::string& tool) const { if (!m_tool_cache) m_tool_cache = get_tool_cache(); From 66f1d9a747ed5f048ed23248b9163d7490da02c2 Mon Sep 17 00:00:00 2001 From: Christophe Delacourt Date: Fri, 28 Jun 2019 00:38:53 +0200 Subject: [PATCH 0084/1066] [shaderc] update (#6689) * update shaderc * update shaderc * fix glslang cmake targets, re enable vcpkg_fixup_cmake_targets() * [spirv-tools] comment python distutils * remove comments, change path * glslang fix cmake targets * change version --- ports/glslang/CMakeLists-targets.patch | 241 ++++++++---------- ports/glslang/CMakeLists-windows.patch | 12 + ports/glslang/CONTROL | 4 +- ports/glslang/portfile.cmake | 7 +- .../0001-Add-a-virtual-destructor.patch | 23 -- ...01-Do-not-generate-build-version.inc.patch | 30 --- ports/shaderc/CONTROL | 4 +- ports/shaderc/build-version.inc | 8 +- ports/shaderc/disable-update-version.patch | 41 +++ ports/shaderc/fix-install.patch | 26 ++ ports/shaderc/portfile.cmake | 14 +- ports/spirv-headers/CONTROL | 2 +- ports/spirv-headers/portfile.cmake | 4 +- ports/spirv-tools/CMake-targets.patch | 119 --------- ports/spirv-tools/CONTROL | 4 +- ports/spirv-tools/comment-distutils.patch | 22 ++ ports/spirv-tools/portfile.cmake | 7 +- 17 files changed, 237 insertions(+), 331 deletions(-) create mode 100644 ports/glslang/CMakeLists-windows.patch delete mode 100644 ports/shaderc/0001-Add-a-virtual-destructor.patch delete mode 100644 ports/shaderc/0001-Do-not-generate-build-version.inc.patch create mode 100644 ports/shaderc/disable-update-version.patch create mode 100644 ports/shaderc/fix-install.patch delete mode 100644 ports/spirv-tools/CMake-targets.patch create mode 100644 ports/spirv-tools/comment-distutils.patch diff --git a/ports/glslang/CMakeLists-targets.patch b/ports/glslang/CMakeLists-targets.patch index 73661fa35..36e923d92 100644 --- a/ports/glslang/CMakeLists-targets.patch +++ b/ports/glslang/CMakeLists-targets.patch @@ -1,133 +1,108 @@ -diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake -index 2097881..f0cddd7 100644 ---- a/ChooseMSVCCRT.cmake -+++ b/ChooseMSVCCRT.cmake -@@ -102,4 +102,4 @@ set(MSVC_CRT - MT - MTd) - --choose_msvc_crt(MSVC_CRT) -+# choose_msvc_crt(MSVC_CRT) -diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt -index 5bb3f0e..e7be6e6 100644 ---- a/OGLCompilersDLL/CMakeLists.txt -+++ b/OGLCompilersDLL/CMakeLists.txt -@@ -9,6 +9,12 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS OGLCompiler -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS OGLCompiler EXPORT glslangConfig -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+ export(TARGETS OGLCompiler -+ NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/OGLCompiler-config.cmake" -+ ) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt -index b682419..3a10f1a 100755 ---- a/SPIRV/CMakeLists.txt -+++ b/SPIRV/CMakeLists.txt -@@ -64,8 +64,14 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS SPIRV SPVRemapper -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS SPIRV EXPORT glslangConfig -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+ export(TARGETS SPIRV -+ NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake" -+ ) - - install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt -index 7a50ab6..b70345e 100644 ---- a/glslang/CMakeLists.txt -+++ b/glslang/CMakeLists.txt -@@ -97,8 +97,19 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS glslang -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS glslang EXPORT glslangConfig -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+ export(TARGETS glslang -+ NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake" -+ ) -+ install( -+ EXPORT glslangConfig -+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/glslang" -+ NAMESPACE glslang:: -+ ) - endif(ENABLE_GLSLANG_INSTALL) - - if(ENABLE_GLSLANG_INSTALL) -diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt -index 1bf49e1..edd733c 100644 ---- a/glslang/OSDependent/Unix/CMakeLists.txt -+++ b/glslang/OSDependent/Unix/CMakeLists.txt -@@ -3,6 +3,12 @@ set_property(TARGET OSDependent PROPERTY FOLDER glslang) - set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS OSDependent -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS OSDependent EXPORT glslangConfig -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+ export(TARGETS OSDependent -+ NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake" -+ ) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt -index f257418..cadd70d 100644 ---- a/glslang/OSDependent/Windows/CMakeLists.txt -+++ b/glslang/OSDependent/Windows/CMakeLists.txt -@@ -15,6 +15,12 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS OSDependent -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS OSDependent EXPORT glslangConfig -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+ export(TARGETS OSDependent -+ NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake" -+ ) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt -index 98dfad7..94d96a0 100755 ---- a/hlsl/CMakeLists.txt -+++ b/hlsl/CMakeLists.txt -@@ -26,6 +26,12 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS HLSL -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS HLSL EXPORT glslangConfig -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+ export(TARGETS HLSL -+ NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/HLSL-config.cmake" -+ ) - endif(ENABLE_GLSLANG_INSTALL) +diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake +index 2097881..f6320a9 100644 +--- a/ChooseMSVCCRT.cmake ++++ b/ChooseMSVCCRT.cmake +@@ -102,4 +102,3 @@ set(MSVC_CRT + MT + MTd) + +-choose_msvc_crt(MSVC_CRT) +diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt +index 5bb3f0e..90ba3be 100644 +--- a/OGLCompilersDLL/CMakeLists.txt ++++ b/OGLCompilersDLL/CMakeLists.txt +@@ -9,6 +9,7 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS OGLCompiler +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS OGLCompiler EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif(ENABLE_GLSLANG_INSTALL) +diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt +index 1997e74..e2a0229 100644 +--- a/SPIRV/CMakeLists.txt ++++ b/SPIRV/CMakeLists.txt +@@ -46,7 +46,6 @@ endif(ENABLE_NV_EXTENSIONS) + add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) + set_property(TARGET SPIRV PROPERTY FOLDER glslang) + set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) +-target_include_directories(SPIRV PUBLIC ..) + + if (ENABLE_SPVREMAPPER) + add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) +@@ -78,13 +77,13 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- if(BUILD_SHARED_LIBS) ++ if(BUILD_SHARED_LIBS OR TRUE) + if (ENABLE_SPVREMAPPER) + install(TARGETS SPVRemapper + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +- install(TARGETS SPIRV ++ install(TARGETS SPIRV EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() +diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt +index 5f51476..7f11498 100644 +--- a/glslang/CMakeLists.txt ++++ b/glslang/CMakeLists.txt +@@ -86,7 +86,6 @@ add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${H + set_property(TARGET glslang PROPERTY FOLDER glslang) + set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON) + target_link_libraries(glslang OGLCompiler OSDependent) +-target_include_directories(glslang PUBLIC ..) + + if(WIN32 AND BUILD_SHARED_LIBS) + set_target_properties(glslang PROPERTIES PREFIX "") +@@ -105,10 +104,15 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- if(BUILD_SHARED_LIBS) +- install(TARGETS glslang ++ if(BUILD_SHARED_LIBS OR TRUE) ++ install(TARGETS glslang EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install( ++ EXPORT glslangConfig ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/glslang" ++ NAMESPACE glslang:: ++ ) + else() + install(TARGETS glslang + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt +index e652f45..a9673fe 100644 +--- a/glslang/OSDependent/Unix/CMakeLists.txt ++++ b/glslang/OSDependent/Unix/CMakeLists.txt +@@ -20,6 +20,6 @@ else() + endif() + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS OSDependent ++ install(TARGETS OSDependent EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif(ENABLE_GLSLANG_INSTALL) +diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt +index f918d7a..329800f 100644 +--- a/hlsl/CMakeLists.txt ++++ b/hlsl/CMakeLists.txt +@@ -32,8 +32,8 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- if(BUILD_SHARED_LIBS) +- install(TARGETS HLSL ++ if(BUILD_SHARED_LIBS OR TRUE) ++ install(TARGETS HLSL EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() diff --git a/ports/glslang/CMakeLists-windows.patch b/ports/glslang/CMakeLists-windows.patch new file mode 100644 index 000000000..76ccf6077 --- /dev/null +++ b/ports/glslang/CMakeLists-windows.patch @@ -0,0 +1,12 @@ +diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt +index f257418..82a3f3c 100644 +--- a/glslang/OSDependent/Windows/CMakeLists.txt ++++ b/glslang/OSDependent/Windows/CMakeLists.txt +@@ -15,6 +15,6 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS OSDependent ++ install(TARGETS OSDependent EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif(ENABLE_GLSLANG_INSTALL) diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index f3a25620c..2d16ad41b 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,4 +1,4 @@ Source: glslang -Version: 2018-03-02-2 +Version: 2019-03-05 Homepage: https://github.com/KhronosGroup/glslang -Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator +Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator \ No newline at end of file diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index 77e15052d..003aa26aa 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -5,11 +5,12 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/glslang - REF b5b5f918c6b72d7cf2ee73641cc6c6ddb211ca70 - SHA512 ec0f7a23fa60457a481c7b3acf4c127c3bf898d23655d346aeafb304f74e798d632c83d676873f2c764d241de6dc4392cff8d6ce0ee509a4b74ee2233b01c008 + REF f88e5824d2cfca5edc58c7c2101ec9a4ec36afac + SHA512 92dc287e8930db6e00bde23b770f763dc3cf8a405a37b682bbd65e1dbde1f1f5161543fcc70b09eef07a5ce8bbe8f368ef84ac75003c122f42d1f6b9eaa8bd50 HEAD_REF master PATCHES CMakeLists-targets.patch + CMakeLists-windows.patch ) vcpkg_configure_cmake( @@ -20,8 +21,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() - file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") diff --git a/ports/shaderc/0001-Add-a-virtual-destructor.patch b/ports/shaderc/0001-Add-a-virtual-destructor.patch deleted file mode 100644 index 0fa695036..000000000 --- a/ports/shaderc/0001-Add-a-virtual-destructor.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 563bc6e87a43c38b5495469307922c768edbd191 Mon Sep 17 00:00:00 2001 -From: neil -Date: Thu, 1 Feb 2018 06:49:44 +0000 -Subject: [PATCH] Add a virtual destructor, otherwise Clang 6.0complains about - delete being called on an abstract class. - ---- - libshaderc/include/shaderc/shaderc.hpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp -index 1c557431..335f0df9 100644 ---- a/libshaderc/include/shaderc/shaderc.hpp -+++ b/libshaderc/include/shaderc/shaderc.hpp -@@ -180,6 +180,8 @@ class CompileOptions { - - // Handles shaderc_include_result_release_fn callbacks. - virtual void ReleaseInclude(shaderc_include_result* data) = 0; -+ -+ virtual ~IncluderInterface() = default; - }; - - // Sets the includer instance for libshaderc to call during compilation, as diff --git a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch b/ports/shaderc/0001-Do-not-generate-build-version.inc.patch deleted file mode 100644 index 41cc81220..000000000 --- a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e8e12e856cbc41f9bdcc83bc87eb5013df199ee1 Mon Sep 17 00:00:00 2001 -From: vlj -Date: Fri, 2 Dec 2016 16:36:25 +0100 -Subject: [PATCH] Do not generate build-version.inc - ---- - CMakeLists.txt | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a4c2fac..5544a2d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,8 +53,8 @@ add_subdirectory(libshaderc) - add_subdirectory(glslc) - add_subdirectory(examples) - --add_custom_target(build-version -- ${PYTHON_EXE} -- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py -- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} -- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") -+#add_custom_target(build-version -+# ${PYTHON_EXE} -+# ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py -+# ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} -+# COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") --- -2.10.2.windows.1 - diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index 36f82852a..044fdd410 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,5 +1,5 @@ Source: shaderc -Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2 +Version: 2019-06-26 Homepage: https://github.com/google/shaderc Description: A collection of tools, libraries and tests for shader compilation. -Build-Depends: glslang, spirv-tools +Build-Depends: glslang, spirv-tools \ No newline at end of file diff --git a/ports/shaderc/build-version.inc b/ports/shaderc/build-version.inc index 853e89916..00c140577 100644 --- a/ports/shaderc/build-version.inc +++ b/ports/shaderc/build-version.inc @@ -1,3 +1,5 @@ -"shaderc v2016.2-dev unknown hash, 2016-12-02\n" -"spirv-tools v2016.6-dev unknown hash, 2016-12-02\n" -"glslang unknown hash, 2016-12-02\n" +"shaderc v2019.0-dev unknown hash, 2019-05-08\n" +"spirv-tools v2019.3-dev unknown hash, 2019-04-03\n" +"glslang unknown hash, 2019-03-05\n" + + diff --git a/ports/shaderc/disable-update-version.patch b/ports/shaderc/disable-update-version.patch new file mode 100644 index 000000000..5ee016bcb --- /dev/null +++ b/ports/shaderc/disable-update-version.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a4e779b..dc5f1a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -81,12 +81,6 @@ add_subdirectory(libshaderc) + add_subdirectory(glslc) + add_subdirectory(examples) + +-add_custom_target(build-version +- ${PYTHON_EXECUTABLE} +- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py +- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} +- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") +- + function(define_pkg_config_file NAME LIBS) + add_custom_target(${NAME}-pkg-config ALL + COMMAND ${CMAKE_COMMAND} +diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt +index acf6fb0..d0df7db 100644 +--- a/glslc/CMakeLists.txt ++++ b/glslc/CMakeLists.txt +@@ -26,7 +26,6 @@ shaderc_default_compile_options(glslc_exe) + target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include) + set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc) + target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc) +-add_dependencies(glslc_exe build-version) + + shaderc_add_tests( + TEST_PREFIX glslc +diff --git a/spvc/CMakeLists.txt b/spvc/CMakeLists.txt +index f465972..76f8c2e 100644 +--- a/spvc/CMakeLists.txt ++++ b/spvc/CMakeLists.txt +@@ -3,7 +3,6 @@ shaderc_default_compile_options(spvc_exe) + target_include_directories(spvc_exe PRIVATE ${shaderc_SOURCE_DIR}/libshaderc/include ${spirv-tools_SOURCE_DIR}/include) + set_target_properties(spvc_exe PROPERTIES OUTPUT_NAME spvc) + target_link_libraries(spvc_exe PRIVATE shaderc_spvc shaderc_util) +-add_dependencies(spvc_exe build-version) + + shaderc_add_asciidoc(spvc_doc_README README) + diff --git a/ports/shaderc/fix-install.patch b/ports/shaderc/fix-install.patch new file mode 100644 index 000000000..1857ed8fe --- /dev/null +++ b/ports/shaderc/fix-install.patch @@ -0,0 +1,26 @@ +diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt +index 9d07136..0ffa06f 100644 +--- a/libshaderc/CMakeLists.txt ++++ b/libshaderc/CMakeLists.txt +@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL) + # around this problem by manually substitution. + string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" + install_location "${generated_location}") +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() + install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +diff --git a/libshaderc_spvc/CMakeLists.txt b/libshaderc_spvc/CMakeLists.txt +index fae235e..b503e70 100644 +--- a/libshaderc_spvc/CMakeLists.txt ++++ b/libshaderc_spvc/CMakeLists.txt +@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL) + # around this problem by manually substitution. + string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" + install_location "${generated_location}") +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() + install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index 5f1f70572..fbdc1e4dd 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -3,17 +3,19 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/shaderc - REF 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da - SHA512 6fb45a0b01e6709c44a11658648b9271fe06bd94023dcc5042c47b5f2a04889c2efb0ab4c166f18728594ac9b9aa9f8b354af46d88eb7f7c39c7246f52f5a933 + REF 05c766a1f4615ee37d37d09271aaabca30ffd293 + SHA512 329697e8e23d619313440d57ef740a94c49d13533e1b8734fc8ff72fd5092c2addabb306f64cb69160fa5fee373a05ba39a5ee6d92d95e5e2e9c7ec96a51aadc HEAD_REF master - PATCHES - 0001-Do-not-generate-build-version.inc.patch - 0001-Add-a-virtual-destructor.patch + PATCHES + "disable-update-version.patch" + "fix-install.patch" ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_spirv.txt DESTINATION ${SOURCE_PATH}/third_party/spirv-tools) file(RENAME ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists_spirv.txt ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists.txt) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src) #Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work @@ -30,7 +32,7 @@ vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} -Dglslang_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include + OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} -Dglslang_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include -Dspirv-tools_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_DEBUG -DSUFFIX_D=true OPTIONS_RELEASE -DSUFFIX_D=false ) diff --git a/ports/spirv-headers/CONTROL b/ports/spirv-headers/CONTROL index f1b0f7908..be9ef4392 100644 --- a/ports/spirv-headers/CONTROL +++ b/ports/spirv-headers/CONTROL @@ -1,3 +1,3 @@ Source: spirv-headers -Version: 2019-03-05 +Version: 2019-05-05 Description: Machine-readable files for the SPIR-V Registry diff --git a/ports/spirv-headers/portfile.cmake b/ports/spirv-headers/portfile.cmake index f2c55280d..e5191639d 100644 --- a/ports/spirv-headers/portfile.cmake +++ b/ports/spirv-headers/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/SPIRV-Headers - REF 03a081524afabdde274d885880c2fef213e46a59 - SHA512 27f0a4b5efbe2931c0ff5d50e5fb5bd78fe0a735ad48a08db72c8914f2de05f5d5c507134e0a090bb5a7d88e2f8c1a0bdbf51a0bc4b9fe3bf372da7000ca0b98 + REF c4f8f65792d4bf2657ca751904c511bbcf2ac77b + SHA512 750af53a70f6f890657735ab0e2db5ae3dd8d612480efc2247753993752f687e22a0bdd65296c5751daf284604fe3dc9ee0a94feae88761a0e64adc64e6d17a4 HEAD_REF master ) diff --git a/ports/spirv-tools/CMake-targets.patch b/ports/spirv-tools/CMake-targets.patch deleted file mode 100644 index 6b754e16b..000000000 --- a/ports/spirv-tools/CMake-targets.patch +++ /dev/null @@ -1,119 +0,0 @@ -diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt -index 2d7d7ca..bf77be7 100644 ---- a/source/CMakeLists.txt -+++ b/source/CMakeLists.txt -@@ -327,31 +327,41 @@ set_source_files_properties( - add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES}) - spvtools_default_compile_options(${SPIRV_TOOLS}) - target_include_directories(${SPIRV_TOOLS} -- PUBLIC ${spirv-tools_SOURCE_DIR}/include -+ PUBLIC "$" - PRIVATE ${spirv-tools_BINARY_DIR} - PRIVATE ${SPIRV_HEADER_INCLUDE_DIR} - ) - set_property(TARGET ${SPIRV_TOOLS} PROPERTY FOLDER "SPIRV-Tools libraries") - spvtools_check_symbol_exports(${SPIRV_TOOLS}) - --add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES}) --spvtools_default_compile_options(${SPIRV_TOOLS}-shared) --target_include_directories(${SPIRV_TOOLS}-shared -- PUBLIC ${spirv-tools_SOURCE_DIR}/include -- PRIVATE ${spirv-tools_BINARY_DIR} -- PRIVATE ${SPIRV_HEADER_INCLUDE_DIR} -- ) --set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) --set_property(TARGET ${SPIRV_TOOLS}-shared PROPERTY FOLDER "SPIRV-Tools libraries") --spvtools_check_symbol_exports(${SPIRV_TOOLS}-shared) --target_compile_definitions(${SPIRV_TOOLS}-shared -- PRIVATE SPIRV_TOOLS_IMPLEMENTATION -- PUBLIC SPIRV_TOOLS_SHAREDLIB --) -+# add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES}) -+# spvtools_default_compile_options(${SPIRV_TOOLS}-shared) -+# target_include_directories(${SPIRV_TOOLS}-shared -+# PUBLIC ${spirv-tools_SOURCE_DIR}/include -+# PRIVATE ${spirv-tools_BINARY_DIR} -+# PRIVATE ${SPIRV_HEADER_INCLUDE_DIR} -+# ) -+# set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) -+# set_property(TARGET ${SPIRV_TOOLS}-shared PROPERTY FOLDER "SPIRV-Tools libraries") -+# spvtools_check_symbol_exports(${SPIRV_TOOLS}-shared) -+# target_compile_definitions(${SPIRV_TOOLS}-shared -+# PRIVATE SPIRV_TOOLS_IMPLEMENTATION -+# PUBLIC SPIRV_TOOLS_SHAREDLIB -+# ) - - if(ENABLE_SPIRV_TOOLS_INSTALL) -- install(TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared -+ install(TARGETS ${SPIRV_TOOLS} EXPORT spirv-tools-config - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ export( -+ TARGETS ${SPIRV_TOOLS} -+ NAMESPACE spirv-tools:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-config.cmake" -+ ) -+ install( -+ EXPORT spirv-tools-config -+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/spirv-tools" -+ NAMESPACE spirv-tools:: -+ ) - endif(ENABLE_SPIRV_TOOLS_INSTALL) -diff --git a/source/link/CMakeLists.txt b/source/link/CMakeLists.txt -index 8ca4df3..ac0aa62 100644 ---- a/source/link/CMakeLists.txt -+++ b/source/link/CMakeLists.txt -@@ -17,7 +17,7 @@ add_library(SPIRV-Tools-link - - spvtools_default_compile_options(SPIRV-Tools-link) - target_include_directories(SPIRV-Tools-link -- PUBLIC ${spirv-tools_SOURCE_DIR}/include -+ PUBLIC "$" - PUBLIC ${SPIRV_HEADER_INCLUDE_DIR} - PRIVATE ${spirv-tools_BINARY_DIR} - ) -@@ -29,8 +29,13 @@ set_property(TARGET SPIRV-Tools-link PROPERTY FOLDER "SPIRV-Tools libraries") - spvtools_check_symbol_exports(SPIRV-Tools-link) - - if(ENABLE_SPIRV_TOOLS_INSTALL) -- install(TARGETS SPIRV-Tools-link -+ install(TARGETS SPIRV-Tools-link EXPORT spirv-tools-config - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ export( -+ TARGETS ${SPIRV_TOOLS}-link -+ NAMESPACE spirv-tools:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-link-config.cmake" -+ ) - endif(ENABLE_SPIRV_TOOLS_INSTALL) -diff --git a/source/opt/CMakeLists.txt b/source/opt/CMakeLists.txt -index 854c950..fc91539 100644 ---- a/source/opt/CMakeLists.txt -+++ b/source/opt/CMakeLists.txt -@@ -159,7 +159,7 @@ add_library(SPIRV-Tools-opt - - spvtools_default_compile_options(SPIRV-Tools-opt) - target_include_directories(SPIRV-Tools-opt -- PUBLIC ${spirv-tools_SOURCE_DIR}/include -+ PUBLIC "$" - PUBLIC ${SPIRV_HEADER_INCLUDE_DIR} - PRIVATE ${spirv-tools_BINARY_DIR} - ) -@@ -171,9 +171,14 @@ set_property(TARGET SPIRV-Tools-opt PROPERTY FOLDER "SPIRV-Tools libraries") - spvtools_check_symbol_exports(SPIRV-Tools-opt) - - if(ENABLE_SPIRV_TOOLS_INSTALL) -- install(TARGETS SPIRV-Tools-opt -+ install(TARGETS SPIRV-Tools-opt EXPORT spirv-tools-config - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ export( -+ TARGETS ${SPIRV_TOOLS}-opt -+ NAMESPACE spirv-tools:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-opt-config.cmake" -+ ) - endif(ENABLE_SPIRV_TOOLS_INSTALL) - diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index b5f0c536a..b873c5493 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,5 +1,5 @@ Source: spirv-tools -Version: 2018.1-2 +Version: 2019.3-dev Homepage: https://github.com/KhronosGroup/SPIRV-Tools Description: API and commands for processing SPIR-V modules -Build-Depends: spirv-headers +Build-Depends: spirv-headers \ No newline at end of file diff --git a/ports/spirv-tools/comment-distutils.patch b/ports/spirv-tools/comment-distutils.patch new file mode 100644 index 000000000..2426f82ba --- /dev/null +++ b/ports/spirv-tools/comment-distutils.patch @@ -0,0 +1,22 @@ +diff --git a/utils/generate_registry_tables.py b/utils/generate_registry_tables.py +index 8b1c3572..6ab28fe6 100644 +--- a/utils/generate_registry_tables.py ++++ b/utils/generate_registry_tables.py +@@ -16,7 +16,7 @@ + + from __future__ import print_function + +-import distutils.dir_util ++#import distutils.dir_util + import os.path + import xml.etree.ElementTree + +@@ -64,7 +64,7 @@ def main(): + with open(args.xml) as xml_in: + registry = xml.etree.ElementTree.fromstring(xml_in.read()) + +- distutils.dir_util.mkpath(os.path.dirname(args.generator_output)) ++ #distutils.dir_util.mkpath(os.path.dirname(args.generator_output)) + print(generate_vendor_table(registry), file=open(args.generator_output, 'w')) + + diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index 3011aa396..0cc6f79dd 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -5,11 +5,10 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/SPIRV-Tools - REF v2018.1 - SHA512 0637c413dafd931e8222f9bf70a024f8b64116f0300c7732b86bcaff321188a0e746f79c1385ae23a7692e83194586b57692960d5be607fb2d7960731b6cd63f - HEAD_REF master + REF d0a1f5a05a2b0f8315e5b3f17b8e34c730861b31 + SHA512 7179751b0216368b4a4bf8c9b0c1c1e3b17d6aa4788b4aeaa7fbb2b6d9d50b34cf209082f3531a2e0994b5fc02416373666d4d12cee282cec2c3d02c13a640a8 PATCHES - CMake-targets.patch + comment-distutils.patch ) vcpkg_find_acquire_program(PYTHON3) From 4bb67553f00315a58b99e85f1550c2be34d2ca07 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Thu, 27 Jun 2019 15:55:07 -0700 Subject: [PATCH 0085/1066] [flann] fix flaky config (#7073) --- ports/flann/CONTROL | 2 +- ports/flann/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index c2aba2e18..fdcbb8ecc 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,5 +1,5 @@ Source: flann -Version: 1.9.1 +Version: 1.9.1-1 Homepage: https://github.com/mariusmuja/flann Build-Depends: lz4 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index baf79035a..ec9637212 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -16,6 +16,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE OPTIONS -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF From 53a02456a0f457e78d4b2d98a6b43cdd090b9c69 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Thu, 27 Jun 2019 16:32:38 -0700 Subject: [PATCH 0086/1066] Update ports-overlay.md --- docs/specifications/ports-overlay.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/specifications/ports-overlay.md b/docs/specifications/ports-overlay.md index e877f5010..d486cfe19 100644 --- a/docs/specifications/ports-overlay.md +++ b/docs/specifications/ports-overlay.md @@ -45,6 +45,8 @@ From a user experience perspective, a user expresses interest in adding addition * `vcpkg install sqlite3 --overlay-ports=\\share\org\custom-ports` * a file listing paths to the former two. + > NOTE: Reading paths from a text file is not available in the current implementation, some revisions to this part of the specification are being made and will be implemented in a future date. + * `vcpkg install sqlite3 --overlay-ports=..\port-repos.txt` _port-repos.txt_ @@ -129,6 +131,8 @@ Given the following directory structure: * #### Example #3: + > NOTE: Reading paths from a text file is not available in the current implementation, some revisions to this part of the specification are being made and will be implemented in a future date. + Given the content of `preferred-ports.txt` as: ``` From 5b6b66512b84267c1b93ef577dea3a811a255c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Schau?= Date: Fri, 28 Jun 2019 01:41:01 +0200 Subject: [PATCH 0087/1066] [libu2f-server] New Port (#6781) * update to 2.8.84 * [libu2f-server] Initial Port of Version 1.1.0 * Missing exported functions * Add support for static linkage * Added missing 'arm64' Target, and corrected case for 'arm' for vcpkg_install_msbuild * Add support for arm64 * Support for arm target * [libu2f-server] add cmakelists and patch * string copy fix * revert msbuild changes * add compile definitions * add patch file * remove line * change version --- ports/libu2f-server/CMakeLists.txt | 30 ++++++++ ports/libu2f-server/CONTROL | 4 + ports/libu2f-server/portfile.cmake | 31 ++++++++ ports/libu2f-server/strndup-fix.patch | 31 ++++++++ ports/libu2f-server/u2f-server-version.h | 94 ++++++++++++++++++++++++ ports/libu2f-server/windows.patch | 41 +++++++++++ 6 files changed, 231 insertions(+) create mode 100644 ports/libu2f-server/CMakeLists.txt create mode 100644 ports/libu2f-server/CONTROL create mode 100644 ports/libu2f-server/portfile.cmake create mode 100644 ports/libu2f-server/strndup-fix.patch create mode 100644 ports/libu2f-server/u2f-server-version.h create mode 100644 ports/libu2f-server/windows.patch diff --git a/ports/libu2f-server/CMakeLists.txt b/ports/libu2f-server/CMakeLists.txt new file mode 100644 index 000000000..5e1f50e52 --- /dev/null +++ b/ports/libu2f-server/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.5) + +project(libu2f-server C) + +file(GLOB_RECURSE LIBU2F_SERVER_HEADERS u2f-server/*.h) +file(GLOB_RECURSE LIBU2F_SERVER_SOURCE u2f-server/*.c) + +add_library(libu2f-server ${LIBU2F_SERVER_SOURCE}) + +target_include_directories(libu2f-server PUBLIC $ $) +target_compile_definitions(libu2f-server PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE) + +find_package(json-c CONFIG REQUIRED) +find_package(OpenSSL REQUIRED) +target_link_libraries(libu2f-server PRIVATE OpenSSL::SSL OpenSSL::Crypto json-c::json-c) + +install(TARGETS libu2f-server + EXPORT libu2f-serverConfig + RUNTIME DESTINATION "bin" + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib" +) + +INSTALL(FILES ${LIBU2F_SERVER_HEADERS} DESTINATION "include/libu2f-server") + +install(EXPORT libu2f-serverConfig + FILE libu2f-serverConfig.cmake + NAMESPACE libu2f-server:: + DESTINATION "share/libu2f-server" +) \ No newline at end of file diff --git a/ports/libu2f-server/CONTROL b/ports/libu2f-server/CONTROL new file mode 100644 index 000000000..26803fbb7 --- /dev/null +++ b/ports/libu2f-server/CONTROL @@ -0,0 +1,4 @@ +Source: libu2f-server +Version: 1.1.0 +Build-Depends: openssl, json-c +Description: Yubico Universal 2nd Factor (U2F) Server C Library diff --git a/ports/libu2f-server/portfile.cmake b/ports/libu2f-server/portfile.cmake new file mode 100644 index 000000000..86e5d9bbe --- /dev/null +++ b/ports/libu2f-server/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Yubico/libu2f-server + REF libu2f-server-1.1.0 + SHA512 085f8e7d74c1efb347747b8930386f18ba870f668f82e9bd479c9f8431585c5dc7f95b2f6b82bdd3a6de0c06f8cb2fbf51c363ced54255a936ab96536158ee59 + HEAD_REF master + PATCHES + windows.patch + strndup-fix.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/u2f-server-version.h DESTINATION ${SOURCE_PATH}/u2f-server) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_copy_pdbs() + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/libu2f-server/strndup-fix.patch b/ports/libu2f-server/strndup-fix.patch new file mode 100644 index 000000000..f5b7ffd8a --- /dev/null +++ b/ports/libu2f-server/strndup-fix.patch @@ -0,0 +1,31 @@ +diff --git a/u2f-server/core.c b/u2f-server/core.c +index 294c94b..746932b 100644 +--- a/u2f-server/core.c ++++ b/u2f-server/core.c +@@ -211,7 +211,7 @@ u2fs_rc u2fs_set_keyHandle(u2fs_ctx_t * ctx, const char *keyHandle) + ctx->keyHandle = NULL; + } + +- ctx->keyHandle = strndup(keyHandle, strlen(keyHandle)); ++ ctx->keyHandle = strdup(keyHandle); + + if (ctx->keyHandle == NULL) + return U2FS_MEMORY_ERROR; +@@ -726,7 +726,7 @@ static u2fs_rc decode_clientData(const char *clientData, char **output) + fprintf(stderr, "clientData: %s\n", data); + } + +- *output = strndup(data, strlen(data)); ++ *output = strdup(data); + + free(data); + data = NULL; +@@ -870,7 +870,7 @@ u2fs_rc u2fs_registration_verify(u2fs_ctx_t * ctx, const char *response, + goto failure; + + u2fs_EC_KEY_t *key_ptr; +- (*output)->keyHandle = strndup(buf, strlen(buf)); ++ (*output)->keyHandle = strdup(buf); + + rc = decode_user_key(user_public_key, &key_ptr); + if (rc != U2FS_OK) diff --git a/ports/libu2f-server/u2f-server-version.h b/ports/libu2f-server/u2f-server-version.h new file mode 100644 index 000000000..b38ccac81 --- /dev/null +++ b/ports/libu2f-server/u2f-server-version.h @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2014 Yubico AB +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef U2F_SERVER_VERSION_H +#define U2F_SERVER_VERSION_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * U2FS_VERSION_STRING + * + * Pre-processor symbol with a string that describe the header file + * version number. Used together with u2fs_check_version() to verify + * header file and run-time library consistency. + */ +#define U2FS_VERSION_STRING "1.1.0" + +/** + * U2FS_VERSION_NUMBER + * + * Pre-processor symbol with a hexadecimal value describing the header + * file version number. For example, when the header version is 1.2.3 + * this symbol will have the value 0x01020300. The last two digits + * are only used between public releases, and will otherwise be 00. + */ +#define U2FS_VERSION_NUMBER 0x01010000 + +/** + * U2FS_VERSION_MAJOR + * + * Pre-processor symbol with a decimal value that describe the major + * level of the header file version number. For example, when the + * header version is 1.2.3 this symbol will be 1. + */ +#define U2FS_VERSION_MAJOR 1 + +/** + * U2FS_VERSION_MINOR + * + * Pre-processor symbol with a decimal value that describe the minor + * level of the header file version number. For example, when the + * header version is 1.2.3 this symbol will be 2. + */ +#define U2FS_VERSION_MINOR 1 + +/** + * U2FS_VERSION_PATCH + * + * Pre-processor symbol with a decimal value that describe the patch + * level of the header file version number. For example, when the + * header version is 1.2.3 this symbol will be 3. + */ +#define U2FS_VERSION_PATCH 0 + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/ports/libu2f-server/windows.patch b/ports/libu2f-server/windows.patch new file mode 100644 index 000000000..2cc68ec9b --- /dev/null +++ b/ports/libu2f-server/windows.patch @@ -0,0 +1,41 @@ +diff --git a/u2f-server/cdecode.c b/u2f-server/cdecode.c +index 6fff114..dc05ca5 100644 +--- a/u2f-server/cdecode.c ++++ b/u2f-server/cdecode.c +@@ -5,7 +5,7 @@ This is part of the libb64 project, and has been placed in the public domain. + For details, see http://sourceforge.net/projects/libb64 + */ + +-#include ++#include "b64/cdecode.h" + + int base64_decode_value(char value_in) + { +diff --git a/u2f-server/cencode.c b/u2f-server/cencode.c +index eebb24a..f3b7fa4 100644 +--- a/u2f-server/cencode.c ++++ b/u2f-server/cencode.c +@@ -5,7 +5,7 @@ This is part of the libb64 project, and has been placed in the public domain. + For details, see http://sourceforge.net/projects/libb64 + */ + +-#include ++#include "b64/cencode.h" + + const int CHARS_PER_LINE = 72; + +diff --git a/u2f-server/core.c b/u2f-server/core.c +index da440ec..294c94b 100644 +--- a/u2f-server/core.c ++++ b/u2f-server/core.c +@@ -30,8 +30,7 @@ + #include "internal.h" + + #include +-#include +-#include ++#include + #include "crypto.h" + #include "b64/cencode.h" + #include "b64/cdecode.h" + \ No newline at end of file From b4675fd65a5baebe93d0e60e082ae43013ed246f Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sat, 29 Jun 2019 01:17:39 +0800 Subject: [PATCH 0088/1066] [vcpkg] Add vcpkg_check_features (#6958) * [vcpkg] Add vcpkg_check_feature, vcpkg_check_features * [vcpkg] Remove vcpkg_check_feature * [oniguruma,xtensor] Use vcpkg_check_features --- docs/maintainers/portfile-functions.md | 1 + docs/maintainers/vcpkg_check_features.md | 41 +++++++++++ ports/oniguruma/CONTROL | 3 +- ports/oniguruma/portfile.cmake | 6 +- ports/xtensor/CONTROL | 3 +- ports/xtensor/portfile.cmake | 20 ++---- scripts/cmake/vcpkg_check_features.cmake | 82 ++++++++++++++++++++++ scripts/cmake/vcpkg_common_functions.cmake | 1 + 8 files changed, 136 insertions(+), 21 deletions(-) create mode 100644 docs/maintainers/vcpkg_check_features.md create mode 100644 scripts/cmake/vcpkg_check_features.cmake diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md index c4b810dc0..b98d89192 100644 --- a/docs/maintainers/portfile-functions.md +++ b/docs/maintainers/portfile-functions.md @@ -6,6 +6,7 @@ - [vcpkg\_apply\_patches](vcpkg_apply_patches.md) - [vcpkg\_build\_cmake](vcpkg_build_cmake.md) - [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md) +- [vcpkg\_check\_features](vcpkg_check_features.md) - [vcpkg\_check\_linkage](vcpkg_check_linkage.md) - [vcpkg\_clean\_msbuild](vcpkg_clean_msbuild.md) - [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md) diff --git a/docs/maintainers/vcpkg_check_features.md b/docs/maintainers/vcpkg_check_features.md new file mode 100644 index 000000000..ca2debf85 --- /dev/null +++ b/docs/maintainers/vcpkg_check_features.md @@ -0,0 +1,41 @@ +# vcpkg_check_features + +Check if one or more features are part of the package installation. + +## Usage +```cmake +vcpkg_check_features( + + [ ] + ... +) +``` + +`vcpkg_check_features` accepts a list of (feature, output_variable) pairs. +The syntax is similar to the `PROPERTIES` argument of `set_target_properties`. + +`vcpkg_check_features` will create a variable `FEATURE_OPTIONS` in the +parent scope, which you can pass as a part of `OPTIONS` argument when +calling functions like `vcpkg_config_cmake`: +```cmake +vcpkg_config_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=ON + ${FEATURE_OPTIONS} +) +``` + +## Notes +`vcpkg_check_features` is supposed to be called only once. Otherwise, the +`FEATURE_OPTIONS` variable set by a previous call will be overwritten. + +## Examples + +* [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake) +* [oniguruma](https://github.com/microsoft/vcpkg/blob/master/ports/oniguruma/portfile.cmake) +* [xtensor](https://github.com/microsoft/vcpkg/blob/master/ports/xtensor/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_check_features.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_features.cmake) diff --git a/ports/oniguruma/CONTROL b/ports/oniguruma/CONTROL index 1780b4505..7eb4e6173 100644 --- a/ports/oniguruma/CONTROL +++ b/ports/oniguruma/CONTROL @@ -1,6 +1,7 @@ Source: oniguruma -Version: 6.9.2 +Version: 6.9.2-1 Description: Modern and flexible regular expressions library +Homepage: https://github.com/kkos/oniguruma Feature: non-posix Description: Disable POSIX API diff --git a/ports/oniguruma/portfile.cmake b/ports/oniguruma/portfile.cmake index 586bfbe07..28f489926 100644 --- a/ports/oniguruma/portfile.cmake +++ b/ports/oniguruma/portfile.cmake @@ -8,11 +8,7 @@ vcpkg_from_github( HEAD_REF master ) -if("non-posix" IN_LIST FEATURES) - set(ENABLE_POSIX_API OFF) -else() - set(ENABLE_POSIX_API ON) -endif() +vcpkg_check_features(non-posix ENABLE_POSIX_API) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/xtensor/CONTROL b/ports/xtensor/CONTROL index 3e5e33013..138d9e1fe 100644 --- a/ports/xtensor/CONTROL +++ b/ports/xtensor/CONTROL @@ -1,6 +1,7 @@ Source: xtensor -Version: 0.20.7 +Version: 0.20.7-1 Description: C++ tensors with broadcasting and lazy computing +Homepage: https://quantstack.net/xtensor Build-Depends: nlohmann-json, xtl Feature: xsimd diff --git a/ports/xtensor/portfile.cmake b/ports/xtensor/portfile.cmake index 51e24c6e9..9c8b3b63e 100644 --- a/ports/xtensor/portfile.cmake +++ b/ports/xtensor/portfile.cmake @@ -5,29 +5,20 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO QuantStack/xtensor - REF 0.20.7 + REF 0.20.7 SHA512 de09900d0934f9b10453f16e43d1c3af28503f365224f9c6789b88a0cf00db820ca31e12099df1a2e3aafa73d7d83223df82f01b7611c1addb48367f936e5122 HEAD_REF master ) -if("xsimd" IN_LIST FEATURES) - set(XTENSOR_USE_XSIMD ON) -else() - set(XTENSOR_USE_XSIMD OFF) -endif() - -if("tbb" IN_LIST FEATURES) - set(XTENSOR_USE_TBB ON) -else() - set(XTENSOR_USE_TBB OFF) -endif() +vcpkg_check_features( + xsimd XTENSOR_USE_XSIMD + tbb XTENSOR_USE_TBB +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DXTENSOR_USE_XSIMD=${XTENSOR_USE_XSIMD} - -DXTENSOR_USE_TBB=${XTENSOR_USE_TBB} -DXTENSOR_ENABLE_ASSERT=OFF -DXTENSOR_CHECK_DIMENSION=OFF -DBUILD_TESTS=OFF @@ -36,6 +27,7 @@ vcpkg_configure_cmake( -DDOWNLOAD_GBENCHMARK=OFF -DDEFAULT_COLUMN_MAJOR=OFF -DDISABLE_VS2017=OFF + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() diff --git a/scripts/cmake/vcpkg_check_features.cmake b/scripts/cmake/vcpkg_check_features.cmake new file mode 100644 index 000000000..c8848e987 --- /dev/null +++ b/scripts/cmake/vcpkg_check_features.cmake @@ -0,0 +1,82 @@ +## # vcpkg_check_features +## +## Check if one or more features are part of the package installation. +## +## ## Usage +## ```cmake +## vcpkg_check_features( +## +## [ ] +## ... +## ) +## ``` +## +## `vcpkg_check_features` accepts a list of (feature, output_variable) pairs. +## The syntax is similar to the `PROPERTIES` argument of `set_target_properties`. +## +## `vcpkg_check_features` will create a variable `FEATURE_OPTIONS` in the +## parent scope, which you can pass as a part of `OPTIONS` argument when +## calling functions like `vcpkg_config_cmake`: +## ```cmake +## vcpkg_config_cmake( +## SOURCE_PATH ${SOURCE_PATH} +## PREFER_NINJA +## OPTIONS +## -DBUILD_TESTING=ON +## ${FEATURE_OPTIONS} +## ) +## ``` +## +## ## Notes +## `vcpkg_check_features` is supposed to be called only once. Otherwise, the +## `FEATURE_OPTIONS` variable set by a previous call will be overwritten. +## +## ## Examples +## +## * [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake) +## * [oniguruma](https://github.com/microsoft/vcpkg/blob/master/ports/oniguruma/portfile.cmake) +## * [xtensor](https://github.com/microsoft/vcpkg/blob/master/ports/xtensor/portfile.cmake) +function(vcpkg_check_features) + cmake_parse_arguments(_vcf "" "" "" ${ARGN}) + + list(LENGTH ARGN _vcf_ARGC) + math(EXPR _vcf_INCORRECT_ARGN "${_vcf_ARGC} % 2") + + if(_vcf_INCORRECT_ARGN) + message(FATAL_ERROR "Called with incorrect number of arguments.") + endif() + + set(_vcf_IS_FEATURE_ARG ON) + set(_vcf_FEATURE_OPTIONS) + + # Process (feature, output_var) pairs + foreach(_vcf_ARG ${ARGN}) + if(_vcf_IS_FEATURE_ARG) + set(_vcf_FEATURE ${_vcf_ARG}) + + if(NOT ${_vcf_FEATURE} IN_LIST ALL_FEATURES) + message(FATAL_ERROR "Unknown feature: ${_vcf_FEATURE}") + endif() + + set(_vcf_IS_FEATURE_ARG OFF) + else() + set(_vcf_FEATURE_VAR ${_vcf_ARG}) + + if(${_vcf_FEATURE} IN_LIST FEATURES) + set(${_vcf_FEATURE_VAR} ON PARENT_SCOPE) + else() + set(${_vcf_FEATURE_VAR} OFF PARENT_SCOPE) + endif() + + list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VAR}=${${_vcf_FEATURE_VAR}}") + + set(_vcf_IS_FEATURE_ARG ON) + endif() + endforeach() + + if(DEFINED FEATURE_OPTIONS) + message(WARNING "FEATURE_OPTIONS is already defined and will be overwritten.") + endif() + + set(FEATURE_OPTIONS ${_vcf_FEATURE_OPTIONS} PARENT_SCOPE) +endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index b99f8bee8..827d43abe 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -1,5 +1,6 @@ include(vcpkg_acquire_msys) include(vcpkg_add_to_path) +include(vcpkg_check_features) include(vcpkg_check_linkage) include(vcpkg_clean_msbuild) include(vcpkg_download_distfile) From 79175994c22effa9b3d945077837cdca5d370681 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Fri, 28 Jun 2019 22:48:42 +0200 Subject: [PATCH 0089/1066] [darknet] enable ninja (#7064) * [darknet] enable ninja * Bump CONTROL version --- ports/darknet/CONTROL | 2 +- ports/darknet/portfile.cmake | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/ports/darknet/CONTROL b/ports/darknet/CONTROL index 393503485..d31d4ef1d 100644 --- a/ports/darknet/CONTROL +++ b/ports/darknet/CONTROL @@ -1,5 +1,5 @@ Source: darknet -Version: 0.2.5-3 +Version: 0.2.5-4 Description: Darknet is an open source neural network framework written in C and CUDA. You only look once (YOLO) is a state-of-the-art, real-time object detection system, best example of darknet functionalities. Build-Depends: pthreads (windows), stb Default-Features: weights diff --git a/ports/darknet/portfile.cmake b/ports/darknet/portfile.cmake index 3733420ad..3fb49e687 100644 --- a/ports/darknet/portfile.cmake +++ b/ports/darknet/portfile.cmake @@ -16,21 +16,23 @@ vcpkg_from_github( HEAD_REF master ) -set(ENABLE_CUDA OFF) -if("cuda" IN_LIST FEATURES) - set(ENABLE_CUDA ON) -endif() - -set(ENABLE_OPENCV OFF) -if("opencv" IN_LIST FEATURES) - set(ENABLE_OPENCV ON) -endif() +vcpkg_check_features( + "cuda" ENABLE_CUDA + "opencv" ENABLE_OPENCV +) if("opencv-cuda" IN_LIST FEATURES) set(ENABLE_OPENCV ON) set(ENABLE_CUDA ON) endif() +if (ENABLE_CUDA) + if (NOT VCPKG_CMAKE_SYSTEM_NAME AND NOT ENV{CUDACXX}) + #CMake looks for nvcc only in PATH and CUDACXX env vars for the Ninja generator. Since we filter path on vcpkg and CUDACXX env var is not set by CUDA installer on Windows, CMake cannot find CUDA when using Ninja generator, so we need to manually enlight it if necessary (https://gitlab.kitware.com/cmake/cmake/issues/19173). Otherwise we could just disable Ninja and use MSBuild, but unfortunately CUDA installer does not integrate with some distributions of MSBuild (like the ones inside Build Tools), making CUDA unavailable otherwise in those cases, which we want to avoid + set(ENV{CUDACXX} "$ENV{CUDA_PATH}/bin/nvcc.exe") + endif() +endif() + if("weights" IN_LIST FEATURES) vcpkg_download_distfile(YOLOV3_WEIGHTS URLS "https://pjreddie.com/media/files/yolov3.weights" @@ -60,7 +62,7 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} DISABLE_PARALLEL_CONFIGURE #since darknet configures a file inside source tree, it is better to disable parallel configure - #PREFER_NINJA #it does not work with cuda on windows https://gitlab.kitware.com/cmake/cmake/issues/19173 + PREFER_NINJA OPTIONS -DINSTALL_BIN_DIR:STRING=bin -DINSTALL_LIB_DIR:STRING=lib From 62ed7c17318b4f46109c2de73b7584fb04e85720 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Fri, 28 Jun 2019 13:50:32 -0700 Subject: [PATCH 0090/1066] [asio] fix flaky build (#7083) --- ports/asio/CMakeLists.txt | 5 ----- ports/asio/CONTROL | 2 +- ports/asio/portfile.cmake | 5 +++++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/asio/CMakeLists.txt b/ports/asio/CMakeLists.txt index aa7354e76..4241b1ffc 100644 --- a/ports/asio/CMakeLists.txt +++ b/ports/asio/CMakeLists.txt @@ -3,11 +3,6 @@ project(asio) add_library(asio INTERFACE) -# Always use "ASIO_STANDALONE" to avoid boost dependency -file(READ "asio/include/asio/detail/config.hpp" _contents) -string(REPLACE "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)" _contents "${_contents}") -file(WRITE "asio/include/asio/detail/config.hpp" "${_contents}") - # Export target install(TARGETS asio EXPORT asio diff --git a/ports/asio/CONTROL b/ports/asio/CONTROL index 49a2be94c..c0da68a9b 100644 --- a/ports/asio/CONTROL +++ b/ports/asio/CONTROL @@ -1,4 +1,4 @@ Source: asio -Version: 1.12.2-1 +Version: 1.12.2-2 Homepage: https://github.com/chriskohlhoff/asio Description: Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach. diff --git a/ports/asio/portfile.cmake b/ports/asio/portfile.cmake index f9b3b739d..6c6d438a1 100644 --- a/ports/asio/portfile.cmake +++ b/ports/asio/portfile.cmake @@ -9,6 +9,11 @@ vcpkg_from_github( HEAD_REF master ) +# Always use "ASIO_STANDALONE" to avoid boost dependency +file(READ "${SOURCE_PATH}/asio/include/asio/detail/config.hpp" _contents) +string(REPLACE "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/asio/include/asio/detail/config.hpp" "${_contents}") + # CMake install file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( From a7bbee315276d37344a464eb95b02ca20ff1b0c2 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sat, 29 Jun 2019 23:29:13 +0800 Subject: [PATCH 0091/1066] [vcpkg] Update vcpkg_check_features document (#7091) * [oniguruma] Fix misusage of vcpkg_check_features * [xsimd] Use vcpkg_check_features --- docs/maintainers/vcpkg_check_features.md | 48 +++++++++++++++++++----- ports/oniguruma/CONTROL | 2 +- ports/oniguruma/portfile.cmake | 6 ++- ports/xsimd/CONTROL | 3 +- ports/xsimd/portfile.cmake | 8 +--- scripts/cmake/vcpkg_check_features.cmake | 48 +++++++++++++++++++----- 6 files changed, 88 insertions(+), 27 deletions(-) diff --git a/docs/maintainers/vcpkg_check_features.md b/docs/maintainers/vcpkg_check_features.md index ca2debf85..46ee9051a 100644 --- a/docs/maintainers/vcpkg_check_features.md +++ b/docs/maintainers/vcpkg_check_features.md @@ -1,6 +1,6 @@ # vcpkg_check_features -Check if one or more features are part of the package installation. +Check if one or more features are a part of the package installation. ## Usage ```cmake @@ -11,12 +11,9 @@ vcpkg_check_features( ) ``` -`vcpkg_check_features` accepts a list of (feature, output_variable) pairs. -The syntax is similar to the `PROPERTIES` argument of `set_target_properties`. +`vcpkg_check_features` accepts a list of (feature, output_variable) pairs. If a feature is specified, the corresponding output variable will be set as `ON`, or `OFF` otherwise. The syntax is similar to the `PROPERTIES` argument of `set_target_properties`. -`vcpkg_check_features` will create a variable `FEATURE_OPTIONS` in the -parent scope, which you can pass as a part of `OPTIONS` argument when -calling functions like `vcpkg_config_cmake`: +`vcpkg_check_features` will create a variable `FEATURE_OPTIONS` in the parent scope, which you can pass as a part of `OPTIONS` argument when calling functions like `vcpkg_config_cmake`: ```cmake vcpkg_config_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -28,13 +25,46 @@ vcpkg_config_cmake( ``` ## Notes -`vcpkg_check_features` is supposed to be called only once. Otherwise, the -`FEATURE_OPTIONS` variable set by a previous call will be overwritten. +```cmake +vcpkg_check_features( ) +``` +can be used as a replacement of: +```cmake +if( IN_LIST FEATURES) + set( ON) +else() + set( OFF) +endif() +``` + +However, if you have a feature that was checked like this before: +```cmake +if( IN_LIST FEATURES) + set( OFF) +else() + set( ON) +endif() +``` +then you should not use `vcpkg_check_features` instead. [```oniguruma```](https://github.com/microsoft/vcpkg/blob/master/ports/oniguruma/portfile.cmake), for example, has a feature named `non-posix` which is checked with: +```cmake +if("non-posix" IN_LIST FEATURES) + set(ENABLE_POSIX_API OFF) +else() + set(ENABLE_POSIX_API ON) +endif() +``` +and by replacing these code with: +```cmake +vcpkg_check_features(non-posix ENABLE_POSIX_API) +``` +is totally wrong. + +`vcpkg_check_features` is supposed to be called only once. Otherwise, the `FEATURE_OPTIONS` variable set by a previous call will be overwritten. ## Examples * [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake) -* [oniguruma](https://github.com/microsoft/vcpkg/blob/master/ports/oniguruma/portfile.cmake) +* [xsimd](https://github.com/microsoft/vcpkg/blob/master/ports/xsimd/portfile.cmake) * [xtensor](https://github.com/microsoft/vcpkg/blob/master/ports/xtensor/portfile.cmake) ## Source diff --git a/ports/oniguruma/CONTROL b/ports/oniguruma/CONTROL index 7eb4e6173..768083b4e 100644 --- a/ports/oniguruma/CONTROL +++ b/ports/oniguruma/CONTROL @@ -1,5 +1,5 @@ Source: oniguruma -Version: 6.9.2-1 +Version: 6.9.2-2 Description: Modern and flexible regular expressions library Homepage: https://github.com/kkos/oniguruma diff --git a/ports/oniguruma/portfile.cmake b/ports/oniguruma/portfile.cmake index 28f489926..586bfbe07 100644 --- a/ports/oniguruma/portfile.cmake +++ b/ports/oniguruma/portfile.cmake @@ -8,7 +8,11 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_check_features(non-posix ENABLE_POSIX_API) +if("non-posix" IN_LIST FEATURES) + set(ENABLE_POSIX_API OFF) +else() + set(ENABLE_POSIX_API ON) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/xsimd/CONTROL b/ports/xsimd/CONTROL index 05241ac5e..6147d355c 100644 --- a/ports/xsimd/CONTROL +++ b/ports/xsimd/CONTROL @@ -1,6 +1,7 @@ Source: xsimd -Version: 7.2.3 +Version: 7.2.3-1 Description: Modern, portable C++ wrappers for SIMD intrinsics +Homepage: https://github.com/QuantStack/xsimd Feature: xcomplex Description: xtl complex support diff --git a/ports/xsimd/portfile.cmake b/ports/xsimd/portfile.cmake index a25bcb532..338afff45 100644 --- a/ports/xsimd/portfile.cmake +++ b/ports/xsimd/portfile.cmake @@ -5,16 +5,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO QuantStack/xsimd - REF 7.2.3 + REF 7.2.3 SHA512 fb34eeb585f6820499734f10f03a4efd0d9a9b4be56f9bee21f3564eb92be56e7abe7682e476fafaff4733939f33f91cb4ab9209140b19f7b740538853433532 HEAD_REF master ) -if("xcomplex" IN_LIST FEATURES) - set(ENABLE_XTL_COMPLEX ON) -else() - set(ENABLE_XTL_COMPLEX OFF) -endif() +vcpkg_check_features(xcomplex ENABLE_XTL_COMPLEX) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/scripts/cmake/vcpkg_check_features.cmake b/scripts/cmake/vcpkg_check_features.cmake index c8848e987..115b1501f 100644 --- a/scripts/cmake/vcpkg_check_features.cmake +++ b/scripts/cmake/vcpkg_check_features.cmake @@ -1,6 +1,6 @@ ## # vcpkg_check_features ## -## Check if one or more features are part of the package installation. +## Check if one or more features are a part of the package installation. ## ## ## Usage ## ```cmake @@ -11,12 +11,9 @@ ## ) ## ``` ## -## `vcpkg_check_features` accepts a list of (feature, output_variable) pairs. -## The syntax is similar to the `PROPERTIES` argument of `set_target_properties`. +## `vcpkg_check_features` accepts a list of (feature, output_variable) pairs. If a feature is specified, the corresponding output variable will be set as `ON`, or `OFF` otherwise. The syntax is similar to the `PROPERTIES` argument of `set_target_properties`. ## -## `vcpkg_check_features` will create a variable `FEATURE_OPTIONS` in the -## parent scope, which you can pass as a part of `OPTIONS` argument when -## calling functions like `vcpkg_config_cmake`: +## `vcpkg_check_features` will create a variable `FEATURE_OPTIONS` in the parent scope, which you can pass as a part of `OPTIONS` argument when calling functions like `vcpkg_config_cmake`: ## ```cmake ## vcpkg_config_cmake( ## SOURCE_PATH ${SOURCE_PATH} @@ -28,13 +25,46 @@ ## ``` ## ## ## Notes -## `vcpkg_check_features` is supposed to be called only once. Otherwise, the -## `FEATURE_OPTIONS` variable set by a previous call will be overwritten. +## ```cmake +## vcpkg_check_features( ) +## ``` +## can be used as a replacement of: +## ```cmake +## if( IN_LIST FEATURES) +## set( ON) +## else() +## set( OFF) +## endif() +## ``` +## +## However, if you have a feature that was checked like this before: +## ```cmake +## if( IN_LIST FEATURES) +## set( OFF) +## else() +## set( ON) +## endif() +## ``` +## then you should not use `vcpkg_check_features` instead. [```oniguruma```](https://github.com/microsoft/vcpkg/blob/master/ports/oniguruma/portfile.cmake), for example, has a feature named `non-posix` which is checked with: +## ```cmake +## if("non-posix" IN_LIST FEATURES) +## set(ENABLE_POSIX_API OFF) +## else() +## set(ENABLE_POSIX_API ON) +## endif() +## ``` +## and by replacing these code with: +## ```cmake +## vcpkg_check_features(non-posix ENABLE_POSIX_API) +## ``` +## is totally wrong. +## +## `vcpkg_check_features` is supposed to be called only once. Otherwise, the `FEATURE_OPTIONS` variable set by a previous call will be overwritten. ## ## ## Examples ## ## * [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake) -## * [oniguruma](https://github.com/microsoft/vcpkg/blob/master/ports/oniguruma/portfile.cmake) +## * [xsimd](https://github.com/microsoft/vcpkg/blob/master/ports/xsimd/portfile.cmake) ## * [xtensor](https://github.com/microsoft/vcpkg/blob/master/ports/xtensor/portfile.cmake) function(vcpkg_check_features) cmake_parse_arguments(_vcf "" "" "" ${ARGN}) From b627d2cf7915b237ff7bce6c7d5453c783546210 Mon Sep 17 00:00:00 2001 From: Thad House Date: Sat, 29 Jun 2019 20:04:52 -0700 Subject: [PATCH 0092/1066] Update wpilib port to fix build with full package (#7087) Previously, a warning was being generated in a higher level project, and we build with /WX by default --- ports/wpilib/CONTROL | 2 +- ports/wpilib/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/wpilib/CONTROL b/ports/wpilib/CONTROL index 0d93d9bb5..a7542e8b8 100644 --- a/ports/wpilib/CONTROL +++ b/ports/wpilib/CONTROL @@ -1,5 +1,5 @@ Source: wpilib -Version: 2019.4.1 +Version: 2019.5.1 Build-Depends: libuv Description: WPILib is the software library package for the FIRST Robotics Competition. The core install includes wpiutil, a common utilies library, and ntcore, the base NetworkTables library. diff --git a/ports/wpilib/portfile.cmake b/ports/wpilib/portfile.cmake index 4bb8b80a5..314f0111b 100644 --- a/ports/wpilib/portfile.cmake +++ b/ports/wpilib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wpilibsuite/allwpilib - REF 221011494d202770ad275c88cd7380119505e65d - SHA512 97ec277b2e7d0a287e1d4eef4f60b5f5b5a70a861f984d0bfb17610ca8f43c723e1ba3cc1b428d243db62b50307edcf509e496f15cccdda78f962bf91aa4568a + REF 3dfb01d45b971ffdfeea50ce58653eff592807d9 + SHA512 188923cbe166f5812a24a06d8af56bda289aaed38231d45583d423e51e9cd23bb257ade02fdc26e8d0fdd6cdcb793282c04ac80ebad76f29fdbd0a3c1a10f05c ) set(WITHOUT_JAVA ON) From 8d7245a91e8130efd66561ddd90877837535cfab Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Sat, 29 Jun 2019 22:21:00 -0700 Subject: [PATCH 0093/1066] [zziplib] fix flaky build (#7090) --- ports/zziplib/CONTROL | 2 +- ports/zziplib/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/zziplib/CONTROL b/ports/zziplib/CONTROL index f756d19ae..cd879d0a3 100644 --- a/ports/zziplib/CONTROL +++ b/ports/zziplib/CONTROL @@ -1,5 +1,5 @@ Source: zziplib -Version: 0.13.69-3 +Version: 0.13.69-4 Build-Depends: zlib Homepage: https://github.com/gdraheim/zziplib Description: library providing read access on ZIP-archives diff --git a/ports/zziplib/portfile.cmake b/ports/zziplib/portfile.cmake index 534744714..7ca3ca2c4 100644 --- a/ports/zziplib/portfile.cmake +++ b/ports/zziplib/portfile.cmake @@ -22,6 +22,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE OPTIONS -DZLIB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include ) From b9b2a38c7bd9fd66a5b324b4f398024ad2569d60 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 29 Jun 2019 23:05:09 -0700 Subject: [PATCH 0094/1066] [vcpkg-integrate] Improve spelling, help, and autocomplete. (#7095) --- toolsrc/src/vcpkg/commands.integrate.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 6921a5390..fda9e2b11 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -409,7 +409,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console Checks::exit_with_code(VCPKG_LINE_INFO, rc); } -#elif defined(__unix__) +#else static void integrate_bash(const VcpkgPaths& paths) { const auto home_path = System::get_environment_variable("HOME").value_or_exit(VCPKG_LINE_INFO); @@ -458,11 +458,12 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console "first use\n" " vcpkg integrate remove Remove user-wide integration\n" " vcpkg integrate project Generate a referencing nuget package for individual VS project use\n" - " vcpkg integrate powershell Enable PowerShell Tab-Completion\n"; + " vcpkg integrate powershell Enable PowerShell tab-completion\n"; #else const char* const INTEGRATE_COMMAND_HELPSTRING = " vcpkg integrate install Make installed packages available user-wide.\n" - " vcpkg integrate remove Remove user-wide integration\n"; + " vcpkg integrate remove Remove user-wide integration\n" + " vcpkg integrate bash Enable bash tab-completion\n"; #endif namespace Subcommand @@ -476,7 +477,15 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console static std::vector valid_arguments(const VcpkgPaths&) { - return {Subcommand::INSTALL, Subcommand::REMOVE, Subcommand::PROJECT, Subcommand::POWERSHELL, Subcommand::BASH}; + return + { + Subcommand::INSTALL, Subcommand::REMOVE, +#if defined(_WIN32) + Subcommand::PROJECT, Subcommand::POWERSHELL, +#else + Subcommand::BASH, +#endif + }; } const CommandStructure COMMAND_STRUCTURE = { @@ -510,7 +519,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { return integrate_powershell(paths); } -#elif defined(__unix__) +#else if (args.command_arguments[0] == Subcommand::BASH) { return integrate_bash(paths); From bd72762f691ec7c4265ae0e041c655b6bc0ee1b3 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Sun, 30 Jun 2019 00:02:42 -0700 Subject: [PATCH 0095/1066] [libpmemobj-cpp] fix flaky config (#7097) --- ports/libpmemobj-cpp/CONTROL | 2 +- ports/libpmemobj-cpp/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/libpmemobj-cpp/CONTROL b/ports/libpmemobj-cpp/CONTROL index ebc46931b..ec1eb3628 100644 --- a/ports/libpmemobj-cpp/CONTROL +++ b/ports/libpmemobj-cpp/CONTROL @@ -1,4 +1,4 @@ Source: libpmemobj-cpp -Version: 1.6 +Version: 1.6-1 #Build-Depends: pmdk Description: C++ bindings for libpmemobj (https://github.com/pmem/pmdk). \ No newline at end of file diff --git a/ports/libpmemobj-cpp/portfile.cmake b/ports/libpmemobj-cpp/portfile.cmake index 563dd67d7..457711404 100644 --- a/ports/libpmemobj-cpp/portfile.cmake +++ b/ports/libpmemobj-cpp/portfile.cmake @@ -15,6 +15,7 @@ set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE OPTIONS -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF From 8e747d659c40775ce2a5a2e5d0230e4fd659ef57 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Sun, 30 Jun 2019 00:15:08 -0700 Subject: [PATCH 0096/1066] [vcpkg] fail archived port install when decompression fails (#7086) * [vcpkg] fail port install when decompression fails * [vcpkg] clang-format --- toolsrc/src/vcpkg/build.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index f826a4865..9694bce4c 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -594,7 +594,7 @@ namespace vcpkg::Build return nullopt; } - static void decompress_archive(const VcpkgPaths& paths, const PackageSpec& spec, const fs::path& archive_path) + static int decompress_archive(const VcpkgPaths& paths, const PackageSpec& spec, const fs::path& archive_path) { auto& fs = paths.get_filesystem(); @@ -608,12 +608,13 @@ namespace vcpkg::Build #if defined(_WIN32) auto&& seven_zip_exe = paths.get_tool_exe(Tools::SEVEN_ZIP); - System::cmd_execute_clean(Strings::format( + int result = System::cmd_execute_clean(Strings::format( R"("%s" x "%s" -o"%s" -y >nul)", seven_zip_exe.u8string(), archive_path.u8string(), pkg_path.u8string())); #else - System::cmd_execute_clean( + int result = System::cmd_execute_clean( Strings::format(R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); #endif + return result; } // Compress the source directory into the destination file. @@ -699,11 +700,16 @@ namespace vcpkg::Build { System::print2("Using cached binary package: ", archive_path.u8string(), "\n"); - decompress_archive(paths, spec, archive_path); + auto archive_result = decompress_archive(paths, spec, archive_path); + + if (archive_result != 0) + { + System::print2("Failed to decompress archive package\n"); + return BuildResult::BUILD_FAILED; + } auto maybe_bcf = Paragraphs::try_load_cached_package(paths, spec); - std::unique_ptr bcf = - std::make_unique(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); + auto bcf = std::make_unique(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); return {BuildResult::SUCCEEDED, std::move(bcf)}; } From 88fa3bdfd5b4f4476e7a2a9a8c94809e85c52401 Mon Sep 17 00:00:00 2001 From: StephaneBPRO Date: Sun, 30 Jun 2019 11:47:37 +0200 Subject: [PATCH 0097/1066] Adding EglContext / CglContext / GlxContext (#7060) Adding the Egl/Cgl/Clx Context plugin to manage crossplatform OpenGL context (MacOs / Linux) --- ports/magnum/CONTROL | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 89bcff28e..44acd700e 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -117,6 +117,18 @@ Feature: windowlesswglapplication Description: WindowlessWglApplication library Build-Depends: magnum[gl] +Feature: eglcontext +Description: EglContext library +Build-Depends: magnum[gl] + +Feature: cglcontext +Description: CglContext library +Build-Depends: magnum[gl] + +Feature: glxcontext +Description: GlxContext library +Build-Depends: magnum[gl] + Feature: wglcontext Description: WglContext library Build-Depends: magnum[gl] From 700a3e180c88c5fbd2ded05c25e8683278a2d33b Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Sun, 30 Jun 2019 17:49:11 +0800 Subject: [PATCH 0098/1066] [freetype] Upgrade to version 2.10.0 (#7057) * [freetype] Upgrade to version 2.10.0 * [freetype] Fix old patches --- .../0002-Add-CONFIG_INSTALL_PATH-option.patch | 11 ++++---- ports/freetype/0003-Fix-UWP.patch | 26 +++++++++---------- ports/freetype/0004-Fix-DLL-install.patch | 13 ---------- ports/freetype/CONTROL | 2 +- ports/freetype/portfile.cmake | 6 ++--- 5 files changed, 20 insertions(+), 38 deletions(-) delete mode 100644 ports/freetype/0004-Fix-DLL-install.patch diff --git a/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch b/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch index 993576160..65f9631ca 100644 --- a/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch +++ b/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch @@ -1,23 +1,22 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 32324d6..89a73a4 100644 +index a418c44..db48e9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -151,6 +151,9 @@ option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF) +@@ -156,6 +156,8 @@ option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF) option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF) option(FT_WITH_HARFBUZZ "Improve auto-hinting of OpenType fonts." OFF) +# vcpkg config install path +option(CONFIG_INSTALL_PATH "location to install cmake config files" lib/cmake/freetype) -+ # Disallow in-source builds - if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}") -@@ -475,7 +478,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) + if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") +@@ -488,7 +490,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) COMPONENT libraries) install( EXPORT freetype-targets - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype -+ DESTINATION ${CONFIG_INSTALL_PATH} ++ DESTINATION ${CONFIG_INSTALL_PATH} FILE freetype-config.cmake COMPONENT headers) endif () diff --git a/ports/freetype/0003-Fix-UWP.patch b/ports/freetype/0003-Fix-UWP.patch index 937942189..b3a04188c 100644 --- a/ports/freetype/0003-Fix-UWP.patch +++ b/ports/freetype/0003-Fix-UWP.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 89a73a4..fe9bc65 100644 +index db48e9f..5c35276 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -321,6 +321,10 @@ else () +@@ -328,6 +328,10 @@ else () list(APPEND BASE_SRCS src/base/ftdebug.c) endif () @@ -14,14 +14,14 @@ index 89a73a4..fe9bc65 100644 list(APPEND BASE_SRCS builds/mac/freetype-Info.plist) endif () diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h -index 9664404..f56335a 100644 +index 4f2eaca..1e01fe4 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h -@@ -1066,6 +1066,11 @@ FT_BEGIN_HEADER - /* Especially for TrueType fonts see also the documentation for */ - /* @FT_Size_Metrics. */ - /* */ -+ +@@ -1038,6 +1038,11 @@ FT_BEGIN_HEADER + * Especially for TrueType fonts see also the documentation for + * @FT_Size_Metrics. + */ ++ +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) +#define generic GenericFromFreeTypeLibrary +#endif @@ -29,7 +29,7 @@ index 9664404..f56335a 100644 typedef struct FT_FaceRec_ { FT_Long num_faces; -@@ -1942,6 +1947,9 @@ FT_BEGIN_HEADER +@@ -1910,6 +1915,9 @@ FT_BEGIN_HEADER } FT_GlyphSlotRec; @@ -40,28 +40,26 @@ index 9664404..f56335a 100644 /*************************************************************************/ /*************************************************************************/ diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c -index 8d07e35..ce6fffd 100644 +index 3f8619d..edf03b6 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c -@@ -491,6 +491,10 @@ +@@ -528,6 +528,9 @@ return error; } +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) +#define generic GenericFromFreeTypeLibrary +#endif -+ static void ft_glyphslot_clear( FT_GlyphSlot slot ) -@@ -1151,6 +1155,10 @@ +@@ -1195,6 +1198,9 @@ FT_FREE( face ); } +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) +#undef generic +#endif -+ static void Destroy_Driver( FT_Driver driver ) diff --git a/ports/freetype/0004-Fix-DLL-install.patch b/ports/freetype/0004-Fix-DLL-install.patch deleted file mode 100644 index 8d70b993f..000000000 --- a/ports/freetype/0004-Fix-DLL-install.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fe9bc65..dd8a878 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -478,6 +478,8 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - EXPORT freetype-targets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+# DLL is RUNTIME -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - FRAMEWORK DESTINATION Library/Frameworks - COMPONENT libraries) - install( diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL index 21b6c59f4..91116126d 100644 --- a/ports/freetype/CONTROL +++ b/ports/freetype/CONTROL @@ -1,5 +1,5 @@ Source: freetype -Version: 2.9.1-2 +Version: 2.10.0 Build-Depends: zlib, bzip2, libpng Homepage: https://www.freetype.org/ Description: A library to render fonts. diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index 654cff2b9..39d462a34 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(FT_VERSION 2.9.1) +set(FT_VERSION 2.10.0) vcpkg_download_distfile(ARCHIVE URLS "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.bz2" "https://downloads.sourceforge.net/project/freetype/freetype2/${FT_VERSION}/freetype-${FT_VERSION}.tar.bz2" FILENAME "freetype-${FT_VERSION}.tar.bz2" - SHA512 856766e1f3f4c7dc8afb2b5ee991138c8b642c6a6e5e007cd2bc04ae58bde827f082557cf41bf541d97e8485f7fd064d10390d1ee597f19d1daed6c152e27708 + SHA512 dfad66f419ea9577f09932e0730c0c887bdcbdbc8152fa7477a0c39d69a5b68476761deed6864ddcc5cf18d100a7a3f728049768e24afcb04b1a74b25b6acf7e ) if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") @@ -16,7 +16,6 @@ if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") 0001-Fix-install-command.patch 0002-Add-CONFIG_INSTALL_PATH-option.patch 0003-Fix-UWP.patch - 0004-Fix-DLL-install.patch ) else() vcpkg_extract_source_archive_ex( @@ -27,7 +26,6 @@ else() 0001-Fix-install-command.patch 0002-Add-CONFIG_INSTALL_PATH-option.patch 0003-Fix-UWP.patch - 0004-Fix-DLL-install.patch 0005-Fix-DLL-EXPORTS.patch ) endif() From e2049cb9754006b6a2abed781d34030e16702fad Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Sun, 30 Jun 2019 09:31:22 -0700 Subject: [PATCH 0099/1066] [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option (#7074) * [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option * [vcpkg_configure_cmake] Add documentation for new NO_CHARSET_FLAG option * [vcpkg_configure_cmake, windows toolchain] Handle NO_CHARSET_FLAG in toolchain * [build.cpp] Add Windows toolchain to package hash * [duilib,msix,thrift,tidy-html5] Use NO_CHARSET_FLAG to fix regressions --- docs/maintainers/vcpkg_configure_cmake.md | 6 ++++++ ports/duilib/CONTROL | 2 +- ports/duilib/portfile.cmake | 1 + ports/msix/CONTROL | 2 +- ports/msix/portfile.cmake | 1 + ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 1 + ports/tidy-html5/CONTROL | 2 +- ports/tidy-html5/portfile.cmake | 1 + scripts/cmake/vcpkg_configure_cmake.cmake | 9 ++++++++- scripts/toolchains/windows.cmake | 6 +++--- toolsrc/src/vcpkg/build.cpp | 6 ++++++ 12 files changed, 31 insertions(+), 8 deletions(-) diff --git a/docs/maintainers/vcpkg_configure_cmake.md b/docs/maintainers/vcpkg_configure_cmake.md index f61a6fa20..b78ef54d9 100644 --- a/docs/maintainers/vcpkg_configure_cmake.md +++ b/docs/maintainers/vcpkg_configure_cmake.md @@ -8,6 +8,7 @@ vcpkg_configure_cmake( SOURCE_PATH <${SOURCE_PATH}> [PREFER_NINJA] [DISABLE_PARALLEL_CONFIGURE] + [NO_CHARSET_FLAG] [GENERATOR <"NMake Makefiles">] [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] [OPTIONS_RELEASE <-DOPTIMIZE=1>...] @@ -27,6 +28,11 @@ Disables running the CMake configure step in parallel. This is needed for libraries which write back into their source directory during configure. +### NO_CHARSET_FLAG +Disables passing `utf-8` as the default character set to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`. + +This is needed for libraries that set their own source code's character set. + ### GENERATOR Specifies the precise generator to use. diff --git a/ports/duilib/CONTROL b/ports/duilib/CONTROL index 9154664ea..cb4c7ed3f 100644 --- a/ports/duilib/CONTROL +++ b/ports/duilib/CONTROL @@ -1,3 +1,3 @@ Source: duilib -Version: 2019-4-28-1 +Version: 2019-4-28-2 Description: Duilib is a free open source DirectUI interface library under Windows. It is widely accepted by major Internet companies due to its simple and easy to expand design and stable and efficient implementation. It is widely used in IM, video client, stock market software, navigation software, and mobile phone assistive software. Duilib is still evolving, and will continue to improve in many aspects such as documentation, examples, animations, and rendering engines. diff --git a/ports/duilib/portfile.cmake b/ports/duilib/portfile.cmake index 7e30c9940..5556d22cd 100644 --- a/ports/duilib/portfile.cmake +++ b/ports/duilib/portfile.cmake @@ -16,6 +16,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/DuiLib PREFER_NINJA + NO_CHARSET_FLAG ) vcpkg_build_cmake() diff --git a/ports/msix/CONTROL b/ports/msix/CONTROL index ae41a6ba1..848e95be3 100644 --- a/ports/msix/CONTROL +++ b/ports/msix/CONTROL @@ -1,5 +1,5 @@ Source: msix -Version: MsixCoreInstaller-preview +Version: MsixCoreInstaller-preview-1 Build-Depends: xerces-c, zlib, openssl (!uwp&!windows) Description: The MSIX Packaging SDK project is an effort to enable developers on a variety of platforms to pack and unpack packages for the purposes of distribution from either the Microsoft Store, or their own content distribution networks. The MSIX Packaging APIs that a client app would use to interact with .msix/.appx packages are a subset of those documented here. See sample/ExtractContentsSample/ExtractContentsSample.cpp for additional details. diff --git a/ports/msix/portfile.cmake b/ports/msix/portfile.cmake index 1445e5845..7d8924ee6 100644 --- a/ports/msix/portfile.cmake +++ b/ports/msix/portfile.cmake @@ -31,6 +31,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + NO_CHARSET_FLAG OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -DINSTALL_LIBMSIX=ON diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index c3f2f83c9..2ee3ef03e 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,5 +1,5 @@ Source: thrift -Version: 2019-05-07-1 +Version: 2019-05-07-2 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit Homepage: https://github.com/apache/thrift Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index c19b38c31..c7fd84003 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -16,6 +16,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + NO_CHARSET_FLAG OPTIONS -DWITH_STDTHREADS=ON -DBUILD_TESTING=off diff --git a/ports/tidy-html5/CONTROL b/ports/tidy-html5/CONTROL index 0f608ea2d..af8276ee5 100644 --- a/ports/tidy-html5/CONTROL +++ b/ports/tidy-html5/CONTROL @@ -1,4 +1,4 @@ Source: tidy-html5 -Version: 5.6.0 +Version: 5.6.0-1 Homepage: https://github.com/htacg/tidy-html5 Description: Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools. diff --git a/ports/tidy-html5/portfile.cmake b/ports/tidy-html5/portfile.cmake index 7cb7ca65f..e59904923 100644 --- a/ports/tidy-html5/portfile.cmake +++ b/ports/tidy-html5/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + NO_CHARSET_FLAG OPTIONS -DBUILD_SHARED_LIB=OFF -DTIDY_CONSOLE_SHARED=OFF diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index c17bd68c8..ab93c3075 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -51,7 +51,7 @@ ## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) ## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) function(vcpkg_configure_cmake) - cmake_parse_arguments(_csc "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + cmake_parse_arguments(_csc "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) if(NOT VCPKG_PLATFORM_TOOLSET) message(FATAL_ERROR "Vcpkg has been updated with VS2017 support, however you need to rebuild vcpkg.exe by re-running bootstrap-vcpkg.bat\n") @@ -174,6 +174,11 @@ function(vcpkg_configure_cmake) else() message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS") endif() + + set(VCPKG_SET_CHARSET_FLAG ON) + if(_csc_NO_CHARSET_FLAG) + set(VCPKG_SET_CHARSET_FLAG OFF) + endif() if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") @@ -189,8 +194,10 @@ function(vcpkg_configure_cmake) list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/freebsd.cmake") endif() + list(APPEND _csc_OPTIONS "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" + "-DVCPKG_SET_CHARSET_FLAG=${VCPKG_SET_CHARSET_FLAG}" "-DVCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" diff --git a/scripts/toolchains/windows.cmake b/scripts/toolchains/windows.cmake index 12b1ae7f9..d5d7f8db5 100644 --- a/scripts/toolchains/windows.cmake +++ b/scripts/toolchains/windows.cmake @@ -9,7 +9,8 @@ if(NOT _CMAKE_IN_TRY_COMPILE) message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"") endif() - if(VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(CHARSET_FLAG "/utf-8") + if (NOT VCPKG_SET_CHARSET_FLAG OR VCPKG_PLATFORM_TOOLSET MATCHES "v120") # VS 2013 does not support /utf-8 set(CHARSET_FLAG) endif() @@ -17,7 +18,7 @@ if(NOT _CMAKE_IN_TRY_COMPILE) set(CMAKE_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 ${CHARSET_FLAG} /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" CACHE STRING "") set(CMAKE_C_FLAGS " /DWIN32 /D_WINDOWS /W3 ${CHARSET_FLAG} /MP ${VCPKG_C_FLAGS}" CACHE STRING "") set(CMAKE_RC_FLAGS "-c65001 /DWIN32" CACHE STRING "") - + unset(CHARSET_FLAG) set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "") @@ -27,5 +28,4 @@ if(NOT _CMAKE_IN_TRY_COMPILE) set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" CACHE STRING "") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" CACHE STRING "") - endif() diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 9694bce4c..1975d3aaf 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -1007,6 +1007,12 @@ namespace vcpkg::Build hash += "-"; hash += Hash::get_file_hash(fs, *p, "SHA1"); } + else if (pre_build_info.cmake_system_name.empty() || + pre_build_info.cmake_system_name == "WindowsStore") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "windows.cmake", "SHA1"); + } else if (pre_build_info.cmake_system_name == "Linux") { hash += "-"; From dbeae6f05c417e7652f7295f77c94f9cd6bda992 Mon Sep 17 00:00:00 2001 From: grdowns Date: Mon, 1 Jul 2019 12:41:26 -0700 Subject: [PATCH 0100/1066] Clean up comments and whitespace --- ports/soxr/portfile.cmake | 46 ++++++++++----------------------------- 1 file changed, 12 insertions(+), 34 deletions(-) diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index c1a028114..15180241c 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -1,33 +1,14 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "https://netcologne.dl.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz" - FILENAME "soxr-0.1.3-Source.tar.xz" - SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8 + URLS "https://netcologne.dl.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz" + FILENAME "soxr-0.1.3-Source.tar.xz" + SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8 ) vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag). - # REF 1.0.0 - # (Optional) Read the docs for how to generate patches at: - # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md - # PATCHES - # 001_port_fixes.patch - # 002_more_port_fixes.patch + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} PATCHES 001_initialize-resampler.patch 002_disable_warning.patch @@ -35,21 +16,18 @@ vcpkg_extract_source_archive_ex( ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 - OPTIONS -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DWITH_OPENMP=OFF -DWITH_LSR_BINDINGS=OFF + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DWITH_OPENMP=OFF + -DWITH_LSR_BINDINGS=OFF ) vcpkg_install_cmake() -# Handle copyright file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soxr RENAME copyright) -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME soxr) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) From 65d807be5777bbb6d49cc7ad4d731b0642d9361b Mon Sep 17 00:00:00 2001 From: grdowns Date: Mon, 1 Jul 2019 12:42:53 -0700 Subject: [PATCH 0101/1066] Rename patch file --- ..._detect_arm_on_windows.h => 003_detect_arm_on_windows.patch} | 0 ports/soxr/portfile.cmake | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename ports/soxr/{003_detect_arm_on_windows.h => 003_detect_arm_on_windows.patch} (100%) diff --git a/ports/soxr/003_detect_arm_on_windows.h b/ports/soxr/003_detect_arm_on_windows.patch similarity index 100% rename from ports/soxr/003_detect_arm_on_windows.h rename to ports/soxr/003_detect_arm_on_windows.patch diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index 15180241c..3a2e23c30 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -12,7 +12,7 @@ vcpkg_extract_source_archive_ex( PATCHES 001_initialize-resampler.patch 002_disable_warning.patch - 003_detect_arm_on_windows.h + 003_detect_arm_on_windows.patch ) vcpkg_configure_cmake( From b26cb1a041177ab113c723d89a4ef2af5614a9e5 Mon Sep 17 00:00:00 2001 From: Leonid Pospelov Date: Mon, 1 Jul 2019 22:30:24 +0200 Subject: [PATCH 0102/1066] [vcpkg] Use spaces instead of semicolons in the output (#7080) * Use spaces instead of semicolons in the output * Add prettify_command macro * Move pretty_command macro to a separate file --- scripts/cmake/vcpkg_common_functions.cmake | 1 + .../cmake/vcpkg_execute_build_process.cmake | 4 ++- .../vcpkg_execute_required_process.cmake | 4 ++- ...cpkg_execute_required_process_repeat.cmake | 4 ++- scripts/cmake/vcpkg_prettify_command.cmake | 26 +++++++++++++++++++ 5 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 scripts/cmake/vcpkg_prettify_command.cmake diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 827d43abe..515b2bafe 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -32,3 +32,4 @@ include(vcpkg_get_windows_sdk) include(vcpkg_replace_string) include(vcpkg_from_git) include(vcpkg_test_cmake) +include(vcpkg_prettify_command) diff --git a/scripts/cmake/vcpkg_execute_build_process.cmake b/scripts/cmake/vcpkg_execute_build_process.cmake index d440ba2f6..9da6cec9f 100644 --- a/scripts/cmake/vcpkg_execute_build_process.cmake +++ b/scripts/cmake/vcpkg_execute_build_process.cmake @@ -31,6 +31,7 @@ ## ## Examples ## ## * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) +include(vcpkg_prettify_command) function(vcpkg_execute_build_process) cmake_parse_arguments(_ebp "" "WORKING_DIRECTORY;LOGNAME" "COMMAND;NO_PARALLEL_COMMAND" ${ARGN}) @@ -131,8 +132,9 @@ function(vcpkg_execute_build_process) file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") endforeach() + vcpkg_prettify_command(_ebp_COMMAND _ebp_COMMAND_PRETTY) message(FATAL_ERROR - " Command failed: ${_ebp_COMMAND}\n" + " Command failed: ${_ebp_COMMAND_PRETTY}\n" " Working Directory: ${_ebp_WORKING_DIRECTORY}\n" " See logs for more information:\n" ${STRINGIFIED_LOGS}) diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index 2e9ba7058..e65d1970a 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -28,6 +28,7 @@ ## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) ## * [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) ## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) +include(vcpkg_prettify_command) function(vcpkg_execute_required_process) cmake_parse_arguments(vcpkg_execute_required_process "" "WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log") @@ -53,8 +54,9 @@ function(vcpkg_execute_required_process) file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") endforeach() + vcpkg_prettify_command(vcpkg_execute_required_process_COMMAND vcpkg_execute_required_process_COMMAND_PRETTY) message(FATAL_ERROR - " Command failed: ${vcpkg_execute_required_process_COMMAND}\n" + " Command failed: ${vcpkg_execute_required_process_COMMAND_PRETTY}\n" " Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" " Error code: ${error_code}\n" " See logs for more information:\n" diff --git a/scripts/cmake/vcpkg_execute_required_process_repeat.cmake b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake index 0c77c3913..ca11e8ea4 100644 --- a/scripts/cmake/vcpkg_execute_required_process_repeat.cmake +++ b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake @@ -1,4 +1,5 @@ # Usage: vcpkg_execute_required_process_repeat(COUNT COMMAND [...] WORKING_DIRECTORY LOGNAME ) +include(vcpkg_prettify_command) function(vcpkg_execute_required_process_repeat) cmake_parse_arguments(vcpkg_execute_required_process_repeat "" "COUNT;WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) #debug_message("vcpkg_execute_required_process_repeat(${vcpkg_execute_required_process_repeat_COMMAND})") @@ -18,8 +19,9 @@ function(vcpkg_execute_required_process_repeat) endif() endforeach(loop_count) if (NOT SUCCESSFUL_EXECUTION) + vcpkg_prettify_command(vcpkg_execute_required_process_repeat_COMMAND vcpkg_execute_required_process_repeat_COMMAND_PRETTY) message(FATAL_ERROR - " Command failed: ${vcpkg_execute_required_process_repeat_COMMAND}\n" + " Command failed: ${vcpkg_execute_required_process_repeat_COMMAND_PRETTY}\n" " Working Directory: ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY}\n" " See logs for more information:\n" " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_repeat_LOGNAME}-out.log\n" diff --git a/scripts/cmake/vcpkg_prettify_command.cmake b/scripts/cmake/vcpkg_prettify_command.cmake new file mode 100644 index 000000000..9d9a2b798 --- /dev/null +++ b/scripts/cmake/vcpkg_prettify_command.cmake @@ -0,0 +1,26 @@ +## # vcpkg_prettify_command +## +## Turns list of command arguments into a formatted string. +## +## ## Usage +## ```cmake +## vcpkg_prettify_command() +## ``` +## +## ## Examples +## +## * `scripts/cmake/vcpkg_execute_build_process.cmake` +## * `scripts/cmake/vcpkg_execute_required_process.cmake` +## * `scripts/cmake/vcpkg_execute_required_process_repeat.cmake` + +macro(vcpkg_prettify_command INPUT_VAR OUTPUT_VAR) + set(${OUTPUT_VAR} "") + foreach(v ${${INPUT_VAR}}) + if(${v} MATCHES "( )") + list(APPEND ${OUTPUT_VAR} \"${v}\") + else() + list(APPEND ${OUTPUT_VAR} ${v}) + endif() + endforeach() + list(JOIN ${OUTPUT_VAR} " " ${OUTPUT_VAR}) +endmacro() From 12587b1b882905431d19052b2b068e499a1d9791 Mon Sep 17 00:00:00 2001 From: YenForYang Date: Mon, 1 Jul 2019 15:31:17 -0500 Subject: [PATCH 0103/1066] Update python2, python3, perl, aria2, ninja, ruby, 7z (#6791) --- .../cmake/vcpkg_find_acquire_program.cmake | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 024840223..0399fc50c 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -54,9 +54,9 @@ function(vcpkg_find_acquire_program VAR) set(PATHS ${DOWNLOADS}/tools/perl/perl/bin) set(BREW_PACKAGE_NAME "perl") set(APT_PACKAGE_NAME "perl") - set(URL "http://strawberryperl.com/download/5.24.1.1/strawberry-perl-5.24.1.1-32bit-portable.zip") - set(ARCHIVE "strawberry-perl-5.24.1.1-32bit-portable.zip") - set(HASH a6e685ea24376f50db5f06c5b46075f1d3be25168fa1f27fa9b02e2ac017826cee62a2b43562f9b6c989337a231ba914416c110075457764de2d11f99d5e0f26) + set(URL "http://strawberryperl.com/download/5.30.0.1/strawberry-perl-5.30.0.1-32bit.zip") + set(ARCHIVE "strawberry-perl-5.30.0.1-32bit.zip") + set(HASH d353d3dc743ebdc6d1e9f6f2b7a6db3c387c1ce6c890bae8adc8ae5deae8404f4c5e3cf249d1e151e7256d4c5ee9cd317e6c41f3b6f244340de18a24b938e0c4) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.14) @@ -92,9 +92,9 @@ function(vcpkg_find_acquire_program VAR) set(PROGNAME python) set(SUBDIR "python2") set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) - set(URL "https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi") + set(URL "https://www.python.org/ftp/python/2.7.16/python-2.7.16.msi") set(ARCHIVE "python2.msi") - set(HASH 8c3ad6e527742d99ba96dcfd1098861b14e7207b80d51a54e9b410ab2f36e44e05561ea1527d8e92b3e10808311536260bd9e82db0da3b513fb1be18e108510e) + set(HASH c34a6fa2438682104dccb53650a2bdb79eac7996deff075201a0f71bb835d60d3ed866652a1931f15a29510fe8e1009ac04e423b285122d2e5747fefc4c10254) else() set(PROGNAME python2) set(BREW_PACKAGE_NAME "python2") @@ -102,10 +102,10 @@ function(vcpkg_find_acquire_program VAR) endif() elseif(VAR MATCHES "RUBY") set(PROGNAME "ruby") - set(PATHS ${DOWNLOADS}/tools/ruby/rubyinstaller-2.4.1-1-x86/bin) - set(URL https://github.com/oneclick/rubyinstaller2/releases/download/2.4.1-1/rubyinstaller-2.4.1-1-x86.7z) - set(ARCHIVE rubyinstaller-2.4.1-1-x86.7z) - set(HASH b51112e9b58cfcbe8cec0607e8a16fff6a943d9b4e31b2a7fbf5df5f83f050bf0a4812d3dd6000ff21a3d5fd219cd0a309c58ac1c1db950a9b0072405e4b70f5) + set(PATHS ${DOWNLOADS}/tools/ruby/rubyinstaller-2.6.3-1-x86/bin) + set(URL https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.3-1/rubyinstaller-2.6.3-1-x86.7z) + set(ARCHIVE rubyinstaller-2.6.3-1-x86.7z) + set(HASH 4322317dd02ce13527bf09d6e6a7787ca3814ea04337107d28af1ac360bd272504b32e20ed3ea84eb5b21dae7b23bfe5eb0e529b6b0aa21a1a2bbb0a542d7aec) elseif(VAR MATCHES "JOM") set(PROGNAME jom) set(SUBDIR "jom-1.1.3") @@ -116,12 +116,12 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "7Z") set(PROGNAME 7z) set(PATHS "${PROGRAM_FILES_PLATFORM_BITNESS}/7-Zip" "${PROGRAM_FILES_32_BIT}/7-Zip" "${DOWNLOADS}/tools/7z/Files/7-Zip") - set(URL "http://7-zip.org/a/7z1604.msi") - set(ARCHIVE "7z1604.msi") - set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) + set(URL "https://7-zip.org/a/7z1900.msi") + set(ARCHIVE "7z1900.msi") + set(HASH f73b04e2d9f29d4393fde572dcf3c3f0f6fa27e747e5df292294ab7536ae24c239bf917689d71eb10cc49f6b9a4ace26d7c122ee887d93cc935f268c404e9067) elseif(VAR MATCHES "NINJA") set(PROGNAME ninja) - set(SUBDIR "ninja-1.8.2") + set(SUBDIR "ninja-1.9.0") if(CMAKE_HOST_WIN32) set(PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}") elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") @@ -133,9 +133,9 @@ function(vcpkg_find_acquire_program VAR) endif() set(BREW_PACKAGE_NAME "ninja") set(APT_PACKAGE_NAME "ninja-build") - set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip") - set(ARCHIVE "ninja-1.8.2-win.zip") - set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5) + set(URL "https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip") + set(ARCHIVE "ninja-1.9.0-win.zip") + set(HASH 1c050e602ec63d4dcf44d9ab3d2d02ac731b4b2977bc0b420a21e85604487f58ec8d3045941d4153ef06ab00c175ca7cf9d57b8e20a757528290e135639962ac) elseif(VAR MATCHES "NUGET") set(PROGNAME nuget) set(PATHS "${DOWNLOADS}/tools/nuget") @@ -229,10 +229,10 @@ function(vcpkg_find_acquire_program VAR) # Download Tools elseif(VAR MATCHES "ARIA2") set(PROGNAME aria2c) - set(PATHS ${DOWNLOADS}/tools/aria2c/aria2-1.33.1-win-32bit-build1) - set(URL "https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip") - set(ARCHIVE "aria2-1.33.1-win-32bit-build1.zip") - set(HASH 2456176ba3d506a07cf0cc4f61f080e1ff8cb4106426d66f354c5bb67a9a8720b5ddb26904275e61b1f623c932355f7dcde4cd17556cc895f11293c23c3a9bf3) + set(PATHS ${DOWNLOADS}/tools/aria2c/aria2-1.34.0-win-32bit-build1) + set(URL "https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip") + set(ARCHIVE "aria2-1.34.0-win-32bit-build1.zip") + set(HASH 2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() From d2b3ef9e88fcb51b7273a76abe6e78d49d73a329 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Mon, 1 Jul 2019 22:39:51 -0700 Subject: [PATCH 0104/1066] Fix vcpkg_from_git (#7082) * [vcpkg_from_git/fdlibm] Fix flaky sha256 issues * [doc] regenerate docs --- docs/maintainers/vcpkg_from_git.md | 14 ++----- ports/fdlibm/CONTROL | 2 +- ports/fdlibm/portfile.cmake | 13 ------- scripts/cmake/vcpkg_from_git.cmake | 61 ++++++++++++++---------------- 4 files changed, 33 insertions(+), 57 deletions(-) diff --git a/docs/maintainers/vcpkg_from_git.md b/docs/maintainers/vcpkg_from_git.md index 6b24a558d..4b9a26c62 100644 --- a/docs/maintainers/vcpkg_from_git.md +++ b/docs/maintainers/vcpkg_from_git.md @@ -8,7 +8,6 @@ vcpkg_from_git( OUT_SOURCE_PATH URL REF <59f7335e4d...> - SHA512 [PATCHES ...] ) ``` @@ -20,17 +19,10 @@ Specifies the out-variable that will contain the extracted location. This should be set to `SOURCE_PATH` by convention. ### URL -The url of the git repository. - -### SHA512 -The SHA512 hash that should match the archive form of the commit. - -This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +The url of the git repository. Must start with `https`. ### REF -A stable git commit-ish (ideally a tag or commit) that will not change contents. **This should not be a branch.** - -For repositories without official releases, this can be set to the full commit id of the current latest master. +The git sha of the commit to download. ### PATCHES A list of patches to be applied to the extracted sources. @@ -38,7 +30,7 @@ A list of patches to be applied to the extracted sources. Relative paths are based on the port directory. ## Notes: -`OUT_SOURCE_PATH`, `REF`, `SHA512`, and `URL` must be specified. +`OUT_SOURCE_PATH`, `REF`, and `URL` must be specified. ## Examples: diff --git a/ports/fdlibm/CONTROL b/ports/fdlibm/CONTROL index c1562c970..14bc9ad64 100644 --- a/ports/fdlibm/CONTROL +++ b/ports/fdlibm/CONTROL @@ -1,3 +1,3 @@ Source: fdlibm -Version: 5.3-3 +Version: 5.3-4 Description: FDLIBM (Freely Distributable LIBM) is a C math library for machines that support IEEE 754 floating-point arithmetic diff --git a/ports/fdlibm/portfile.cmake b/ports/fdlibm/portfile.cmake index ef069289d..7bbd21f06 100644 --- a/ports/fdlibm/portfile.cmake +++ b/ports/fdlibm/portfile.cmake @@ -1,22 +1,9 @@ include(vcpkg_common_functions) -# vcpkg_from_git uses git archive to generate the hash, -# depending on what system or git settings this runs with it will result in a different hash -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(FDLIBM_HASH 825dcbbb88e3ebda6d928e1794da58d5135d37e36551c12de7eeab58a67adc4f5629c65d6afde567daeb489c287302116b2a5bbdb16693a3b068bbe16b250cf7) -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(FDLIBM_HASH 954c75f9f7540f4efb21b1f8de296149c648c0ba10d5e9cc99a247164b9e99b6dc37349a9ddaa04ba93dc035562457665aacf7146926d716cd406b63b97c5d44) -else() - # depending on how git is configured the hash could be - # bc788c840a57716f996513980d31b203bd86ce9af1ac3656a187266bfdc2fbb22a9ddf88f79ffc91dd75f3f1f1e4fd3449a42b566ffe5e49e9384efd91a68613 - set(FDLIBM_HASH 75c49ba2875b73e0bfe3a4595be1478ce6041236653b803b02ba00997652c969c351c9647923692af0799149da86c737467ab2954bd8845a2f75b14fde71ac29) -endif() - vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL https://android.googlesource.com/platform/external/fdlibm REF 59f7335e4dd8275a7dc2f8aeb4fd00758fde37ac - SHA512 ${FDLIBM_HASH} ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/scripts/cmake/vcpkg_from_git.cmake b/scripts/cmake/vcpkg_from_git.cmake index 2fc66b279..0db818f80 100644 --- a/scripts/cmake/vcpkg_from_git.cmake +++ b/scripts/cmake/vcpkg_from_git.cmake @@ -8,7 +8,6 @@ ## OUT_SOURCE_PATH ## URL ## REF <59f7335e4d...> -## SHA512 ## [PATCHES ...] ## ) ## ``` @@ -20,17 +19,10 @@ ## This should be set to `SOURCE_PATH` by convention. ## ## ### URL -## The url of the git repository. -## -## ### SHA512 -## The SHA512 hash that should match the archive form of the commit. -## -## This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +## The url of the git repository. Must start with `https`. ## ## ### REF -## A stable git commit-ish (ideally a tag or commit) that will not change contents. **This should not be a branch.** -## -## For repositories without official releases, this can be set to the full commit id of the current latest master. +## The git sha of the commit to download. ## ## ### PATCHES ## A list of patches to be applied to the extracted sources. @@ -38,14 +30,14 @@ ## Relative paths are based on the port directory. ## ## ## Notes: -## `OUT_SOURCE_PATH`, `REF`, `SHA512`, and `URL` must be specified. +## `OUT_SOURCE_PATH`, `REF`, and `URL` must be specified. ## ## ## Examples: ## ## * [fdlibm](https://github.com/Microsoft/vcpkg/blob/master/ports/fdlibm/portfile.cmake) function(vcpkg_from_git) - set(oneValueArgs OUT_SOURCE_PATH URL REF SHA512) + set(oneValueArgs OUT_SOURCE_PATH URL REF) set(multipleValuesArgs PATCHES) cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) @@ -57,12 +49,15 @@ function(vcpkg_from_git) message(FATAL_ERROR "The git url must be specified") endif() - if(NOT DEFINED _vdud_REF) - message(FATAL_ERROR "The git ref must be specified.") + if( NOT _vdud_URL MATCHES "^https:") + # vcpkg_from_git does not support a SHA256 parameter because hashing the git archive is + # not stable across all supported platforms. The tradeoff is to require https to download + # and the ref to be the git sha (i.e. not things that can change like a label) + message(FATAL_ERROR "The git url must be https") endif() - if(NOT DEFINED _vdud_SHA512) - message(FATAL_ERROR "vcpkg_from_git requires a SHA512 argument. If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") + if(NOT DEFINED _vdud_REF) + message(FATAL_ERROR "The git ref must be specified.") endif() # using .tar.gz instead of .zip because the hash of the latter is affected by timezone. @@ -71,18 +66,6 @@ function(vcpkg_from_git) set(ARCHIVE "${DOWNLOADS}/${PORT}-${SANITIZED_REF}.tar.gz") set(TEMP_SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${SANITIZED_REF}") - function(test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE) - file(SHA512 ${FILE_PATH} FILE_HASH) - if(NOT FILE_HASH STREQUAL _vdud_SHA512) - message(FATAL_ERROR - "\nFile does not have expected hash:\n" - " File path: [ ${FILE_PATH} ]\n" - " Expected hash: [ ${_vdud_SHA512} ]\n" - " Actual hash: [ ${FILE_HASH} ]\n" - "${CUSTOM_ERROR_ADVICE}\n") - endif() - endfunction() - if(NOT EXISTS "${ARCHIVE}") if(_VCPKG_NO_DOWNLOADS) message(FATAL_ERROR "Downloads are disabled, but '${ARCHIVE}' does not exist.") @@ -93,26 +76,40 @@ function(vcpkg_from_git) vcpkg_execute_required_process( COMMAND ${GIT} init git-tmp WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME git-init + LOGNAME git-init-${TARGET_TRIPLET} ) vcpkg_execute_required_process( COMMAND ${GIT} fetch ${_vdud_URL} ${_vdud_REF} --depth 1 -n WORKING_DIRECTORY ${DOWNLOADS}/git-tmp - LOGNAME git-fetch + LOGNAME git-fetch-${TARGET_TRIPLET} ) + execute_process( + COMMAND ${GIT} rev-parse FETCH_HEAD + OUTPUT_VARIABLE REV_PARSE_HEAD + ERROR_VARIABLE REV_PARSE_HEAD + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${DOWNLOADS}/git-tmp + ) + if(error_code) + message(FATAL_ERROR "unable to determine FETCH_HEAD after fetching git repository") + endif() + string(REGEX REPLACE "\n$" "" REV_PARSE_HEAD "${REV_PARSE_HEAD}") + if(NOT REV_PARSE_HEAD STREQUAL _vdud_REF) + message(FATAL_ERROR "REF (${_vdud_REF}) does not match FETCH_HEAD (${REV_PARSE_HEAD})") + endif() + file(MAKE_DIRECTORY "${DOWNLOADS}/temp") vcpkg_execute_required_process( COMMAND ${GIT} archive FETCH_HEAD -o "${TEMP_ARCHIVE}" WORKING_DIRECTORY ${DOWNLOADS}/git-tmp LOGNAME git-archive ) - test_hash("${TEMP_ARCHIVE}" "downloaded repo" "") + get_filename_component(downloaded_file_dir "${ARCHIVE}" DIRECTORY) file(MAKE_DIRECTORY "${downloaded_file_dir}") file(RENAME "${TEMP_ARCHIVE}" "${ARCHIVE}") else() message(STATUS "Using cached ${ARCHIVE}") - test_hash("${ARCHIVE}" "cached file" "Please delete the file and retry if this file should be downloaded again.") endif() vcpkg_extract_source_archive_ex( From 96994f8edeace0064b8d80489643e3cb79514390 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Mon, 1 Jul 2019 22:49:05 -0700 Subject: [PATCH 0105/1066] Revert Visual Studio projects versions (#7117) --- toolsrc/vcpkg/vcpkg.vcxproj | 4 ++-- toolsrc/vcpkglib/vcpkglib.vcxproj | 4 ++-- toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj | 4 ++-- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj index 06d849a74..8edea2244 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj +++ b/toolsrc/vcpkg/vcpkg.vcxproj @@ -21,8 +21,8 @@ {34671B80-54F9-46F5-8310-AC429C11D4FB} vcpkg - 10.0 - v142 + 8.1 + v140 diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 2a6853b8a..a64eb42fd 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -21,8 +21,8 @@ {B98C92B7-2874-4537-9D46-D14E5C237F04} vcpkglib - 10.0 - v142 + 8.1 + v140 diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj index 2e689c7fc..e533d0e15 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj @@ -21,8 +21,8 @@ {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE} vcpkgmetricsuploader - 10.0 - v142 + 8.1 + v140 diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index a7517ec54..4cda29461 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -48,8 +48,8 @@ {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D} Win32Proj vcpkgtest - 10.0 - v142 + 8.1 + v140 @@ -84,7 +84,7 @@ - + $(SolutionDir)msbuild.x86.debug\$(ProjectName)\ $(SolutionDir)msbuild.x86.debug\ From 91da4aab4c74af1d30c68896a058100257910e8d Mon Sep 17 00:00:00 2001 From: martin-s Date: Tue, 2 Jul 2019 05:51:07 +0000 Subject: [PATCH 0106/1066] Allow redirection of the scripts folder. (#6552) * Allow redirection of the scripts folder with an environment variable. * - Updated feature from environment variable to argument. * Fix crash when no scripts override is given and use --scripts-root= format * Update help messages to use --scripts-root= format --- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 1 + toolsrc/include/vcpkg/vcpkgpaths.h | 3 +- toolsrc/src/tests.arguments.cpp | 6 ++- toolsrc/src/vcpkg.cpp | 10 +++++ toolsrc/src/vcpkg/help.cpp | 2 + toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 30 ++++++++++++- toolsrc/src/vcpkg/vcpkgpaths.cpp | 53 +++++++++++++++-------- 7 files changed, 83 insertions(+), 22 deletions(-) diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index ff13ae6bf..fe7911ae3 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -86,6 +86,7 @@ namespace vcpkg static VcpkgCmdArguments create_from_arg_sequence(const std::string* arg_begin, const std::string* arg_end); std::unique_ptr vcpkg_root_dir; + std::unique_ptr scripts_root_dir; std::unique_ptr triplet; std::unique_ptr> overlay_ports; std::unique_ptr> overlay_triplets; diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index a30e0c653..ce442858b 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -47,7 +47,8 @@ namespace vcpkg struct VcpkgPaths { - static Expected create(const fs::path& vcpkg_root_dir, + static Expected create(const fs::path& vcpkg_root_dir, + const Optional& vcpkg_scripts_root_dir, const std::string& default_vs_path, const std::vector* triplets_dirs); diff --git a/toolsrc/src/tests.arguments.cpp b/toolsrc/src/tests.arguments.cpp index 51ababd3d..533b3a0d0 100644 --- a/toolsrc/src/tests.arguments.cpp +++ b/toolsrc/src/tests.arguments.cpp @@ -15,9 +15,10 @@ namespace UnitTest1 { TEST_METHOD(create_from_arg_sequence_options_lower) { - std::vector t = {"--vcpkg-root", "C:\\vcpkg", "--debug", "--sendmetrics", "--printmetrics"}; + std::vector t = {"--vcpkg-root", "C:\\vcpkg", "--scripts-root", "C:\\scripts", "--debug", "--sendmetrics", "--printmetrics"}; auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); Assert::AreEqual("C:\\vcpkg", v.vcpkg_root_dir.get()->c_str()); + Assert::AreEqual("C:\\scripts", v.scripts_root_dir.get()->c_str()); Assert::IsTrue(v.debug && *v.debug.get()); Assert::IsTrue(v.sendmetrics && v.sendmetrics.get()); Assert::IsTrue(v.printmetrics && *v.printmetrics.get()); @@ -25,9 +26,10 @@ namespace UnitTest1 TEST_METHOD(create_from_arg_sequence_options_upper) { - std::vector t = {"--VCPKG-ROOT", "C:\\vcpkg", "--DEBUG", "--SENDMETRICS", "--PRINTMETRICS"}; + std::vector t = {"--VCPKG-ROOT", "C:\\vcpkg", "--SCRIPTS-ROOT", "C:\\scripts", "--DEBUG", "--SENDMETRICS", "--PRINTMETRICS"}; auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); Assert::AreEqual("C:\\vcpkg", v.vcpkg_root_dir.get()->c_str()); + Assert::AreEqual("C:\\scripts", v.scripts_root_dir.get()->c_str()); Assert::IsTrue(v.debug && *v.debug.get()); Assert::IsTrue(v.sendmetrics && v.sendmetrics.get()); Assert::IsTrue(v.printmetrics && *v.printmetrics.get()); diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 5da97b136..363b39814 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -116,9 +116,19 @@ static void inner(const VcpkgCmdArguments& args) Debug::print("Using vcpkg-root: ", vcpkg_root_dir.u8string(), '\n'); + Optional vcpkg_scripts_root_dir = nullopt; + if (nullptr != args.scripts_root_dir) + { + vcpkg_scripts_root_dir = fs::stdfs::canonical(fs::u8path(*args.scripts_root_dir)); + Debug::print("Using scripts-root: ", vcpkg_scripts_root_dir.value_or_exit(VCPKG_LINE_INFO).u8string(), '\n'); + } + auto default_vs_path = System::get_environment_variable("VCPKG_VISUAL_STUDIO_PATH").value_or(""); + + const Expected expected_paths = VcpkgPaths::create(vcpkg_root_dir, + vcpkg_scripts_root_dir, default_vs_path, args.overlay_triplets.get()); Checks::check_exit(VCPKG_LINE_INFO, diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 896f62661..9b2751739 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -124,6 +124,8 @@ namespace vcpkg::Help " (default: " ENVVAR(VCPKG_ROOT) // ")\n" "\n" + " --scripts-root= Specify the scripts root directory\n" + "\n" " @response_file Specify a " "response file to provide additional parameters\n" "\n" diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 3c1452d47..7a28fb571 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -33,6 +33,21 @@ namespace vcpkg option_field = std::make_unique(*arg_begin); } + static void parse_cojoined_value(std::string new_value, + const std::string& option_name, + std::unique_ptr& option_field) + { + if (nullptr != option_field) + { + System::printf(System::Color::error, "Error: %s specified multiple times\n", option_name); + Metrics::g_metrics.lock()->track_property("error", "error option specified multiple times"); + Help::print_usage(); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + option_field = std::make_unique(std::move(new_value)); + } + static void parse_switch(bool new_setting, const std::string& option_name, Optional& option_field) { if (option_field && option_field != new_setting) @@ -120,9 +135,10 @@ namespace vcpkg if (arg[0] == '-' && arg[1] == '-') { - // make argument case insensitive + // make argument case insensitive before the first = auto& f = std::use_facet>(std::locale()); - f.tolower(&arg[0], &arg[0] + arg.size()); + auto first_eq = std::find(std::begin(arg), std::end(arg), '='); + f.tolower(&arg[0], &arg[0] + (first_eq - std::begin(arg))); // command switch if (arg == "--vcpkg-root") { @@ -130,6 +146,13 @@ namespace vcpkg parse_value(arg_begin, arg_end, "--vcpkg-root", args.vcpkg_root_dir); continue; } + if (Strings::starts_with(arg, "--scripts-root=")) + { + parse_cojoined_value(arg.substr(sizeof("--scripts-root=") - 1), + "--scripts-root", + args.scripts_root_dir); + continue; + } if (arg == "--triplet") { ++arg_begin; @@ -411,5 +434,8 @@ namespace vcpkg System::printf(" %-40s %s\n", "--vcpkg-root ", "Specify the vcpkg directory to use instead of current directory or tool directory"); + System::printf(" %-40s %s\n", + "--scripts-root=", + "Specify the scripts directory to use instead of default vcpkg scripts directory"); } } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 909fbeb44..d16acf2e8 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -13,7 +13,8 @@ namespace vcpkg { - Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir, + Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir, + const Optional& vcpkg_scripts_root_dir, const std::string& default_vs_path, const std::vector* triplets_dirs) { @@ -65,7 +66,25 @@ namespace vcpkg paths.ports = paths.root / "ports"; paths.installed = paths.root / "installed"; paths.triplets = paths.root / "triplets"; - paths.scripts = paths.root / "scripts"; + + if (auto scripts_dir = vcpkg_scripts_root_dir.get()) + { + if (scripts_dir->empty() || !fs::stdfs::is_directory(*scripts_dir)) + { + Metrics::g_metrics.lock()->track_property("error", "Invalid scripts override directory."); + Checks::exit_with_message( + VCPKG_LINE_INFO, + "Invalid scripts override directory: %s; " + "create that directory or unset --scripts-root to use the default scripts location.", + scripts_dir->u8string()); + } + + paths.scripts = *scripts_dir; + } + else + { + paths.scripts = paths.root / "scripts"; + } paths.tools = paths.downloads / "tools"; paths.buildsystems = paths.scripts / "buildsystems"; @@ -132,21 +151,21 @@ namespace vcpkg } const fs::path VcpkgPaths::get_triplet_file_path(const Triplet& triplet) const - { - return m_triplets_cache.get_lazy(triplet, [&]()-> auto { - for (auto&& triplet_dir : triplets_dirs) - { - auto&& path = triplet_dir / (triplet.canonical_name() + ".cmake"); - if (this->get_filesystem().exists(path)) - { - return path; - } - } - - Checks::exit_with_message(VCPKG_LINE_INFO, - "Error: Triplet file %s.cmake not found", - triplet.canonical_name()); - }); + { + return m_triplets_cache.get_lazy(triplet, [&]()-> auto { + for (auto&& triplet_dir : triplets_dirs) + { + auto&& path = triplet_dir / (triplet.canonical_name() + ".cmake"); + if (this->get_filesystem().exists(path)) + { + return path; + } + } + + Checks::exit_with_message(VCPKG_LINE_INFO, + "Error: Triplet file %s.cmake not found", + triplet.canonical_name()); + }); } From f15d52becf620a0b234b4b7735579b5415f8d7b7 Mon Sep 17 00:00:00 2001 From: Rajeev Massand Date: Tue, 2 Jul 2019 01:09:48 -0700 Subject: [PATCH 0107/1066] [azure] Update azure-iot-sdk-c for public-preview release of 2019-07-01 (#7123) --- ports/azure-iot-sdk-c/CONTROL | 2 +- ports/azure-iot-sdk-c/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/azure-iot-sdk-c/CONTROL b/ports/azure-iot-sdk-c/CONTROL index 676184078..8cebc0601 100644 --- a/ports/azure-iot-sdk-c/CONTROL +++ b/ports/azure-iot-sdk-c/CONTROL @@ -1,5 +1,5 @@ Source: azure-iot-sdk-c -Version: 2019-05-16.1 +Version: 2019-07-01.1 Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson, azure-uhttp-c, azure-macro-utils-c, umock-c Description: A C99 SDK for connecting devices to Microsoft Azure IoT services diff --git a/ports/azure-iot-sdk-c/portfile.cmake b/ports/azure-iot-sdk-c/portfile.cmake index 3f3ca4f0c..290dc304b 100644 --- a/ports/azure-iot-sdk-c/portfile.cmake +++ b/ports/azure-iot-sdk-c/portfile.cmake @@ -15,8 +15,8 @@ else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-iot-sdk-c - REF 11d5150aeb26635862cf50484af9c7e8badd52a0 - SHA512 d2cf40bca9db2c66d78f889763af3a1d06abc0e9fce19542599daec56b092e03f01f892ff420a7b107a96e0eb533579ee7eccf249b56cf6600896c77ca619fc3 + REF b03cc5e0afb647934e45d4530d3e993476db3d3e + SHA512 7428c625dbacfd9ab612d5bbfad3c079074cd3834fe84a42db88e747aab2615140c0ca3035adc36b29ed8cf4bf487360522215ce03cee3e26254af925a68384a HEAD_REF master PATCHES improve-external-deps.patch ) From 11708d2139b19b1c9e2a2f9efab3b89e14c03447 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 2 Jul 2019 18:30:56 +0800 Subject: [PATCH 0108/1066] [librdkafka] Update to 1.1.0 [librdkafka] Use vcpkg_check_features [librdkafka] Remove default feature --- ports/librdkafka/CONTROL | 3 +-- ports/librdkafka/portfile.cmake | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/ports/librdkafka/CONTROL b/ports/librdkafka/CONTROL index 2c8346a12..f4030ff08 100644 --- a/ports/librdkafka/CONTROL +++ b/ports/librdkafka/CONTROL @@ -1,8 +1,7 @@ Source: librdkafka -Version: 2019-06-13 +Version: 1.1.0 Description: The Apache Kafka C/C++ library Homepage: https://github.com/edenhill/librdkafka -Default-Features: ssl Feature: lz4 Description: Enable external LZ4 library support diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index 1069aa234..5bc66fdfa 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edenhill/librdkafka - REF b25436e6325e7c941eaed1d80a3ed65b6f404e47 - SHA512 4de86fb14f932a67569cd79f924182559cb9bcc957635c36be493ec3233981755ff751982e48f6999fac50acb153f5c28a23e30538af1a2ad69af87be606a81f + REF v1.1.0 + SHA512 35561399b07278a09a51245c5503c86eb0cc8971692b4e65a332144bfb71e2e86d4ceaf1804534b6a416bcace74cef493b6465c20b32c14de97f45f2854359c6 HEAD_REF master PATCHES fix-arm64.patch @@ -12,18 +12,12 @@ vcpkg_from_github( string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) -macro(check_feature _feature_name _var) - if("${_feature_name}" IN_LIST FEATURES) - set(${_var} ON) - else() - set(${_var} OFF) - endif() -endmacro() - -check_feature(lz4 ENABLE_LZ4_EXT) -check_feature(ssl WITH_SSL) -check_feature(zlib WITH_ZLIB) -check_feature(zstd WITH_ZSTD) +vcpkg_check_features( + lz4 ENABLE_LZ4_EXT + ssl WITH_SSL + zlib WITH_ZLIB + zstd WITH_ZSTD +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -32,11 +26,8 @@ vcpkg_configure_cmake( -DRDKAFKA_BUILD_STATIC=${RDKAFKA_BUILD_STATIC} -DRDKAFKA_BUILD_EXAMPLES=OFF -DRDKAFKA_BUILD_TESTS=OFF - -DENABLE_LZ4_EXT=${ENABLE_LZ4_EXT} - -DWITH_SSL=${WITH_SSL} -DWITH_BUNDLED_SSL=OFF - -DWITH_ZLIB=${WITH_ZLIB} - -DWITH_ZSTD=${WITH_ZSTD} + ${FEATURE_OPTIONS} OPTIONS_DEBUG -DENABLE_DEVEL=ON -DENABLE_REFCNT_DEBUG=ON From 4642a4fc6c4437b7d68294ab4e34d3fe38051244 Mon Sep 17 00:00:00 2001 From: cskrisz Date: Tue, 2 Jul 2019 22:47:50 +0200 Subject: [PATCH 0109/1066] Fix Python3 tool on Windows (#7051) * Delete python37._pth from python3-embed * Add version number to SUBDIR * [open62541] Use Python in version subdir --- ports/open62541/CONTROL | 2 +- ports/open62541/portfile.cmake | 4 +++- scripts/cmake/vcpkg_find_acquire_program.cmake | 12 +++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ports/open62541/CONTROL b/ports/open62541/CONTROL index ed2224f0f..28bfd2c0b 100644 --- a/ports/open62541/CONTROL +++ b/ports/open62541/CONTROL @@ -1,3 +1,3 @@ Source: open62541 -Version: 0.3.0-1 +Version: 0.3.0-2 Description: open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0. diff --git a/ports/open62541/portfile.cmake b/ports/open62541/portfile.cmake index a8c345eb8..5132fa7f0 100644 --- a/ports/open62541/portfile.cmake +++ b/ports/open62541/portfile.cmake @@ -31,12 +31,14 @@ endif() vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +get_filename_component(PYTHON3_DIR_NAME "${PYTHON3_DIR}" NAME) vcpkg_add_to_path("${PYTHON3_DIR}") + if(NOT EXISTS ${PYTHON3_DIR}/easy_install${EXECUTABLE_SUFFIX}) if(NOT EXISTS ${PYTHON3_DIR}/Scripts/pip${EXECUTABLE_SUFFIX}) vcpkg_download_distfile(GET_PIP URLS "https://bootstrap.pypa.io/get-pip.py" - FILENAME "tools/python/python3/get-pip.py" + FILENAME "tools/python/${PYTHON3_DIR_NAME}/get-pip.py" SHA512 99520d223819708b8f6e4b839d1fa215e4e8adc7fcd0db6c25a0399cf2fa10034b35673cf450609303646d12497f301ef53b7e7cc65c78e7bce4af0c673555ad ) execute_process(COMMAND ${PYTHON3_DIR}/python${EXECUTABLE_SUFFIX} ${PYTHON3_DIR}/get-pip.py) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 0399fc50c..fcfa6d0a1 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -45,6 +45,7 @@ function(vcpkg_find_acquire_program VAR) unset(_vfa_RENAME) unset(SUBDIR) unset(REQUIRED_INTERPRETER) + unset(POST_INSTALL_COMMAND) vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) @@ -77,11 +78,12 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "PYTHON3") if(CMAKE_HOST_WIN32) set(PROGNAME python) - set(SUBDIR "python3") + set(SUBDIR "python-3.7.3") set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) set(URL "https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-win32.zip") set(ARCHIVE "python-3.7.3-embed-win32.zip") set(HASH 2c1b1f0a29d40a91771ae21a5f733eedc10984cd182cb10c2793bbd24191a89f20612a3f23c34047f37fb06369016bfd4a52915ed1b4a56f8bd2b4ca6994eb31) + set(POST_INSTALL_COMMAND ${CMAKE_COMMAND} -E remove python37._pth) else() set(PROGNAME python3) set(BREW_PACKAGE_NAME "python") @@ -291,6 +293,14 @@ function(vcpkg_find_acquire_program VAR) endif() endif() + if(DEFINED POST_INSTALL_COMMAND) + vcpkg_execute_required_process( + COMMAND ${POST_INSTALL_COMMAND} + WORKING_DIRECTORY ${PROG_PATH_SUBDIR} + LOGNAME ${VAR}-tool-post-install + ) + endif() + do_find() endif() From 8ca8de6926bc67ccc71f4b3f4733ce2f1d3b0547 Mon Sep 17 00:00:00 2001 From: Kevin Lu <6320810+kevinlul@users.noreply.github.com> Date: Tue, 2 Jul 2019 16:49:17 -0400 Subject: [PATCH 0110/1066] [lua] Add [cpp] feature to additionally build lua-c++ (#7101) * [lua] Add [cpp] feature to build lua-c++ * [lua] Switch tab for spaces in CMakeLists, set version to 5.3.5-2 as requested * Use spaces for indentation --- ports/lua/CMakeLists.txt | 3 +++ ports/lua/CONTROL | 5 ++++- ports/lua/portfile.cmake | 23 +++++++++++++++-------- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index 01a1d5a12..dd0a1de35 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -52,6 +52,9 @@ ENDIF () #DLL ADD_LIBRARY ( lua ${SRC_LIBLUA} ) +IF (COMPILE_AS_CPP) + SET_TARGET_PROPERTIES(lua PROPERTIES OUTPUT_NAME "lua-c++") +ENDIF() IF (BUILD_SHARED_LIBS AND WIN32) TARGET_COMPILE_DEFINITIONS (lua PUBLIC -DLUA_BUILD_AS_DLL ) diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index 738aabdfd..eeb26e412 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,4 +1,7 @@ Source: lua -Version: 5.3.5-1 +Version: 5.3.5-2 Homepage: https://www.lua.org Description: a powerful, fast, lightweight, embeddable scripting language + +Feature: cpp +Description: Builds lua for C++ linkage. \ No newline at end of file diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake index e3c972ac4..b107c6cf9 100644 --- a/ports/lua/portfile.cmake +++ b/ports/lua/portfile.cmake @@ -1,12 +1,5 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - include(vcpkg_common_functions) + vcpkg_download_distfile(ARCHIVE URLS "https://www.lua.org/ftp/lua-5.3.5.tar.gz" FILENAME "lua-5.3.5.tar.gz" @@ -32,6 +25,20 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +if("cpp" IN_LIST FEATURES) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOMPILE_AS_CPP=ON + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON + -DSKIP_INSTALL_TOOLS=ON + ) + + vcpkg_install_cmake() +endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) file(READ ${CURRENT_PACKAGES_DIR}/include/luaconf.h LUA_CONF_H) From 24b1618b292541086cc97820df8619d6ede046f5 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Tue, 2 Jul 2019 15:12:47 -0700 Subject: [PATCH 0111/1066] revert ninja update (#7135) Causing failures on Linux, revert until investigation is complete. --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index fcfa6d0a1..737e332bc 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -123,7 +123,7 @@ function(vcpkg_find_acquire_program VAR) set(HASH f73b04e2d9f29d4393fde572dcf3c3f0f6fa27e747e5df292294ab7536ae24c239bf917689d71eb10cc49f6b9a4ace26d7c122ee887d93cc935f268c404e9067) elseif(VAR MATCHES "NINJA") set(PROGNAME ninja) - set(SUBDIR "ninja-1.9.0") + set(SUBDIR "ninja-1.8.2") if(CMAKE_HOST_WIN32) set(PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}") elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") @@ -135,9 +135,9 @@ function(vcpkg_find_acquire_program VAR) endif() set(BREW_PACKAGE_NAME "ninja") set(APT_PACKAGE_NAME "ninja-build") - set(URL "https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip") - set(ARCHIVE "ninja-1.9.0-win.zip") - set(HASH 1c050e602ec63d4dcf44d9ab3d2d02ac731b4b2977bc0b420a21e85604487f58ec8d3045941d4153ef06ab00c175ca7cf9d57b8e20a757528290e135639962ac) + set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip") + set(ARCHIVE "ninja-1.8.2-win.zip") + set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5) elseif(VAR MATCHES "NUGET") set(PROGNAME nuget) set(PATHS "${DOWNLOADS}/tools/nuget") From fb4cc372629d0cf08a80d31e7e0f579a437c5cd9 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Wed, 3 Jul 2019 06:23:53 +0800 Subject: [PATCH 0112/1066] [czmq] Add new port (#4979) * [czmq] Add new port * [czmq] Modernize * [czmq] Update to 2019-05-17 * [czmq] Update to 2019-05-29 * [czmq] Fix OpenSSL not found issue on x64-windows * [czmq] Update portfile.cmake * [czmq] Update to 2019-06-10 * [czmq] Clean * [czmq] Add Homepage * [czmq] Use vcpkg_check_features * [czmq] Disable parallel configuration * Fix typo when using feature options --- ports/czmq/CONTROL | 27 +++++++ ports/czmq/Findlibcurl.cmake | 51 ++++++++++++++ ports/czmq/Findlibmicrohttpd.cmake | 28 ++++++++ ports/czmq/Findlibzmq.cmake | 10 +++ ports/czmq/Findlz4.cmake | 13 ++++ ports/czmq/Finduuid.cmake | 31 ++++++++ ports/czmq/fix-dependencies.patch | 19 +++++ ports/czmq/portfile.cmake | 101 +++++++++++++++++++++++++++ ports/czmq/vcpkg-cmake-wrapper.cmake | 9 +++ 9 files changed, 289 insertions(+) create mode 100644 ports/czmq/CONTROL create mode 100644 ports/czmq/Findlibcurl.cmake create mode 100644 ports/czmq/Findlibmicrohttpd.cmake create mode 100644 ports/czmq/Findlibzmq.cmake create mode 100644 ports/czmq/Findlz4.cmake create mode 100644 ports/czmq/Finduuid.cmake create mode 100644 ports/czmq/fix-dependencies.patch create mode 100644 ports/czmq/portfile.cmake create mode 100644 ports/czmq/vcpkg-cmake-wrapper.cmake diff --git a/ports/czmq/CONTROL b/ports/czmq/CONTROL new file mode 100644 index 000000000..a45a1a34c --- /dev/null +++ b/ports/czmq/CONTROL @@ -0,0 +1,27 @@ +Source: czmq +Version: 2019-06-10 +Build-Depends: zeromq +Description: High-level C binding for ZeroMQ +Homepage: https://github.com/zeromq/czmq + +Feature: tool +Description: Build and install czmq tools (zmakecert) + +Feature: draft +Description: Build and install draft APIs + +Feature: curl +Description: Build with libcurl +Build-Depends: curl + +Feature: lz4 +Description: Build with lz4 +Build-Depends: lz4 + +Feature: httpd +Description: Build with HTTP server support (libmicrohttpd) +Build-Depends: libmicrohttpd + +Feature: uuid +Description: Build with libuuid +Build-Depends: libuuid (!windows&!uwp&!osx) diff --git a/ports/czmq/Findlibcurl.cmake b/ports/czmq/Findlibcurl.cmake new file mode 100644 index 000000000..6c943e2d7 --- /dev/null +++ b/ports/czmq/Findlibcurl.cmake @@ -0,0 +1,51 @@ +find_path( + LIBCURL_INCLUDE_DIRS + NAMES curl/curl.h +) + +find_library( + LIBCURL_LIBRARY_DEBUG + NAMES libcurl-d_imp libcurl-d curl-d curl +) + +find_library( + LIBCURL_LIBRARY_RELEASE + NAMES libcurl_imp libcurl curl +) + +include(SelectLibraryConfigurations) +select_library_configurations(LIBCURL) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LIBCURL + REQUIRED_VARS LIBCURL_LIBRARIES LIBCURL_INCLUDE_DIRS +) + +# CURL dependencies +# https://github.com/Microsoft/vcpkg/issues/4312 +# https://github.com/microsoft/vcpkg/commit/ee325d14276e7bd7961e94e58293b02d6e9e92da +# https://github.com/microsoft/vcpkg/pull/6698 +if (LIBCURL_FOUND) + find_package(OpenSSL QUIET) + find_package(ZLIB QUIET) + + if (OPENSSL_FOUND) + list(APPEND LIBCURL_LIBRARIES + OpenSSL::SSL + OpenSSL::Crypto + ) + endif () + + if (ZLIB_FOUND) + list(APPEND LIBCURL_LIBRARIES + ZLIB::ZLIB + ) + endif () + + if (WIN32) + list(APPEND LIBCURL_LIBRARIES + Crypt32 + ) + endif () +endif () diff --git a/ports/czmq/Findlibmicrohttpd.cmake b/ports/czmq/Findlibmicrohttpd.cmake new file mode 100644 index 000000000..476cb2add --- /dev/null +++ b/ports/czmq/Findlibmicrohttpd.cmake @@ -0,0 +1,28 @@ +find_path(LIBMICROHTTPD_INCLUDE_DIRS NAMES microhttpd.h) + +get_filename_component(_prefix_path ${LIBMICROHTTPD_INCLUDE_DIRS} PATH) + +find_library( + LIBMICROHTTPD_LIBRARY_DEBUG + NAMES libmicrohttpd microhttpd + PATHS ${_prefix_path}/debug/lib + NO_DEFAULT_PATH +) + +find_library( + LIBMICROHTTPD_LIBRARY_RELEASE + NAMES libmicrohttpd microhttpd + PATHS ${_prefix_path}/lib + NO_DEFAULT_PATH +) + +unset(_prefix_path) + +include(SelectLibraryConfigurations) +select_library_configurations(LIBMICROHTTPD) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LIBMICROHTTPD + REQUIRED_VARS LIBMICROHTTPD_LIBRARIES LIBMICROHTTPD_INCLUDE_DIRS +) diff --git a/ports/czmq/Findlibzmq.cmake b/ports/czmq/Findlibzmq.cmake new file mode 100644 index 000000000..706f063c3 --- /dev/null +++ b/ports/czmq/Findlibzmq.cmake @@ -0,0 +1,10 @@ +find_package(ZeroMQ CONFIG REQUIRED) + +set(LIBZMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR}) +set(LIBZMQ_LIBRARIES libzmq libzmq-static) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LIBZMQ + REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS +) diff --git a/ports/czmq/Findlz4.cmake b/ports/czmq/Findlz4.cmake new file mode 100644 index 000000000..8ce17c5bd --- /dev/null +++ b/ports/czmq/Findlz4.cmake @@ -0,0 +1,13 @@ +find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) + +find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) +find_library(LZ4_LIBRARY_RELEASE NAMES lz4) + +include(SelectLibraryConfigurations) +select_library_configurations(LZ4) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LZ4 + REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS +) diff --git a/ports/czmq/Finduuid.cmake b/ports/czmq/Finduuid.cmake new file mode 100644 index 000000000..ba89aab56 --- /dev/null +++ b/ports/czmq/Finduuid.cmake @@ -0,0 +1,31 @@ +find_path( + UUID_INCLUDE_DIRS + NAMES uuid/uuid.h +) + +get_filename_component(_prefix_path ${UUID_INCLUDE_DIRS} PATH) + +find_library( + UUID_LIBRARY_DEBUG + NAMES uuid + PATHS ${_prefix_path}/debug/lib + NO_DEFAULT_PATH +) + +find_library( + UUID_LIBRARY_RELEASE + NAMES uuid + PATHS ${_prefix_path}/lib + NO_DEFAULT_PATH +) + +unset(_prefix_path) + +include(SelectLibraryConfigurations) +select_library_configurations(UUID) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + UUID + REQUIRED_VARS UUID_LIBRARIES UUID_INCLUDE_DIRS +) diff --git a/ports/czmq/fix-dependencies.patch b/ports/czmq/fix-dependencies.patch new file mode 100644 index 000000000..9756b6008 --- /dev/null +++ b/ports/czmq/fix-dependencies.patch @@ -0,0 +1,19 @@ +diff --git a/builds/cmake/Config.cmake.in b/builds/cmake/Config.cmake.in +index 9c15f36a..e1475cd6 100644 +--- a/builds/cmake/Config.cmake.in ++++ b/builds/cmake/Config.cmake.in +@@ -1,4 +1,14 @@ + @PACKAGE_INIT@ + ++include(CMakeFindDependencyMacro) ++ ++find_dependency(ZeroMQ) ++ ++if (@CZMQ_WITH_LIBCURL@ AND @LIBCURL_FOUND@) ++ find_dependency(OpenSSL) ++ find_dependency(ZLIB) ++endif () ++ ++ + include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") + check_required_components("@PROJECT_NAME@") diff --git a/ports/czmq/portfile.cmake b/ports/czmq/portfile.cmake new file mode 100644 index 000000000..bba5e6e22 --- /dev/null +++ b/ports/czmq/portfile.cmake @@ -0,0 +1,101 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/czmq + REF 7e29cf95305551daad197e32423d9cff5f9b6893 + SHA512 7d79494c904f5276c9d1e4a193a63882dc622a6db8998b9719de4aec8b223b3a8b3c92ea02be81f39afc12c1a883b310fd3662ea27ed736b0b9c7092b4843a18 + HEAD_REF master + PATCHES + fix-dependencies.patch +) + +foreach(_cmake_module + Findlibcurl.cmake + Findlibmicrohttpd.cmake + Findlibzmq.cmake + Findlz4.cmake + Finduuid.cmake +) + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/${_cmake_module} + ${SOURCE_PATH}/${_cmake_module} + COPYONLY + ) +endforeach() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +vcpkg_check_features( + draft ENABLE_DRAFTS + tool BUILD_TOOLS + curl CZMQ_WITH_LIBCURL + httpd CZMQ_WITH_LIBMICROHTTPD + lz4 CZMQ_WITH_LZ4 + uuid CZMQ_WITH_UUID +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DCZMQ_BUILD_SHARED=${BUILD_SHARED} + -DCZMQ_BUILD_STATIC=${BUILD_STATIC} + -DBUILD_TESTING=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT}) +endif() + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +if (BUILD_TOOLS) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/zmakecert${EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/czmq_library.h + "if defined CZMQ_STATIC" + "if 1 //if defined CZMQ_STATIC" + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/zmakecert${EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/bin/zmakecert${EXECUTABLE_SUFFIX}) +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/czmq/vcpkg-cmake-wrapper.cmake b/ports/czmq/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..4535e889b --- /dev/null +++ b/ports/czmq/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET czmq AND NOT TARGET czmq-static) + add_library(czmq-static INTERFACE IMPORTED) + set_target_properties(czmq-static PROPERTIES INTERFACE_LINK_LIBRARIES czmq) +elseif(TARGET czmq-static AND NOT TARGET czmq) + add_library(czmq INTERFACE IMPORTED) + set_target_properties(czmq PROPERTIES INTERFACE_LINK_LIBRARIES czmq-static) +endif() From 7a3a3e9392747f6587514a833df1389df2071067 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 3 Jul 2019 06:31:25 +0800 Subject: [PATCH 0113/1066] [flann]Change the version tag to the corresponding time of commit id. (#7125) --- ports/flann/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index fdcbb8ecc..b1aa87235 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,5 +1,5 @@ Source: flann -Version: 1.9.1-1 +Version: 2019-04-07-1 Homepage: https://github.com/mariusmuja/flann Build-Depends: lz4 Description: Fast Library for Approximate Nearest Neighbors From 269fa0e6be13ebe64060323579a2af68c0a21e4c Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Tue, 2 Jul 2019 17:19:46 -0700 Subject: [PATCH 0114/1066] Bump version to 2019.06.26 (#7136) --- toolsrc/VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index c2116e0e8..6b2a31295 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"2019.06.21" \ No newline at end of file +"2019.06.26" \ No newline at end of file From f9fedc930cf36ce6cec69a3d09879b3c7f23eb0b Mon Sep 17 00:00:00 2001 From: Andrei Lebedev Date: Wed, 3 Jul 2019 05:46:14 +0300 Subject: [PATCH 0115/1066] [tbb] Add shared library support for Linux and OSX (#6510) * [tbb] Add shared library support for Linux and OSX Signed-off-by: Andrei Lebedev * Remove whitespace * Simplify string replace * Revert removal of lib exts --- ports/tbb/CMakeLists.txt | 5 ++++- ports/tbb/CONTROL | 2 +- ports/tbb/portfile.cmake | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ports/tbb/CMakeLists.txt b/ports/tbb/CMakeLists.txt index cc1dd3933..7216e3474 100644 --- a/ports/tbb/CMakeLists.txt +++ b/ports/tbb/CMakeLists.txt @@ -4,7 +4,10 @@ file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*) file(COPY ${SOURCES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src) include(${CMAKE_CURRENT_BINARY_DIR}/src/cmake/TBBBuild.cmake REQUIRED) -tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS extra_inc=big_iron.inc) +if(NOT BUILD_SHARED_LIBS) + set(TBB_STATIC_INCLUDE extra_inc=big_iron.inc) +endif() +tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS ${TBB_STATIC_INCLUDE}) set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir) if(CMAKE_BUILD_TYPE STREQUAL "Release") diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL index e3ae78936..39c34d784 100644 --- a/ports/tbb/CONTROL +++ b/ports/tbb/CONTROL @@ -1,4 +1,4 @@ Source: tbb -Version: 2019_U7 +Version: 2019_U7-1 Homepage: https://github.com/01org/tbb Description: Intel's Threading Building Blocks. diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 119916757..4030bec4b 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -78,14 +78,14 @@ string(REPLACE "${_contents}" ) string(REPLACE - "set(_tbb_release_lib \"/${TBB_LIB_PREFIX}\${_tbb_component}.${TBB_LIB_EXT}\")" - "set(_tbb_release_lib \"\${_tbb_root}/lib/${TBB_LIB_PREFIX}\${_tbb_component}.${TBB_LIB_EXT}\")" + "set(_tbb_release_lib \"/${TBB_LIB_PREFIX}" + "set(_tbb_release_lib \"\${_tbb_root}/lib/${TBB_LIB_PREFIX}" _contents "${_contents}" ) string(REPLACE - "set(_tbb_debug_lib \"/${TBB_LIB_PREFIX}\${_tbb_component}_debug.${TBB_LIB_EXT}\")" - "set(_tbb_debug_lib \"\${_tbb_root}/debug/lib/${TBB_LIB_PREFIX}\${_tbb_component}_debug.${TBB_LIB_EXT}\")" + "set(_tbb_debug_lib \"/${TBB_LIB_PREFIX}" + "set(_tbb_debug_lib \"\${_tbb_root}/debug/lib/${TBB_LIB_PREFIX}" _contents "${_contents}" ) From 2129bcd1801bf24a8088ed9607069a1bf06028c9 Mon Sep 17 00:00:00 2001 From: robbie-li Date: Sat, 6 Jul 2019 09:01:46 +0800 Subject: [PATCH 0116/1066] [dcmtk] support wchar_t* filename (#7059) * support wchar_t* filename * bump control --- ports/dcmtk/CONTROL | 2 +- ports/dcmtk/portfile.cmake | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/dcmtk/CONTROL b/ports/dcmtk/CONTROL index ad087563d..1ae67841e 100644 --- a/ports/dcmtk/CONTROL +++ b/ports/dcmtk/CONTROL @@ -1,3 +1,3 @@ Source: dcmtk -Version: 3.6.4 +Version: 3.6.4-1 Description: This DICOM ToolKit (DCMTK) package consists of source code, documentation and installation instructions for a set of software libraries and applications implementing part of the DICOM/MEDICOM Standard. diff --git a/ports/dcmtk/portfile.cmake b/ports/dcmtk/portfile.cmake index cdf9b73e6..39a7dc2c8 100644 --- a/ports/dcmtk/portfile.cmake +++ b/ports/dcmtk/portfile.cmake @@ -28,6 +28,8 @@ vcpkg_configure_cmake( -DDCMTK_ENABLE_PRIVATE_TAGS=ON -DBUILD_APPS=OFF -DDCMTK_ENABLE_CXX11=ON + -DDCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS=ON + -DDCMTK_WIDE_CHAR_MAIN_FUNCTION=ON -DCMAKE_DEBUG_POSTFIX="d" OPTIONS_DEBUG -DINSTALL_HEADERS=OFF From 17b5841bc36a13f950af8b052335b2ea56b05db5 Mon Sep 17 00:00:00 2001 From: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> Date: Sat, 6 Jul 2019 09:24:25 +0800 Subject: [PATCH 0117/1066] [libmupdf] Enable the old patch for fixing C2169 (#7107) --- ports/libmupdf/CONTROL | 2 +- ports/libmupdf/Fix-error-C2169.patch | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libmupdf/CONTROL b/ports/libmupdf/CONTROL index 1285b8c85..28b287a00 100644 --- a/ports/libmupdf/CONTROL +++ b/ports/libmupdf/CONTROL @@ -1,5 +1,5 @@ Source: libmupdf -Version: 1.15.0 +Version: 1.15.0-1 Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl, glfw3, openjpeg, jbig2dec Homepage: https://github.com/ArtifexSoftware/mupdf Description: a lightweight PDF, XPS, and E-book library diff --git a/ports/libmupdf/Fix-error-C2169.patch b/ports/libmupdf/Fix-error-C2169.patch index 164ffe157..4647d6b95 100644 --- a/ports/libmupdf/Fix-error-C2169.patch +++ b/ports/libmupdf/Fix-error-C2169.patch @@ -2,11 +2,11 @@ diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h index 0552771..42fd037 100644 --- a/include/mupdf/fitz/system.h +++ b/include/mupdf/fitz/system.h -@@ -117,7 +117,6 @@ static __inline int signbit(double x) +@@ -131,7 +131,6 @@ #define isnan(x) _isnan(x) #define isinf(x) (!_finite(x)) #endif -#define hypotf _hypotf #define atoll _atoi64 - char *fz_utf8_from_wchar(const wchar_t *s); + #endif From 2b8e225b2ea83a3138d4b7345f104c1bd9a129dd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 6 Jul 2019 13:29:46 -0700 Subject: [PATCH 0118/1066] [vcpkg] Fix powershell font corruption bug (#7094) * [vcpkg] Fix font corruption bug on Windows by downloading Powershell Core * [vcpkg] Rename subtool to powershell-core * [vcpkg] Add missing includes to project files --- scripts/vcpkgTools.xml | 7 +++++++ toolsrc/include/vcpkg/base/system.process.h | 3 ++- toolsrc/src/vcpkg/base/system.cpp | 21 +++++++++++-------- toolsrc/src/vcpkg/build.cpp | 23 +++++++++++++++------ toolsrc/src/vcpkg/commands.integrate.cpp | 11 ++-------- toolsrc/vcpkglib/vcpkglib.vcxproj | 6 ++++++ toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 18 ++++++++++++++++ 7 files changed, 64 insertions(+), 25 deletions(-) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index c7d5c218a..8f90ce8dc 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -114,4 +114,11 @@ 56a55ae9a6b5dfad4f28f9fe9b8114f1475c999d2f07fff7efa7375f987e74b498e9b63c41fc6c577756f15f3a1459c6d5d367902de3bedebdf9a9fd49089a86 ninja-freebsd-1.8.2.zip + + 6.2.1 + pwsh.exe + https://github.com/PowerShell/PowerShell/releases/download/v6.2.1/PowerShell-6.2.1-win-x86.zip + ab1effc926b000a6adc12198a1886514ec203621a53b0cd7ec1cd9a8225dccda7e857feaabcfba4004bea73129b986abaad777c4573f44e0af70411226ce08b0 + PowerShell-6.2.1-win-x86.zip + diff --git a/toolsrc/include/vcpkg/base/system.process.h b/toolsrc/include/vcpkg/base/system.process.h index e409ff950..14e2eb109 100644 --- a/toolsrc/include/vcpkg/base/system.process.h +++ b/toolsrc/include/vcpkg/base/system.process.h @@ -31,7 +31,8 @@ namespace vcpkg::System }; int cmd_execute_clean(const ZStringView cmd_line, - const std::unordered_map& extra_env = {}); + const std::unordered_map& extra_env = {}, + const std::string& prepend_to_path = {}); int cmd_execute(const ZStringView cmd_line); diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index c5ff050f0..3d5c60088 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -188,12 +188,17 @@ namespace vcpkg } #if defined(_WIN32) - static std::wstring compute_clean_environment(const std::unordered_map& extra_env) + static std::wstring compute_clean_environment(const std::unordered_map& extra_env, + const std::string& prepend_to_path) { static const std::string SYSTEM_ROOT = get_environment_variable("SystemRoot").value_or_exit(VCPKG_LINE_INFO); static const std::string SYSTEM_32 = SYSTEM_ROOT + R"(\system32)"; - std::string new_path = Strings::format( - R"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); + std::string new_path = Strings::format(R"(Path=%s%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", + prepend_to_path, + SYSTEM_32, + SYSTEM_ROOT, + SYSTEM_32, + SYSTEM_32); std::vector env_wstrings = { L"ALLUSERSPROFILE", @@ -348,7 +353,8 @@ namespace vcpkg #endif int System::cmd_execute_clean(const ZStringView cmd_line, - const std::unordered_map& extra_env) + const std::unordered_map& extra_env, + const std::string& prepend_to_path) { auto timer = Chrono::ElapsedTimer::create_started(); #if defined(_WIN32) @@ -357,7 +363,7 @@ namespace vcpkg memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); g_ctrl_c_state.transition_to_spawn_process(); - auto clean_env = compute_clean_environment(extra_env); + auto clean_env = compute_clean_environment(extra_env, prepend_to_path); windows_create_process(cmd_line, clean_env.data(), process_info, NULL); CloseHandle(process_info.hThread); @@ -608,10 +614,7 @@ namespace vcpkg void System::register_console_ctrl_handler() {} #endif - int System::get_num_logical_cores() - { - return std::thread::hardware_concurrency(); - } + int System::get_num_logical_cores() { return std::thread::hardware_concurrency(); } } namespace vcpkg::Debug diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 1975d3aaf..68df1f965 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -363,13 +363,11 @@ namespace vcpkg::Build const Triplet& triplet = spec.triplet(); const auto& triplet_file_path = paths.get_triplet_file_path(spec.triplet()).u8string(); - if (!Strings::case_insensitive_ascii_starts_with(triplet_file_path, - paths.triplets.u8string())) + if (!Strings::case_insensitive_ascii_starts_with(triplet_file_path, paths.triplets.u8string())) { System::printf("-- Loading triplet configuration from: %s\n", triplet_file_path); } - if (!Strings::case_insensitive_ascii_starts_with(config.port_dir.u8string(), - paths.ports.u8string())) + if (!Strings::case_insensitive_ascii_starts_with(config.port_dir.u8string(), paths.ports.u8string())) { System::printf("-- Installing port from location: %s\n", config.port_dir.u8string()); } @@ -382,6 +380,13 @@ namespace vcpkg::Build const fs::path& cmake_exe_path = paths.get_tool_exe(Tools::CMAKE); const fs::path& git_exe_path = paths.get_tool_exe(Tools::GIT); +#if defined(_WIN32) + const fs::path& powershell_exe_path = paths.get_tool_exe("powershell-core"); + if (!fs.exists(powershell_exe_path.parent_path() / "powershell.exe")) + { + fs.copy(powershell_exe_path, powershell_exe_path.parent_path() / "powershell.exe", fs::copy_options::none); + } +#endif std::string all_features; for (auto& feature : config.scf.feature_paragraphs) @@ -425,8 +430,14 @@ namespace vcpkg::Build } command.append(cmd_launch_cmake); const auto timer = Chrono::ElapsedTimer::create_started(); - - const int return_code = System::cmd_execute_clean(command); + const int return_code = System::cmd_execute_clean( + command, + {} +#ifdef _WIN32 + , + powershell_exe_path.parent_path().u8string() + ";" +#endif + ); const auto buildtimeus = timer.microseconds(); const auto spec_string = spec.to_string(); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index fda9e2b11..8b2b377bf 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -380,17 +380,10 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console static constexpr StringLiteral TITLE = "PowerShell Tab-Completion"; const fs::path script_path = paths.scripts / "addPoshVcpkgToPowershellProfile.ps1"; - // Console font corruption workaround - SetConsoleCP(437); - SetConsoleOutputCP(437); - + const auto& ps = paths.get_tool_exe("powershell-core"); const std::string cmd = Strings::format( - R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), ""); + R"("%s" -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' }")", ps.u8string(), script_path.u8string()); const int rc = System::cmd_execute(cmd); - - SetConsoleCP(CP_UTF8); - SetConsoleOutputCP(CP_UTF8); - if (rc) { System::printf(System::Color::error, diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index a64eb42fd..2eff1abee 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -161,8 +161,14 @@ + + + + + + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 36840c509..aec56b039 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -383,5 +383,23 @@ Header Files\vcpkg\base + + Header Files\vcpkg\base + + + Header Files\vcpkg\base + + + Header Files\vcpkg\base + + + Header Files\vcpkg\base + + + Header Files\vcpkg\base + + + Header Files\vcpkg\base + \ No newline at end of file From 1000d8291be8c7d2c2283efc3fc4a0bb886a483e Mon Sep 17 00:00:00 2001 From: Sascha Zelzer Date: Sat, 6 Jul 2019 23:44:54 +0200 Subject: [PATCH 0119/1066] [cppmicroservices] Add new port (fix #5801) (#6388) * [cppmicroservices] Add new port (fix #5801) * turn off linker error checking for static building * remove comments and include * werror flag patch * fix cmake targets --- ports/cppmicroservices/CONTROL | 3 +++ ports/cppmicroservices/portfile.cmake | 32 +++++++++++++++++++++++++++ ports/cppmicroservices/werror.patch | 13 +++++++++++ 3 files changed, 48 insertions(+) create mode 100644 ports/cppmicroservices/CONTROL create mode 100644 ports/cppmicroservices/portfile.cmake create mode 100644 ports/cppmicroservices/werror.patch diff --git a/ports/cppmicroservices/CONTROL b/ports/cppmicroservices/CONTROL new file mode 100644 index 000000000..9a53e06b1 --- /dev/null +++ b/ports/cppmicroservices/CONTROL @@ -0,0 +1,3 @@ +Source: cppmicroservices +Version: 4.0.0-pre1 +Description: An OSGi-like C++ dynamic module system and service registry diff --git a/ports/cppmicroservices/portfile.cmake b/ports/cppmicroservices/portfile.cmake new file mode 100644 index 000000000..d0edb6374 --- /dev/null +++ b/ports/cppmicroservices/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "CppMicroServices/CppMicroservices" + REF b322441568f903ef96c0ccb03e2611d052ceb4e0 + SHA512 1673dfe9dba913890ec93e351263a924437a0d739a5858dcdc07650e1aaca30c3b4fcce59e32b201c1d65e15eb82e27912d759e4d07ecc149ae8a4f9eb1669bc + HEAD_REF development + PATCHES werror.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DTOOLS_INSTALL_DIR:STRING=tools/cppmicroservices + -DAUXILIARY_INSTALL_DIR:STRING=share/cppmicroservices +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppmicroservices RENAME copyright) + +vcpkg_fixup_cmake_targets() + +# CppMicroServices uses a custom resource compiler to compile resources +# the zipped resources are then appended to the target which cause the linker to crash +# when compiling a static library +if(NOT BUILD_SHARED_LIBS) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +endif() diff --git a/ports/cppmicroservices/werror.patch b/ports/cppmicroservices/werror.patch new file mode 100644 index 000000000..b06f43a72 --- /dev/null +++ b/ports/cppmicroservices/werror.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 24fd87e..974064c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -382,7 +382,7 @@ else() + usFunctionCheckCompilerFlags(-fstack-protector-all US_CXX_FLAGS) + endif() + +- foreach(_cxxflag -Werror -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align ++ foreach(_cxxflag -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align + -Wwrite-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast + -Wstrict-null-sentinel -Wsign-promo -fdiagnostics-show-option ) + usFunctionCheckCompilerFlags(${_cxxflag} US_CXX_FLAGS) From 8c64785e78d28e56ca5f8886ea572afa27ac0dfd Mon Sep 17 00:00:00 2001 From: Samuel Marks <807580+SamuelMarks@users.noreply.github.com> Date: Sun, 7 Jul 2019 07:52:53 +1000 Subject: [PATCH 0120/1066] [zookeeper] Add new port (#7000) * [zookeeper-mt] Add new port * [zookeeper-mt] Upgrade from 3.5.4-beta to 3.5.5 * [zookeeper-mt] Fix upgrade * disable warnings and add static library check * edit cmake file * add async feature * add back some changes for export * add sync feature, disable parallel configure --- ports/zookeeper/CONTROL | 7 +++++ ports/zookeeper/cmake.patch | 50 ++++++++++++++++++++++++++++++++++ ports/zookeeper/portfile.cmake | 43 +++++++++++++++++++++++++++++ ports/zookeeper/win32.patch | 29 ++++++++++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 ports/zookeeper/CONTROL create mode 100644 ports/zookeeper/cmake.patch create mode 100644 ports/zookeeper/portfile.cmake create mode 100644 ports/zookeeper/win32.patch diff --git a/ports/zookeeper/CONTROL b/ports/zookeeper/CONTROL new file mode 100644 index 000000000..d10b1683a --- /dev/null +++ b/ports/zookeeper/CONTROL @@ -0,0 +1,7 @@ +Source: zookeeper +Version: 3.5.5 +Description: ZooKeeper C bindings +Default-Features: sync + +Feature: sync +Description: ZooKeeper with the sync API \ No newline at end of file diff --git a/ports/zookeeper/cmake.patch b/ports/zookeeper/cmake.patch new file mode 100644 index 000000000..4dd8ef93b --- /dev/null +++ b/ports/zookeeper/cmake.patch @@ -0,0 +1,50 @@ +diff --git a/zookeeper-client/zookeeper-client-c/CMakeLists.txt b/zookeeper-client/zookeeper-client-c/CMakeLists.txt +index 24a5a1b..1b0ce4a 100644 +--- a/zookeeper-client/zookeeper-client-c/CMakeLists.txt ++++ b/zookeeper-client/zookeeper-client-c/CMakeLists.txt +@@ -153,7 +153,7 @@ configure_file(cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.h) + # hashtable library + set(hashtable_sources src/hashtable/hashtable_itr.c src/hashtable/hashtable.c) + add_library(hashtable STATIC ${hashtable_sources}) +-target_include_directories(hashtable PUBLIC include) ++target_include_directories(hashtable PUBLIC $ $) + target_link_libraries(hashtable PUBLIC $<$,$>:m>) + + # zookeeper library +@@ -176,7 +176,10 @@ if(WIN32) + endif() + + add_library(zookeeper STATIC ${zookeeper_sources}) +-target_include_directories(zookeeper PUBLIC include ${CMAKE_CURRENT_BINARY_DIR}/include generated) ++target_include_directories(zookeeper PUBLIC ++ $ ++ $) ++ + target_link_libraries(zookeeper PUBLIC + hashtable + $<$:rt> # clock_gettime +@@ -247,3 +250,23 @@ if(WANT_CPPUNIT) + "ZKROOT=${CMAKE_CURRENT_SOURCE_DIR}/../.." + "CLASSPATH=$CLASSPATH:$CLOVER_HOME/lib/clover*.jar") + endif() ++ ++ ++target_compile_definitions(zookeeper PRIVATE _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE) ++target_compile_definitions(cli PRIVATE _CRT_SECURE_NO_WARNINGS) ++ ++file(GLOB ZOOKEEPER_HEADERS include/*.h) ++ ++install(FILES ${ZOOKEEPER_HEADERS} generated/zookeeper.jute.h DESTINATION include/zookeeper) ++ ++install(TARGETS zookeeper hashtable ++ EXPORT zookeeperConfig ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++) ++install(EXPORT zookeeperConfig ++ FILE zookeeperConfig.cmake ++ NAMESPACE zookeeper:: ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/zookeeper" ++) +\ No newline at end of file diff --git a/ports/zookeeper/portfile.cmake b/ports/zookeeper/portfile.cmake new file mode 100644 index 000000000..2e315a61f --- /dev/null +++ b/ports/zookeeper/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://archive.apache.org/dist/zookeeper/zookeeper-3.5.5/apache-zookeeper-3.5.5.tar.gz" + FILENAME "zookeeper-3.5.5.tar.gz" + SHA512 4e22df899a83ca3cc15f6d94daadb1a8631fb4108e67b4f56d1f4fcf95f10f89c8ff1fb8a7c84799a3856d8803a8db1e1f2f3fe1b7dc0d6cedf485ef90fd212d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + cmake.patch + win32.patch +) + +set(SOURCE_PATH ${SOURCE_PATH}/zookeeper-client/zookeeper-client-c) + +set(WANT_SYNCAPI OFF) +if("sync" IN_LIST FEATURES) + set(WANT_SYNCAPI ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DWANT_CPPUNIT=OFF + -DWANT_SYNCAPI=${WANT_SYNCAPI} +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zookeeper RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets() + +vcpkg_copy_pdbs() diff --git a/ports/zookeeper/win32.patch b/ports/zookeeper/win32.patch new file mode 100644 index 000000000..b55f06735 --- /dev/null +++ b/ports/zookeeper/win32.patch @@ -0,0 +1,29 @@ +diff --git a/zookeeper-client/zookeeper-client-c/src/zk_log.c b/zookeeper-client/zookeeper-client-c/src/zk_log.c +index 436485e..1902b09 100644 +--- a/zookeeper-client/zookeeper-client-c/src/zk_log.c ++++ b/zookeeper-client/zookeeper-client-c/src/zk_log.c +@@ -108,8 +108,11 @@ static const char* time_now(char* now_str){ + gettimeofday(&tv,0); + + now = tv.tv_sec; ++#ifdef WIN32 ++ localtime_s(<, &now); ++#else + localtime_r(&now, <); +- ++#endif + // clone the format used by log4j ISO8601DateFormat + // specifically: "yyyy-MM-dd HH:mm:ss,SSS" + +diff --git a/zookeeper-client/zookeeper-client-c/src/zookeeper.c b/zookeeper-client/zookeeper-client-c/src/zookeeper.c +index 25baa9c..96ed379 100644 +--- a/zookeeper-client/zookeeper-client-c/src/zookeeper.c ++++ b/zookeeper-client/zookeeper-client-c/src/zookeeper.c +@@ -90,6 +90,7 @@ + #define EAI_ADDRFAMILY WSAEINVAL /* is this still needed? */ + #define EHOSTDOWN EPIPE + #define ESTALE ENODEV ++#define strtok_r strtok_s + #endif + + #define IF_DEBUG(x) if(logLevel==ZOO_LOG_LEVEL_DEBUG) {x;} From 78b21911b7eed0f0d223416e529bc0f7b75d3e2c Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Sun, 7 Jul 2019 15:19:17 +0800 Subject: [PATCH 0121/1066] [mongo-c-driver] Add usage (#7048) --- ports/mongo-c-driver/CONTROL | 2 +- ports/mongo-c-driver/portfile.cmake | 2 ++ ports/mongo-c-driver/usage | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ports/mongo-c-driver/usage diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index 0a02b9dd1..5d3b3a5f0 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,5 +1,5 @@ Source: mongo-c-driver -Version: 1.14.0-2 +Version: 1.14.0-3 Build-Depends: libbson, openssl (!windows), zlib Description: Client library written in C for MongoDB. Homepage: https://github.com/mongodb/mongo-c-driver diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index 3db262c2f..f2b72fc08 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -122,6 +122,8 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFI vcpkg_copy_pdbs() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libbson-1.0.pc ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libbson-1.0.pc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libbson-static-1.0.pc ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libbson-static-1.0.pc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) diff --git a/ports/mongo-c-driver/usage b/ports/mongo-c-driver/usage new file mode 100644 index 000000000..80595cd07 --- /dev/null +++ b/ports/mongo-c-driver/usage @@ -0,0 +1,9 @@ +The package mongo-c-driver is compatible with built-in CMake targets: + + find_package(mongo-c-driver CONFIG REQUIRED) + target_include_directories(${project} PRIVATE ${MONGOC_INCLUDE_DIRS}) + +For use dynamic library: + target_link_libraries(${project} PRIVATE ${MONGOC_LIBRARIES}) +For use static library: + target_link_libraries(${project} PRIVATE ${MONGOC_STATIC_LIBRARY}) From 4290df114cf91c72e0a3ed06f436716ce233621a Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Sun, 7 Jul 2019 15:24:18 +0800 Subject: [PATCH 0122/1066] [openimageio] Upgrade to version 2.0.8 (#7173) --- ports/openimageio/CONTROL | 4 +- ports/openimageio/fix_libraw.patch | 11 +-- ports/openimageio/portfile.cmake | 8 +-- .../openimageio/remove_wrong_dependency.patch | 16 ++--- ports/openimageio/use-webp.patch | 68 +++++++++---------- 5 files changed, 47 insertions(+), 60 deletions(-) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index be2dab3c9..ceb4b9408 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,8 +1,8 @@ Source: openimageio -Version: 1.8.16 +Version: 2.0.8 Homepage: https://github.com/OpenImageIO/oiio Description: A library for reading and writing images, and a bunch of related classes, utilities, and application -Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map +Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace Feature: libraw Build-Depends: libraw diff --git a/ports/openimageio/fix_libraw.patch b/ports/openimageio/fix_libraw.patch index 0870a567f..707530247 100644 --- a/ports/openimageio/fix_libraw.patch +++ b/ports/openimageio/fix_libraw.patch @@ -1,8 +1,8 @@ diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 5eeb7d3..3e8bfcb 100644 +index 2692bb0..f2709d0 100644 --- a/src/cmake/externalpackages.cmake +++ b/src/cmake/externalpackages.cmake -@@ -336,7 +336,7 @@ if (USE_LIBRAW) +@@ -380,7 +380,7 @@ if (USE_LIBRAW) message (STATUS "Looking for LibRaw with ${LIBRAW_PATH}") endif () find_package (LibRaw) @@ -11,7 +11,7 @@ index 5eeb7d3..3e8bfcb 100644 set (LIBRAW_FOUND TRUE) include_directories (${LibRaw_INCLUDE_DIR}) if (NOT LibRaw_FIND_QUIETLY) -@@ -350,7 +350,7 @@ if (USE_LIBRAW) +@@ -394,7 +394,7 @@ if (USE_LIBRAW) if (LINKSTATIC) find_package (Jasper) find_library (LCMS2_LIBRARIES NAMES lcms2) @@ -20,11 +20,6 @@ index 5eeb7d3..3e8bfcb 100644 endif () else () message (STATUS "Not using LibRaw") -@@ -494,4 +494,3 @@ if (USE_DICOM) - endif() - # end DCMTK setup - ########################################################################### -- diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt index e3608a2..f503035 100644 --- a/src/raw.imageio/CMakeLists.txt diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 790273975..e40441e4c 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenImageIO/oiio - REF Release-1.8.16 - SHA512 a919341df7d9625a869cad266d8434881b63a47f3da8daccf4bbab6675d45bd121ff780dd911a7447450fee44cd7bdd42d73aec59a99b667d6d98e79682db2c7 + REF Release-2.0.8 + SHA512 412d240916780b784b89d9eeb36b5b9451e8448100fce494c0d95f0b274506d2946cae0eb929dbe8118b8b04a8bd2a926270a971aad7d0542abcff5f35404953 HEAD_REF master PATCHES fix_libraw.patch @@ -72,5 +72,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openimageio) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/openimageio/LICENSE ${CURRENT_PACKAGES_DIR}/share/openimageio/copyright) +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/openimageio) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/openimageio/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/openimageio/copyright) diff --git a/ports/openimageio/remove_wrong_dependency.patch b/ports/openimageio/remove_wrong_dependency.patch index dabf47b1e..307ef1dec 100644 --- a/ports/openimageio/remove_wrong_dependency.patch +++ b/ports/openimageio/remove_wrong_dependency.patch @@ -1,23 +1,15 @@ diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt -index c528adc..bc133b6 100644 +index 61ed97b..4435426 100644 --- a/src/libOpenImageIO/CMakeLists.txt +++ b/src/libOpenImageIO/CMakeLists.txt -@@ -162,9 +162,6 @@ if (WIN32) +@@ -164,10 +164,6 @@ if (WIN32) target_link_libraries (OpenImageIO psapi.lib) endif () -if (VISIBILITY_MAP_FILE) - add_dependencies (OpenImageIO "${VISIBILITY_MAP_FILE}") -endif () - +- if (USE_EXTERNAL_PUGIXML) target_link_libraries (OpenImageIO ${PUGIXML_LIBRARIES}) -@@ -230,7 +227,7 @@ if (OIIO_BUILD_TESTS) - set_target_properties (imagespec_test PROPERTIES FOLDER "Unit Tests") - target_link_libraries (imagespec_test OpenImageIO ${Boost_LIBRARIES}) - add_test (unit_imagespec imagespec_test) -- -+ - add_executable (imagespeed_test imagespeed_test.cpp) - set_target_properties (imagespeed_test PROPERTIES FOLDER "Unit Tests") - target_link_libraries (imagespeed_test OpenImageIO ${Boost_LIBRARIES}) + endif () diff --git a/ports/openimageio/use-webp.patch b/ports/openimageio/use-webp.patch index 1b03636e9..ab03b1703 100644 --- a/ports/openimageio/use-webp.patch +++ b/ports/openimageio/use-webp.patch @@ -1,34 +1,34 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index abd4e23..12a7f54 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -87,6 +87,7 @@ option (USE_FREETYPE "Use Freetype if found" ON) - option (USE_GIF "Use GIF if found" ON) - option (USE_PTEX "Use PTex if found" ON) - option (USE_LIBRAW "Use LibRaw if found" ON) -+option (USE_WEBP "Use WebP if found" ON) - set (LIBRAW_PATH "" CACHE STRING "Custom LibRaw path") - option (OIIO_THREAD_ALLOW_DCLP "OIIO threads may use DCLP for speed" ON) - option (USE_NUKE "Build Nuke plugins, if Nuke is found" ON) -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 7dde986..66da94d 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -366,6 +366,7 @@ endif() - if (NOT WEBP_FIND_QUIETLY) - message (STATUS "WEBP_HOME=${WEBP_HOME}") - endif () -+if(USE_WEBP) - find_path (WEBP_INCLUDE_DIR webp/encode.h - "${PROJECT_SOURCE_DIR}/src/include" - "${WEBP_HOME}") -@@ -382,6 +383,9 @@ else() - set (WEBP_FOUND FALSE) - message (STATUS "WebP library not found") - endif() -+else() -+ set (WEBP_FOUND FALSE) -+endif() - # end Webp setup - ########################################################################### - +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7f43455..393af70 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -96,6 +96,7 @@ option (USE_GIF "Use GIF if found" ON) + option (USE_PTEX "Use PTex if found" ON) + option (USE_WEBP "Use WebP if found" ON) + option (USE_LIBRAW "Use LibRaw if found" ON) ++option (USE_WEBP "Use WebP if found" ON) + set (LIBRAW_PATH "" CACHE STRING "Custom LibRaw path") + option (OIIO_THREAD_ALLOW_DCLP "OIIO threads may use DCLP for speed" ON) + option (USE_NUKE "Build Nuke plugins, if Nuke is found" ON) +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index f2709d0..3a95da6 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -411,6 +411,7 @@ if (USE_WEBP) + if (NOT WEBP_FIND_QUIETLY) + message (STATUS "WEBP_HOME=${WEBP_HOME}") + endif () ++ if(USE_WEBP) + find_path (WEBP_INCLUDE_DIR webp/encode.h + "${PROJECT_SOURCE_DIR}/src/include" + "${WEBP_HOME}") +@@ -427,6 +428,9 @@ if (USE_WEBP) + set (WEBP_FOUND FALSE) + message (STATUS "WebP library not found") + endif() ++ else() ++ set (WEBP_FOUND FALSE) ++ endif() + else () + message (STATUS "Not using WebP") + endif () From 465990716b0c0c6c9ad569c80caac7b3a6df36c8 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Sun, 7 Jul 2019 00:25:09 -0700 Subject: [PATCH 0123/1066] [duktape] Fix package not found by find_package. (#7170) --- ports/duktape/CONTROL | 2 +- ports/duktape/duktapeConfig.cmake | 33 +++++++++++++++++++++++++++++++ ports/duktape/portfile.cmake | 2 ++ ports/duktape/usage | 5 +++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 ports/duktape/duktapeConfig.cmake create mode 100644 ports/duktape/usage diff --git a/ports/duktape/CONTROL b/ports/duktape/CONTROL index 007025398..5f212d705 100644 --- a/ports/duktape/CONTROL +++ b/ports/duktape/CONTROL @@ -1,5 +1,5 @@ Source: duktape -Version: 2.3.0 +Version: 2.3.0-1 Homepage: https://github.com/svaarala/duktape Description: Embeddable Javascript engine with a focus on portability and compact footprint. Build-Depends: diff --git a/ports/duktape/duktapeConfig.cmake b/ports/duktape/duktapeConfig.cmake new file mode 100644 index 000000000..56d7798fd --- /dev/null +++ b/ports/duktape/duktapeConfig.cmake @@ -0,0 +1,33 @@ +# - Try to find duktape +# Once done this will define +# +# DUKTAPE_FOUND - system has Duktape +# DUKTAPE_INCLUDE_DIRS - the Duktape include directory +# DUKTAPE_LIBRARIES - Link these to use DUKTAPE +# DUKTAPE_DEFINITIONS - Compiler switches required for using Duktape +# + +find_package(PkgConfig QUIET) +pkg_check_modules(PC_DUK QUIET duktape libduktape) + +find_path(DUKTAPE_INCLUDE_DIR duktape.h + HINTS ${PC_DUK_INCLUDEDIR} ${PC_DUK_INCLUDE_DIRS} + PATH_SUFFIXES duktape) + +find_library(DUKTAPE_LIBRARY + NAMES duktape libduktape + HINTS ${PC_DUK_LIBDIR} ${PC_DUK_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Duktape + REQUIRED_VARS DUKTAPE_LIBRARY DUKTAPE_INCLUDE_DIR) + +if (DUKTAPE_FOUND) + set (DUKTAPE_LIBRARIES ${DUKTAPE_LIBRARY}) + set (DUKTAPE_INCLUDE_DIRS ${DUKTAPE_INCLUDE_DIR} ) +endif () + +MARK_AS_ADVANCED( + DUKTAPE_INCLUDE_DIR + DUKTAPE_LIBRARY +) \ No newline at end of file diff --git a/ports/duktape/portfile.cmake b/ports/duktape/portfile.cmake index ef1476a52..e15ca137b 100644 --- a/ports/duktape/portfile.cmake +++ b/ports/duktape/portfile.cmake @@ -13,6 +13,8 @@ vcpkg_from_github( ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/duktapeConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) if(CMAKE_HOST_WIN32) set(EXECUTABLE_SUFFIX ".exe") diff --git a/ports/duktape/usage b/ports/duktape/usage new file mode 100644 index 000000000..5870cb2bb --- /dev/null +++ b/ports/duktape/usage @@ -0,0 +1,5 @@ +find_package(duktape CONFIG REQUIRED) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${DUKTAPE_INCLUDE_DIRS}) + +target_link_libraries(main ${DUKTAPE_LIBRARY}) \ No newline at end of file From 832f431527243d1f67f601592343ec0ff2536625 Mon Sep 17 00:00:00 2001 From: Phoebe <925731795@qq.com> Date: Sun, 7 Jul 2019 15:26:12 +0800 Subject: [PATCH 0124/1066] [Poco] Add foundation library missing ipjlpapi.lib (#7169) --- ports/poco/CONTROL | 2 +- ports/poco/fix_foundation_link.patch | 26 ++++++++++++++++++++++++++ ports/poco/portfile.cmake | 1 + 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ports/poco/fix_foundation_link.patch diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 1e98ccc74..72c7cc72f 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,5 +1,5 @@ Source: poco -Version: 2.0.0-pre-2 +Version: 2.0.0-pre-3 Build-Depends: expat, libpq, pcre, sqlite3, zlib Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. Homepage: https://github.com/pocoproject/poco diff --git a/ports/poco/fix_foundation_link.patch b/ports/poco/fix_foundation_link.patch new file mode 100644 index 000000000..f3af572b1 --- /dev/null +++ b/ports/poco/fix_foundation_link.patch @@ -0,0 +1,26 @@ +diff --git a/Foundation/src/Environment_WIN32.cpp b/Foundation/src/Environment_WIN32.cpp +index 3cca5c7..8ed1df2 100644 +--- a/Foundation/src/Environment_WIN32.cpp ++++ b/Foundation/src/Environment_WIN32.cpp +@@ -23,7 +23,7 @@ + #include + #include + #include +- ++#pragma comment(lib, "IPHLPAPI.lib") + + namespace Poco { + +diff --git a/Foundation/src/Environment_WINCE.cpp b/Foundation/src/Environment_WINCE.cpp +index 62f19bc..d409356 100644 +--- a/Foundation/src/Environment_WINCE.cpp ++++ b/Foundation/src/Environment_WINCE.cpp +@@ -22,7 +22,7 @@ + #include + #include + #include +- ++#pragma comment(lib, "IPHLPAPI.lib") + + namespace Poco { + diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 46d9a439c..f6a1255aa 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -19,6 +19,7 @@ vcpkg_from_github( unbundled_pdf.patch # Add the support of arm64-windows arm64_pcre.patch + fix_foundation_link.patch ) # define Poco linkage type From 3ec238d54a088be4cb100bff671807b61a0131db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Schau?= Date: Sun, 7 Jul 2019 09:26:48 +0200 Subject: [PATCH 0125/1066] [gsoap] Update to 2.8.87 (#7145) --- ports/gsoap/CONTROL | 2 +- ports/gsoap/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/gsoap/CONTROL b/ports/gsoap/CONTROL index 364deb380..e9abd9516 100644 --- a/ports/gsoap/CONTROL +++ b/ports/gsoap/CONTROL @@ -1,4 +1,4 @@ Source: gsoap -Version: 2.8.84-1 +Version: 2.8.87-1 Build-Depends: curl Description: The gSOAP toolkit is a C and C++ software development toolkit for SOAP and REST XML Web services and generic C/C++ XML data bindings. \ No newline at end of file diff --git a/ports/gsoap/portfile.cmake b/ports/gsoap/portfile.cmake index 79270c7cb..fb45d3950 100644 --- a/ports/gsoap/portfile.cmake +++ b/ports/gsoap/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) set(GSOAP_VERSION 2.8) -set(GSOAP_SUB_VERSION .84) +set(GSOAP_SUB_VERSION .87) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gsoap-${GSOAP_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://ayera.dl.sourceforge.net/project/gsoap2/gsoap-${GSOAP_VERSION}/gsoap_${GSOAP_VERSION}${GSOAP_SUB_VERSION}.zip" FILENAME "gsoap_${GSOAP_VERSION}${GSOAP_SUB_VERSION}.zip" - SHA512 ec050119cd3e480b266cad36823f4862fe0ac21045ce901c3c91a552eae2fbf9e1cd515458835807cce54c04df7835a980a299d37f418190cd57684fd6bdcf79 + SHA512 638bf9b2b8aca5facba518f136ad5af5bda41f2b92ee345ee6989d73223a571ce5ddab23c0b65259e9fd524039250d861defc8cfc2fc0a366a578ce3629b9ca4 ) vcpkg_extract_source_archive_ex( From 6f15f897b9635112b624c384e62254963851d04e Mon Sep 17 00:00:00 2001 From: Igor Kostenko Date: Sun, 7 Jul 2019 08:28:34 +0100 Subject: [PATCH 0126/1066] [qt5-mqtt] crossplatform add to path (#7130) --- ports/qt5-mqtt/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qt5-mqtt/portfile.cmake b/ports/qt5-mqtt/portfile.cmake index e9b8c3c75..7ccdf913f 100644 --- a/ports/qt5-mqtt/portfile.cmake +++ b/ports/qt5-mqtt/portfile.cmake @@ -16,6 +16,6 @@ file(WRITE "${SOURCE_PATH}/.git" "repocontent") # syncqt is a PERL script vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") +vcpkg_add_to_path("${PERL_EXE_PATH}") qt_modular_build_library(${SOURCE_PATH}) From 46e5414ce0e977c37f4f44643d7ef273fbee8d88 Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Sun, 7 Jul 2019 15:29:23 +0800 Subject: [PATCH 0127/1066] [botan] Fix build error C2039 with Visual Studio 2019 and C++17 (#7140) --- ports/botan/CONTROL | 2 +- ports/botan/fix-build_error.patch | 25 +++++++++++++++++++++++++ ports/botan/portfile.cmake | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ports/botan/fix-build_error.patch diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL index 9221e7f66..48ee01549 100644 --- a/ports/botan/CONTROL +++ b/ports/botan/CONTROL @@ -1,4 +1,4 @@ Source: botan -Version: 2.9.0-1 +Version: 2.9.0-2 Homepage: https://botan.randombit.net Description: A cryptography library written in C++11 diff --git a/ports/botan/fix-build_error.patch b/ports/botan/fix-build_error.patch new file mode 100644 index 000000000..85cae86b0 --- /dev/null +++ b/ports/botan/fix-build_error.patch @@ -0,0 +1,25 @@ +diff --git a/src/lib/utils/filesystem.cpp b/src/lib/utils/filesystem.cpp +index 053c91e..8e0a271 100644 +--- a/src/lib/utils/filesystem.cpp ++++ b/src/lib/utils/filesystem.cpp +@@ -9,8 +9,10 @@ + #include + #include + ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING ++ + #if defined(BOTAN_TARGET_OS_HAS_STL_FILESYSTEM_MSVC) && defined(BOTAN_BUILD_COMPILER_IS_MSVC) +- #include ++ #include + #elif defined(BOTAN_HAS_BOOST_FILESYSTEM) + #include + #elif defined(BOTAN_TARGET_OS_HAS_POSIX1) +@@ -38,7 +40,7 @@ std::vector impl_stl_filesystem(const std::string& dir) + #if (_MSVC_LANG >= 201703L) + using namespace std::filesystem; + #else +- using namespace std::tr2::sys; ++ using namespace std::experimental::filesystem; + #endif + + std::vector out; diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index 4dc02d588..81eb3706c 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -8,6 +8,8 @@ vcpkg_from_github( REF 0129d3172ec419beb90a2b3487f6385a35da0742 SHA512 a8328df5ad2693a96935d1d2202ddd6678a5ba9c63a8159acbe56f1c884fa5faaa71339e8f56284cfd00574a9b4f91bdb1fb22c36c8e899d9b4cbe881f4867d3 HEAD_REF master + PATCHES + fix-build_error.patch ) if(CMAKE_HOST_WIN32) From 4f6f7f8fbcd48c8d152b6192d08547ed0e5a699c Mon Sep 17 00:00:00 2001 From: Helco Date: Sun, 7 Jul 2019 09:31:46 +0200 Subject: [PATCH 0128/1066] kinectsdk2: fix missing header files (#7143) --- ports/kinectsdk2/CONTROL | 2 +- ports/kinectsdk2/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/kinectsdk2/CONTROL b/ports/kinectsdk2/CONTROL index 85ccd7f0b..ee0900842 100644 --- a/ports/kinectsdk2/CONTROL +++ b/ports/kinectsdk2/CONTROL @@ -1,3 +1,3 @@ Source: kinectsdk2 -Version: 2.0 +Version: 2.0-1 Description: Kinect for Windows SDK for Kinect v2 sensor. diff --git a/ports/kinectsdk2/portfile.cmake b/ports/kinectsdk2/portfile.cmake index bd2080c04..19072cd34 100644 --- a/ports/kinectsdk2/portfile.cmake +++ b/ports/kinectsdk2/portfile.cmake @@ -43,7 +43,7 @@ set(KINECTSDK20_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/Microsoft SDKs/ file( INSTALL - "${KINECTSDK20_DIR}/inc/Kinect.h" + "${KINECTSDK20_DIR}/inc/" DESTINATION ${CURRENT_PACKAGES_DIR}/include ) From 1053d5b386778536b64a42afd1198e91581721bc Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sun, 7 Jul 2019 15:33:46 +0800 Subject: [PATCH 0129/1066] [vcpkg] Fix incorrect setting of FEATURE_OPTIONS (#7158) Setting a variable in PARENT_SCOPE will not make the variable also visible in current scope, which, as a result, causes FEATURE_OPTIONS to be set incorrectly. --- scripts/cmake/vcpkg_check_features.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_check_features.cmake b/scripts/cmake/vcpkg_check_features.cmake index 115b1501f..d089ac5b1 100644 --- a/scripts/cmake/vcpkg_check_features.cmake +++ b/scripts/cmake/vcpkg_check_features.cmake @@ -94,12 +94,12 @@ function(vcpkg_check_features) if(${_vcf_FEATURE} IN_LIST FEATURES) set(${_vcf_FEATURE_VAR} ON PARENT_SCOPE) + list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VAR}=ON") else() set(${_vcf_FEATURE_VAR} OFF PARENT_SCOPE) + list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VAR}=OFF") endif() - list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VAR}=${${_vcf_FEATURE_VAR}}") - set(_vcf_IS_FEATURE_ARG ON) endif() endforeach() From d5959f2e4c8efcf22048beca8e393058e37a3ead Mon Sep 17 00:00:00 2001 From: Phoebe <925731795@qq.com> Date: Mon, 8 Jul 2019 14:00:33 +0800 Subject: [PATCH 0130/1066] [civetweb] Upgrade to export cmake targets and enable feature websockets in default (#7166) --- ports/civetweb/CONTROL | 2 +- ports/civetweb/portfile.cmake | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/civetweb/CONTROL b/ports/civetweb/CONTROL index a8b0832e0..b24a4ffec 100644 --- a/ports/civetweb/CONTROL +++ b/ports/civetweb/CONTROL @@ -1,3 +1,3 @@ Source: civetweb -Version: 1.11-1 +Version: 2019-07-05 Description: Easy to use, powerful, C/C++ embeddable web server. diff --git a/ports/civetweb/portfile.cmake b/ports/civetweb/portfile.cmake index 8ad7af538..17a0d7f45 100644 --- a/ports/civetweb/portfile.cmake +++ b/ports/civetweb/portfile.cmake @@ -9,8 +9,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO civetweb/civetweb - REF v1.11 - SHA512 e1520fd2f4a54b6ab4838f4da2ce3f0956e9884059467d196078935a3fce61dad619f3bb1bc2b4c6a757e1a8abfed0e83cba38957c7c52fff235676e9dd1d428 + REF 2c1caa6e690bfe3b435a10c372ab2dcd14b872e8 + SHA512 bfd37906f85c10649108f83e755f28f058c0c27b0d597e6eb82f097db7fa043f6014984f1735c904d0e01c8a5e0dc45f1c57c1fb45b08bce78f42539e19160d6 HEAD_REF master ) @@ -24,13 +24,16 @@ vcpkg_configure_cmake( -DCIVETWEB_ENABLE_IPV6=ON -DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF -DCIVETWEB_ENABLE_SSL=OFF + -DCIVETWEB_ENABLE_WEBSOCKETS=ON ) vcpkg_install_cmake() -vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/civetweb) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/civetweb/copyright COPYONLY) + +vcpkg_copy_pdbs() From 042d7d368f7417039cc8e42cc34af634d9a45f80 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Sun, 7 Jul 2019 23:11:01 -0700 Subject: [PATCH 0131/1066] [curl] Add features. (#7156) --- ports/curl/CONTROL | 12 +++++++++++- ports/curl/portfile.cmake | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index bd7c4b39b..0b2028369 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.65.0-2 +Version: 7.65.0-3 Build-Depends: zlib Homepage: https://github.com/curl/curl Description: A library for transferring data with URLs @@ -37,3 +37,13 @@ Description: SSL support (mbedTLS) Feature: sectransp Description: SSL support (sectransp) + +Feature: c-ares +Build-Depends: c-ares +Description: c-ares support + +Feature:sspi +Description: SSPI support + +Feature: brotli +Description: brotli support (brotli) \ No newline at end of file diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 091fe9205..5c4f94fdf 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -73,6 +73,24 @@ if("tool" IN_LIST FEATURES) set(BUILD_CURL_EXE ON) endif() +# c-ares +set(USE_ARES OFF) +if("c-ares" IN_LIST FEATURES) + set(USE_ARES ON) +endif() + +# SSPI +set(USE_WINDOWS_SSPI OFF) +if("sspi" IN_LIST FEATURES) + set(USE_WINDOWS_SSPI ON) +endif() + +# brotli +set(HAVE_BROTLI OFF) +if("brotli" IN_LIST FEATURES) + set(HAVE_BROTLI ON) +endif() + # UWP targets set(UWP_OPTIONS) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") @@ -101,6 +119,9 @@ vcpkg_configure_cmake( -DCMAKE_USE_SECTRANSP=${USE_SECTRANSP} -DCMAKE_USE_LIBSSH2=${USE_LIBSSH2} -DHTTP_ONLY=${USE_HTTP_ONLY} + -DENABLE_ARES=${USE_ARES} + -DCURL_WINDOWS_SSPI=${USE_WINDOWS_SSPI} + -DCURL_BROTLI=${HAVE_BROTLI} -DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON OPTIONS_RELEASE -DBUILD_CURL_EXE=${BUILD_CURL_EXE} From d33468bc671ada7d472fda14c5c87b2fed2a7ee5 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Mon, 8 Jul 2019 14:11:37 +0800 Subject: [PATCH 0132/1066] [aws-checksums]Upgrade version to 0.1.3 (#7154) --- ports/aws-checksums/CONTROL | 2 +- ports/aws-checksums/portfile.cmake | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ports/aws-checksums/CONTROL b/ports/aws-checksums/CONTROL index 67b14f8f5..19eb511f3 100644 --- a/ports/aws-checksums/CONTROL +++ b/ports/aws-checksums/CONTROL @@ -1,3 +1,3 @@ Source: aws-checksums -Version: 0.1.2 +Version: 0.1.3 Description: Cross-Platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations. diff --git a/ports/aws-checksums/portfile.cmake b/ports/aws-checksums/portfile.cmake index 6a409c09e..4ac746d7f 100644 --- a/ports/aws-checksums/portfile.cmake +++ b/ports/aws-checksums/portfile.cmake @@ -3,14 +3,21 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO awslabs/aws-checksums - REF v0.1.2 - SHA512 d924918fce5179e2f42c0aeb86cb3bfda22f92bf3950e179f248a8d3e72c05a4f1015982970fd4075bb687a0a6e03120eee2134c0f017ec8ef69ae066881aa0d + REF v0.1.3 + SHA512 79bf71a6c4c268b27efe8a6a3c4b90281da4ce7f6e4c1c62fce80b11a4756ecfd4dc2b19624ace3f54137113d0cb56a517de0b91dd6338ee8ca069756bca13f4 HEAD_REF master ) +if (VCPKG_CRT_LINKAGE STREQUAL static) + set(STATIC_CRT_LNK ON) +else() + set(STATIC_CRT_LNK OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DSTATIC_CRT=${STATIC_CRT_LNK} ) vcpkg_install_cmake() From 3fe88fd98820fc2a494ff41014b72a884daea11f Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Sun, 7 Jul 2019 23:16:14 -0700 Subject: [PATCH 0133/1066] [rapidjson] Update to the latest commit and also fix #3401. (#7152) --- ports/rapidjson/CONTROL | 6 +++--- ports/rapidjson/portfile.cmake | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/rapidjson/CONTROL b/ports/rapidjson/CONTROL index 02f7b5107..b3c0f60b5 100644 --- a/ports/rapidjson/CONTROL +++ b/ports/rapidjson/CONTROL @@ -1,4 +1,4 @@ Source: rapidjson -Version: 1.1.0-3 -Description: A fast JSON parser/generator for C++ with both SAX/DOM style API -Homepage: http://rapidjson.org/ +Version: d87b698 +Description: A fast JSON parser/generator for C++ with both SAX/DOM style API +Homepage: http://rapidjson.org/ \ No newline at end of file diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 2e3787857..4f3529f5b 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Tencent/rapidjson - REF v1.1.0 - SHA512 2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff + REF d87b698d0fcc10a5f632ecbc80a9cb2a8fa094a5 + SHA512 1770668c954e1bfa40da3956ccf2252703d2addb058bb8c0bf579abac585262452d0e15dcfed9ac2fa358c0da305d706226fdab8310b584017aba98e4f31db4f HEAD_REF master PATCHES arm64-endian.patch ) From 327494e9acfbfa247d49c3fa23de85af2c1859a0 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Mon, 8 Jul 2019 14:21:37 +0800 Subject: [PATCH 0134/1066] [freetype]Re-fixed the issue of exporting symbols when building dynamic library. (#7141) --- ports/freetype/0005-Fix-DLL-EXPORTS.patch | 17 ++++++------ ports/freetype/CONTROL | 2 +- ports/freetype/portfile.cmake | 33 ++++++++++------------- 3 files changed, 24 insertions(+), 28 deletions(-) diff --git a/ports/freetype/0005-Fix-DLL-EXPORTS.patch b/ports/freetype/0005-Fix-DLL-EXPORTS.patch index 96abaffb7..7ea02bbed 100644 --- a/ports/freetype/0005-Fix-DLL-EXPORTS.patch +++ b/ports/freetype/0005-Fix-DLL-EXPORTS.patch @@ -1,13 +1,14 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index dd8a878..75f9ab7 100644 +index ede5daf..46c1e55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -141,7 +141,7 @@ set(VERSION_PATCH "1") - # Increment REVISION. - set(LIBRARY_VERSION "6.16.0") - set(LIBRARY_SOVERSION "6") -- -+ADD_DEFINITIONS(-DDLL_EXPORT) - # These options mean "require x and complain if not found". They'll get +@@ -151,6 +151,9 @@ set(LIBRARY_SOVERSION "6") # optionally found anyway. Use `-DCMAKE_DISABLE_FIND_PACKAGE_x=TRUE` to disable # searching for a packge entirely (x is the CMake package name, so "BZip2" + # instead of "BZIP2"). ++if (ENABLE_DLL_EXPORT) ++ ADD_DEFINITIONS(-DDLL_EXPORT) ++endif() + option(FT_WITH_ZLIB "Use system zlib instead of internal library." OFF) + option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF) + option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF) diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL index 91116126d..3a52d3222 100644 --- a/ports/freetype/CONTROL +++ b/ports/freetype/CONTROL @@ -1,5 +1,5 @@ Source: freetype -Version: 2.10.0 +Version: 2.10.0-1 Build-Depends: zlib, bzip2, libpng Homepage: https://www.freetype.org/ Description: A library to render fonts. diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index 39d462a34..a5c2fde79 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -7,27 +7,21 @@ vcpkg_download_distfile(ARCHIVE SHA512 dfad66f419ea9577f09932e0730c0c887bdcbdbc8152fa7477a0c39d69a5b68476761deed6864ddcc5cf18d100a7a3f728049768e24afcb04b1a74b25b6acf7e ) +vcpkg_extract_source_archive_ex( +OUT_SOURCE_PATH SOURCE_PATH +ARCHIVE ${ARCHIVE} +REF ${FT_VERSION} +PATCHES + 0001-Fix-install-command.patch + 0002-Add-CONFIG_INSTALL_PATH-option.patch + 0003-Fix-UWP.patch + 0005-Fix-DLL-EXPORTS.patch +) + if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") - vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${FT_VERSION} - PATCHES - 0001-Fix-install-command.patch - 0002-Add-CONFIG_INSTALL_PATH-option.patch - 0003-Fix-UWP.patch - ) + set(ENABLE_DLL_EXPORT OFF) else() - vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${FT_VERSION} - PATCHES - 0001-Fix-install-command.patch - 0002-Add-CONFIG_INSTALL_PATH-option.patch - 0003-Fix-UWP.patch - 0005-Fix-DLL-EXPORTS.patch - ) + set(ENABLE_DLL_EXPORT ON) endif() vcpkg_configure_cmake( @@ -40,6 +34,7 @@ vcpkg_configure_cmake( -DFT_WITH_PNG=ON -DFT_WITH_HARFBUZZ=OFF -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE + -DENABLE_DLL_EXPORT=${ENABLE_DLL_EXPORT} ) vcpkg_install_cmake() From b77cd69e02bb81bb2bfe69a9341ac8e70ce25f61 Mon Sep 17 00:00:00 2001 From: mcgoo Date: Mon, 8 Jul 2019 02:59:43 -0400 Subject: [PATCH 0135/1066] allow disabling another piece of test infra which does not work on macos (#7012) --- ports/graphite2/disable-tests.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ports/graphite2/disable-tests.patch b/ports/graphite2/disable-tests.patch index d88c1cee5..ccb2ac822 100644 --- a/ports/graphite2/disable-tests.patch +++ b/ports/graphite2/disable-tests.patch @@ -16,3 +16,18 @@ index a4c648e..db90735 100644 set(version 3.0.1) set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 89a59af..c72be21 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -141,7 +141,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + LINKER_LANGUAGE C) + target_link_libraries(graphite2 c) + include(Graphite) +- nolib_test(stdc++ $) ++ if(NOT DISABLE_TESTS) ++ nolib_test(stdc++ $) ++ endif() + set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") + CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") + endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") From a502e9a7b7eceec8380ba7c71d6ab702e0d0520a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 9 Jul 2019 10:27:37 -0700 Subject: [PATCH 0136/1066] [czmq] Fix https://github.com/zeromq/czmq/issues/1780 (#7186) --- ports/czmq/CONTROL | 2 +- ports/czmq/fix-dependencies.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/czmq/CONTROL b/ports/czmq/CONTROL index a45a1a34c..55cba0bd4 100644 --- a/ports/czmq/CONTROL +++ b/ports/czmq/CONTROL @@ -1,5 +1,5 @@ Source: czmq -Version: 2019-06-10 +Version: 2019-06-10-1 Build-Depends: zeromq Description: High-level C binding for ZeroMQ Homepage: https://github.com/zeromq/czmq diff --git a/ports/czmq/fix-dependencies.patch b/ports/czmq/fix-dependencies.patch index 9756b6008..bb57247dc 100644 --- a/ports/czmq/fix-dependencies.patch +++ b/ports/czmq/fix-dependencies.patch @@ -9,7 +9,7 @@ index 9c15f36a..e1475cd6 100644 + +find_dependency(ZeroMQ) + -+if (@CZMQ_WITH_LIBCURL@ AND @LIBCURL_FOUND@) ++if ("@CZMQ_WITH_LIBCURL@" AND "@LIBCURL_FOUND@") + find_dependency(OpenSSL) + find_dependency(ZLIB) +endif () From 22bc820f5eb4057287f4af7d0e2974d0291dece4 Mon Sep 17 00:00:00 2001 From: Oliver Hitchcock Date: Tue, 9 Jul 2019 18:59:47 +0100 Subject: [PATCH 0137/1066] Update to llvm-8.0.0 (#7209) --- ports/llvm/CONTROL | 2 +- .../llvm/install-cmake-modules-to-share.patch | 12 +++++----- ports/llvm/portfile.cmake | 23 +++++++++++-------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index f700235a6..d7ee8524b 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,5 +1,5 @@ Source: llvm -Version: 7.0.0-3 +Version: 8.0.0 Homepage: https://llvm.org/ Description: The LLVM Compiler Infrastructure Build-Depends: atlmfc (windows) diff --git a/ports/llvm/install-cmake-modules-to-share.patch b/ports/llvm/install-cmake-modules-to-share.patch index 1a2b3b0db..0e789377a 100644 --- a/ports/llvm/install-cmake-modules-to-share.patch +++ b/ports/llvm/install-cmake-modules-to-share.patch @@ -1,15 +1,15 @@ -diff -urN llvm-7.0.0.src-orig/cmake/modules/CMakeLists.txt llvm-7.0.0.src/cmake/modules/CMakeLists.txt ---- llvm-7.0.0.src-orig/cmake/modules/CMakeLists.txt 2018-07-27 13:57:51.000000000 +0300 -+++ llvm-7.0.0.src/cmake/modules/CMakeLists.txt 2019-03-26 14:56:34.645434190 +0200 +diff -urN llvm-8.0.0.src-orig/cmake/modules/CMakeLists.txt llvm-8.0.0.src/cmake/modules/CMakeLists.txt +--- llvm-8.0.0.src-orig/cmake/modules/CMakeLists.txt 2018-07-27 13:57:51.000000000 +0300 ++++ llvm-8.0.0.src/cmake/modules/CMakeLists.txt 2019-03-26 14:56:34.645434190 +0200 @@ -1,4 +1,4 @@ -set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) +set(LLVM_INSTALL_PACKAGE_DIR share/llvm) set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") # First for users who use an installed LLVM, create the LLVMExports.cmake file. -diff -urN llvm-7.0.0.src-orig/tools/clang/cmake/modules/CMakeLists.txt llvm-7.0.0.src/tools/clang/cmake/modules/CMakeLists.txt ---- llvm-7.0.0.src-orig/tools/clang/cmake/modules/CMakeLists.txt 2018-01-24 21:26:50.000000000 +0200 -+++ llvm-7.0.0.src/tools/clang/cmake/modules/CMakeLists.txt 2019-03-26 14:57:07.173362736 +0200 +diff -urN llvm-8.0.0.src-orig/tools/clang/cmake/modules/CMakeLists.txt llvm-8.0.0.src/tools/clang/cmake/modules/CMakeLists.txt +--- llvm-8.0.0.src-orig/tools/clang/cmake/modules/CMakeLists.txt 2018-01-24 21:26:50.000000000 +0200 ++++ llvm-8.0.0.src/tools/clang/cmake/modules/CMakeLists.txt 2019-03-26 14:57:07.173362736 +0200 @@ -1,11 +1,11 @@ # Generate a list of CMake library targets so that other CMake projects can # link against them. LLVM calls its version of this file LLVMExports.cmake, but diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 1828ea86e..891e41738 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -7,23 +7,23 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-7.0.0.src) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-8.0.0.src) vcpkg_download_distfile(ARCHIVE - URLS "http://releases.llvm.org/7.0.0/llvm-7.0.0.src.tar.xz" - FILENAME "llvm-7.0.0.src.tar.xz" - SHA512 bdc9b851c158b17e1bbeb7ac5ae49821bfb1251a3826fe8a3932cd1a43f9fb0d620c3de67150c1d9297bf0b86fa917e75978da29c3f751b277866dc90395abec + URLS "http://releases.llvm.org/8.0.0/llvm-8.0.0.src.tar.xz" + FILENAME "llvm-8.0.0.src.tar.xz" + SHA512 1602343b451b964f5d8c2d6b0654d89384c80d45883498c5f0e2f4196168dd4a1ed2a4dadb752076020243df42ffe46cb31d82ffc145d8e5874163cbb9686a1f ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_download_distfile(CLANG_ARCHIVE - URLS "http://releases.llvm.org/7.0.0/cfe-7.0.0.src.tar.xz" - FILENAME "cfe-7.0.0.src.tar.xz" - SHA512 17a658032a0160c57d4dc23cb45a1516a897e0e2ba4ebff29472e471feca04c5b68cff351cdf231b42aab0cff587b84fe11b921d1ca7194a90e6485913d62cb7 + URLS "http://releases.llvm.org/8.0.0/cfe-8.0.0.src.tar.xz" + FILENAME "cfe-8.0.0.src.tar.xz" + SHA512 98e540222719716985e5d8439116e47469cb01201ea91d1da7e46cb6633da099688d9352c3b65e5c5f660cbbae353b3d79bb803fc66b3be663f2b04b1feed1c3 ) vcpkg_extract_source_archive(${CLANG_ARCHIVE} ${SOURCE_PATH}/tools) if(NOT EXISTS ${SOURCE_PATH}/tools/clang) - file(RENAME ${SOURCE_PATH}/tools/cfe-7.0.0.src ${SOURCE_PATH}/tools/clang) + file(RENAME ${SOURCE_PATH}/tools/cfe-8.0.0.src ${SOURCE_PATH}/tools/clang) endif() vcpkg_apply_patches( @@ -101,11 +101,16 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/BinaryFormat/WasmRelocs ) -# Remove one empty include subdirectory if it is indeed empty +# Remove two empty include subdirectorys if they are indeed empty file(GLOB MCANALYSISFILES ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis/*) if(NOT MCANALYSISFILES) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis) endif() +file(GLOB MACHOFILES ${CURRENT_PACKAGES_DIR}/include/llvm/TextAPI/MachO/*) +if(NOT MACHOFILES) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/TextAPI/MachO) +endif() + # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm RENAME copyright) From 503521b77d6fb23b41f5e7d3446ec4c0755c2d58 Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Wed, 10 Jul 2019 02:34:48 +0800 Subject: [PATCH 0138/1066] [reproc] Fix reproc++ installation path (#7208) --- ports/reproc/CONTROL | 2 +- ports/reproc/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/reproc/CONTROL b/ports/reproc/CONTROL index d55102f55..07bf0e6ec 100644 --- a/ports/reproc/CONTROL +++ b/ports/reproc/CONTROL @@ -1,3 +1,3 @@ Source: reproc -Version: 6.0.0-1 +Version: 6.0.0-2 Description: Cross-platform library that simplifies working with external CLI applications from C and C++ diff --git a/ports/reproc/portfile.cmake b/ports/reproc/portfile.cmake index e263c194c..f569340df 100644 --- a/ports/reproc/portfile.cmake +++ b/ports/reproc/portfile.cmake @@ -20,8 +20,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(GLOB REPROC_CMAKE_FILES ${CURRENT_PACKAGES_DIR}/lib/cmake/reproc++/*) -file(COPY ${REPROC_CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/cmake/reproc) - +file(INSTALL ${REPROC_CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/reproc++) +file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/reproc++/reproc++-targets-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/reproc++) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/reproc) # Debug From e5d7cc9160b929e8609b43a7bda5ad0e9323be75 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 9 Jul 2019 11:35:43 -0700 Subject: [PATCH 0139/1066] [wil] Update (#7215) --- ports/wil/CONTROL | 2 +- ports/wil/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/wil/CONTROL b/ports/wil/CONTROL index 8b589c8af..27f4a6aeb 100644 --- a/ports/wil/CONTROL +++ b/ports/wil/CONTROL @@ -1,3 +1,3 @@ Source: wil -Version: 2019-06-10 +Version: 2019-07-09 Description: The Windows Implementation Libraries (WIL) is a header-only C++ library created to make life easier for developers on Windows through readable type-safe C++ interfaces for common Windows coding patterns. \ No newline at end of file diff --git a/ports/wil/portfile.cmake b/ports/wil/portfile.cmake index c54e097ca..3a9dfe6b6 100644 --- a/ports/wil/portfile.cmake +++ b/ports/wil/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/wil - REF 607e3c44797e18ae050907114601a31883489254 - SHA512 78d14f48a0d6629d72b6007e20ce4a14855667d0f9f8240b66a8cc135e079fca97926db6fc18852cd932f80b1b5a55c08cb48ca999fa9327f7e9c0586ea3ecc7 + REF 8bfcc43efc91ec3a4d8dfa8fd74f4025bded363f + SHA512 301bf129e064cf5de4b0d19cf5e35e195c68ecb8800df0334729083929b097f7d5d425437f7214aec1eb29f694c5613eb26332bc5a72fbaff37d9057f61c7692 HEAD_REF master ) From 374806d6597d88bfeb6801858bbc9cf91e34b0ca Mon Sep 17 00:00:00 2001 From: zhbanito Date: Tue, 9 Jul 2019 21:42:30 +0300 Subject: [PATCH 0140/1066] [tesseract] Fix Port. Making it crossplatform (#7144) --- ports/tesseract/portfile.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/tesseract/portfile.cmake b/ports/tesseract/portfile.cmake index 18b63cab6..9650db44a 100644 --- a/ports/tesseract/portfile.cmake +++ b/ports/tesseract/portfile.cmake @@ -31,7 +31,11 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) # Install tool file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/tesseract) -file(COPY ${CURRENT_PACKAGES_DIR}/bin/tesseract.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tesseract) +set(EXTENSION) +if(WIN32) + set(EXTENSION ".exe") +endif() +file(COPY ${CURRENT_PACKAGES_DIR}/bin/tesseract${EXTENSION} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tesseract) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/tesseract) vcpkg_copy_pdbs() From 71214e6a2940efba0a996eb08f1864a6ae88e9ca Mon Sep 17 00:00:00 2001 From: tarcila Date: Tue, 9 Jul 2019 15:33:53 -0400 Subject: [PATCH 0141/1066] [corrade] Workaroud for vs 2017 is still applicable for vs 2019 (#7025) Fixes compilation issue due to ambiguous declaration in ArrayView class. --- ports/corrade/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index c9e0321dd..336cda6e3 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -32,6 +32,7 @@ vcpkg_configure_cmake( OPTIONS -DDUTILITY_USE_ANSI_COLORS=ON -DBUILD_STATIC=${BUILD_STATIC} + -DCORRADE_MSVC2017_COMPATIBILITY=ON ${_COMPONENT_FLAGS} ) From 277393703d9ec1af7e20d2f75483930833778b45 Mon Sep 17 00:00:00 2001 From: tarcila Date: Tue, 9 Jul 2019 15:37:38 -0400 Subject: [PATCH 0142/1066] [magnum] Enable egl and glx for magnum (#7026) --- ports/magnum/CONTROL | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 44acd700e..cc0720af9 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -132,3 +132,19 @@ Build-Depends: magnum[gl] Feature: wglcontext Description: WglContext library Build-Depends: magnum[gl] + +Feature: windowlesseglapplication +Description: WindowlessEglApplication library +Build-Depends: magnum[gl] + +Feature: eglcontext +Description: EglContext library +Build-Depends: magnum[gl] + +Feature: windowlessglxapplication +Description: WindowlessGlxApplication library +Build-Depends: magnum[gl] + +Feature: glxcontext +Description: GlxContext library +Build-Depends: magnum[gl] From 15c59be137359de9c89acac57270c4e6bb1aa7f6 Mon Sep 17 00:00:00 2001 From: SvenPStarFinanz Date: Tue, 9 Jul 2019 21:46:45 +0200 Subject: [PATCH 0143/1066] [xmlsec] Add a new port (#7168) (#7196) * [xmlsec] Add a new port (#7168) * [xmlsec] Fix missing iconv on x64-osx --- ports/xmlsec/0001-uwp-fix.patch | 20 +++++ ports/xmlsec/CMakeLists.txt | 152 ++++++++++++++++++++++++++++++++ ports/xmlsec/CONTROL | 5 ++ ports/xmlsec/portfile.cmake | 27 ++++++ 4 files changed, 204 insertions(+) create mode 100644 ports/xmlsec/0001-uwp-fix.patch create mode 100644 ports/xmlsec/CMakeLists.txt create mode 100644 ports/xmlsec/CONTROL create mode 100644 ports/xmlsec/portfile.cmake diff --git a/ports/xmlsec/0001-uwp-fix.patch b/ports/xmlsec/0001-uwp-fix.patch new file mode 100644 index 000000000..f48cbf589 --- /dev/null +++ b/ports/xmlsec/0001-uwp-fix.patch @@ -0,0 +1,20 @@ +diff --git a/src/dl.c b/src/dl.c +index b13f9d4..4a1b0c1 100644 +--- a/src/dl.c ++++ b/src/dl.c +@@ -148,7 +148,14 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) { + #endif /* XMLSEC_DL_LIBLTDL */ + + #ifdef XMLSEC_DL_WIN32 +- lib->handle = LoadLibraryA((char*)lib->filename); ++#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP ++ lib->handle = LoadLibraryA((char*)lib->filename); ++#else ++ LPTSTR wcLib = NULL; ++ wcLib = xmlSecWin32ConvertUtf8ToTstr((char*)lib->filename); ++ if (wcLib) ++ lib->handle = LoadPackagedLibrary(wcLib, 0); ++#endif + if(lib->handle == NULL) { + xmlSecIOError("LoadLibraryA", lib->filename, NULL); + xmlSecCryptoDLLibraryDestroy(lib); diff --git a/ports/xmlsec/CMakeLists.txt b/ports/xmlsec/CMakeLists.txt new file mode 100644 index 000000000..75b10f887 --- /dev/null +++ b/ports/xmlsec/CMakeLists.txt @@ -0,0 +1,152 @@ +cmake_minimum_required (VERSION 3.8) +project (xmlsec C) + +option(INSTALL_HEADERS_TOOLS "Install public header files and tools" ON) + +set(CMAKE_SHARED_LIBRARY_PREFIX) +set(CMAKE_STATIC_LIBRARY_PREFIX) + +find_package(LibXml2 REQUIRED) +find_package(OpenSSL REQUIRED) +find_package(unofficial-iconv REQUIRED) + +FILE(GLOB SOURCESXMLSEC + src/*.c +) + +FILE(GLOB SOURCESXMLSECOPENSSL + src/openssl/*.c + src/strings.c +) + +# Generate xmlexports with fixed definition of XMLSEC_STATIC +file(READ include/xmlsec/exports.h EXPORTS_H) +if(BUILD_SHARED_LIBS) + string(REPLACE "!defined(XMLSEC_STATIC)" "1" EXPORTS_H "${EXPORTS_H}") +else() + string(REPLACE "!defined(XMLSEC_STATIC)" "0" EXPORTS_H "${EXPORTS_H}") +endif() +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/exports.h "${EXPORTS_H}") + +message(STATUS "Reading version info from configure.ac") + +file(STRINGS "configure.ac" + _xmlsec_version_defines REGEX "XMLSEC_VERSION_(MAJOR|MINOR|SUBMINOR)=([0-9]+)$") + +foreach(ver ${_xmlsec_version_defines}) + if(ver MATCHES "XMLSEC_VERSION_(MAJOR|MINOR|SUBMINOR)=([0-9]+)$") + set(XMLSEC_VERSION_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" CACHE INTERNAL "") + endif() +endforeach() + +set(XMLSEC_VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}.${XMLSEC_VERSION_SUBMINOR}) +math(EXPR XMLSEC_VERSION_INFO_NUMBER + "${XMLSEC_VERSION_MAJOR} + ${XMLSEC_VERSION_MINOR}") +set(XMLSEC_VERSION_INFO ${XMLSEC_VERSION_INFO_NUMBER}:${XMLSEC_VERSION_SUBMINOR}:${XMLSEC_VERSION_MINOR}) + +message(STATUS "XMLSEC_VERSION: ${XMLSEC_VERSION}") +message(STATUS "XMLSEC_VERSION_MAJOR: ${XMLSEC_VERSION_MAJOR}") +message(STATUS "XMLSEC_VERSION_MINOR: ${XMLSEC_VERSION_MINOR}") +message(STATUS "XMLSEC_VERSION_SUBMINOR: ${XMLSEC_VERSION_SUBMINOR}") +message(STATUS "XMLSEC_VERSION_INFO: ${XMLSEC_VERSION_INFO}") + +message(STATUS "Generating version.h") + +configure_file(include/xmlsec/version.h.in include/xmlsec/version.h) + +if(MSVC) + add_compile_options(/wd4130 /wd4127 /wd4152) +endif() + +add_library(libxmlsec ${SOURCESXMLSEC}) +add_library(libxmlsec-openssl ${SOURCESXMLSECOPENSSL}) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBXML2_INCLUDE_DIRS}) + +target_link_libraries(libxmlsec PRIVATE + ${LIBXML2_LIBRARIES} OpenSSL::SSL +) +target_link_libraries(libxmlsec-openssl PRIVATE + ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec +) + +add_compile_definitions(inline=__inline) +add_compile_definitions(PACKAGE="xmlsec") +add_compile_definitions(XMLSEC_MSCRYPTO_NT4=1) +add_compile_definitions(HAVE_STDIO_H) +add_compile_definitions(HAVE_STDLIB_H) +add_compile_definitions(HAVE_STRING_H) +add_compile_definitions(HAVE_CTYPE_H) +add_compile_definitions(HAVE_MALLOC_H) +add_compile_definitions(HAVE_MEMORY_H) +add_compile_definitions(XMLSEC_NO_XSLT=1) +add_compile_definitions(XMLSEC_DEFAULT_CRYPTO="openssl") +add_compile_definitions(XMLSEC_NO_GOST) +add_compile_definitions(XMLSEC_NO_GOST2012) +add_compile_definitions(XMLSEC_NO_SIZE_T) +add_compile_definitions(UNICODE) +add_compile_definitions(_UNICODE) +add_compile_definitions(_MBCS) +add_compile_definitions(_REENTRANT) + +target_compile_definitions(libxmlsec-openssl PRIVATE + -DXMLSEC_CRYPTO_OPENSSL +) + +set_target_properties(libxmlsec PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}) +set_target_properties(libxmlsec-openssl PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}) + +if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(libxmlsec PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING) + target_compile_definitions(libxmlsec-openssl PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING) +else() + target_compile_definitions(libxmlsec PRIVATE -DXMLSEC_DL_WIN32) + target_compile_definitions(libxmlsec-openssl PRIVATE -DXMLSEC_DL_WIN32) +endif() + +install(TARGETS libxmlsec libxmlsec-openssl + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(INSTALL_HEADERS_TOOLS) + file(GLOB PUBLIC_HEADERS + include/xmlsec/*.h + include/xmlsec/openssl/*.h) + list(FILTER PUBLIC_HEADERS EXCLUDE REGEX "exports\\.h$") + + foreach(file IN LISTS PUBLIC_HEADERS) + get_filename_component(dir ${file} DIRECTORY) + file(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR}/xmlsec/${LIB} ${dir}) + install(FILES ${file} DESTINATION "include/${rel_dir}") + endforeach() + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/xmlsec/version.h DESTINATION "include/xmlsec") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/exports.h DESTINATION "include/xmlsec") + + # xmlsec application + add_executable(xmlsec + apps/crypto.c + apps/cmdline.c + apps/xmlsec.c) + + if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + target_link_libraries(xmlsec PRIVATE crypt32.lib) + endif() + + target_link_libraries(xmlsec PRIVATE + ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec libxmlsec-openssl unofficial::iconv::libiconv + ) + + target_compile_definitions(xmlsec PRIVATE + -DXMLSEC_CRYPTO_OPENSSL + ) + + if(BUILD_SHARED_LIBS) + target_compile_definitions(xmlsec PRIVATE -DXMLSEC_CRYPTO_DYNAMIC_LOADING) + else() + target_compile_definitions(xmlsec PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC) + endif() + install(TARGETS xmlsec DESTINATION tools/xmlsec) +endif() diff --git a/ports/xmlsec/CONTROL b/ports/xmlsec/CONTROL new file mode 100644 index 000000000..ea122c78e --- /dev/null +++ b/ports/xmlsec/CONTROL @@ -0,0 +1,5 @@ +Source: xmlsec +Version: 1.2.28 +Homepage: https://www.aleksey.com/xmlsec/ +Description: XML Security Library is a C library based on LibXML2. The library supports major XML security standards. +Build-Depends: libxml2, openssl diff --git a/ports/xmlsec/portfile.cmake b/ports/xmlsec/portfile.cmake new file mode 100644 index 000000000..4a29ae19a --- /dev/null +++ b/ports/xmlsec/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lsh123/xmlsec + REF xmlsec-1_2_28 + SHA512 fb0c775f6455ce5a5579a69bb91d60fe90c023e538c32bdf2a70aa413a53b22ef938349a3ce6b42bb23f8f70b4e00f1b9917f877487bb1507c927ec70c3d95f5 + HEAD_REF master + PATCHES + 0001-uwp-fix.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DPORT_DIR=${CMAKE_CURRENT_LIST_DIR} + OPTIONS_DEBUG -DINSTALL_HEADERS_TOOLS=OFF +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() From a3694e501a720e9f8b51774cd0a7c28831477cac Mon Sep 17 00:00:00 2001 From: myd7349 Date: Wed, 10 Jul 2019 03:49:38 +0800 Subject: [PATCH 0144/1066] [zeromq] Update to 4.3.2 (#7203) * [zeromq] Update to 4.3.2 * [zeromq] Update to 2019-07-09 --- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 32 ++++++++++---------------- ports/zeromq/vcpkg-cmake-wrapper.cmake | 9 ++++++++ 3 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 ports/zeromq/vcpkg-cmake-wrapper.cmake diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 24796e155..4a638759d 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,5 +1,5 @@ Source: zeromq -Version: 2019-05-07 +Version: 2019-07-09 Homepage: https://github.com/zeromq/libzmq Description: The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products diff --git a/ports/zeromq/portfile.cmake b/ports/zeromq/portfile.cmake index 06b5d3aee..381bbccee 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,22 +3,15 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF f41f51461fd86f2272209a3175d1df0e655883ef - SHA512 ee37cda1e86063fc4f9edfc2ae27246d7919f59efe90532944f299b03478d53d8708eb18be824d3885c96ca38917e1f6f72a941845c9b376ddda7ee1fd42cfac + REF b5db4b4421c8b2766321e70e5e9ca07c197fac47 + SHA512 e1166b9eec3c0613c2b085bf995e6d711554ba77e180f7b86aa2d04157f2ab7dca8131b855568f8fc931ac256628f6018e6bc67bc9fbecfd498776b4151d6e63 HEAD_REF master ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) -set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} \"-I${SOURCE_PATH}/builds/msvc\"") -set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} \"-I${SOURCE_PATH}/builds/msvc\"") - -if("sodium" IN_LIST FEATURES) - set(WITH_LIBSODIUM ON) -else() - set(WITH_LIBSODIUM OFF) -endif() +vcpkg_check_features(sodium WITH_LIBSODIUM) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -45,6 +38,11 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/ZeroMQ) vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) endif() +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/zmq.h "defined ZMQ_STATIC" @@ -52,20 +50,14 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") ) endif() -file(READ ${CURRENT_PACKAGES_DIR}/share/zeromq/ZeroMQConfig.cmake _contents) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - string(REPLACE "get_target_property(ZeroMQ_STATIC_LIBRARY libzmq-static LOCATION)" "add_library(libzmq-static INTERFACE IMPORTED)\nset_target_properties(libzmq-static PROPERTIES INTERFACE_LINK_LIBRARIES libzmq)" _contents "${_contents}") - set(_contents "${_contents}\nset(ZeroMQ_STATIC_LIBRARY \${ZeroMQ_LIBRARY})\n") -else() - string(REPLACE "get_target_property(ZeroMQ_INCLUDE_DIR libzmq INTERFACE_INCLUDE_DIRECTORIES)" "get_target_property(ZeroMQ_INCLUDE_DIR libzmq-static INTERFACE_INCLUDE_DIRECTORIES)" _contents "${_contents}") - string(REPLACE "get_target_property(ZeroMQ_LIBRARY libzmq LOCATION)" "add_library(libzmq INTERFACE IMPORTED)\nset_target_properties(libzmq PROPERTIES INTERFACE_LINK_LIBRARIES libzmq-static)" _contents "${_contents}") - set(_contents "${_contents}\nset(ZeroMQ_LIBRARY \${ZeroMQ_STATIC_LIBRARY})\n") - +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/share/zeromq/ZeroMQConfig.cmake "${_contents}") # Handle copyright file(RENAME ${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt ${CURRENT_PACKAGES_DIR}/share/zeromq/copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/zmq) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ZeroMQ) diff --git a/ports/zeromq/vcpkg-cmake-wrapper.cmake b/ports/zeromq/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..38b05d779 --- /dev/null +++ b/ports/zeromq/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET libzmq AND NOT TARGET libzmq-static) + add_library(libzmq-static INTERFACE IMPORTED) + set_target_properties(libzmq-static PROPERTIES INTERFACE_LINK_LIBRARIES libzmq) +elseif(TARGET libzmq-static AND NOT TARGET libzmq) + add_library(libzmq INTERFACE IMPORTED) + set_target_properties(libzmq PROPERTIES INTERFACE_LINK_LIBRARIES libzmq-static) +endif() From a15e2446faadd558171cd08f352bf51cb659d13a Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Wed, 10 Jul 2019 03:53:06 +0800 Subject: [PATCH 0145/1066] [spirv-tools] Fix removed patch (#7204) --- ports/spirv-tools/CMake-targets.patch | 91 +++++++++++++++++++++++++++ ports/spirv-tools/CONTROL | 2 +- ports/spirv-tools/portfile.cmake | 1 + 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 ports/spirv-tools/CMake-targets.patch diff --git a/ports/spirv-tools/CMake-targets.patch b/ports/spirv-tools/CMake-targets.patch new file mode 100644 index 000000000..d3870f8c8 --- /dev/null +++ b/ports/spirv-tools/CMake-targets.patch @@ -0,0 +1,91 @@ +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 1f96018..c9a3758 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -337,7 +337,7 @@ spvtools_pch(SPIRV_SOURCES pch_source) + add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES}) + spvtools_default_compile_options(${SPIRV_TOOLS}) + target_include_directories(${SPIRV_TOOLS} +- PUBLIC ${spirv-tools_SOURCE_DIR}/include ++ PUBLIC "$" + PRIVATE ${spirv-tools_BINARY_DIR} + PRIVATE ${SPIRV_HEADER_INCLUDE_DIR} + ) +@@ -370,10 +370,20 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + endif() + + if(ENABLE_SPIRV_TOOLS_INSTALL) +- install(TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared ++ install(TARGETS ${SPIRV_TOOLS} EXPORT spirv-tools-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ export( ++ TARGETS ${SPIRV_TOOLS} ++ NAMESPACE spirv-tools:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-config.cmake" ++ ) ++ install( ++ EXPORT spirv-tools-config ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/spirv-tools" ++ NAMESPACE spirv-tools:: ++ ) + endif(ENABLE_SPIRV_TOOLS_INSTALL) + + if(MSVC) +diff --git a/source/link/CMakeLists.txt b/source/link/CMakeLists.txt +index 8ca4df3..ac0aa62 100644 +--- a/source/link/CMakeLists.txt ++++ b/source/link/CMakeLists.txt +@@ -17,7 +17,7 @@ add_library(SPIRV-Tools-link + + spvtools_default_compile_options(SPIRV-Tools-link) + target_include_directories(SPIRV-Tools-link +- PUBLIC ${spirv-tools_SOURCE_DIR}/include ++ PUBLIC "$" + PUBLIC ${SPIRV_HEADER_INCLUDE_DIR} + PRIVATE ${spirv-tools_BINARY_DIR} + ) +@@ -29,8 +29,13 @@ set_property(TARGET SPIRV-Tools-link PROPERTY FOLDER "SPIRV-Tools libraries") + spvtools_check_symbol_exports(SPIRV-Tools-link) + + if(ENABLE_SPIRV_TOOLS_INSTALL) +- install(TARGETS SPIRV-Tools-link ++ install(TARGETS SPIRV-Tools-link EXPORT spirv-tools-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ export( ++ TARGETS ${SPIRV_TOOLS}-link ++ NAMESPACE spirv-tools:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-link-config.cmake" ++ ) + endif(ENABLE_SPIRV_TOOLS_INSTALL) +diff --git a/source/opt/CMakeLists.txt b/source/opt/CMakeLists.txt +index b02485a..111ce3c 100644 +--- a/source/opt/CMakeLists.txt ++++ b/source/opt/CMakeLists.txt +@@ -221,7 +221,7 @@ add_library(SPIRV-Tools-opt ${SPIRV_TOOLS_OPT_SOURCES}) + + spvtools_default_compile_options(SPIRV-Tools-opt) + target_include_directories(SPIRV-Tools-opt +- PUBLIC ${spirv-tools_SOURCE_DIR}/include ++ PUBLIC "$" + PUBLIC ${SPIRV_HEADER_INCLUDE_DIR} + PRIVATE ${spirv-tools_BINARY_DIR} + ) +@@ -233,8 +233,13 @@ set_property(TARGET SPIRV-Tools-opt PROPERTY FOLDER "SPIRV-Tools libraries") + spvtools_check_symbol_exports(SPIRV-Tools-opt) + + if(ENABLE_SPIRV_TOOLS_INSTALL) +- install(TARGETS SPIRV-Tools-opt ++ install(TARGETS SPIRV-Tools-opt EXPORT spirv-tools-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ export( ++ TARGETS ${SPIRV_TOOLS}-opt ++ NAMESPACE spirv-tools:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-opt-config.cmake" ++ ) + endif(ENABLE_SPIRV_TOOLS_INSTALL) diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index b873c5493..154783ca2 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,5 +1,5 @@ Source: spirv-tools -Version: 2019.3-dev +Version: 2019.3-dev-1 Homepage: https://github.com/KhronosGroup/SPIRV-Tools Description: API and commands for processing SPIR-V modules Build-Depends: spirv-headers \ No newline at end of file diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index 0cc6f79dd..59cf97591 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( SHA512 7179751b0216368b4a4bf8c9b0c1c1e3b17d6aa4788b4aeaa7fbb2b6d9d50b34cf209082f3531a2e0994b5fc02416373666d4d12cee282cec2c3d02c13a640a8 PATCHES comment-distutils.patch + CMake-targets.patch ) vcpkg_find_acquire_program(PYTHON3) From 7f80c0e2d311c7ff2453bdd558e4e7fd91cea872 Mon Sep 17 00:00:00 2001 From: gnaggnoyil Date: Wed, 10 Jul 2019 04:02:48 +0800 Subject: [PATCH 0146/1066] Make handle features (#6797) --- toolsrc/include/vcpkg/base/util.h | 9 ++++ toolsrc/src/vcpkg/commands.dependinfo.cpp | 61 +++++++++++++++++++++-- 2 files changed, 67 insertions(+), 3 deletions(-) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 213adb67c..e629ef0b2 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -6,9 +6,18 @@ #include #include #include +#include namespace vcpkg::Util { + template + constexpr std::add_const_t& as_const(T& t) noexcept + { + return t; + } + template + void as_const(const T&&) = delete; + template using ElementT = std::remove_reference_t::iterator>())>; diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index c0800a4b5..8394e0166 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -6,6 +6,10 @@ #include #include #include +#include + +#include +#include #include using vcpkg::Dependencies::PathsPortFileProvider; @@ -130,14 +134,29 @@ namespace vcpkg::Commands::DependInfo const std::vector& source_control_files, const std::unordered_set& switches) { + auto maybe_requested_spec = ParsedSpecifier::from_string(requested_package); + // TODO: move this check to the top-level invocation of this function since + // argument `requested_package` shall always be valid in inner-level invocation. + if (!maybe_requested_spec.has_value()) + { + System::print2(System::Color::warning, + "'", + requested_package, + "' is not a valid package specifier: ", + vcpkg::to_string(maybe_requested_spec.error()), + "\n"); + return; + } + auto requested_spec = maybe_requested_spec.get(); + const auto source_control_file = - Util::find_if(source_control_files, [&requested_package](const auto& source_control_file) { - return source_control_file->core_paragraph->name == requested_package; + Util::find_if(source_control_files, [&requested_spec](const auto& source_control_file) { + return source_control_file->core_paragraph->name == requested_spec->name; }); if (source_control_file != source_control_files.end()) { - const auto new_package = packages_to_keep.insert(requested_package).second; + const auto new_package = packages_to_keep.insert(requested_spec->name).second; if (new_package && !Util::Sets::contains(switches, OPTION_NO_RECURSE)) { @@ -145,6 +164,42 @@ namespace vcpkg::Commands::DependInfo { build_dependencies_list(packages_to_keep, dependency.depend.name, source_control_files, switches); } + + // Collect features with `*` considered + std::set collected_features; + for (const auto& requested_feature_name : requested_spec->features) + { + if (requested_feature_name == "*") + { + for (auto &&feature_paragraph : (*source_control_file)->feature_paragraphs) + { + collected_features.insert(std::addressof(Util::as_const(*feature_paragraph))); + } + continue; + } + auto maybe_feature = (*source_control_file)->find_feature(requested_feature_name); + if (auto &&feature_paragraph = maybe_feature.get()) + { + collected_features.insert(std::addressof(Util::as_const(*feature_paragraph))); + } + else + { + System::print2(System::Color::warning, + "dependency '", + requested_feature_name, + "' of package '", + requested_spec->name, + "' does not exist\n"); + continue; + } + } + for (auto feature_paragraph : collected_features) + { + for (const auto& dependency : feature_paragraph->depends) + { + build_dependencies_list(packages_to_keep, dependency.depend.name, source_control_files, switches); + } + } } } else From e7aafb7742ef299094183df5bc20cc17b504366d Mon Sep 17 00:00:00 2001 From: YenForYang Date: Tue, 9 Jul 2019 16:53:48 -0500 Subject: [PATCH 0147/1066] Cleanup vcpkg_configure_cmake.cmake (#6792) --- scripts/cmake/vcpkg_configure_cmake.cmake | 170 +++++++++++----------- 1 file changed, 89 insertions(+), 81 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index ab93c3075..37362a5a2 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -17,20 +17,22 @@ ## ## ## Parameters ## ### SOURCE_PATH -## Specifies the directory containing the `CMakeLists.txt`. By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +## Specifies the directory containing the `CMakeLists.txt`. +## By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. ## ## ### PREFER_NINJA -## Indicates that, when available, Vcpkg should use Ninja to perform the build. This should be specified unless the port is known to not work under Ninja. +## Indicates that, when available, Vcpkg should use Ninja to perform the build. +## This should be specified unless the port is known to not work under Ninja. ## ## ### DISABLE_PARALLEL_CONFIGURE ## Disables running the CMake configure step in parallel. -## ## This is needed for libraries which write back into their source directory during configure. ## ## ### GENERATOR ## Specifies the precise generator to use. ## -## This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build. If used for this purpose, it should be set to "NMake Makefiles". +## This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build. +## If used for this purpose, it should be set to "NMake Makefiles". ## ## ### OPTIONS ## Additional options passed to CMake during the configuration. @@ -51,31 +53,41 @@ ## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) ## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) function(vcpkg_configure_cmake) - cmake_parse_arguments(_csc "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + cmake_parse_arguments(_csc + "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG" + "SOURCE_PATH;GENERATOR" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" + ${ARGN} + ) if(NOT VCPKG_PLATFORM_TOOLSET) - message(FATAL_ERROR "Vcpkg has been updated with VS2017 support, however you need to rebuild vcpkg.exe by re-running bootstrap-vcpkg.bat\n") - endif() - - if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) - set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) - else() - set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) + message(FATAL_ERROR "Vcpkg has been updated with VS2017 support; " + "however, vcpkg.exe must be rebuilt by re-running bootstrap-vcpkg.bat\n") endif() if(CMAKE_HOST_WIN32) set(_PATHSEP ";") + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) + endif() else() set(_PATHSEP ":") endif() set(NINJA_CAN_BE_USED ON) # Ninja as generator set(NINJA_HOST ON) # Ninja as parallel configurator + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(_TARGETTING_UWP 1) + endif() + if(_csc_HOST_ARCHITECTURE STREQUAL "x86") # Prebuilt ninja binaries are only provided for x64 hosts set(NINJA_CAN_BE_USED OFF) set(NINJA_HOST OFF) - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + elseif(_TARGETTING_UWP) # Ninja and MSBuild have many differences when targetting UWP, so use MSBuild to maximize existing compatibility set(NINJA_CAN_BE_USED OFF) endif() @@ -84,43 +96,43 @@ function(vcpkg_configure_cmake) set(GENERATOR ${_csc_GENERATOR}) elseif(_csc_PREFER_NINJA AND NINJA_CAN_BE_USED) set(GENERATOR "Ninja") - elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) + elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT _TARGETTING_UWP)) set(GENERATOR "Ninja") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v120") set(GENERATOR "Visual Studio 12 2013") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v120") set(GENERATOR "Visual Studio 12 2013 Win64") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v120") set(GENERATOR "Visual Studio 12 2013 ARM") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v140") set(GENERATOR "Visual Studio 14 2015 ARM") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v141") set(GENERATOR "Visual Studio 15 2017") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v141") set(GENERATOR "Visual Studio 15 2017 ARM") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v141") set(GENERATOR "Visual Studio 15 2017") set(ARCH "ARM64") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v142") set(GENERATOR "Visual Studio 16 2019") set(ARCH "Win32") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v142") set(GENERATOR "Visual Studio 16 2019") set(ARCH "x64") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v142") set(GENERATOR "Visual Studio 16 2019") set(ARCH "ARM") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v142") set(GENERATOR "Visual Studio 16 2019") set(ARCH "ARM64") @@ -128,7 +140,8 @@ function(vcpkg_configure_cmake) if(NOT VCPKG_CMAKE_SYSTEM_NAME) set(VCPKG_CMAKE_SYSTEM_NAME Windows) endif() - message(FATAL_ERROR "Unable to determine appropriate generator for: ${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}") + message(FATAL_ERROR "Unable to determine appropriate generator for: " + "${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}") endif() # If we use Ninja, make sure it's on PATH @@ -143,10 +156,11 @@ function(vcpkg_configure_cmake) if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + if(_TARGETTING_UWP AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) endif() endif() + if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") endif() @@ -156,46 +170,43 @@ function(vcpkg_configure_cmake) elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) else() - message(FATAL_ERROR "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". It must be \"static\" or \"dynamic\"") - endif() - - if((NOT DEFINED VCPKG_CXX_FLAGS_DEBUG AND NOT DEFINED VCPKG_C_FLAGS_DEBUG) OR - (DEFINED VCPKG_CXX_FLAGS_DEBUG AND DEFINED VCPKG_C_FLAGS_DEBUG)) - else() - message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS_DEBUG and VCPKG_C_FLAGS_DEBUG") - endif() - if((NOT DEFINED VCPKG_CXX_FLAGS_RELEASE AND NOT DEFINED VCPKG_C_FLAGS_RELEASE) OR - (DEFINED VCPKG_CXX_FLAGS_RELEASE AND DEFINED VCPKG_C_FLAGS_RELEASE)) - else() - message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS_RELEASE and VCPKG_C_FLAGS_RELEASE") - endif() - if((NOT DEFINED VCPKG_CXX_FLAGS AND NOT DEFINED VCPKG_C_FLAGS) OR - (DEFINED VCPKG_CXX_FLAGS AND DEFINED VCPKG_C_FLAGS)) - else() - message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS") + message(FATAL_ERROR + "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". " + "It must be \"static\" or \"dynamic\"") endif() + macro(check_both_vars_are_set var1 var2) + if((NOT DEFINED ${var1} OR NOT DEFINED ${var2}) AND (DEFINED ${var1} OR DEFINED ${var2})) + message(FATAL_ERROR "Both ${var1} and ${var2} must be set.") + endif() + endmacro() + + check_both_vars_are_set(VCPKG_CXX_FLAGS_DEBUG VCPKG_C_FLAGS_DEBUG) + check_both_vars_are_set(VCPKG_CXX_FLAGS_RELEASE VCPKG_C_FLAGS_RELEASE) + check_both_vars_are_set(VCPKG_CXX_FLAGS VCPKG_C_FLAGS) + set(VCPKG_SET_CHARSET_FLAG ON) if(_csc_NO_CHARSET_FLAG) set(VCPKG_SET_CHARSET_FLAG OFF) endif() - if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) - list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME) - list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/windows.cmake") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/linux.cmake") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") - list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/android.cmake") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/osx.cmake") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/freebsd.cmake") + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + if(NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME OR _TARGETTING_UWP) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/windows.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/linux.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/android.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/osx.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/freebsd.cmake") + endif() endif() list(APPEND _csc_OPTIONS + "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" "-DVCPKG_SET_CHARSET_FLAG=${VCPKG_SET_CHARSET_FLAG}" "-DVCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}" @@ -227,15 +238,11 @@ function(vcpkg_configure_cmake) endif() # Sets configuration variables for macOS builds - if(DEFINED VCPKG_INSTALL_NAME_DIR) - list(APPEND _csc_OPTIONS "-DCMAKE_INSTALL_NAME_DIR=${VCPKG_INSTALL_NAME_DIR}") - endif() - if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) - list(APPEND _csc_OPTIONS "-DCMAKE_OSX_DEPLOYMENT_TARGET=${VCPKG_OSX_DEPLOYMENT_TARGET}") - endif() - if(DEFINED VCPKG_OSX_SYSROOT) - list(APPEND _csc_OPTIONS "-DCMAKE_OSX_SYSROOT=${VCPKG_OSX_SYSROOT}") - endif() + foreach(config_var INSTALL_NAME_DIR OSX_DEPLOYMENT_TARGET OSX_SYSROOT) + if(DEFINED VCPKG_${config_var}) + list(APPEND _csc_OPTIONS "-DCMAKE_${config_var}=${VCPKG_${config_var}}") + endif() + endforeach() set(rel_command ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_RELEASE}" @@ -248,7 +255,7 @@ function(vcpkg_configure_cmake) -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug) - if(NINJA_HOST AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) + if(NINJA_HOST AND CMAKE_HOST_WIN32 AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) @@ -259,20 +266,21 @@ function(vcpkg_configure_cmake) "rule CreateProcess\n command = $process\n\n" ) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - set(rel_line "build ../CMakeCache.txt: CreateProcess\n process = cmd /c \"cd .. &&") - foreach(arg ${rel_command}) - set(rel_line "${rel_line} \"${arg}\"") + macro(_build_cmakecache whereat build_type) + set(${build_type}_line "build ${whereat}/CMakeCache.txt: CreateProcess\n process = cmd /c \"cd ${whereat} &&") + foreach(arg ${${build_type}_command}) + set(${build_type}_line "${${build_type}_line} \"${arg}\"") endforeach() - set(_contents "${_contents}${rel_line}\"\n\n") - endif() + set(_contents "${_contents}${${build_type}_line}\"\n\n") + endmacro() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - set(dbg_line "build ../../${TARGET_TRIPLET}-dbg/CMakeCache.txt: CreateProcess\n process = cmd /c \"cd ../../${TARGET_TRIPLET}-dbg &&") - foreach(arg ${dbg_command}) - set(dbg_line "${dbg_line} \"${arg}\"") - endforeach() - set(_contents "${_contents}${dbg_line}\"\n\n") + if(NOT DEFINED VCPKG_BUILD_TYPE) + _build_cmakecache(".." "rel") + _build_cmakecache("../../${TARGET_TRIPLET}-dbg" "dbg") + elseif(VCPKG_BUILD_TYPE STREQUAL "release") + _build_cmakecache(".." "rel") + elseif(VCPKG_BUILD_TYPE STREQUAL "debug") + _build_cmakecache("../../${TARGET_TRIPLET}-dbg" "dbg") endif() file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure) From 9b861040d6922ba1b38ec53b240938213c1ce911 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Wed, 10 Jul 2019 08:15:18 +0200 Subject: [PATCH 0148/1066] Update libraqm to 0.7.0 (#7149) --- ports/libraqm/CMakeLists.txt | 5 ++++- ports/libraqm/CONTROL | 2 +- ports/libraqm/portfile.cmake | 11 +++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ports/libraqm/CMakeLists.txt b/ports/libraqm/CMakeLists.txt index f50153e63..2761ceebf 100644 --- a/ports/libraqm/CMakeLists.txt +++ b/ports/libraqm/CMakeLists.txt @@ -12,7 +12,10 @@ find_path(HARFBUZZ_INCLUDE_DIRS NAMES hb.h PATH_SUFFIXES harfbuzz) find_path(FREETYPE_ADDITIONAL_INCLUDE_DIRS NAMES ft2build.h) -add_library(raqm ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.c ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/raqm-version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm-version.h) + +add_library(raqm ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.c ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm-version.h) target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_ADDITIONAL_INCLUDE_DIRS}) target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_INCLUDE_DIRS}) diff --git a/ports/libraqm/CONTROL b/ports/libraqm/CONTROL index 131527a4a..f637fac3a 100644 --- a/ports/libraqm/CONTROL +++ b/ports/libraqm/CONTROL @@ -1,4 +1,4 @@ Source: libraqm -Version: 0.6.0 +Version: 0.7.0 Description: A library for complex text layout Build-Depends: freetype, harfbuzz, fribidi \ No newline at end of file diff --git a/ports/libraqm/portfile.cmake b/ports/libraqm/portfile.cmake index 067f63dde..702fe8be0 100644 --- a/ports/libraqm/portfile.cmake +++ b/ports/libraqm/portfile.cmake @@ -2,11 +2,15 @@ include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +set(RAQM_VERSION_MAJOR 0) +set(RAQM_VERSION_MINOR 7) +set(RAQM_VERSION_MICRO 0) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO HOST-Oman/libraqm - REF v0.6.0 - SHA512 cd223d97b80e9d2cf26a5b68fbb84a87e53df819f12ffd06f84f1786a2207b34828d0888058a40c1d89a1466bb68b75dd326e25415afab029d51e1ed98f6a924 + REF v${RAQM_VERSION_MAJOR}.${RAQM_VERSION_MINOR}.${RAQM_VERSION_MICRO} + SHA512 fe2f5e5707334d72518e720adff4379666ba5c4c045531e92588c5f843d4f56111e7b66ea4e7a061621320fa98f13229624994a950a789a477674d3a359cb58c HEAD_REF master ) @@ -18,6 +22,9 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DCURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR} + -DRAQM_VERSION_MAJOR=${RAQM_VERSION_MAJOR} + -DRAQM_VERSION_MINOR=${RAQM_VERSION_MINOR} + -DRAQM_VERSION_MICRO=${RAQM_VERSION_MICRO} ) vcpkg_install_cmake() From bb417d3beb579993a93c912b511dc9d336997b0d Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Wed, 10 Jul 2019 08:16:29 +0200 Subject: [PATCH 0149/1066] [pthreads4W] vcpkg wrapper fixes (#7178) * [pthreads4W] restore compatibility with projects using pthreads v2, set proper VERSION symbol * [pthreads4W] remove FORCED cached variables, to enable user override --- ports/pthreads/CONTROL | 2 +- ports/pthreads/vcpkg-cmake-wrapper.cmake | 27 +++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL index e1b96a438..53d5706c7 100644 --- a/ports/pthreads/CONTROL +++ b/ports/pthreads/CONTROL @@ -1,4 +1,4 @@ Source: pthreads -Version: 3.0.0-1 +Version: 3.0.0-2 Homepage: https://sourceware.org/pub/pthreads-win32/ Description: pthreads for windows diff --git a/ports/pthreads/vcpkg-cmake-wrapper.cmake b/ports/pthreads/vcpkg-cmake-wrapper.cmake index ec5c473fb..8d3a4e875 100644 --- a/ports/pthreads/vcpkg-cmake-wrapper.cmake +++ b/ports/pthreads/vcpkg-cmake-wrapper.cmake @@ -52,7 +52,7 @@ endif() set(PThreads4W_MAJOR_VERSION 3) set(PThreads4W_MINOR_VERSION 0) set(PThreads4W_PATCH_VERSION 0) -set(PThreads_VERSION "${PThreads4W_MAJOR_VERSION}.${PThreads4W_MINOR_VERSION}.${PThreads4W_PATCH_VERSION}") +set(PThreads4W_VERSION "${PThreads4W_MAJOR_VERSION}.${PThreads4W_MINOR_VERSION}.${PThreads4W_PATCH_VERSION}") # Allow libraries to be set manually if(NOT PThreads4W_LIBRARY) @@ -83,17 +83,20 @@ find_package_handle_standard_args(PThreads4W DEFAULT_MSG PThreads4W_LIBRARY PThr mark_as_advanced(PThreads4W_INCLUDE_DIR PThreads4W_LIBRARY PThreads4W_CXXEXC_LIBRARY PThreads4W_STRUCTEXC_LIBRARY) #Compatibility definitions, deprecated -set(PTHREAD_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "" FORCE) -set(PTHREADS_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "" FORCE) -set(PThreads_windows_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "" FORCE) -set(PTHREAD_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "" FORCE) -set(PTHREADS_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "" FORCE) -set(PTHREAD_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "" FORCE) -set(PTHREADS_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "" FORCE) -set(LIBPTHREAD ${PThreads4W_LIBRARY} CACHE STRING "" FORCE) -set(LIBPTHREADS ${PThreads4W_LIBRARY} CACHE STRING "" FORCE) -set(PThreads_windows_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "" FORCE) - +set(PTHREAD_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "") +set(PTHREADS_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "") +set(PThreads_windows_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "") +set(PTHREAD_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "") +set(PTHREADS_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "") +set(PTHREAD_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "") +set(PTHREADS_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "") +set(LIBPTHREAD ${PThreads4W_LIBRARY} CACHE STRING "") +set(LIBPTHREADS ${PThreads4W_LIBRARY} CACHE STRING "") +set(PThreads_windows_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "") +set(PThreads_VERSION "${PThreads4W_VERSION}") +if(PThreads4W_FOUND) + set(PThreads_windows_FOUND TRUE) +endif() #TARGETS if( PThreads4W_FOUND AND NOT TARGET PThreads4W::PThreads4W_CXXEXC ) From f97f92785f78460949a1044d417eab1d37715080 Mon Sep 17 00:00:00 2001 From: Igor Kostenko Date: Wed, 10 Jul 2019 07:17:17 +0100 Subject: [PATCH 0150/1066] Added nasm mirror as nasm.us is down again (#7175) --- scripts/cmake/vcpkg_find_acquire_program.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 737e332bc..84ebdbfa8 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -60,12 +60,15 @@ function(vcpkg_find_acquire_program VAR) set(HASH d353d3dc743ebdc6d1e9f6f2b7a6db3c387c1ce6c890bae8adc8ae5deae8404f4c5e3cf249d1e151e7256d4c5ee9cd317e6c41f3b6f244340de18a24b938e0c4) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) - set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.14) + set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.14.02) set(BREW_PACKAGE_NAME "nasm") set(APT_PACKAGE_NAME "nasm") - set(URL "http://www.nasm.us/pub/nasm/releasebuilds/2.14/win32/nasm-2.14-win32.zip") - set(ARCHIVE "nasm-2.14-win32.zip") - set(HASH 64481b0346b83de8c9568f04a54f68e0f4c71724afa0b414f12e4080951d8c49e489bfc32117f9a489e3e49477b1cadc583c672311316d27c543af304c4b7f2a) + set(URL + "http://www.nasm.us/pub/nasm/releasebuilds/2.14.02/win32/nasm-2.14.02-win32.zip" + "http://fossies.org/windows/misc/nasm-2.14.02-win32.zip" + ) + set(ARCHIVE "nasm-2.14.02-win32.zip") + set(HASH a0f16a9f3b668b086e3c4e23a33ff725998e120f2e3ccac8c28293fd4faeae6fc59398919e1b89eed7461685d2730de02f2eb83e321f73609f35bf6b17a23d1e) elseif(VAR MATCHES "YASM") set(PROGNAME yasm) set(SUBDIR 1.3.0.6) From 60bff8d54996d55ffc81995bcb63510686863c84 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Wed, 10 Jul 2019 11:36:37 -0700 Subject: [PATCH 0151/1066] allow spaces in pathname on linux (#7216) --- toolsrc/src/vcpkg/base/hash.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/base/hash.cpp b/toolsrc/src/vcpkg/base/hash.cpp index 310b8c35e..e9a7fa2ef 100644 --- a/toolsrc/src/vcpkg/base/hash.cpp +++ b/toolsrc/src/vcpkg/base/hash.cpp @@ -178,9 +178,11 @@ namespace vcpkg::Hash static std::string parse_shasum_output(const std::string& shasum_output) { std::vector split = Strings::split(shasum_output, " "); + // Checking if >= 3 because filenames with spaces will show up as multiple tokens. + // The hash is the first token so we don't need to parse the filename anyway. Checks::check_exit(VCPKG_LINE_INFO, - split.size() == 3, - "Expected output of the form [hash filename\n] (3 tokens), but got\n" + split.size() >= 3, + "Expected output of the form [hash filename\n] (3+ tokens), but got\n" "[%s] (%s tokens)", shasum_output, std::to_string(split.size())); From e6e0fda6c9cde1442473d6c687502a19d5a181fd Mon Sep 17 00:00:00 2001 From: Rodrigo Hernandez Cordoba Date: Wed, 10 Jul 2019 12:48:17 -0600 Subject: [PATCH 0152/1066] [Librsvg] port (#6807) * [librsvg] Initial librsvg port. This is version 2.40.20, the last C version of the library, moving forward would require rust compilation tools to be available in vcpkg. Should close issue #3865 --- ports/librsvg/CMakeLists.txt | 154 +++++++++++++++++++++++++++++++++++ ports/librsvg/CONTROL | 4 + ports/librsvg/config.h.linux | 89 ++++++++++++++++++++ ports/librsvg/portfile.cmake | 32 ++++++++ 4 files changed, 279 insertions(+) create mode 100755 ports/librsvg/CMakeLists.txt create mode 100755 ports/librsvg/CONTROL create mode 100644 ports/librsvg/config.h.linux create mode 100755 ports/librsvg/portfile.cmake diff --git a/ports/librsvg/CMakeLists.txt b/ports/librsvg/CMakeLists.txt new file mode 100755 index 000000000..749d3132b --- /dev/null +++ b/ports/librsvg/CMakeLists.txt @@ -0,0 +1,154 @@ +cmake_minimum_required(VERSION 3.11) +project(librsvg C) + +find_package(unofficial-cairo CONFIG REQUIRED) +find_package(unofficial-libcroco CONFIG REQUIRED) +find_package(unofficial-glib CONFIG REQUIRED) +find_package(LibXml2 REQUIRED) +find_library(PANGO_LIB pango-1.0) +find_library(PANGO_CAIRO_LIB pangocairo-1.0) +if(CMAKE_SYSTEM_NAME MATCHES "Windows") + find_library(GDK_PIXBUF_LIB gdk_pixbuf-2.0) +else() + find_library(GDK_PIXBUF_LIB gdk_pixbuf-2) +endif() + +find_path(CAIRO_INCLUDE_DIR cairo/cairo.h) + +# Add include directories +include_directories(${CAIRO_INCLUDE_DIR} ${GDK_PIXBUF_INCLUDE_DIR}) + +set(LIBRSVG_SOURCES + librsvg-features.c + rsvg-css.c + rsvg-css.h + rsvg-compat.h + rsvg-defs.c + rsvg-defs.h + rsvg-image.c + rsvg-image.h + rsvg-io.c + rsvg-io.h + rsvg-paint-server.c + rsvg-paint-server.h + rsvg-path.c + rsvg-path.h + rsvg-private.h + rsvg-base-file-util.c + rsvg-filter.c + rsvg-filter.h + rsvg-marker.c + rsvg-marker.h + rsvg-mask.c + rsvg-mask.h + rsvg-shapes.c + rsvg-shapes.h + rsvg-structure.c + rsvg-structure.h + rsvg-styles.c + rsvg-styles.h + rsvg-text.c + rsvg-text.h + rsvg-cond.c + rsvg-base.c + librsvg-enum-types.c + rsvg-cairo-draw.c + rsvg-cairo-draw.h + rsvg-cairo-render.c + rsvg-cairo-render.h + rsvg-cairo-clip.h + rsvg-cairo-clip.c + rsvg.c + rsvg-gobject.c + rsvg-file-util.c + rsvg-size-callback.c + rsvg-size-callback.h + rsvg-xml.c + rsvg-xml.h + rsvg.h + rsvg-cairo.h + librsvg-features.h + librsvg-enum-types.h +) + +set(PIXBUFLOADERSVG_SOURCES + gdk-pixbuf-loader/io-svg.c +) + +if(WIN32) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.win32 ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY) + add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.def + COMMAND echo "EXPORTS" > ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.def + COMMAND ${CMAKE_C_COMPILER} /EP ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.symbols >> ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.def) + list(APPEND LIBRSVG_SOURCES rsvg.def) +else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.linux ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY) + list(APPEND LIBRSVG_SOURCES rsvg.symbols) +endif() + +set(CMAKE_DEBUG_POSTFIX "d") + +add_library(rsvg-2.40 ${LIBRSVG_SOURCES}) +add_library(pixbufloader-svg ${PIXBUFLOADERSVG_SOURCES}) + +target_compile_definitions(rsvg-2.40 PRIVATE -DRSVG_COMPILATION -D_CRT_SECURE_NO_WARNINGS -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}") + +target_include_directories(pixbufloader-svg PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +target_compile_definitions(pixbufloader-svg PRIVATE + -DRSVG_COMPILATION + -D_CRT_SECURE_NO_WARNINGS + -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}" + -DGDK_PIXBUF_ENABLE_BACKEND + -DG_LOG_DOMAIN="libpixbufloader-svg") + +target_link_libraries(rsvg-2.40 PRIVATE + unofficial::cairo::cairo + unofficial::libcroco::croco-0.6 + unofficial::glib::gio + unofficial::glib::glib + unofficial::glib::gmodule + unofficial::glib::gobject + ${LIBXML2_LIBRARIES} + ${PANGO_LIB} + ${PANGO_CAIRO_LIB} + ${GDK_PIXBUF_LIB} +) +target_link_libraries(pixbufloader-svg PRIVATE + rsvg-2.40 + unofficial::glib::glib + unofficial::glib::gobject + ${GDK_PIXBUF_LIB} +) + +install(TARGETS rsvg-2.40 pixbufloader-svg + EXPORT librsvg-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT librsvg-targets + NAMESPACE unofficial::librsvg:: + FILE unofficial-librsvg-targets.cmake + DESTINATION share/unofficial-librsvg +) + +install(FILES + rsvg.h + rsvg-cairo.h + librsvg-features.h + librsvg-enum-types.h + DESTINATION include/librsvg +) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-librsvg-config.cmake " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-cairo CONFIG) +find_dependency(unofficial-libcroco CONFIG) +find_dependency(gdk-pixbuf CONFIG) +find_dependency(pango CONFIG) + +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-librsvg-targets.cmake) +") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-librsvg-config.cmake DESTINATION share/unofficial-librsvg) diff --git a/ports/librsvg/CONTROL b/ports/librsvg/CONTROL new file mode 100755 index 000000000..3a250b8d4 --- /dev/null +++ b/ports/librsvg/CONTROL @@ -0,0 +1,4 @@ +Source: librsvg +Version: 2.40.20 +Description: A small library to render Scalable Vector Graphics (SVG) +Build-Depends: cairo, pango, gdk-pixbuf, libcroco \ No newline at end of file diff --git a/ports/librsvg/config.h.linux b/ports/librsvg/config.h.linux new file mode 100644 index 000000000..c3881b8c9 --- /dev/null +++ b/ports/librsvg/config.h.linux @@ -0,0 +1,89 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Have the pangoft2 library */ +#define HAVE_PANGOFT2 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtok_r' function. */ +#define HAVE_STRTOK_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "librsvg" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugzilla.gnome.org/enter_bug.cgi?product=librsvg" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "RSVG" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "RSVG 2.40.20" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "librsvg" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.40.20" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "2.40.20" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif diff --git a/ports/librsvg/portfile.cmake b/ports/librsvg/portfile.cmake new file mode 100755 index 000000000..c3765f0a3 --- /dev/null +++ b/ports/librsvg/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.gnome.org/sources/librsvg/2.40/librsvg-2.40.20.tar.xz" + FILENAME "librsvg-2.40.20.tar.xz" + SHA512 cdd8224deb4c3786e29f48ed02c32ed9dff5cb15aba574a5ef845801ad3669cfcc3eedb9d359c22213dc7a29de24c363248825adad5877c40abf73b3688ff12f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.linux ${SOURCE_PATH}/config.h.linux COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-librsvg TARGET_PATH share/unofficial-librsvg) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/librsvg RENAME copyright) + +vcpkg_copy_pdbs() + +vcpkg_test_cmake(PACKAGE_NAME unofficial-librsvg) From 0641cf54ecdaa33c4b6874bab5afe7e9a4049011 Mon Sep 17 00:00:00 2001 From: bitwiser73 Date: Wed, 10 Jul 2019 22:56:07 +0200 Subject: [PATCH 0153/1066] [7zip] add new port (#5221) (#6920) --- ports/7zip/CMakeLists.txt | 374 ++++++++++++++++++++++++++++++++++++ ports/7zip/CONTROL | 3 + ports/7zip/License.txt | 90 +++++++++ ports/7zip/portfile.cmake | 34 ++++ ports/7zip/unRarLicense.txt | 41 ++++ 5 files changed, 542 insertions(+) create mode 100644 ports/7zip/CMakeLists.txt create mode 100644 ports/7zip/CONTROL create mode 100644 ports/7zip/License.txt create mode 100644 ports/7zip/portfile.cmake create mode 100644 ports/7zip/unRarLicense.txt diff --git a/ports/7zip/CMakeLists.txt b/ports/7zip/CMakeLists.txt new file mode 100644 index 000000000..7e93a3bf0 --- /dev/null +++ b/ports/7zip/CMakeLists.txt @@ -0,0 +1,374 @@ +# Created from 7-zip v19.00 - 7zip/CPP/7zip/Bundles/Format7zF + +cmake_minimum_required(VERSION 3.11) +cmake_policy(VERSION 3.11) + +project(7zip LANGUAGES C CXX ASM_MASM) + +set(SRC_ASM + Asm/x86/AesOpt.asm + Asm/x86/7zCrcOpt.asm + Asm/x86/XzCrc64Opt.asm +) + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set_source_files_properties(${SRC_ASM} PROPERTIES COMPILE_FLAGS "-Dx64") +else() + set_source_files_properties(${SRC_ASM} PROPERTIES COMPILE_FLAGS "-safeseh") +endif() + +set(SRC_COMPRESS + CPP/7zip/Compress/Bcj2Coder.cpp + CPP/7zip/Compress/Bcj2Register.cpp + CPP/7zip/Compress/BcjCoder.cpp + CPP/7zip/Compress/BcjRegister.cpp + CPP/7zip/Compress/BitlDecoder.cpp + CPP/7zip/Compress/BranchMisc.cpp + CPP/7zip/Compress/BranchRegister.cpp + CPP/7zip/Compress/ByteSwap.cpp + CPP/7zip/Compress/BZip2Crc.cpp + CPP/7zip/Compress/BZip2Decoder.cpp + CPP/7zip/Compress/BZip2Encoder.cpp + CPP/7zip/Compress/BZip2Register.cpp + CPP/7zip/Compress/CopyCoder.cpp + CPP/7zip/Compress/CopyRegister.cpp + CPP/7zip/Compress/Deflate64Register.cpp + CPP/7zip/Compress/DeflateDecoder.cpp + CPP/7zip/Compress/DeflateEncoder.cpp + CPP/7zip/Compress/DeflateRegister.cpp + CPP/7zip/Compress/DeltaFilter.cpp + CPP/7zip/Compress/ImplodeDecoder.cpp + CPP/7zip/Compress/LzfseDecoder.cpp + CPP/7zip/Compress/LzhDecoder.cpp + CPP/7zip/Compress/Lzma2Decoder.cpp + CPP/7zip/Compress/Lzma2Encoder.cpp + CPP/7zip/Compress/Lzma2Register.cpp + CPP/7zip/Compress/LzmaDecoder.cpp + CPP/7zip/Compress/LzmaEncoder.cpp + CPP/7zip/Compress/LzmaRegister.cpp + CPP/7zip/Compress/LzmsDecoder.cpp + CPP/7zip/Compress/LzOutWindow.cpp + CPP/7zip/Compress/LzxDecoder.cpp + CPP/7zip/Compress/PpmdDecoder.cpp + CPP/7zip/Compress/PpmdEncoder.cpp + CPP/7zip/Compress/PpmdRegister.cpp + CPP/7zip/Compress/PpmdZip.cpp + CPP/7zip/Compress/QuantumDecoder.cpp + CPP/7zip/Compress/Rar1Decoder.cpp + CPP/7zip/Compress/Rar2Decoder.cpp + CPP/7zip/Compress/Rar3Decoder.cpp + CPP/7zip/Compress/Rar3Vm.cpp + CPP/7zip/Compress/Rar5Decoder.cpp + CPP/7zip/Compress/RarCodecsRegister.cpp + CPP/7zip/Compress/ShrinkDecoder.cpp + CPP/7zip/Compress/XpressDecoder.cpp + CPP/7zip/Compress/XzDecoder.cpp + CPP/7zip/Compress/XzEncoder.cpp + CPP/7zip/Compress/ZlibDecoder.cpp + CPP/7zip/Compress/ZlibEncoder.cpp + CPP/7zip/Compress/ZDecoder.cpp + CPP/7zip/Compress/CodecExports.cpp +) + +set(SRC_CRYPTO + CPP/7zip/Crypto/7zAes.cpp + CPP/7zip/Crypto/7zAesRegister.cpp + CPP/7zip/Crypto/HmacSha1.cpp + CPP/7zip/Crypto/HmacSha256.cpp + CPP/7zip/Crypto/MyAes.cpp + CPP/7zip/Crypto/MyAesReg.cpp + CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp + CPP/7zip/Crypto/RandGen.cpp + CPP/7zip/Crypto/Rar20Crypto.cpp + CPP/7zip/Crypto/Rar5Aes.cpp + CPP/7zip/Crypto/RarAes.cpp + CPP/7zip/Crypto/WzAes.cpp + CPP/7zip/Crypto/ZipCrypto.cpp + CPP/7zip/Crypto/ZipStrong.cpp +) + +set(SRC_C + C/7zBuf2.c + C/7zStream.c + C/Alloc.c + C/Bcj2.c + C/Bcj2Enc.c + C/Blake2s.c + C/Bra.c + C/Bra86.c + C/BraIA64.c + C/BwtSort.c + C/CpuArch.c + C/Delta.c + C/HuffEnc.c + C/LzFind.c + C/LzFindMt.c + C/Lzma2Dec.c + C/Lzma2DecMt.c + C/Lzma2Enc.c + C/LzmaDec.c + C/LzmaEnc.c + C/MtCoder.c + C/MtDec.c + C/Ppmd7.c + C/Ppmd7Dec.c + C/Ppmd7Enc.c + C/Ppmd8.c + C/Ppmd8Dec.c + C/Ppmd8Enc.c + C/Sha1.c + C/Sha256.c + C/Sort.c + C/Threads.c + C/Xz.c + C/XzDec.c + C/XzEnc.c + C/XzIn.c + C/Aes.c + C/7zCrc.c + C/XzCrc64.c +) + +set_source_files_properties( + ${SRC_COMPRESS} + ${SRC_CRYPTO} + ${SRC_C} + PROPERTIES + COMPILE_FLAGS $<$:"/O2"> +) + +set(SRC_OTHER + CPP/Common/CRC.cpp + CPP/Common/CrcReg.cpp + CPP/Common/DynLimBuf.cpp + CPP/Common/IntToString.cpp + CPP/Common/MyMap.cpp + CPP/Common/MyString.cpp + CPP/Common/MyVector.cpp + CPP/Common/MyXml.cpp + CPP/Common/NewHandler.cpp + CPP/Common/Sha1Reg.cpp + CPP/Common/Sha256Reg.cpp + CPP/Common/StringConvert.cpp + CPP/Common/StringToInt.cpp + CPP/Common/UTFConvert.cpp + CPP/Common/Wildcard.cpp + CPP/Common/XzCrc64Init.cpp + CPP/Common/XzCrc64Reg.cpp + + CPP/Windows/FileDir.cpp + CPP/Windows/FileFind.cpp + CPP/Windows/FileIO.cpp + CPP/Windows/FileName.cpp + CPP/Windows/PropVariant.cpp + CPP/Windows/PropVariantUtils.cpp + CPP/Windows/Synchronization.cpp + CPP/Windows/System.cpp + CPP/Windows/TimeUtils.cpp + + CPP/7zip/Common/CreateCoder.cpp + CPP/7zip/Common/CWrappers.cpp + CPP/7zip/Common/InBuffer.cpp + CPP/7zip/Common/InOutTempBuffer.cpp + CPP/7zip/Common/FilterCoder.cpp + CPP/7zip/Common/LimitedStreams.cpp + CPP/7zip/Common/LockedStream.cpp + CPP/7zip/Common/MemBlocks.cpp + CPP/7zip/Common/MethodId.cpp + CPP/7zip/Common/MethodProps.cpp + CPP/7zip/Common/OffsetStream.cpp + CPP/7zip/Common/OutBuffer.cpp + CPP/7zip/Common/OutMemStream.cpp + CPP/7zip/Common/ProgressMt.cpp + CPP/7zip/Common/ProgressUtils.cpp + CPP/7zip/Common/PropId.cpp + CPP/7zip/Common/StreamBinder.cpp + CPP/7zip/Common/StreamObjects.cpp + CPP/7zip/Common/StreamUtils.cpp + CPP/7zip/Common/UniqBlocks.cpp + CPP/7zip/Common/VirtThread.cpp + + CPP/7zip/Archive/ApmHandler.cpp + CPP/7zip/Archive/ArHandler.cpp + CPP/7zip/Archive/ArjHandler.cpp + CPP/7zip/Archive/Bz2Handler.cpp + CPP/7zip/Archive/ComHandler.cpp + CPP/7zip/Archive/CpioHandler.cpp + CPP/7zip/Archive/CramfsHandler.cpp + CPP/7zip/Archive/DeflateProps.cpp + CPP/7zip/Archive/DmgHandler.cpp + CPP/7zip/Archive/ElfHandler.cpp + CPP/7zip/Archive/ExtHandler.cpp + CPP/7zip/Archive/FatHandler.cpp + CPP/7zip/Archive/FlvHandler.cpp + CPP/7zip/Archive/GzHandler.cpp + CPP/7zip/Archive/GptHandler.cpp + CPP/7zip/Archive/HandlerCont.cpp + CPP/7zip/Archive/HfsHandler.cpp + CPP/7zip/Archive/IhexHandler.cpp + CPP/7zip/Archive/LzhHandler.cpp + CPP/7zip/Archive/LzmaHandler.cpp + CPP/7zip/Archive/MachoHandler.cpp + CPP/7zip/Archive/MbrHandler.cpp + CPP/7zip/Archive/MslzHandler.cpp + CPP/7zip/Archive/MubHandler.cpp + CPP/7zip/Archive/NtfsHandler.cpp + CPP/7zip/Archive/PeHandler.cpp + CPP/7zip/Archive/PpmdHandler.cpp + CPP/7zip/Archive/QcowHandler.cpp + CPP/7zip/Archive/RpmHandler.cpp + CPP/7zip/Archive/SplitHandler.cpp + CPP/7zip/Archive/SquashfsHandler.cpp + CPP/7zip/Archive/SwfHandler.cpp + CPP/7zip/Archive/UefiHandler.cpp + CPP/7zip/Archive/VdiHandler.cpp + CPP/7zip/Archive/VhdHandler.cpp + CPP/7zip/Archive/VmdkHandler.cpp + CPP/7zip/Archive/XarHandler.cpp + CPP/7zip/Archive/XzHandler.cpp + CPP/7zip/Archive/ZHandler.cpp + CPP/7zip/Archive/ArchiveExports.cpp + CPP/7zip/Archive/DllExports2.cpp + + CPP/7zip/Archive/Common/CoderMixer2.cpp + CPP/7zip/Archive/Common/DummyOutStream.cpp + CPP/7zip/Archive/Common/FindSignature.cpp + CPP/7zip/Archive/Common/InStreamWithCRC.cpp + CPP/7zip/Archive/Common/ItemNameUtils.cpp + CPP/7zip/Archive/Common/MultiStream.cpp + CPP/7zip/Archive/Common/OutStreamWithCRC.cpp + CPP/7zip/Archive/Common/OutStreamWithSha1.cpp + CPP/7zip/Archive/Common/HandlerOut.cpp + CPP/7zip/Archive/Common/ParseProperties.cpp + + CPP/7zip/Archive/7z/7zCompressionMode.cpp + CPP/7zip/Archive/7z/7zDecode.cpp + CPP/7zip/Archive/7z/7zEncode.cpp + CPP/7zip/Archive/7z/7zExtract.cpp + CPP/7zip/Archive/7z/7zFolderInStream.cpp + CPP/7zip/Archive/7z/7zHandler.cpp + CPP/7zip/Archive/7z/7zHandlerOut.cpp + CPP/7zip/Archive/7z/7zHeader.cpp + CPP/7zip/Archive/7z/7zIn.cpp + CPP/7zip/Archive/7z/7zOut.cpp + CPP/7zip/Archive/7z/7zProperties.cpp + CPP/7zip/Archive/7z/7zSpecStream.cpp + CPP/7zip/Archive/7z/7zUpdate.cpp + CPP/7zip/Archive/7z/7zRegister.cpp + + CPP/7zip/Archive/Cab/CabBlockInStream.cpp + CPP/7zip/Archive/Cab/CabHandler.cpp + CPP/7zip/Archive/Cab/CabHeader.cpp + CPP/7zip/Archive/Cab/CabIn.cpp + CPP/7zip/Archive/Cab/CabRegister.cpp + + CPP/7zip/Archive/Chm/ChmHandler.cpp + CPP/7zip/Archive/Chm/ChmIn.cpp + + CPP/7zip/Archive/Iso/IsoHandler.cpp + CPP/7zip/Archive/Iso/IsoHeader.cpp + CPP/7zip/Archive/Iso/IsoIn.cpp + CPP/7zip/Archive/Iso/IsoRegister.cpp + + CPP/7zip/Archive/Nsis/NsisDecode.cpp + CPP/7zip/Archive/Nsis/NsisHandler.cpp + CPP/7zip/Archive/Nsis/NsisIn.cpp + CPP/7zip/Archive/Nsis/NsisRegister.cpp + + CPP/7zip/Archive/Rar/RarHandler.cpp + CPP/7zip/Archive/Rar/Rar5Handler.cpp + + CPP/7zip/Archive/Tar/TarHandler.cpp + CPP/7zip/Archive/Tar/TarHandlerOut.cpp + CPP/7zip/Archive/Tar/TarHeader.cpp + CPP/7zip/Archive/Tar/TarIn.cpp + CPP/7zip/Archive/Tar/TarOut.cpp + CPP/7zip/Archive/Tar/TarUpdate.cpp + CPP/7zip/Archive/Tar/TarRegister.cpp + + CPP/7zip/Archive/Udf/UdfHandler.cpp + CPP/7zip/Archive/Udf/UdfIn.cpp + + CPP/7zip/Archive/Wim/WimHandler.cpp + CPP/7zip/Archive/Wim/WimHandlerOut.cpp + CPP/7zip/Archive/Wim/WimIn.cpp + CPP/7zip/Archive/Wim/WimRegister.cpp + + CPP/7zip/Archive/Zip/ZipAddCommon.cpp + CPP/7zip/Archive/Zip/ZipHandler.cpp + CPP/7zip/Archive/Zip/ZipHandlerOut.cpp + CPP/7zip/Archive/Zip/ZipIn.cpp + CPP/7zip/Archive/Zip/ZipItem.cpp + CPP/7zip/Archive/Zip/ZipOut.cpp + CPP/7zip/Archive/Zip/ZipUpdate.cpp + CPP/7zip/Archive/Zip/ZipRegister.cpp +) + +add_library(7zip + ${SRC_ASM} + ${SRC_OTHER} + ${SRC_COMPRESS} + ${SRC_CRYPTO} + ${SRC_C} + CPP/7zip/Archive/Archive2.def +) + +target_compile_definitions(7zip + PUBLIC + -DEXTERNAL_CODECS + -D_7ZIP_LARGE_PAGES + -DUNICODE + -D_UNICODE +) + +target_compile_options(7zip + PRIVATE + /wd5043 + $<$:/guard:cf> +) + +target_include_directories(7zip + INTERFACE + $/7zip/CPP +) + +set(PUBLIC_HEADERS + C/7zTypes.h + CPP/7zip/Archive/IArchive.h + CPP/7zip/ICoder.h + CPP/7zip/IDecl.h + CPP/7zip/IPassword.h + CPP/7zip/IProgress.h + CPP/7zip/IStream.h + CPP/7zip/PropID.h + CPP/Common/Defs.h + CPP/Common/MyTypes.h + CPP/Common/MyUnknown.h + CPP/Common/MyWindows.h +) + +install( + TARGETS 7zip + EXPORT 7zip + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +# Headers makes relative includes so directory structure must be kept +foreach(HEADER ${PUBLIC_HEADERS}) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install( + FILES ${HEADER} + CONFIGURATIONS Release + DESTINATION include/7zip/${HEADER_DIR} + ) +endforeach() + +install( + EXPORT 7zip + DESTINATION share/7zip + FILE 7zipConfig.cmake + NAMESPACE 7zip:: + CONFIGURATIONS Release +) diff --git a/ports/7zip/CONTROL b/ports/7zip/CONTROL new file mode 100644 index 000000000..42cb47b34 --- /dev/null +++ b/ports/7zip/CONTROL @@ -0,0 +1,3 @@ +Source: 7zip +Version: 19.00 +Description: Library for archiving file with a high compression ratio. diff --git a/ports/7zip/License.txt b/ports/7zip/License.txt new file mode 100644 index 000000000..e9113842c --- /dev/null +++ b/ports/7zip/License.txt @@ -0,0 +1,90 @@ + 7-Zip source code + ~~~~~~~~~~~~~~~~~ + License for use and distribution + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + 7-Zip Copyright (C) 1999-2019 Igor Pavlov. + + The licenses for files are: + + 1) CPP/7zip/Compress/Rar* files: the "GNU LGPL" with "unRAR license restriction" + 2) CPP/7zip/Compress/LzfseDecoder.cpp: the "BSD 3-clause License" + 3) Some files are "public domain" files, if "public domain" status is stated in source file. + 4) the "GNU LGPL" for all other files. If there is no license information in + some source file, that file is under the "GNU LGPL". + + The "GNU LGPL" with "unRAR license restriction" means that you must follow both + "GNU LGPL" rules and "unRAR license restriction" rules. + + + + + GNU LGPL information + -------------------- + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + + + BSD 3-clause License + -------------------- + + The "BSD 3-clause License" is used for the code in LzfseDecoder.cpp that implements LZFSE data decompression. + That code was derived from the code in the "LZFSE compression library" developed by Apple Inc, + that also uses the "BSD 3-clause License": + + ---- + Copyright (c) 2015-2016, Apple Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ---- + + + + + unRAR license restriction + ------------------------- + + The decompression engine for RAR archives was developed using source + code of unRAR program. + All copyrights to original unRAR code are owned by Alexander Roshal. + + The license for original unRAR code has the following restriction: + + The unRAR sources cannot be used to re-create the RAR compression algorithm, + which is proprietary. Distribution of modified unRAR sources in separate form + or as a part of other software is permitted, provided that it is clearly + stated in the documentation and source comments that the code may + not be used to develop a RAR (WinRAR) compatible archiver. + + + -- + Igor Pavlov diff --git a/ports/7zip/portfile.cmake b/ports/7zip/portfile.cmake new file mode 100644 index 000000000..83515438c --- /dev/null +++ b/ports/7zip/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +set(7ZIP_VERSION 19.00) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.7-zip.org/a/7z1900-src.7z" + FILENAME "7z1900-src.7z" + SHA512 d68b308e175224770adc8b1495f1ba3cf3e7f67168a7355000643d3d32560ae01aa34266f0002395181ed91fb5e682b86e0f79c20625b42d6e2c62dd24a5df93 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${7ZIP_VERSION} + NO_REMOVE_ONE_LEVEL +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file( + INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/7zip + RENAME copyright +) + +vcpkg_test_cmake(PACKAGE_NAME 7zip) diff --git a/ports/7zip/unRarLicense.txt b/ports/7zip/unRarLicense.txt new file mode 100644 index 000000000..5f78b728d --- /dev/null +++ b/ports/7zip/unRarLicense.txt @@ -0,0 +1,41 @@ + ****** ***** ****** unRAR - free utility for RAR archives + ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ****** ******* ****** License for use and distribution of + ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ** ** ** ** ** ** FREE portable version + ~~~~~~~~~~~~~~~~~~~~~ + + The source code of unRAR utility is freeware. This means: + + 1. All copyrights to RAR and the utility unRAR are exclusively + owned by the author - Alexander Roshal. + + 2. The unRAR sources may be used in any software to handle RAR + archives without limitations free of charge, but cannot be used + to re-create the RAR compression algorithm, which is proprietary. + Distribution of modified unRAR sources in separate form or as a + part of other software is permitted, provided that it is clearly + stated in the documentation and source comments that the code may + not be used to develop a RAR (WinRAR) compatible archiver. + + 3. The unRAR utility may be freely distributed. No person or company + may charge a fee for the distribution of unRAR without written + permission from the copyright holder. + + 4. THE RAR ARCHIVER AND THE UNRAR UTILITY ARE DISTRIBUTED "AS IS". + NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT + YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, + DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING + OR MISUSING THIS SOFTWARE. + + 5. Installing and using the unRAR utility signifies acceptance of + these terms and conditions of the license. + + 6. If you don't agree with terms of the license you must remove + unRAR files from your storage devices and cease to use the + utility. + + Thank you for your interest in RAR and unRAR. + + + Alexander L. Roshal \ No newline at end of file From 83b3ce224b25f5364bfd0e493cd259e957e2afc2 Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Thu, 11 Jul 2019 08:03:41 +0800 Subject: [PATCH 0154/1066] [libkml] Fix install path (#7194) --- ports/libkml/CONTROL | 2 +- ports/libkml/portfile.cmake | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ports/libkml/CONTROL b/ports/libkml/CONTROL index 7e54d2c1c..34a3a3440 100644 --- a/ports/libkml/CONTROL +++ b/ports/libkml/CONTROL @@ -1,5 +1,5 @@ Source: libkml -Version: 1.3.0-2 +Version: 1.3.0-3 Homepage: https://github.com/libkml/libkml Description: Reference implementation of OGC KML 2.2 Build-Depends: zlib, expat, minizip, uriparser, boost-smart-ptr diff --git a/ports/libkml/portfile.cmake b/ports/libkml/portfile.cmake index b2e846d3c..3a0af2329 100644 --- a/ports/libkml/portfile.cmake +++ b/ports/libkml/portfile.cmake @@ -23,6 +23,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libkml) +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libkml) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libkml RENAME copyright) From c544b62458338421412954c213d30d483fb0162d Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Wed, 10 Jul 2019 17:25:51 -0700 Subject: [PATCH 0155/1066] [genann] Add new port. (#7195) * [genann] Add new port. * change version to date --- ports/genann/CMakeLists.txt | 25 +++++++++++++++++++++++++ ports/genann/CONTROL | 4 ++++ ports/genann/portfile.cmake | 27 +++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 ports/genann/CMakeLists.txt create mode 100644 ports/genann/CONTROL create mode 100644 ports/genann/portfile.cmake diff --git a/ports/genann/CMakeLists.txt b/ports/genann/CMakeLists.txt new file mode 100644 index 000000000..80b7ab9bf --- /dev/null +++ b/ports/genann/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.11) +project(genann) + +set(SRC_FILES +genann.c +) + +add_library(genann ${SRC_FILES}) + +target_include_directories(genann PUBLIC + $ + $ +) + +# Install targets +install(TARGETS genann + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +# Install headers +if (INSTALL_HEADERS) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/genann.h DESTINATION include/genann) +endif() \ No newline at end of file diff --git a/ports/genann/CONTROL b/ports/genann/CONTROL new file mode 100644 index 000000000..6397319bb --- /dev/null +++ b/ports/genann/CONTROL @@ -0,0 +1,4 @@ +Source: genann +Version: 2019-07-10 +Homepage: https://github.com/codeplea/genann +Description: Genann is a minimal, well-tested library for training and using feedforward artificial neural networks (ANN) in C. diff --git a/ports/genann/portfile.cmake b/ports/genann/portfile.cmake new file mode 100644 index 000000000..4f1c21d06 --- /dev/null +++ b/ports/genann/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO codeplea/genann + REF 122243f9449b3e33a4e11450b70c10576d4559d7 + SHA512 d70cb8bc678d80ed3e790866f6060850cf9309eefe90d3ca4d77e28538639a927333d49c4d1af3e81123b8e88224f2f51b74ec41ca22639a276359568652ed15 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_RELEASE -DINSTALL_HEADERS=ON + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/genann) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/genann/LICENSE ${CURRENT_PACKAGES_DIR}/share/genann/copyright) + From e8de3953bcd8e6a4eb42e9a76136092c7e389e84 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Wed, 10 Jul 2019 23:13:58 -0700 Subject: [PATCH 0156/1066] [gherkin-b] update to latest (#7231) --- ports/gherkin-c/CONTROL | 2 +- ports/gherkin-c/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/gherkin-c/CONTROL b/ports/gherkin-c/CONTROL index b25786ca3..3ded48444 100644 --- a/ports/gherkin-c/CONTROL +++ b/ports/gherkin-c/CONTROL @@ -1,3 +1,3 @@ Source: gherkin-c -Version: 4.1.2 +Version: 2019-10-07 Description: Gherkin parser/compiler in C diff --git a/ports/gherkin-c/portfile.cmake b/ports/gherkin-c/portfile.cmake index 453387f5f..04e104235 100644 --- a/ports/gherkin-c/portfile.cmake +++ b/ports/gherkin-c/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO c-libs/gherkin-c - REF 8f31c2ff6a7b58196a061c8847508563679f67b3 - SHA512 f78a1f9da7ff38fe2546e0db9ed33a2e25e12aa8a407ce827933a379ce083e6f872b39eb2321ff8c35199015c3c2299e46567171c5edfeff07600765f3f0a6ec + REF dd180edc7d092311f2e90a0c4957061156d39dd3 + SHA512 c6b38ab0e7a0fd1061d86b0ff9d9140f8c3d6f15cfc1673e947254c6c03a66d3e6aae5b267b074aa10fa30ba2850190c9e9ea7c12e340e4f8c5575b9bf31bab3 HEAD_REF master ) From 44eff6b7b523c2e02dc33c18b3196face23921f2 Mon Sep 17 00:00:00 2001 From: Samuel Marks <807580+SamuelMarks@users.noreply.github.com> Date: Fri, 12 Jul 2019 04:09:48 +1000 Subject: [PATCH 0157/1066] [etcdcpp] Add new port (#6999) * [etcdpp] Add new port * [ports/etcdpp/CONTROL] Added homepage * [etcdpp] Change header namespace * [etcdcpp] Change target and port names * rename changes * change version to date offscale-libetcd-cpp is a rolling-release port --- ports/offscale-libetcd-cpp/CONTROL | 5 +++++ ports/offscale-libetcd-cpp/portfile.cmake | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 ports/offscale-libetcd-cpp/CONTROL create mode 100644 ports/offscale-libetcd-cpp/portfile.cmake diff --git a/ports/offscale-libetcd-cpp/CONTROL b/ports/offscale-libetcd-cpp/CONTROL new file mode 100644 index 000000000..ec080142c --- /dev/null +++ b/ports/offscale-libetcd-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: offscale-libetcd-cpp +Version: 2019-07-10 +Homepage: https://github.com/offscale/libetcd-cpp +Description: A C++ client library for etcd. etcd is a distributed, reliable key-value store. +Build-Depends: grpc, protobuf diff --git a/ports/offscale-libetcd-cpp/portfile.cmake b/ports/offscale-libetcd-cpp/portfile.cmake new file mode 100644 index 000000000..ffe4519f8 --- /dev/null +++ b/ports/offscale-libetcd-cpp/portfile.cmake @@ -0,0 +1,19 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO offscale/libetcd-cpp + REF 8607d8d7080c6eb447bc41b799a24bfdb87cf638 + SHA512 9bf4bf14fd52f4f6bbf8cf68de61e6a19eeffbdc501f05c8f614b5f13f206410884afd7fe226a077448e58e02990c65a6b27ee895ed34ba5ee701abe0500b875 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/offscale-libetcd-cpp RENAME copyright) + +vcpkg_copy_pdbs() From 7dbe375a2c270e91f9742dd78cf2b579d1f5f2fa Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Thu, 11 Jul 2019 17:00:55 -0700 Subject: [PATCH 0158/1066] Testing for --overlay-ports and --overlay-triplets args (#7243) --- toolsrc/src/tests.arguments.cpp | 40 +++++++++++++++++++++++++++++++-- toolsrc/src/tests.plan.cpp | 11 ++++----- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/toolsrc/src/tests.arguments.cpp b/toolsrc/src/tests.arguments.cpp index 533b3a0d0..e108b983a 100644 --- a/toolsrc/src/tests.arguments.cpp +++ b/toolsrc/src/tests.arguments.cpp @@ -15,24 +15,60 @@ namespace UnitTest1 { TEST_METHOD(create_from_arg_sequence_options_lower) { - std::vector t = {"--vcpkg-root", "C:\\vcpkg", "--scripts-root", "C:\\scripts", "--debug", "--sendmetrics", "--printmetrics"}; + std::vector t = { + "--vcpkg-root", "C:\\vcpkg", + "--scripts-root=C:\\scripts", + "--debug", + "--sendmetrics", + "--printmetrics", + "--overlay-ports=C:\\ports1", + "--overlay-ports=C:\\ports2", + "--overlay-triplets=C:\\tripletsA", + "--overlay-triplets=C:\\tripletsB" + }; auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); Assert::AreEqual("C:\\vcpkg", v.vcpkg_root_dir.get()->c_str()); Assert::AreEqual("C:\\scripts", v.scripts_root_dir.get()->c_str()); Assert::IsTrue(v.debug && *v.debug.get()); Assert::IsTrue(v.sendmetrics && v.sendmetrics.get()); Assert::IsTrue(v.printmetrics && *v.printmetrics.get()); + + Assert::IsTrue(v.overlay_ports.get()->size() == 2); + Assert::AreEqual("C:\\ports1", v.overlay_ports.get()->at(0).c_str()); + Assert::AreEqual("C:\\ports2", v.overlay_ports.get()->at(1).c_str()); + + Assert::IsTrue(v.overlay_triplets.get()->size() == 2); + Assert::AreEqual("C:\\tripletsA", v.overlay_triplets.get()->at(0).c_str()); + Assert::AreEqual("C:\\tripletsB", v.overlay_triplets.get()->at(1).c_str()); } TEST_METHOD(create_from_arg_sequence_options_upper) { - std::vector t = {"--VCPKG-ROOT", "C:\\vcpkg", "--SCRIPTS-ROOT", "C:\\scripts", "--DEBUG", "--SENDMETRICS", "--PRINTMETRICS"}; + std::vector t = { + "--VCPKG-ROOT", "C:\\vcpkg", + "--SCRIPTS-ROOT=C:\\scripts", + "--DEBUG", + "--SENDMETRICS", + "--PRINTMETRICS", + "--OVERLAY-PORTS=C:\\ports1", + "--OVERLAY-PORTS=C:\\ports2", + "--OVERLAY-TRIPLETS=C:\\tripletsA", + "--OVERLAY-TRIPLETS=C:\\tripletsB" + }; auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); Assert::AreEqual("C:\\vcpkg", v.vcpkg_root_dir.get()->c_str()); Assert::AreEqual("C:\\scripts", v.scripts_root_dir.get()->c_str()); Assert::IsTrue(v.debug && *v.debug.get()); Assert::IsTrue(v.sendmetrics && v.sendmetrics.get()); Assert::IsTrue(v.printmetrics && *v.printmetrics.get()); + + Assert::IsTrue(v.overlay_ports.get()->size() == 2); + Assert::AreEqual("C:\\ports1", v.overlay_ports.get()->at(0).c_str()); + Assert::AreEqual("C:\\ports2", v.overlay_ports.get()->at(1).c_str()); + + Assert::IsTrue(v.overlay_triplets.get()->size() == 2); + Assert::AreEqual("C:\\tripletsA", v.overlay_triplets.get()->at(0).c_str()); + Assert::AreEqual("C:\\tripletsB", v.overlay_triplets.get()->at(1).c_str()); } TEST_METHOD(create_from_arg_sequence_valued_options) diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index ab24266b4..9d8717878 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -89,14 +89,15 @@ namespace UnitTest1 const std::vector>& features = {}, const std::vector& default_features = {}) { - return emplace(std::move(*make_control_file(name, depends, features, default_features))); + auto scfl = SourceControlFileLocation { make_control_file(name, depends, features, default_features), "" }; + return emplace(std::move(scfl)); } - PackageSpec emplace(vcpkg::SourceControlFile&& scf) + + PackageSpec emplace(vcpkg::SourceControlFileLocation&& scfl) { - auto spec = PackageSpec::from_name_and_triplet(scf.core_paragraph->name, triplet); + auto spec = PackageSpec::from_name_and_triplet(scfl.source_control_file->core_paragraph->name, triplet); Assert::IsTrue(spec.has_value()); - map.emplace(scf.core_paragraph->name, - SourceControlFileLocation{std::unique_ptr(std::move(&scf)), ""}); + map.emplace(scfl.source_control_file->core_paragraph->name, std::move(scfl)); return PackageSpec{*spec.get()}; } }; From 5857e2c680fde9e37abc8f799f8d5509dd47ed62 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Mon, 8 Jul 2019 16:45:27 -0700 Subject: [PATCH 0159/1066] initial remove-in-parallel doesn't actually do parallel remove yet --- toolsrc/include/vcpkg/base/rng.h | 96 ++++++++++++++++++++++++++++ toolsrc/include/vcpkg/base/strings.h | 32 ++++++++++ toolsrc/src/vcpkg/base/files.cpp | 68 +++++++++++++++----- toolsrc/src/vcpkg/base/rng.cpp | 14 ++++ 4 files changed, 194 insertions(+), 16 deletions(-) create mode 100644 toolsrc/include/vcpkg/base/rng.h create mode 100644 toolsrc/src/vcpkg/base/rng.cpp diff --git a/toolsrc/include/vcpkg/base/rng.h b/toolsrc/include/vcpkg/base/rng.h new file mode 100644 index 000000000..1bcab05b3 --- /dev/null +++ b/toolsrc/include/vcpkg/base/rng.h @@ -0,0 +1,96 @@ +#pragma once + +#include +#include +#include + +namespace vcpkg { + + /* + NOTE(ubsan): taken from the xoshiro paper + initialized from random_device by default + actual code is copied from wikipedia, since I wrote that code + */ + struct splitmix64_engine { + splitmix64_engine() noexcept; + + constexpr splitmix64_engine(std::uint64_t seed) noexcept + : state(seed) {} + + constexpr std::uint64_t operator()() noexcept { + state += 0x9E3779B97F4A7C15; + + std::uint64_t result = state; + result = (result ^ (result >> 30)) * 0xBF58476D1CE4E5B9; + result = (result ^ (result >> 27)) * 0x94D049BB133111EB; + + return result ^ (result >> 31); + } + + constexpr std::uint64_t max() const noexcept { + return std::numeric_limits::max(); + } + + constexpr std::uint64_t min() const noexcept { + return std::numeric_limits::min(); + } + + private: + std::uint64_t state; + }; + + // Sebastian Vigna's xorshift-based xoshiro xoshiro256** engine + // fast and really good + // uses the splitmix64_engine to initialize state + struct xoshiro256ss_engine { + // splitmix64_engine will be initialized with random_device + xoshiro256ss_engine() noexcept { + splitmix64_engine sm64{}; + + for (std::uint64_t& s : this->state) { + s = sm64(); + } + } + + constexpr xoshiro256ss_engine(std::uint64_t seed) noexcept : state() { + splitmix64_engine sm64{seed}; + + for (std::uint64_t& s : this->state) { + s = sm64(); + } + } + + constexpr std::uint64_t operator()() noexcept { + std::uint64_t const result = rol(state[1] * 5, 7) * 9; + + std::uint64_t const t = state[1] << 17; + + // state[i] = state[i] ^ state[i + 4 mod 4] + state[2] ^= state[0]; + state[3] ^= state[1]; + state[1] ^= state[2]; + state[0] ^= state[3]; + + state[2] ^= t; + state[3] ^= rol(state[3], 45); + + return result; + } + + constexpr std::uint64_t max() const noexcept { + return std::numeric_limits::max(); + } + + constexpr std::uint64_t min() const noexcept { + return std::numeric_limits::min(); + } + private: + // rotate left + constexpr std::uint64_t rol(std::uint64_t x, int k) { + return (x << k) | (x >> (64 - k)); + } + + std::uint64_t state[4]; + }; + +} diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index d553d1d41..423ea2096 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -184,4 +184,36 @@ namespace vcpkg::Strings const char* search(StringView haystack, StringView needle); bool contains(StringView haystack, StringView needle); + + // base 64 encoding with URL and filesafe alphabet (base64url) + // based on IETF RFC 4648 + // ignores padding, since one implicitly knows the length from the size of x + template + std::string b64url_encode(Integral x) { + static_assert(std::is_integral_v); + auto value = static_cast>(x); + + // 64 values, plus the implicit \0 + constexpr static char map[0x41] = + /* 0123456789ABCDEF */ + /*0*/ "ABCDEFGHIJKLMNOP" + /*1*/ "QRSTUVWXYZabcdef" + /*2*/ "ghijklmnopqrstuv" + /*3*/ "wxyz0123456789-_" + ; + + constexpr static std::make_unsigned_t mask = 0x3F; + constexpr static int shift = 5; + + std::string result; + // reserve ceiling(number of bits / 3) + result.reserve((sizeof(value) * 8 + 2) / 3); + + while (value != 0) { + char mapped_value = map[value & mask]; + result.push_back(mapped_value); + } + + return result; + } } diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 5099795e9..d0926bb4c 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include +#include #include #include #include @@ -256,26 +257,61 @@ namespace vcpkg::Files virtual bool remove(const fs::path& path, std::error_code& ec) override { return fs::stdfs::remove(path, ec); } virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec) override { - // Working around the currently buggy remove_all() - std::uintmax_t out = fs::stdfs::remove_all(path, ec); + /* + does not use the std::filesystem call since it is buggy, and can + have spurious errors before VS 2017 update 6, and on later versions + (as well as on macOS and Linux), this is just as fast and will have + fewer spurious errors due to locks. + */ + struct recursive { + const fs::path& tmp_directory; + std::error_code& ec; + xoshiro256ss_engine& rng; - for (int i = 0; i < 5 && this->exists(path); i++) - { - using namespace std::chrono_literals; - std::this_thread::sleep_for(i * 100ms); - out += fs::stdfs::remove_all(path, ec); + void operator()(const fs::path& current) const { + const auto type = fs::stdfs::symlink_status(current, ec).type(); + if (ec) return; + + const auto tmp_name = Strings::b64url_encode(rng()); + const auto tmp_path = tmp_directory / tmp_name; + + switch (type) { + case fs::file_type::directory: { + fs::stdfs::rename(current, tmp_path, ec); + if (ec) return; + for (const auto& entry : fs::stdfs::directory_iterator(tmp_path)) { + (*this)(entry); + } + fs::stdfs::remove(tmp_path, ec); + } break; + case fs::file_type::symlink: + case fs::file_type::regular: { + fs::stdfs::rename(current, tmp_path, ec); + fs::stdfs::remove(current, ec); + } break; + case fs::file_type::not_found: return; + case fs::file_type::none: { + Checks::exit_with_message(VCPKG_LINE_INFO, "Error occurred when evaluating file type of file: %s", current); + } + default: { + Checks::exit_with_message(VCPKG_LINE_INFO, "Attempted to delete special file: %s", current); + } + } + } + }; + + auto const real_path = fs::stdfs::absolute(path); + + if (! real_path.has_parent_path()) { + Checks::exit_with_message(VCPKG_LINE_INFO, "Attempted to remove_all the base directory"); } - if (this->exists(path)) - { - System::print2( - System::Color::warning, - "Some files in ", - path.u8string(), - " were unable to be removed. Close any editors operating in this directory and retry.\n"); - } + // thoughts: is this fine? or should we do something different? + // maybe a temporary directory? + auto const base_path = real_path.parent_path(); - return out; + xoshiro256ss_engine rng{}; + recursive{base_path, ec, rng}(real_path); } virtual bool exists(const fs::path& path) const override { return fs::stdfs::exists(path); } virtual bool is_directory(const fs::path& path) const override { return fs::stdfs::is_directory(path); } diff --git a/toolsrc/src/vcpkg/base/rng.cpp b/toolsrc/src/vcpkg/base/rng.cpp new file mode 100644 index 000000000..9fe2ea3b4 --- /dev/null +++ b/toolsrc/src/vcpkg/base/rng.cpp @@ -0,0 +1,14 @@ +#include + +namespace vcpkg { + namespace { + std::random_device system_entropy{}; + } + + splitmix64_engine::splitmix64_engine() { + std::uint64_t top_half = system_entropy(); + std::uint64_t bottom_half = system_entropy(); + + state = (top_half << 32) | bottom_half; + } +} From 2d6df16849ebcf237d17c919727756d90974daba Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Wed, 10 Jul 2019 14:35:10 -0700 Subject: [PATCH 0160/1066] remove_all parallelized, and fix the issues with symlink --- toolsrc/include/vcpkg/base/files.h | 38 ++++- toolsrc/include/vcpkg/base/rng.h | 165 ++++++++++++++++---- toolsrc/include/vcpkg/base/work_queue.h | 183 +++++++++++++++++++++++ toolsrc/src/vcpkg/base/files.cpp | 190 +++++++++++++++++++----- toolsrc/src/vcpkg/base/rng.cpp | 4 +- 5 files changed, 508 insertions(+), 72 deletions(-) create mode 100644 toolsrc/include/vcpkg/base/work_queue.h diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 3ea0d6036..178fae541 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -12,14 +12,50 @@ namespace fs using stdfs::copy_options; using stdfs::file_status; using stdfs::file_type; + using stdfs::perms; using stdfs::path; using stdfs::u8path; + /* + std::experimental::filesystem's file_status and file_type are broken in + the presence of symlinks -- a symlink is treated as the object it points + to for `symlink_status` and `symlink_type` + */ + + using stdfs::status; + + // we want to poison ADL with these niebloids + constexpr struct { + file_status operator()(const path& p, std::error_code& ec) const noexcept; + file_status operator()(const path& p) const noexcept; + } symlink_status{}; + + constexpr struct { + inline bool operator()(file_status s) const { + return stdfs::is_symlink(s); + } + + inline bool operator()(const path& p) const { + return stdfs::is_symlink(symlink_status(p)); + } + inline bool operator()(const path& p, std::error_code& ec) const { + return stdfs::is_symlink(symlink_status(p, ec)); + } + } is_symlink{}; + inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); } inline bool is_directory(file_status s) { return stdfs::is_directory(s); } - inline bool is_symlink(file_status s) { return stdfs::is_symlink(s); } } +/* + if someone attempts to use unqualified `symlink_status` or `is_symlink`, + they might get the ADL version, which is broken. + Therefore, put `symlink_status` in the global namespace, so that they get + our symlink_status. +*/ +using fs::symlink_status; +using fs::is_symlink; + namespace vcpkg::Files { struct Filesystem diff --git a/toolsrc/include/vcpkg/base/rng.h b/toolsrc/include/vcpkg/base/rng.h index 1bcab05b3..4a0411f64 100644 --- a/toolsrc/include/vcpkg/base/rng.h +++ b/toolsrc/include/vcpkg/base/rng.h @@ -4,17 +4,56 @@ #include #include -namespace vcpkg { +namespace vcpkg::Rng { + + namespace detail { + template + constexpr std::size_t bitsize = sizeof(T) * CHAR_BITS; + + template + constexpr bool is_valid_shift(int k) { + return 0 <= k && k <= bitsize; + } + + // precondition: 0 <= k < bitsize + template + constexpr T ror(T x, int k) { + if (k == 0) { + return x; + } + return (x >> k) | (x << (bitsize - k)); + } + + // precondition: 0 <= k < bitsize + template + constexpr T rol(T x, int k) { + if (k == 0) { + return x; + } + return (x << k) | (x >> (bitsize - k)); + } + + // there _is_ a way to do this generally, but I don't know how to + template + struct XoshiroJumpTable; + + template <> + struct XoshiroJumpTable { + constexpr static std::uint64_t value[4] = { + 0x180ec6d33cfd0aba, 0xd5a61266f0c9392c, 0xa9582618e03fc9aa, 0x39abdc4529b1661c + }; + }; + } /* NOTE(ubsan): taken from the xoshiro paper initialized from random_device by default actual code is copied from wikipedia, since I wrote that code */ - struct splitmix64_engine { - splitmix64_engine() noexcept; + struct splitmix { + splitmix() noexcept; - constexpr splitmix64_engine(std::uint64_t seed) noexcept + constexpr splitmix(std::uint64_t seed) noexcept : state(seed) {} constexpr std::uint64_t operator()() noexcept { @@ -35,62 +74,126 @@ namespace vcpkg { return std::numeric_limits::min(); } + template + constexpr void fill(T* first, T* last) { + constexpr auto mask = + static_cast(std::numeric_limits::max()); + + const auto remaining = + (last - first) % (sizeof(std::uint64_t) / sizeof(T)); + + for (auto it = first; it != last - remaining;) { + const auto item = (*this)(); + for ( + int shift = 0; + shift < 64; + shift += detail::bitsize, ++it + ) { + *it = static_cast((item >> shift) & mask); + } + } + + if (remaining == 0) return; + + int shift = 0; + const auto item = (*this)(); + for (auto it = last - remaining; + it != last; + shift += detail::bitsize, ++it + ) { + *it = static_cast((item >> shift) & mask); + } + } + private: std::uint64_t state; }; - // Sebastian Vigna's xorshift-based xoshiro xoshiro256** engine + template + struct starstar_scrambler { + constexpr static UIntType scramble(UIntType n) noexcept { + return detail::rol(n * S, R) * T; + } + }; + + // Sebastian Vigna's xorshift-based xoshiro engine // fast and really good - // uses the splitmix64_engine to initialize state - struct xoshiro256ss_engine { - // splitmix64_engine will be initialized with random_device - xoshiro256ss_engine() noexcept { - splitmix64_engine sm64{}; + // uses the splitmix to initialize state + template + struct xoshiro_engine { + static_assert(detail::is_valid_shift(A)); + static_assert(detail::is_valid_shift(B)); + static_assert(std::is_unsigned_v); - for (std::uint64_t& s : this->state) { - s = sm64(); - } + // splitmix will be initialized with random_device + xoshiro_engine() noexcept { + splitmix sm{}; + + sm.fill(&state[0], &state[4]); } - constexpr xoshiro256ss_engine(std::uint64_t seed) noexcept : state() { - splitmix64_engine sm64{seed}; + constexpr xoshiro_engine(std::uint64_t seed) noexcept : state() { + splitmix sm{seed}; - for (std::uint64_t& s : this->state) { - s = sm64(); - } + sm.fill(&state[0], &state[4]); } - constexpr std::uint64_t operator()() noexcept { - std::uint64_t const result = rol(state[1] * 5, 7) * 9; + constexpr UIntType operator()() noexcept { + const UIntType result = Scrambler::scramble(state[0]); - std::uint64_t const t = state[1] << 17; + const UIntType t = state[1] << A; - // state[i] = state[i] ^ state[i + 4 mod 4] state[2] ^= state[0]; state[3] ^= state[1]; state[1] ^= state[2]; state[0] ^= state[3]; state[2] ^= t; - state[3] ^= rol(state[3], 45); + state[3] ^= detail::rol(state[3], B); return result; } - constexpr std::uint64_t max() const noexcept { - return std::numeric_limits::max(); + constexpr UIntType max() const noexcept { + return std::numeric_limits::max(); } constexpr std::uint64_t min() const noexcept { - return std::numeric_limits::min(); + return std::numeric_limits::min(); + } + + // quickly jump ahead 2^e steps + // takes 4 * bitsize rng next operations + template + constexpr void discard_e() noexcept { + using JT = detail::XoshiroJumpTable; + + UIntType s[4] = {}; + for (const auto& jump : JT::value) { + for (std::size_t i = 0; i < bitsize; ++i) { + if ((jump >> i) & 1) { + s[0] ^= state[0]; + s[1] ^= state[1]; + s[2] ^= state[2]; + s[3] ^= state[3]; + } + (*this)(); + } + } + + state[0] = s[0]; + state[1] = s[1]; + state[2] = s[2]; + state[3] = s[3]; } private: // rotate left - constexpr std::uint64_t rol(std::uint64_t x, int k) { - return (x << k) | (x >> (64 - k)); - } - - std::uint64_t state[4]; + UIntType state[4]; }; + using xoshiro256ss = xoshiro_engine< + std::uint64_t, + starstar_scrambler, + 17, + 45>; } diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h new file mode 100644 index 000000000..4db167fa6 --- /dev/null +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -0,0 +1,183 @@ +#pragma once + +#include +#include + +namespace vcpkg { + namespace detail { + template + auto call_action( + Action& action, + const WorkQueue& work_queue, + ThreadLocalData& tld + ) -> decltype(static_cast(std::move(action)(tld, work_queue))) + { + std::move(action)(tld, work_queue); + } + + template + auto call_action( + Action& action, + const WorkQueue&, + ThreadLocalData& tld + ) -> decltype(static_cast(std::move(action)(tld))) + { + std::move(action)(tld); + } + } + + template + struct WorkQueue { + template + explicit WorkQueue(const F& initializer) noexcept { + state = State::Joining; + + std::size_t num_threads = std::thread::hardware_concurrency(); + if (num_threads == 0) { + num_threads = 4; + } + + m_threads.reserve(num_threads); + for (std::size_t i = 0; i < num_threads; ++i) { + m_threads.emplace_back(this, initializer); + } + } + + WorkQueue(WorkQueue const&) = delete; + WorkQueue(WorkQueue&&) = delete; + + ~WorkQueue() = default; + + // runs all remaining tasks, and blocks on their finishing + // if this is called in an existing task, _will block forever_ + // DO NOT DO THAT + // thread-unsafe + void join() { + { + auto lck = std::unique_lock(m_mutex); + if (m_state == State::Running) { + m_state = State::Joining; + } else if (m_state == State::Joining) { + Checks::exit_with_message(VCPKG_LINE_INFO, "Attempted to join more than once"); + } + } + for (auto& thrd : m_threads) { + thrd.join(); + } + } + + // useful in the case of errors + // doesn't stop any existing running tasks + // returns immediately, so that one can call this in a task + void terminate() const { + { + auto lck = std::unique_lock(m_mutex); + m_state = State::Terminated; + } + m_cv.notify_all(); + } + + void enqueue_action(Action a) const { + { + auto lck = std::unique_lock(m_mutex); + m_actions.push_back(std::move(a)); + } + m_cv.notify_one(); + } + + template + void enqueue_all_actions_by_move(Rng&& rng) const { + { + using std::begin; + using std::end; + + auto lck = std::unique_lock(m_mutex); + + auto first = begin(rng); + auto last = end(rng); + + m_actions.reserve(m_actions.size() + (end - begin)); + + std::move(first, last, std::back_insert_iterator(rng)); + } + + m_cv.notify_all(); + } + + template + void enqueue_all_actions(Rng&& rng) const { + { + using std::begin; + using std::end; + + auto lck = std::unique_lock(m_mutex); + + auto first = begin(rng); + auto last = end(rng); + + m_actions.reserve(m_actions.size() + (end - begin)); + + std::copy(first, last, std::back_insert_iterator(rng)); + } + + m_cv.notify_all(); + } + + private: + friend struct WorkQueueWorker { + const WorkQueue* work_queue; + ThreadLocalData tld; + + template + WorkQueueWorker(const WorkQueue* work_queue, const F& initializer) + : work_queue(work_queue), tld(initializer()) + { } + + void operator()() { + for (;;) { + auto lck = std::unique_lock(work_queue->m_mutex); + ++work_queue->running_workers; + + const auto state = work_queue->m_state; + + if (state == State::Terminated) { + --work_queue->running_workers; + return; + } + + if (work_queue->m_actions.empty()) { + --work_queue->running_workers; + if (state == State::Running || work_queue->running_workers > 0) { + work_queue->m_cv.wait(lck); + continue; + } + + // state == State::Joining and we are the only worker + // no more work! + return; + } + + Action action = work_queue->m_actions.pop_back(); + lck.unlock(); + + detail::call_action(action, *work_queue, tld); + } + } + }; + + enum class State : std::uint16_t { + Running, + Joining, + Terminated, + }; + + mutable std::mutex m_mutex; + // these four are under m_mutex + mutable State m_state; + mutable std::uint16_t running_workers; + mutable std::vector m_actions; + mutable std::condition_variable condition_variable; + + std::vector m_threads; + }; +} diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index d0926bb4c..e89c531be 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #if defined(__linux__) || defined(__APPLE__) @@ -21,6 +22,45 @@ #include #endif +namespace fs { + file_status decltype(symlink_status)::operator()(const path& p, std::error_code& ec) const noexcept { +#if defined(_WIN32) + /* + do not find the permissions of the file -- it's unnecessary for the + things that vcpkg does. + if one were to add support for this in the future, one should look + into GetFileSecurityW + */ + perms permissions = perms::unknown; + + WIN32_FILE_ATTRIBUTE_DATA file_attributes; + file_type ft = file_type::unknown; + if (!GetFileAttributesExW(p.c_str(), GetFileExInfoStandard, &file_attributes)) { + ft = file_type::not_found; + } else if (file_attributes.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) { + // check for reparse point -- if yes, then symlink + ft = file_type::symlink; + } else if (file_attributes.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + ft = file_type::directory; + } else { + // otherwise, the file is a regular file + ft = file_type::regular; + } + + return file_status(ft, permissions); + +#else + return stdfs::symlink_status(p, ec); +#endif + } + + file_status decltype(symlink_status)::operator()(const path& p) const noexcept { + std::error_code ec; + auto result = symlink_status(p, ec); + if (ec) vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, "error getting status of path %s: %s", p, ec.message()); + } +} + namespace vcpkg::Files { static const std::regex FILESYSTEM_INVALID_CHARACTERS_REGEX = std::regex(R"([\/:*?"<>|])"); @@ -263,55 +303,129 @@ namespace vcpkg::Files (as well as on macOS and Linux), this is just as fast and will have fewer spurious errors due to locks. */ - struct recursive { - const fs::path& tmp_directory; - std::error_code& ec; - xoshiro256ss_engine& rng; - void operator()(const fs::path& current) const { - const auto type = fs::stdfs::symlink_status(current, ec).type(); - if (ec) return; + /* + `remove` doesn't actually remove anything -- it simply moves the + files into a parent directory (which ends up being at `path`), + and then inserts `actually_remove{current_path}` into the work + queue. + */ + struct remove { + struct tld { + const fs::path& tmp_directory; + std::uint64_t index; - const auto tmp_name = Strings::b64url_encode(rng()); - const auto tmp_path = tmp_directory / tmp_name; + std::atomic& files_deleted; - switch (type) { - case fs::file_type::directory: { - fs::stdfs::rename(current, tmp_path, ec); - if (ec) return; - for (const auto& entry : fs::stdfs::directory_iterator(tmp_path)) { - (*this)(entry); + std::mutex& ec_mutex; + std::error_code& ec; + }; + + struct actually_remove; + using queue = WorkQueue; + + /* + if `current_path` is a directory, first `remove`s all + elements of the directory, then calls remove. + + else, just calls remove. + */ + struct actually_remove { + fs::path current_path; + + void operator()(tld& info, const queue& queue) const { + std::error_code ec; + const auto path_type = fs::symlink_status(current_path, ec).type(); + + if (check_ec(ec, info, queue)) return; + + if (path_type == fs::file_type::directory) { + for (const auto& entry : fs::stdfs::directory_iterator(current_path)) { + remove{}(entry, info, queue); + } + } + + if (fs::stdfs::remove(current_path, ec)) { + info.files_deleted.fetch_add(1, std::memory_order_relaxed); + } else { + check_ec(ec, info, queue); } - fs::stdfs::remove(tmp_path, ec); - } break; - case fs::file_type::symlink: - case fs::file_type::regular: { - fs::stdfs::rename(current, tmp_path, ec); - fs::stdfs::remove(current, ec); - } break; - case fs::file_type::not_found: return; - case fs::file_type::none: { - Checks::exit_with_message(VCPKG_LINE_INFO, "Error occurred when evaluating file type of file: %s", current); - } - default: { - Checks::exit_with_message(VCPKG_LINE_INFO, "Attempted to delete special file: %s", current); } + }; + + static bool check_ec(const std::error_code& ec, tld& info, const queue& queue) { + if (ec) { + queue.terminate(); + + auto lck = std::unique_lock(info.ec_mutex); + if (!info.ec) { + info.ec = ec; + } + + return true; + } else { + return false; } } + + void operator()(const fs::path& current_path, tld& info, const queue& queue) const { + std::error_code ec; + + const auto type = fs::symlink_status(current_path, ec).type(); + if (check_ec(ec, info, queue)) return; + + const auto tmp_name = Strings::b64url_encode(info.index++); + const auto tmp_path = info.tmp_directory / tmp_name; + + fs::stdfs::rename(current_path, tmp_path, ec); + if (check_ec(ec, info, queue)) return; + + queue.enqueue_action(actually_remove{std::move(tmp_path)}); + } }; - auto const real_path = fs::stdfs::absolute(path); + const auto path_type = fs::symlink_status(path, ec).type(); - if (! real_path.has_parent_path()) { - Checks::exit_with_message(VCPKG_LINE_INFO, "Attempted to remove_all the base directory"); + std::atomic files_deleted = 0; + + if (path_type == fs::file_type::directory) { + std::uint64_t index = 0; + std::mutex ec_mutex; + + auto queue = remove::queue([&] { + index += 1 << 32; + return remove::tld{path, index, files_deleted, ec_mutex, ec}; + }); + + index += 1 << 32; + auto main_tld = remove::tld{path, index, files_deleted, ec_mutex, ec}; + for (const auto& entry : fs::stdfs::directory_iterator(path)) { + remove{}(entry, main_tld, queue); + } + + queue.join(); } - // thoughts: is this fine? or should we do something different? - // maybe a temporary directory? - auto const base_path = real_path.parent_path(); + /* + we need to do backoff on the removal of the top level directory, + since we need to place all moved files into that top level + directory, and so we can only delete the directory after all the + lower levels have been deleted. + */ + for (int backoff = 0; backoff < 5; ++backoff) { + if (backoff) { + using namespace std::chrono_literals; + auto backoff_time = 100ms * backoff; + std::this_thread::sleep_for(backoff_time); + } - xoshiro256ss_engine rng{}; - recursive{base_path, ec, rng}(real_path); + if (fs::stdfs::remove(path, ec)) { + files_deleted.fetch_add(1, std::memory_order_relaxed); + break; + } + } + + return files_deleted; } virtual bool exists(const fs::path& path) const override { return fs::stdfs::exists(path); } virtual bool is_directory(const fs::path& path) const override { return fs::stdfs::is_directory(path); } @@ -343,11 +457,11 @@ namespace vcpkg::Files virtual fs::file_status status(const fs::path& path, std::error_code& ec) const override { - return fs::stdfs::status(path, ec); + return fs::status(path, ec); } virtual fs::file_status symlink_status(const fs::path& path, std::error_code& ec) const override { - return fs::stdfs::symlink_status(path, ec); + return fs::symlink_status(path, ec); } virtual void write_contents(const fs::path& file_path, const std::string& data, std::error_code& ec) override { diff --git a/toolsrc/src/vcpkg/base/rng.cpp b/toolsrc/src/vcpkg/base/rng.cpp index 9fe2ea3b4..40ff646b7 100644 --- a/toolsrc/src/vcpkg/base/rng.cpp +++ b/toolsrc/src/vcpkg/base/rng.cpp @@ -1,11 +1,11 @@ #include -namespace vcpkg { +namespace vcpkg::Rng { namespace { std::random_device system_entropy{}; } - splitmix64_engine::splitmix64_engine() { + splitmix::splitmix() { std::uint64_t top_half = system_entropy(); std::uint64_t bottom_half = system_entropy(); From 43493b56df7c8f7aab02256ab7f65135d4dd1d4c Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Wed, 10 Jul 2019 15:18:44 -0700 Subject: [PATCH 0161/1066] delete the random number generator --- toolsrc/include/vcpkg/base/rng.h | 199 ------------------------------- toolsrc/src/vcpkg/base/rng.cpp | 14 --- 2 files changed, 213 deletions(-) delete mode 100644 toolsrc/include/vcpkg/base/rng.h delete mode 100644 toolsrc/src/vcpkg/base/rng.cpp diff --git a/toolsrc/include/vcpkg/base/rng.h b/toolsrc/include/vcpkg/base/rng.h deleted file mode 100644 index 4a0411f64..000000000 --- a/toolsrc/include/vcpkg/base/rng.h +++ /dev/null @@ -1,199 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace vcpkg::Rng { - - namespace detail { - template - constexpr std::size_t bitsize = sizeof(T) * CHAR_BITS; - - template - constexpr bool is_valid_shift(int k) { - return 0 <= k && k <= bitsize; - } - - // precondition: 0 <= k < bitsize - template - constexpr T ror(T x, int k) { - if (k == 0) { - return x; - } - return (x >> k) | (x << (bitsize - k)); - } - - // precondition: 0 <= k < bitsize - template - constexpr T rol(T x, int k) { - if (k == 0) { - return x; - } - return (x << k) | (x >> (bitsize - k)); - } - - // there _is_ a way to do this generally, but I don't know how to - template - struct XoshiroJumpTable; - - template <> - struct XoshiroJumpTable { - constexpr static std::uint64_t value[4] = { - 0x180ec6d33cfd0aba, 0xd5a61266f0c9392c, 0xa9582618e03fc9aa, 0x39abdc4529b1661c - }; - }; - } - - /* - NOTE(ubsan): taken from the xoshiro paper - initialized from random_device by default - actual code is copied from wikipedia, since I wrote that code - */ - struct splitmix { - splitmix() noexcept; - - constexpr splitmix(std::uint64_t seed) noexcept - : state(seed) {} - - constexpr std::uint64_t operator()() noexcept { - state += 0x9E3779B97F4A7C15; - - std::uint64_t result = state; - result = (result ^ (result >> 30)) * 0xBF58476D1CE4E5B9; - result = (result ^ (result >> 27)) * 0x94D049BB133111EB; - - return result ^ (result >> 31); - } - - constexpr std::uint64_t max() const noexcept { - return std::numeric_limits::max(); - } - - constexpr std::uint64_t min() const noexcept { - return std::numeric_limits::min(); - } - - template - constexpr void fill(T* first, T* last) { - constexpr auto mask = - static_cast(std::numeric_limits::max()); - - const auto remaining = - (last - first) % (sizeof(std::uint64_t) / sizeof(T)); - - for (auto it = first; it != last - remaining;) { - const auto item = (*this)(); - for ( - int shift = 0; - shift < 64; - shift += detail::bitsize, ++it - ) { - *it = static_cast((item >> shift) & mask); - } - } - - if (remaining == 0) return; - - int shift = 0; - const auto item = (*this)(); - for (auto it = last - remaining; - it != last; - shift += detail::bitsize, ++it - ) { - *it = static_cast((item >> shift) & mask); - } - } - - private: - std::uint64_t state; - }; - - template - struct starstar_scrambler { - constexpr static UIntType scramble(UIntType n) noexcept { - return detail::rol(n * S, R) * T; - } - }; - - // Sebastian Vigna's xorshift-based xoshiro engine - // fast and really good - // uses the splitmix to initialize state - template - struct xoshiro_engine { - static_assert(detail::is_valid_shift(A)); - static_assert(detail::is_valid_shift(B)); - static_assert(std::is_unsigned_v); - - // splitmix will be initialized with random_device - xoshiro_engine() noexcept { - splitmix sm{}; - - sm.fill(&state[0], &state[4]); - } - - constexpr xoshiro_engine(std::uint64_t seed) noexcept : state() { - splitmix sm{seed}; - - sm.fill(&state[0], &state[4]); - } - - constexpr UIntType operator()() noexcept { - const UIntType result = Scrambler::scramble(state[0]); - - const UIntType t = state[1] << A; - - state[2] ^= state[0]; - state[3] ^= state[1]; - state[1] ^= state[2]; - state[0] ^= state[3]; - - state[2] ^= t; - state[3] ^= detail::rol(state[3], B); - - return result; - } - - constexpr UIntType max() const noexcept { - return std::numeric_limits::max(); - } - - constexpr std::uint64_t min() const noexcept { - return std::numeric_limits::min(); - } - - // quickly jump ahead 2^e steps - // takes 4 * bitsize rng next operations - template - constexpr void discard_e() noexcept { - using JT = detail::XoshiroJumpTable; - - UIntType s[4] = {}; - for (const auto& jump : JT::value) { - for (std::size_t i = 0; i < bitsize; ++i) { - if ((jump >> i) & 1) { - s[0] ^= state[0]; - s[1] ^= state[1]; - s[2] ^= state[2]; - s[3] ^= state[3]; - } - (*this)(); - } - } - - state[0] = s[0]; - state[1] = s[1]; - state[2] = s[2]; - state[3] = s[3]; - } - private: - // rotate left - UIntType state[4]; - }; - - using xoshiro256ss = xoshiro_engine< - std::uint64_t, - starstar_scrambler, - 17, - 45>; -} diff --git a/toolsrc/src/vcpkg/base/rng.cpp b/toolsrc/src/vcpkg/base/rng.cpp deleted file mode 100644 index 40ff646b7..000000000 --- a/toolsrc/src/vcpkg/base/rng.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include - -namespace vcpkg::Rng { - namespace { - std::random_device system_entropy{}; - } - - splitmix::splitmix() { - std::uint64_t top_half = system_entropy(); - std::uint64_t bottom_half = system_entropy(); - - state = (top_half << 32) | bottom_half; - } -} From 3b6d6b3465e0e79999e5995f0104a6e8c021088c Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Wed, 10 Jul 2019 15:42:13 -0700 Subject: [PATCH 0162/1066] actually get the code compiling --- toolsrc/include/vcpkg/base/work_queue.h | 42 ++++++++++++++----------- toolsrc/src/vcpkg/base/files.cpp | 9 +++--- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h index 4db167fa6..71e00a2ab 100644 --- a/toolsrc/include/vcpkg/base/work_queue.h +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -1,10 +1,15 @@ #pragma once +#include #include #include namespace vcpkg { + template + struct WorkQueue; + namespace detail { + // for SFINAE purposes, keep out of the class template auto call_action( Action& action, @@ -29,8 +34,8 @@ namespace vcpkg { template struct WorkQueue { template - explicit WorkQueue(const F& initializer) noexcept { - state = State::Joining; + explicit WorkQueue(const F& tld_init) noexcept { + m_state = State::Running; std::size_t num_threads = std::thread::hardware_concurrency(); if (num_threads == 0) { @@ -39,7 +44,7 @@ namespace vcpkg { m_threads.reserve(num_threads); for (std::size_t i = 0; i < num_threads; ++i) { - m_threads.emplace_back(this, initializer); + m_threads.push_back(std::thread(Worker{this, tld_init()})); } } @@ -93,10 +98,10 @@ namespace vcpkg { auto lck = std::unique_lock(m_mutex); - auto first = begin(rng); - auto last = end(rng); + const auto first = begin(rng); + const auto last = end(rng); - m_actions.reserve(m_actions.size() + (end - begin)); + m_actions.reserve(m_actions.size() + (last - first)); std::move(first, last, std::back_insert_iterator(rng)); } @@ -112,10 +117,10 @@ namespace vcpkg { auto lck = std::unique_lock(m_mutex); - auto first = begin(rng); - auto last = end(rng); + const auto first = begin(rng); + const auto last = end(rng); - m_actions.reserve(m_actions.size() + (end - begin)); + m_actions.reserve(m_actions.size() + (last - first)); std::copy(first, last, std::back_insert_iterator(rng)); } @@ -124,18 +129,15 @@ namespace vcpkg { } private: - friend struct WorkQueueWorker { + struct Worker { const WorkQueue* work_queue; ThreadLocalData tld; - template - WorkQueueWorker(const WorkQueue* work_queue, const F& initializer) - : work_queue(work_queue), tld(initializer()) - { } - void operator()() { + // unlocked when waiting, or when in the `call_action` block + // locked otherwise + auto lck = std::unique_lock(work_queue->m_mutex); for (;;) { - auto lck = std::unique_lock(work_queue->m_mutex); ++work_queue->running_workers; const auto state = work_queue->m_state; @@ -157,10 +159,12 @@ namespace vcpkg { return; } - Action action = work_queue->m_actions.pop_back(); - lck.unlock(); + Action action = std::move(work_queue->m_actions.back()); + work_queue->m_actions.pop_back(); + lck.unlock(); detail::call_action(action, *work_queue, tld); + lck.lock(); } } }; @@ -176,7 +180,7 @@ namespace vcpkg { mutable State m_state; mutable std::uint16_t running_workers; mutable std::vector m_actions; - mutable std::condition_variable condition_variable; + mutable std::condition_variable m_cv; std::vector m_threads; }; diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index e89c531be..d8a982164 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -1,7 +1,6 @@ #include "pch.h" #include -#include #include #include #include @@ -57,7 +56,9 @@ namespace fs { file_status decltype(symlink_status)::operator()(const path& p) const noexcept { std::error_code ec; auto result = symlink_status(p, ec); - if (ec) vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, "error getting status of path %s: %s", p, ec.message()); + if (ec) vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, "error getting status of path %s: %s", p.string(), ec.message()); + + return result; } } @@ -393,11 +394,11 @@ namespace vcpkg::Files std::mutex ec_mutex; auto queue = remove::queue([&] { - index += 1 << 32; + index += static_cast(1) << 32; return remove::tld{path, index, files_deleted, ec_mutex, ec}; }); - index += 1 << 32; + index += static_cast(1) << 32; auto main_tld = remove::tld{path, index, files_deleted, ec_mutex, ec}; for (const auto& entry : fs::stdfs::directory_iterator(path)) { remove{}(entry, main_tld, queue); From 5b76f24f35976739991941d3b6289fb78fd93648 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Wed, 10 Jul 2019 16:28:56 -0700 Subject: [PATCH 0163/1066] make this compile on macos --- toolsrc/include/vcpkg/base/files.h | 35 ++++++++++++++++------------ toolsrc/include/vcpkg/base/strings.h | 2 +- toolsrc/src/vcpkg/base/files.cpp | 6 ++--- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 178fae541..33f464779 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -25,23 +25,28 @@ namespace fs using stdfs::status; // we want to poison ADL with these niebloids - constexpr struct { - file_status operator()(const path& p, std::error_code& ec) const noexcept; - file_status operator()(const path& p) const noexcept; - } symlink_status{}; - constexpr struct { - inline bool operator()(file_status s) const { - return stdfs::is_symlink(s); - } + namespace detail { + struct symlink_status_t { + file_status operator()(const path& p, std::error_code& ec) const noexcept; + file_status operator()(const path& p) const noexcept; + }; + struct is_symlink_t { + inline bool operator()(file_status s) const { + return stdfs::is_symlink(s); + } - inline bool operator()(const path& p) const { - return stdfs::is_symlink(symlink_status(p)); - } - inline bool operator()(const path& p, std::error_code& ec) const { - return stdfs::is_symlink(symlink_status(p, ec)); - } - } is_symlink{}; + inline bool operator()(const path& p) const { + return stdfs::is_symlink(symlink_status(p)); + } + inline bool operator()(const path& p, std::error_code& ec) const { + return stdfs::is_symlink(symlink_status(p, ec)); + } + }; + } + + constexpr detail::symlink_status_t symlink_status{}; + constexpr detail::is_symlink_t is_symlink{}; inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); } inline bool is_directory(file_status s) { return stdfs::is_directory(s); } diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 423ea2096..82145b826 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -190,7 +190,7 @@ namespace vcpkg::Strings // ignores padding, since one implicitly knows the length from the size of x template std::string b64url_encode(Integral x) { - static_assert(std::is_integral_v); + static_assert(std::is_integral::value, "b64url_encode must take an integer type"); auto value = static_cast>(x); // 64 values, plus the implicit \0 diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index d8a982164..f4c2106d4 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -21,8 +21,8 @@ #include #endif -namespace fs { - file_status decltype(symlink_status)::operator()(const path& p, std::error_code& ec) const noexcept { +namespace fs::detail { + file_status symlink_status_t::operator()(const path& p, std::error_code& ec) const noexcept { #if defined(_WIN32) /* do not find the permissions of the file -- it's unnecessary for the @@ -53,7 +53,7 @@ namespace fs { #endif } - file_status decltype(symlink_status)::operator()(const path& p) const noexcept { + file_status symlink_status_t::operator()(const path& p) const noexcept { std::error_code ec; auto result = symlink_status(p, ec); if (ec) vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, "error getting status of path %s: %s", p.string(), ec.message()); From bb579072077153fabfa74acec852bce222265357 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Wed, 10 Jul 2019 17:39:04 -0700 Subject: [PATCH 0164/1066] make it compile on macos under g++6 --- toolsrc/include/vcpkg/base/strings.h | 6 ++++-- toolsrc/include/vcpkg/base/work_queue.h | 4 ++-- toolsrc/src/vcpkg/base/files.cpp | 13 +++++-------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 82145b826..9890bedbc 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -191,7 +191,8 @@ namespace vcpkg::Strings template std::string b64url_encode(Integral x) { static_assert(std::is_integral::value, "b64url_encode must take an integer type"); - auto value = static_cast>(x); + using Unsigned = std::make_unsigned_t; + auto value = static_cast(x); // 64 values, plus the implicit \0 constexpr static char map[0x41] = @@ -202,8 +203,8 @@ namespace vcpkg::Strings /*3*/ "wxyz0123456789-_" ; - constexpr static std::make_unsigned_t mask = 0x3F; constexpr static int shift = 5; + constexpr static auto mask = (static_cast(1) << shift) - 1; std::string result; // reserve ceiling(number of bits / 3) @@ -212,6 +213,7 @@ namespace vcpkg::Strings while (value != 0) { char mapped_value = map[value & mask]; result.push_back(mapped_value); + value >>= shift; } return result; diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h index 71e00a2ab..8a3d27538 100644 --- a/toolsrc/include/vcpkg/base/work_queue.h +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -103,7 +103,7 @@ namespace vcpkg { m_actions.reserve(m_actions.size() + (last - first)); - std::move(first, last, std::back_insert_iterator(rng)); + std::move(first, last, std::back_inserter(rng)); } m_cv.notify_all(); @@ -122,7 +122,7 @@ namespace vcpkg { m_actions.reserve(m_actions.size() + (last - first)); - std::copy(first, last, std::back_insert_iterator(rng)); + std::copy(first, last, std::back_inserter(rng)); } m_cv.notify_all(); diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index f4c2106d4..8bc37819a 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -129,7 +129,7 @@ namespace vcpkg::Files file_stream.read(&output[0], length); file_stream.close(); - return std::move(output); + return output; } virtual Expected> read_lines(const fs::path& file_path) const override { @@ -147,7 +147,7 @@ namespace vcpkg::Files } file_stream.close(); - return std::move(output); + return output; } virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const override @@ -372,9 +372,6 @@ namespace vcpkg::Files void operator()(const fs::path& current_path, tld& info, const queue& queue) const { std::error_code ec; - const auto type = fs::symlink_status(current_path, ec).type(); - if (check_ec(ec, info, queue)) return; - const auto tmp_name = Strings::b64url_encode(info.index++); const auto tmp_path = info.tmp_directory / tmp_name; @@ -387,16 +384,16 @@ namespace vcpkg::Files const auto path_type = fs::symlink_status(path, ec).type(); - std::atomic files_deleted = 0; + std::atomic files_deleted{0}; if (path_type == fs::file_type::directory) { std::uint64_t index = 0; std::mutex ec_mutex; - auto queue = remove::queue([&] { + remove::queue queue{[&] { index += static_cast(1) << 32; return remove::tld{path, index, files_deleted, ec_mutex, ec}; - }); + }}; index += static_cast(1) << 32; auto main_tld = remove::tld{path, index, files_deleted, ec_mutex, ec}; From 319023587558a9f8de9d7eabeb7441ef2e7ee277 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Thu, 11 Jul 2019 10:53:32 -0700 Subject: [PATCH 0165/1066] fix some comments from code reviewers --- toolsrc/include/vcpkg/base/strings.h | 10 ++++++---- toolsrc/include/vcpkg/base/work_queue.h | 15 +++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 9890bedbc..25cd302b0 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -208,11 +208,13 @@ namespace vcpkg::Strings std::string result; // reserve ceiling(number of bits / 3) - result.reserve((sizeof(value) * 8 + 2) / 3); + result.resize((sizeof(value) * 8 + 2) / 3, map[0]); - while (value != 0) { - char mapped_value = map[value & mask]; - result.push_back(mapped_value); + for (char& c: result) { + if (value == 0) { + break; + } + c = map[value & mask]; value >>= shift; } diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h index 8a3d27538..b6f070cd8 100644 --- a/toolsrc/include/vcpkg/base/work_queue.h +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -11,7 +11,7 @@ namespace vcpkg { namespace detail { // for SFINAE purposes, keep out of the class template - auto call_action( + auto call_moved_action( Action& action, const WorkQueue& work_queue, ThreadLocalData& tld @@ -21,7 +21,7 @@ namespace vcpkg { } template - auto call_action( + auto call_moved_action( Action& action, const WorkQueue&, ThreadLocalData& tld @@ -134,21 +134,18 @@ namespace vcpkg { ThreadLocalData tld; void operator()() { - // unlocked when waiting, or when in the `call_action` block + // unlocked when waiting, or when in the `call_moved_action` + // block // locked otherwise auto lck = std::unique_lock(work_queue->m_mutex); for (;;) { - ++work_queue->running_workers; - const auto state = work_queue->m_state; if (state == State::Terminated) { - --work_queue->running_workers; return; } if (work_queue->m_actions.empty()) { - --work_queue->running_workers; if (state == State::Running || work_queue->running_workers > 0) { work_queue->m_cv.wait(lck); continue; @@ -162,9 +159,11 @@ namespace vcpkg { Action action = std::move(work_queue->m_actions.back()); work_queue->m_actions.pop_back(); + ++work_queue->running_workers; lck.unlock(); - detail::call_action(action, *work_queue, tld); + detail::call_moved_action(action, *work_queue, tld); lck.lock(); + --work_queue->running_workers; } } }; From 510b0c5cc0233311b6993b89cd5ce488218ed78d Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Thu, 11 Jul 2019 15:01:29 -0700 Subject: [PATCH 0166/1066] fix more comments --- toolsrc/include/vcpkg/base/files.h | 29 +++-- toolsrc/include/vcpkg/base/strings.h | 35 +----- toolsrc/include/vcpkg/base/work_queue.h | 102 +++++++++++++---- toolsrc/src/vcpkg/archives.cpp | 5 +- toolsrc/src/vcpkg/base/files.cpp | 133 ++++++++++++++++------- toolsrc/src/vcpkg/base/strings.cpp | 42 +++++++ toolsrc/src/vcpkg/build.cpp | 12 +- toolsrc/src/vcpkg/commands.exportifw.cpp | 16 ++- toolsrc/src/vcpkg/commands.portsdiff.cpp | 2 +- toolsrc/src/vcpkg/export.cpp | 6 +- toolsrc/src/vcpkg/install.cpp | 3 +- toolsrc/src/vcpkg/remove.cpp | 3 +- 12 files changed, 269 insertions(+), 119 deletions(-) diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 33f464779..6cad3d461 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -29,27 +29,29 @@ namespace fs namespace detail { struct symlink_status_t { file_status operator()(const path& p, std::error_code& ec) const noexcept; - file_status operator()(const path& p) const noexcept; + file_status operator()(const path& p, vcpkg::LineInfo li) const noexcept; }; struct is_symlink_t { inline bool operator()(file_status s) const { return stdfs::is_symlink(s); } - - inline bool operator()(const path& p) const { - return stdfs::is_symlink(symlink_status(p)); + }; + struct is_regular_file_t { + inline bool operator()(file_status s) const { + return stdfs::is_regular_file(s); } - inline bool operator()(const path& p, std::error_code& ec) const { - return stdfs::is_symlink(symlink_status(p, ec)); + }; + struct is_directory_t { + inline bool operator()(file_status s) const { + return stdfs::is_directory(s); } }; } constexpr detail::symlink_status_t symlink_status{}; constexpr detail::is_symlink_t is_symlink{}; - - inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); } - inline bool is_directory(file_status s) { return stdfs::is_directory(s); } + constexpr detail::is_regular_file_t is_regular_file{}; + constexpr detail::is_directory_t is_directory{}; } /* @@ -57,9 +59,14 @@ namespace fs they might get the ADL version, which is broken. Therefore, put `symlink_status` in the global namespace, so that they get our symlink_status. + + We also want to poison the ADL on is_regular_file and is_directory, because + we don't want people calling these functions on paths */ using fs::symlink_status; using fs::is_symlink; +using fs::is_regular_file; +using fs::is_directory; namespace vcpkg::Files { @@ -85,7 +92,9 @@ namespace vcpkg::Files std::error_code& ec) = 0; bool remove(const fs::path& path, LineInfo linfo); virtual bool remove(const fs::path& path, std::error_code& ec) = 0; - virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec) = 0; + + virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec, fs::path& failure_point) = 0; + std::uintmax_t remove_all(const fs::path& path, LineInfo li); virtual bool exists(const fs::path& path) const = 0; virtual bool is_directory(const fs::path& path) const = 0; virtual bool is_regular_file(const fs::path& path) const = 0; diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 25cd302b0..625c0240f 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -188,36 +188,13 @@ namespace vcpkg::Strings // base 64 encoding with URL and filesafe alphabet (base64url) // based on IETF RFC 4648 // ignores padding, since one implicitly knows the length from the size of x - template - std::string b64url_encode(Integral x) { - static_assert(std::is_integral::value, "b64url_encode must take an integer type"); - using Unsigned = std::make_unsigned_t; - auto value = static_cast(x); + namespace detail { - // 64 values, plus the implicit \0 - constexpr static char map[0x41] = - /* 0123456789ABCDEF */ - /*0*/ "ABCDEFGHIJKLMNOP" - /*1*/ "QRSTUVWXYZabcdef" - /*2*/ "ghijklmnopqrstuv" - /*3*/ "wxyz0123456789-_" - ; + struct b64url_encode_t { + std::string operator()(std::uint64_t x) const noexcept; + }; - constexpr static int shift = 5; - constexpr static auto mask = (static_cast(1) << shift) - 1; - - std::string result; - // reserve ceiling(number of bits / 3) - result.resize((sizeof(value) * 8 + 2) / 3, map[0]); - - for (char& c: result) { - if (value == 0) { - break; - } - c = map[value & mask]; - value >>= shift; - } - - return result; } + + constexpr detail::b64url_encode_t b64url_encode{}; } diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h index b6f070cd8..1836404ca 100644 --- a/toolsrc/include/vcpkg/base/work_queue.h +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -29,18 +29,19 @@ namespace vcpkg { { std::move(action)(tld); } + + struct immediately_run_t {}; } + constexpr detail::immediately_run_t immediately_run{}; + + template struct WorkQueue { template - explicit WorkQueue(const F& tld_init) noexcept { - m_state = State::Running; - - std::size_t num_threads = std::thread::hardware_concurrency(); - if (num_threads == 0) { - num_threads = 4; - } + WorkQueue(std::size_t num_threads, LineInfo li, const F& tld_init) noexcept { + m_line_info = li; + m_state = State::BeforeRun; m_threads.reserve(num_threads); for (std::size_t i = 0; i < num_threads; ++i) { @@ -48,22 +49,52 @@ namespace vcpkg { } } + template + WorkQueue( + detail::immediately_run_t, + std::size_t num_threads, + LineInfo li, + const F& tld_init + ) noexcept : WorkQueue(num_threads, li, tld_init) { + m_state = State::Running; + } + WorkQueue(WorkQueue const&) = delete; WorkQueue(WorkQueue&&) = delete; - ~WorkQueue() = default; + ~WorkQueue() { + auto lck = std::unique_lock(m_mutex); + if (m_state == State::Running) { + Checks::exit_with_message(m_line_info, "Failed to call join() on a WorkQueue that was destroyed"); + } + } + + // should only be called once; anything else is an error + void run(LineInfo li) { + // this should _not_ be locked before `run()` is called; however, we + // want to terminate if someone screws up, rather than cause UB + auto lck = std::unique_lock(m_mutex); + + if (m_state != State::BeforeRun) { + Checks::exit_with_message(li, "Attempted to run() twice"); + } + + m_state = State::Running; + } // runs all remaining tasks, and blocks on their finishing // if this is called in an existing task, _will block forever_ // DO NOT DO THAT // thread-unsafe - void join() { + void join(LineInfo li) { { auto lck = std::unique_lock(m_mutex); - if (m_state == State::Running) { - m_state = State::Joining; - } else if (m_state == State::Joining) { - Checks::exit_with_message(VCPKG_LINE_INFO, "Attempted to join more than once"); + if (is_joined(m_state)) { + Checks::exit_with_message(li, "Attempted to call join() more than once"); + } else if (m_state == State::Terminated) { + m_state = State::TerminatedJoined; + } else { + m_state = State::Joined; } } for (auto& thrd : m_threads) { @@ -77,7 +108,11 @@ namespace vcpkg { void terminate() const { { auto lck = std::unique_lock(m_mutex); - m_state = State::Terminated; + if (is_joined(m_state)) { + m_state = State::TerminatedJoined; + } else { + m_state = State::Terminated; + } } m_cv.notify_all(); } @@ -86,6 +121,8 @@ namespace vcpkg { { auto lck = std::unique_lock(m_mutex); m_actions.push_back(std::move(a)); + + if (m_state == State::BeforeRun) return; } m_cv.notify_one(); } @@ -104,6 +141,8 @@ namespace vcpkg { m_actions.reserve(m_actions.size() + (last - first)); std::move(first, last, std::back_inserter(rng)); + + if (m_state == State::BeforeRun) return; } m_cv.notify_all(); @@ -123,6 +162,8 @@ namespace vcpkg { m_actions.reserve(m_actions.size() + (last - first)); std::copy(first, last, std::back_inserter(rng)); + + if (m_state == State::BeforeRun) return; } m_cv.notify_all(); @@ -134,24 +175,30 @@ namespace vcpkg { ThreadLocalData tld; void operator()() { - // unlocked when waiting, or when in the `call_moved_action` - // block + // unlocked when waiting, or when in the action // locked otherwise auto lck = std::unique_lock(work_queue->m_mutex); + + work_queue->m_cv.wait(lck, [&] { + return work_queue->m_state != State::BeforeRun; + }); + for (;;) { const auto state = work_queue->m_state; - if (state == State::Terminated) { + if (is_terminated(state)) { return; } if (work_queue->m_actions.empty()) { if (state == State::Running || work_queue->running_workers > 0) { + --work_queue->running_workers; work_queue->m_cv.wait(lck); + ++work_queue->running_workers; continue; } - // state == State::Joining and we are the only worker + // the queue isn't running, and we are the only worker // no more work! return; } @@ -159,21 +206,31 @@ namespace vcpkg { Action action = std::move(work_queue->m_actions.back()); work_queue->m_actions.pop_back(); - ++work_queue->running_workers; lck.unlock(); detail::call_moved_action(action, *work_queue, tld); lck.lock(); - --work_queue->running_workers; } } }; - enum class State : std::uint16_t { + enum class State : std::int16_t { + // can only exist upon construction + BeforeRun = -1, + Running, - Joining, + Joined, Terminated, + TerminatedJoined, }; + static bool is_terminated(State st) { + return st == State::Terminated || st == State::TerminatedJoined; + } + + static bool is_joined(State st) { + return st != State::Joined || st == State::TerminatedJoined; + } + mutable std::mutex m_mutex; // these four are under m_mutex mutable State m_state; @@ -182,5 +239,6 @@ namespace vcpkg { mutable std::condition_variable m_cv; std::vector m_threads; + LineInfo m_line_info; }; } diff --git a/toolsrc/src/vcpkg/archives.cpp b/toolsrc/src/vcpkg/archives.cpp index 69a916828..d22e841de 100644 --- a/toolsrc/src/vcpkg/archives.cpp +++ b/toolsrc/src/vcpkg/archives.cpp @@ -15,9 +15,10 @@ namespace vcpkg::Archives #endif ; + fs.remove_all(to_path, VCPKG_LINE_INFO); + fs.remove_all(to_path_partial, VCPKG_LINE_INFO); + // TODO: check this error code std::error_code ec; - fs.remove_all(to_path, ec); - fs.remove_all(to_path_partial, ec); fs.create_directories(to_path_partial, ec); const auto ext = archive.extension(); #if defined(_WIN32) diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 8bc37819a..a4e67a142 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -5,8 +5,8 @@ #include #include #include -#include #include +#include #if defined(__linux__) || defined(__APPLE__) #include @@ -21,8 +21,10 @@ #include #endif -namespace fs::detail { - file_status symlink_status_t::operator()(const path& p, std::error_code& ec) const noexcept { +namespace fs::detail +{ + file_status symlink_status_t::operator()(const path& p, std::error_code& ec) const noexcept + { #if defined(_WIN32) /* do not find the permissions of the file -- it's unnecessary for the @@ -34,14 +36,21 @@ namespace fs::detail { WIN32_FILE_ATTRIBUTE_DATA file_attributes; file_type ft = file_type::unknown; - if (!GetFileAttributesExW(p.c_str(), GetFileExInfoStandard, &file_attributes)) { + if (!GetFileAttributesExW(p.c_str(), GetFileExInfoStandard, &file_attributes)) + { ft = file_type::not_found; - } else if (file_attributes.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) { + } + else if (file_attributes.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) + { // check for reparse point -- if yes, then symlink ft = file_type::symlink; - } else if (file_attributes.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + } + else if (file_attributes.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { ft = file_type::directory; - } else { + } + else + { // otherwise, the file is a regular file ft = file_type::regular; } @@ -53,12 +62,13 @@ namespace fs::detail { #endif } - file_status symlink_status_t::operator()(const path& p) const noexcept { + file_status symlink_status_t::operator()(const path& p, vcpkg::LineInfo li) const noexcept + { std::error_code ec; auto result = symlink_status(p, ec); - if (ec) vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, "error getting status of path %s: %s", p.string(), ec.message()); + if (ec) vcpkg::Checks::exit_with_message(li, "error getting status of path %s: %s", p.string(), ec.message()); - return result; + return result; } } @@ -105,6 +115,25 @@ namespace vcpkg::Files if (ec) Checks::exit_with_message(linfo, "error writing lines: %s: %s", path.u8string(), ec.message()); } + std::uintmax_t Filesystem::remove_all(const fs::path& path, LineInfo li) + { + std::error_code ec; + fs::path failure_point; + + const auto result = this->remove_all(path, ec, failure_point); + + if (ec) + { + Checks::exit_with_message(li, + "Failure to remove_all(%s) due to file %s: %s", + path.string(), + failure_point.string(), + ec.message()); + } + + return result; + } + struct RealFilesystem final : Filesystem { virtual Expected read_contents(const fs::path& file_path) const override @@ -296,7 +325,7 @@ namespace vcpkg::Files #endif } virtual bool remove(const fs::path& path, std::error_code& ec) override { return fs::stdfs::remove(path, ec); } - virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec) override + virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec, fs::path& failure_point) override { /* does not use the std::filesystem call since it is buggy, and can @@ -311,8 +340,10 @@ namespace vcpkg::Files and then inserts `actually_remove{current_path}` into the work queue. */ - struct remove { - struct tld { + struct remove + { + struct tld + { const fs::path& tmp_directory; std::uint64_t index; @@ -320,6 +351,7 @@ namespace vcpkg::Files std::mutex& ec_mutex; std::error_code& ec; + fs::path& failure_point; }; struct actually_remove; @@ -331,52 +363,68 @@ namespace vcpkg::Files else, just calls remove. */ - struct actually_remove { + struct actually_remove + { fs::path current_path; - void operator()(tld& info, const queue& queue) const { + void operator()(tld& info, const queue& queue) const + { std::error_code ec; const auto path_type = fs::symlink_status(current_path, ec).type(); - if (check_ec(ec, info, queue)) return; + if (check_ec(ec, info, queue, current_path)) return; - if (path_type == fs::file_type::directory) { - for (const auto& entry : fs::stdfs::directory_iterator(current_path)) { + if (path_type == fs::file_type::directory) + { + for (const auto& entry : fs::stdfs::directory_iterator(current_path)) + { remove{}(entry, info, queue); } } - if (fs::stdfs::remove(current_path, ec)) { + if (fs::stdfs::remove(current_path, ec)) + { info.files_deleted.fetch_add(1, std::memory_order_relaxed); - } else { - check_ec(ec, info, queue); + } + else + { + check_ec(ec, info, queue, current_path); } } }; - static bool check_ec(const std::error_code& ec, tld& info, const queue& queue) { - if (ec) { + static bool check_ec(const std::error_code& ec, + tld& info, + const queue& queue, + const fs::path& failure_point) + { + if (ec) + { queue.terminate(); auto lck = std::unique_lock(info.ec_mutex); - if (!info.ec) { + if (!info.ec) + { info.ec = ec; } return true; - } else { + } + else + { return false; } } - void operator()(const fs::path& current_path, tld& info, const queue& queue) const { + void operator()(const fs::path& current_path, tld& info, const queue& queue) const + { std::error_code ec; const auto tmp_name = Strings::b64url_encode(info.index++); const auto tmp_path = info.tmp_directory / tmp_name; fs::stdfs::rename(current_path, tmp_path, ec); - if (check_ec(ec, info, queue)) return; + if (check_ec(ec, info, queue, current_path)) return; queue.enqueue_action(actually_remove{std::move(tmp_path)}); } @@ -386,22 +434,28 @@ namespace vcpkg::Files std::atomic files_deleted{0}; - if (path_type == fs::file_type::directory) { + if (path_type == fs::file_type::directory) + { std::uint64_t index = 0; std::mutex ec_mutex; - remove::queue queue{[&] { + auto const tld_gen = [&] { index += static_cast(1) << 32; - return remove::tld{path, index, files_deleted, ec_mutex, ec}; - }}; + return remove::tld{path, index, files_deleted, ec_mutex, ec, failure_point}; + }; - index += static_cast(1) << 32; - auto main_tld = remove::tld{path, index, files_deleted, ec_mutex, ec}; - for (const auto& entry : fs::stdfs::directory_iterator(path)) { + remove::queue queue{4, VCPKG_LINE_INFO, tld_gen}; + + // note: we don't actually start the queue running until the + // `join()`. This allows us to rename all the top-level files in + // peace, so that we don't get collisions. + auto main_tld = tld_gen(); + for (const auto& entry : fs::stdfs::directory_iterator(path)) + { remove{}(entry, main_tld, queue); } - queue.join(); + queue.join(VCPKG_LINE_INFO); } /* @@ -410,14 +464,17 @@ namespace vcpkg::Files directory, and so we can only delete the directory after all the lower levels have been deleted. */ - for (int backoff = 0; backoff < 5; ++backoff) { - if (backoff) { + for (int backoff = 0; backoff < 5; ++backoff) + { + if (backoff) + { using namespace std::chrono_literals; auto backoff_time = 100ms * backoff; std::this_thread::sleep_for(backoff_time); } - if (fs::stdfs::remove(path, ec)) { + if (fs::stdfs::remove(path, ec)) + { files_deleted.fetch_add(1, std::memory_order_relaxed); break; } diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 54a74a7a1..16543046e 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -288,3 +288,45 @@ bool Strings::contains(StringView haystack, StringView needle) { return Strings::search(haystack, needle) != haystack.end(); } + +namespace vcpkg::Strings::detail { + + template + std::string b64url_encode_implementation(Integral x) { + static_assert(std::is_integral::value, "b64url_encode must take an integer type"); + using Unsigned = std::make_unsigned_t; + auto value = static_cast(x); + + // 64 values, plus the implicit \0 + constexpr static char map[0x41] = + /* 0123456789ABCDEF */ + /*0*/ "ABCDEFGHIJKLMNOP" + /*1*/ "QRSTUVWXYZabcdef" + /*2*/ "ghijklmnopqrstuv" + /*3*/ "wxyz0123456789-_" + ; + + constexpr static int shift = 5; + constexpr static auto mask = (static_cast(1) << shift) - 1; + + std::string result; + // reserve ceiling(number of bits / 3) + result.resize((sizeof(value) * 8 + 2) / 3, map[0]); + + for (char& c: result) { + if (value == 0) { + break; + } + c = map[value & mask]; + value >>= shift; + } + + return result; + } + + std::string b64url_encode_t::operator()(std::uint64_t x) const noexcept{ + return b64url_encode_implementation(x); + } + +} + diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 68df1f965..c50acce7e 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -363,7 +363,8 @@ namespace vcpkg::Build const Triplet& triplet = spec.triplet(); const auto& triplet_file_path = paths.get_triplet_file_path(spec.triplet()).u8string(); - if (!Strings::case_insensitive_ascii_starts_with(triplet_file_path, paths.triplets.u8string())) + if (!Strings::case_insensitive_ascii_starts_with(triplet_file_path, + paths.triplets.u8string())) { System::printf("-- Loading triplet configuration from: %s\n", triplet_file_path); } @@ -495,7 +496,8 @@ namespace vcpkg::Build if (fs.is_directory(file)) // Will only keep the logs { std::error_code ec; - fs.remove_all(file, ec); + fs::path failure_point; + fs.remove_all(file, ec, failure_point); } } } @@ -610,8 +612,8 @@ namespace vcpkg::Build auto& fs = paths.get_filesystem(); auto pkg_path = paths.package_dir(spec); + fs.remove_all(pkg_path, VCPKG_LINE_INFO); std::error_code ec; - fs.remove_all(pkg_path, ec); fs.create_directories(pkg_path, ec); auto files = fs.get_files_non_recursive(pkg_path); Checks::check_exit(VCPKG_LINE_INFO, files.empty(), "unable to clear path: %s", pkg_path.u8string()); @@ -794,7 +796,7 @@ namespace vcpkg::Build fs.rename_or_copy(tmp_failure_zip, archive_tombstone_path, ".tmp", ec); // clean up temporary directory - fs.remove_all(tmp_log_path, ec); + fs.remove_all(tmp_log_path, VCPKG_LINE_INFO); } } @@ -1018,7 +1020,7 @@ namespace vcpkg::Build hash += "-"; hash += Hash::get_file_hash(fs, *p, "SHA1"); } - else if (pre_build_info.cmake_system_name.empty() || + else if (pre_build_info.cmake_system_name.empty() || pre_build_info.cmake_system_name == "WindowsStore") { hash += "-"; diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index f0946110c..3d963a297 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -352,13 +352,15 @@ namespace vcpkg::Export::IFW System::print2("Generating repository ", repository_dir.generic_u8string(), "...\n"); std::error_code ec; + fs::path failure_point; Files::Filesystem& fs = paths.get_filesystem(); - fs.remove_all(repository_dir, ec); + fs.remove_all(repository_dir, ec, failure_point); Checks::check_exit(VCPKG_LINE_INFO, !ec, - "Could not remove outdated repository directory %s", - repository_dir.generic_u8string()); + "Could not remove outdated repository directory %s due to file %s", + repository_dir.generic_u8string(), + failure_point.string()); const auto cmd_line = Strings::format(R"("%s" --packages "%s" "%s" > nul)", repogen_exe.u8string(), @@ -414,16 +416,18 @@ namespace vcpkg::Export::IFW const VcpkgPaths& paths) { std::error_code ec; + fs::path failure_point; Files::Filesystem& fs = paths.get_filesystem(); // Prepare packages directory const fs::path ifw_packages_dir_path = get_packages_dir_path(export_id, ifw_options, paths); - fs.remove_all(ifw_packages_dir_path, ec); + fs.remove_all(ifw_packages_dir_path, ec, failure_point); Checks::check_exit(VCPKG_LINE_INFO, !ec, - "Could not remove outdated packages directory %s", - ifw_packages_dir_path.generic_u8string()); + "Could not remove outdated packages directory %s due to file %s", + ifw_packages_dir_path.generic_u8string(), + failure_point.string()); fs.create_directory(ifw_packages_dir_path, ec); Checks::check_exit( diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index b30c38f43..cddc274b8 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -105,7 +105,7 @@ namespace vcpkg::Commands::PortsDiff std::map names_and_versions; for (auto&& port : all_ports) names_and_versions.emplace(port->core_paragraph->name, port->core_paragraph->version); - fs.remove_all(temp_checkout_path, ec); + fs.remove_all(temp_checkout_path, VCPKG_LINE_INFO); return names_and_versions; } diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 88c1526c5..f306bf4e6 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -400,8 +400,10 @@ namespace vcpkg::Export Files::Filesystem& fs = paths.get_filesystem(); const fs::path export_to_path = paths.root; const fs::path raw_exported_dir_path = export_to_path / export_id; + fs.remove_all(raw_exported_dir_path, VCPKG_LINE_INFO); + + // TODO: error handling std::error_code ec; - fs.remove_all(raw_exported_dir_path, ec); fs.create_directory(raw_exported_dir_path, ec); // execute the plan @@ -476,7 +478,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console if (!opts.raw) { - fs.remove_all(raw_exported_dir_path, ec); + fs.remove_all(raw_exported_dir_path, VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index de19c360a..981a9233f 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -355,8 +355,7 @@ namespace vcpkg::Install { auto& fs = paths.get_filesystem(); const fs::path package_dir = paths.package_dir(action.spec); - std::error_code ec; - fs.remove_all(package_dir, ec); + fs.remove_all(package_dir, VCPKG_LINE_INFO); } if (action.build_options.clean_downloads == Build::CleanDownloads::YES) diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index a40b27bd7..84ec6c981 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -179,8 +179,7 @@ namespace vcpkg::Remove { System::printf("Purging package %s...\n", display_name); Files::Filesystem& fs = paths.get_filesystem(); - std::error_code ec; - fs.remove_all(paths.packages / action.spec.dir(), ec); + fs.remove_all(paths.packages / action.spec.dir(), VCPKG_LINE_INFO); System::printf(System::Color::success, "Purging package %s... done\n", display_name); } } From a0fe40ea5842006c0da901a99ae07d7a25531175 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Thu, 11 Jul 2019 18:16:10 -0700 Subject: [PATCH 0167/1066] add tests! Also, fix all the bugs I found when I wrote the tests! --- toolsrc/include/vcpkg/base/files.h | 35 ++-- toolsrc/include/vcpkg/base/strings.h | 10 +- toolsrc/include/vcpkg/base/work_queue.h | 182 ++++++++++-------- toolsrc/src/tests.files.cpp | 80 ++++++++ toolsrc/src/tests.strings.cpp | 38 ++++ toolsrc/src/vcpkg/base/files.cpp | 3 +- toolsrc/src/vcpkg/base/strings.cpp | 62 +++--- toolsrc/vcpkg/vcpkg.vcxproj | 4 +- toolsrc/vcpkglib/vcpkglib.vcxproj | 4 +- .../vcpkgmetricsuploader.vcxproj | 4 +- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 10 +- toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 6 + 12 files changed, 290 insertions(+), 148 deletions(-) create mode 100644 toolsrc/src/tests.files.cpp create mode 100644 toolsrc/src/tests.strings.cpp diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 6cad3d461..a5e04db25 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -12,8 +12,8 @@ namespace fs using stdfs::copy_options; using stdfs::file_status; using stdfs::file_type; - using stdfs::perms; using stdfs::path; + using stdfs::perms; using stdfs::u8path; /* @@ -26,25 +26,24 @@ namespace fs // we want to poison ADL with these niebloids - namespace detail { - struct symlink_status_t { + namespace detail + { + struct symlink_status_t + { file_status operator()(const path& p, std::error_code& ec) const noexcept; file_status operator()(const path& p, vcpkg::LineInfo li) const noexcept; }; - struct is_symlink_t { - inline bool operator()(file_status s) const { - return stdfs::is_symlink(s); - } + struct is_symlink_t + { + inline bool operator()(file_status s) const { return stdfs::is_symlink(s); } }; - struct is_regular_file_t { - inline bool operator()(file_status s) const { - return stdfs::is_regular_file(s); - } + struct is_regular_file_t + { + inline bool operator()(file_status s) const { return stdfs::is_regular_file(s); } }; - struct is_directory_t { - inline bool operator()(file_status s) const { - return stdfs::is_directory(s); - } + struct is_directory_t + { + inline bool operator()(file_status s) const { return stdfs::is_directory(s); } }; } @@ -63,10 +62,10 @@ namespace fs We also want to poison the ADL on is_regular_file and is_directory, because we don't want people calling these functions on paths */ -using fs::symlink_status; -using fs::is_symlink; -using fs::is_regular_file; using fs::is_directory; +using fs::is_regular_file; +using fs::is_symlink; +using fs::symlink_status; namespace vcpkg::Files { diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 625c0240f..a1906790f 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -188,13 +188,5 @@ namespace vcpkg::Strings // base 64 encoding with URL and filesafe alphabet (base64url) // based on IETF RFC 4648 // ignores padding, since one implicitly knows the length from the size of x - namespace detail { - - struct b64url_encode_t { - std::string operator()(std::uint64_t x) const noexcept; - }; - - } - - constexpr detail::b64url_encode_t b64url_encode{}; + std::string b64url_encode(std::uint64_t x) noexcept; } diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h index 1836404ca..d6666770b 100644 --- a/toolsrc/include/vcpkg/base/work_queue.h +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -4,78 +4,67 @@ #include #include -namespace vcpkg { - template +namespace vcpkg +{ + template struct WorkQueue; - namespace detail { + namespace detail + { // for SFINAE purposes, keep out of the class - template - auto call_moved_action( - Action& action, - const WorkQueue& work_queue, - ThreadLocalData& tld - ) -> decltype(static_cast(std::move(action)(tld, work_queue))) + template + auto call_moved_action(Action& action, + const WorkQueue& work_queue, + ThreadLocalData& tld) -> decltype(static_cast(std::move(action)(tld, work_queue))) { std::move(action)(tld, work_queue); } - template - auto call_moved_action( - Action& action, - const WorkQueue&, - ThreadLocalData& tld - ) -> decltype(static_cast(std::move(action)(tld))) + template + auto call_moved_action(Action& action, const WorkQueue&, ThreadLocalData& tld) + -> decltype(static_cast(std::move(action)(tld))) { std::move(action)(tld); } - - struct immediately_run_t {}; } - constexpr detail::immediately_run_t immediately_run{}; - - - template - struct WorkQueue { - template - WorkQueue(std::size_t num_threads, LineInfo li, const F& tld_init) noexcept { + template + struct WorkQueue + { + template + WorkQueue(std::uint16_t num_threads, LineInfo li, const F& tld_init) noexcept + { m_line_info = li; - m_state = State::BeforeRun; + m_unjoined_workers = num_threads; m_threads.reserve(num_threads); - for (std::size_t i = 0; i < num_threads; ++i) { + for (std::size_t i = 0; i < num_threads; ++i) + { m_threads.push_back(std::thread(Worker{this, tld_init()})); } } - template - WorkQueue( - detail::immediately_run_t, - std::size_t num_threads, - LineInfo li, - const F& tld_init - ) noexcept : WorkQueue(num_threads, li, tld_init) { - m_state = State::Running; - } - WorkQueue(WorkQueue const&) = delete; WorkQueue(WorkQueue&&) = delete; - ~WorkQueue() { + ~WorkQueue() + { auto lck = std::unique_lock(m_mutex); - if (m_state == State::Running) { + if (!is_joined(m_state)) + { Checks::exit_with_message(m_line_info, "Failed to call join() on a WorkQueue that was destroyed"); } } // should only be called once; anything else is an error - void run(LineInfo li) { + void run(LineInfo li) + { // this should _not_ be locked before `run()` is called; however, we // want to terminate if someone screws up, rather than cause UB auto lck = std::unique_lock(m_mutex); - if (m_state != State::BeforeRun) { + if (m_state != State::BeforeRun) + { Checks::exit_with_message(li, "Attempted to run() twice"); } @@ -86,18 +75,40 @@ namespace vcpkg { // if this is called in an existing task, _will block forever_ // DO NOT DO THAT // thread-unsafe - void join(LineInfo li) { + void join(LineInfo li) + { { auto lck = std::unique_lock(m_mutex); - if (is_joined(m_state)) { + if (is_joined(m_state)) + { Checks::exit_with_message(li, "Attempted to call join() more than once"); - } else if (m_state == State::Terminated) { + } + else if (m_state == State::Terminated) + { m_state = State::TerminatedJoined; - } else { + } + else + { m_state = State::Joined; } } - for (auto& thrd : m_threads) { + + for (;;) + { + auto lck = std::unique_lock(m_mutex); + if (!m_unjoined_workers) + break; + + else if (!m_running_workers) + { + lck.unlock(); + m_cv.notify_all(); + } + } + + // all threads have returned -- now, it's time to join them + for (auto& thrd : m_threads) + { thrd.join(); } } @@ -105,19 +116,24 @@ namespace vcpkg { // useful in the case of errors // doesn't stop any existing running tasks // returns immediately, so that one can call this in a task - void terminate() const { + void terminate() const + { { auto lck = std::unique_lock(m_mutex); - if (is_joined(m_state)) { + if (is_joined(m_state)) + { m_state = State::TerminatedJoined; - } else { + } + else + { m_state = State::Terminated; } } m_cv.notify_all(); } - void enqueue_action(Action a) const { + void enqueue_action(Action a) const + { { auto lck = std::unique_lock(m_mutex); m_actions.push_back(std::move(a)); @@ -127,8 +143,9 @@ namespace vcpkg { m_cv.notify_one(); } - template - void enqueue_all_actions_by_move(Rng&& rng) const { + template + void enqueue_all_actions_by_move(Rng&& rng) const + { { using std::begin; using std::end; @@ -148,8 +165,9 @@ namespace vcpkg { m_cv.notify_all(); } - template - void enqueue_all_actions(Rng&& rng) const { + template + void enqueue_all_actions(Rng&& rng) const + { { using std::begin; using std::end; @@ -170,37 +188,41 @@ namespace vcpkg { } private: - struct Worker { + struct Worker + { const WorkQueue* work_queue; ThreadLocalData tld; - void operator()() { + void operator()() + { // unlocked when waiting, or when in the action // locked otherwise auto lck = std::unique_lock(work_queue->m_mutex); - work_queue->m_cv.wait(lck, [&] { - return work_queue->m_state != State::BeforeRun; - }); + work_queue->m_cv.wait(lck, [&] { return work_queue->m_state != State::BeforeRun; }); - for (;;) { + for (;;) + { const auto state = work_queue->m_state; - if (is_terminated(state)) { - return; + if (is_terminated(state)) + { + break; } - if (work_queue->m_actions.empty()) { - if (state == State::Running || work_queue->running_workers > 0) { - --work_queue->running_workers; + if (work_queue->m_actions.empty()) + { + if (state == State::Running || work_queue->m_running_workers > 1) + { + --work_queue->m_running_workers; work_queue->m_cv.wait(lck); - ++work_queue->running_workers; + ++work_queue->m_running_workers; continue; } // the queue isn't running, and we are the only worker // no more work! - return; + break; } Action action = std::move(work_queue->m_actions.back()); @@ -210,10 +232,13 @@ namespace vcpkg { detail::call_moved_action(action, *work_queue, tld); lck.lock(); } + + --work_queue->m_unjoined_workers; } }; - enum class State : std::int16_t { + enum class State : std::int16_t + { // can only exist upon construction BeforeRun = -1, @@ -223,22 +248,19 @@ namespace vcpkg { TerminatedJoined, }; - static bool is_terminated(State st) { - return st == State::Terminated || st == State::TerminatedJoined; - } + static bool is_terminated(State st) { return st == State::Terminated || st == State::TerminatedJoined; } - static bool is_joined(State st) { - return st != State::Joined || st == State::TerminatedJoined; - } + static bool is_joined(State st) { return st == State::Joined || st == State::TerminatedJoined; } - mutable std::mutex m_mutex; - // these four are under m_mutex - mutable State m_state; - mutable std::uint16_t running_workers; - mutable std::vector m_actions; - mutable std::condition_variable m_cv; + mutable std::mutex m_mutex{}; + // these are all under m_mutex + mutable State m_state = State::BeforeRun; + mutable std::uint16_t m_running_workers = 0; + mutable std::uint16_t m_unjoined_workers = 0; // num_threads + mutable std::vector m_actions{}; + mutable std::condition_variable m_cv{}; - std::vector m_threads; + std::vector m_threads{}; LineInfo m_line_info; }; } diff --git a/toolsrc/src/tests.files.cpp b/toolsrc/src/tests.files.cpp new file mode 100644 index 000000000..73c7eb5bc --- /dev/null +++ b/toolsrc/src/tests.files.cpp @@ -0,0 +1,80 @@ +#include "tests.pch.h" + +#include +#include + +#include +#include + +#include + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace UnitTest1 { + class FilesTest : public TestClass { + using uid = std::uniform_int_distribution; + + std::string get_random_filename() + { + std::random_device rd; + return vcpkg::Strings::b64url_encode(uid{}(rd)); + } + + void create_directory_tree( + vcpkg::Files::Filesystem& fs, + std::uint64_t depth, + const fs::path& base) + { + std::random_device rd; + constexpr auto max_depth = std::uint64_t(3); + const auto width = depth ? uid{0, (max_depth - depth) * 3 / 2}(rd) : 5; + + std::error_code ec; + if (width == 0) { + fs.write_contents(base, "", ec); + Assert::IsFalse(bool(ec)); + + return; + } + + fs.create_directory(base, ec); + Assert::IsFalse(bool(ec)); + + for (int i = 0; i < width; ++i) { + create_directory_tree(fs, depth + 1, base / get_random_filename()); + } + } + + TEST_METHOD(remove_all) { + fs::path temp_dir; + + { + wchar_t* tmp = static_cast(calloc(32'767, 2)); + + if (!GetEnvironmentVariableW(L"TEMP", tmp, 32'767)) { + Assert::Fail(L"GetEnvironmentVariable(\"TEMP\") failed"); + } + + temp_dir = tmp; + + std::string dir_name = "vcpkg-tmp-dir-"; + dir_name += get_random_filename(); + + temp_dir /= dir_name; + } + + auto& fs = vcpkg::Files::get_real_filesystem(); + + std::cout << "temp dir is: " << temp_dir << '\n'; + + std::error_code ec; + create_directory_tree(fs, 0, temp_dir); + + fs::path fp; + fs.remove_all(temp_dir, ec, fp); + Assert::IsFalse(bool(ec)); + + Assert::IsFalse(fs.exists(temp_dir)); + } + }; +} diff --git a/toolsrc/src/tests.strings.cpp b/toolsrc/src/tests.strings.cpp new file mode 100644 index 000000000..14b449e86 --- /dev/null +++ b/toolsrc/src/tests.strings.cpp @@ -0,0 +1,38 @@ +#include "tests.pch.h" + +#include + +#include +#include +#include + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace UnitTest1 { + class StringsTest : public TestClass { + TEST_METHOD(b64url_encode) + { + using u64 = std::uint64_t; + + std::vector> map; + + map.emplace_back(0, "AAAAAAAAAAA"); + map.emplace_back(1, "BAAAAAAAAAA"); + + map.emplace_back(u64(1) << 32, "AAAAAEAAAAA"); + map.emplace_back((u64(1) << 32) + 1, "BAAAAEAAAAA"); + + map.emplace_back(0xE4D0'1065'D11E'0229, "pIgHRXGEQTO"); + map.emplace_back(0xA626'FE45'B135'07FF, "_fQNxWk_mYK"); + map.emplace_back(0xEE36'D228'0C31'D405, "FQdMMgi024O"); + map.emplace_back(0x1405'64E7'FE7E'A88C, "Miqf-fOZFQB"); + map.emplace_back(0xFFFF'FFFF'FFFF'FFFF, "__________P"); + + std::string result; + for (const auto& pr : map) { + result = vcpkg::Strings::b64url_encode(pr.first); + Assert::AreEqual(result, pr.second); + } + } + }; +} diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index a4e67a142..4e36fe990 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -23,7 +23,7 @@ namespace fs::detail { - file_status symlink_status_t::operator()(const path& p, std::error_code& ec) const noexcept + file_status symlink_status_t::operator()(const path& p, std::error_code&) const noexcept { #if defined(_WIN32) /* @@ -406,6 +406,7 @@ namespace vcpkg::Files if (!info.ec) { info.ec = ec; + info.failure_point = failure_point; } return true; diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 16543046e..ade4384a9 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -289,44 +289,46 @@ bool Strings::contains(StringView haystack, StringView needle) return Strings::search(haystack, needle) != haystack.end(); } -namespace vcpkg::Strings::detail { +namespace vcpkg::Strings +{ + namespace + { + template + std::string b64url_encode_implementation(Integral x) + { + static_assert(std::is_integral::value, "b64url_encode must take an integer type"); + using Unsigned = std::make_unsigned_t; + auto value = static_cast(x); - template - std::string b64url_encode_implementation(Integral x) { - static_assert(std::is_integral::value, "b64url_encode must take an integer type"); - using Unsigned = std::make_unsigned_t; - auto value = static_cast(x); + // 64 values, plus the implicit \0 + constexpr static char map[65] = + /* 0123456789ABCDEF */ + /*0*/ "ABCDEFGHIJKLMNOP" + /*1*/ "QRSTUVWXYZabcdef" + /*2*/ "ghijklmnopqrstuv" + /*3*/ "wxyz0123456789-_"; - // 64 values, plus the implicit \0 - constexpr static char map[0x41] = - /* 0123456789ABCDEF */ - /*0*/ "ABCDEFGHIJKLMNOP" - /*1*/ "QRSTUVWXYZabcdef" - /*2*/ "ghijklmnopqrstuv" - /*3*/ "wxyz0123456789-_" - ; + // log2(64) + constexpr static int shift = 6; + // 64 - 1 + constexpr static auto mask = 63; - constexpr static int shift = 5; - constexpr static auto mask = (static_cast(1) << shift) - 1; + // ceiling(bitsize(Integral) / log2(64)) + constexpr static auto result_size = (sizeof(value) * 8 + shift - 1) / shift; - std::string result; - // reserve ceiling(number of bits / 3) - result.resize((sizeof(value) * 8 + 2) / 3, map[0]); + std::string result; + result.reserve(result_size); - for (char& c: result) { - if (value == 0) { - break; + for (std::size_t i = 0; i < result_size; ++i) + { + result.push_back(map[value & mask]); + value >>= shift; } - c = map[value & mask]; - value >>= shift; + + return result; } - - return result; } - std::string b64url_encode_t::operator()(std::uint64_t x) const noexcept{ - return b64url_encode_implementation(x); - } + std::string b64url_encode(std::uint64_t x) noexcept { return b64url_encode_implementation(x); } } - diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj index 8edea2244..06d849a74 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj +++ b/toolsrc/vcpkg/vcpkg.vcxproj @@ -21,8 +21,8 @@ {34671B80-54F9-46F5-8310-AC429C11D4FB} vcpkg - 8.1 - v140 + 10.0 + v142 diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 2eff1abee..9312dd627 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -21,8 +21,8 @@ {B98C92B7-2874-4537-9D46-D14E5C237F04} vcpkglib - 8.1 - v140 + 10.0 + v142 diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj index e533d0e15..2e689c7fc 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj @@ -21,8 +21,8 @@ {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE} vcpkgmetricsuploader - 8.1 - v140 + 10.0 + v142 diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index 4cda29461..ac7675ba5 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -22,6 +22,7 @@ + @@ -32,6 +33,7 @@ + @@ -48,8 +50,8 @@ {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D} Win32Proj vcpkgtest - 8.1 - v140 + 10.0 + v142 @@ -84,7 +86,7 @@ - + $(SolutionDir)msbuild.x86.debug\$(ProjectName)\ $(SolutionDir)msbuild.x86.debug\ @@ -193,4 +195,4 @@ - \ No newline at end of file + diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index 0f799426e..057c50a99 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -45,6 +45,12 @@ Source Files + + Source Files + + + Source Files + From 771e23c665f1960ef4e7fd9816e0d21c943a7903 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Thu, 11 Jul 2019 18:26:42 -0700 Subject: [PATCH 0168/1066] forgot to test on macos >.< --- toolsrc/src/vcpkg/base/files.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 4e36fe990..e40822705 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -23,9 +23,11 @@ namespace fs::detail { - file_status symlink_status_t::operator()(const path& p, std::error_code&) const noexcept + file_status symlink_status_t::operator()(const path& p, std::error_code& ec) const noexcept { #if defined(_WIN32) + static_cast(ec); + /* do not find the permissions of the file -- it's unnecessary for the things that vcpkg does. From 1e542bc68defa2ecd42a2ca7fa12c200c9c94f37 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Thu, 11 Jul 2019 23:09:04 -0700 Subject: [PATCH 0169/1066] [rabit] Add new port. (#7234) --- ports/rabit/CONTROL | 4 ++++ ports/rabit/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ports/rabit/CONTROL create mode 100644 ports/rabit/portfile.cmake diff --git a/ports/rabit/CONTROL b/ports/rabit/CONTROL new file mode 100644 index 000000000..7ad9bcfdb --- /dev/null +++ b/ports/rabit/CONTROL @@ -0,0 +1,4 @@ +Source: rabit +Version: 0.1 +Homepage: https://github.com/dmlc/rabit +Description: rabit is a light weight library that provides a fault tolerant interface of Allreduce and Broadcast. It is designed to support easy implementations of distributed machine learning programs, many of which fall naturally under the Allreduce abstraction. \ No newline at end of file diff --git a/ports/rabit/portfile.cmake b/ports/rabit/portfile.cmake new file mode 100644 index 000000000..cd009150f --- /dev/null +++ b/ports/rabit/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dmlc/rabit + REF v0.1 + SHA512 145fd839898cb95eaab9a88ad3301a0ccac0c8b672419ee2b8eb6ba273cc9a26e069e5ecbc37a3078e46dc64d11efb3e5ab10e5f8fed714e7add85b9e6ac2ec7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + From c477e87ede1cd099c24b004624c88933644d7abd Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sat, 13 Jul 2019 05:22:40 +0800 Subject: [PATCH 0170/1066] [zyre] Add new port (#7189) --- ports/zyre/CONTROL | 5 ++ ports/zyre/Config.cmake.in | 9 +++ ports/zyre/Findczmq.cmake | 10 ++++ ports/zyre/Findlibzmq.cmake | 10 ++++ ports/zyre/portfile.cmake | 87 ++++++++++++++++++++++++++++ ports/zyre/vcpkg-cmake-wrapper.cmake | 9 +++ 6 files changed, 130 insertions(+) create mode 100644 ports/zyre/CONTROL create mode 100644 ports/zyre/Config.cmake.in create mode 100644 ports/zyre/Findczmq.cmake create mode 100644 ports/zyre/Findlibzmq.cmake create mode 100644 ports/zyre/portfile.cmake create mode 100644 ports/zyre/vcpkg-cmake-wrapper.cmake diff --git a/ports/zyre/CONTROL b/ports/zyre/CONTROL new file mode 100644 index 000000000..ca8a4507e --- /dev/null +++ b/ports/zyre/CONTROL @@ -0,0 +1,5 @@ +Source: zyre +Version: 2019-07-07 +Build-Depends: czmq +Description: An open-source framework for proximity-based peer-to-peer applications +Homepage: https://github.com/zeromq/zyre diff --git a/ports/zyre/Config.cmake.in b/ports/zyre/Config.cmake.in new file mode 100644 index 000000000..21708876b --- /dev/null +++ b/ports/zyre/Config.cmake.in @@ -0,0 +1,9 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +find_dependency(ZeroMQ) +find_dependency(czmq) + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/ports/zyre/Findczmq.cmake b/ports/zyre/Findczmq.cmake new file mode 100644 index 000000000..8f6d37b16 --- /dev/null +++ b/ports/zyre/Findczmq.cmake @@ -0,0 +1,10 @@ +find_path(CZMQ_INCLUDE_DIRS NAMES czmq.h) + +find_package(czmq CONFIG REQUIRED) +set(CZMQ_LIBRARIES czmq czmq-static) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + CZMQ + REQUIRED_VARS CZMQ_INCLUDE_DIRS CZMQ_LIBRARIES +) diff --git a/ports/zyre/Findlibzmq.cmake b/ports/zyre/Findlibzmq.cmake new file mode 100644 index 000000000..706f063c3 --- /dev/null +++ b/ports/zyre/Findlibzmq.cmake @@ -0,0 +1,10 @@ +find_package(ZeroMQ CONFIG REQUIRED) + +set(LIBZMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR}) +set(LIBZMQ_LIBRARIES libzmq libzmq-static) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LIBZMQ + REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS +) diff --git a/ports/zyre/portfile.cmake b/ports/zyre/portfile.cmake new file mode 100644 index 000000000..db7e8e8cc --- /dev/null +++ b/ports/zyre/portfile.cmake @@ -0,0 +1,87 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/zyre + REF 2648b7eb806a2494d6eb4177f0941232d83c5294 + SHA512 8940e82ccdc427734711d63dc01c81fe86c4ca6b7e97a69df979f4d48a4711df1ccaee6a3b6aa394f9ef91d719cb95851c4eb87dfa9ed6426e2577b95e0fb464 + HEAD_REF master +) + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in + ${SOURCE_PATH}/builds/cmake/Config.cmake.in + COPYONLY +) + +foreach(_cmake_module Findczmq.cmake Findlibzmq.cmake) + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/${_cmake_module} + ${SOURCE_PATH}/${_cmake_module} + COPYONLY + ) +endforeach() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZYRE_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ZYRE_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DZYRE_BUILD_SHARED=${ZYRE_BUILD_SHARED} + -DZYRE_BUILD_STATIC=${ZYRE_BUILD_STATIC} + -DENABLE_DRAFTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT}) +endif() + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +file(COPY ${CURRENT_PACKAGES_DIR}/bin/zpinger${EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +if(ZYRE_BUILD_SHARED) + file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/zpinger${EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/bin/zpinger${EXECUTABLE_SUFFIX}) +else() + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(ZYRE_BUILD_STATIC) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/zyre_library.h + "if defined ZYRE_STATIC" + "if 1 //if defined ZYRE_STATIC" + ) +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/zyre/vcpkg-cmake-wrapper.cmake b/ports/zyre/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..41003826f --- /dev/null +++ b/ports/zyre/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET zyre AND NOT TARGET zyre-static) + add_library(zyre-static INTERFACE IMPORTED) + set_target_properties(zyre-static PROPERTIES INTERFACE_LINK_LIBRARIES zyre) +elseif(TARGET zyre-static AND NOT TARGET zyre) + add_library(zyre INTERFACE IMPORTED) + set_target_properties(zyre PROPERTIES INTERFACE_LINK_LIBRARIES zyre-static) +endif() From 164dc9e4b15110ba2371f8bbc6623436c89cbb68 Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Mon, 15 Jul 2019 13:09:12 -0400 Subject: [PATCH 0171/1066] Upgrade google-cloud-cpp to v0.11.0. (#7134) --- ports/google-cloud-cpp/CONTROL | 2 +- ports/google-cloud-cpp/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/google-cloud-cpp/CONTROL b/ports/google-cloud-cpp/CONTROL index 6c1b23391..0adc8a16b 100644 --- a/ports/google-cloud-cpp/CONTROL +++ b/ports/google-cloud-cpp/CONTROL @@ -1,4 +1,4 @@ Source: google-cloud-cpp -Version: 0.10.0 +Version: 0.11.0 Build-Depends: grpc, curl[ssl], crc32c Description: C++ Client Libraries for Google Cloud Platform APIs. diff --git a/ports/google-cloud-cpp/portfile.cmake b/ports/google-cloud-cpp/portfile.cmake index 84c5c0240..0ae85412a 100644 --- a/ports/google-cloud-cpp/portfile.cmake +++ b/ports/google-cloud-cpp/portfile.cmake @@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO googleapis/google-cloud-cpp - REF v0.10.0 - SHA512 9a1774dcc39d1626c8a9cf8630fe3b3110df7e21e452c7b137e1911d10b304997571aadff5fc0216715729db4a29621066a5236a0b2cb027bba4ce3c56492fb3 + REF v0.11.0 + SHA512 059322c73a9632644faec7dc33fc9e390cd5aeb1576a2e6ddeeb6e4078040c47f71fe687702f04173ee86638886872046ea22e60fae3f6a8bf16f6bfb9478962 HEAD_REF master ) From e1870a91ff26c099ca92599fa7d7bb06b81fbc58 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Tue, 16 Jul 2019 01:41:11 +0800 Subject: [PATCH 0172/1066] [sqlite3-tool]Fix build error on arm/uwp platform. (#7202) --- ports/sqlite3/CMakeLists.txt | 1 - ports/sqlite3/CONTROL | 2 +- ports/sqlite3/fix-arm-uwp.patch | 33 +++++++++++++++++++++++++++++++++ ports/sqlite3/portfile.cmake | 1 + 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 ports/sqlite3/fix-arm-uwp.patch diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index 16f529daf..64ff00262 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -36,7 +36,6 @@ endif() if(NOT SQLITE3_SKIP_TOOLS) add_executable(sqlite3-bin shell.c) - set_target_properties(sqlite3-bin PROPERTIES OUTPUT_NAME sqlite3) target_link_libraries(sqlite3-bin PRIVATE sqlite3) install(TARGETS sqlite3-bin sqlite3 RUNTIME DESTINATION tools diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index 829b66254..081ea47b8 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,5 +1,5 @@ Source: sqlite3 -Version: 3.28.0-1 +Version: 3.28.0-2 Homepage: https://sqlite.org/ Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. diff --git a/ports/sqlite3/fix-arm-uwp.patch b/ports/sqlite3/fix-arm-uwp.patch new file mode 100644 index 000000000..03e092965 --- /dev/null +++ b/ports/sqlite3/fix-arm-uwp.patch @@ -0,0 +1,33 @@ +diff --git a/shell.c b/shell.c +index 10d8cc1..99f37a5 100644 +--- a/shell.c ++++ b/shell.c +@@ -316,7 +316,11 @@ static int hasTimer(void){ + */ + hProcess = GetCurrentProcess(); + if( hProcess ){ ++#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) + HINSTANCE hinstLib = LoadLibrary(TEXT("Kernel32.dll")); ++#else ++ HINSTANCE hinstLib = LoadPackagedLibrary(TEXT("Kernel32.dll"), 0); ++#endif + if( NULL != hinstLib ){ + getProcessTimesAddr = + (GETPROCTIMES) GetProcAddress(hinstLib, "GetProcessTimes"); +@@ -2437,10 +2441,16 @@ static int writeFile( + if( zUnicodeName==0 ){ + return 1; + } ++#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) + hFile = CreateFileW( + zUnicodeName, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, NULL + ); ++#else ++ hFile = CreateFile2( ++ zUnicodeName, FILE_WRITE_ATTRIBUTES, 0, OPEN_EXISTING, NULL ++ ); ++#endif + sqlite3_free(zUnicodeName); + if( hFile!=INVALID_HANDLE_VALUE ){ + BOOL bResult = SetFileTime(hFile, NULL, &lastAccess, &lastWrite); diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index 131469c12..b9be87433 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${SQLITE_VERSION} + PATCHES fix-arm-uwp.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) From 8b0a8ca3db95487676080968d271f7e8482f0a98 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Mon, 15 Jul 2019 20:10:44 +0200 Subject: [PATCH 0173/1066] Fix copying raqm-version.h to include directory (#7263) --- ports/libraqm/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libraqm/CMakeLists.txt b/ports/libraqm/CMakeLists.txt index 2761ceebf..b1a88b268 100644 --- a/ports/libraqm/CMakeLists.txt +++ b/ports/libraqm/CMakeLists.txt @@ -34,4 +34,4 @@ install(TARGETS raqm set(RAQM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") set(RAQM_LIBRARY raqm) set(RAQM_LIBRARIES ${HARFBUZZ_LIBRARY} ${FRIBIDI_LIBRARY} ${RAQM_LIBRARY}) -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm-version.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) From 84a0270693aae94e9a9b6454aab8ff1ca4146f0c Mon Sep 17 00:00:00 2001 From: Marc Boucek Date: Mon, 15 Jul 2019 20:14:28 +0200 Subject: [PATCH 0174/1066] [nonius] properly install noniusConfig.cmake (#7258) --- ports/nonius/CMakeLists.txt | 30 ++++++++++++++++++++++++++++++ ports/nonius/CONTROL | 2 +- ports/nonius/portfile.cmake | 14 +++++++++++++- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 ports/nonius/CMakeLists.txt diff --git a/ports/nonius/CMakeLists.txt b/ports/nonius/CMakeLists.txt new file mode 100644 index 000000000..38f213d16 --- /dev/null +++ b/ports/nonius/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.9) +cmake_policy(VERSION ${CMAKE_VERSION}) # use default policies of current cmake version + +project(nonius) + +add_library(nonius INTERFACE) +target_include_directories(nonius INTERFACE + $ + $ +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ + DESTINATION include + ) +endif() + +install(TARGETS nonius + EXPORT noniusExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT noniusExport + FILE noniusConfig.cmake + NAMESPACE Nonius:: + DESTINATION share/nonius +) diff --git a/ports/nonius/CONTROL b/ports/nonius/CONTROL index 3c321bf4e..46c984038 100644 --- a/ports/nonius/CONTROL +++ b/ports/nonius/CONTROL @@ -1,4 +1,4 @@ Source: nonius -Version: 2019-04-20 +Version: 2019-04-20-1 Description: A C++ micro-benchmarking framework Build-Depends: boost-algorithm, boost-lexical-cast, boost-math diff --git a/ports/nonius/portfile.cmake b/ports/nonius/portfile.cmake index 5762797cd..ca7f7b5ae 100644 --- a/ports/nonius/portfile.cmake +++ b/ports/nonius/portfile.cmake @@ -10,7 +10,19 @@ vcpkg_from_github( HEAD_REF master ) -file(COPY ${SOURCE_PATH}/include/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) From d3829ff3a19be8f97778b7200ac52d5a52263a2b Mon Sep 17 00:00:00 2001 From: Phoebe <925731795@qq.com> Date: Tue, 16 Jul 2019 02:20:11 +0800 Subject: [PATCH 0175/1066] [leveldb] Fix cmake config (#7245) --- ports/leveldb/CONTROL | 2 +- ports/leveldb/fix-install_path.patch | 19 ------------------- ports/leveldb/fix_config.patch | 26 ++++++++++++++++++++++++++ ports/leveldb/leveldbConfig.cmake.in | 6 ++++++ ports/leveldb/portfile.cmake | 10 +++++++++- 5 files changed, 42 insertions(+), 21 deletions(-) delete mode 100644 ports/leveldb/fix-install_path.patch create mode 100644 ports/leveldb/fix_config.patch create mode 100644 ports/leveldb/leveldbConfig.cmake.in diff --git a/ports/leveldb/CONTROL b/ports/leveldb/CONTROL index 022415d26..aa0b2bc3e 100644 --- a/ports/leveldb/CONTROL +++ b/ports/leveldb/CONTROL @@ -1,4 +1,4 @@ Source: leveldb -Version: 1.22 +Version: 1.22-1 Homepage: https://github.com/bitcoin-core/leveldb Description: LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values. diff --git a/ports/leveldb/fix-install_path.patch b/ports/leveldb/fix-install_path.patch deleted file mode 100644 index 11a71a41a..000000000 --- a/ports/leveldb/fix-install_path.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1409c06..c81d219 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -440,12 +440,12 @@ if(LEVELDB_INSTALL) - install( - EXPORT leveldbTargets - NAMESPACE leveldb:: -- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb" -+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/../share/leveldb" - ) - install( - FILES - "${PROJECT_SOURCE_DIR}/cmake/leveldbConfig.cmake" - "${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake" -- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb" -+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/../share/leveldb" - ) - endif(LEVELDB_INSTALL) diff --git a/ports/leveldb/fix_config.patch b/ports/leveldb/fix_config.patch new file mode 100644 index 000000000..c5a83296b --- /dev/null +++ b/ports/leveldb/fix_config.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1409c06..98b87dc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -437,6 +437,12 @@ if(LEVELDB_INSTALL) + "${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake" + COMPATIBILITY SameMajorVersion + ) ++ configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/leveldbConfig.cmake.in ++ leveldbConfig.cmake ++ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/leveldb ++ NO_CHECK_REQUIRED_COMPONENTS_MACRO ++ PATH_VARS CMAKE_INSTALL_INCLUDEDIR ++ ) + install( + EXPORT leveldbTargets + NAMESPACE leveldb:: +@@ -444,7 +450,7 @@ if(LEVELDB_INSTALL) + ) + install( + FILES +- "${PROJECT_SOURCE_DIR}/cmake/leveldbConfig.cmake" ++ "${PROJECT_BINARY_DIR}/leveldbConfig.cmake" + "${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb" + ) diff --git a/ports/leveldb/leveldbConfig.cmake.in b/ports/leveldb/leveldbConfig.cmake.in new file mode 100644 index 000000000..560e743fe --- /dev/null +++ b/ports/leveldb/leveldbConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ +include(CMakeFindDependencyMacro) + +set_and_check(leveldb_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") + +include("${CMAKE_CURRENT_LIST_DIR}/leveldbTargets.cmake") diff --git a/ports/leveldb/portfile.cmake b/ports/leveldb/portfile.cmake index 02e18c430..a40ba6a02 100644 --- a/ports/leveldb/portfile.cmake +++ b/ports/leveldb/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "leveldb doesn't supports UWP") +endif() + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -9,9 +13,11 @@ vcpkg_from_github( SHA512 f9bbf5f466e7f707b94e19261762319ea9f65d41911690e84f59098551e2e69beccf756a414d705ade74ee96fd979bdb8b94c171c6f2cc83873cbd4a9380dbab HEAD_REF master PATCHES - fix-install_path.patch + fix_config.patch ) +file(COPY ${CURRENT_PORT_DIR}/leveldbConfig.cmake.in DESTINATION ${SOURCE_PATH}/cmake) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja @@ -20,6 +26,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/leveldb) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) From 8fb83ad0ad2a2b2df3a4338c7cf2d2ca8cc0f7c1 Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Mon, 15 Jul 2019 21:21:20 +0300 Subject: [PATCH 0176/1066] [cpp-peglib] Add new port (#7254) --- ports/cpp-peglib/CONTROL | 3 +++ ports/cpp-peglib/portfile.cmake | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 ports/cpp-peglib/CONTROL create mode 100644 ports/cpp-peglib/portfile.cmake diff --git a/ports/cpp-peglib/CONTROL b/ports/cpp-peglib/CONTROL new file mode 100644 index 000000000..6a6ed9ad5 --- /dev/null +++ b/ports/cpp-peglib/CONTROL @@ -0,0 +1,3 @@ +Source: cpp-peglib +Version: 0.1.0 +Description: C++11 header-only PEG (Parsing Expression Grammars) library. diff --git a/ports/cpp-peglib/portfile.cmake b/ports/cpp-peglib/portfile.cmake new file mode 100644 index 000000000..25c74c022 --- /dev/null +++ b/ports/cpp-peglib/portfile.cmake @@ -0,0 +1,17 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yhirose/cpp-peglib + REF v0.1.0 + SHA512 7efe9da8fe75d766a50d6508c81369b71981aa1e36c0d9981d57b75822fde81074b8803753bfa599ab4ce2a7047be731c22476d0938728ebb9a9dbf63aaeb9e6 + HEAD_REF master + ) + + file(COPY ${SOURCE_PATH}/peglib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + + # Handle copyright + file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-peglib) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/cpp-peglib/LICENSE ${CURRENT_PACKAGES_DIR}/share/cpp-peglib/copyright) From ac00ef2070be876479bcf667ac2f41c0a888bdb8 Mon Sep 17 00:00:00 2001 From: Cloud Han Date: Tue, 16 Jul 2019 02:37:40 +0800 Subject: [PATCH 0177/1066] use abseil's official cmake for build (#7018) --- ports/abseil/CMakeLists.txt | 93 ------------------------------------- ports/abseil/portfile.cmake | 10 ++-- 2 files changed, 6 insertions(+), 97 deletions(-) delete mode 100644 ports/abseil/CMakeLists.txt diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt deleted file mode 100644 index b4147266f..000000000 --- a/ports/abseil/CMakeLists.txt +++ /dev/null @@ -1,93 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(abseil CXX) - -add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN) - -set(CMAKE_CXX_STANDARD 14) - -set(CMAKE_DEBUG_POSTFIX d) - -if(CMAKE_BUILD_TYPE STREQUAL "Release") - option(INSTALL_HEADERS "Install header files" ON) -else() - option(INSTALL_HEADERS "Install header files" OFF) -endif() - -function(add_sublibrary LIB) - file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc") - list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$|test_util.cc$|_benchmark.cc$") - file(GLOB_RECURSE HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc") - - if(SOURCES) - if("STATIC" IN_LIST ARGN) - add_library(${LIB} STATIC ${SOURCES}) - else() - add_library(${LIB} ${SOURCES}) - endif() - set_target_properties(${LIB} PROPERTIES OUTPUT_NAME "absl_${LIB}") - target_include_directories(${LIB} PUBLIC $ $) - else() - add_library(${LIB} INTERFACE) - target_include_directories(${LIB} INTERFACE $ $) - endif() - - install(TARGETS ${LIB} EXPORT unofficial-abseil-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - ) - - if(INSTALL_HEADERS) - if(HEADERS) - foreach(file IN LISTS HEADERS) - get_filename_component(dir ${file} DIRECTORY) - file(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR}/absl/${LIB} ${dir}) - install(FILES ${file} DESTINATION "include/absl/${LIB}/${rel_dir}") - endforeach() - endif() - endif() -endfunction() - -function(target_link_public_libraries A) - get_target_property(A_TYPE ${A} TYPE) - if(A_TYPE STREQUAL INTERFACE_LIBRARY) - target_link_libraries(${A} INTERFACE ${ARGN}) - else() - target_link_libraries(${A} PUBLIC ${ARGN}) - endif() -endfunction() - -add_sublibrary(algorithm) -add_sublibrary(base) -add_sublibrary(container STATIC) -add_sublibrary(debugging) -add_sublibrary(hash) -add_sublibrary(memory) -add_sublibrary(meta) -add_sublibrary(numeric) -add_sublibrary(strings) -add_sublibrary(synchronization STATIC) -# Time must be static because there are global variables intended for export -add_sublibrary(time STATIC) -add_sublibrary(types) -add_sublibrary(utility) - -target_link_public_libraries(algorithm base meta) -target_link_public_libraries(container algorithm base memory time) -target_link_public_libraries(debugging base) -target_link_public_libraries(hash base) -target_link_public_libraries(memory meta) -target_link_public_libraries(meta base) -target_link_public_libraries(numeric base) -target_link_public_libraries(strings base memory meta numeric) -target_link_public_libraries(types base utility meta algorithm strings) -target_link_public_libraries(utility base meta) -target_link_public_libraries(time base numeric) -target_link_public_libraries(synchronization base time) - -install( - EXPORT unofficial-abseil-targets - FILE unofficial-abseil-config.cmake - NAMESPACE unofficial::abseil:: - DESTINATION share/unofficial-abseil -) diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index b14618229..1c2993332 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -15,17 +15,19 @@ vcpkg_from_github( PATCHES fix-usage-lnk-error.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil TARGET_PATH share/unofficial-abseil) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/absl) vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/include/absl/copts + ${CURRENT_PACKAGES_DIR}/include/absl/strings/testdata + ${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata) \ No newline at end of file From 40200c829a7a4636ce75ae355dd47d2e458bca75 Mon Sep 17 00:00:00 2001 From: devilfish_mm Date: Mon, 15 Jul 2019 17:17:41 -0400 Subject: [PATCH 0178/1066] [paho-mqttpp3] Add New Port: Paho MQTT C++ library (#7033) * added port: paho-mqtt-cpp * fixed unix build * Added openssl as a feature * Added documentation * commented out unnecessary stuff * Updated as per code review * [paho-mqttpp3] Simplify portfile --- ports/paho-mqttpp3/CONTROL | 9 +++++ ports/paho-mqttpp3/portfile.cmake | 66 +++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 ports/paho-mqttpp3/CONTROL create mode 100644 ports/paho-mqttpp3/portfile.cmake diff --git a/ports/paho-mqttpp3/CONTROL b/ports/paho-mqttpp3/CONTROL new file mode 100644 index 000000000..68f1867f6 --- /dev/null +++ b/ports/paho-mqttpp3/CONTROL @@ -0,0 +1,9 @@ +Source: paho-mqttpp3 +Version: 1.0.1 +Description: Paho project provides open-source C++ wrapper for Paho C library +Build-Depends: paho-mqtt +Default-Features: ssl + +Feature: ssl +Description: Build with SSL support +Build-Depends: openssl diff --git a/ports/paho-mqttpp3/portfile.cmake b/ports/paho-mqttpp3/portfile.cmake new file mode 100644 index 000000000..dcc745d72 --- /dev/null +++ b/ports/paho-mqttpp3/portfile.cmake @@ -0,0 +1,66 @@ +include(vcpkg_common_functions) + +# Download from Github +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eclipse/paho.mqtt.cpp + REF v1.0.1 + SHA512 be612197fae387b9f1d8f10944d451ec9e7ebec6045beed365e642089c0a5fde882ed5c734f2b46a5008f98b8445a51114492f0f36fdc684b8a8fe4b71fe31a4 + HEAD_REF master +) + +vcpkg_check_features("ssl" PAHO_WITH_SSL) + +# Link with 'paho-mqtt3as' library +set(PAHO_C_LIBNAME paho-mqtt3as) + +# Setting the library path +if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(PAHO_C_LIBRARY_PATH "${CURRENT_INSTALLED_DIR}/lib") +else() + set(PAHO_C_LIBRARY_PATH "${CURRENT_INSTALLED_DIR}/debug/lib") +endif() + +# Setting the include path where MqttClient.h is present +set(PAHO_C_INC "${CURRENT_INSTALLED_DIR}/include/paho-mqtt") + +# Set the generator to Ninja +set(PAHO_CMAKE_GENERATOR "Ninja") + +# NOTE: the Paho C++ cmake files on Github are problematic. +# It uses two different options PAHO_BUILD_STATIC and PAHO_BUILD_SHARED instead of just using one variable. +# Unless the open source community cleans up the cmake files, we are stuck with setting both of them. +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(PAHO_MQTTPP3_STATIC ON) + set(PAHO_MQTTPP3_SHARED OFF) + set(PAHO_C_LIB "${PAHO_C_LIBRARY_PATH}/${PAHO_C_LIBNAME}") + set(PAHO_OPTIONS -DPAHO_MQTT_C_LIBRARIES=${PAHO_C_LIB}) +else() + set(PAHO_MQTTPP3_STATIC OFF) + set(PAHO_MQTTPP3_SHARED ON) + set(PAHO_OPTIONS) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + GENERATOR ${PAHO_CMAKE_GENERATOR} + OPTIONS + -DPAHO_BUILD_STATIC=${PAHO_MQTTPP3_STATIC} + -DPAHO_BUILD_SHARED=${PAHO_MQTTPP3_SHARED} + -DPAHO_WITH_SSL=${PAHO_WITH_SSL} + -DPAHO_MQTT_C_INCLUDE_DIRS=${PAHO_C_INC} + ${PAHO_OPTIONS} +) + +# Run the build, copy pdbs and fixup the cmake targets +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/PahoMqttCpp" TARGET_PATH "share/pahomqttcpp") + +# Remove the include and share folders in debug folder +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Add copyright +file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqttpp3 RENAME copyright) From 0c8139dbe8ef08ddf38c7f38e094c3cbc4c8bce9 Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Mon, 15 Jul 2019 14:42:45 -0700 Subject: [PATCH 0179/1066] [openxr-loader] Initial port (#6339) * [openxr] add initial port * [openxr-loader] Set executable suffix * [openxr-loader] Use correct checks for Windows * [openxr-loader] Add failure messages for unsupported platforms --- .../0001-fix-embedded-python-path.patch | 35 +++++++++ .../0002-fix-linux-pkgconfig-dependency.patch | 38 +++++++++ .../0003-windows-path-python-fix.patch | 16 ++++ ports/openxr-loader/CONTROL | 7 ++ ports/openxr-loader/portfile.cmake | 78 +++++++++++++++++++ 5 files changed, 174 insertions(+) create mode 100644 ports/openxr-loader/0001-fix-embedded-python-path.patch create mode 100644 ports/openxr-loader/0002-fix-linux-pkgconfig-dependency.patch create mode 100644 ports/openxr-loader/0003-windows-path-python-fix.patch create mode 100644 ports/openxr-loader/CONTROL create mode 100644 ports/openxr-loader/portfile.cmake diff --git a/ports/openxr-loader/0001-fix-embedded-python-path.patch b/ports/openxr-loader/0001-fix-embedded-python-path.patch new file mode 100644 index 000000000..3fe7e61e8 --- /dev/null +++ b/ports/openxr-loader/0001-fix-embedded-python-path.patch @@ -0,0 +1,35 @@ +diff --git a/specification/scripts/genxr.py b/specification/scripts/genxr.py +index 906c044..b0a414f 100755 +--- a/specification/scripts/genxr.py ++++ b/specification/scripts/genxr.py +@@ -17,6 +17,12 @@ + import argparse + import re + import sys ++import os ++ ++base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) ++sys.path.append(os.path.join(base_dir, 'src', 'scripts')) ++sys.path.append(os.path.join(base_dir, 'specification', 'scripts')) ++ + import time + import xml.etree.ElementTree as etree + +diff --git a/src/scripts/src_genxr.py b/src/scripts/src_genxr.py +index 960b6cd..6f49296 100755 +--- a/src/scripts/src_genxr.py ++++ b/src/scripts/src_genxr.py +@@ -14,7 +14,12 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-import argparse, cProfile, pdb, string, sys, time ++import argparse, cProfile, pdb, string, sys, time, os ++ ++base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) ++sys.path.append(os.path.join(base_dir, 'src', 'scripts')) ++sys.path.append(os.path.join(base_dir, 'specification', 'scripts')) ++ + from reg import * + from generator import write + from cgenerator import CGeneratorOptions, COutputGenerator diff --git a/ports/openxr-loader/0002-fix-linux-pkgconfig-dependency.patch b/ports/openxr-loader/0002-fix-linux-pkgconfig-dependency.patch new file mode 100644 index 000000000..3f9cbc328 --- /dev/null +++ b/ports/openxr-loader/0002-fix-linux-pkgconfig-dependency.patch @@ -0,0 +1,38 @@ +diff --git a/src/cmake/presentation.cmake b/src/cmake/presentation.cmake +index 3970546..c2e7bc3 100644 +--- a/src/cmake/presentation.cmake ++++ b/src/cmake/presentation.cmake +@@ -12,21 +12,17 @@ endif() + + message(STATUS "Using presentation backend: ${PRESENTATION_BACKEND}") + +-find_package(PkgConfig REQUIRED) + + if( PRESENTATION_BACKEND MATCHES "xlib" ) +- pkg_search_module(X11 REQUIRED x11) +- pkg_search_module(XXF86VM REQUIRED xxf86vm) +- pkg_search_module(XRANDR REQUIRED xrandr) +- + add_definitions( -DSUPPORT_X ) + add_definitions( -DOS_LINUX_XLIB ) + set( XLIB_LIBRARIES +- ${X11_LIBRARIES} +- ${XXF86VM_LIBRARIES} +- ${XRANDR_LIBRARIES} ) ++ X11 ++ Xxf86vm ++ Xrandr) + + elseif( PRESENTATION_BACKEND MATCHES "xcb" ) ++ find_package(PkgConfig REQUIRED) + # XCB + XCB GLX is limited to OpenGL 2.1 + # add_definitions( -DOS_LINUX_XCB ) + # XCB + Xlib GLX 1.3 +@@ -49,6 +45,7 @@ elseif( PRESENTATION_BACKEND MATCHES "xcb" ) + ${X11_LIBRARIES} ) + + elseif( PRESENTATION_BACKEND MATCHES "wayland" ) ++ find_package(PkgConfig REQUIRED) + pkg_search_module(WAYLAND_CLIENT REQUIRED wayland-client) + pkg_search_module(WAYLAND_EGL REQUIRED wayland-egl) + pkg_search_module(WAYLAND_SCANNER REQUIRED wayland-scanner) diff --git a/ports/openxr-loader/0003-windows-path-python-fix.patch b/ports/openxr-loader/0003-windows-path-python-fix.patch new file mode 100644 index 000000000..a68f87722 --- /dev/null +++ b/ports/openxr-loader/0003-windows-path-python-fix.patch @@ -0,0 +1,16 @@ +diff --git a/specification/scripts/generator.py b/specification/scripts/generator.py +index d6a1afe..5f9d0b6 100644 +--- a/specification/scripts/generator.py ++++ b/specification/scripts/generator.py +@@ -516,9 +516,10 @@ class OutputGenerator: + # Generator can be used without writing to a file. + if self.genOpts.filename is not None: + if sys.platform == 'win32': +- directory = Path(self.genOpts.directory) ++ directory = self.genOpts.directory + if not os.path.exists(directory): + os.makedirs(directory) +- self.outFile = io.open(directory / self.genOpts.filename, 'w', encoding='utf-8') ++ self.outFile = io.open(directory + '/' + self.genOpts.filename, 'w', encoding='utf-8') + else: + filename = self.genOpts.directory + '/' + self.genOpts.filename diff --git a/ports/openxr-loader/CONTROL b/ports/openxr-loader/CONTROL new file mode 100644 index 000000000..3c9379e9b --- /dev/null +++ b/ports/openxr-loader/CONTROL @@ -0,0 +1,7 @@ +Source: openxr-loader +Version: 0.90.1 +Description: Khronos API for abstracting VR/MR/AR hardware + +Feature: vulkan +Description: Vulkan functionality for OpenXR +Build-Depends: vulkan diff --git a/ports/openxr-loader/portfile.cmake b/ports/openxr-loader/portfile.cmake new file mode 100644 index 000000000..8b2fb4671 --- /dev/null +++ b/ports/openxr-loader/portfile.cmake @@ -0,0 +1,78 @@ +if (VCPKG_TARGET_ARCHITECTURE MATCHES "^arm*") + message(FATAL_ERROR "OpenXR does not support arm") +endif() + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + # Due to UWP restricting the usage of static CRT OpenXR cannot be built. + message(FATAL_ERROR "OpenXR does not support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenXR-SDK + REF release-0.90.1 + SHA512 99b16b52511fef740fa7a1e234213310a4490b8d7baf4d1e003b93cf4f37b28abf526f6ed2d1e27e9ee2b4949b1957f15c20d4e0f8d30687806fe782780697af + HEAD_REF master + PATCHES + # embedded python uses ignores PYTHONPATH + 0001-fix-embedded-python-path.patch + # Pkg-config is not available on the Vcpkg CI systems, don't depend on it for the xlib backend + 0002-fix-linux-pkgconfig-dependency.patch + # Python < 3.6 doesn't allow a WindowsPath object to act as a pathlike in os.path functions + 0003-windows-path-python-fix.patch +) + +# Weird behavior inside the OpenXR loader. On Windows they force shared libraries to use static crt, and +# vice-versa. Might be better in future iterations to patch the CMakeLists.txt for OpenXR +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(DYNAMIC_LOADER OFF) + set(VCPKG_CRT_LINKAGE dynamic) + else() + set(DYNAMIC_LOADER ON) + set(VCPKG_CRT_LINKAGE static) + endif() +endif() + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_API_LAYERS=OFF + -DBUILD_TESTS=OFF + -DDYNAMIC_LOADER=${DYNAMIC_LOADER} + -DPYTHON_EXECUTABLE=${PYTHON3} +) + +vcpkg_install_cmake() + +function(COPY_BINARIES SOURCE DEST) + # hack, because CMAKE_SHARED_LIBRARY_SUFFIX seems to be unpopulated + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(SHARED_LIB_SUFFIX ".dll") + else() + set(SHARED_LIB_SUFFIX ".so") + endif() + file(MAKE_DIRECTORY ${DEST}) + file(GLOB_RECURSE SHARED_BINARIES ${SOURCE}/*${SHARED_LIB_SUFFIX}) + file(COPY ${SHARED_BINARIES} DESTINATION ${DEST}) + file(REMOVE_RECURSE ${SHARED_BINARIES}) +endfunction() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +# No CMake files are contained in /share only docs +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openxr-loader RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + COPY_BINARIES(${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/bin) + COPY_BINARIES(${CURRENT_PACKAGES_DIR}/debug/lib ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() From 583abdf87ae50365d617e10ded348231b2af5011 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Mon, 15 Jul 2019 16:33:11 -0700 Subject: [PATCH 0180/1066] [wintoast] Add new port. (#7006) * [wintoast] Add new port. * Add CMakeLists.txt. * Change the way to install headers. --- ports/wintoast/CMakeLists.txt | 25 +++++++++++++++++++++++++ ports/wintoast/CONTROL | 3 +++ ports/wintoast/portfile.cmake | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 ports/wintoast/CMakeLists.txt create mode 100644 ports/wintoast/CONTROL create mode 100644 ports/wintoast/portfile.cmake diff --git a/ports/wintoast/CMakeLists.txt b/ports/wintoast/CMakeLists.txt new file mode 100644 index 000000000..eb70fb9cf --- /dev/null +++ b/ports/wintoast/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.11) +project(wintoast) + +set(SRC_FILES +src/wintoastlib.cpp +) + +add_library(wintoast ${SRC_FILES}) + +target_include_directories(wintoast PUBLIC + $ + $ +) + +# Install targets +install(TARGETS wintoast + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +# Install headers +if (INSTALL_HEADERS) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoastlib.h DESTINATION include/wintoast) +endif() \ No newline at end of file diff --git a/ports/wintoast/CONTROL b/ports/wintoast/CONTROL new file mode 100644 index 000000000..d9d410796 --- /dev/null +++ b/ports/wintoast/CONTROL @@ -0,0 +1,3 @@ +Source: wintoast +Version: 1.2.0 +Description: WinToast is a lightly library written in C++ which brings a complete integration of the modern toast notifications of Windows 8 & Windows 10. \ No newline at end of file diff --git a/ports/wintoast/portfile.cmake b/ports/wintoast/portfile.cmake new file mode 100644 index 000000000..c7f2f8952 --- /dev/null +++ b/ports/wintoast/portfile.cmake @@ -0,0 +1,32 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mohabouje/WinToast + REF v1.2.0 + SHA512 d8bd44439100772929eb8a4eb4aebfd66fa54562c838eb4c081a382dc1d73c545faa6d9675e320864d9b533e4a0c4a673e44058c7f643ccd56ec90830cdfaf45 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_RELEASE -DINSTALL_HEADERS=ON + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF + +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Install license +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) From 02c977186e890e4090d91c171b42d20729e668af Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Mon, 15 Jul 2019 16:43:55 -0700 Subject: [PATCH 0181/1066] modify files test to include symlinks --- toolsrc/src/tests.files.cpp | 147 ++++++++++++++++++++++++------------ 1 file changed, 100 insertions(+), 47 deletions(-) diff --git a/toolsrc/src/tests.files.cpp b/toolsrc/src/tests.files.cpp index 73c7eb5bc..c99dbb286 100644 --- a/toolsrc/src/tests.files.cpp +++ b/toolsrc/src/tests.files.cpp @@ -10,28 +10,112 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework; -namespace UnitTest1 { - class FilesTest : public TestClass { +namespace UnitTest1 +{ + class FilesTest : public TestClass + { using uid = std::uniform_int_distribution; - - std::string get_random_filename() + + public: + FilesTest() { - std::random_device rd; - return vcpkg::Strings::b64url_encode(uid{}(rd)); + HKEY key; + const auto status = RegOpenKeyExW( + HKEY_LOCAL_MACHINE, LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock)", 0, KEY_READ, &key); + + if (!status) + { + ALLOW_SYMLINKS = false; + std::clog << "Symlinks are not allowed on this system\n"; + } + else + { + ALLOW_SYMLINKS = true; + RegCloseKey(key); + } } - - void create_directory_tree( - vcpkg::Files::Filesystem& fs, - std::uint64_t depth, - const fs::path& base) + + private: + TEST_METHOD(remove_all) + { + auto urbg = get_urbg(0); + + fs::path temp_dir; + + { + wchar_t* tmp = static_cast(calloc(32'767, 2)); + + if (!GetEnvironmentVariableW(L"TEMP", tmp, 32'767)) + { + Assert::Fail(L"GetEnvironmentVariable(\"TEMP\") failed"); + } + + temp_dir = tmp; + + std::string dir_name = "vcpkg-tmp-dir-"; + dir_name += get_random_filename(urbg); + + temp_dir /= dir_name; + } + + auto& fs = vcpkg::Files::get_real_filesystem(); + + std::clog << "temp dir is: " << temp_dir << '\n'; + + std::error_code ec; + create_directory_tree(urbg, fs, 0, temp_dir); + + fs::path fp; + fs.remove_all(temp_dir, ec, fp); + Assert::IsFalse(bool(ec)); + + Assert::IsFalse(fs.exists(temp_dir)); + } + + bool ALLOW_SYMLINKS; + + std::mt19937_64 get_urbg(std::uint64_t index) + { + // smallest prime > 2**63 - 1 + return std::mt19937_64{index + 9223372036854775837}; + } + + std::string get_random_filename(std::mt19937_64& urbg) { return vcpkg::Strings::b64url_encode(uid{}(urbg)); } + + void create_directory_tree(std::mt19937_64& urbg, + vcpkg::Files::Filesystem& fs, + std::uint64_t depth, + const fs::path& base) { std::random_device rd; constexpr auto max_depth = std::uint64_t(3); - const auto width = depth ? uid{0, (max_depth - depth) * 3 / 2}(rd) : 5; + const auto width = depth ? uid{0, (max_depth - depth) * 3 / 2}(urbg) : 5; std::error_code ec; - if (width == 0) { - fs.write_contents(base, "", ec); + if (width == 0) + { + // I don't want to move urbg forward conditionally + const auto type = uid{0, 3}(urbg); + if (type == 0 || !ALLOW_SYMLINKS) + { + // 0 is a regular file + fs.write_contents(base, "", ec); + } + else if (type == 1) + { + // 1 is a regular symlink + fs.write_contents(base, "", ec); + Assert::IsFalse(bool(ec)); + fs::path base_link = base; + base_link.append("-link"); + fs::stdfs::create_symlink(base, base_link, ec); + } + else + { + // 2 is a directory symlink + fs::stdfs::create_directory_symlink(".", base, ec); + } + Assert::IsFalse(bool(ec)); return; @@ -40,41 +124,10 @@ namespace UnitTest1 { fs.create_directory(base, ec); Assert::IsFalse(bool(ec)); - for (int i = 0; i < width; ++i) { - create_directory_tree(fs, depth + 1, base / get_random_filename()); - } - } - - TEST_METHOD(remove_all) { - fs::path temp_dir; - + for (int i = 0; i < width; ++i) { - wchar_t* tmp = static_cast(calloc(32'767, 2)); - - if (!GetEnvironmentVariableW(L"TEMP", tmp, 32'767)) { - Assert::Fail(L"GetEnvironmentVariable(\"TEMP\") failed"); - } - - temp_dir = tmp; - - std::string dir_name = "vcpkg-tmp-dir-"; - dir_name += get_random_filename(); - - temp_dir /= dir_name; + create_directory_tree(urbg, fs, depth + 1, base / get_random_filename(urbg)); } - - auto& fs = vcpkg::Files::get_real_filesystem(); - - std::cout << "temp dir is: " << temp_dir << '\n'; - - std::error_code ec; - create_directory_tree(fs, 0, temp_dir); - - fs::path fp; - fs.remove_all(temp_dir, ec, fp); - Assert::IsFalse(bool(ec)); - - Assert::IsFalse(fs.exists(temp_dir)); } }; } From e024dd7767f9e570274dcc0cdaeb589245f28719 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Tue, 16 Jul 2019 01:24:53 +0100 Subject: [PATCH 0182/1066] [scnlib] Add new port (#7014) * [scnlib] Add new port --- ports/scnlib/CONTROL | 4 ++++ ports/scnlib/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ports/scnlib/CONTROL create mode 100644 ports/scnlib/portfile.cmake diff --git a/ports/scnlib/CONTROL b/ports/scnlib/CONTROL new file mode 100644 index 000000000..5b589084a --- /dev/null +++ b/ports/scnlib/CONTROL @@ -0,0 +1,4 @@ +Source: scnlib +Version: 0.1.2 +Description: scnlib is a modern C++ library for replacing scanf and std::istream +Homepage: https://scnlib.dev/ diff --git a/ports/scnlib/portfile.cmake b/ports/scnlib/portfile.cmake new file mode 100644 index 000000000..08343fc43 --- /dev/null +++ b/ports/scnlib/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eliaskosunen/scnlib + REF v0.1.2 + SHA512 bb2aa176517d6547d62800839b7e9d86821a4006f7d09a8b3731b67f6fd7130f5cf8d73e7c8331c7c50f1dd5ca19bd3759bb0e181fcaed2f0bfb7fd8276ef141 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSCN_TESTS=OFF + -DSCN_EXAMPLES=OFF + -DSCN_BENCHMARKS=OFF + -DSCN_DOCS=OFF + -DSCN_RANGES=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/scn) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/scn) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/scnlib RENAME copyright) + + +vcpkg_test_cmake(PACKAGE_NAME scn) From 65d34c5e55ef30a6572dfb3b79d212196fbadc0d Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Mon, 15 Jul 2019 18:51:03 -0700 Subject: [PATCH 0183/1066] wheeeee more fixes --- toolsrc/include/vcpkg/base/strings.h | 8 +-- toolsrc/include/vcpkg/base/work_queue.h | 89 ++++++++----------------- toolsrc/src/tests.files.cpp | 64 +++++++++++------- toolsrc/src/tests.strings.cpp | 20 +++--- toolsrc/src/vcpkg/base/files.cpp | 2 +- toolsrc/src/vcpkg/base/strings.cpp | 23 +++---- 6 files changed, 90 insertions(+), 116 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index a1906790f..aa4c4d690 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -185,8 +185,8 @@ namespace vcpkg::Strings bool contains(StringView haystack, StringView needle); - // base 64 encoding with URL and filesafe alphabet (base64url) - // based on IETF RFC 4648 - // ignores padding, since one implicitly knows the length from the size of x - std::string b64url_encode(std::uint64_t x) noexcept; + // base 32 encoding, since base64 encoding requires lowercase letters, + // which are not distinct from uppercase letters on macOS or Windows filesystems. + // follows RFC 4648 + std::string b32_encode(std::uint64_t x) noexcept; } diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h index d6666770b..69ca387f3 100644 --- a/toolsrc/include/vcpkg/base/work_queue.h +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -36,7 +36,7 @@ namespace vcpkg { m_line_info = li; - m_unjoined_workers = num_threads; + set_unjoined_workers(num_threads); m_threads.reserve(num_threads); for (std::size_t i = 0; i < num_threads; ++i) { @@ -93,20 +93,16 @@ namespace vcpkg } } - for (;;) + while (unjoined_workers()) { - auto lck = std::unique_lock(m_mutex); - if (!m_unjoined_workers) - break; - - else if (!m_running_workers) + if (!running_workers()) { - lck.unlock(); - m_cv.notify_all(); - } + m_cv.notify_one(); + + } } - // all threads have returned -- now, it's time to join them + // wait for all threads to join for (auto& thrd : m_threads) { thrd.join(); @@ -143,50 +139,6 @@ namespace vcpkg m_cv.notify_one(); } - template - void enqueue_all_actions_by_move(Rng&& rng) const - { - { - using std::begin; - using std::end; - - auto lck = std::unique_lock(m_mutex); - - const auto first = begin(rng); - const auto last = end(rng); - - m_actions.reserve(m_actions.size() + (last - first)); - - std::move(first, last, std::back_inserter(rng)); - - if (m_state == State::BeforeRun) return; - } - - m_cv.notify_all(); - } - - template - void enqueue_all_actions(Rng&& rng) const - { - { - using std::begin; - using std::end; - - auto lck = std::unique_lock(m_mutex); - - const auto first = begin(rng); - const auto last = end(rng); - - m_actions.reserve(m_actions.size() + (last - first)); - - std::copy(first, last, std::back_inserter(rng)); - - if (m_state == State::BeforeRun) return; - } - - m_cv.notify_all(); - } - private: struct Worker { @@ -201,6 +153,7 @@ namespace vcpkg work_queue->m_cv.wait(lck, [&] { return work_queue->m_state != State::BeforeRun; }); + work_queue->increment_running_workers(); for (;;) { const auto state = work_queue->m_state; @@ -212,15 +165,15 @@ namespace vcpkg if (work_queue->m_actions.empty()) { - if (state == State::Running || work_queue->m_running_workers > 1) + if (state == State::Running || work_queue->running_workers() > 1) { - --work_queue->m_running_workers; + work_queue->decrement_running_workers(); work_queue->m_cv.wait(lck); - ++work_queue->m_running_workers; + work_queue->increment_running_workers(); continue; } - // the queue isn't running, and we are the only worker + // the queue is joining, and we are the only worker running // no more work! break; } @@ -229,11 +182,13 @@ namespace vcpkg work_queue->m_actions.pop_back(); lck.unlock(); + work_queue->m_cv.notify_one(); detail::call_moved_action(action, *work_queue, tld); lck.lock(); } - --work_queue->m_unjoined_workers; + work_queue->decrement_running_workers(); + work_queue->decrement_unjoined_workers(); } }; @@ -255,11 +210,21 @@ namespace vcpkg mutable std::mutex m_mutex{}; // these are all under m_mutex mutable State m_state = State::BeforeRun; - mutable std::uint16_t m_running_workers = 0; - mutable std::uint16_t m_unjoined_workers = 0; // num_threads mutable std::vector m_actions{}; mutable std::condition_variable m_cv{}; + mutable std::atomic m_workers; + // = unjoined_workers << 16 | running_workers + + void set_unjoined_workers(std::uint16_t threads) { m_workers = std::uint32_t(threads) << 16; } + void decrement_unjoined_workers() const { m_workers -= 1 << 16; } + + std::uint16_t unjoined_workers() const { return std::uint16_t(m_workers >> 16); } + + void increment_running_workers() const { ++m_workers; } + void decrement_running_workers() const { --m_workers; } + std::uint16_t running_workers() const { return std::uint16_t(m_workers); } + std::vector m_threads{}; LineInfo m_line_info; }; diff --git a/toolsrc/src/tests.files.cpp b/toolsrc/src/tests.files.cpp index c99dbb286..56b0ceac6 100644 --- a/toolsrc/src/tests.files.cpp +++ b/toolsrc/src/tests.files.cpp @@ -4,6 +4,7 @@ #include #include +#include // required for filesystem::create_{directory_}symlink #include #include @@ -21,18 +22,20 @@ namespace UnitTest1 { HKEY key; const auto status = RegOpenKeyExW( - HKEY_LOCAL_MACHINE, LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock)", 0, KEY_READ, &key); + HKEY_LOCAL_MACHINE, LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock)", 0, 0, &key); - if (!status) + if (status == ERROR_FILE_NOT_FOUND) { ALLOW_SYMLINKS = false; std::clog << "Symlinks are not allowed on this system\n"; } else { + // if we get a permissions error, we still know that we're in developer mode ALLOW_SYMLINKS = true; - RegCloseKey(key); } + + if (status == ERROR_SUCCESS) RegCloseKey(key); } private: @@ -62,9 +65,9 @@ namespace UnitTest1 std::clog << "temp dir is: " << temp_dir << '\n'; - std::error_code ec; create_directory_tree(urbg, fs, 0, temp_dir); + std::error_code ec; fs::path fp; fs.remove_all(temp_dir, ec, fp); Assert::IsFalse(bool(ec)); @@ -80,7 +83,7 @@ namespace UnitTest1 return std::mt19937_64{index + 9223372036854775837}; } - std::string get_random_filename(std::mt19937_64& urbg) { return vcpkg::Strings::b64url_encode(uid{}(urbg)); } + std::string get_random_filename(std::mt19937_64& urbg) { return vcpkg::Strings::b32_encode(uid{}(urbg)); } void create_directory_tree(std::mt19937_64& urbg, vcpkg::Files::Filesystem& fs, @@ -88,46 +91,57 @@ namespace UnitTest1 const fs::path& base) { std::random_device rd; - constexpr auto max_depth = std::uint64_t(3); - const auto width = depth ? uid{0, (max_depth - depth) * 3 / 2}(urbg) : 5; + constexpr std::uint64_t max_depth = 5; + constexpr std::uint64_t width = 5; + const auto type = depth < max_depth ? uid{0, 9}(urbg) : uid{7, 9}(urbg); + + // 0 <= type < 7 : directory + // 7 = type : regular + // 8 = type : regular symlink (regular file if !ALLOW_SYMLINKS) + // 9 = type : directory symlink (^^) std::error_code ec; - if (width == 0) + if (type >= 7) { // I don't want to move urbg forward conditionally - const auto type = uid{0, 3}(urbg); - if (type == 0 || !ALLOW_SYMLINKS) + if (type == 7 || !ALLOW_SYMLINKS) { - // 0 is a regular file + // regular file fs.write_contents(base, "", ec); } - else if (type == 1) + else if (type == 8) { - // 1 is a regular symlink + // regular symlink fs.write_contents(base, "", ec); Assert::IsFalse(bool(ec)); - fs::path base_link = base; - base_link.append("-link"); - fs::stdfs::create_symlink(base, base_link, ec); + const std::filesystem::path basep = base.native(); + auto basep_link = basep; + basep_link.replace_filename(basep.filename().native() + L"-link"); + std::filesystem::create_symlink(basep, basep_link, ec); } else { - // 2 is a directory symlink - fs::stdfs::create_directory_symlink(".", base, ec); + // directory symlink + std::filesystem::path basep = base.native(); + std::filesystem::create_directory_symlink(basep / "..", basep, ec); } Assert::IsFalse(bool(ec)); - return; } - - fs.create_directory(base, ec); - Assert::IsFalse(bool(ec)); - - for (int i = 0; i < width; ++i) + else { - create_directory_tree(urbg, fs, depth + 1, base / get_random_filename(urbg)); + // directory + fs.create_directory(base, ec); + Assert::IsFalse(bool(ec)); + + for (int i = 0; i < width; ++i) + { + create_directory_tree(urbg, fs, depth + 1, base / get_random_filename(urbg)); + } + } + } }; } diff --git a/toolsrc/src/tests.strings.cpp b/toolsrc/src/tests.strings.cpp index 14b449e86..6301ea05d 100644 --- a/toolsrc/src/tests.strings.cpp +++ b/toolsrc/src/tests.strings.cpp @@ -16,21 +16,21 @@ namespace UnitTest1 { std::vector> map; - map.emplace_back(0, "AAAAAAAAAAA"); - map.emplace_back(1, "BAAAAAAAAAA"); + map.emplace_back(0, "AAAAAAAAAAAAA"); + map.emplace_back(1, "BAAAAAAAAAAAA"); - map.emplace_back(u64(1) << 32, "AAAAAEAAAAA"); - map.emplace_back((u64(1) << 32) + 1, "BAAAAEAAAAA"); + map.emplace_back(u64(1) << 32, "AAAAAAEAAAAAA"); + map.emplace_back((u64(1) << 32) + 1, "BAAAAAEAAAAAA"); - map.emplace_back(0xE4D0'1065'D11E'0229, "pIgHRXGEQTO"); - map.emplace_back(0xA626'FE45'B135'07FF, "_fQNxWk_mYK"); - map.emplace_back(0xEE36'D228'0C31'D405, "FQdMMgi024O"); - map.emplace_back(0x1405'64E7'FE7E'A88C, "Miqf-fOZFQB"); - map.emplace_back(0xFFFF'FFFF'FFFF'FFFF, "__________P"); + map.emplace_back(0xE4D0'1065'D11E'0229, "JRA4RIXMQAUJO"); + map.emplace_back(0xA626'FE45'B135'07FF, "77BKTYWI6XJMK"); + map.emplace_back(0xEE36'D228'0C31'D405, "FAVDDGAFSWN4O"); + map.emplace_back(0x1405'64E7'FE7E'A88C, "MEK5H774ELBIB"); + map.emplace_back(0xFFFF'FFFF'FFFF'FFFF, "777777777777P"); std::string result; for (const auto& pr : map) { - result = vcpkg::Strings::b64url_encode(pr.first); + result = vcpkg::Strings::b32_encode(pr.first); Assert::AreEqual(result, pr.second); } } diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index e40822705..6c6945e44 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -423,7 +423,7 @@ namespace vcpkg::Files { std::error_code ec; - const auto tmp_name = Strings::b64url_encode(info.index++); + const auto tmp_name = Strings::b32_encode(info.index++); const auto tmp_path = info.tmp_directory / tmp_name; fs::stdfs::rename(current_path, tmp_path, ec); diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index ade4384a9..7970e1b46 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -294,26 +294,21 @@ namespace vcpkg::Strings namespace { template - std::string b64url_encode_implementation(Integral x) + std::string b32_encode_implementation(Integral x) { static_assert(std::is_integral::value, "b64url_encode must take an integer type"); using Unsigned = std::make_unsigned_t; auto value = static_cast(x); - // 64 values, plus the implicit \0 - constexpr static char map[65] = - /* 0123456789ABCDEF */ - /*0*/ "ABCDEFGHIJKLMNOP" - /*1*/ "QRSTUVWXYZabcdef" - /*2*/ "ghijklmnopqrstuv" - /*3*/ "wxyz0123456789-_"; + // 32 values, plus the implicit \0 + constexpr static char map[33] = "ABCDEFGHIJKLMNOP" "QRSTUVWXYZ234567"; - // log2(64) - constexpr static int shift = 6; - // 64 - 1 - constexpr static auto mask = 63; + // log2(32) + constexpr static int shift = 5; + // 32 - 1 + constexpr static auto mask = 31; - // ceiling(bitsize(Integral) / log2(64)) + // ceiling(bitsize(Integral) / log2(32)) constexpr static auto result_size = (sizeof(value) * 8 + shift - 1) / shift; std::string result; @@ -329,6 +324,6 @@ namespace vcpkg::Strings } } - std::string b64url_encode(std::uint64_t x) noexcept { return b64url_encode_implementation(x); } + std::string b32_encode(std::uint64_t x) noexcept { return b32_encode_implementation(x); } } From 684989a1e48b6b7f0ac1c340a702236974762f05 Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Tue, 16 Jul 2019 14:02:13 -0700 Subject: [PATCH 0184/1066] use additional env param --- scripts/get_triplet_environment.cmake | 1 + toolsrc/include/vcpkg/build.h | 24 ++ toolsrc/include/vcpkg/sourceparagraph.h | 2 + toolsrc/src/vcpkg/build.cpp | 452 ++++++++++++++---------- toolsrc/src/vcpkg/sourceparagraph.cpp | 22 ++ triplets/x64-linux.cmake | 2 + 6 files changed, 311 insertions(+), 192 deletions(-) diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake index bc79b16ce..24ff40905 100644 --- a/scripts/get_triplet_environment.cmake +++ b/scripts/get_triplet_environment.cmake @@ -9,3 +9,4 @@ message("VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}") message("VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}") message("VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") message("VCPKG_BUILD_TYPE=${VCPKG_BUILD_TYPE}") +message("VCPKG_ENV_PASSTHROUGH=${VCPKG_ENV_PASSTHROUGH}") diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 04cd7cf87..e26597376 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -117,6 +117,29 @@ namespace vcpkg::Build std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); std::string create_user_troubleshooting_message(const PackageSpec& spec); + enum class VcpkgTripletVar + { + TARGET_ARCHITECTURE = 0, + CMAKE_SYSTEM_NAME, + CMAKE_SYSTEM_VERSION, + PLATFORM_TOOLSET, + VISUAL_STUDIO_PATH, + CHAINLOAD_TOOLCHAIN_FILE, + BUILD_TYPE, + ENV_PASSTHROUGH, + }; + + const std::unordered_map VCPKG_OPTIONS = { + {"VCPKG_TARGET_ARCHITECTURE", VcpkgTripletVar::TARGET_ARCHITECTURE}, + {"VCPKG_CMAKE_SYSTEM_NAME", VcpkgTripletVar::CMAKE_SYSTEM_NAME}, + {"VCPKG_CMAKE_SYSTEM_VERSION", VcpkgTripletVar::CMAKE_SYSTEM_VERSION}, + {"VCPKG_PLATFORM_TOOLSET", VcpkgTripletVar::PLATFORM_TOOLSET}, + {"VCPKG_VISUAL_STUDIO_PATH", VcpkgTripletVar::VISUAL_STUDIO_PATH}, + {"VCPKG_CHAINLOAD_TOOLCHAIN_FILE", VcpkgTripletVar::CHAINLOAD_TOOLCHAIN_FILE}, + {"VCPKG_BUILD_TYPE", VcpkgTripletVar::BUILD_TYPE}, + {"VCPKG_ENV_PASSTHROUGH", VcpkgTripletVar::ENV_PASSTHROUGH}, + }; + /// /// Settings from the triplet file which impact the build environment and post-build checks /// @@ -135,6 +158,7 @@ namespace vcpkg::Build Optional visual_studio_path; Optional external_toolchain_file; Optional build_type; + std::vector passthrough_env_vars; }; std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index 6232a3fd2..9fbd83475 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -23,6 +23,8 @@ namespace vcpkg std::vector filter_dependencies(const std::vector& deps, const Triplet& t); std::vector filter_dependencies_to_specs(const std::vector& deps, const Triplet& t); + std::vector filter_dependencies_to_features(const std::vector& deps, + const Triplet& t); // zlib[uwp] becomes Dependency{"zlib", "uwp"} std::vector expand_qualified_dependencies(const std::vector& depends); diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 68df1f965..e0c78f2da 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -32,24 +32,14 @@ namespace vcpkg::Build::Command using Dependencies::InstallPlanAction; using Dependencies::InstallPlanType; - static constexpr StringLiteral OPTION_CHECKS_ONLY = "--checks-only"; - void perform_and_exit_ex(const FullPackageSpec& full_spec, const SourceControlFileLocation& scfl, const ParsedArguments& options, const VcpkgPaths& paths) { + const StatusParagraphs status_db = database_load_check(paths); const PackageSpec& spec = full_spec.package_spec; - const auto& scf = *scfl.source_control_file; - if (Util::Sets::contains(options.switches, OPTION_CHECKS_ONLY)) - { - const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, spec.triplet()); - const auto build_info = Build::read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec)); - const size_t error_count = - PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info, scfl.source_location); - Checks::check_exit(VCPKG_LINE_INFO, error_count == 0); - Checks::exit_success(VCPKG_LINE_INFO); - } + const SourceControlFile& scf = *scfl.source_control_file; Checks::check_exit(VCPKG_LINE_INFO, spec.name() == scf.core_paragraph->name, @@ -57,7 +47,6 @@ namespace vcpkg::Build::Command scf.core_paragraph->name, spec.name()); - const StatusParagraphs status_db = database_load_check(paths); const Build::BuildPackageOptions build_package_options{ Build::UseHeadVersion::NO, Build::AllowDownloads::YES, @@ -104,15 +93,11 @@ namespace vcpkg::Build::Command Checks::exit_success(VCPKG_LINE_INFO); } - static constexpr std::array BUILD_SWITCHES = {{ - {OPTION_CHECKS_ONLY, "Only run checks, do not rebuild package"}, - }}; - const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("build zlib:x64-windows"), 1, 1, - {BUILD_SWITCHES, {}}, + {{}, {}}, nullptr, }; @@ -230,6 +215,23 @@ namespace vcpkg::Build })); } + std::unordered_map make_env_passthrough(const PreBuildInfo& pre_build_info) + { + std::unordered_map env; + + for (auto&& env_var : pre_build_info.passthrough_env_vars) + { + auto env_val = System::get_environment_variable(env_var); + + if (env_val) + { + env[env_var] = env_val.value_or_exit(VCPKG_LINE_INFO); + } + } + + return env; + } + std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) { if (pre_build_info.external_toolchain_file.has_value()) return ""; @@ -274,7 +276,7 @@ namespace vcpkg::Build return bcf; } - static void write_binary_control_file(const VcpkgPaths& paths, BinaryControlFile bcf) + static void write_binary_control_file(const VcpkgPaths& paths, const BinaryControlFile& bcf) { std::string start = Strings::serialize(bcf.core_paragraph); for (auto&& feature : bcf.features) @@ -285,23 +287,63 @@ namespace vcpkg::Build paths.get_filesystem().write_contents(binary_control_file, start, VCPKG_LINE_INFO); } + static std::vector get_dependencies(const SourceControlFile& scf, + const std::set& feature_list, + const Triplet& triplet) + { + return Util::fmap_flatten(feature_list, + [&](std::string const& feature) -> std::vector { + if (feature == "core") + { + return filter_dependencies_to_features(scf.core_paragraph->depends, triplet); + } + + auto maybe_feature = scf.find_feature(feature); + Checks::check_exit(VCPKG_LINE_INFO, maybe_feature.has_value()); + + return filter_dependencies_to_features(maybe_feature.get()->depends, triplet); + } + ); + } + + static std::vector get_dependency_names(const SourceControlFile& scf, + const std::set& feature_list, + const Triplet& triplet) + { + return Util::fmap(get_dependencies(scf, feature_list, triplet), + [&](const Features& feat) { + return feat.name; + } + ); + } + + static std::vector get_partials(const VcpkgPaths& paths, + const std::vector& dependencies, + const Triplet& triplet) + { + std::vector ret; + Files::Filesystem& fs = paths.get_filesystem(); + + for (const std::string& dependency : dependencies) + { + fs::path partial = + paths.buildtrees / dependency / triplet.canonical_name() / "partial_triplet.cmake"; + if (fs.is_regular_file(partial)) + { + ret.emplace_back(std::move(partial)); + } + } + + return ret; + } + static std::vector compute_required_feature_specs(const BuildPackageConfig& config, const StatusParagraphs& status_db) { const Triplet& triplet = config.triplet; const std::vector dep_strings = - Util::fmap_flatten(config.feature_list, [&](std::string const& feature) -> std::vector { - if (feature == "core") - { - return filter_dependencies(config.scf.core_paragraph->depends, triplet); - } - - auto maybe_feature = config.scf.find_feature(feature); - Checks::check_exit(VCPKG_LINE_INFO, maybe_feature.has_value()); - - return filter_dependencies(maybe_feature.get()->depends, triplet); - }); + get_dependency_names(config.scf, config.feature_list, triplet); auto dep_fspecs = FeatureSpec::from_strings_and_triplet(dep_strings, triplet); Util::sort_unique_erase(dep_fspecs); @@ -353,6 +395,139 @@ namespace vcpkg::Build return concurrency; } + static std::vector get_cmake_vars(const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const BuildPackageConfig& config, + const Triplet& triplet, + const Toolset& toolset) + { +#if !defined(_WIN32) + // TODO: remove when vcpkg.exe is in charge for acquiring tools. Change introduced in vcpkg v0.0.107. + // bootstrap should have already downloaded ninja, but making sure it is present in case it was deleted. + vcpkg::Util::unused(paths.get_tool_exe(Tools::NINJA)); +#endif + + const fs::path& git_exe_path = paths.get_tool_exe(Tools::GIT); + + std::string all_features; + for (auto& feature : config.scf.feature_paragraphs) + { + all_features.append(feature->name + ";"); + } + + std::vector partials = + Util::fmap( + get_partials(paths, get_dependency_names(config.scf, config.feature_list, triplet), triplet), + [&](const fs::path& path) + { + return path.u8string(); + } + ); + + std::vector variables{ + {"CMD", "BUILD"}, + {"PORT", config.scf.core_paragraph->name}, + {"CURRENT_PORT_DIR", config.port_dir}, + {"TARGET_TRIPLET", triplet.canonical_name()}, + {"TARGET_TRIPLET_FILE", paths.get_triplet_file_path(triplet).u8string()}, + {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, + {"VCPKG_USE_HEAD_VERSION", Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"DOWNLOADS", paths.downloads}, + {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + {"_VCPKG_DOWNLOAD_TOOL", to_string(config.build_package_options.download_tool)}, + {"FEATURES", Strings::join(";", config.feature_list)}, + {"ALL_FEATURES", all_features}, + {"VCPKG_CONCURRENCY", std::to_string(get_concurrency())}, + {"VCPKG_PARTIAL_TRIPLETS", Strings::join(";", partials)}, + }; + + if (!System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) + { + variables.push_back({"GIT", git_exe_path}); + } + + return variables; + } + + static std::string make_build_cmd(const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const BuildPackageConfig& config, + const Triplet& triplet) + { + const Toolset& toolset = paths.get_toolset(pre_build_info); + const fs::path& cmake_exe_path = paths.get_tool_exe(Tools::CMAKE); + std::vector variables = + get_cmake_vars(paths, pre_build_info, config, triplet, toolset); + + const std::string cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, paths.ports_cmake, variables); + + std::string command = make_build_env_cmd(pre_build_info, toolset); + if (!command.empty()) + { +#ifdef _WIN32 + command.append(" & "); +#else + command.append(" && "); +#endif + } + + command.append(cmd_launch_cmake); + + return command; + } + + static std::string get_triplet_abi(const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const Triplet& triplet) + { + static std::map s_hash_cache; + + const fs::path triplet_file_path = paths.get_triplet_file_path(triplet); + const auto& fs = paths.get_filesystem(); + + std::string hash; + + auto it_hash = s_hash_cache.find(triplet_file_path); + if (it_hash != s_hash_cache.end()) + { + hash = it_hash->second; + } + else + { + hash = Hash::get_file_hash(fs, triplet_file_path, "SHA1"); + + if (auto p = pre_build_info.external_toolchain_file.get()) + { + hash += "-"; + hash += Hash::get_file_hash(fs, *p, "SHA1"); + } + else if (pre_build_info.cmake_system_name == "Linux") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "linux.cmake", "SHA1"); + } + else if (pre_build_info.cmake_system_name == "Darwin") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "osx.cmake", "SHA1"); + } + else if (pre_build_info.cmake_system_name == "FreeBSD") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "freebsd.cmake", "SHA1"); + } + else if (pre_build_info.cmake_system_name == "Android") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "android.cmake", "SHA1"); + } + + s_hash_cache.emplace(triplet_file_path, hash); + } + + return hash; + } + static ExtendedBuildResult do_build_package(const VcpkgPaths& paths, const PreBuildInfo& pre_build_info, const PackageSpec& spec, @@ -372,72 +547,16 @@ namespace vcpkg::Build System::printf("-- Installing port from location: %s\n", config.port_dir.u8string()); } -#if !defined(_WIN32) - // TODO: remove when vcpkg.exe is in charge for acquiring tools. Change introduced in vcpkg v0.0.107. - // bootstrap should have already downloaded ninja, but making sure it is present in case it was deleted. - vcpkg::Util::unused(paths.get_tool_exe(Tools::NINJA)); -#endif - - const fs::path& cmake_exe_path = paths.get_tool_exe(Tools::CMAKE); - const fs::path& git_exe_path = paths.get_tool_exe(Tools::GIT); -#if defined(_WIN32) - const fs::path& powershell_exe_path = paths.get_tool_exe("powershell-core"); - if (!fs.exists(powershell_exe_path.parent_path() / "powershell.exe")) - { - fs.copy(powershell_exe_path, powershell_exe_path.parent_path() / "powershell.exe", fs::copy_options::none); - } -#endif - - std::string all_features; - for (auto& feature : config.scf.feature_paragraphs) - { - all_features.append(feature->name + ";"); - } - - const Toolset& toolset = paths.get_toolset(pre_build_info); - - std::vector variables{ - {"CMD", "BUILD"}, - {"PORT", config.scf.core_paragraph->name}, - {"CURRENT_PORT_DIR", config.port_dir}, - {"TARGET_TRIPLET", spec.triplet().canonical_name()}, - {"TARGET_TRIPLET_FILE", triplet_file_path}, - {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, - {"VCPKG_USE_HEAD_VERSION", Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, - {"DOWNLOADS", paths.downloads}, - {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, - {"_VCPKG_DOWNLOAD_TOOL", to_string(config.build_package_options.download_tool)}, - {"FEATURES", Strings::join(";", config.feature_list)}, - {"ALL_FEATURES", all_features}, - {"VCPKG_CONCURRENCY", std::to_string(get_concurrency())}, - }; - - if (!System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) - { - variables.push_back({"GIT", git_exe_path}); - } - - const std::string cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, paths.ports_cmake, variables); - - auto command = make_build_env_cmd(pre_build_info, toolset); - if (!command.empty()) - { -#ifdef _WIN32 - command.append(" & "); -#else - command.append(" && "); -#endif - } - command.append(cmd_launch_cmake); const auto timer = Chrono::ElapsedTimer::create_started(); - const int return_code = System::cmd_execute_clean( - command, - {} -#ifdef _WIN32 - , - powershell_exe_path.parent_path().u8string() + ";" -#endif - ); + + std::string command = + make_build_cmd(paths, pre_build_info, config, triplet); + std::unordered_map env = + make_env_passthrough(pre_build_info); + + const int return_code = + System::cmd_execute_clean(command, env); + const auto buildtimeus = timer.microseconds(); const auto spec_string = spec.to_string(); @@ -711,7 +830,7 @@ namespace vcpkg::Build { System::print2("Using cached binary package: ", archive_path.u8string(), "\n"); - auto archive_result = decompress_archive(paths, spec, archive_path); + int archive_result = decompress_archive(paths, spec, archive_path); if (archive_result != 0) { @@ -946,111 +1065,60 @@ namespace vcpkg::Build const std::string variable_name = s.at(0); const std::string variable_value = variable_with_no_value ? "" : s.at(1); - if (variable_name == "VCPKG_TARGET_ARCHITECTURE") + auto maybe_option = VCPKG_OPTIONS.find(variable_name); + if (maybe_option != VCPKG_OPTIONS.end()) { - pre_build_info.target_architecture = variable_value; - continue; + switch (maybe_option->second) + { + case VcpkgTripletVar::TARGET_ARCHITECTURE : + pre_build_info.target_architecture = variable_value; + break; + case VcpkgTripletVar::CMAKE_SYSTEM_NAME : + pre_build_info.cmake_system_name = variable_value; + break; + case VcpkgTripletVar::CMAKE_SYSTEM_VERSION : + pre_build_info.cmake_system_version = variable_value; + break; + case VcpkgTripletVar::PLATFORM_TOOLSET : + pre_build_info.platform_toolset = + variable_value.empty() ? nullopt : Optional{variable_value}; + break; + case VcpkgTripletVar::VISUAL_STUDIO_PATH : + pre_build_info.visual_studio_path = + variable_value.empty() ? nullopt : Optional{variable_value}; + break; + case VcpkgTripletVar::CHAINLOAD_TOOLCHAIN_FILE : + pre_build_info.external_toolchain_file = + variable_value.empty() ? nullopt : Optional{variable_value}; + break; + case VcpkgTripletVar::BUILD_TYPE : + if (variable_value.empty()) + pre_build_info.build_type = nullopt; + else if (Strings::case_insensitive_ascii_equals(variable_value, "debug")) + pre_build_info.build_type = ConfigurationType::DEBUG; + else if (Strings::case_insensitive_ascii_equals(variable_value, "release")) + pre_build_info.build_type = ConfigurationType::RELEASE; + else + Checks::exit_with_message( + VCPKG_LINE_INFO, "Unknown setting for VCPKG_BUILD_TYPE: %s", variable_value); + break; + case VcpkgTripletVar::ENV_PASSTHROUGH : + pre_build_info.passthrough_env_vars = Strings::split(variable_value, ";"); + break; + } } - - if (variable_name == "VCPKG_CMAKE_SYSTEM_NAME") + else { - pre_build_info.cmake_system_name = variable_value; - continue; + Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown variable name %s", line); } - - if (variable_name == "VCPKG_CMAKE_SYSTEM_VERSION") - { - pre_build_info.cmake_system_version = variable_value; - continue; - } - - if (variable_name == "VCPKG_PLATFORM_TOOLSET") - { - pre_build_info.platform_toolset = - variable_value.empty() ? nullopt : Optional{variable_value}; - continue; - } - - if (variable_name == "VCPKG_VISUAL_STUDIO_PATH") - { - pre_build_info.visual_studio_path = - variable_value.empty() ? nullopt : Optional{variable_value}; - continue; - } - - if (variable_name == "VCPKG_CHAINLOAD_TOOLCHAIN_FILE") - { - pre_build_info.external_toolchain_file = - variable_value.empty() ? nullopt : Optional{variable_value}; - continue; - } - - if (variable_name == "VCPKG_BUILD_TYPE") - { - if (variable_value.empty()) - pre_build_info.build_type = nullopt; - else if (Strings::case_insensitive_ascii_equals(variable_value, "debug")) - pre_build_info.build_type = ConfigurationType::DEBUG; - else if (Strings::case_insensitive_ascii_equals(variable_value, "release")) - pre_build_info.build_type = ConfigurationType::RELEASE; - else - Checks::exit_with_message( - VCPKG_LINE_INFO, "Unknown setting for VCPKG_BUILD_TYPE: %s", variable_value); - continue; - } - - Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown variable name %s", line); } - pre_build_info.triplet_abi_tag = [&]() { - const auto& fs = paths.get_filesystem(); - static std::map s_hash_cache; - - auto it_hash = s_hash_cache.find(triplet_file_path); - if (it_hash != s_hash_cache.end()) - { - return it_hash->second; - } - auto hash = Hash::get_file_hash(fs, triplet_file_path, "SHA1"); - - if (auto p = pre_build_info.external_toolchain_file.get()) - { - hash += "-"; - hash += Hash::get_file_hash(fs, *p, "SHA1"); - } - else if (pre_build_info.cmake_system_name.empty() || - pre_build_info.cmake_system_name == "WindowsStore") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "windows.cmake", "SHA1"); - } - else if (pre_build_info.cmake_system_name == "Linux") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "linux.cmake", "SHA1"); - } - else if (pre_build_info.cmake_system_name == "Darwin") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "osx.cmake", "SHA1"); - } - else if (pre_build_info.cmake_system_name == "FreeBSD") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "freebsd.cmake", "SHA1"); - } - else if (pre_build_info.cmake_system_name == "Android") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "android.cmake", "SHA1"); - } - - s_hash_cache.emplace(triplet_file_path, hash); - return hash; - }(); + pre_build_info.triplet_abi_tag = + get_triplet_abi(paths, pre_build_info, triplet); return pre_build_info; } + ExtendedBuildResult::ExtendedBuildResult(BuildResult code) : code(code) {} ExtendedBuildResult::ExtendedBuildResult(BuildResult code, std::unique_ptr&& bcf) : code(code), binary_control_file(std::move(bcf)) diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 9bc59cbe7..1a52bd05f 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -238,6 +238,28 @@ namespace vcpkg return ret; } + std::vector filter_dependencies_to_features(const std::vector& deps, + const Triplet& t) + { + std::vector ret; + for (auto&& dep : deps) + { + auto qualifiers = Strings::split(dep.qualifier, "&"); + if (std::all_of(qualifiers.begin(), qualifiers.end(), [&](const std::string& qualifier) { + if (qualifier.empty()) return true; + if (qualifier[0] == '!') + { + return t.canonical_name().find(qualifier.substr(1)) == std::string::npos; + } + return t.canonical_name().find(qualifier) != std::string::npos; + })) + { + ret.emplace_back(dep.depend); + } + } + return ret; + } + std::vector filter_dependencies_to_specs(const std::vector& deps, const Triplet& t) { return FeatureSpec::from_strings_and_triplet(filter_dependencies(deps, t), t); diff --git a/triplets/x64-linux.cmake b/triplets/x64-linux.cmake index 519618463..05cb02940 100644 --- a/triplets/x64-linux.cmake +++ b/triplets/x64-linux.cmake @@ -3,3 +3,5 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CMAKE_SYSTEM_NAME Linux) + +set(VCPKG_ENV_PASSTHROUGH FC) From 6bef95b6f50b2bb602781d6d8898d27639294ff6 Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Tue, 16 Jul 2019 14:43:56 -0700 Subject: [PATCH 0185/1066] remove partials --- toolsrc/src/vcpkg/build.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index e0c78f2da..dd2beec9d 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -317,26 +317,6 @@ namespace vcpkg::Build ); } - static std::vector get_partials(const VcpkgPaths& paths, - const std::vector& dependencies, - const Triplet& triplet) - { - std::vector ret; - Files::Filesystem& fs = paths.get_filesystem(); - - for (const std::string& dependency : dependencies) - { - fs::path partial = - paths.buildtrees / dependency / triplet.canonical_name() / "partial_triplet.cmake"; - if (fs.is_regular_file(partial)) - { - ret.emplace_back(std::move(partial)); - } - } - - return ret; - } - static std::vector compute_required_feature_specs(const BuildPackageConfig& config, const StatusParagraphs& status_db) { @@ -415,15 +395,6 @@ namespace vcpkg::Build all_features.append(feature->name + ";"); } - std::vector partials = - Util::fmap( - get_partials(paths, get_dependency_names(config.scf, config.feature_list, triplet), triplet), - [&](const fs::path& path) - { - return path.u8string(); - } - ); - std::vector variables{ {"CMD", "BUILD"}, {"PORT", config.scf.core_paragraph->name}, @@ -438,7 +409,6 @@ namespace vcpkg::Build {"FEATURES", Strings::join(";", config.feature_list)}, {"ALL_FEATURES", all_features}, {"VCPKG_CONCURRENCY", std::to_string(get_concurrency())}, - {"VCPKG_PARTIAL_TRIPLETS", Strings::join(";", partials)}, }; if (!System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) From a22242e837cc1af63ff754545512f5a754a70426 Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Tue, 16 Jul 2019 14:45:52 -0700 Subject: [PATCH 0186/1066] remove change to linux triplet --- triplets/x64-linux.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/triplets/x64-linux.cmake b/triplets/x64-linux.cmake index 05cb02940..519618463 100644 --- a/triplets/x64-linux.cmake +++ b/triplets/x64-linux.cmake @@ -3,5 +3,3 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CMAKE_SYSTEM_NAME Linux) - -set(VCPKG_ENV_PASSTHROUGH FC) From 44dcc3d4f3d2bc56cc9f6d0371a141ad0145d537 Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Tue, 16 Jul 2019 15:34:13 -0700 Subject: [PATCH 0187/1066] First pass at port settings --- scripts/get_triplet_environment.cmake | 3 ++ toolsrc/include/vcpkg/build.h | 48 ++++++++++++++------------- toolsrc/src/vcpkg/build.cpp | 21 +++++++++--- toolsrc/src/vcpkg/commands.ci.cpp | 9 ++++- 4 files changed, 52 insertions(+), 29 deletions(-) diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake index 24ff40905..e561492de 100644 --- a/scripts/get_triplet_environment.cmake +++ b/scripts/get_triplet_environment.cmake @@ -1,4 +1,7 @@ include(${CMAKE_TRIPLET_FILE}) +if (DEFINED CMAKE_PORTFILE_SETTINGS) + include(${CMAKE_PORTFILE_SETTINGS} OPTIONAL) +endif() # GUID used as a flag - "cut here line" message("c35112b6-d1ba-415b-aa5d-81de856ef8eb") diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index e26597376..0d10d12a4 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -140,29 +140,6 @@ namespace vcpkg::Build {"VCPKG_ENV_PASSTHROUGH", VcpkgTripletVar::ENV_PASSTHROUGH}, }; - /// - /// Settings from the triplet file which impact the build environment and post-build checks - /// - struct PreBuildInfo - { - /// - /// Runs the triplet file in a "capture" mode to create a PreBuildInfo - /// - static PreBuildInfo from_triplet_file(const VcpkgPaths& paths, const Triplet& triplet); - - std::string triplet_abi_tag; - std::string target_architecture; - std::string cmake_system_name; - std::string cmake_system_version; - Optional platform_toolset; - Optional visual_studio_path; - Optional external_toolchain_file; - Optional build_type; - std::vector passthrough_env_vars; - }; - - std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); - struct ExtendedBuildResult { ExtendedBuildResult(BuildResult code); @@ -200,6 +177,31 @@ namespace vcpkg::Build const BuildPackageConfig& config, const StatusParagraphs& status_db); + /// + /// Settings from the triplet file which impact the build environment and post-build checks + /// + struct PreBuildInfo + { + /// + /// Runs the triplet file in a "capture" mode to create a PreBuildInfo + /// + static PreBuildInfo from_triplet_file(const VcpkgPaths& paths, + const Triplet& triplet, + Optional port = nullopt); + + std::string triplet_abi_tag; + std::string target_architecture; + std::string cmake_system_name; + std::string cmake_system_version; + Optional platform_toolset; + Optional visual_studio_path; + Optional external_toolchain_file; + Optional build_type; + std::vector passthrough_env_vars; + }; + + std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); + enum class BuildPolicy { EMPTY_PACKAGE, diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index dd2beec9d..646da7398 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -782,7 +782,8 @@ namespace vcpkg::Build AbiEntry{status_it->get()->package.spec.name(), status_it->get()->package.abi}); } - const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); + const auto pre_build_info = + PreBuildInfo::from_triplet_file(paths, triplet, config.scf.core_paragraph->name); auto maybe_abi_tag_and_file = compute_abi_tag(paths, config, pre_build_info, dependency_abis); @@ -997,7 +998,9 @@ namespace vcpkg::Build return inner_create_buildinfo(*pghs.get()); } - PreBuildInfo PreBuildInfo::from_triplet_file(const VcpkgPaths& paths, const Triplet& triplet) + PreBuildInfo PreBuildInfo::from_triplet_file(const VcpkgPaths& paths, + const Triplet& triplet, + Optional port) { static constexpr CStringView FLAG_GUID = "c35112b6-d1ba-415b-aa5d-81de856ef8eb"; @@ -1005,11 +1008,19 @@ namespace vcpkg::Build const fs::path ports_cmake_script_path = paths.scripts / "get_triplet_environment.cmake"; const fs::path triplet_file_path = paths.get_triplet_file_path(triplet); + std::vector args{{"CMAKE_TRIPLET_FILE", triplet_file_path}}; + + if (port) + { + args.emplace_back( + "CMAKE_PORT_SETTINGS", + paths.ports / port.value_or_exit(VCPKG_LINE_INFO) / "port_settings.cmake"); + } + const auto cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, ports_cmake_script_path, - { - {"CMAKE_TRIPLET_FILE", triplet_file_path}, - }); + args); + const auto ec_data = System::cmd_execute_and_capture_output(cmd_launch_cmake); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, ec_data.output); diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index c12c26ff7..493c052cb 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -254,7 +254,14 @@ namespace vcpkg::Commands::CI return {spec.name(), it->second}; }); const auto& pre_build_info = pre_build_info_cache.get_lazy( - triplet, [&]() { return Build::PreBuildInfo::from_triplet_file(paths, triplet); }); + triplet, + [&]() { + return Build::PreBuildInfo::from_triplet_file( + paths, + triplet, + scfl->source_control_file->core_paragraph->name); + } + ); auto maybe_tag_and_file = Build::compute_abi_tag(paths, build_config, pre_build_info, dependency_abis); From 001df4c9e8cee12bbe669b4aeddd1f085d7a7586 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Wed, 17 Jul 2019 06:43:41 +0800 Subject: [PATCH 0188/1066] [mongoose] Add new port (#7089) * [mongoose] Add new port * [mongoose] About UWP * [mongoose] Take advantage of cmake 3.14 improvements --- ports/mongoose/CMakeLists.txt | 20 ++++++++++++++++++++ ports/mongoose/CONTROL | 4 ++++ ports/mongoose/portfile.cmake | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 ports/mongoose/CMakeLists.txt create mode 100644 ports/mongoose/CONTROL create mode 100644 ports/mongoose/portfile.cmake diff --git a/ports/mongoose/CMakeLists.txt b/ports/mongoose/CMakeLists.txt new file mode 100644 index 000000000..77fe2f839 --- /dev/null +++ b/ports/mongoose/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.14) + +project(mongoose C) + +include(GNUInstallDirs) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +add_library(mongoose mongoose.c) +target_include_directories(mongoose PUBLIC $) +set_target_properties(mongoose PROPERTIES PUBLIC_HEADER mongoose.h) + +install(TARGETS mongoose EXPORT unofficial-mongoose-config) + +install( + EXPORT unofficial-mongoose-config + NAMESPACE unofficial::mongoose:: + DESTINATION share/unofficial-mongoose + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/ports/mongoose/CONTROL b/ports/mongoose/CONTROL new file mode 100644 index 000000000..ae0bbc758 --- /dev/null +++ b/ports/mongoose/CONTROL @@ -0,0 +1,4 @@ +Source: mongoose +Version: 6.15-1 +Description: Embedded web server / embedded networking library +Homepage: https://cesanta.com/ diff --git a/ports/mongoose/portfile.cmake b/ports/mongoose/portfile.cmake new file mode 100644 index 000000000..81c8d50ee --- /dev/null +++ b/ports/mongoose/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cesanta/mongoose + REF 6.15 + SHA512 d736aeb9ccb7a67fb8180ed324d3fa26e005bfc2ede1db00d73349976bfcfb45489ce3efb178817937fae3cd9f6a6e9c4b620af8517e3ace9c53b9541539bdde + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) From 64198a8109b9d1cffcc3830f70d0c3f2b066638d Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Tue, 16 Jul 2019 15:51:50 -0700 Subject: [PATCH 0189/1066] Add to vcpkg.cmake --- scripts/get_triplet_environment.cmake | 4 ++-- scripts/ports.cmake | 1 + toolsrc/src/vcpkg/build.cpp | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake index e561492de..f76054556 100644 --- a/scripts/get_triplet_environment.cmake +++ b/scripts/get_triplet_environment.cmake @@ -1,6 +1,6 @@ include(${CMAKE_TRIPLET_FILE}) -if (DEFINED CMAKE_PORTFILE_SETTINGS) - include(${CMAKE_PORTFILE_SETTINGS} OPTIONAL) +if (DEFINED CMAKE_PORT_SETTINGS) + include(${CMAKE_PORT_SETTINGS} OPTIONAL) endif() # GUID used as a flag - "cut here line" diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 860d08893..0c33fdffc 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -67,6 +67,7 @@ if(CMD MATCHES "^BUILD$") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR} ${CURRENT_PACKAGES_DIR}) include(${CMAKE_TRIPLET_FILE}) + include(${CMAKE_PORT_SETTINGS} OPTIONAL) set(TRIPLET_SYSTEM_ARCH ${VCPKG_TARGET_ARCHITECTURE}) include(${CMAKE_CURRENT_LIST_DIR}/cmake/vcpkg_common_definitions.cmake) include(${CMAKE_CURRENT_LIST_DIR}/cmake/vcpkg_common_functions.cmake) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 646da7398..03e0c0b1d 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -401,6 +401,7 @@ namespace vcpkg::Build {"CURRENT_PORT_DIR", config.port_dir}, {"TARGET_TRIPLET", triplet.canonical_name()}, {"TARGET_TRIPLET_FILE", paths.get_triplet_file_path(triplet).u8string()}, + {"CMAKE_PORT_SETTINGS", config.port_dir / "port_settings.cmake"}, {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, {"VCPKG_USE_HEAD_VERSION", Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, {"DOWNLOADS", paths.downloads}, From 7d9d457f589d82d6675c511636808a0fbee7a4e5 Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Tue, 16 Jul 2019 16:09:30 -0700 Subject: [PATCH 0190/1066] revert unecessary reordering --- toolsrc/include/vcpkg/build.h | 92 +++++++++++++++++------------------ 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 0d10d12a4..a0ad64ffd 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -117,28 +117,53 @@ namespace vcpkg::Build std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); std::string create_user_troubleshooting_message(const PackageSpec& spec); - enum class VcpkgTripletVar - { - TARGET_ARCHITECTURE = 0, - CMAKE_SYSTEM_NAME, - CMAKE_SYSTEM_VERSION, - PLATFORM_TOOLSET, - VISUAL_STUDIO_PATH, - CHAINLOAD_TOOLCHAIN_FILE, - BUILD_TYPE, - ENV_PASSTHROUGH, - }; + /// + /// Settings from the triplet file which impact the build environment and post-build checks + /// + struct PreBuildInfo + { + /// + /// Runs the triplet file in a "capture" mode to create a PreBuildInfo + /// + static PreBuildInfo from_triplet_file(const VcpkgPaths& paths, + const Triplet& triplet, + Optional port = nullopt); - const std::unordered_map VCPKG_OPTIONS = { - {"VCPKG_TARGET_ARCHITECTURE", VcpkgTripletVar::TARGET_ARCHITECTURE}, - {"VCPKG_CMAKE_SYSTEM_NAME", VcpkgTripletVar::CMAKE_SYSTEM_NAME}, - {"VCPKG_CMAKE_SYSTEM_VERSION", VcpkgTripletVar::CMAKE_SYSTEM_VERSION}, - {"VCPKG_PLATFORM_TOOLSET", VcpkgTripletVar::PLATFORM_TOOLSET}, - {"VCPKG_VISUAL_STUDIO_PATH", VcpkgTripletVar::VISUAL_STUDIO_PATH}, - {"VCPKG_CHAINLOAD_TOOLCHAIN_FILE", VcpkgTripletVar::CHAINLOAD_TOOLCHAIN_FILE}, - {"VCPKG_BUILD_TYPE", VcpkgTripletVar::BUILD_TYPE}, - {"VCPKG_ENV_PASSTHROUGH", VcpkgTripletVar::ENV_PASSTHROUGH}, - }; + std::string triplet_abi_tag; + std::string target_architecture; + std::string cmake_system_name; + std::string cmake_system_version; + Optional platform_toolset; + Optional visual_studio_path; + Optional external_toolchain_file; + Optional build_type; + std::vector passthrough_env_vars; + }; + + std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); + + enum class VcpkgTripletVar + { + TARGET_ARCHITECTURE = 0, + CMAKE_SYSTEM_NAME, + CMAKE_SYSTEM_VERSION, + PLATFORM_TOOLSET, + VISUAL_STUDIO_PATH, + CHAINLOAD_TOOLCHAIN_FILE, + BUILD_TYPE, + ENV_PASSTHROUGH, + }; + + const std::unordered_map VCPKG_OPTIONS = { + {"VCPKG_TARGET_ARCHITECTURE", VcpkgTripletVar::TARGET_ARCHITECTURE}, + {"VCPKG_CMAKE_SYSTEM_NAME", VcpkgTripletVar::CMAKE_SYSTEM_NAME}, + {"VCPKG_CMAKE_SYSTEM_VERSION", VcpkgTripletVar::CMAKE_SYSTEM_VERSION}, + {"VCPKG_PLATFORM_TOOLSET", VcpkgTripletVar::PLATFORM_TOOLSET}, + {"VCPKG_VISUAL_STUDIO_PATH", VcpkgTripletVar::VISUAL_STUDIO_PATH}, + {"VCPKG_CHAINLOAD_TOOLCHAIN_FILE", VcpkgTripletVar::CHAINLOAD_TOOLCHAIN_FILE}, + {"VCPKG_BUILD_TYPE", VcpkgTripletVar::BUILD_TYPE}, + {"VCPKG_ENV_PASSTHROUGH", VcpkgTripletVar::ENV_PASSTHROUGH}, + }; struct ExtendedBuildResult { @@ -177,31 +202,6 @@ namespace vcpkg::Build const BuildPackageConfig& config, const StatusParagraphs& status_db); - /// - /// Settings from the triplet file which impact the build environment and post-build checks - /// - struct PreBuildInfo - { - /// - /// Runs the triplet file in a "capture" mode to create a PreBuildInfo - /// - static PreBuildInfo from_triplet_file(const VcpkgPaths& paths, - const Triplet& triplet, - Optional port = nullopt); - - std::string triplet_abi_tag; - std::string target_architecture; - std::string cmake_system_name; - std::string cmake_system_version; - Optional platform_toolset; - Optional visual_studio_path; - Optional external_toolchain_file; - Optional build_type; - std::vector passthrough_env_vars; - }; - - std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); - enum class BuildPolicy { EMPTY_PACKAGE, From 3bf846f613bfef7982d81600163218c48cb86626 Mon Sep 17 00:00:00 2001 From: Griffin Downs <35574547+grdowns@users.noreply.github.com> Date: Tue, 16 Jul 2019 19:37:24 -0700 Subject: [PATCH 0191/1066] Add June changelog (#7294) * Add June changelog * Add link to spec for overlay-ports --- CHANGELOG.md | 1315 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1315 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5dbbe5a..499023e9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,1318 @@ +vcpkg (2019.6.30) +--- +#### Total port count: 1068 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1006| +|x86-windows|977| +|x64-windows-static|895| +|**x64-osx**|823| +|**x64-linux**|755| +|arm64-windows|654| +|x64-uwp|532| +|arm-uwp|504| + +#### The following commands and options have been updated: +- [--overlay-ports](docs/specifications/ports-overlay.md) ***[NEW OPTION]*** + - Specify directories to be used when searching for ports + - [(#6981)](https://github.com/Microsoft/vcpkg/pull/6981) Ports Overlay partial implementation + - [(#7002)](https://github.com/Microsoft/vcpkg/pull/7002) [--overlay-ports] Show location of overriden ports during install plan +- --overlay-triplets ***[NEW OPTION]*** + - Specify directories containing triplets files + - [(#7053)](https://github.com/Microsoft/vcpkg/pull/7053) Triplets Overlay Implementation +- integrate + - [(#7095)](https://github.com/Microsoft/vcpkg/pull/7095) [vcpkg-integrate] Improve spelling, help, and autocomplete. + +#### The following documentation has been updated: +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) ***[NEW]*** + - [(#6871)](https://github.com/Microsoft/vcpkg/pull/6871) [docs] Add maintainer guidelines +- [Ports Overlay](docs/specifications/ports-overlay.md) ***[NEW]*** + - [(#6981)](https://github.com/Microsoft/vcpkg/pull/6981) Ports Overlay partial implementation +- [vcpkg_check_features](docs/maintainers/vcpkg_check_features.md) ***[NEW]*** + - [(#6958)](https://github.com/Microsoft/vcpkg/pull/6958) [vcpkg] Add vcpkg_check_features + - [(#7091)](https://github.com/Microsoft/vcpkg/pull/7091) [vcpkg] Update vcpkg_check_features document +- [vcpkg_execute_build_process](docs/maintainers/vcpkg_execute_build_process.md) ***[NEW]*** + - [(#7039)](https://github.com/Microsoft/vcpkg/pull/7039) [docs]Update cmake docs +- [CONTROL files](docs/maintainers/control-files.md#Homepage) + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + - [(#6871)](https://github.com/Microsoft/vcpkg/pull/6871) [docs] Add maintainer guidelines +- [index](docs/index.md) + - [(#6871)](https://github.com/Microsoft/vcpkg/pull/6871) [docs] Add maintainer guidelines +- [Portfile helper functions](docs/maintainers/portfile-functions.md) + - [(#7039)](https://github.com/Microsoft/vcpkg/pull/7039) [docs]Update cmake docs +- [vcpkg_configure_cmake](docs/maintainers/vcpkg_configure_cmake.md) + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- [vcpkg_check_features.cmake](docs/maintainers/vcpkg_check_features.md) + - New portfile.cmake function for vcpkg contributors; Check if one or more features are a part of the package installation + - [(#6958)](https://github.com/Microsoft/vcpkg/pull/6958) [vcpkg] Add vcpkg_check_features + - [(#7091)](https://github.com/Microsoft/vcpkg/pull/7091) [vcpkg] Update vcpkg_check_features document +- [CONTROL file Homepage field](docs/maintainers/control-files.md#Homepage) + - CONTROL files may now contain a 'Homepage' field which links to the port's official website + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#4942)](https://github.com/Microsoft/vcpkg/pull/4942) Update applocal.ps1 +- [(#5630)](https://github.com/Microsoft/vcpkg/pull/5630) [scripts] Fix vcpkg_fixup_cmake on non Windows platforms +- [(#6383)](https://github.com/Microsoft/vcpkg/pull/6383) [vcpkg] update python3 to 3.7.3 on windows +- [(#6590)](https://github.com/Microsoft/vcpkg/pull/6590) ffmpeg: enable arm/arm64 windows support +- [(#6653)](https://github.com/Microsoft/vcpkg/pull/6653) [vcpkg] Fix install from head when no-downloads +- [(#6667)](https://github.com/Microsoft/vcpkg/pull/6667) make meson not download things +- [(#6695)](https://github.com/Microsoft/vcpkg/pull/6695) [icu] Enable parallel builds +- [(#6704)](https://github.com/Microsoft/vcpkg/pull/6704) [DOXYGEN]Upgrade doxygen to 1.8.15. +- [(#6788)](https://github.com/Microsoft/vcpkg/pull/6788) [vcpkg] Bootstrap should use Get-CimInstance instead of Get-WmiObject. +- [(#6826)](https://github.com/Microsoft/vcpkg/pull/6826) [vcpkg] Apply clang format +- [(#6846)](https://github.com/Microsoft/vcpkg/pull/6846) Introduce an easier way to identify target systems... +- [(#6867)](https://github.com/Microsoft/vcpkg/pull/6867) Protect #pragma comment(lib, "foo") with _WIN32 checks +- [(#6872)](https://github.com/Microsoft/vcpkg/pull/6872) set CMAKE_SYSTEM_PROCESSOR in Linux +- [(#6880)](https://github.com/Microsoft/vcpkg/pull/6880) retry on flaky linker +- [(#6919)](https://github.com/Microsoft/vcpkg/pull/6919) [vcpkg] Improve vcpkg::Files::Filesystem error handling +- [(#6943)](https://github.com/Microsoft/vcpkg/pull/6943) address qhull flaky build with msvc linker +- [(#6952)](https://github.com/Microsoft/vcpkg/pull/6952) bootstrap.sh: Retry up to 3 times for transient download errors +- [(#6960)](https://github.com/Microsoft/vcpkg/pull/6960) Use correct path separators for each platform +- [(#6968)](https://github.com/Microsoft/vcpkg/pull/6968) VS 2019 16.3 deprecates . +- [(#6987)](https://github.com/Microsoft/vcpkg/pull/6987) Bump version to 2019.06.21 +- [(#7038)](https://github.com/Microsoft/vcpkg/pull/7038) #5248 make vcpkg buildable as 'system' user +- [(#7039)](https://github.com/Microsoft/vcpkg/pull/7039) [docs]Update cmake docs +- [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option +- [(#7086)](https://github.com/Microsoft/vcpkg/pull/7086) [vcpkg] fail archived port install when decompression fails + +
+The following 44 ports have been added: + +| port | version | +|---|---| +|[any-lite](https://github.com/Microsoft/vcpkg/pull/6629) | 0.2.0 +|[argparse](https://github.com/Microsoft/vcpkg/pull/6866) | 2019-06-10 +|[bdwgc](https://github.com/Microsoft/vcpkg/pull/6405) | 8.0.4-1 +|[byte-lite](https://github.com/Microsoft/vcpkg/pull/6630) | 0.2.0 +|[casclib](https://github.com/Microsoft/vcpkg/pull/6744) | 1.50 +|[cjson](https://github.com/Microsoft/vcpkg/pull/6081) | 1.7.10-1 +|[cpp-httplib](https://github.com/Microsoft/vcpkg/pull/7037) | 0.2.0 +|[cppcodec](https://github.com/Microsoft/vcpkg/pull/6651) | 0.2 +|[expected-lite](https://github.com/Microsoft/vcpkg/pull/6642) | 0.3.0 +|[greatest](https://github.com/Microsoft/vcpkg/pull/6934) | 1.4.2 +|[hedley](https://github.com/Microsoft/vcpkg/pull/6776) | 2019-05-08-1 +|[immer](https://github.com/Microsoft/vcpkg/pull/6814) | 2019-06-07 +|[itpp](https://github.com/Microsoft/vcpkg/pull/6672) | 4.3.1 +|[ixwebsocket](https://github.com/Microsoft/vcpkg/pull/6835) | 4.0.3 +|[json-c](https://github.com/Microsoft/vcpkg/pull/6446) | 2019-05-31 +|[libfabric](https://github.com/Microsoft/vcpkg/pull/4740)[(#7036)](https://github.com/Microsoft/vcpkg/pull/7036) | 1.7.1-1 +|[libftdi](https://github.com/Microsoft/vcpkg/pull/6843)[(#7015)](https://github.com/Microsoft/vcpkg/pull/7015) [(#7055)](https://github.com/Microsoft/vcpkg/pull/7055) | 0.20-1 +|[libftdi1](https://github.com/Microsoft/vcpkg/pull/6843) | 1.4 +|[libpmemobj-cpp](https://github.com/Microsoft/vcpkg/pull/7020)[(#7097)](https://github.com/Microsoft/vcpkg/pull/7095) | 1.6-1 +|[libraqm](https://github.com/Microsoft/vcpkg/pull/6659) | 0.6.0 +|[libu2f-server](https://github.com/Microsoft/vcpkg/pull/6781) | 1.1.0 +|[libzen](https://github.com/Microsoft/vcpkg/pull/7004) | 0.4.37 +|[magic-enum](https://github.com/Microsoft/vcpkg/pull/6817) | 2019-06-07 +|[networkdirect-sdk](https://github.com/Microsoft/vcpkg/pull/4740) | 2.0.1 +|[observer-ptr-lite](https://github.com/Microsoft/vcpkg/pull/6652) | 0.4.0 +|[openigtlink](https://github.com/Microsoft/vcpkg/pull/6769) | 3.0 +|[optional-bare](https://github.com/Microsoft/vcpkg/pull/6654) | 1.1.0 +|[optional-lite](https://github.com/Microsoft/vcpkg/pull/6655) | 3.2.0 +|[polyclipping](https://github.com/Microsoft/vcpkg/pull/6769) | 6.4.2 +|[ppconsul](https://github.com/Microsoft/vcpkg/pull/6911)[(#6967)](https://github.com/Microsoft/vcpkg/pull/6967) | 0.3-1 +|[pprint](https://github.com/Microsoft/vcpkg/pull/6678) | 2019-06-01 +|[restclient-cpp](https://github.com/Microsoft/vcpkg/pull/6936)[(#7054)](https://github.com/Microsoft/vcpkg/pull/7054) | 0.5.1-2 +|[ring-span-lite](https://github.com/Microsoft/vcpkg/pull/6696) | 0.3.0 +|[robin-hood-hashing](https://github.com/Microsoft/vcpkg/pull/6709) | 3.2.13 +|[simde](https://github.com/Microsoft/vcpkg/pull/6777) | 2019-06-05 +|[span-lite](https://github.com/Microsoft/vcpkg/pull/6703) | 0.5.0 +|[sprout](https://github.com/Microsoft/vcpkg/pull/6997) | 2019-06-20 +|[stormlib](https://github.com/Microsoft/vcpkg/pull/6428) | 9.22 +|[string-view-lite](https://github.com/Microsoft/vcpkg/pull/6758) | 1.3.0 +|[tl-function-ref](https://github.com/Microsoft/vcpkg/pull/7028) | 1.0.0-1 +|[variant-lite](https://github.com/Microsoft/vcpkg/pull/6720) | 1.2.2 +|[wpilib](https://github.com/Microsoft/vcpkg/pull/6716)[(#7087)](https://github.com/Microsoft/vcpkg/pull/7087) | 2019.5.1 +|[zstr](https://github.com/Microsoft/vcpkg/pull/6773) | 1.0.1 +|[zydis](https://github.com/Microsoft/vcpkg/pull/6861) | 2.0.3 +
+ +
+The following 291 ports have been updated: + +- alembic `1.7.11` -> `1.7.11-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- angelscript `2.33.0` -> `2.33.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- angle `2019-03-13-c2ee2cc-3` -> `2019-06-13` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6892)](https://github.com/Microsoft/vcpkg/pull/6892) [angle] Update to latest master + +- arb `2.11.1-2` -> `2.16.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6763)](https://github.com/Microsoft/vcpkg/pull/6763) [arb]Upgrade version to 2.16.0 and fix build error. + +- armadillo `2019-04-16-f00d3225` -> `2019-04-16-3` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#7022)](https://github.com/Microsoft/vcpkg/pull/7022) [armadillo] Fix build error in Linux + +- arrow `0.13.0-3` -> `0.13.0-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6757)](https://github.com/Microsoft/vcpkg/pull/6757) [arrow] fix findzstd patch + +- asio `1.12.2` -> `1.12.2-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6751)](https://github.com/Microsoft/vcpkg/pull/6751) [asio] Add cmake target + - [(#7083)](https://github.com/Microsoft/vcpkg/pull/7083) [asio] fix flaky build + +- assimp `4.1.0-4` -> `4.1.0-8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6593)](https://github.com/Microsoft/vcpkg/pull/6593) [assimp]Fix lrrXML library dependencies. + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6887)](https://github.com/Microsoft/vcpkg/pull/6887) [assimp] Fix install assimp when passing --head + +- avro-c `1.8.2-1` -> `1.8.2-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- aws-c-common `0.3.0` -> `0.3.11-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6747)](https://github.com/Microsoft/vcpkg/pull/6747) [aws-c-common]Upgrade version to 0.3.11 + +- aws-sdk-cpp `1.7.106` -> `1.7.116` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6932)](https://github.com/Microsoft/vcpkg/pull/6932) [aws-sdk-cpp]Upgrade to 1.7.116 + +- azure-c-shared-utility `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-iot-sdk-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-macro-utils-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-uamqp-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-uhttp-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-umqtt-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- blosc `1.16.3` -> `1.16.3-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6928)](https://github.com/Microsoft/vcpkg/pull/6928) [blosc] Fix the bug when building release-only. + +- bond `7.0.2-2` -> `8.1.0` + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + - [(#6954)](https://github.com/Microsoft/vcpkg/pull/6954) [bond]Upgrade version to 8.1.0 and add Linux/OSX support. + +- boost-thread `1.70.0` -> `1.70.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6840)](https://github.com/Microsoft/vcpkg/pull/6840) [boost-thread] Fix old patches + +- boost-variant `1.69.0` -> `1.70.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7047)](https://github.com/Microsoft/vcpkg/pull/7047) [Boost-variant] Upgrade to 1.70.0 + +- botan `2.9.0` -> `2.9.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- c-ares `2019-5-2` -> `2019-5-2-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cairo `1.16.0` -> `1.16.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6806)](https://github.com/Microsoft/vcpkg/pull/6806) [cairo] Fix linker errors on Linux and MacOS + +- capnproto `0.7.0-1` -> `0.7.0-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + - [(#7024)](https://github.com/Microsoft/vcpkg/pull/7024) [capnproto] Enable Linux and OSX support + +- cartographer `1.0.0` -> `1.0.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- catch2 `2.7.2` -> `2.7.2-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- ccd `2.1` -> `2.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- celero `2.4.0-1` -> `2.5.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6845)](https://github.com/Microsoft/vcpkg/pull/6845) Celero: Update to v2.5.0 release + +- cereal `1.2.2-1` -> `1.2.2-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- ceres `1.14.0-3` -> `1.14.0-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- clapack `3.2.1-4` -> `3.2.1-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- clblas `2.12-1` -> `2.12-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- clfft `2.12.2` -> `2.12.2-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cli `1.1` -> `1.1-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- clp `1.17.2` -> `1.17.2-2` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cnl `2019-01-09` -> `2019-06-23` + - [(#7031)](https://github.com/Microsoft/vcpkg/pull/7031) [cnl] Update cnl to latest + +- coinutils `2.11.2` -> `2.11.2-2` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- collada-dom `2.5.0` -> `2.5.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- console-bridge `0.3.2-3` -> `0.3.2-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cpp-netlib `0.13.0-final` -> `0.13.0-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cppcms `1.1.0-2` -> `1.2.1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- cpr `1.3.0-6` -> `1.3.0-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6429)](https://github.com/Microsoft/vcpkg/pull/6429) [Curl] Upgrades 2019.05.08 + +- crc32c `1.0.7` -> `1.0.7-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cryptopp `8.1.0` -> `8.1.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6821)](https://github.com/Microsoft/vcpkg/pull/6821) [cryptopp] fix build by disabling assembly on osx + +- curl `7.61.1-7` -> `7.65.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6429)](https://github.com/Microsoft/vcpkg/pull/6429) [Curl] Upgrades 2019.05.08 + - [(#6649)](https://github.com/Microsoft/vcpkg/pull/6649) [Curl] Fix cmake target name + - [(#6698)](https://github.com/Microsoft/vcpkg/pull/6698) [curl] Revert revert of `-imp` suffix removal. + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cxxopts `2.1.2` -> `2.1.2-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- darknet `0.2.5-1` -> `0.2.5-4` + - [(#6787)](https://github.com/Microsoft/vcpkg/pull/6787) [darknet] update to latest release + - [(#7064)](https://github.com/Microsoft/vcpkg/pull/7064) [darknet] enable ninja + +- darts-clone `1767ab87cffe` -> `1767ab87cffe-1` + - [(#6875)](https://github.com/Microsoft/vcpkg/pull/6875) [libsodium/darts-clone] remove conflicting makefile + +- dcmtk `3.6.3-1` -> `3.6.4` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- dlib `19.17` -> `19.17-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + +- doctest `2.3.2` -> `2.3.3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6998)](https://github.com/Microsoft/vcpkg/pull/6998) [doctest] Update to 2.3.3 + +- draco `1.3.3-2` -> `1.3.5` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6796)](https://github.com/Microsoft/vcpkg/pull/6796) [draco, flatbuffers, forge] Update to new version + +- duilib `2019-4-28-1` -> `2019-4-28-2` + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +- ebml `1.3.8` -> `1.3.9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6662)](https://github.com/Microsoft/vcpkg/pull/6662) [ebml, matroska] Upgrade ebml to v1.3.9 and matroska to v1.5.2 + +- eigen3 `3.3.7-1` -> `3.3.7-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- ensmallen `1.15.0` -> `1.15.1` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- entityx `1.3.0` -> `1.3.0-1` + - [(#6736)](https://github.com/Microsoft/vcpkg/pull/6736) [entityx][entt] Disable parallel configure + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- entt `3.0.0` -> `3.0.0-1` + - [(#6736)](https://github.com/Microsoft/vcpkg/pull/6736) [entityx][entt] Disable parallel configure + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- exiv2 `0.27` -> `0.27.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + - [(#6905)](https://github.com/Microsoft/vcpkg/pull/6905) [Exiv2] update to 0.27.1 + +- fastcdr `1.0.6-2` -> `1.0.9-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- fcl `0.5.0-5` -> `0.5.0-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- ffmpeg `4.1-5` -> `4.1-8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6590)](https://github.com/Microsoft/vcpkg/pull/6590) ffmpeg: enable arm/arm64 windows support + - [(#6694)](https://github.com/Microsoft/vcpkg/pull/6694) [ffmpeg] Correctly set environment variables for gcc/clang/icc + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6743)](https://github.com/Microsoft/vcpkg/pull/6743) [ffmpeg] Fix regression on windows + - [(#6784)](https://github.com/Microsoft/vcpkg/pull/6784) [FFmpeg] Add 'vpx' feature. + +- fizz `2019.05.13.00` -> `2019.05.20.00-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6969)](https://github.com/Microsoft/vcpkg/pull/6969) [libevent] Upgrade to version 2.1.10 + +- flann `jan2019` -> `1.9.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6931)](https://github.com/Microsoft/vcpkg/pull/6931) [flann]Upgrade version to 1.9.1 and fix build error. + - [(#7073)](https://github.com/Microsoft/vcpkg/pull/7073) [flann] fix flaky config + +- flatbuffers `1.10.0-1` -> `1.11.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6796)](https://github.com/Microsoft/vcpkg/pull/6796) [draco, flatbuffers, forge] Update to new version + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- fmi4cpp `0.7.0` -> `0.7.0-1` + - [(#7021)](https://github.com/Microsoft/vcpkg/pull/7021) [nana, fmi4cpp] Fix Visual Studio 2019 deprecates . + +- folly `2019.05.13.00` -> `2019.05.20.00-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6974)](https://github.com/Microsoft/vcpkg/pull/6974) [Folly] define _CRT_INTERNAL_NONSTDC_NAMES to 0 to disable non-underscore posix names on windows + +- fontconfig `2.12.4-8` -> `2.12.4-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + +- forest `11.0.1` -> `12.0.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6938)](https://github.com/Microsoft/vcpkg/pull/6938) [forest] move to 12.0.0 + +- forge `1.0.3-1` -> `1.0.4-1` + - [(#6796)](https://github.com/Microsoft/vcpkg/pull/6796) [draco, flatbuffers, forge] Update to new version + +- freeimage `3.18.0-5` -> `3.18.0-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- freerdp `2.0.0-rc4-1` -> `2.0.0-rc4-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- freetype `2.9.1-1` -> `2.10.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6754)](https://github.com/Microsoft/vcpkg/pull/6754) Fix freetype cmake config files + - [(#7057)](https://github.com/Microsoft/vcpkg/pull/7057) [freetype] Upgrade to version 2.10.0 + +- freexl `1.0.4-1` -> `1.0.4-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6813)](https://github.com/Microsoft/vcpkg/pull/6813) [freexl]: Linux build support + +- ftgl `2.3.1` -> `2.4.0-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- g2o `20170730_git-4` -> `20170730_git-5` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- gdcm `3.0.0` -> `3.0.0-3` + - [(#6710)](https://github.com/Microsoft/vcpkg/pull/6710) [gdcm,jbig2dec] move patches from #5169 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- gdk-pixbuf `2.36.9-2` -> `2.36.9-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6663)](https://github.com/Microsoft/vcpkg/pull/6663) [gdk-pixbuf] Fix Linux compilation. + +- geogram `1.6.9-3` -> `1.6.9-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- geographiclib `1.47-patch1-5` -> `1.47-patch1-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- gherkin-c `c-libs-e63e83104b` -> `4.1.2` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- gl3w `99ed3211` -> `2018-05-31-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- glad `0.1.29` -> `0.1.30` + - [(#6819)](https://github.com/Microsoft/vcpkg/pull/6819) [glad] update to 0.1.30 + +- glbinding `3.1.0` -> `3.1.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6872)](https://github.com/Microsoft/vcpkg/pull/6872) set CMAKE_SYSTEM_PROCESSOR in Linux + - [(#6876)](https://github.com/Microsoft/vcpkg/pull/6876) [glbinding] remove conflict with other opengl ports + +- glew `2.1.0-3` -> `2.1.0-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6853)](https://github.com/Microsoft/vcpkg/pull/6853) [glew] Disable the link option /nodefaultlib and /noentry + +- glib `2.52.3-14-1` -> `2.52.3-14-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6663)](https://github.com/Microsoft/vcpkg/pull/6663) [gdk-pixbuf] Fix Linux compilation. + +- glibmm `2.52.1-8` -> `2.52.1-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6550)](https://github.com/Microsoft/vcpkg/pull/6550) [glibmm] Reintroduce CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- globjects `1.1.0-2018-09-19-1` -> `1.1.0-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- glog `0.4.0` -> `0.4.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- glslang `2018-03-02-2` -> `2019-03-05` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6689)](https://github.com/Microsoft/vcpkg/pull/6689) [shaderc] update + +- google-cloud-cpp `0.9.0` -> `0.10.0` + - [(#6785)](https://github.com/Microsoft/vcpkg/pull/6785) Upgrade google-cloud-cpp to 0.10.0. + +- graphicsmagick `1.3.31-1` -> `1.3.32` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6947)](https://github.com/Microsoft/vcpkg/pull/6947) Graphicsmagick 1.3.32 + +- graphite2 `1.3.12` -> `1.3.12-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- grpc `1.20.1-1` -> `1.21.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#5630)](https://github.com/Microsoft/vcpkg/pull/5630) [scripts] Fix vcpkg_fixup_cmake on non Windows platforms + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- gsoap `2.8.82-2` -> `2.8.84-1` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6756)](https://github.com/Microsoft/vcpkg/pull/6756) update to 2.8.84 + +- gtk `3.22.19-2` -> `3.22.19-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6671)](https://github.com/Microsoft/vcpkg/pull/6671) [pango/gtk]Fix build error C2001. + +- harfbuzz `2.4.0` -> `2.5.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6659)](https://github.com/Microsoft/vcpkg/pull/6659) [libraqm] Add new port (0.6.0) + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6761)](https://github.com/Microsoft/vcpkg/pull/6761) [harfbuzz]Upgrade version to 2.5.1 and fix patches. + - [(#6879)](https://github.com/Microsoft/vcpkg/pull/6879) [harfbuzz] Propagate dependency on glib downstream + +- hdf5 `1.10.5-5` -> `1.10.5-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6771)](https://github.com/Microsoft/vcpkg/pull/6771) [netcdf-c/hdf5] improve/correct linkage + +- hpx `1.2.1-1` -> `1.3.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6755)](https://github.com/Microsoft/vcpkg/pull/6755) Updating HPX to V1.3.0 + +- http-parser `2.9.2` -> `2.9.2-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- icu `61.1-6` -> `61.1-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6695)](https://github.com/Microsoft/vcpkg/pull/6695) [icu] Enable parallel builds + +- idevicerestore `1.0.12-2` -> `1.0.12-3` + - [(#6698)](https://github.com/Microsoft/vcpkg/pull/6698) [curl] Revert revert of `-imp` suffix removal. + +- imgui `1.70` -> `1.70-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- inih `43` -> `44` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- ismrmrd `1.4` -> `1.4.0-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- itk `4.13.0-906736bd-3` -> `5.0.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6767)](https://github.com/Microsoft/vcpkg/pull/6767) [itk] Upgrade to 5.0.0 + +- jansson `2.11-2` -> `2.12-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- jasper `2.0.16-1` -> `2.0.16-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- jbig2dec `0.16` -> `0.16-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6710)](https://github.com/Microsoft/vcpkg/pull/6710) [gdcm,jbig2dec] move patches from #5169 + +- json-dto `0.2.8` -> `0.2.8-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- json11 `2017-06-20-1` -> `2017-06-20-2` + - [(#6967)](https://github.com/Microsoft/vcpkg/pull/6967) [ppconsul] remove conflict with json11 + +- jxrlib `1.1-6` -> `1.1-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- kangaru `4.1.3` -> `4.1.3-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- kd-soap `1.7.0` -> `1.8.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6838)](https://github.com/Microsoft/vcpkg/pull/6838) [kd-soap]Upgrade version to 1.8.0 + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- lcm `1.3.95-1` -> `1.4.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6836)](https://github.com/Microsoft/vcpkg/pull/6836) [lcm]Upgrade version to 1.4.0 and fix build error. + +- leptonica `1.76.0` -> `1.76.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- leveldb `2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-3` -> `1.22` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6900)](https://github.com/Microsoft/vcpkg/pull/6900) [leveldb] Port update + +- libbson `1.13.0` -> `1.14.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6862)](https://github.com/Microsoft/vcpkg/pull/6862) [libbson mongo-c-driver mongo-cxx-driver] upgrades to new revision + +- libcroco `0.6.13` -> `0.6.13-1` + - [(#6663)](https://github.com/Microsoft/vcpkg/pull/6663) [gdk-pixbuf] Fix Linux compilation. + +- libevent `2.1.8-5` -> `2.1.10` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6969)](https://github.com/Microsoft/vcpkg/pull/6969) [libevent] Upgrade to version 2.1.10 + +- libfreenect2 `0.2.0-1` -> `0.2.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libgeotiff `1.4.2-8` -> `1.4.2-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- libgit2 `0.28.1` -> `0.28.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libharu `2017-08-15-d84867ebf9f-6` -> `2017-08-15-8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libics `1.6.2` -> `1.6.3` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libideviceactivation `1.2.68` -> `1.2.68-1` + - [(#6698)](https://github.com/Microsoft/vcpkg/pull/6698) [curl] Revert revert of `-imp` suffix removal. + +- libimobiledevice `1.2.1.215-1` -> `1.2.76` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libjpeg-turbo `2.0.1-1` -> `2.0.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6482)](https://github.com/Microsoft/vcpkg/pull/6482) [libjpeg-turbo] Upgrades 2019.05.08 + +- liblemon `1.3.1-4` -> `2019-06-13` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6679)](https://github.com/Microsoft/vcpkg/pull/6679) [liblemon] made into a rolling-release port + +- liblsl `1.13.0-b4` -> `1.13.0-b6` + - [(#6745)](https://github.com/Microsoft/vcpkg/pull/6745) [liblsl] Update liblsl port to 1.13.0-b6 + +- liblzma `5.2.4-1` -> `5.2.4-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- libmikmod `3.3.11.1-2` -> `3.3.11.1-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7035)](https://github.com/Microsoft/vcpkg/pull/7035) [libmikmod] patch cmake warning + - [(#7052)](https://github.com/Microsoft/vcpkg/pull/7052) [libmikmod] resolve ninja error (-w dupbuild=err) + +- libmodbus `3.1.4-2` -> `3.1.4-3` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libmupdf `1.12.0-2` -> `1.15.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6710)](https://github.com/Microsoft/vcpkg/pull/6710) [gdcm,jbig2dec] move patches from #5169 + - [(#7046)](https://github.com/Microsoft/vcpkg/pull/7046) [libmupdf] Update the port to version 1.15.0 + +- libmysql `8.0.4-3` -> `8.0.4-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6442)](https://github.com/Microsoft/vcpkg/pull/6442) [libmysql]Fix build error in linux. + +- libogg `1.3.3-2` -> `1.3.3-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6588)](https://github.com/Microsoft/vcpkg/pull/6588) [libogg] Update to 1.3.3-3 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libopusenc `0.1-1` -> `0.2.1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6748)](https://github.com/Microsoft/vcpkg/pull/6748) [libopusenc]Upgrade version to 0.2.1 + +- libpff `2018-07-14` -> `2018-07-14-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libplist `2.0.1.197-2` -> `1.2.77` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libpng `1.6.37-1` -> `1.6.37-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libqglviewer `2.7.1-1` -> `2.7.0` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libraw `0.19.2` -> `201903-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6742)](https://github.com/Microsoft/vcpkg/pull/6742) [libraw] Add include for select_library_configurations [(#6715)](https://github.com/Microsoft/vcpkg/pull/6715) + +- libressl `2.9.1` -> `2.9.1-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libsndfile `1.0.29-6830c42-6` -> `1.0.29-8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6896)](https://github.com/Microsoft/vcpkg/pull/6896) [sndfile/libsndfile] remove duplicate port, forward to libsndfile + +- libsodium `1.0.17-2` -> `1.0.18` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6778)](https://github.com/Microsoft/vcpkg/pull/6778) [libsodium] Update to 1.0.18 + - [(#6875)](https://github.com/Microsoft/vcpkg/pull/6875) [libsodium/darts-clone] remove conflicting makefile + +- libspatialite `4.3.0a-2` -> `4.3.0a-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- libsquish `1.15` -> `1.15-1` + - [(#6893)](https://github.com/Microsoft/vcpkg/pull/6893) [libsquish] fix flaky build + +- libtins `4.0-2` -> `4.2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#7008)](https://github.com/Microsoft/vcpkg/pull/7008) [libtins]Upgrade version to 4.2 and adds dependent ports to new version. + +- libunibreak `4.1` -> `4.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libusb `1.0.22-2` -> `1.0.22-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libusbmuxd `1.0.107-2` -> `1.2.77` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libuv `1.29.0` -> `1.29.1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libwebp `1.0.2-3` -> `1.0.2-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6648)](https://github.com/Microsoft/vcpkg/pull/6648) [libwebp]Fix static build: add dependency libraries "dxguid winmm". + +- libwebsockets `3.1.0` -> `3.1.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6855)](https://github.com/Microsoft/vcpkg/pull/6855) [libwebsockets] Fix build error on Linux + +- libxlsxwriter `0.8.6-1` -> `0.8.7-1` + - [(#7034)](https://github.com/Microsoft/vcpkg/pull/7034) [libxlsxwriter] upgrade to 0.8.7 + +- libxslt `1.1.29` -> `1.1.33` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7058)](https://github.com/Microsoft/vcpkg/pull/7058) [libxslt] Update the version to 1.1.33 and change the URL. + +- libyaml `0.2.1-1` -> `0.2.2` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- llvm `7.0.0-2` -> `7.0.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6631)](https://github.com/Microsoft/vcpkg/pull/6631) [llvm]Fix build error on x64-windows. + +- lmdb `0.9.23` -> `0.9.23-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- log4cplus `2.0.4` -> `2.0.4-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6930)](https://github.com/Microsoft/vcpkg/pull/6930) [log4cplus]Fix lnk2019 errors when using log4cplus. + +- lz4 `1.9.1-1` -> `1.9.1-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6735)](https://github.com/Microsoft/vcpkg/pull/6735) [lz4]Fix conflict file xxhash.h + +- magnum-extras `2019.01-1` -> `2019.01-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- magnum-integration `2019.01-1` -> `2019.01-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- mathgl `2.4.3` -> `2.4.3-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- matroska `1.5.1` -> `1.5.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6662)](https://github.com/Microsoft/vcpkg/pull/6662) [ebml, matroska] Upgrade ebml to v1.3.9 and matroska to v1.5.2 + +- miniz `2.0.8` -> `2.1.0` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- mlpack `3.1.0-1` -> `3.1.1` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6907)](https://github.com/Microsoft/vcpkg/pull/6907) [mlpack] Updated to version 3.1.1 + +- mongo-c-driver `1.13.0` -> `1.14.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6862)](https://github.com/Microsoft/vcpkg/pull/6862) [libbson mongo-c-driver mongo-cxx-driver] upgrades to new revision + +- mongo-cxx-driver `3.2.0-2` -> `3.4.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6862)](https://github.com/Microsoft/vcpkg/pull/6862) [libbson mongo-c-driver mongo-cxx-driver] upgrades to new revision + +- moos-core `10.4.0-2` -> `10.4.0-3` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- mosquitto `1.5.0-3` -> `1.6.2-2` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- ms-angle `2018-04-18-1` -> `2018-04-18-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- msix `MsixCoreInstaller-preview` -> `MsixCoreInstaller-preview-1` + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +- msmpi `10.0` -> `10.0-2` + - [(#6945)](https://github.com/Microsoft/vcpkg/pull/6945) [msmpi] Fix /MD for static libs. + +- nana `1.7.1` -> `1.7.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7021)](https://github.com/Microsoft/vcpkg/pull/7021) [nana, fmi4cpp] Fix Visual Studio 2019 deprecates . + +- nanomsg `1.1.5` -> `1.1.5-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- netcdf-c `4.7.0` -> `4.7.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6771)](https://github.com/Microsoft/vcpkg/pull/6771) [netcdf-c/hdf5] improve/correct linkage + - [(#6865)](https://github.com/Microsoft/vcpkg/pull/6865) [netcdf-c]Fix build error on linux. + - [(#6971)](https://github.com/Microsoft/vcpkg/pull/6971) [netcdf-c] Fix link error. + +- nlopt `2.6.1` -> `2.6.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6739)](https://github.com/Microsoft/vcpkg/pull/6739) [protobuf] Update to 3.8.0 + +- nmslib `1.7.2-1` -> `1.7.3.6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- nrf-ble-driver `4.1.0` -> `4.1.1` + +- nvtt `2.1.0-3` -> `2.1.1` + - [(#6765)](https://github.com/Microsoft/vcpkg/pull/6765) [nvtt]Upgrade version to 2.1.1 and fix build error on windows. + +- octomap `cefed0c1d79afafa5aeb05273cf1246b093b771c-6` -> `2017-03-11-7` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- ogre `1.11.3-4` -> `1.12.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- oniguruma `6.9.2` -> `6.9.2-2` + - [(#6958)](https://github.com/Microsoft/vcpkg/pull/6958) [vcpkg] Add vcpkg_check_features + - [(#7091)](https://github.com/Microsoft/vcpkg/pull/7091) [vcpkg] Update vcpkg_check_features document + +- openblas `0.3.6-2` -> `0.3.6-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- opencv `3.4.3-7` -> `3.4.3-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6812)](https://github.com/Microsoft/vcpkg/pull/6812) [opencv] Fixed OpenCV versioning using wrong commit + - [(#6901)](https://github.com/Microsoft/vcpkg/pull/6901) [opencv]Fix build error with feature gdcm: cannot find openjp2. + +- openexr `2.3.0-3` -> `2.3.0-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openmama `6.2.3` -> `6.2.3-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openmvg `1.4-2` -> `1.4-5` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openmvs `0.9` -> `1.0-1` + - [(#6692)](https://github.com/Microsoft/vcpkg/pull/6692) update to v1.0 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openni2 `2.2.0.33-8` -> `2.2.0.33-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openssl `0` -> `1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- opentracing `1.5.1` -> `1.5.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- openvdb `6.0.0-2` -> `6.1.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6864)](https://github.com/Microsoft/vcpkg/pull/6864) [openvdb]Upgrade version to 6.1.0, regenerate patches and fix build errors. + +- openvpn3 `2018-03-21` -> `2018-03-21-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- openvr `1.1.3b` -> `1.4.18` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- opusfile `0.11-2` -> `0.11-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- orc `1.5.5` -> `1.5.5-1` + - [(#6739)](https://github.com/Microsoft/vcpkg/pull/6739) [protobuf] Update to 3.8.0 + +- orocos-kdl `1.4` -> `1.4-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- osi `0.108.4` -> `0.108.4-2` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- paho-mqtt `1.2.1-1` -> `1.3.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6762)](https://github.com/Microsoft/vcpkg/pull/6762) [paho-mqtt] Upgrade to 1.3.0 + +- pango `1.40.11-3` -> `1.40.11-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6671)](https://github.com/Microsoft/vcpkg/pull/6671) [pango/gtk]Fix build error C2001. + +- pangolin `0.5-6` -> `0.5-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- parallel-hashmap `1.22` -> `1.23` + - [(#6917)](https://github.com/Microsoft/vcpkg/pull/6917) [parallel-hashmap] Update to current 1.23 version and include natvis file. + +- pcl `1.9.1-3` -> `1.9.1-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- pdal `1.7.1-4` -> `1.7.1-5` + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6603)](https://github.com/Microsoft/vcpkg/pull/6603) [pdal] delete and replace different find modules + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- pdcurses `3.6` -> `3.8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- poco `2.0.0-pre-1` -> `2.0.0-pre-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- podofo `0.9.6-6` -> `0.9.6-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- proj4 `4.9.3-1` -> `4.9.3-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- prometheus-cpp `0.6.0` -> `0.7.0` + - [(#6822)](https://github.com/Microsoft/vcpkg/pull/6822) [prometheus-cpp] Update to version 0.7.0 + +- protobuf `3.7.1` -> `3.8.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6739)](https://github.com/Microsoft/vcpkg/pull/6739) [protobuf] Update to 3.8.0 + +- pugixml `1.9-1` -> `1.9-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- qca `2.2.0-4` -> `2.2.1` + - [(#6839)](https://github.com/Microsoft/vcpkg/pull/6839) [qca]Upgrade version to 2.2.1 and fix build error. + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- qt5-base `5.12.3-1` -> `5.12.3-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#7019)](https://github.com/Microsoft/vcpkg/pull/7019) [qt5-base]Add execute permission when installing executables in Linux. + +- qt5-declarative `5.12.3` -> `5.12.3-1` + - [(#6927)](https://github.com/Microsoft/vcpkg/pull/6927) [qt5-declarative]Fix error when building release-only. + +- re2 `2019-05-07` -> `2019-05-07-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- realsense2 `2.16.1-2` -> `2.22.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#5275)](https://github.com/Microsoft/vcpkg/pull/5275) [realsense2] Enable OpenNI2 driver option + - [(#5777)](https://github.com/Microsoft/vcpkg/pull/5777) [realsense2] Update to v2.19.0 + +- reproc `6.0.0` -> `6.0.0-1` + - [(#6711)](https://github.com/Microsoft/vcpkg/pull/6711) [reproc] Enabled C++ target for version 6.0.0. + +- restinio `0.4.9` -> `0.5.1-1` + - [(#6669)](https://github.com/Microsoft/vcpkg/pull/6669) RESTinio updated to v.0.4.9.1 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6749)](https://github.com/Microsoft/vcpkg/pull/6749) RESTinio updated to v.0.5.0 + - [(#6933)](https://github.com/Microsoft/vcpkg/pull/6933) RESTinio updated to v.0.5.1 + +- robin-map `0.2.0` -> `0.6.1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- rtmidi `2.1.1-2` -> `4.0.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6635)](https://github.com/Microsoft/vcpkg/pull/6635) [rtmidi] Update to version 4.0.0 + +- sdl2 `2.0.9-3` -> `2.0.9-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sdl2-image `2.0.4-2` -> `2.0.4-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sdl2-mixer `2.0.4-2` -> `2.0.4-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6929)](https://github.com/Microsoft/vcpkg/pull/6929) [sdl2-mixer]Fix build error with feature opusfile. + +- sdl2-net `2.0.1-6` -> `2.0.1-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sdl2-ttf `2.0.15-2` -> `2.0.15-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- selene `0.3.1` -> `0.3.1-1` + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sf2cute `0.2.0` -> `0.2.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- shaderc `12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2` -> `2019-06-26` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6689)](https://github.com/Microsoft/vcpkg/pull/6689) [shaderc] update + +- shiva `1.0` -> `1.0-2` + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6637)](https://github.com/Microsoft/vcpkg/pull/6637) [shiva] Fix build error "Could NOT find PythonInterp" + +- shogun `6.1.3-1` -> `6.1.3-3` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6739)](https://github.com/Microsoft/vcpkg/pull/6739) [protobuf] Update to 3.8.0 + - [(#6872)](https://github.com/Microsoft/vcpkg/pull/6872) set CMAKE_SYSTEM_PROCESSOR in Linux + +- sndfile `1.0.29-cebfdf2-1` -> `0` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6896)](https://github.com/Microsoft/vcpkg/pull/6896) [sndfile/libsndfile] remove duplicate port, forward to libsndfile + +- snowhouse `3.0.1` -> `3.1.0` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- so5extra `1.2.3` -> `1.2.3-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sobjectizer `5.5.24.4` -> `5.5.24.4-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sol2 `2.20.6` -> `3.0.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- sophus `1.0.0-1` -> `1.0.0-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + +- spdlog `1.3.1` -> `1.3.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6924)](https://github.com/Microsoft/vcpkg/pull/6924) [spdlog]Add feature[benchmark] + +- spirv-cross `2018-08-07-1` -> `2019-05-09` + - [(#6690)](https://github.com/Microsoft/vcpkg/pull/6690) update spirv cross + +- spirv-headers `2019-03-05` -> `2019-05-05` + - [(#6689)](https://github.com/Microsoft/vcpkg/pull/6689) [shaderc] update + +- spirv-tools `2018.1-2` -> `2019.3-dev` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6689)](https://github.com/Microsoft/vcpkg/pull/6689) [shaderc] update + +- sqlite-modern-cpp `3.2-e2248fa` -> `3.2-936cd0c8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- sqlite-orm `1.3` -> `1.3-1` + - [(#6894)](https://github.com/Microsoft/vcpkg/pull/6894) [sqlite-orm] fix tag, update hash + +- sqlite3 `3.27.2` -> `3.28.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6856)](https://github.com/Microsoft/vcpkg/pull/6856) [sqlite3]: Switch back to CMAKE_SYSTEM_NAME checks per original PR + - [(#6856)](https://github.com/Microsoft/vcpkg/pull/6856) [sqlite3]: Shared library support for Linux + - [(#6921)](https://github.com/Microsoft/vcpkg/pull/6921) [sqlite3] Update to 3.28.0 + +- sqlitecpp `2.2-2` -> `2.3.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- strict-variant `v0.5` -> `0.5` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- string-theory `2.1` -> `2.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- suitesparse `5.1.2-2` -> `5.4.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- systemc `2.3.3-2` -> `2.3.3-3` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- szip `2.1.1-3` -> `2.1.1-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- taglib `1.11.1-4` -> `1.11.1-20190531` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6851)](https://github.com/Microsoft/vcpkg/pull/6851) [taglib]Upgrade version to 1.11.1-20190531. + +- tbb `2019_U6` -> `2019_U7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- tesseract `4.0.0-1` -> `4.0.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- theia `0.8` -> `0.8-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + +- thor `2.0-2` -> `2.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6953)](https://github.com/Microsoft/vcpkg/pull/6953) [thor] Fix error on Linux. + +- thrift `2019-05-07` -> `2019-05-07-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6872)](https://github.com/Microsoft/vcpkg/pull/6872) set CMAKE_SYSTEM_PROCESSOR in Linux + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +- tidy-html5 `5.6.0` -> `5.6.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +- tiff `4.0.10-4` -> `4.0.10-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- tinyexif `1.0.2-4` -> `1.0.2-5` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- tinyobjloader `1.4.1-1` -> `1.0.7-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- tinyxml2 `7.0.1` -> `7.0.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- tl-expected `0.3-1` -> `1.0.0-1` + - [(#7028)](https://github.com/Microsoft/vcpkg/pull/7028) [tl] Update tl::expected and tl::optional, add tl::function_ref + +- tl-optional `0.5-1` -> `1.0.0-1` + - [(#7028)](https://github.com/Microsoft/vcpkg/pull/7028) [tl] Update tl::expected and tl::optional, add tl::function_ref + +- tmx `1.0.0` -> `1.0.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- treehopper `1.11.3-2` -> `1.11.3-3` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- trompeloeil `34` -> `34-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- umock-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- urdfdom `1.0.3` -> `1.0.3-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- urdfdom-headers `1.0.3` -> `1.0.4-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- usd `0.8.4` -> `0.8.4-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- uvatlas `sept2016-1` -> `apr2019` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- uvw `1.17.0_libuv-v1.29` -> `1.17.0_libuv-v1.29-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- visit-struct `1.0` -> `1.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- vlpp `0.9.3.1-2` -> `0.10.0.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6793)](https://github.com/Microsoft/vcpkg/pull/6793) [vlpp] Upgrade to 0.10.0.0 + +- vtk `8.2.0-2` -> `8.2.0-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6782)](https://github.com/Microsoft/vcpkg/pull/6782) [vtk] fix static hdf5 linkage. + +- vxl `v1.18.0-3` -> `v1.18.0-4` + - [(#6657)](https://github.com/Microsoft/vcpkg/pull/6657) [vxl] move problematic feature to optional one + +- wangle `2019.05.13.00` -> `2019.05.20.00-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- wil `2019-05-08` -> `2019-06-10` + - [(#6847)](https://github.com/Microsoft/vcpkg/pull/6847) Update commit for WIL + +- wt `4.0.5` -> `4.0.5-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6925)](https://github.com/Microsoft/vcpkg/pull/6925) [wt] Fix XML file installation path + +- xerces-c `3.2.2-9` -> `3.2.2-10` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6970)](https://github.com/Microsoft/vcpkg/pull/6970) [xerces-c]Replace the macro DLL_EXPORT with the macro XERCES_DLL_EXPORT + +- xeus `0.19.1-1` -> `0.19.2` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- xsimd `7.2.3` -> `7.2.3-1` + - [(#7091)](https://github.com/Microsoft/vcpkg/pull/7091) [vcpkg] Update vcpkg_check_features document + +- xtensor `0.20.7` -> `0.20.7-1` + - [(#6958)](https://github.com/Microsoft/vcpkg/pull/6958) [vcpkg] Add vcpkg_check_features + +- xxhash `0.6.4-1` -> `0.7.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6750)](https://github.com/Microsoft/vcpkg/pull/6750) [xxhash]Upgrade version to 0.7.0 and fix arm/uwp build errors. + +- z3 `4.8.4-1` -> `4.8.5-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6803)](https://github.com/Microsoft/vcpkg/pull/6803) [z3] bump version to 4.8.5 + +- zopfli `2019-01-19` -> `2019-01-19-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- zserge-webview `2019-04-27-1` -> `2019-04-27-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- zxing-cpp `3.3.3-3` -> `3.3.3-5` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6779)](https://github.com/Microsoft/vcpkg/pull/6779) [zxing-cpp] Fixed renaming zxing` -> `zxing-cpp` + +- zziplib `0.13.69-3` -> `0.13.69-4` + - [(#7090)](https://github.com/Microsoft/vcpkg/pull/7090) [zziplib] fix flaky build + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports +
+ +-- vcpkg team vcpkg@microsoft.com WED, 16 Jul 2019 05:17:00 -0800 + vcpkg (2018.11.23) -------------- * Add ports: From ac2be759a49be5e04634843fef23f41bba95a9ed Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Wed, 17 Jul 2019 12:49:49 +0800 Subject: [PATCH 0192/1066] [rapidjson] Fix path RapidJSON_INCLUDE_DIRS (#7273) * [rapidjson] Fix path RapidJSON_INCLUDE_DIRS * [bond] Fix error hash --- ports/bond/CONTROL | 2 +- ports/bond/portfile.cmake | 2 +- ports/rapidjson/CONTROL | 2 +- ports/rapidjson/portfile.cmake | 10 ++++------ 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ports/bond/CONTROL b/ports/bond/CONTROL index 0d1b82bc3..8e8aca70a 100644 --- a/ports/bond/CONTROL +++ b/ports/bond/CONTROL @@ -1,6 +1,6 @@ Source: bond Maintainer: bond@microsoft.com -Version: 8.1.0 +Version: 8.1.0-1 Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services. Homepage: https://github.com/Microsoft/bond Build-Depends: rapidjson, boost-config, boost-utility, boost-assign diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index 42755dbf9..a1a965a60 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -34,7 +34,7 @@ else() ARCHIVE URLS "https://get.haskellstack.org/" FILENAME "stack-install.sh" - SHA512 6db2008297416ad856aa498908bf695737cf3cc466440397720a458358e9661d07abdba762662080ee8bbd8171cdcb05eec6d3696382575c099adfb8427e05fd + SHA512 35a953d626d81bebef33d84cfeb54028b315f6e2802fc50739ed8c5731944bcbefea6284e482f898b27bbed421dbf3e43f284998620091a16d8eed825ebcda37 ) set(BASH /bin/bash) diff --git a/ports/rapidjson/CONTROL b/ports/rapidjson/CONTROL index b3c0f60b5..53d344628 100644 --- a/ports/rapidjson/CONTROL +++ b/ports/rapidjson/CONTROL @@ -1,4 +1,4 @@ Source: rapidjson -Version: d87b698 +Version: d87b698-1 Description: A fast JSON parser/generator for C++ with both SAX/DOM style API Homepage: http://rapidjson.org/ \ No newline at end of file diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 4f3529f5b..7438c0e33 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -32,9 +32,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug ${ file(COPY ${SOURCE_PATH}/license.txt ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson) file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidjson/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidjson/copyright) -if(VCPKG_USE_HEAD_VERSION) - file(READ "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" _contents) - string(REPLACE "\${RapidJSON_SOURCE_DIR}" "\${RapidJSON_CMAKE_DIR}/../.." _contents "${_contents}") - file(WRITE "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" "${_contents}\nset(RAPIDJSON_INCLUDE_DIRS \"\${RapidJSON_INCLUDE_DIRS}\")\n") - # Note: adding this extra setting for RAPIDJSON_INCLUDE_DIRS maintains compatibility with previous rapidjson versions -endif() +file(READ "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" _contents) +string(REPLACE "\${RapidJSON_SOURCE_DIR}" "\${RapidJSON_CMAKE_DIR}/../.." _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" "${_contents}\nset(RAPIDJSON_INCLUDE_DIRS \"\${RapidJSON_INCLUDE_DIRS}\")\n") +# Note: adding this extra setting for RAPIDJSON_INCLUDE_DIRS maintains compatibility with previous rapidjson versions From d4ab567609495a5c239f537d7c1e200f7b8a19c0 Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Wed, 17 Jul 2019 10:10:36 -0700 Subject: [PATCH 0193/1066] first pass at abi additional files --- scripts/get_triplet_environment.cmake | 1 + toolsrc/include/vcpkg/build.h | 3 +++ toolsrc/src/vcpkg/build.cpp | 32 +++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake index f76054556..ab5e8f8c3 100644 --- a/scripts/get_triplet_environment.cmake +++ b/scripts/get_triplet_environment.cmake @@ -13,3 +13,4 @@ message("VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}") message("VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") message("VCPKG_BUILD_TYPE=${VCPKG_BUILD_TYPE}") message("VCPKG_ENV_PASSTHROUGH=${VCPKG_ENV_PASSTHROUGH}") +message("VCPKG_ABI_ADDITIONAL_FILES=${VCPKG_ABI_ADDITIONAL_FILES}") diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index a0ad64ffd..85d6ebed9 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -138,6 +138,7 @@ namespace vcpkg::Build Optional external_toolchain_file; Optional build_type; std::vector passthrough_env_vars; + std::vector additional_files; }; std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); @@ -152,6 +153,7 @@ namespace vcpkg::Build CHAINLOAD_TOOLCHAIN_FILE, BUILD_TYPE, ENV_PASSTHROUGH, + ABI_ADDITIONAL_FILES, }; const std::unordered_map VCPKG_OPTIONS = { @@ -163,6 +165,7 @@ namespace vcpkg::Build {"VCPKG_CHAINLOAD_TOOLCHAIN_FILE", VcpkgTripletVar::CHAINLOAD_TOOLCHAIN_FILE}, {"VCPKG_BUILD_TYPE", VcpkgTripletVar::BUILD_TYPE}, {"VCPKG_ENV_PASSTHROUGH", VcpkgTripletVar::ENV_PASSTHROUGH}, + {"VCPKG_ABI_ADDITIONAL_FILES", VcpkgTripletVar::ABI_ADDITIONAL_FILES}, }; struct ExtendedBuildResult diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 03e0c0b1d..daed6f695 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -496,6 +496,31 @@ namespace vcpkg::Build s_hash_cache.emplace(triplet_file_path, hash); } + for (const fs::path& additional_file : pre_build_info.additional_files) + { + it_hash = s_hash_cache.find(additional_file); + + if (it_hash != s_hash_cache.end()) + { + hash += "-"; + hash += it_hash->second; + } + else if (fs.is_regular_file(additional_file)) + { + std::string tmp_hash = Hash::get_file_hash(fs, additional_file, "SHA1"); + hash += "-"; + hash += tmp_hash; + + s_hash_cache.emplace(additional_file, tmp_hash); + } + else + { + Checks::exit_with_message( + VCPKG_LINE_INFO, + additional_file + " was listed as an additional file for calculating the abi, but was not found."); + } + } + return hash; } @@ -1087,6 +1112,13 @@ namespace vcpkg::Build case VcpkgTripletVar::ENV_PASSTHROUGH : pre_build_info.passthrough_env_vars = Strings::split(variable_value, ";"); break; + case VcpkgTripletVar::ABI_ADDITIONAL_FILES : + pre_build_info.additional_files = Util::fmap(Strings::split(variable_value, ";"), + [](const std::string& path) + { + return fs::path{path}; + }); + break; } } else From e81d22ddec6887a497055d4804a004ca662b4526 Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Wed, 17 Jul 2019 10:18:20 -0700 Subject: [PATCH 0194/1066] Convert name of file to u8 string, to compile on windows --- toolsrc/src/vcpkg/build.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index daed6f695..b88d4fd1a 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -517,7 +517,7 @@ namespace vcpkg::Build { Checks::exit_with_message( VCPKG_LINE_INFO, - additional_file + " was listed as an additional file for calculating the abi, but was not found."); + additional_file.u8string() + " was listed as an additional file for calculating the abi, but was not found."); } } From 00edb0324c7c3b28882ed08d28fd29451ef12600 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Wed, 17 Jul 2019 10:44:45 -0700 Subject: [PATCH 0195/1066] Update cpprestsdk to v2.10.14. (#7286) --- ports/cpprestsdk/CONTROL | 2 +- ports/cpprestsdk/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index 016bad454..be8d24045 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.10.13-1 +Version: 2.10.14 Build-Depends: zlib, openssl (!uwp&!windows), boost-system (!uwp&!windows), boost-date-time (!uwp&!windows), boost-regex (!uwp&!windows), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows), boost-asio (!uwp&!windows) Homepage: https://github.com/Microsoft/cpprestsdk Description: C++11 JSON, REST, and OAuth library diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index 6747c0b2c..8add4c1ab 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/cpprestsdk - REF v2.10.13 - SHA512 43e60ee1266e0009f04452736a1b5127439d54416060f81544613007a8bcc084705bedd482ec3519140e79a6f56bddba6d25e9752228595bb8f83ce560ae39b8 + REF v2.10.14 + SHA512 7208b8c31e42a9bda2bf1d5c65527e54e3f946ec57743aaf7058c12a311de78de354d5ff859f35b3a8936c8964ac5695a692e234f3365edc426cf9580f76cd4f HEAD_REF master ) From 8e17f07f4446c7d3d2bc5a212d77147674c63f97 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Thu, 18 Jul 2019 01:45:26 +0800 Subject: [PATCH 0196/1066] [qt5-base]Add a print message to inform the user to install the dependency package. (#6983) --- ports/qt5-base/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index a57411562..c53d30e5b 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -87,6 +87,10 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore ) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + if (NOT EXISTS "/usr/include/GL/glu.h") + message(FATAL_ERROR "qt5 requires libgl1-mesa-dev and libglu1-mesa-dev, please use your distribution's package manager to install them.\nExample: \"apt-get install libgl1-mesa-dev\" and \"apt-get install libglu1-mesa-dev\"") + endif() + configure_qt( SOURCE_PATH ${SOURCE_PATH} PLATFORM "linux-g++" From 9a935a66dcd8ff70be548f5c1006b04626af0167 Mon Sep 17 00:00:00 2001 From: Phil Christensen Date: Wed, 17 Jul 2019 11:12:47 -0700 Subject: [PATCH 0197/1066] [bond] make haskell an external dependency (#7306) --- ports/bond/CONTROL | 12 ++++++------ ports/bond/portfile.cmake | 21 +++++---------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/ports/bond/CONTROL b/ports/bond/CONTROL index 8e8aca70a..6e5daf0a9 100644 --- a/ports/bond/CONTROL +++ b/ports/bond/CONTROL @@ -1,6 +1,6 @@ -Source: bond -Maintainer: bond@microsoft.com -Version: 8.1.0-1 -Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services. -Homepage: https://github.com/Microsoft/bond -Build-Depends: rapidjson, boost-config, boost-utility, boost-assign +Source: bond +Maintainer: bond@microsoft.com +Version: 8.1.0-2 +Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services. +Homepage: https://github.com/Microsoft/bond +Build-Depends: rapidjson, boost-config, boost-utility, boost-assign diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index a1a965a60..921b1b8cc 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -29,22 +29,11 @@ if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR endif() else() - message(STATUS "Installing stack...") - vcpkg_download_distfile( - ARCHIVE - URLS "https://get.haskellstack.org/" - FILENAME "stack-install.sh" - SHA512 35a953d626d81bebef33d84cfeb54028b315f6e2802fc50739ed8c5731944bcbefea6284e482f898b27bbed421dbf3e43f284998620091a16d8eed825ebcda37 - ) - - set(BASH /bin/bash) - - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc "${ARCHIVE}" -f - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} - LOGNAME install-stack - ) - + # According to the readme on https://github.com/microsoft/bond/ + # The build needs a version of the Haskel Tool stack that is newer than some distros ship with. + # For this reason the message is not guarded by checking to see if the tool is installed. + message("\nA recent version of Haskell Tool Stack is required to build.\n For information on how to install see https://docs.haskellstack.org/en/stable/README/\n") + endif() vcpkg_configure_cmake( From 30a3e3256f27623a3fce643d8d56170e9d3dc256 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Wed, 17 Jul 2019 11:34:31 -0700 Subject: [PATCH 0198/1066] Example: Building dynamic libraries on Linux using overlay triplets (#7291) * Example building dynamic libraries on Linux using overlay triplets * Change triplets list to multi-columns * Override default triplets example --- .../overlay-triplets-linux-dynamic.md | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 docs/examples/overlay-triplets-linux-dynamic.md diff --git a/docs/examples/overlay-triplets-linux-dynamic.md b/docs/examples/overlay-triplets-linux-dynamic.md new file mode 100644 index 000000000..6168d85e6 --- /dev/null +++ b/docs/examples/overlay-triplets-linux-dynamic.md @@ -0,0 +1,158 @@ +# Overlay triplets example: build dynamic libraries on Linux + +Using **vcpkg** you can build libraries for the following triplets: + +
+
    +
  • arm-uwp
  • +
  • arm-windows
  • +
  • arm64-uwp
  • +
  • arm64-windows
  • +
  • x86-uwp
  • +
  • x86-windows
  • +
  • x86-windows-static
  • +
  • x64-uwp
  • +
  • x64-linux
  • +
  • x64-osx
  • +
  • x64-windows
  • +
  • x64-windows-static
  • +
+
+ + + +By design **vcpkg** builds only static libraries for Linux and Mac OS. +However, this doesn't mean that you cannot use **vcpkg** to build your dynamic libraries on these platforms. + +This document will guide you through creating your own custom triplets to build dynamic libraries on Linux using **vcpkg**. + +### Step 1: Create a folder to contain your custom triplets + +``` +~/vcpkg$ mkdir ../custom-triplets +``` + +### Step 2: Create the custom triplet files + +To save time, copy the existing `x64-linux.cmake` triplet file. + +``` +~/vcpkg$ cp ./triplets/x64-linux.cmake ../custom-triplets/x64-linux-dynamic.cmake +``` + +And modify `custom-triplets/x64-linux-dynamic.cmake` to match the contents below: +``` +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +# Change VCPKG_LIBRARY_LINKAGE from static to dynamic +set(VCPKG_LIBRARY_LINKAGE dynamic) + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +``` + +### Step 3: Use `--overlay-triplets` to build dynamic libraries + +Use the `--overlay-triplets` option to include the triplets in the `custom-triplets` directory. + +``` +./vcpkg install sqlite3:x64-linux-dynamic --overlay-triplets=../custom-triplets +The following packages will be built and installed: + sqlite3[core]:x64-linux +Starting package 1/1: sqlite3:x64-linux-dynamic +Building package sqlite3[core]:x64-linux-dynamic... +-- Loading triplet configuration from: /home/custom-triplets/x64-linux-dynamic.cmake +-- Downloading https://sqlite.org/2019/sqlite-amalgamation-3280000.zip... +-- Extracting source /home/victor/git/vcpkg/downloads/sqlite-amalgamation-3280000.zip +-- Applying patch fix-arm-uwp.patch +-- Using source at /home/victor/git/vcpkg/buildtrees/sqlite3/src/3280000-6a3ff7ce92 +-- Configuring x64-linux-dynamic-dbg +-- Configuring x64-linux-dynamic-rel +-- Building x64-linux-dynamic-dbg +-- Building x64-linux-dynamic-rel +-- Performing post-build validation +-- Performing post-build validation done +Building package sqlite3[core]:x64-linux-dynamic... done +Installing package sqlite3[core]:x64-linux-dynamic... +Installing package sqlite3[core]:x64-linux-dynamic... done +Elapsed time for package sqlite3:x64-linux-dynamic: 44.82 s + +Total elapsed time: 44.82 s + +The package sqlite3:x64-linux-dynamic provides CMake targets: + + find_package(sqlite3 CONFIG REQUIRED) + target_link_libraries(main PRIVATE sqlite3) +``` + +Overlay triplets will add your custom triplet files when using `vcpkg install`, `vcpkg update`, `vcpkg upgrade`, and `vcpkg remove`. + +When using the `--overlay-triplets` option, a message like the following lets you know that a custom triplet is being used: + +``` +-- Loading triplet configuration from: /home/custom-triplets/x64-linux-dynamic.cmake +``` + +## Overriding default triplets + +As you may have noticed, the default triplets for Windows (`x86-windows` and `x64-windows`) install dynamic libraries, while a suffix (`-static`) is needed for static libraries. This is inconsistent with Linux and Mac OS where only static libraries are built. + +Using `--overlay-ports` it is possible to override the default triplets to accomplish the same behavior on Linux: + +* `x64-linux`: Builds dynamic libraries, +* `x64-linux-static`: Builds static libraries. + +### Step 1: Create the overriden triplet + +Using the custom triplet created in the previous example, rename `custom-triplets/x64-linux-dynamic.cmake` to `custom-triplets/x64-linux.cmake`. + +``` +~/vcpkg$ mv ../custom-triplets/x64-linux-dynamic.cmake ../custom-triplets/x64-linux.cmake +``` + +### Step 2: Copy and rename the default triplet + +Then, copy the default `x64-linux` triplet (which builds static libraries) in your `/custom-triplets` folder and rename it to `x64-linux-static.cmake`. + +``` +~/vcpkg$ cp ./triplets/x64-linux.cmake ../custom-triplets/x64-linux-static.cmake +``` + +### Step 3: Use `--overlay-ports` to override default triplets + +Use the `--overlay-triplets` option to include the triplets in the `custom-triplets` directory. + +``` +./vcpkg install sqlite3:x64-linux --overlay-triplets=../custom-triplets +The following packages will be built and installed: + sqlite3[core]:x64-linux +Starting package 1/1: sqlite3:x64-linux +Building package sqlite3[core]:x64-linux... +-- Loading triplet configuration from: /home/custom-triplets/x64-linux.cmake +-- Downloading https://sqlite.org/2019/sqlite-amalgamation-3280000.zip... +-- Extracting source /home/victor/git/vcpkg/downloads/sqlite-amalgamation-3280000.zip +-- Applying patch fix-arm-uwp.patch +-- Using source at /home/victor/git/vcpkg/buildtrees/sqlite3/src/3280000-6a3ff7ce92 +-- Configuring x64-linux-dbg +-- Configuring x64-linux-rel +-- Building x64-linux-dbg +-- Building x64-linux-rel +-- Performing post-build validation +-- Performing post-build validation done +Building package sqlite3[core]:x64-linux... done +Installing package sqlite3[core]:x64-linux... +Installing package sqlite3[core]:x64-linux... done +Elapsed time for package sqlite3:x64-linux: 44.82 s + +Total elapsed time: 44.82 s + +The package sqlite3:x64-linux provides CMake targets: + + find_package(sqlite3 CONFIG REQUIRED) + target_link_libraries(main PRIVATE sqlite3) +``` + +Note that the default triplet is masked by your custom triplet: + +``` +-- Loading triplet configuration from: /home/custom-triplets/x64-linux.cmake +``` From 800fd63cf3c1824784fa8c4caff122ab453661ce Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Thu, 18 Jul 2019 02:39:54 +0800 Subject: [PATCH 0199/1066] [qt5]Fix build failure in linux (#7230) --- ports/qt5-3d/CONTROL | 2 +- ports/qt5-activeqt/CONTROL | 2 +- ports/qt5-activeqt/portfile.cmake | 4 ++++ ports/qt5-base/CONTROL | 2 +- ports/qt5-charts/CONTROL | 2 +- ports/qt5-connectivity/CONTROL | 2 +- ports/qt5-datavis3d/CONTROL | 2 +- ports/qt5-declarative/CONTROL | 2 +- ports/qt5-declarative/portfile.cmake | 11 +++++++++++ ports/qt5-gamepad/CONTROL | 2 +- ports/qt5-graphicaleffects/CONTROL | 2 +- ports/qt5-imageformats/CONTROL | 2 +- ports/qt5-location/CONTROL | 2 +- ports/qt5-macextras/CONTROL | 2 +- ports/qt5-macextras/portfile.cmake | 4 ++++ ports/qt5-modularscripts/CONTROL | 2 +- ports/qt5-modularscripts/qt_modular_library.cmake | 11 ++++++++--- ports/qt5-mqtt/CONTROL | 2 +- ports/qt5-multimedia/CONTROL | 2 +- ports/qt5-networkauth/CONTROL | 2 +- ports/qt5-purchasing/CONTROL | 2 +- ports/qt5-quickcontrols/CONTROL | 2 +- ports/qt5-quickcontrols2/CONTROL | 2 +- ports/qt5-remoteobjects/CONTROL | 2 +- ports/qt5-script/CONTROL | 2 +- ports/qt5-scxml/CONTROL | 2 +- ports/qt5-sensors/CONTROL | 2 +- ports/qt5-serialport/CONTROL | 2 +- ports/qt5-speech/CONTROL | 2 +- ports/qt5-svg/CONTROL | 2 +- ports/qt5-tools/CONTROL | 2 +- ports/qt5-virtualkeyboard/CONTROL | 2 +- ports/qt5-webchannel/CONTROL | 2 +- ports/qt5-websockets/CONTROL | 2 +- ports/qt5-webview/CONTROL | 2 +- ports/qt5-winextras/CONTROL | 2 +- ports/qt5-winextras/portfile.cmake | 4 ++++ ports/qt5-xmlpatterns/CONTROL | 2 +- 38 files changed, 64 insertions(+), 36 deletions(-) diff --git a/ports/qt5-3d/CONTROL b/ports/qt5-3d/CONTROL index 515dd5513..0dfbdb027 100644 --- a/ports/qt5-3d/CONTROL +++ b/ports/qt5-3d/CONTROL @@ -1,4 +1,4 @@ Source: qt5-3d -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-activeqt/CONTROL b/ports/qt5-activeqt/CONTROL index 60ca38370..e2084f046 100644 --- a/ports/qt5-activeqt/CONTROL +++ b/ports/qt5-activeqt/CONTROL @@ -1,4 +1,4 @@ Source: qt5-activeqt -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 ActiveQt Module - ActiveX components Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-activeqt/portfile.cmake b/ports/qt5-activeqt/portfile.cmake index 1e63132d8..40c4875d9 100644 --- a/ports/qt5-activeqt/portfile.cmake +++ b/ports/qt5-activeqt/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if (NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "qt5-activeqt only support Windows.") +endif() + include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) qt_modular_library(qtactiveqt 477c42653a59739aeeb17ab54bdd5cc50bc72a117250926e940c34d3f81d1b92356074056fb49f3cd811a88840377836b2d97cea8cbc62ae1d895168e7860753) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 562a9cc9d..853215dc4 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,5 +1,5 @@ Source: qt5-base -Version: 5.12.3-2 +Version: 5.12.3-3 Homepage: https://www.qt.io/ Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl diff --git a/ports/qt5-charts/CONTROL b/ports/qt5-charts/CONTROL index 672aaf2d1..849ee2af6 100644 --- a/ports/qt5-charts/CONTROL +++ b/ports/qt5-charts/CONTROL @@ -1,4 +1,4 @@ Source: qt5-charts -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-connectivity/CONTROL b/ports/qt5-connectivity/CONTROL index 741af6767..bd169d40d 100644 --- a/ports/qt5-connectivity/CONTROL +++ b/ports/qt5-connectivity/CONTROL @@ -1,4 +1,4 @@ Source: qt5-connectivity -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Connectivity module - Provides access to Bluetooth and NFC hardware Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-datavis3d/CONTROL b/ports/qt5-datavis3d/CONTROL index 5ef4728df..0957b7d2c 100644 --- a/ports/qt5-datavis3d/CONTROL +++ b/ports/qt5-datavis3d/CONTROL @@ -1,4 +1,4 @@ Source: qt5-datavis3d -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-declarative/CONTROL b/ports/qt5-declarative/CONTROL index 1e7e6f6e6..9b9c79e62 100644 --- a/ports/qt5-declarative/CONTROL +++ b/ports/qt5-declarative/CONTROL @@ -1,4 +1,4 @@ Source: qt5-declarative -Version: 5.12.3-1 +Version: 5.12.3-2 Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-declarative/portfile.cmake b/ports/qt5-declarative/portfile.cmake index 1056d1b9f..4c1a11b24 100644 --- a/ports/qt5-declarative/portfile.cmake +++ b/ports/qt5-declarative/portfile.cmake @@ -11,4 +11,15 @@ if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(READ "${qt5decpath}" _contents) string(REPLACE [[QT.qmldevtools_private.libs = $$QT_MODULE_HOST_LIB_BASE]] [[QT.qmldevtools_private.libs = $$QT_MODULE_LIB_BASE]] _contents "${_contents}") file(WRITE "${qt5decpath}" "${_contents}") +endif() + +# Copy qt5-declarative tools +# This is a temporary workaround and hope to fix and remove it after the version update. +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + if (EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/ ${CURRENT_PACKAGES_DIR}/tools/qt5/) + endif() + if (EXISTS ${CURRENT_PACKAGES_DIR}/lib/libQt5QmlDevTools.a) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/libQt5QmlDevTools.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) + endif() endif() \ No newline at end of file diff --git a/ports/qt5-gamepad/CONTROL b/ports/qt5-gamepad/CONTROL index 741c249cd..105e2f5dd 100644 --- a/ports/qt5-gamepad/CONTROL +++ b/ports/qt5-gamepad/CONTROL @@ -1,4 +1,4 @@ Source: qt5-gamepad -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-graphicaleffects/CONTROL b/ports/qt5-graphicaleffects/CONTROL index 71250701b..80730b0fe 100644 --- a/ports/qt5-graphicaleffects/CONTROL +++ b/ports/qt5-graphicaleffects/CONTROL @@ -1,4 +1,4 @@ Source: qt5-graphicaleffects -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 GraphicalEffects Module. Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-imageformats/CONTROL b/ports/qt5-imageformats/CONTROL index 7033b42c5..40df95dbe 100644 --- a/ports/qt5-imageformats/CONTROL +++ b/ports/qt5-imageformats/CONTROL @@ -1,4 +1,4 @@ Source: qt5-imageformats -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-location/CONTROL b/ports/qt5-location/CONTROL index b881c1fae..a6f469fc8 100644 --- a/ports/qt5-location/CONTROL +++ b/ports/qt5-location/CONTROL @@ -1,4 +1,4 @@ Source: qt5-location -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Location Module - Displays map, navigation, and place content in a QML application. Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-macextras/CONTROL b/ports/qt5-macextras/CONTROL index e0c686414..7489191f3 100644 --- a/ports/qt5-macextras/CONTROL +++ b/ports/qt5-macextras/CONTROL @@ -1,4 +1,4 @@ Source: qt5-macextras -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Mac Extras Module. Provides platform-specific APIs for mac. Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-macextras/portfile.cmake b/ports/qt5-macextras/portfile.cmake index a833541d9..676f0b23e 100644 --- a/ports/qt5-macextras/portfile.cmake +++ b/ports/qt5-macextras/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + message(FATAL_ERROR "qt5-macextras only support OSX.") +endif() + include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) qt_modular_library(qtmacextras 56887c2a2d20c41a133af87aec8975e17c6335ffc51093f23a904e02a78f59a8117c7932827ca5dd33f538360e6fd9cfc9d0091c6f4c1e0b96528b5324c74033) diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL index 4dc0032f9..a3751b61b 100644 --- a/ports/qt5-modularscripts/CONTROL +++ b/ports/qt5-modularscripts/CONTROL @@ -1,3 +1,3 @@ Source: qt5-modularscripts -Version: 2019-04-30 +Version: 2019-04-30-1 Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake index 61eea306b..e58d0bf91 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -52,8 +52,12 @@ function(qt_modular_build_library SOURCE_PATH) #Configure debug+release vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}) - - vcpkg_build_qmake() + #Build debug+release + if (CMAKE_HOST_WIN32) + vcpkg_build_qmake() + else() + vcpkg_build_qmake(SKIP_MAKEFILES) + endif() #Fix the cmake files if they exist if(EXISTS ${RELEASE_DIR}/lib/cmake) @@ -76,11 +80,12 @@ function(qt_modular_build_library SOURCE_PATH) #Install the module files vcpkg_build_qmake(TARGETS install SKIP_MAKEFILES BUILD_LOGNAME install) - #Remove extra cmake files + #Install cmake files if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) endif() + #Remove extra cmake files if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) endif() diff --git a/ports/qt5-mqtt/CONTROL b/ports/qt5-mqtt/CONTROL index 87da5cd92..0e424dad9 100644 --- a/ports/qt5-mqtt/CONTROL +++ b/ports/qt5-mqtt/CONTROL @@ -1,4 +1,4 @@ Source: qt5-mqtt -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 MQTT module. Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-multimedia/CONTROL b/ports/qt5-multimedia/CONTROL index cdc7e20c7..9e41198a6 100644 --- a/ports/qt5-multimedia/CONTROL +++ b/ports/qt5-multimedia/CONTROL @@ -1,4 +1,4 @@ Source: qt5-multimedia -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-networkauth/CONTROL b/ports/qt5-networkauth/CONTROL index 241e52cdc..34f5d82a2 100644 --- a/ports/qt5-networkauth/CONTROL +++ b/ports/qt5-networkauth/CONTROL @@ -1,4 +1,4 @@ Source: qt5-networkauth -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Network Authorization Module Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-purchasing/CONTROL b/ports/qt5-purchasing/CONTROL index 14a21138a..bd8596571 100644 --- a/ports/qt5-purchasing/CONTROL +++ b/ports/qt5-purchasing/CONTROL @@ -1,4 +1,4 @@ Source: qt5-purchasing -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Purchasing Module - Enables in-app purchase of products in Qt applications. Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols/CONTROL b/ports/qt5-quickcontrols/CONTROL index 287daebe1..b7360350d 100644 --- a/ports/qt5-quickcontrols/CONTROL +++ b/ports/qt5-quickcontrols/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 QuickControls Module. Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols2/CONTROL b/ports/qt5-quickcontrols2/CONTROL index 01f94c4c0..88358dd16 100644 --- a/ports/qt5-quickcontrols2/CONTROL +++ b/ports/qt5-quickcontrols2/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols2 -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 QuickControls2 Module. Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-remoteobjects/CONTROL b/ports/qt5-remoteobjects/CONTROL index e1e9df450..ffe6095a5 100644 --- a/ports/qt5-remoteobjects/CONTROL +++ b/ports/qt5-remoteobjects/CONTROL @@ -1,4 +1,4 @@ Source: qt5-remoteobjects -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Remoteobjects module - Provides an easy to use mechanism for sharing a QObject's API (Properties/Signals/Slots) between processes or devices. Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-script/CONTROL b/ports/qt5-script/CONTROL index e27e24b57..4fe0bb028 100755 --- a/ports/qt5-script/CONTROL +++ b/ports/qt5-script/CONTROL @@ -1,4 +1,4 @@ Source: qt5-script -Version: 5.12.3 +Version: 5.12.3-1 Build-Depends: qt5-base, qt5-modularscripts Description:Qt5 Script Module. diff --git a/ports/qt5-scxml/CONTROL b/ports/qt5-scxml/CONTROL index b61ed5922..accc5100a 100644 --- a/ports/qt5-scxml/CONTROL +++ b/ports/qt5-scxml/CONTROL @@ -1,4 +1,4 @@ Source: qt5-scxml -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-sensors/CONTROL b/ports/qt5-sensors/CONTROL index f0bceb31c..a69df5531 100644 --- a/ports/qt5-sensors/CONTROL +++ b/ports/qt5-sensors/CONTROL @@ -1,4 +1,4 @@ Source: qt5-sensors -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Sensors module - Provides access to sensor hardware and motion gesture recognition. Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-serialport/CONTROL b/ports/qt5-serialport/CONTROL index 8e2572300..e9613f235 100644 --- a/ports/qt5-serialport/CONTROL +++ b/ports/qt5-serialport/CONTROL @@ -1,4 +1,4 @@ Source: qt5-serialport -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Serial Port - provides access to hardware and virtual serial ports Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-speech/CONTROL b/ports/qt5-speech/CONTROL index cbc841086..ee1606cbd 100644 --- a/ports/qt5-speech/CONTROL +++ b/ports/qt5-speech/CONTROL @@ -1,4 +1,4 @@ Source: qt5-speech -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Speech Module Build-Depends: qt5-modularscripts, qt5-base, atlmfc (windows) diff --git a/ports/qt5-svg/CONTROL b/ports/qt5-svg/CONTROL index 9970a6fc0..8f7f95737 100644 --- a/ports/qt5-svg/CONTROL +++ b/ports/qt5-svg/CONTROL @@ -1,4 +1,4 @@ Source: qt5-svg -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-tools/CONTROL b/ports/qt5-tools/CONTROL index 502635783..c64f3536c 100644 --- a/ports/qt5-tools/CONTROL +++ b/ports/qt5-tools/CONTROL @@ -1,4 +1,4 @@ Source: qt5-tools -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-virtualkeyboard/CONTROL b/ports/qt5-virtualkeyboard/CONTROL index 20b745844..de343f928 100644 --- a/ports/qt5-virtualkeyboard/CONTROL +++ b/ports/qt5-virtualkeyboard/CONTROL @@ -1,4 +1,4 @@ Source: qt5-virtualkeyboard -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-webchannel/CONTROL b/ports/qt5-webchannel/CONTROL index 64945edba..93b47e0e0 100644 --- a/ports/qt5-webchannel/CONTROL +++ b/ports/qt5-webchannel/CONTROL @@ -1,4 +1,4 @@ Source: qt5-webchannel -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Web Channel module - Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients. Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-websockets/CONTROL b/ports/qt5-websockets/CONTROL index e2cae414c..4fbf6c19a 100644 --- a/ports/qt5-websockets/CONTROL +++ b/ports/qt5-websockets/CONTROL @@ -1,4 +1,4 @@ Source: qt5-websockets -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455 Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-webview/CONTROL b/ports/qt5-webview/CONTROL index e0816259a..b82afd8ef 100644 --- a/ports/qt5-webview/CONTROL +++ b/ports/qt5-webview/CONTROL @@ -1,4 +1,4 @@ Source: qt5-webview -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 WebView module - Provides a way to display web content in a QML application without necessarily including a full web browser stack by using native APIs where it makes sense. Build-Depends: qt5-base, qt5-modularscripts, qt5-declarative diff --git a/ports/qt5-winextras/CONTROL b/ports/qt5-winextras/CONTROL index 97c443d8c..89173dcdc 100644 --- a/ports/qt5-winextras/CONTROL +++ b/ports/qt5-winextras/CONTROL @@ -1,4 +1,4 @@ Source: qt5-winextras -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. Build-Depends: qt5-modularscripts, qt5-base, atlmfc diff --git a/ports/qt5-winextras/portfile.cmake b/ports/qt5-winextras/portfile.cmake index f0890bfaf..90adb16c0 100644 --- a/ports/qt5-winextras/portfile.cmake +++ b/ports/qt5-winextras/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if (NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "qt5-winextras only support Windows.") +endif() + include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) qt_modular_library(qtwinextras e50cb237359ce7a3bde6989ec4349fe67be3b4999092516e891bba12f0fb4acb9954de8e2f0171db0e849b7d3ef94bd80f77f81162afb239e49c6e2e0760343b) diff --git a/ports/qt5-xmlpatterns/CONTROL b/ports/qt5-xmlpatterns/CONTROL index 917615922..a2e394f3d 100644 --- a/ports/qt5-xmlpatterns/CONTROL +++ b/ports/qt5-xmlpatterns/CONTROL @@ -1,4 +1,4 @@ Source: qt5-xmlpatterns -Version: 5.12.3 +Version: 5.12.3-1 Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation Build-Depends: qt5-modularscripts, qt5-base From f0f615532f9aa03f1518f03009cff5c716e9b1fd Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Wed, 17 Jul 2019 11:40:27 -0700 Subject: [PATCH 0200/1066] always calculate abi --- toolsrc/src/vcpkg/build.cpp | 144 ++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 71 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index b88d4fd1a..47599bfca 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -623,8 +623,6 @@ namespace vcpkg::Build const PreBuildInfo& pre_build_info, Span dependency_abis) { - if (config.build_package_options.binary_caching == BinaryCaching::NO) return nullopt; - auto& fs = paths.get_filesystem(); const Triplet& triplet = config.triplet; const std::string& name = config.scf.core_paragraph->name; @@ -713,7 +711,7 @@ namespace vcpkg::Build } System::print2( - "Warning: binary caching disabled because abi keys are missing values:\n", + "Warning: abi keys are missing values:\n", Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { return " " + e.key + "\n"; }), "\n"); @@ -814,15 +812,14 @@ namespace vcpkg::Build auto maybe_abi_tag_and_file = compute_abi_tag(paths, config, pre_build_info, dependency_abis); const auto abi_tag_and_file = maybe_abi_tag_and_file.get(); + const fs::path archives_root_dir = paths.root / "archives"; + const std::string archive_name = abi_tag_and_file->tag + ".zip"; + const fs::path archive_subpath = fs::u8path(abi_tag_and_file->tag.substr(0, 2)) / archive_name; + const fs::path archive_path = archives_root_dir / archive_subpath; + const fs::path archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; if (config.build_package_options.binary_caching == BinaryCaching::YES && abi_tag_and_file) { - const fs::path archives_root_dir = paths.root / "archives"; - const std::string archive_name = abi_tag_and_file->tag + ".zip"; - const fs::path archive_subpath = fs::u8path(abi_tag_and_file->tag.substr(0, 2)) / archive_name; - const fs::path archive_path = archives_root_dir / archive_subpath; - const fs::path archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; - if (fs.exists(archive_path)) { System::print2("Using cached binary package: ", archive_path.u8string(), "\n"); @@ -855,70 +852,75 @@ namespace vcpkg::Build } System::printf("Could not locate cached archive: %s\n", archive_path.u8string()); - - ExtendedBuildResult result = do_build_package_and_clean_buildtrees( - paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config); - - std::error_code ec; - fs.create_directories(paths.package_dir(spec) / "share" / spec.name(), ec); - auto abi_file_in_package = paths.package_dir(spec) / "share" / spec.name() / "vcpkg_abi_info.txt"; - fs.copy_file(abi_tag_and_file->tag_file, abi_file_in_package, fs::stdfs::copy_options::none, ec); - Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not copy into file: %s", abi_file_in_package.u8string()); - - if (result.code == BuildResult::SUCCEEDED) - { - const auto tmp_archive_path = paths.buildtrees / spec.name() / (spec.triplet().to_string() + ".zip"); - - compress_archive(paths, spec, tmp_archive_path); - - fs.create_directories(archive_path.parent_path(), ec); - fs.rename_or_copy(tmp_archive_path, archive_path, ".tmp", ec); - if (ec) - { - System::printf(System::Color::warning, - "Failed to store binary cache %s: %s\n", - archive_path.u8string(), - ec.message()); - } - else - System::printf("Stored binary cache: %s\n", archive_path.u8string()); - } - else if (result.code == BuildResult::BUILD_FAILED || result.code == BuildResult::POST_BUILD_CHECKS_FAILED) - { - if (!fs.exists(archive_tombstone_path)) - { - // Build failed, store all failure logs in the tombstone. - const auto tmp_log_path = paths.buildtrees / spec.name() / "tmp_failure_logs"; - const auto tmp_log_path_destination = tmp_log_path / spec.name(); - const auto tmp_failure_zip = paths.buildtrees / spec.name() / "failure_logs.zip"; - fs.create_directories(tmp_log_path_destination, ec); - - for (auto& log_file : fs::stdfs::directory_iterator(paths.buildtrees / spec.name())) - { - if (log_file.path().extension() == ".log") - { - fs.copy_file(log_file.path(), - tmp_log_path_destination / log_file.path().filename(), - fs::stdfs::copy_options::none, - ec); - } - } - - compress_directory(paths, tmp_log_path, paths.buildtrees / spec.name() / "failure_logs.zip"); - - fs.create_directories(archive_tombstone_path.parent_path(), ec); - fs.rename_or_copy(tmp_failure_zip, archive_tombstone_path, ".tmp", ec); - - // clean up temporary directory - fs.remove_all(tmp_log_path, ec); - } - } - - return result; } - return do_build_package_and_clean_buildtrees( - paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config); + ExtendedBuildResult result = + do_build_package_and_clean_buildtrees( + paths, + pre_build_info, + spec, + maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, + config); + + std::error_code ec; + fs.create_directories(paths.package_dir(spec) / "share" / spec.name(), ec); + auto abi_file_in_package = paths.package_dir(spec) / "share" / spec.name() / "vcpkg_abi_info.txt"; + fs.copy_file(abi_tag_and_file->tag_file, abi_file_in_package, fs::stdfs::copy_options::none, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not copy into file: %s", abi_file_in_package.u8string()); + + if (config.build_package_options.binary_caching == BinaryCaching::YES && + result.code == BuildResult::SUCCEEDED) + { + const auto tmp_archive_path = paths.buildtrees / spec.name() / (spec.triplet().to_string() + ".zip"); + + compress_archive(paths, spec, tmp_archive_path); + + fs.create_directories(archive_path.parent_path(), ec); + fs.rename_or_copy(tmp_archive_path, archive_path, ".tmp", ec); + if (ec) + { + System::printf(System::Color::warning, + "Failed to store binary cache %s: %s\n", + archive_path.u8string(), + ec.message()); + } + else + System::printf("Stored binary cache: %s\n", archive_path.u8string()); + } + else if (config.build_package_options.binary_caching == BinaryCaching::YES && + (result.code == BuildResult::BUILD_FAILED || + result.code == BuildResult::POST_BUILD_CHECKS_FAILED)) + { + if (!fs.exists(archive_tombstone_path)) + { + // Build failed, store all failure logs in the tombstone. + const auto tmp_log_path = paths.buildtrees / spec.name() / "tmp_failure_logs"; + const auto tmp_log_path_destination = tmp_log_path / spec.name(); + const auto tmp_failure_zip = paths.buildtrees / spec.name() / "failure_logs.zip"; + fs.create_directories(tmp_log_path_destination, ec); + + for (auto& log_file : fs::stdfs::directory_iterator(paths.buildtrees / spec.name())) + { + if (log_file.path().extension() == ".log") + { + fs.copy_file(log_file.path(), + tmp_log_path_destination / log_file.path().filename(), + fs::stdfs::copy_options::none, + ec); + } + } + + compress_directory(paths, tmp_log_path, paths.buildtrees / spec.name() / "failure_logs.zip"); + + fs.create_directories(archive_tombstone_path.parent_path(), ec); + fs.rename_or_copy(tmp_failure_zip, archive_tombstone_path, ".tmp", ec); + + // clean up temporary directory + fs.remove_all(tmp_log_path, ec); + } + } + + return result; } const std::string& to_string(const BuildResult build_result) From 58958eb0ea47c6c423fe78f2cd6fd1e31cbcb082 Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Wed, 17 Jul 2019 14:27:18 -0700 Subject: [PATCH 0201/1066] sourceparagraph changes --- toolsrc/include/vcpkg/sourceparagraph.h | 10 ++++++++ toolsrc/src/vcpkg/sourceparagraph.cpp | 32 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index 9fbd83475..9a1c2c843 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -46,6 +46,12 @@ namespace vcpkg /// struct SourceParagraph { + enum TYPE : unsigned + { + PORT = 0, + SYS_TOOL, + }; + std::string name; std::string version; std::string description; @@ -54,6 +60,10 @@ namespace vcpkg std::vector supports; std::vector depends; std::vector default_features; + TYPE type; + + static TYPE type_from_string(const std::string& in); + static std::string string_from_type(const TYPE& in); }; /// diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 1a52bd05f..26a7ab118 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -25,6 +25,7 @@ namespace vcpkg static const std::string SUPPORTS = "Supports"; static const std::string VERSION = "Version"; static const std::string HOMEPAGE = "Homepage"; + static const std::string TYPE = "Type"; } static Span get_list_of_valid_fields() @@ -36,6 +37,7 @@ namespace vcpkg SourceParagraphFields::MAINTAINER, SourceParagraphFields::BUILD_DEPENDS, SourceParagraphFields::HOMEPAGE, + SourceParagraphFields::TYPE, }; return valid_fields; @@ -98,6 +100,35 @@ namespace vcpkg } } + static SourceParagraph::TYPE type_from_string(const std::string& in) + { + if (Strings::equals(in, "port") || Strings::equals(in, "")) + { + return SourceParagraph::PORT; + } + + if (Strings::equals(in, "sys-tool")) + { + return SourceParagraph::SYS_TOOL; + } + + System::print2( + in, " is not a valid control file type. Valid types are:", + "\n port\n sys-tool"); + + Checks::exit_fail(VCPKG_LINE_INFO); + } + + static std::string string_from_type(const SourceParagraph::TYPE& in) + { + switch (in) + { + case SourceParagraph::PORT : return "port"; + case SourceParagraph::SYS_TOOL : return "sys-tool"; + default : Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid CONTROL_TYPE value."); + } + } + static ParseExpected parse_source_paragraph(RawParagraph&& fields) { ParagraphParser parser(std::move(fields)); @@ -114,6 +145,7 @@ namespace vcpkg parse_comma_list(parser.optional_field(SourceParagraphFields::BUILD_DEPENDS))); spgh->supports = parse_comma_list(parser.optional_field(SourceParagraphFields::SUPPORTS)); spgh->default_features = parse_comma_list(parser.optional_field(SourceParagraphFields::DEFAULTFEATURES)); + spgh->type = type_from_string(parser.optional_field(SourceParagraphFields::TYPE)); auto err = parser.error_info(spgh->name); if (err) From 4d2d85765f61c874d28d4301bdffe39ad1f482ed Mon Sep 17 00:00:00 2001 From: Brad Barnich Date: Wed, 17 Jul 2019 18:13:28 -0400 Subject: [PATCH 0202/1066] Update rocksdb to 6.1.2, adds optional zstd feature (#7304) --- ports/rocksdb/CONTROL | 6 +++++- ports/rocksdb/Findzstd.cmake | 13 +++++++++++++ ports/rocksdb/portfile.cmake | 11 +++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 ports/rocksdb/Findzstd.cmake diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 6e35d8a9b..6daf694b5 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,5 +1,5 @@ Source: rocksdb -Version: 6.0.2 +Version: 6.1.2 Homepage: https://github.com/facebook/rocksdb Description: A library that provides an embeddable, persistent key-value store for fast storage Default-Features: zlib @@ -19,3 +19,7 @@ Description: zlib support in rocksdb Feature: tbb Build-Depends: tbb Description: tbb support in rocksdb + +Feature: zstd +Build-Depends: zstd +Description: zstd support in rocksdb diff --git a/ports/rocksdb/Findzstd.cmake b/ports/rocksdb/Findzstd.cmake new file mode 100644 index 000000000..f047fc2a9 --- /dev/null +++ b/ports/rocksdb/Findzstd.cmake @@ -0,0 +1,13 @@ +find_path(ZSTD_INCLUDE_DIR zstd.h) + +find_library(ZSTD_LIBRARY_DEBUG NAMES zstd) +find_library(ZSTD_LIBRARY_RELEASE NAMES zstd) + +include(SelectLibraryConfigurations) +select_library_configurations(ZSTD) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + ZSTD DEFAULT_MSG + ZSTD_LIBRARY ZSTD_INCLUDE_DIR +) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 27a9d70d5..7cab8b7d9 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb - REF v6.0.2 - SHA512 6659f04c9823750b9b635e2a247b59dbda4975458615392df82bdbeb4ac7ac783e6de86a32fcc318aae1bb27880557390c544c99caa3db3885f9c3d836cc1df8 + REF v6.1.2 + SHA512 3d9e994b202c9f1c1c188e37a4f781bb97af5ba72f2f3f59091b79f402b819c9765dcd1e7d0851b5119c0bf510aa3f5bed44a542798ee81795a8328d71554b38 HEAD_REF master PATCHES 0001-disable-gtest.patch @@ -18,6 +18,7 @@ file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake") file(COPY "${CMAKE_CURRENT_LIST_DIR}/Findlz4.cmake" "${CMAKE_CURRENT_LIST_DIR}/Findsnappy.cmake" + "${CMAKE_CURRENT_LIST_DIR}/Findzstd.cmake" DESTINATION "${SOURCE_PATH}/cmake/modules" ) @@ -40,6 +41,11 @@ if("zlib" IN_LIST FEATURES) set(WITH_ZLIB ON) endif() +set(WITH_ZLIB OFF) +if("zstd" IN_LIST FEATURES) + set(WITH_ZLIB ON) +endif() + set(WITH_TBB OFF) set(ROCKSDB_IGNORE_PACKAGE_TBB TRUE) if("tbb" IN_LIST FEATURES) @@ -57,6 +63,7 @@ vcpkg_configure_cmake( -DWITH_LZ4=${WITH_LZ4} -DWITH_ZLIB=${WITH_ZLIB} -DWITH_TBB=${WITH_TBB} + -DWITH_ZSTD=${WITH_ZSTD} -DWITH_TESTS=OFF -DUSE_RTTI=1 -DROCKSDB_INSTALL_ON_WINDOWS=ON From ab0ca36d9721e1c9138eba6a0c3d1a2b05deb186 Mon Sep 17 00:00:00 2001 From: alcroito Date: Thu, 18 Jul 2019 00:14:57 +0200 Subject: [PATCH 0203/1066] [botan] Fix parallel build (#7303) The build tool parallel argument should be passed in the regular COMMAND case, not the NO_PARALLEL_COMMAND one. Also the job number argument on Windows should not have a space between the argument and number. --- ports/botan/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index 81eb3706c..6d0c81c8d 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_from_github( if(CMAKE_HOST_WIN32) vcpkg_find_acquire_program(JOM) set(build_tool "${JOM}") - set(parallel_build "/J ${VCPKG_CONCURRENCY}") + set(parallel_build "/J${VCPKG_CONCURRENCY}") else() find_program(MAKE make) set(build_tool "${MAKE}") @@ -87,8 +87,8 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}") vcpkg_execute_build_process( - COMMAND ${build_tool} - NO_PARALLEL_COMMAND "${build_tool} ${parallel_build}" + COMMAND "${build_tool}" ${parallel_build} + NO_PARALLEL_COMMAND "${build_tool}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" LOGNAME build-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") From 56f3f4535e18f04fb7995472f235559f31f55356 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Wed, 17 Jul 2019 15:25:13 -0700 Subject: [PATCH 0204/1066] [metis] Fix linux build error. (#7299) --- ports/metis/CONTROL | 2 +- ports/metis/fix-linux-build-error.patch | 14 ++++++++++++++ ports/metis/portfile.cmake | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ports/metis/fix-linux-build-error.patch diff --git a/ports/metis/CONTROL b/ports/metis/CONTROL index 6db70e599..02f5eb9e1 100644 --- a/ports/metis/CONTROL +++ b/ports/metis/CONTROL @@ -1,4 +1,4 @@ Source: metis -Version: 5.1.0-3 +Version: 5.1.0-4 Homepage: https://glaros.dtc.umn.edu/gkhome/metis/metis/overview Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering diff --git a/ports/metis/fix-linux-build-error.patch b/ports/metis/fix-linux-build-error.patch new file mode 100644 index 000000000..b3563a881 --- /dev/null +++ b/ports/metis/fix-linux-build-error.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e94f050..b9613a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,8 @@ + cmake_minimum_required(VERSION 2.8) + project(METIS) + +-set(GKLIB_PATH "GKlib" CACHE PATH "path to GKlib") ++set(GKLIB_PATH "${CMAKE_SOURCE_DIR}/GKlib" CACHE PATH "path to GKlib") ++ + set(SHARED FALSE CACHE BOOL "build a shared library") + + set(METIS_INSTALL TRUE) diff --git a/ports/metis/portfile.cmake b/ports/metis/portfile.cmake index 4f8d4520d..7a7f575a6 100644 --- a/ports/metis/portfile.cmake +++ b/ports/metis/portfile.cmake @@ -21,6 +21,7 @@ vcpkg_extract_source_archive_ex( fix-runtime-install-destination.patch fix-metis-vs14-math.patch fix-gklib-vs14-math.patch + fix-linux-build-error.patch ) vcpkg_configure_cmake( From 8ac43f19f337db8aafd8187b9b7968e0655264a7 Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Thu, 18 Jul 2019 07:00:43 +0800 Subject: [PATCH 0205/1066] [qt5-winextras, ecsutil, soundtouch] Fix build-depends (#7298) --- ports/ecsutil/CONTROL | 4 ++-- ports/qt5-winextras/CONTROL | 2 +- ports/soundtouch/CONTROL | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/ecsutil/CONTROL b/ports/ecsutil/CONTROL index 3d6136dda..f008311f2 100644 --- a/ports/ecsutil/CONTROL +++ b/ports/ecsutil/CONTROL @@ -1,4 +1,4 @@ Source: ecsutil -Version: 1.0.6.1 +Version: 1.0.6.1-1 Description: Native Windows SDK for accessing ECS via the S3 HTTP protocol. -Build-Depends: atlmfc +Build-Depends: atlmfc (windows) diff --git a/ports/qt5-winextras/CONTROL b/ports/qt5-winextras/CONTROL index 89173dcdc..cbb4a71c6 100644 --- a/ports/qt5-winextras/CONTROL +++ b/ports/qt5-winextras/CONTROL @@ -1,4 +1,4 @@ Source: qt5-winextras Version: 5.12.3-1 Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. -Build-Depends: qt5-modularscripts, qt5-base, atlmfc +Build-Depends: qt5-modularscripts, qt5-base, atlmfc (windows) diff --git a/ports/soundtouch/CONTROL b/ports/soundtouch/CONTROL index 2e358f55e..f14e579b3 100644 --- a/ports/soundtouch/CONTROL +++ b/ports/soundtouch/CONTROL @@ -1,5 +1,5 @@ Source: soundtouch -Version: 2.0.0-2 +Version: 2.0.0-3 Homepage: https://www.surina.net/soundtouch Description: SoundTouch is an open-source audio processing library for changing the Tempo, Pitch and Playback Rates of audio streams or audio files. -Build-Depends: atlmfc +Build-Depends: atlmfc (windows) From f18ffe996877a058da9e0208f92331c83517f6a0 Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Wed, 17 Jul 2019 16:04:05 -0700 Subject: [PATCH 0206/1066] Add type field --- toolsrc/include/vcpkg/binaryparagraph.h | 1 + toolsrc/src/vcpkg/binaryparagraph.cpp | 10 ++++++++-- toolsrc/src/vcpkg/sourceparagraph.cpp | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h index 3315151c6..fa49edaba 100644 --- a/toolsrc/include/vcpkg/binaryparagraph.h +++ b/toolsrc/include/vcpkg/binaryparagraph.h @@ -31,6 +31,7 @@ namespace vcpkg std::vector default_features; std::vector depends; std::string abi; + SourceParagraph::TYPE type; }; struct BinaryControlFile diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index 4b80debab..ad7790fe1 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -23,6 +23,7 @@ namespace vcpkg static const std::string MAINTAINER = "Maintainer"; static const std::string DEPENDS = "Depends"; static const std::string DEFAULTFEATURES = "Default-Features"; + static const std::string TYPE = "Type"; } BinaryParagraph::BinaryParagraph() = default; @@ -60,6 +61,9 @@ namespace vcpkg this->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES)); } + this->type = + SourceParagraph::type_from_string(parser.optional_field(Fields::TYPE)); + if (const auto err = parser.error_info(this->spec.to_string())) { System::print2(System::Color::error, "Error: while parsing the Binary Paragraph for ", this->spec, '\n'); @@ -72,14 +76,14 @@ namespace vcpkg } BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet, const std::string& abi_tag) - : version(spgh.version), description(spgh.description), maintainer(spgh.maintainer), abi(abi_tag) + : version(spgh.version), description(spgh.description), maintainer(spgh.maintainer), abi(abi_tag), type(spgh.type) { this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); this->depends = filter_dependencies(spgh.depends, triplet); } BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet) - : version(), description(fpgh.description), maintainer(), feature(fpgh.name) + : version(), description(fpgh.description), maintainer(), feature(fpgh.name), type(spgh.type) { this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); this->depends = filter_dependencies(fpgh.depends, triplet); @@ -119,5 +123,7 @@ namespace vcpkg if (!pgh.maintainer.empty()) out_str.append("Maintainer: ").append(pgh.maintainer).push_back('\n'); if (!pgh.abi.empty()) out_str.append("Abi: ").append(pgh.abi).push_back('\n'); if (!pgh.description.empty()) out_str.append("Description: ").append(pgh.description).push_back('\n'); + + out_str.append("Type: ").append(SourceParagraph::string_from_type(pgh.type)).push_back('\n'); } } diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 26a7ab118..6af93a99b 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -100,7 +100,7 @@ namespace vcpkg } } - static SourceParagraph::TYPE type_from_string(const std::string& in) + SourceParagraph::TYPE SourceParagraph::type_from_string(const std::string& in) { if (Strings::equals(in, "port") || Strings::equals(in, "")) { @@ -119,7 +119,7 @@ namespace vcpkg Checks::exit_fail(VCPKG_LINE_INFO); } - static std::string string_from_type(const SourceParagraph::TYPE& in) + std::string SourceParagraph::string_from_type(const SourceParagraph::TYPE& in) { switch (in) { @@ -145,7 +145,7 @@ namespace vcpkg parse_comma_list(parser.optional_field(SourceParagraphFields::BUILD_DEPENDS))); spgh->supports = parse_comma_list(parser.optional_field(SourceParagraphFields::SUPPORTS)); spgh->default_features = parse_comma_list(parser.optional_field(SourceParagraphFields::DEFAULTFEATURES)); - spgh->type = type_from_string(parser.optional_field(SourceParagraphFields::TYPE)); + spgh->type = SourceParagraph::type_from_string(parser.optional_field(SourceParagraphFields::TYPE)); auto err = parser.error_info(spgh->name); if (err) From 709e042134bcd4ae33fac6c19dccef8a8a590bfd Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Wed, 17 Jul 2019 16:24:26 -0700 Subject: [PATCH 0207/1066] [libsodium] Fix linux build error. (#7297) --- ports/libsodium/CMakeLists.txt | 10 +++++----- ports/libsodium/CONTROL | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/libsodium/CMakeLists.txt b/ports/libsodium/CMakeLists.txt index 62e4d1875..0cc4f417c 100644 --- a/ports/libsodium/CMakeLists.txt +++ b/ports/libsodium/CMakeLists.txt @@ -152,24 +152,24 @@ else () -Wbad-function-cast -Wcast-qual #-Wdiv-by-zero - -Wduplicated-branches - -Wduplicated-cond + #-Wduplicated-branches + #-Wduplicated-cond -Wfloat-equal -Wformat=2 -Wlogical-op -Wmaybe-uninitialized - -Wmisleading-indentation + #-Wmisleading-indentation -Wmissing-declarations -Wmissing-prototypes -Wnested-externs #-Wno-type-limits #-Wno-unknown-pragmas -Wnormalized=id - -Wnull-dereference + #-Wnull-dereference -Wold-style-declaration -Wpointer-arith -Wredundant-decls - -Wrestrict + #-Wrestrict #-Wsometimes-uninitialized -Wstrict-prototypes -Wswitch-enum diff --git a/ports/libsodium/CONTROL b/ports/libsodium/CONTROL index 333f08031..daf768c1b 100644 --- a/ports/libsodium/CONTROL +++ b/ports/libsodium/CONTROL @@ -1,4 +1,4 @@ Source: libsodium -Version: 1.0.18 +Version: 1.0.18-1 Description: A modern and easy-to-use crypto library Homepage: https://github.com/jedisct1/libsodium From 835d3de78bc28651afe7cfe949163e952674f54c Mon Sep 17 00:00:00 2001 From: DailyShana Date: Thu, 18 Jul 2019 07:26:18 +0800 Subject: [PATCH 0208/1066] add vcpkg-cmake-wrapper for irrlicht (#7296) --- ports/irrlicht/CONTROL | 2 +- ports/irrlicht/portfile.cmake | 3 +++ ports/irrlicht/vcpkg-cmake-wrapper.cmake | 11 +++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ports/irrlicht/vcpkg-cmake-wrapper.cmake diff --git a/ports/irrlicht/CONTROL b/ports/irrlicht/CONTROL index 59071e8dc..7cc3e4223 100644 --- a/ports/irrlicht/CONTROL +++ b/ports/irrlicht/CONTROL @@ -1,5 +1,5 @@ Source: irrlicht -Version: 1.8.4 +Version: 1.8.4-1 Description: Irrlicht lightning fast 3d engine Build-Depends: zlib, libpng, bzip2, libjpeg-turbo diff --git a/ports/irrlicht/portfile.cmake b/ports/irrlicht/portfile.cmake index 0f9f4691e..f4eaf5fc8 100644 --- a/ports/irrlicht/portfile.cmake +++ b/ports/irrlicht/portfile.cmake @@ -90,5 +90,8 @@ freely, subject to the following restrictions: vcpkg_copy_pdbs() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/irrlicht) +endif() # Post-build test for cmake libraries vcpkg_test_cmake(PACKAGE_NAME irrlicht) diff --git a/ports/irrlicht/vcpkg-cmake-wrapper.cmake b/ports/irrlicht/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..4cfdb8a0d --- /dev/null +++ b/ports/irrlicht/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS}) +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) +find_package(JPEG REQUIRED) +find_package(BZip2 REQUIRED) +if(TARGET Irrlicht::Irrlicht) + set_property(TARGET Irrlicht::Irrlicht APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB PNG::PNG JPEG::JPEG BZip2::BZip2) +endif() +if(IRRLICHT_LIBRARIES) + list(APPEND IRRLICHT_LIBRARIES ${ZLIB_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${BZIP2_LIBRARIES}) +endif() From f599f19bad8fd97b60f41063537be2e4ecef3ca7 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Wed, 17 Jul 2019 18:58:23 -0700 Subject: [PATCH 0209/1066] tests.files.cpp:create_directory_tree -- change magic numbers to names --- toolsrc/src/tests.files.cpp | 79 ++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/toolsrc/src/tests.files.cpp b/toolsrc/src/tests.files.cpp index 56b0ceac6..e60662fd9 100644 --- a/toolsrc/src/tests.files.cpp +++ b/toolsrc/src/tests.files.cpp @@ -93,45 +93,31 @@ namespace UnitTest1 std::random_device rd; constexpr std::uint64_t max_depth = 5; constexpr std::uint64_t width = 5; - const auto type = depth < max_depth ? uid{0, 9}(urbg) : uid{7, 9}(urbg); - // 0 <= type < 7 : directory - // 7 = type : regular - // 8 = type : regular symlink (regular file if !ALLOW_SYMLINKS) - // 9 = type : directory symlink (^^) + // we want ~70% of our "files" to be directories, and then a third + // each of the remaining ~30% to be regular files, directory symlinks, + // and regular symlinks + constexpr std::uint64_t directory_min_tag = 0; + constexpr std::uint64_t directory_max_tag = 6; + constexpr std::uint64_t regular_file_tag = 7; + constexpr std::uint64_t regular_symlink_tag = 8; + constexpr std::uint64_t directory_symlink_tag = 9; + + // if we're at the max depth, we only want to build non-directories + std::uint64_t file_type; + if (depth < max_depth) { + file_type = uid{directory_min_tag, regular_symlink_tag}(urbg); + } else { + file_type = uid{regular_file_tag, regular_symlink_tag}(urbg); + } + + if (!ALLOW_SYMLINKS && file_type > regular_file_tag) { + file_type = regular_file_tag; + } std::error_code ec; - if (type >= 7) + if (type <= directory_max_tag) { - // I don't want to move urbg forward conditionally - if (type == 7 || !ALLOW_SYMLINKS) - { - // regular file - fs.write_contents(base, "", ec); - } - else if (type == 8) - { - // regular symlink - fs.write_contents(base, "", ec); - Assert::IsFalse(bool(ec)); - const std::filesystem::path basep = base.native(); - auto basep_link = basep; - basep_link.replace_filename(basep.filename().native() + L"-link"); - std::filesystem::create_symlink(basep, basep_link, ec); - } - else - { - // directory symlink - std::filesystem::path basep = base.native(); - std::filesystem::create_directory_symlink(basep / "..", basep, ec); - } - - Assert::IsFalse(bool(ec)); - - } - else - { - // directory fs.create_directory(base, ec); Assert::IsFalse(bool(ec)); @@ -139,9 +125,30 @@ namespace UnitTest1 { create_directory_tree(urbg, fs, depth + 1, base / get_random_filename(urbg)); } - + } + else if (type == regular_file_tag) + { + // regular file + fs.write_contents(base, "", ec); + } + else if (type == regular_symlink_tag) + { + // regular symlink + fs.write_contents(base, "", ec); + Assert::IsFalse(bool(ec)); + const std::filesystem::path basep = base.native(); + auto basep_link = basep; + basep_link.replace_filename(basep.filename().native() + L"-link"); + std::filesystem::create_symlink(basep, basep_link, ec); + } + else // type == directory_symlink_tag + { + // directory symlink + std::filesystem::path basep = base.native(); + std::filesystem::create_directory_symlink(basep / "..", basep, ec); } + Assert::IsFalse(bool(ec)); } }; } From c1b9b66e1a3b40e5587af2e294104609bd26baf2 Mon Sep 17 00:00:00 2001 From: John Zhu Date: Wed, 17 Jul 2019 21:54:24 -0700 Subject: [PATCH 0210/1066] Make json-spirit pass post-validation (#7310) --- ports/json-spirit/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/json-spirit/portfile.cmake b/ports/json-spirit/portfile.cmake index 3b5e1d316..9d2f24073 100644 --- a/ports/json-spirit/portfile.cmake +++ b/ports/json-spirit/portfile.cmake @@ -21,4 +21,7 @@ vcpkg_install_cmake() # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/json-spirit RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() vcpkg_copy_pdbs() From 45e53e13f6ef020a05945b3466f043ac3b3799be Mon Sep 17 00:00:00 2001 From: Duncan Horn <40036384+dunhor@users.noreply.github.com> Date: Wed, 17 Jul 2019 23:31:17 -0700 Subject: [PATCH 0211/1066] [wil] match commit used for NuGet package 1.0.190716.2 (#7285) --- ports/wil/CONTROL | 2 +- ports/wil/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/wil/CONTROL b/ports/wil/CONTROL index 27f4a6aeb..f58d9f014 100644 --- a/ports/wil/CONTROL +++ b/ports/wil/CONTROL @@ -1,3 +1,3 @@ Source: wil -Version: 2019-07-09 +Version: 2019-07-16 Description: The Windows Implementation Libraries (WIL) is a header-only C++ library created to make life easier for developers on Windows through readable type-safe C++ interfaces for common Windows coding patterns. \ No newline at end of file diff --git a/ports/wil/portfile.cmake b/ports/wil/portfile.cmake index 3a9dfe6b6..d9e50a16c 100644 --- a/ports/wil/portfile.cmake +++ b/ports/wil/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/wil - REF 8bfcc43efc91ec3a4d8dfa8fd74f4025bded363f - SHA512 301bf129e064cf5de4b0d19cf5e35e195c68ecb8800df0334729083929b097f7d5d425437f7214aec1eb29f694c5613eb26332bc5a72fbaff37d9057f61c7692 + REF 7a6f0679be9cd625f54a21bb0ce06c39958b13a5 + SHA512 155b8ed9f3622e7d802b41d6086f2b5984e52a3c21d068157d5d428a2efe24f1960186412c61719bf32a4c12c313930defa590d07d7b05a6376fe0ae68a85b2e HEAD_REF master ) From d7aa6f17b34d1e823485c5a5db3463debe30538c Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Thu, 18 Jul 2019 15:07:09 +0800 Subject: [PATCH 0212/1066] [libyaml] Fix build error (#7277) --- ports/libyaml/CONTROL | 2 +- ports/libyaml/fix-POSIX_name.patch | 13 +++++++++++++ ports/libyaml/portfile.cmake | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ports/libyaml/fix-POSIX_name.patch diff --git a/ports/libyaml/CONTROL b/ports/libyaml/CONTROL index df8b2b1fe..e38c0f9d0 100644 --- a/ports/libyaml/CONTROL +++ b/ports/libyaml/CONTROL @@ -1,3 +1,3 @@ Source: libyaml -Version: 0.2.2 +Version: 0.2.2-1 Description: A C library for parsing and emitting YAML. diff --git a/ports/libyaml/fix-POSIX_name.patch b/ports/libyaml/fix-POSIX_name.patch new file mode 100644 index 000000000..0aa6d211c --- /dev/null +++ b/ports/libyaml/fix-POSIX_name.patch @@ -0,0 +1,13 @@ +diff --git a/src/api.c b/src/api.c +index e793b08..6f16fc5 100644 +--- a/src/api.c ++++ b/src/api.c +@@ -63,7 +63,7 @@ yaml_strdup(const yaml_char_t *str) + if (!str) + return NULL; + +- return (yaml_char_t *)strdup((char *)str); ++ return (yaml_char_t *)_strdup((char *)str); + } + + /* diff --git a/ports/libyaml/portfile.cmake b/ports/libyaml/portfile.cmake index 210fc2d7f..6c6a6b97b 100644 --- a/ports/libyaml/portfile.cmake +++ b/ports/libyaml/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_github( REF 0.2.2 SHA512 455494591014a97c4371a1f372ad09f0d6e487e4f1d3419c98e9cd2f16d43a0cf9a0787d7250bebee8b8d400df4626f5acd81e90139e54fa574a66ec84964c06 HEAD_REF master + PATCHES + fix-POSIX_name.patch ) vcpkg_configure_cmake( From 2467136b314f33b61579637a6a6d1390d2f95381 Mon Sep 17 00:00:00 2001 From: Phoebe <925731795@qq.com> Date: Thu, 18 Jul 2019 15:09:07 +0800 Subject: [PATCH 0213/1066] [eastl] upgrade to 3.14 (#7276) --- ports/eastl/CONTROL | 2 +- ports/eastl/fix_cmake_install.patch | 19 +++++++++++++++++++ ports/eastl/fix_uwp.patch | 13 +++++++++++++ ports/eastl/portfile.cmake | 26 ++++++++++++++++++++++---- 4 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 ports/eastl/fix_cmake_install.patch create mode 100644 ports/eastl/fix_uwp.patch diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL index f7f9c89a3..5e0c40bf7 100644 --- a/ports/eastl/CONTROL +++ b/ports/eastl/CONTROL @@ -1,5 +1,5 @@ Source: eastl -Version: 3.13.05-1 +Version: 3.14.00 Homepage: https://github.com/electronicarts/EASTL Description: Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations. diff --git a/ports/eastl/fix_cmake_install.patch b/ports/eastl/fix_cmake_install.patch new file mode 100644 index 000000000..b67e26f12 --- /dev/null +++ b/ports/eastl/fix_cmake_install.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b8171cd..c771e77 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,7 @@ add_definitions(-DEASTL_OPENSOURCE=1) + #------------------------------------------------------------------------------------------- + # Include dirs + #------------------------------------------------------------------------------------------- ++include_directories(APPEND test/packages) + target_include_directories(EASTL PUBLIC include) + + #------------------------------------------------------------------------------------------- +@@ -48,3 +49,6 @@ target_include_directories(EASTL PUBLIC include) + #------------------------------------------------------------------------------------------- + target_link_libraries(EASTL EABase) + ++install(TARGETS EASTL DESTINATION lib) ++install(DIRECTORY include/EASTL DESTINATION include) ++install(DIRECTORY test/packages/EABase DESTINATION include) diff --git a/ports/eastl/fix_uwp.patch b/ports/eastl/fix_uwp.patch new file mode 100644 index 000000000..4fd144a13 --- /dev/null +++ b/ports/eastl/fix_uwp.patch @@ -0,0 +1,13 @@ +diff --git a/include/Common/EABase/config/eaplatform.h b/include/Common/EABase/config/eaplatform.h +index 8b16146..54079ab 100644 +--- a/include/Common/EABase/config/eaplatform.h ++++ b/include/Common/EABase/config/eaplatform.h +@@ -125,7 +125,7 @@ + #endif + + +-#elif defined(EA_PLATFORM_XBOXONE) || defined(_DURANGO) || defined(EA_PLATFORM_CAPILANO) || (defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || WINAPI_FAMILY == WINAPI_FAMILY_TV_TITLE)) ++#elif defined(EA_PLATFORM_XBOXONE) || defined(_DURANGO) || defined(EA_PLATFORM_CAPILANO) || (defined(WINAPI_FAMILY) && WINAPI_FAMILY && (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || WINAPI_FAMILY == WINAPI_FAMILY_TV_TITLE)) + // XBox One + // Durango was Microsoft's code-name for the platform, which is now obsolete. + // Microsoft uses _DURANGO instead of some variation of _XBOX, though it's not natively defined by the compiler. diff --git a/ports/eastl/portfile.cmake b/ports/eastl/portfile.cmake index 13cf14a21..e1c1a0d44 100644 --- a/ports/eastl/portfile.cmake +++ b/ports/eastl/portfile.cmake @@ -2,19 +2,37 @@ include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO electronicarts/EABase + REF 6f27a2f7aa21f2d71ae8c6bc1d889d0119677a56 + SHA512 9176fb2d508cf023c3c16c61a511196a2f6af36172145544bba44062a00ca7591e54e4fc16ac13562ef0e2d629b626f398bff3669b4cdb7ba0068548d6a53883 + HEAD_REF master + PATCHES + fix_uwp.patch +) + +set(EABASE_PATH ${SOURCE_PATH}) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO electronicarts/EASTL - REF 3.13.05 - SHA512 2364554339203c972f10d58ebe8f14fb221a40451f4cd2c3c5acd6891e8580c1a0a5d4ba592c91349d3feca50d9880648bb37358820a1c9552dde3f7af400a82 + REF dcd2b838d52de13691999aff8faeaa8f284928ac + SHA512 9756ee47a30447f17ceb45fb5143d6e80905636cf709c171059a83f74094fb25391c896de0ea5e063cdad4e7334c5f963c75b1c34ad539fd24175983a2054159 HEAD_REF master - PATCHES fixchar8_t.patch # can be removed after electronicarts/EASTL#274 is resolved + PATCHES + fixchar8_t.patch # can be removed after electronicarts/EASTL#274 is resolved + fix_cmake_install.patch ) +file(COPY ${EABASE_PATH}/include/Common/EABase/ DESTINATION ${SOURCE_PATH}/test/packages/EABase) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DEASTL_BUILD_TESTS=OFF + -DEASTL_BUILD_BENCHMARK=OFF ) vcpkg_install_cmake() From 2865da8f4a6d911617cdd9b147816c4cd02bbf7e Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 18 Jul 2019 00:11:23 -0700 Subject: [PATCH 0214/1066] [gtest]Re-fix port_main/port_maind libraries path and add gmock cmake files. --- ports/gtest/CONTROL | 2 +- ports/gtest/fix-gmock-cmake.patch | 30 +++++++++++++ ports/gtest/fix-main-lib-path.patch | 68 +++++++++++++++++++++++++++++ ports/gtest/portfile.cmake | 35 ++++----------- ports/gtest/usage | 5 +++ 5 files changed, 113 insertions(+), 27 deletions(-) create mode 100644 ports/gtest/fix-gmock-cmake.patch create mode 100644 ports/gtest/fix-main-lib-path.patch diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 7c91eb253..a03fc9ec9 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,4 +1,4 @@ Source: gtest -Version: 2019-01-04-2 +Version: 2019-01-04-3 Homepage: https://github.com/google/googletest Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/fix-gmock-cmake.patch b/ports/gtest/fix-gmock-cmake.patch new file mode 100644 index 000000000..6bb963a2b --- /dev/null +++ b/ports/gtest/fix-gmock-cmake.patch @@ -0,0 +1,30 @@ +diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt +index 9d135ff..0be8a22 100644 +--- a/googlemock/CMakeLists.txt ++++ b/googlemock/CMakeLists.txt +@@ -66,6 +66,25 @@ endif() + # call it again here. + config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake + ++# Create the CMake package file descriptors. ++if (INSTALL_GTEST) ++ include(CMakePackageConfigHelpers) ++ set(cmake_package_name GMock) ++ set(targets_export_name ${cmake_package_name}Targets CACHE INTERNAL "") ++ set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated" CACHE INTERNAL "") ++ set(cmake_files_install_dir "share/${cmake_package_name}") ++ set(version_file "${generated_dir}/${cmake_package_name}ConfigVersion.cmake") ++ write_basic_package_version_file(${version_file} COMPATIBILITY AnyNewerVersion) ++ install(EXPORT ${targets_export_name} ++ NAMESPACE ${cmake_package_name}:: ++ DESTINATION ${cmake_files_install_dir}) ++ set(config_file "${generated_dir}/${cmake_package_name}Config.cmake") ++ configure_package_config_file("${gtest_SOURCE_DIR}/cmake/Config.cmake.in" ++ "${config_file}" INSTALL_DESTINATION ${cmake_files_install_dir}) ++ install(FILES ${version_file} ${config_file} ++ DESTINATION ${cmake_files_install_dir}) ++endif() ++ + # Adds Google Mock's and Google Test's header directories to the search path. + set(gmock_build_include_dirs + "${gmock_SOURCE_DIR}/include" diff --git a/ports/gtest/fix-main-lib-path.patch b/ports/gtest/fix-main-lib-path.patch new file mode 100644 index 000000000..e07806eec --- /dev/null +++ b/ports/gtest/fix-main-lib-path.patch @@ -0,0 +1,68 @@ +diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt +index 3e72d75..9d135ff 100644 +--- a/googlemock/CMakeLists.txt ++++ b/googlemock/CMakeLists.txt +@@ -115,7 +115,8 @@ endif() + ######################################################################## + # + # Install rules +-install_project(gmock gmock_main) ++install_project(gmock) ++install_project(gmock_main) + + ######################################################################## + # +diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt +index e33718b..a049c2c 100644 +--- a/googletest/CMakeLists.txt ++++ b/googletest/CMakeLists.txt +@@ -136,7 +136,8 @@ target_link_libraries(gtest_main PUBLIC gtest) + ######################################################################## + # + # Install rules +-install_project(gtest gtest_main) ++install_project(gtest) ++install_project(gtest_main) + + ######################################################################## + # +diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake +index 69defc8..cf7295a 100644 +--- a/googletest/cmake/internal_utils.cmake ++++ b/googletest/cmake/internal_utils.cmake +@@ -317,11 +317,15 @@ function(install_project) + install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + # Install the project targets. ++ set (LIB_INSTALL_DST ${CMAKE_INSTALL_LIBDIR}) ++ if (${ARGN} MATCHES "_main") ++ set (LIB_INSTALL_DST ${CMAKE_INSTALL_LIBDIR}/manual-link) ++ endif() + install(TARGETS ${ARGN} + EXPORT ${targets_export_name} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++ ARCHIVE DESTINATION "${LIB_INSTALL_DST}" ++ LIBRARY DESTINATION "${LIB_INSTALL_DST}") + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + # Install PDBs + foreach(t ${ARGN}) +@@ -330,7 +334,7 @@ function(install_project) + get_target_property(t_pdb_output_directory ${t} PDB_OUTPUT_DIRECTORY) + install(FILES + "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<$:${t_pdb_name_debug}>$<$>:${t_pdb_name}>.pdb" +- DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ DESTINATION ${LIB_INSTALL_DST} + OPTIONAL) + endforeach() + endif() +@@ -340,7 +344,7 @@ function(install_project) + configure_file("${PROJECT_SOURCE_DIR}/cmake/${t}.pc.in" + "${configured_pc}" @ONLY) + install(FILES "${configured_pc}" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ DESTINATION "${LIB_INSTALL_DST}/pkgconfig") + endforeach() + endif() + endfunction() diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 892221925..be1cce4ed 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -11,7 +11,9 @@ vcpkg_from_github( SHA512 1642a9cf1923d00c52c346399941517787431dad3e6d3a5da07bc02243a231a95e30e0a9568ffd29bb9b9757f15c1c47d2d811c2bedb301f2d27cf912be0a534 HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-z7-override.patch + 0002-Fix-z7-override.patch + fix-main-lib-path.patch + fix-gmock-cmake.patch ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT) @@ -28,6 +30,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GTest) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/GMock) file( INSTALL @@ -49,31 +52,11 @@ file( file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/googletest/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtest RENAME copyright) -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) - - file(READ ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-debug.cmake DEBUG_CONFIG) - string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/gtest_maind.lib" - "\${_IMPORT_PREFIX}/debug/lib/manual-link/gtest_maind.lib" DEBUG_CONFIG "${DEBUG_CONFIG}") - string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/gmock_maind.lib" - "\${_IMPORT_PREFIX}/debug/lib/manual-link/gmock_maind.lib" DEBUG_CONFIG "${DEBUG_CONFIG}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-debug.cmake "${DEBUG_CONFIG}") -endif() - -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest_main.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest_main.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) - - file(READ ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-release.cmake RELEASE_CONFIG) - string(REPLACE "\${_IMPORT_PREFIX}/lib/gtest_main.lib" - "\${_IMPORT_PREFIX}/lib/manual-link/gtest_main.lib" RELEASE_CONFIG "${RELEASE_CONFIG}") - string(REPLACE "\${_IMPORT_PREFIX}/lib/gmock_main.lib" - "\${_IMPORT_PREFIX}/lib/manual-link/gmock_main.lib" RELEASE_CONFIG "${RELEASE_CONFIG}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-release.cmake "${RELEASE_CONFIG}") -endif() +# Install gmock cmake files. +file(GLOB GMOCK_CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/gtest/GMock*.cmake) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/gmock) +file(COPY ${GMOCK_CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/gmock) +file(REMOVE ${GMOCK_CMAKE_FILES}) vcpkg_copy_pdbs() diff --git a/ports/gtest/usage b/ports/gtest/usage index d40782e0e..9ba65996e 100644 --- a/ports/gtest/usage +++ b/ports/gtest/usage @@ -1,6 +1,11 @@ The package gtest is compatible with built-in CMake targets: enable_testing() + find_package(GTest MODULE REQUIRED) target_link_libraries(main PRIVATE GTest::GTest GTest::Main) + + find_package(GMock CONFIG REQUIRED) + target_link_libraries(main PRIVATE GMock::gmock GMock::gmock_main) + add_test(AllTestsInMain main) From 54b39598e1880f0cab60a9fcc448745711d2d2e9 Mon Sep 17 00:00:00 2001 From: denis-gz Date: Thu, 18 Jul 2019 10:14:48 +0300 Subject: [PATCH 0215/1066] [boost-asio] fix on Windows (#7267) --- ports/boost-asio/CONTROL | 2 +- ports/boost-asio/portfile.cmake | 1 + ports/boost-asio/windows_alloca_header.patch | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ports/boost-asio/windows_alloca_header.patch diff --git a/ports/boost-asio/CONTROL b/ports/boost-asio/CONTROL index 3d93e7c07..123d9f854 100644 --- a/ports/boost-asio/CONTROL +++ b/ports/boost-asio/CONTROL @@ -1,6 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-asio -Version: 1.70.0-1 +Version: 1.70.0-2 Build-Depends: boost-array, boost-assert, boost-bind, boost-chrono, boost-compatibility, boost-config, boost-coroutine (!uwp), boost-date-time, boost-detail, boost-function, boost-integer, boost-regex, boost-smart-ptr, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, openssl Homepage: https://github.com/boostorg/asio Description: Boost asio module diff --git a/ports/boost-asio/portfile.cmake b/ports/boost-asio/portfile.cmake index dbb2b239c..f24dd1aed 100644 --- a/ports/boost-asio/portfile.cmake +++ b/ports/boost-asio/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( REF boost-1.70.0 SHA512 394c7e557d97bbb8b98453846a098c8ab7f4eb92d752bd4089d2020e0d5060cff1e53f5e50b2f8910e64b66c934b2bde4a7137bd1a6050e8b1279c2e4576b2e5 HEAD_REF master + PATCHES windows_alloca_header.patch ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/boost-asio/windows_alloca_header.patch b/ports/boost-asio/windows_alloca_header.patch new file mode 100644 index 000000000..609e1ebfe --- /dev/null +++ b/ports/boost-asio/windows_alloca_header.patch @@ -0,0 +1,15 @@ +diff --git a/include/boost/asio/detail/impl/socket_ops.ipp b/include/boost/asio/detail/impl/socket_ops.ipp +index 7d7c31f..d2cd468 100644 +--- a/include/boost/asio/detail/impl/socket_ops.ipp ++++ b/include/boost/asio/detail/impl/socket_ops.ipp +@@ -27,6 +27,10 @@ + #include + #include + ++#if defined(BOOST_ASIO_WINDOWS) ++#include ++#endif ++ + #if defined(BOOST_ASIO_WINDOWS_RUNTIME) + # include + # include From 584da54a0f56943286efef6b25ccc8582e3fe8d4 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Thu, 18 Jul 2019 15:15:56 +0800 Subject: [PATCH 0216/1066] [nameof] Add new port (#7250) --- ports/nameof/CONTROL | 4 ++++ ports/nameof/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ports/nameof/CONTROL create mode 100644 ports/nameof/portfile.cmake diff --git a/ports/nameof/CONTROL b/ports/nameof/CONTROL new file mode 100644 index 000000000..35df482a0 --- /dev/null +++ b/ports/nameof/CONTROL @@ -0,0 +1,4 @@ +Source: nameof +Version: 2019-07-13 +Description: Nameof operator for modern C++ +Homepage: https://github.com/Neargye/nameof diff --git a/ports/nameof/portfile.cmake b/ports/nameof/portfile.cmake new file mode 100644 index 000000000..21dcf1b97 --- /dev/null +++ b/ports/nameof/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Neargye/nameof + REF 9d335128265e443acf4e12ed40327e166cd8e3da + SHA512 3d4af0069fc3dbf9a4a79ae1bea282cafb69606936a66bf43b5a13ae2f0cbc88e98dbb02a12e9c211afd73d9807b36a6f09635a1922ce5faaeb2a148672a0b13 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNAMEOF_OPT_BUILD_EXAMPLES=OFF + -DNAMEOF_OPT_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) From 5a41488a51d93e4c8cfc15ac42c14f4b02b64741 Mon Sep 17 00:00:00 2001 From: Kevin Lu <6320810+kevinlul@users.noreply.github.com> Date: Thu, 18 Jul 2019 03:19:08 -0400 Subject: [PATCH 0217/1066] [curl] Update to 7.65.2 (#7093) --- ports/curl/CONTROL | 2 +- ports/curl/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 0b2028369..72d5d3e66 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.65.0-3 +Version: 7.65.2-1 Build-Depends: zlib Homepage: https://github.com/curl/curl Description: A library for transferring data with URLs diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 5c4f94fdf..49d4d12e6 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF curl-7_65_0 - SHA512 436b6b42654c1db2b3f69df410a7f28401a50faf18e74f328a93585c147541e697664b0e9e7df03239fd76c797c1bb4f435f4c668a6b0ad28bdd67e17f786491 + REF curl-7_65_2 + SHA512 8e06377a6d8837a4c2cd96f978f0ac848b9472500fd25983bb1f9e5f52d9d6f7ff0c71d443587a979cf80fd19412bb64b9362b774cf91e02479fdfad7e085b16 HEAD_REF master PATCHES 0001_cmake.patch From bb3a9ddb6ec917f549e991f6bd344ce77054bb67 Mon Sep 17 00:00:00 2001 From: Curtis J Bezault Date: Thu, 18 Jul 2019 09:02:21 -0700 Subject: [PATCH 0218/1066] [vcpkg] Environment Variable Passthrough (#7290) * use additional env param * remove partials * remove change to linux triplet * Fix some issues that vicroms pointed out * whitespace change --- scripts/get_triplet_environment.cmake | 1 + toolsrc/include/vcpkg/build.h | 24 ++ toolsrc/include/vcpkg/sourceparagraph.h | 2 + toolsrc/src/vcpkg/build.cpp | 423 +++++++++++++----------- toolsrc/src/vcpkg/sourceparagraph.cpp | 22 ++ 5 files changed, 280 insertions(+), 192 deletions(-) diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake index bc79b16ce..24ff40905 100644 --- a/scripts/get_triplet_environment.cmake +++ b/scripts/get_triplet_environment.cmake @@ -9,3 +9,4 @@ message("VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}") message("VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}") message("VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") message("VCPKG_BUILD_TYPE=${VCPKG_BUILD_TYPE}") +message("VCPKG_ENV_PASSTHROUGH=${VCPKG_ENV_PASSTHROUGH}") diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 04cd7cf87..e26597376 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -117,6 +117,29 @@ namespace vcpkg::Build std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); std::string create_user_troubleshooting_message(const PackageSpec& spec); + enum class VcpkgTripletVar + { + TARGET_ARCHITECTURE = 0, + CMAKE_SYSTEM_NAME, + CMAKE_SYSTEM_VERSION, + PLATFORM_TOOLSET, + VISUAL_STUDIO_PATH, + CHAINLOAD_TOOLCHAIN_FILE, + BUILD_TYPE, + ENV_PASSTHROUGH, + }; + + const std::unordered_map VCPKG_OPTIONS = { + {"VCPKG_TARGET_ARCHITECTURE", VcpkgTripletVar::TARGET_ARCHITECTURE}, + {"VCPKG_CMAKE_SYSTEM_NAME", VcpkgTripletVar::CMAKE_SYSTEM_NAME}, + {"VCPKG_CMAKE_SYSTEM_VERSION", VcpkgTripletVar::CMAKE_SYSTEM_VERSION}, + {"VCPKG_PLATFORM_TOOLSET", VcpkgTripletVar::PLATFORM_TOOLSET}, + {"VCPKG_VISUAL_STUDIO_PATH", VcpkgTripletVar::VISUAL_STUDIO_PATH}, + {"VCPKG_CHAINLOAD_TOOLCHAIN_FILE", VcpkgTripletVar::CHAINLOAD_TOOLCHAIN_FILE}, + {"VCPKG_BUILD_TYPE", VcpkgTripletVar::BUILD_TYPE}, + {"VCPKG_ENV_PASSTHROUGH", VcpkgTripletVar::ENV_PASSTHROUGH}, + }; + /// /// Settings from the triplet file which impact the build environment and post-build checks /// @@ -135,6 +158,7 @@ namespace vcpkg::Build Optional visual_studio_path; Optional external_toolchain_file; Optional build_type; + std::vector passthrough_env_vars; }; std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index 6232a3fd2..9fbd83475 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -23,6 +23,8 @@ namespace vcpkg std::vector filter_dependencies(const std::vector& deps, const Triplet& t); std::vector filter_dependencies_to_specs(const std::vector& deps, const Triplet& t); + std::vector filter_dependencies_to_features(const std::vector& deps, + const Triplet& t); // zlib[uwp] becomes Dependency{"zlib", "uwp"} std::vector expand_qualified_dependencies(const std::vector& depends); diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 68df1f965..2f58a3341 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -32,24 +32,16 @@ namespace vcpkg::Build::Command using Dependencies::InstallPlanAction; using Dependencies::InstallPlanType; - static constexpr StringLiteral OPTION_CHECKS_ONLY = "--checks-only"; - void perform_and_exit_ex(const FullPackageSpec& full_spec, const SourceControlFileLocation& scfl, const ParsedArguments& options, const VcpkgPaths& paths) { + vcpkg::Util::unused(options); + + const StatusParagraphs status_db = database_load_check(paths); const PackageSpec& spec = full_spec.package_spec; - const auto& scf = *scfl.source_control_file; - if (Util::Sets::contains(options.switches, OPTION_CHECKS_ONLY)) - { - const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, spec.triplet()); - const auto build_info = Build::read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec)); - const size_t error_count = - PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info, scfl.source_location); - Checks::check_exit(VCPKG_LINE_INFO, error_count == 0); - Checks::exit_success(VCPKG_LINE_INFO); - } + const SourceControlFile& scf = *scfl.source_control_file; Checks::check_exit(VCPKG_LINE_INFO, spec.name() == scf.core_paragraph->name, @@ -57,7 +49,6 @@ namespace vcpkg::Build::Command scf.core_paragraph->name, spec.name()); - const StatusParagraphs status_db = database_load_check(paths); const Build::BuildPackageOptions build_package_options{ Build::UseHeadVersion::NO, Build::AllowDownloads::YES, @@ -104,15 +95,11 @@ namespace vcpkg::Build::Command Checks::exit_success(VCPKG_LINE_INFO); } - static constexpr std::array BUILD_SWITCHES = {{ - {OPTION_CHECKS_ONLY, "Only run checks, do not rebuild package"}, - }}; - const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("build zlib:x64-windows"), 1, 1, - {BUILD_SWITCHES, {}}, + {{}, {}}, nullptr, }; @@ -230,6 +217,23 @@ namespace vcpkg::Build })); } + std::unordered_map make_env_passthrough(const PreBuildInfo& pre_build_info) + { + std::unordered_map env; + + for (auto&& env_var : pre_build_info.passthrough_env_vars) + { + auto env_val = System::get_environment_variable(env_var); + + if (env_val) + { + env[env_var] = env_val.value_or_exit(VCPKG_LINE_INFO); + } + } + + return env; + } + std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) { if (pre_build_info.external_toolchain_file.has_value()) return ""; @@ -274,7 +278,7 @@ namespace vcpkg::Build return bcf; } - static void write_binary_control_file(const VcpkgPaths& paths, BinaryControlFile bcf) + static void write_binary_control_file(const VcpkgPaths& paths, const BinaryControlFile& bcf) { std::string start = Strings::serialize(bcf.core_paragraph); for (auto&& feature : bcf.features) @@ -285,23 +289,43 @@ namespace vcpkg::Build paths.get_filesystem().write_contents(binary_control_file, start, VCPKG_LINE_INFO); } + static std::vector get_dependencies(const SourceControlFile& scf, + const std::set& feature_list, + const Triplet& triplet) + { + return Util::fmap_flatten( + feature_list, + [&](std::string const& feature) -> std::vector { + if (feature == "core") + { + return filter_dependencies_to_features(scf.core_paragraph->depends, triplet); + } + + auto maybe_feature = scf.find_feature(feature); + Checks::check_exit(VCPKG_LINE_INFO, maybe_feature.has_value()); + + return filter_dependencies_to_features(maybe_feature.get()->depends, triplet); + }); + } + + static std::vector get_dependency_names(const SourceControlFile& scf, + const std::set& feature_list, + const Triplet& triplet) + { + return Util::fmap(get_dependencies(scf, feature_list, triplet), + [&](const Features& feat) { + return feat.name; + } + ); + } + static std::vector compute_required_feature_specs(const BuildPackageConfig& config, const StatusParagraphs& status_db) { const Triplet& triplet = config.triplet; const std::vector dep_strings = - Util::fmap_flatten(config.feature_list, [&](std::string const& feature) -> std::vector { - if (feature == "core") - { - return filter_dependencies(config.scf.core_paragraph->depends, triplet); - } - - auto maybe_feature = config.scf.find_feature(feature); - Checks::check_exit(VCPKG_LINE_INFO, maybe_feature.has_value()); - - return filter_dependencies(maybe_feature.get()->depends, triplet); - }); + get_dependency_names(config.scf, config.feature_list, triplet); auto dep_fspecs = FeatureSpec::from_strings_and_triplet(dep_strings, triplet); Util::sort_unique_erase(dep_fspecs); @@ -353,6 +377,128 @@ namespace vcpkg::Build return concurrency; } + static std::vector get_cmake_vars(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const Triplet& triplet, + const Toolset& toolset) + { +#if !defined(_WIN32) + // TODO: remove when vcpkg.exe is in charge for acquiring tools. Change introduced in vcpkg v0.0.107. + // bootstrap should have already downloaded ninja, but making sure it is present in case it was deleted. + vcpkg::Util::unused(paths.get_tool_exe(Tools::NINJA)); +#endif + + const fs::path& git_exe_path = paths.get_tool_exe(Tools::GIT); + + std::string all_features; + for (auto& feature : config.scf.feature_paragraphs) + { + all_features.append(feature->name + ";"); + } + + std::vector variables{ + {"CMD", "BUILD"}, + {"PORT", config.scf.core_paragraph->name}, + {"CURRENT_PORT_DIR", config.port_dir}, + {"TARGET_TRIPLET", triplet.canonical_name()}, + {"TARGET_TRIPLET_FILE", paths.get_triplet_file_path(triplet).u8string()}, + {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, + {"VCPKG_USE_HEAD_VERSION", Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"DOWNLOADS", paths.downloads}, + {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + {"_VCPKG_DOWNLOAD_TOOL", to_string(config.build_package_options.download_tool)}, + {"FEATURES", Strings::join(";", config.feature_list)}, + {"ALL_FEATURES", all_features}, + {"VCPKG_CONCURRENCY", std::to_string(get_concurrency())}, + }; + + if (!System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) + { + variables.push_back({"GIT", git_exe_path}); + } + + return variables; + } + + static std::string make_build_cmd(const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const BuildPackageConfig& config, + const Triplet& triplet) + { + const Toolset& toolset = paths.get_toolset(pre_build_info); + const fs::path& cmake_exe_path = paths.get_tool_exe(Tools::CMAKE); + std::vector variables = + get_cmake_vars(paths, config, triplet, toolset); + + const std::string cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, paths.ports_cmake, variables); + + std::string command = make_build_env_cmd(pre_build_info, toolset); + if (!command.empty()) + { +#ifdef _WIN32 + command.append(" & "); +#else + command.append(" && "); +#endif + } + + command.append(cmd_launch_cmake); + + return command; + } + + static std::string get_triplet_abi(const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const Triplet& triplet) + { + static std::map s_hash_cache; + + const fs::path triplet_file_path = paths.get_triplet_file_path(triplet); + const auto& fs = paths.get_filesystem(); + + std::string hash; + + auto it_hash = s_hash_cache.find(triplet_file_path); + if (it_hash != s_hash_cache.end()) + { + hash = it_hash->second; + } + else + { + hash = Hash::get_file_hash(fs, triplet_file_path, "SHA1"); + + if (auto p = pre_build_info.external_toolchain_file.get()) + { + hash += "-"; + hash += Hash::get_file_hash(fs, *p, "SHA1"); + } + else if (pre_build_info.cmake_system_name == "Linux") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "linux.cmake", "SHA1"); + } + else if (pre_build_info.cmake_system_name == "Darwin") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "osx.cmake", "SHA1"); + } + else if (pre_build_info.cmake_system_name == "FreeBSD") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "freebsd.cmake", "SHA1"); + } + else if (pre_build_info.cmake_system_name == "Android") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "android.cmake", "SHA1"); + } + + s_hash_cache.emplace(triplet_file_path, hash); + } + + return hash; + } + static ExtendedBuildResult do_build_package(const VcpkgPaths& paths, const PreBuildInfo& pre_build_info, const PackageSpec& spec, @@ -372,72 +518,16 @@ namespace vcpkg::Build System::printf("-- Installing port from location: %s\n", config.port_dir.u8string()); } -#if !defined(_WIN32) - // TODO: remove when vcpkg.exe is in charge for acquiring tools. Change introduced in vcpkg v0.0.107. - // bootstrap should have already downloaded ninja, but making sure it is present in case it was deleted. - vcpkg::Util::unused(paths.get_tool_exe(Tools::NINJA)); -#endif - - const fs::path& cmake_exe_path = paths.get_tool_exe(Tools::CMAKE); - const fs::path& git_exe_path = paths.get_tool_exe(Tools::GIT); -#if defined(_WIN32) - const fs::path& powershell_exe_path = paths.get_tool_exe("powershell-core"); - if (!fs.exists(powershell_exe_path.parent_path() / "powershell.exe")) - { - fs.copy(powershell_exe_path, powershell_exe_path.parent_path() / "powershell.exe", fs::copy_options::none); - } -#endif - - std::string all_features; - for (auto& feature : config.scf.feature_paragraphs) - { - all_features.append(feature->name + ";"); - } - - const Toolset& toolset = paths.get_toolset(pre_build_info); - - std::vector variables{ - {"CMD", "BUILD"}, - {"PORT", config.scf.core_paragraph->name}, - {"CURRENT_PORT_DIR", config.port_dir}, - {"TARGET_TRIPLET", spec.triplet().canonical_name()}, - {"TARGET_TRIPLET_FILE", triplet_file_path}, - {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, - {"VCPKG_USE_HEAD_VERSION", Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, - {"DOWNLOADS", paths.downloads}, - {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, - {"_VCPKG_DOWNLOAD_TOOL", to_string(config.build_package_options.download_tool)}, - {"FEATURES", Strings::join(";", config.feature_list)}, - {"ALL_FEATURES", all_features}, - {"VCPKG_CONCURRENCY", std::to_string(get_concurrency())}, - }; - - if (!System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) - { - variables.push_back({"GIT", git_exe_path}); - } - - const std::string cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, paths.ports_cmake, variables); - - auto command = make_build_env_cmd(pre_build_info, toolset); - if (!command.empty()) - { -#ifdef _WIN32 - command.append(" & "); -#else - command.append(" && "); -#endif - } - command.append(cmd_launch_cmake); const auto timer = Chrono::ElapsedTimer::create_started(); - const int return_code = System::cmd_execute_clean( - command, - {} -#ifdef _WIN32 - , - powershell_exe_path.parent_path().u8string() + ";" -#endif - ); + + std::string command = + make_build_cmd(paths, pre_build_info, config, triplet); + std::unordered_map env = + make_env_passthrough(pre_build_info); + + const int return_code = + System::cmd_execute_clean(command, env); + const auto buildtimeus = timer.microseconds(); const auto spec_string = spec.to_string(); @@ -711,7 +801,7 @@ namespace vcpkg::Build { System::print2("Using cached binary package: ", archive_path.u8string(), "\n"); - auto archive_result = decompress_archive(paths, spec, archive_path); + int archive_result = decompress_archive(paths, spec, archive_path); if (archive_result != 0) { @@ -946,111 +1036,60 @@ namespace vcpkg::Build const std::string variable_name = s.at(0); const std::string variable_value = variable_with_no_value ? "" : s.at(1); - if (variable_name == "VCPKG_TARGET_ARCHITECTURE") + auto maybe_option = VCPKG_OPTIONS.find(variable_name); + if (maybe_option != VCPKG_OPTIONS.end()) { - pre_build_info.target_architecture = variable_value; - continue; + switch (maybe_option->second) + { + case VcpkgTripletVar::TARGET_ARCHITECTURE : + pre_build_info.target_architecture = variable_value; + break; + case VcpkgTripletVar::CMAKE_SYSTEM_NAME : + pre_build_info.cmake_system_name = variable_value; + break; + case VcpkgTripletVar::CMAKE_SYSTEM_VERSION : + pre_build_info.cmake_system_version = variable_value; + break; + case VcpkgTripletVar::PLATFORM_TOOLSET : + pre_build_info.platform_toolset = + variable_value.empty() ? nullopt : Optional{variable_value}; + break; + case VcpkgTripletVar::VISUAL_STUDIO_PATH : + pre_build_info.visual_studio_path = + variable_value.empty() ? nullopt : Optional{variable_value}; + break; + case VcpkgTripletVar::CHAINLOAD_TOOLCHAIN_FILE : + pre_build_info.external_toolchain_file = + variable_value.empty() ? nullopt : Optional{variable_value}; + break; + case VcpkgTripletVar::BUILD_TYPE : + if (variable_value.empty()) + pre_build_info.build_type = nullopt; + else if (Strings::case_insensitive_ascii_equals(variable_value, "debug")) + pre_build_info.build_type = ConfigurationType::DEBUG; + else if (Strings::case_insensitive_ascii_equals(variable_value, "release")) + pre_build_info.build_type = ConfigurationType::RELEASE; + else + Checks::exit_with_message( + VCPKG_LINE_INFO, "Unknown setting for VCPKG_BUILD_TYPE: %s", variable_value); + break; + case VcpkgTripletVar::ENV_PASSTHROUGH : + pre_build_info.passthrough_env_vars = Strings::split(variable_value, ";"); + break; + } } - - if (variable_name == "VCPKG_CMAKE_SYSTEM_NAME") + else { - pre_build_info.cmake_system_name = variable_value; - continue; + Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown variable name %s", line); } - - if (variable_name == "VCPKG_CMAKE_SYSTEM_VERSION") - { - pre_build_info.cmake_system_version = variable_value; - continue; - } - - if (variable_name == "VCPKG_PLATFORM_TOOLSET") - { - pre_build_info.platform_toolset = - variable_value.empty() ? nullopt : Optional{variable_value}; - continue; - } - - if (variable_name == "VCPKG_VISUAL_STUDIO_PATH") - { - pre_build_info.visual_studio_path = - variable_value.empty() ? nullopt : Optional{variable_value}; - continue; - } - - if (variable_name == "VCPKG_CHAINLOAD_TOOLCHAIN_FILE") - { - pre_build_info.external_toolchain_file = - variable_value.empty() ? nullopt : Optional{variable_value}; - continue; - } - - if (variable_name == "VCPKG_BUILD_TYPE") - { - if (variable_value.empty()) - pre_build_info.build_type = nullopt; - else if (Strings::case_insensitive_ascii_equals(variable_value, "debug")) - pre_build_info.build_type = ConfigurationType::DEBUG; - else if (Strings::case_insensitive_ascii_equals(variable_value, "release")) - pre_build_info.build_type = ConfigurationType::RELEASE; - else - Checks::exit_with_message( - VCPKG_LINE_INFO, "Unknown setting for VCPKG_BUILD_TYPE: %s", variable_value); - continue; - } - - Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown variable name %s", line); } - pre_build_info.triplet_abi_tag = [&]() { - const auto& fs = paths.get_filesystem(); - static std::map s_hash_cache; - - auto it_hash = s_hash_cache.find(triplet_file_path); - if (it_hash != s_hash_cache.end()) - { - return it_hash->second; - } - auto hash = Hash::get_file_hash(fs, triplet_file_path, "SHA1"); - - if (auto p = pre_build_info.external_toolchain_file.get()) - { - hash += "-"; - hash += Hash::get_file_hash(fs, *p, "SHA1"); - } - else if (pre_build_info.cmake_system_name.empty() || - pre_build_info.cmake_system_name == "WindowsStore") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "windows.cmake", "SHA1"); - } - else if (pre_build_info.cmake_system_name == "Linux") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "linux.cmake", "SHA1"); - } - else if (pre_build_info.cmake_system_name == "Darwin") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "osx.cmake", "SHA1"); - } - else if (pre_build_info.cmake_system_name == "FreeBSD") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "freebsd.cmake", "SHA1"); - } - else if (pre_build_info.cmake_system_name == "Android") - { - hash += "-"; - hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "android.cmake", "SHA1"); - } - - s_hash_cache.emplace(triplet_file_path, hash); - return hash; - }(); + pre_build_info.triplet_abi_tag = + get_triplet_abi(paths, pre_build_info, triplet); return pre_build_info; } + ExtendedBuildResult::ExtendedBuildResult(BuildResult code) : code(code) {} ExtendedBuildResult::ExtendedBuildResult(BuildResult code, std::unique_ptr&& bcf) : code(code), binary_control_file(std::move(bcf)) diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 9bc59cbe7..1a52bd05f 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -238,6 +238,28 @@ namespace vcpkg return ret; } + std::vector filter_dependencies_to_features(const std::vector& deps, + const Triplet& t) + { + std::vector ret; + for (auto&& dep : deps) + { + auto qualifiers = Strings::split(dep.qualifier, "&"); + if (std::all_of(qualifiers.begin(), qualifiers.end(), [&](const std::string& qualifier) { + if (qualifier.empty()) return true; + if (qualifier[0] == '!') + { + return t.canonical_name().find(qualifier.substr(1)) == std::string::npos; + } + return t.canonical_name().find(qualifier) != std::string::npos; + })) + { + ret.emplace_back(dep.depend); + } + } + return ret; + } + std::vector filter_dependencies_to_specs(const std::vector& deps, const Triplet& t) { return FeatureSpec::from_strings_and_triplet(filter_dependencies(deps, t), t); From bb163f5ece33893412fe1f6cccac733896741c92 Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Thu, 18 Jul 2019 19:26:48 +0200 Subject: [PATCH 0219/1066] [minizip] Make BZip2 an optional feature (#7282) * [minizip] Update CMakeLists.txt If the BZip2 package has not been found, ensure that the library does not assume it is. This would stop any build on targets where bzip2 is not installed. This can either be the bzip2 package provided by vcpkg or locally on the system. Feature: - Allow optionally to enable bzip2 supprt * [minizip] Make bzip2 truly optional Also catch dependency in the corresponding cmake files --- ports/libkml/CONTROL | 2 +- ports/minizip/CMakeLists.txt | 30 ++++++++++++++++--------- ports/minizip/CONTROL | 8 +++++-- ports/minizip/portfile.cmake | 43 ++++++++++++++++++++++-------------- 4 files changed, 54 insertions(+), 29 deletions(-) diff --git a/ports/libkml/CONTROL b/ports/libkml/CONTROL index 34a3a3440..d52ca4c01 100644 --- a/ports/libkml/CONTROL +++ b/ports/libkml/CONTROL @@ -2,4 +2,4 @@ Source: libkml Version: 1.3.0-3 Homepage: https://github.com/libkml/libkml Description: Reference implementation of OGC KML 2.2 -Build-Depends: zlib, expat, minizip, uriparser, boost-smart-ptr +Build-Depends: zlib, expat, minizip[bzip2], uriparser, boost-smart-ptr diff --git a/ports/minizip/CMakeLists.txt b/ports/minizip/CMakeLists.txt index edb9b3c7b..b5c5d5dbc 100644 --- a/ports/minizip/CMakeLists.txt +++ b/ports/minizip/CMakeLists.txt @@ -6,12 +6,20 @@ if(MSVC) endif() find_package(ZLIB REQUIRED) - -find_package(BZip2 REQUIRED) - set(MIN_SRC contrib/minizip) -include_directories(${MIN_SRC} ${ZLIB_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR}) +include_directories(${MIN_SRC} ${ZLIB_INCLUDE_DIRS}) + +set(MINIZIP_LIBRARIES ZLIB::ZLIB) +if(ENABLE_BZIP2) + message(STATUS "Building with bzip2 support") + find_package(BZip2) + + include_directories(${BZIP2_INCLUDE_DIR}) + set(MINIZIP_LIBRARIES ${MINIZIP_LIBRARIES} ${BZIP2_LIBRARIES}) +else() + message(STATUS "Building without bzip2 support") +endif() set(SRC ${MIN_SRC}/ioapi.c @@ -41,14 +49,16 @@ add_library(minizip ${SRC}) target_link_libraries(minizip PRIVATE ZLIB::ZLIB) target_compile_definitions(minizip PRIVATE -D_ZLIB_H) -target_link_libraries(minizip PRIVATE ${BZIP2_LIBRARIES}) -target_compile_definitions(minizip PRIVATE -DHAVE_BZIP2=1) +if(ENABLE_BZIP2) + target_link_libraries(minizip PRIVATE ${BZIP2_LIBRARIES}) + target_compile_definitions(minizip PRIVATE -DHAVE_BZIP2=1) +endif() -add_executable(minizip_bin ${MIN_SRC}/minizip.c) -add_executable(miniunz_bin ${MIN_SRC}/miniunz.c) +add_executable(minizip_bin ${MIN_SRC}/minizip.c) +add_executable(miniunz_bin ${MIN_SRC}/miniunz.c) -target_link_libraries(minizip_bin minizip ${BZIP2_LIBRARIES} ZLIB::ZLIB) -target_link_libraries(miniunz_bin minizip ${BZIP2_LIBRARIES} ZLIB::ZLIB) +target_link_libraries(minizip_bin minizip ${MINIZIP_LIBRARIES}) +target_link_libraries(miniunz_bin minizip ${MINIZIP_LIBRARIES}) set_target_properties(minizip_bin PROPERTIES OUTPUT_NAME minizip) set_target_properties(miniunz_bin PROPERTIES OUTPUT_NAME miniunz) diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL index 93d453ca2..9570e945e 100644 --- a/ports/minizip/CONTROL +++ b/ports/minizip/CONTROL @@ -1,5 +1,9 @@ Source: minizip -Version: 1.2.11-4 +Version: 1.2.11-5 +Build-Depends: zlib Homepage: https://github.com/madler/zlib Description: Zip compression library -Build-Depends: bzip2, zlib + +Feature: bzip2 +Build-Depends: bzip2 +Description: Support compression using bzip2 library diff --git a/ports/minizip/portfile.cmake b/ports/minizip/portfile.cmake index 15289b767..86cfe9b9d 100644 --- a/ports/minizip/portfile.cmake +++ b/ports/minizip/portfile.cmake @@ -1,37 +1,48 @@ include(vcpkg_common_functions) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "WindowsStore not supported") + message(FATAL_ERROR "WindowsStore not supported") endif() vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO madler/zlib - REF v1.2.11 - SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf - HEAD_REF master - PATCHES minizip.patch # enable decrypt support for password-encrypted ZIP files + OUT_SOURCE_PATH SOURCE_PATH + REPO madler/zlib + REF v1.2.11 + SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf + HEAD_REF master + PATCHES minizip.patch # enable decrypt support for password-encrypted ZIP files ) +set(BUILD_minizip_bzip2 OFF) +if ("bzip2" IN_LIST FEATURES) + set(BUILD_minizip_bzip2 ON) +endif() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_BZIP2=${BUILD_minizip_bzip2} + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/minizip) -file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h") -foreach(HEADER ${HEADERS}) - file(READ "${HEADER}" _contents) - string(REPLACE "#ifdef HAVE_BZIP2" "#if 1" _contents "${_contents}") - file(WRITE "${HEADER}" "${_contents}") -endforeach() + +if ("bzip2" IN_LIST FEATURES) + file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h") + foreach(HEADER ${HEADERS}) + file(READ "${HEADER}" _contents) + string(REPLACE "#ifdef HAVE_BZIP2" "#if 1" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") + endforeach() +endif() file(INSTALL ${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/minizip RENAME copyright) From da717a44d1be5fc4687de4dc308d767685e4c04b Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Thu, 18 Jul 2019 18:47:06 +0100 Subject: [PATCH 0220/1066] [leaf] New port (#7319) --- ports/leaf/CONTROL | 3 +++ ports/leaf/portfile.cmake | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ports/leaf/CONTROL create mode 100644 ports/leaf/portfile.cmake diff --git a/ports/leaf/CONTROL b/ports/leaf/CONTROL new file mode 100644 index 000000000..27db9dc33 --- /dev/null +++ b/ports/leaf/CONTROL @@ -0,0 +1,3 @@ +Source: leaf +Version: 0.2.1-1 +Description: Lightweight error augmentation framework \ No newline at end of file diff --git a/ports/leaf/portfile.cmake b/ports/leaf/portfile.cmake new file mode 100644 index 000000000..64d6ae50e --- /dev/null +++ b/ports/leaf/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zajo/leaf + REF 5fd08ee095c92b2bf4623b7237393e81f995ca7a + SHA512 92b86dbba55d31808f442d27dd873dce1162b28213533e124df448ae4f7b4442733501b6539ab15f67a85e184e458a66df4e4e020a3a213b44578ebbde281a42 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/leaf RENAME copyright) From 68e909ed1f59bf650031c0dafbf46f640b0bc2b9 Mon Sep 17 00:00:00 2001 From: imc-123 <38831995+imc-123@users.noreply.github.com> Date: Thu, 18 Jul 2019 19:14:52 +0100 Subject: [PATCH 0221/1066] [otl] Add new port (#7272) --- ports/otl/CONTROL | 4 ++++ ports/otl/portfile.cmake | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ports/otl/CONTROL create mode 100644 ports/otl/portfile.cmake diff --git a/ports/otl/CONTROL b/ports/otl/CONTROL new file mode 100644 index 000000000..c3950ec25 --- /dev/null +++ b/ports/otl/CONTROL @@ -0,0 +1,4 @@ +Source: otl +Version: 4.0.442 +Description: Oracle, Odbc and DB2-CLI Template Library +Homepage: http://otl.sourceforge.net/ diff --git a/ports/otl/portfile.cmake b/ports/otl/portfile.cmake new file mode 100644 index 000000000..eeaa6f225 --- /dev/null +++ b/ports/otl/portfile.cmake @@ -0,0 +1,17 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://otl.sourceforge.net/otlv4_h2.zip" + FILENAME "otl-4.0.442.zip" + SHA512 2f4005c2351021c92b86411e9c5847757b3596c485c34aa6a7228d86c446b0d9f1dcbfd228e9262d10c7460b77af0709b8ba9d5c7599ae54442efd88ccdbb96d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + REF 4.0.422 +) + +file(INSTALL ${SOURCE_PATH}/otlv4.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/otl) +file(INSTALL ${SOURCE_PATH}/otlv4.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/otl RENAME copyright) From d39bd70d533c64e929d4399cb9a1bdbfe0efaecd Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Thu, 18 Jul 2019 13:24:31 -0700 Subject: [PATCH 0222/1066] add needs_rebuild, should probably be moved to somewhere else --- toolsrc/include/vcpkg/statusparagraphs.h | 2 ++ toolsrc/src/vcpkg/statusparagraphs.cpp | 25 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index fa064de7e..3ebad67de 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -62,6 +62,8 @@ namespace vcpkg /// `true` if installed, `false` if not or not found. bool is_installed(const FeatureSpec& spec) const; + bool needs_rebuild(const PackageSpec& spec); + iterator insert(std::unique_ptr); friend void serialize(const StatusParagraphs& pgh, std::string& out_str); diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index c642af59b..f204ed568 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -118,6 +118,31 @@ namespace vcpkg return it != end() && (*it)->is_installed(); } + bool vcpkg::StatusParagraphs::needs_rebuild(const PackageSpec& spec) + { + auto it = find(spec); + if (it != end()) + { + for (const std::string& dep : (*it)->package.depends) + { + PackageSpec dep_spec = + PackageSpec::from_name_and_triplet( + dep, + spec.triplet()).value_or_exit(VCPKG_LINE_INFO); + + if (needs_rebuild(dep_spec)) + { + (*it)->state = InstallState::NEEDS_REBUILD; + return true; + } + } + + return (*it)->needs_rebuild(); + } + + return false; + } + StatusParagraphs::iterator StatusParagraphs::insert(std::unique_ptr pgh) { Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph"); From 96925e320363098d028bd0849c54e8e6dffcfa11 Mon Sep 17 00:00:00 2001 From: Maxim Kulyk Date: Thu, 18 Jul 2019 23:32:41 +0300 Subject: [PATCH 0223/1066] [blend2d] Port update (#7239) - blend2d updated to `beta_2019-07-16` - asmjit updated to `2019-07-16` - `BLEND2D_BUILD_STATIC` replaced by `BLEND2D_STATIC` - Added usage install in case of `static` linkage --- ports/blend2d/CONTROL | 6 +++--- ports/blend2d/portfile.cmake | 24 ++++++++++++++---------- ports/blend2d/usage | 1 + 3 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 ports/blend2d/usage diff --git a/ports/blend2d/CONTROL b/ports/blend2d/CONTROL index ef22b5264..1854d3862 100644 --- a/ports/blend2d/CONTROL +++ b/ports/blend2d/CONTROL @@ -1,10 +1,10 @@ Source: blend2d -Version: beta_2019-04-30 +Version: beta_2019-07-16 Description: Beta 2D Vector Graphics Powered by a JIT Compiler Default-Features: jit, logging Feature: jit -Description: asmjit is used to jit compile pipelines +Description: Default feature. Enables jit pipeline compilation. Not supported for ARM and UWP. Feature: logging -Description: enables logging +Description: Default feature. Enables logging. diff --git a/ports/blend2d/portfile.cmake b/ports/blend2d/portfile.cmake index c23c90afd..39f665afd 100644 --- a/ports/blend2d/portfile.cmake +++ b/ports/blend2d/portfile.cmake @@ -3,12 +3,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO blend2d/blend2d - REF 69141350b5a654f328c8529ae301aa1e6bad5342 - SHA512 d9bdd234f443c0ef8793dba1a76cc567bab3f9cf32d835d9e285f7ad946a56e0bc03eab30f61bbce51318e18a74ecfcfc965ac94e1ff6cef21e9b3ccc6a42120 + REF 934d07161971aeef5c4ac3b15e69ff57929445ac + SHA512 71b17611c20a8a7d27a37b0984918ce4ed608d8d2d053d116cd4c0ca9b7fcad742f39ef9939d9addf600113c2ad399d1dc4ee72b5f036ccda58b7d4237316928 HEAD_REF master ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_STATIC) if(NOT ("jit" IN_LIST FEATURES)) set(BLEND2D_BUILD_NO_JIT TRUE) @@ -17,14 +17,13 @@ if(NOT ("logging" IN_LIST FEATURES)) set(BLEND2D_BUILD_NO_LOGGING TRUE) endif() - if(NOT BLEND2D_BUILD_NO_JIT) vcpkg_from_github( OUT_SOURCE_PATH ASMJIT_SOURCE_PATH REPO asmjit/asmjit - REF f4e685cef003c40ad0d348d0c9eb2a1fe63d8521 - SHA512 77981fc32e746fc88f5707b4a8e8557283261b2657248f0d4900f47bd500de4efe47619a53f32413ea3c6f116e084cac6fdb48b6b92d75e824585d94c785d2b1 - HEAD_REF next-wip + REF 5d40561d14f93dc45613bfa03155d1dfb4f5825a + SHA512 88f16fc1ff8e9eb1b8d7441d7bd2e08d238a2104f3de94aaa16972faac704bf526996fa1556a3831701fb370f051df6839b4058690cf2f49ea5aeb1224c84fe0 + HEAD_REF master ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/asmjit) @@ -38,7 +37,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBLEND2D_BUILD_STATIC=${BLEND2D_BUILD_STATIC} + -DBLEND2D_STATIC=${BLEND2D_STATIC} -DBLEND2D_BUILD_NO_JIT=${BLEND2D_BUILD_NO_JIT} -DBLEND2D_BUILD_NO_LOGGING=${BLEND2D_BUILD_NO_LOGGING} ) @@ -50,11 +49,16 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(BLEND2D_BUILD_STATIC) +if(BLEND2D_STATIC) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/blend2d RENAME copyright) +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +if(BLEND2D_STATIC) + # Install usage + configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) +endif() diff --git a/ports/blend2d/usage b/ports/blend2d/usage new file mode 100644 index 000000000..b6d8a652c --- /dev/null +++ b/ports/blend2d/usage @@ -0,0 +1 @@ +Define BL_STATIC before any @PORT@ includes. From 416bee254a37d65acfadd20915bb70123862957f Mon Sep 17 00:00:00 2001 From: eao197 Date: Thu, 18 Jul 2019 23:46:36 +0300 Subject: [PATCH 0224/1066] [sobjectizer, so5extra] updates (#7238) * sobjectizer updated to 5.6.0.1, so5extra updated to 1.3.1 * archive of different type for so5extra-1.3.1 * sobjectizer updated to 5.6.0.2 --- ports/so5extra/CONTROL | 2 +- ports/so5extra/portfile.cmake | 10 +++++----- ports/sobjectizer/CONTROL | 2 +- ports/sobjectizer/portfile.cmake | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ports/so5extra/CONTROL b/ports/so5extra/CONTROL index 882ac0712..22abf134c 100644 --- a/ports/so5extra/CONTROL +++ b/ports/so5extra/CONTROL @@ -1,4 +1,4 @@ Source: so5extra -Version: 1.2.3-1 +Version: 1.3.1 Description: A set of additional tools for SObjectizer framework. Build-Depends: sobjectizer diff --git a/ports/so5extra/portfile.cmake b/ports/so5extra/portfile.cmake index 26472935e..d660fbbca 100644 --- a/ports/so5extra/portfile.cmake +++ b/ports/so5extra/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 1.2.3) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so_5_extra-${VERSION}/dev/so_5_extra) +set(VERSION 1.3.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so5extra-${VERSION}/dev/so_5_extra) vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/so_5_extra/so_5_extra-${VERSION}.zip/download" - FILENAME "so_5_extra-${VERSION}.zip" - SHA512 ed12cdae9d23d652cbedd12e37b7faa935ace4c951eb5cb3881306c1384973ac0a90bd59244471a671ec734f6319f0a3144f7a727342c94cec6330eb4195bae9 + URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/so_5_extra/so5extra-${VERSION}.tar.bz2/download" + FILENAME "so5extra-${VERSION}.tar.bz2" + SHA512 58532426f85121f8f6c3b18a70950c048c8a695a7fca7be5d9c95434bdabdb2bfcf73d755737434a8d8aa5f3051785e13e7e293e057527c72047dad293a56ae7 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 3e37f70e3..f5bfe31c0 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,4 +1,4 @@ Source: sobjectizer -Version: 5.5.24.4-1 +Version: 5.6.0.2 Homepage: https://sourceforge.net/projects/sobjectizer Description: SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels. diff --git a/ports/sobjectizer/portfile.cmake b/ports/sobjectizer/portfile.cmake index 4588ea4f2..8231f372e 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 5.5.24.4) +set(VERSION 5.6.0.2) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev) vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip" - FILENAME "so-${VERSION}.zip" - SHA512 83f20091b9aa9ecec08b72a97c9190da7bfbe7cc69076dd70074f814208a2712ec722a8c9e7367ab8a416a5c0d488edebb6066371f7cec5dd566f51ef297b382 + URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/SObjectizer%20Core%20v.5.6/so-${VERSION}.tar.bz2" + FILENAME "so-${VERSION}.tar.bz2" + SHA512 8f330c757fe401d715584da224925158d97ab5bba59e442af29ac64cb6feeae00434bd9bf11601f0796737f901a4f8ada1728b60d5706294d607d4d365c2d6da ) vcpkg_extract_source_archive(${ARCHIVE}) From 527d1009c39f71f65bdb945ff17017f290460438 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Fri, 19 Jul 2019 04:47:09 +0800 Subject: [PATCH 0225/1066] [dbg-macro] Add new port (#7237) --- ports/dbg-macro/CONTROL | 4 ++++ ports/dbg-macro/portfile.cmake | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 ports/dbg-macro/CONTROL create mode 100644 ports/dbg-macro/portfile.cmake diff --git a/ports/dbg-macro/CONTROL b/ports/dbg-macro/CONTROL new file mode 100644 index 000000000..80a2e3165 --- /dev/null +++ b/ports/dbg-macro/CONTROL @@ -0,0 +1,4 @@ +Source: dbg-macro +Version: 2019-07-11 +Description: A dbg(...) macro for C++ +Homepage: https://github.com/sharkdp/dbg-macro diff --git a/ports/dbg-macro/portfile.cmake b/ports/dbg-macro/portfile.cmake new file mode 100644 index 000000000..3aee7268d --- /dev/null +++ b/ports/dbg-macro/portfile.cmake @@ -0,0 +1,16 @@ +# single header file library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sharkdp/dbg-macro + REF 4409d8428baf700873bcfee42e63bbca6700b97e + SHA512 f9f936707631bee112566a24c92cbf171e54362099df689253ab38d0489400f65c284df81749376f18cb3ebcefea3cc18844554016798c2542ec73dc2afcc931 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/dbg.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) From ea071b3505abd99a29f31dd31b30ee1f1a6f1838 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Fri, 19 Jul 2019 04:48:07 +0800 Subject: [PATCH 0226/1066] [p-ranav-csv] Add new port (#7236) --- ports/p-ranav-csv/CONTROL | 4 ++++ ports/p-ranav-csv/portfile.cmake | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 ports/p-ranav-csv/CONTROL create mode 100644 ports/p-ranav-csv/portfile.cmake diff --git a/ports/p-ranav-csv/CONTROL b/ports/p-ranav-csv/CONTROL new file mode 100644 index 000000000..958341f9e --- /dev/null +++ b/ports/p-ranav-csv/CONTROL @@ -0,0 +1,4 @@ +Source: p-ranav-csv +Version: 2019-07-11 +Description: CSV for modern C++ +Homepage: https://github.com/p-ranav/csv diff --git a/ports/p-ranav-csv/portfile.cmake b/ports/p-ranav-csv/portfile.cmake new file mode 100644 index 000000000..123842478 --- /dev/null +++ b/ports/p-ranav-csv/portfile.cmake @@ -0,0 +1,25 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/csv + REF 13e04e5b31b585855c7d7e7f3c65e47ae863569b + SHA512 ddcdc7af68a0dabb2b7e15822f5900461b9f424ff5e0ac6cafd2454c2f21ca97785ef09ddb805a92e2452fe14c14167c762a822a8af6c5b86446f67e7f3f71bd + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCSV_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) From 4661bb1daa2b370d9634081786ccf13d9d00b0ce Mon Sep 17 00:00:00 2001 From: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> Date: Fri, 19 Jul 2019 04:50:50 +0800 Subject: [PATCH 0227/1066] [DirectXTK] Fix UWP build error (#7233) --- ports/directxtk/CONTROL | 2 +- .../directxtk/fix-invalid-configuration.patch | 39 +++++++++++++++++++ ports/directxtk/portfile.cmake | 39 ++++++++++++------- 3 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 ports/directxtk/fix-invalid-configuration.patch diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL index 469788934..e1f3ce5d5 100644 --- a/ports/directxtk/CONTROL +++ b/ports/directxtk/CONTROL @@ -1,4 +1,4 @@ Source: directxtk -Version: apr2019 +Version: apr2019-1 Homepage: https://github.com/Microsoft/DirectXTK Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/ports/directxtk/fix-invalid-configuration.patch b/ports/directxtk/fix-invalid-configuration.patch new file mode 100644 index 000000000..785fd009a --- /dev/null +++ b/ports/directxtk/fix-invalid-configuration.patch @@ -0,0 +1,39 @@ +diff --git a/DirectXTK_Windows10.sln b/DirectXTK_Windows10.sln +index 8962307..9e3b8a7 100644 +--- a/DirectXTK_Windows10.sln ++++ b/DirectXTK_Windows10.sln +@@ -15,11 +15,11 @@ Global + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 +- Debug|x86 = Debug|x86 ++ Debug|Win32 = Debug|Win32 + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 +- Release|x86 = Release|x86 ++ Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|ARM.ActiveCfg = Debug|ARM +@@ -28,16 +28,16 @@ Global + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|ARM64.Build.0 = Debug|ARM64 + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x64.ActiveCfg = Debug|x64 + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x64.Build.0 = Debug|x64 +- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x86.ActiveCfg = Debug|Win32 +- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x86.Build.0 = Debug|Win32 ++ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|Win32.Build.0 = Debug|Win32 + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM.ActiveCfg = Release|ARM + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM.Build.0 = Release|ARM + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM64.ActiveCfg = Release|ARM64 + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM64.Build.0 = Release|ARM64 + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x64.ActiveCfg = Release|x64 + {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x64.Build.0 = Release|x64 +- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x86.ActiveCfg = Release|Win32 +- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x86.Build.0 = Release|Win32 ++ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|Win32.ActiveCfg = Release|Win32 ++ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index 245c8a4af..0449d8f61 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_from_github( REF apr2019 SHA512 811ed222c1650d34a8475e44719cca8972a85d96f9ccb10548e1501eb9d28fd8685de90832b517cdcbf21ae8c9160dea69000e8dca06fab745a15a7acc14ba98 HEAD_REF master + PATCHES fix-invalid-configuration.patch ) IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") @@ -20,33 +21,41 @@ ELSE() SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) ENDIF() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(SLN_NAME "Windows10") +else() + set(SLN_NAME "Desktop_2017") +endif() + vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/DirectXTK_Desktop_2017.sln + PROJECT_PATH ${SOURCE_PATH}/DirectXTK_${SLN_NAME}.sln PLATFORM ${BUILD_ARCH} ) file(INSTALL - ${SOURCE_PATH}/Bin/Desktop_2017/${BUILD_ARCH}/Release/DirectXTK.lib + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL - ${SOURCE_PATH}/Bin/Desktop_2017/${BUILD_ARCH}/Debug/DirectXTK.lib + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -set(DXTK_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtk) -file(MAKE_DIRECTORY ${DXTK_TOOL_PATH}) +if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(DXTK_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtk) + file(MAKE_DIRECTORY ${DXTK_TOOL_PATH}) + + file(INSTALL + ${SOURCE_PATH}/MakeSpriteFont/bin/Release/MakeSpriteFont.exe + DESTINATION ${DXTK_TOOL_PATH}) + + file(INSTALL + ${SOURCE_PATH}/XWBTool/Bin/Desktop_2017/${BUILD_ARCH}/Release/XWBTool.exe + DESTINATION ${DXTK_TOOL_PATH}) +endif() file(INSTALL - ${SOURCE_PATH}/MakeSpriteFont/bin/Release/MakeSpriteFont.exe - DESTINATION ${DXTK_TOOL_PATH}) - -file(INSTALL - ${SOURCE_PATH}/XWBTool/Bin/Desktop_2017/${BUILD_ARCH}/Release/XWBTool.exe - DESTINATION ${DXTK_TOOL_PATH}) - -file(INSTALL - ${SOURCE_PATH}/Inc/ - DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK + ${SOURCE_PATH}/Inc/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK ) # Handle copyright From ef48500ac6ec3f9e0f494329365452d3ad9e1271 Mon Sep 17 00:00:00 2001 From: Dan Nissenbaum Date: Thu, 18 Jul 2019 16:53:24 -0400 Subject: [PATCH 0228/1066] Better error message when VCPKG_ROOT is independently defined (#7229) --- toolsrc/src/vcpkg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 363b39814..46ec8c013 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -143,7 +143,7 @@ static void inner(const VcpkgCmdArguments& args) #else const int exit_code = chdir(paths.root.c_str()); #endif - Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); + Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working directory to the vcpkg root directory failed. Did you incorrectly define the VCPKG_ROOT environment variable, or did you mistakenly create a file named .vcpkg-root somewhere?"); if (args.command == "install" || args.command == "remove" || args.command == "export" || args.command == "update") { From 505eae9f6a2e63fb89f3c858a223fec095f01d57 Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Fri, 19 Jul 2019 04:54:45 +0800 Subject: [PATCH 0229/1066] [restbed] Add openssl feature (#7232) --- ports/restbed/CONTROL | 8 ++++-- ports/restbed/add_openssl_support.patch | 37 +++++++++++++++++++++++++ ports/restbed/portfile.cmake | 11 +++++++- 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 ports/restbed/add_openssl_support.patch diff --git a/ports/restbed/CONTROL b/ports/restbed/CONTROL index d0eab13ce..53f6ea0de 100644 --- a/ports/restbed/CONTROL +++ b/ports/restbed/CONTROL @@ -1,4 +1,8 @@ Source: restbed -Version: 4.16-07-28-2018 +Version: 4.16-07-28-2018-1 Description: Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++11 applications. -Build-Depends: asio \ No newline at end of file +Build-Depends: asio + +Feature: openssl +Build-Depends: openssl +Description: Secure over the wire communication allowing you to transmit private data online. \ No newline at end of file diff --git a/ports/restbed/add_openssl_support.patch b/ports/restbed/add_openssl_support.patch new file mode 100644 index 000000000..72d4dc406 --- /dev/null +++ b/ports/restbed/add_openssl_support.patch @@ -0,0 +1,37 @@ +diff --git a/cmake/Findopenssl.cmake b/cmake/Findopenssl.cmake +index 8db9799..626ff55 100644 +--- a/cmake/Findopenssl.cmake ++++ b/cmake/Findopenssl.cmake +@@ -1,24 +1,7 @@ +-find_library( ssl_LIBRARY_STATIC libssl.a ssleay32.lib HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) +-find_library( crypto_LIBRARY_STATIC libcrypto.a libeay32.lib HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) +- +-find_library( ssl_LIBRARY_SHARED libssl.so libssl.dylib ssleay32.dll HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) +-find_library( crypto_LIBRARY_SHARED libcrypto.so libcrypto.dylib libeay32.dll HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) +- +-find_path( ssl_INCLUDE openssl/ssl.h HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/inc32" "${PROJECT_SOURCE_DIR}/dependency/openssl/include" "/usr/local/opt/openssl/include" "/usr/include" "/usr/local/include" "/opt/local/include" ) +- +-if ( ssl_LIBRARY_STATIC AND ssl_LIBRARY_SHARED AND crypto_LIBRARY_STATIC AND crypto_LIBRARY_SHARED ) +- set( OPENSSL_FOUND TRUE ) +- add_definitions( -DBUILD_SSL=TRUE ) +- +- if ( APPLE AND BUILD_SSL ) +- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" ) +- endif( ) +- +- message( STATUS "Found OpenSSL include at: ${ssl_INCLUDE}" ) +- message( STATUS "Found OpenSSL library at: ${ssl_LIBRARY_STATIC}" ) +- message( STATUS "Found OpenSSL library at: ${ssl_LIBRARY_SHARED}" ) +- message( STATUS "Found Crypto library at: ${crypto_LIBRARY_STATIC}" ) +- message( STATUS "Found Crypto library at: ${crypto_LIBRARY_SHARED}" ) +-else ( ) +- message( FATAL_ERROR "Failed to locate OpenSSL dependency. see restbed/dependency/openssl; ./config shared; make all" ) +-endif ( ) ++if (BUILD_SSL) ++ set( OPENSSL_FOUND TRUE ) ++ add_definitions( -DBUILD_SSL=TRUE ) ++ if ( APPLE AND BUILD_SSL ) ++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" ) ++ endif( ) ++endif() +\ No newline at end of file diff --git a/ports/restbed/portfile.cmake b/ports/restbed/portfile.cmake index 60f1247d8..7b4a2d944 100644 --- a/ports/restbed/portfile.cmake +++ b/ports/restbed/portfile.cmake @@ -11,11 +11,20 @@ vcpkg_from_github( PATCHES cmake.patch ) +set(USE_OPENSSL OFF) +if("openssl" IN_LIST FEATURES) + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES add_openssl_support.patch + ) + set(USE_OPENSSL ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_SSL=OFF + -DBUILD_SSL=${USE_OPENSSL} -DDISABLE_TESTS=ON ) From 122360484648985b205f1385808074e80eceacb6 Mon Sep 17 00:00:00 2001 From: zhbanito Date: Thu, 18 Jul 2019 23:59:07 +0300 Subject: [PATCH 0230/1066] [tesseract] port update to 4.1.0 release (#7227) --- ports/tesseract/CONTROL | 11 ++++-- ports/tesseract/fix-tiff-linkage.patch | 13 +++++++ ports/tesseract/leptonica.patch | 13 ------- ports/tesseract/portfile.cmake | 49 ++++++++++++++++++++++---- ports/tesseract/use-vcpkg-icu.patch | 11 ------ ports/tesseract/ws2-32.patch | 12 ------- 6 files changed, 65 insertions(+), 44 deletions(-) create mode 100644 ports/tesseract/fix-tiff-linkage.patch delete mode 100644 ports/tesseract/leptonica.patch delete mode 100644 ports/tesseract/use-vcpkg-icu.patch delete mode 100644 ports/tesseract/ws2-32.patch diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL index df6e60fec..3f04dcf96 100644 --- a/ports/tesseract/CONTROL +++ b/ports/tesseract/CONTROL @@ -1,5 +1,12 @@ Source: tesseract -Version: 4.0.0-3 +Version: 4.1.0 Homepage: https://github.com/tesseract-ocr/tesseract Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. -Build-Depends: leptonica, icu +Build-Depends: leptonica + +Feature: training_tools +Description: build training tools +Build-Depends: icu + +Feature: cpu_independed +Description: build on any cpu extension commands support diff --git a/ports/tesseract/fix-tiff-linkage.patch b/ports/tesseract/fix-tiff-linkage.patch new file mode 100644 index 000000000..f4720c022 --- /dev/null +++ b/ports/tesseract/fix-tiff-linkage.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f154663..c07b827 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -431,7 +431,7 @@ endif() + add_executable (tesseract ${tesseractmain_src} ${tesseractmain_rsc}) + target_link_libraries (tesseract libtesseract) + if (HAVE_TIFFIO_H) +- target_link_libraries(tesseract tiff) ++ target_link_libraries(tesseract TIFF::TIFF) + endif() + + if (OPENMP_BUILD AND UNIX) diff --git a/ports/tesseract/leptonica.patch b/ports/tesseract/leptonica.patch deleted file mode 100644 index 507721d9d..000000000 --- a/ports/tesseract/leptonica.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/templates/TesseractConfig.cmake.in b/cmake/templates/TesseractConfig.cmake.in -index 13838361..245ca2bc 100644 ---- a/cmake/templates/TesseractConfig.cmake.in -+++ b/cmake/templates/TesseractConfig.cmake.in -@@ -21,6 +21,8 @@ - - include(${CMAKE_CURRENT_LIST_DIR}/TesseractTargets.cmake) - -+find_package(Leptonica REQUIRED) -+ - # ====================================================== - # Version variables: - # ====================================================== diff --git a/ports/tesseract/portfile.cmake b/ports/tesseract/portfile.cmake index 9650db44a..dc03a69e7 100644 --- a/ports/tesseract/portfile.cmake +++ b/ports/tesseract/portfile.cmake @@ -5,24 +5,41 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tesseract-ocr/tesseract - REF 4.0.0 - SHA512 69e57d4ba1fc43d212fd0fff69a2b5d48a3b37cfee7054fdc083cbb7e04d92317609a32e457229661d70ce8d9b16c9d25e81bfc3861db660dd2c8f292202d447 - HEAD_REF master + REF 4.1.0 + SHA512 d617f5c5b826640b2871dbe3d7973bcc5e66fafd837921a20e009d683806ed50f0f258aa455019d99fc54f5cb65c2fa0380e3a3c92b39ab0684b8799c730b09d PATCHES - use-vcpkg-icu.patch - ws2-32.patch - leptonica.patch + fix-tiff-linkage.patch ) # The built-in cmake FindICU is better file(REMOVE ${SOURCE_PATH}/cmake/FindICU.cmake) +# Handle Static Library Output +if(VCPKG_LIBRARY_LINKAGE EQUAL "static") + list(APPEND OPTIONS_LIST -DSTATIC=ON) +endif() + +# Handle CONTROL +if("training_tools" IN_LIST FEATURES) + list(APPEND OPTIONS_LIST -DBUILD_TRAINING_TOOLS=ON) +else() + list(APPEND OPTIONS_LIST -DBUILD_TRAINING_TOOLS=OFF) +endif() +if("independed_architecture" IN_LIST FEATURES) + list(APPEND OPTIONS_LIST -DTARGET_ARCHITECTURE=none) +else() + list(APPEND OPTIONS_LIST -DTARGET_ARCHITECTURE=auto) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DSTATIC=ON -DUSE_SYSTEM_ICU=True + #any value for vcpkg leptonica link cmake branch select + -DLeptonica_DIR=YES + ${OPTIONS_LIST} ) vcpkg_install_cmake() @@ -35,6 +52,26 @@ set(EXTENSION) if(WIN32) set(EXTENSION ".exe") endif() + +# copy training tools +set(TRAINING_TOOLS_DIR ${CURRENT_PACKAGES_DIR}/tools/tesseract/training) +if("training_tools" IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/ambiguous_words${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/classifier_tester${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/combine_tessdata${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/cntraining${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/dawg2wordlist${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/mftraining${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/shapeclustering${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/wordlist2dawg${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/combine_lang_model${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/lstmeval${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/lstmtraining${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/set_unicharset_properties${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/unicharset_extractor${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/text2image${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) +endif() + file(COPY ${CURRENT_PACKAGES_DIR}/bin/tesseract${EXTENSION} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tesseract) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/tesseract) diff --git a/ports/tesseract/use-vcpkg-icu.patch b/ports/tesseract/use-vcpkg-icu.patch deleted file mode 100644 index 9c75726e1..000000000 --- a/ports/tesseract/use-vcpkg-icu.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/training/CMakeLists.txt Thu Aug 17 02:46:15 2017 -+++ b/training/CMakeLists.txt Thu Aug 17 02:46:15 2017 -@@ -11,7 +11,7 @@ - endif() - - # experimental --if (MSVC AND NOT CPPAN_BUILD) -+if (MSVC AND NOT CPPAN_BUILD AND NOT USE_SYSTEM_ICU) - - include(CheckTypeSize) - check_type_size("void *" SIZEOF_VOID_P) diff --git a/ports/tesseract/ws2-32.patch b/ports/tesseract/ws2-32.patch deleted file mode 100644 index 1d3be8189..000000000 --- a/ports/tesseract/ws2-32.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/viewer/svutil.cpp b/viewer/svutil.cpp -index 34a2286..bc2a7e1 100644 ---- a/viewer/svutil.cpp -+++ b/viewer/svutil.cpp -@@ -23,6 +23,7 @@ - #include - #ifdef _WIN32 - #include -+#pragma comment(lib, "Ws2_32.lib") - struct addrinfo { - struct sockaddr* ai_addr; - int ai_addrlen; From cb974b6650ad33ebe1dbb37778597eb171efa680 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Thu, 18 Jul 2019 14:00:25 -0700 Subject: [PATCH 0231/1066] [lastools] Add new port. (#7220) --- ports/lastools/CONTROL | 4 ++++ ports/lastools/portfile.cmake | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 ports/lastools/CONTROL create mode 100644 ports/lastools/portfile.cmake diff --git a/ports/lastools/CONTROL b/ports/lastools/CONTROL new file mode 100644 index 000000000..cb908a8d4 --- /dev/null +++ b/ports/lastools/CONTROL @@ -0,0 +1,4 @@ +Source: lastools +Version: 2019-07-10 +Homepage: https://github.com/LAStools/LAStools +Description: LAStools: award-winning software for efficient LiDAR processing (with LASzip) \ No newline at end of file diff --git a/ports/lastools/portfile.cmake b/ports/lastools/portfile.cmake new file mode 100644 index 000000000..5f6e40397 --- /dev/null +++ b/ports/lastools/portfile.cmake @@ -0,0 +1,35 @@ +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} doesn't currently support UWP.") +endif() + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LAStools/LAStools + REF f15a702530e098b46c2eb3923f89a68ffa81e668 + SHA512 df5763b7c69721ba2a24fde2b4092e53136020b88ff4cc0d533279d709c55d7d16d8a4300f0b68829294d9311ed674af5b15306c4ded7a6310e55404737702e0 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + From 2af0f3f85382296d47d796b28351141035f58ecb Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Thu, 18 Jul 2019 14:01:08 -0700 Subject: [PATCH 0232/1066] [basisu] initial port (#6995) --- ports/basisu/CONTROL | 5 +++++ ports/basisu/portfile.cmake | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 ports/basisu/CONTROL create mode 100644 ports/basisu/portfile.cmake diff --git a/ports/basisu/CONTROL b/ports/basisu/CONTROL new file mode 100644 index 000000000..f514dbf25 --- /dev/null +++ b/ports/basisu/CONTROL @@ -0,0 +1,5 @@ +Source: basisu +Version: 0.0.1 +Homepage: https://github.com/BinomialLLC/basis_universal +Description: Basis Universal is a supercompressed GPU texture and video compression format that outputs a highly compressed intermediate file format (.basis) that can be quickly transcoded to a wide variety of GPU texture compression formats. +Build-Depends: lodepng \ No newline at end of file diff --git a/ports/basisu/portfile.cmake b/ports/basisu/portfile.cmake new file mode 100644 index 000000000..02956b584 --- /dev/null +++ b/ports/basisu/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jherico/basis_universal + REF 11aa181a4bbf051475a01a1e73e39bf388819215 + SHA512 62d7de6c6ca5e6235c8a377767389a7d5393e05bb5d0c024ce756e77d235132efa48280c9d529b6a91eddf0c906c3c84b6b78fdf339b1a47039b28d04161d2fe + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +#vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/basisu) +if (WIN32) + set(TOOL_NAME basisu_tool.exe) +else() + set(TOOL_NAME basisu_tool) +endif() + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/basisu) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/basisu) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/basisu/LICENSE ${CURRENT_PACKAGES_DIR}/share/basisu/copyright) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/basisu) + +# Remove unnecessary files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() From db807ad49f9601ca046f1363b2c388220029e838 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Fri, 19 Jul 2019 01:13:10 +0200 Subject: [PATCH 0233/1066] [openblas/clapack] FindLapack/FindBLAS was not working. (#6786) * [clapack] FindLapack was not working for VS Generators due to extra ascii symbol "%3b" in linker dependencies which is ";" (Lists in IMPORTED_LOCATION do not work as expected) This commit is based on CMakes FindLAPACK and adds f2c to be checked * added include(SelectLibraryConfigurations) * [clapack] remove openblas patch * [openblas] add trailing _ on linux * [openblas] add find wrapper * [clapack] fix FindLapack * bump control to retrigger full CI build * [openblas] enable ninja * [mlpack] fix libary names for linkage. * bump control * Delete enable_openblas_compatibility.patch * Delete fix_underscore.patch * Update portfile.cmake * correct control version bump * fix control version bump * bump control * remove comments * remove lines in patch file * remove comment * remove unused var --- ports/clapack/CONTROL | 2 +- ports/clapack/FindLAPACK.cmake | 705 ++++++++---- ports/clapack/enable_openblas_compat.patch | 112 -- ports/clapack/portfile.cmake | 13 +- ports/clapack/vcpkg-cmake-wrapper.cmake | 8 +- ports/geogram/CONTROL | 2 +- .../enable_openblas_compatibility.patch | 1008 ----------------- ports/geogram/fix_underscore.patch | 10 - ports/geogram/portfile.cmake | 5 - ports/mlpack/CONTROL | 2 +- ports/mlpack/blas_lapack.patch | 13 + ports/mlpack/portfile.cmake | 1 + ports/openblas/CONTROL | 3 +- ports/openblas/FindBLAS.cmake | 816 +++++++++++++ ports/openblas/enable_underscore.patch | 70 -- ..._space_path.patch => fix-space-path.patch} | 0 ports/openblas/openblas_common.h | 72 ++ ports/openblas/portfile.cmake | 57 +- ports/openblas/vcpkg-cmake-wrapper.cmake | 51 +- 19 files changed, 1406 insertions(+), 1544 deletions(-) delete mode 100644 ports/clapack/enable_openblas_compat.patch delete mode 100644 ports/geogram/enable_openblas_compatibility.patch delete mode 100644 ports/geogram/fix_underscore.patch create mode 100644 ports/mlpack/blas_lapack.patch create mode 100644 ports/openblas/FindBLAS.cmake delete mode 100644 ports/openblas/enable_underscore.patch rename ports/openblas/{fix_space_path.patch => fix-space-path.patch} (100%) create mode 100644 ports/openblas/openblas_common.h diff --git a/ports/clapack/CONTROL b/ports/clapack/CONTROL index 2b5d137fc..9e7328e70 100644 --- a/ports/clapack/CONTROL +++ b/ports/clapack/CONTROL @@ -1,5 +1,5 @@ Source: clapack -Version: 3.2.1-9 +Version: 3.2.1-10 Homepage: https://www.netlib.org/clapack Description: CLAPACK (f2c'ed version of LAPACK) Build-Depends: openblas (!osx) diff --git a/ports/clapack/FindLAPACK.cmake b/ports/clapack/FindLAPACK.cmake index 002218eb8..0b5924ff4 100644 --- a/ports/clapack/FindLAPACK.cmake +++ b/ports/clapack/FindLAPACK.cmake @@ -1,237 +1,468 @@ -#.rst: -# clapack config for vcpkg -# ------------ -# -# Find the clapack includes and library. -# -# Result Variables -# ^^^^^^^^^^^^^^^^ -# -# This script defines the following variables: -# -# ``CLAPACK_FOUND`` -# True if clapack library found -# -# ``CLAPACK_VERSION`` -# Containing the clapack version tag (manually defined) -# -# ``CLAPACK_INCLUDE_DIR`` -# Location of clapack headers -# -# ``CLAPACK_LIBRARY`` -# List of libraries to link with when using clapack -# -# Result Targets -# ^^^^^^^^^^^^^^ -# -# This script defines the following targets: -# -# ``clapack::clapack`` -# Target to use clapack -# -# Compatibility Variables -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# This script defines the following variables for compatibility reasons: -# -# ``F2C_FOUND`` -# True if f2c (fortran-to-c wrap layer) library found -# -# ``F2C_INCLUDE_DIR`` -# Location of clapack headers -# -# ``F2C_LIBRARY`` -# Library containing the fortran-to-c wrap layer, necessary for clapack and automatically included when used -# -# ``LAPACK_FOUND`` -# True if clapack library found -# -# ``LAPACK_VERSION`` -# Containing the clapack version tag (manually defined) -# -# ``LAPACK_INCLUDE_DIR`` -# Location of clapack headers -# -# ``LAPACK_LIBRARY`` -# List of libraries to link with when using clapack -# -# Compatibility Targets -# ^^^^^^^^^^^^^^ -# -# This script defines the following targets for compatibility reasons: -# -# ``lapack`` -# Target to use lapack - -include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) -include(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) -include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) -include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake) - -set(CLAPACK_VERSION "3.2.1") - -set(CMAKE_THREAD_PREFER_PTHREAD TRUE) -find_dependency(Threads) - -if(UNIX) - find_library(ADDITIONAL_LAPACK_LIBRARY m) - set(PTHREAD_LINK_NAME "-pthread") -endif() - -if(NOT F2C_LIBRARY) - find_library(F2C_LIBRARY_RELEASE NAMES f2c libf2c) - find_library(F2C_LIBRARY_DEBUG NAMES f2cd libf2cd) - select_library_configurations(F2C) - - #keep a list of "pure" f2c libs, without dependencies - set(oF2C_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE}) - set(oF2C_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG}) - set(oF2C_LIBRARY ${F2C_LIBRARY}) - - list(APPEND F2C_LIBRARY ${ADDITIONAL_LAPACK_LIBRARY}) -endif() - -if(NOT LAPACK_LIBRARY) - find_library(LAPACK_LIBRARY_RELEASE NAMES lapack) - find_library(LAPACK_LIBRARY_DEBUG NAMES lapackd) - - #keep a list of "pure" lapack libs, without dependencies - set(oLAPACK_LIBRARY_RELEASE ${LAPACK_LIBRARY_RELEASE}) - set(oLAPACK_LIBRARY_DEBUG ${LAPACK_LIBRARY_DEBUG}) - select_library_configurations(oLAPACK) - - list(APPEND LAPACK_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE}) - list(APPEND LAPACK_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG}) - - find_dependency(BLAS) - get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_RELEASE) - if(NOT _loc) - get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_RELEASE) - endif() - set(LAPACK_BLAS_LIBRARY_RELEASE ${_loc}) - get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_DEBUG) - if(NOT _loc) - get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_DEBUG) - endif() - set(LAPACK_BLAS_LIBRARY_DEBUG ${_loc}) - select_library_configurations(LAPACK_BLAS) - list(APPEND LAPACK_LIBRARY_RELEASE ${LAPACK_BLAS_LIBRARY_RELEASE}) - list(APPEND LAPACK_LIBRARY_DEBUG ${LAPACK_BLAS_LIBRARY_DEBUG}) - - select_library_configurations(LAPACK) - list(APPEND LAPACK_LIBRARY Threads::Threads) -endif() - -if(NOT F2C_INCLUDE_DIR) - find_path(F2C_INCLUDE_DIR NAMES f2c.h) -endif() - -if(NOT LAPACK_INCLUDE_DIR) - find_path(LAPACK_INCLUDE_DIR NAMES clapack.h) -endif() - -list(APPEND LAPACK_INCLUDE_DIR ${F2C_INCLUDE_DIR}) -set(LAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) -set(LAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) -set(CLAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) -set(CLAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) -set(F2C_INCLUDE_DIRS "${F2C_INCLUDE_DIR}" CACHE PATH "" FORCE) - -set(LAPACK_DLL_DIR ${LAPACK_INCLUDE_DIR}) -list(TRANSFORM LAPACK_DLL_DIR APPEND "/../bin") -message(STATUS "LAPACK_DLL_DIR: ${LAPACK_DLL_DIR}") - -if(WIN32) - find_file(LAPACK_LIBRARY_RELEASE_DLL NAMES lapack.dll PATHS ${LAPACK_DLL_DIR}) - find_file(LAPACK_LIBRARY_DEBUG_FOLDER NAMES lapackd.dll PATHS ${LAPACK_DLL_DIR}) - find_file(F2C_LIBRARY_RELEASE_DLL NAMES f2c.dll libf2c.dll PATHS ${LAPACK_DLL_DIR}) - find_file(F2C_LIBRARY_DEBUG_DLL NAMES f2cd.dll libf2cd.dll PATHS ${LAPACK_DLL_DIR}) -endif() - -set(LAPACK_BLAS_LIBRARY "${LAPACK_BLAS_LIBRARY}" CACHE STRING "" FORCE) -set(F2C_LIBRARIES "${F2C_LIBRARY}" CACHE STRING "" FORCE) -set(LAPACK_VERSION "${CLAPACK_VERSION}" CACHE STRING "" FORCE) -set(LAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) -set(CLAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) -set(CLAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) - -set(LAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) -set(F2C_LIBRARY "${F2C_LIBRARY}" CACHE STRING "" FORCE) -set(LAPACK_LIBRARY_RELEASE "${LAPACK_LIBRARY_RELEASE}" CACHE STRING "" FORCE) -set(LAPACK_LIBRARY_DEBUG "${LAPACK_LIBRARY_DEBUG}" CACHE STRING "" FORCE) -set(F2C_LIBRARY_RELEASE "${F2C_LIBRARY_RELEASE}" CACHE STRING "" FORCE) -set(F2C_LIBRARY_DEBUG "${F2C_LIBRARY_DEBUG}" CACHE STRING "" FORCE) - -find_package_handle_standard_args(CLAPACK DEFAULT_MSG CLAPACK_LIBRARY CLAPACK_INCLUDE_DIR) -mark_as_advanced(CLAPACK_INCLUDE_DIR CLAPACK_LIBRARY) - -find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARY LAPACK_INCLUDE_DIR) -mark_as_advanced(LAPACK_INCLUDE_DIR LAPACK_LIBRARY) - -find_package_handle_standard_args(F2C DEFAULT_MSG F2C_LIBRARY F2C_INCLUDE_DIR) -mark_as_advanced(F2C_INCLUDE_DIR F2C_LIBRARY) - -#TARGETS -if(CLAPACK_FOUND AND NOT TARGET clapack::clapack) - if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}") - add_library(clapack::clapack SHARED IMPORTED) - set_target_properties(clapack::clapack PROPERTIES - IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" - IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}" - INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" - IMPORTED_CONFIGURATIONS Release - IMPORTED_LINK_INTERFACE_LANGUAGES "C") - if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}") - set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) - set_target_properties(clapack::clapack PROPERTIES - IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" - IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}") - endif() - else() - add_library(clapack::clapack UNKNOWN IMPORTED) - set_target_properties(clapack::clapack PROPERTIES - IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}" - INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" - IMPORTED_CONFIGURATIONS Release - IMPORTED_LINK_INTERFACE_LANGUAGES "C") - if(EXISTS "${LAPACK_LIBRARY_DEBUG}") - set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) - set_target_properties(clapack::clapack PROPERTIES - IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}") - endif() - endif() -endif() - -if(CLAPACK_FOUND AND NOT TARGET lapack) - if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}") - add_library(lapack SHARED IMPORTED) - set_target_properties(lapack PROPERTIES - IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" - IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}" - INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" - IMPORTED_CONFIGURATIONS Release - IMPORTED_LINK_INTERFACE_LANGUAGES "C") - if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}") - set_property(TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) - set_target_properties(lapack PROPERTIES - IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" - IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}") - endif() - else() - add_library(lapack UNKNOWN IMPORTED) - set_target_properties(lapack PROPERTIES - IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}" - INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" - IMPORTED_CONFIGURATIONS Release - INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" - IMPORTED_LINK_INTERFACE_LANGUAGES "C") - if(EXISTS "${LAPACK_LIBRARY_DEBUG}") - set_property(TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) - set_target_properties(lapack PROPERTIES - IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}") - endif() - endif() -endif() +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindLAPACK +---------- + +Find LAPACK library + +This module finds an installed fortran library that implements the +LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). + +The approach follows that taken for the autoconf macro file, +acx_lapack.m4 (distributed at +http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html). + +Input Variables +^^^^^^^^^^^^^^^ + +The following variables may be set to influence this module's behavior: + +``BLA_STATIC`` + if ``ON`` use static linkage + +``BLA_VENDOR`` + If set, checks only the specified vendor, if not set checks all the + possibilities. List of vendors valid in this module: + + * ``Intel10_32`` (intel mkl v10 32 bit) + * ``Intel10_64lp`` (intel mkl v10+ 64 bit, threaded code, lp64 model) + * ``Intel10_64lp_seq`` (intel mkl v10+ 64 bit, sequential code, lp64 model) + * ``Intel10_64ilp`` (intel mkl v10+ 64 bit, threaded code, ilp64 model) + * ``Intel10_64ilp_seq`` (intel mkl v10+ 64 bit, sequential code, ilp64 model) + * ``Intel`` (obsolete versions of mkl 32 and 64 bit) + * ``OpenBLAS`` + * ``FLAME`` + * ``ACML`` + * ``Apple`` + * ``NAS`` + * ``Generic`` + +``BLA_F95`` + if ``ON`` tries to find BLAS95/LAPACK95 + +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``LAPACK_FOUND`` + library implementing the LAPACK interface is found +``LAPACK_LINKER_FLAGS`` + uncached list of required linker flags (excluding -l and -L). +``LAPACK_LIBRARIES`` + uncached list of libraries (using full path name) to link against + to use LAPACK +``LAPACK95_LIBRARIES`` + uncached list of libraries (using full path name) to link against + to use LAPACK95 +``LAPACK95_FOUND`` + library implementing the LAPACK95 interface is found + +.. note:: + + C or CXX must be enabled to use Intel MKL + + For example, to use Intel MKL libraries and/or Intel compiler: + + .. code-block:: cmake + + set(BLA_VENDOR Intel10_64lp) + find_package(LAPACK) +#]=======================================================================] + +set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + +# Check the language being used +if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED) ) + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR "FindLAPACK requires Fortran, C, or C++ to be enabled.") + else() + message(STATUS "Looking for LAPACK... - NOT found (Unsupported languages)") + return() + endif() +endif() + +if (CMAKE_Fortran_COMPILER_LOADED) +include(${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake) +else () +include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) +endif () +include(${CMAKE_ROOT}/Modules/CMakePushCheckState.cmake) +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + +cmake_push_check_state() +set(CMAKE_REQUIRED_QUIET ${LAPACK_FIND_QUIETLY}) + +set(LAPACK_FOUND FALSE) +set(LAPACK95_FOUND FALSE) + +# TODO: move this stuff to separate module + +macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads) +# This macro checks for the existence of the combination of fortran libraries +# given by _list. If the combination is found, this macro checks (using the +# Check_Fortran_Function_Exists macro) whether can link against that library +# combination using the name of a routine given by _name using the linker +# flags given by _flags. If the combination of libraries is found and passes +# the link test, LIBRARIES is set to the list of complete library paths that +# have been found. Otherwise, LIBRARIES is set to FALSE. + +# N.B. _prefix is the prefix applied to the names of all cached variables that +# are generated internally and marked advanced by this macro. + +set(_libraries_work TRUE) +set(${LIBRARIES}) +set(${LIBRARIES}_RELEASE) +set(_combined_name) +if (NOT _libdir) + if (WIN32) + set(_libdir ENV LIB) + elseif (APPLE) + set(_libdir ENV DYLD_LIBRARY_PATH) + else () + set(_libdir ENV LD_LIBRARY_PATH) + endif () +endif () + +list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + +foreach(_library ${_list}) + set(_combined_name ${_combined_name}_${_library}) + + if(_libraries_work) + if (BLA_STATIC) + if (WIN32) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif () + if (APPLE) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) + else () + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif () + else () + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + # for ubuntu's libblas3gf and liblapack3gf packages + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) + endif () + endif () + find_library(${_prefix}_${_library}_LIBRARY_RELEASE + NAMES ${_library} + PATHS ${_libdir} + ) + mark_as_advanced(${_prefix}_${_library}_LIBRARY_RELEASE) + find_library(${_prefix}_${_library}_LIBRARY_DEBUG + NAMES ${_library}d + PATHS ${_libdir} + ) + mark_as_advanced(${_prefix}_${_library}_LIBRARY_DEBUG) + select_library_configurations(${_prefix}_${_library}) + if(NOT ${_prefix}_${_library}_LIBRARY_RELEASE MATCHES "NOTFOUND") + set(${LIBRARIES}_RELEASE ${${LIBRARIES}_RELEASE} ${${_prefix}_${_library}_LIBRARY_RELEASE}) + endif() + set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) + set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) + endif() +endforeach() + +if(_libraries_work) + # Test this combination of libraries. + if(NOT "${_blas}" STREQUAL "") + string(GENEX_STRIP "${_blas}" _test_blas) + endif() + if(UNIX AND BLA_STATIC) + set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group" ${${LIBRARIES}_RELEASE} ${_test_blas} "-Wl,--end-group" ${_threads}) + else() + set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}_RELEASE} ${_test_blas} ${_threads}) + endif() + #message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") + #message("DEBUG: _test_blas = ${_test_blas} former ${_blas}") + if (NOT CMAKE_Fortran_COMPILER_LOADED) + check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) + else () + check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) + endif () + set(CMAKE_REQUIRED_LIBRARIES) + set(_test_blas) + set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) +# message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") +endif() + + if(_libraries_work) + set(${LIBRARIES} ${${LIBRARIES}} "${_blas}" ${_threads}) + else() + set(${LIBRARIES} FALSE) + endif() + +endmacro() + + +set(LAPACK_LINKER_FLAGS) +set(LAPACK_LIBRARIES) +set(LAPACK95_LIBRARIES) + + +if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + find_package(BLAS) +else() + find_package(BLAS REQUIRED) +endif() + + +if(BLAS_FOUND) + set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) + if (NOT $ENV{BLA_VENDOR} STREQUAL "") + set(BLA_VENDOR $ENV{BLA_VENDOR}) + else () + if(NOT BLA_VENDOR) + set(BLA_VENDOR "All") + endif() + endif () + +#intel lapack +if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") + if (NOT WIN32) + set(LAPACK_mkl_LM "-lm") + set(LAPACK_mkl_LDL "-ldl") + endif () + if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) + if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + find_PACKAGE(Threads) + else() + find_package(Threads REQUIRED) + endif() + + if (BLA_VENDOR MATCHES "_64ilp") + set(LAPACK_mkl_ILP_MODE "ilp64") + else () + set(LAPACK_mkl_ILP_MODE "lp64") + endif () + + set(LAPACK_SEARCH_LIBS "") + + if (BLA_F95) + set(LAPACK_mkl_SEARCH_SYMBOL "cheev_f95") + set(_LIBRARIES LAPACK95_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES}) + + # old + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack95") + # new >= 10.3 + list(APPEND LAPACK_SEARCH_LIBS + "mkl_intel_c") + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack95_${LAPACK_mkl_ILP_MODE}") + else() + set(LAPACK_mkl_SEARCH_SYMBOL "cheev") + set(_LIBRARIES LAPACK_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS_LIBRARIES}) + + # old + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack") + endif() + + # First try empty lapack libs + if (NOT ${_LIBRARIES}) + check_lapack_libraries( + ${_LIBRARIES} + LAPACK + ${LAPACK_mkl_SEARCH_SYMBOL} + "" + "" + "${_BLAS_LIBRARIES}" + "" + ) + endif () + # Then try the search libs + foreach (IT ${LAPACK_SEARCH_LIBS}) + if (NOT ${_LIBRARIES}) + check_lapack_libraries( + ${_LIBRARIES} + LAPACK + ${LAPACK_mkl_SEARCH_SYMBOL} + "" + "${IT}" + "${_BLAS_LIBRARIES}" + "${CMAKE_THREAD_LIBS_INIT};${LAPACK_mkl_LM};${LAPACK_mkl_LDL}" + ) + endif () + endforeach () + + unset(LAPACK_mkl_ILP_MODE) + unset(LAPACK_mkl_SEARCH_SYMBOL) + unset(LAPACK_mkl_LM) + unset(LAPACK_mkl_LDL) + endif () +endif() + +if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "goto2" + "${BLAS_LIBRARIES}" + "" + ) + endif() +endif () + +if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "openblas" + "${BLAS_LIBRARIES}" + "" + ) + endif() +endif () + +if (BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "flame" + "${BLAS_LIBRARIES}" + "" + ) + endif() +endif () + +#acml lapack + if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All") + if (BLAS_LIBRARIES MATCHES ".+acml.+") + set (LAPACK_LIBRARIES ${BLAS_LIBRARIES}) + endif () + endif () + +# Apple LAPACK library? +if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "Accelerate" + "${BLAS_LIBRARIES}" + "" + ) + endif() +endif () +if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") + if ( NOT LAPACK_LIBRARIES ) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "vecLib" + "${BLAS_LIBRARIES}" + "" + ) + endif () +endif () +# Generic LAPACK library? +if (BLA_VENDOR STREQUAL "Generic" OR + BLA_VENDOR STREQUAL "ATLAS" OR + BLA_VENDOR STREQUAL "All") + if ( NOT LAPACK_LIBRARIES ) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "lapack" + "${BLAS_LIBRARIES}" + "" + ) + endif () + if ( NOT LAPACK_LIBRARIES ) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "lapack;libf2c" + "${BLAS_LIBRARIES}" + "" + ) + endif () + if ( NOT LAPACK_LIBRARIES ) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "lapack;f2c" + "${BLAS_LIBRARIES}" + "" + ) + endif () +endif () + +else() + message(STATUS "LAPACK requires BLAS") +endif() + +if(BLA_F95) + if(LAPACK95_LIBRARIES) + set(LAPACK95_FOUND TRUE) + else() + set(LAPACK95_FOUND FALSE) + endif() + if(NOT LAPACK_FIND_QUIETLY) + if(LAPACK95_FOUND) + message(STATUS "A library with LAPACK95 API found.") + else() + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with LAPACK95 API not found. Please specify library location." + ) + else() + message(STATUS + "A library with LAPACK95 API not found. Please specify library location." + ) + endif() + endif() + endif() + set(LAPACK_FOUND "${LAPACK95_FOUND}") + set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}") +else() + if(LAPACK_LIBRARIES) + set(LAPACK_FOUND TRUE) + else() + set(LAPACK_FOUND FALSE) + endif() + + if(NOT LAPACK_FIND_QUIETLY) + if(LAPACK_FOUND) + message(STATUS "A library with LAPACK API found.") + else() + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with LAPACK API not found. Please specify library location." + ) + else() + message(STATUS + "A library with LAPACK API not found. Please specify library location." + ) + endif() + endif() + endif() +endif() + +cmake_pop_check_state() +set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) diff --git a/ports/clapack/enable_openblas_compat.patch b/ports/clapack/enable_openblas_compat.patch deleted file mode 100644 index 319935475..000000000 --- a/ports/clapack/enable_openblas_compat.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff --git a/INCLUDE/blaswrap.h b/INCLUDE/blaswrap.h -index 333a17a..fb6750a 100644 ---- a/INCLUDE/blaswrap.h -+++ b/INCLUDE/blaswrap.h -@@ -155,6 +155,107 @@ - #define ctrsm_ f2c_ctrsm - #define ztrsm_ f2c_ztrsm - -+#else -+ -+#define sswap_ sswap -+#define saxpy_ saxpy -+#define sasum_ sasum -+#define isamax_ isamax -+#define scopy_ scopy -+#define sscal_ sscal -+#define sger_ sger -+#define snrm2_ snrm2 -+#define ssymv_ ssymv -+#define sdot_ sdot -+#define saxpy_ saxpy -+#define ssyr2_ ssyr2 -+#define srot_ srot -+#define sgemv_ sgemv -+#define strsv_ strsv -+#define sgemm_ sgemm -+#define strsm_ strsm -+ -+#define dswap_ dswap -+#define daxpy_ daxpy -+#define dasum_ dasum -+#define idamax_ idamax -+#define dcopy_ dcopy -+#define dscal_ dscal -+#define dger_ dger -+#define dnrm2_ dnrm2 -+#define dsymv_ dsymv -+#define ddot_ ddot -+#define dsyr2_ dsyr2 -+#define drot_ drot -+#define dgemv_ dgemv -+#define dtrsv_ dtrsv -+#define dgemm_ dgemm -+#define dtrsm_ dtrsm -+ -+#define cswap_ cswap -+#define caxpy_ caxpy -+#define scasum_ scasum -+#define icamax_ icamax -+#define ccopy_ ccopy -+#define cscal_ cscal -+#define scnrm2_ scnrm2 -+#define cgemv_ cgemv -+#define ctrsv_ ctrsv -+#define cgemm_ cgemm -+#define ctrsm_ ctrsm -+#define cgerc_ cgerc -+#define chemv_ chemv -+#define cher2_ cher2 -+ -+#define zswap_ zswap -+#define zaxpy_ zaxpy -+#define dzasum_ dzasum -+#define izamax_ izamax -+#define zcopy_ zcopy -+#define zscal_ zscal -+#define dznrm2_ dznrm2 -+#define zgemv_ zgemv -+#define ztrsv_ ztrsv -+#define zgemm_ zgemm -+#define ztrsm_ ztrsm -+#define zgerc_ zgerc -+#define zhemv_ zhemv -+#define zher2_ zher2 -+ -+/* LAPACK */ -+#define dlacon_ dlacon -+#define slacon_ slacon -+#define icmax1_ icmax1 -+#define scsum1_ scsum1 -+#define clacon_ clacon -+#define dzsum1_ dzsum1 -+#define izmax1_ izmax1 -+#define zlacon_ zlacon -+ -+/* Fortran interface */ -+#define c_bridge_dgssv_ c_bridge_dgssv -+#define c_fortran_sgssv_ c_fortran_sgssv -+#define c_fortran_dgssv_ c_fortran_dgssv -+#define c_fortran_cgssv_ c_fortran_cgssv -+#define c_fortran_zgssv_ c_fortran_zgssv -+ -+#define cdotc_ cdotc -+#define cdotu_ cdotu -+#define csscal_ csscal -+#define zdscal_ zdscal -+#define zdotc_ zdotc -+#define zdotu_ zdotu -+#define ctrmm_ ctrmm -+#define dtrmm_ dtrmm -+#define strmm_ strmm -+#define ztrmm_ ztrmm -+#define cgeru_ cgeru -+#define zgeru_ zgeru -+#define xerbla_ xerbla -+#define dtrmv_ dtrmv -+#define dsyrk_ dsyrk -+#define zherk_ zherk -+ - #endif /* NO_BLAS_WRAP */ - - #endif /* __BLASWRAP_H */ diff --git a/ports/clapack/portfile.cmake b/ports/clapack/portfile.cmake index 2845bbdc2..90169d79b 100644 --- a/ports/clapack/portfile.cmake +++ b/ports/clapack/portfile.cmake @@ -1,11 +1,5 @@ include(vcpkg_common_functions) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - message(WARNING "You do not need this package on macOS, since you already have the Accelerate Framework") - return() -endif() - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_download_distfile(ARCHIVE @@ -14,16 +8,11 @@ vcpkg_download_distfile(ARCHIVE SHA512 cf19c710291ddff3f6ead7d86bdfdeaebca21291d9df094bf0a8ef599546b007757fb2dbb19b56511bb53ef7456eac0c73973b9627bf4d02982c856124428b49 ) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(ADDITIONAL_PATCH "enable_openblas_compat.patch") -endif() - vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} PATCHES remove_internal_blas.patch - ${ADDITIONAL_PATCH} ) vcpkg_configure_cmake( @@ -37,7 +26,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() #TODO: fix the official exported targets, since they are broken (luckily it seems that no-one uses them for now) -vcpkg_fixup_cmake_targets() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/clapack) #we install a cmake wrapper since the official FindLAPACK module in cmake does find clapack easily, unfortunately... file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) diff --git a/ports/clapack/vcpkg-cmake-wrapper.cmake b/ports/clapack/vcpkg-cmake-wrapper.cmake index aee3e1e08..26a0a1624 100644 --- a/ports/clapack/vcpkg-cmake-wrapper.cmake +++ b/ports/clapack/vcpkg-cmake-wrapper.cmake @@ -1,8 +1,2 @@ -set(LAPACK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +include(${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake) -if(NOT LAPACK_LIBRARIES) - _find_package(${ARGS}) -endif() - -set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH}) diff --git a/ports/geogram/CONTROL b/ports/geogram/CONTROL index 8fd66be95..4eb40eee0 100644 --- a/ports/geogram/CONTROL +++ b/ports/geogram/CONTROL @@ -1,5 +1,5 @@ Source: geogram -Version: 1.6.9-6 +Version: 1.6.9-7 Homepage: https://gforge.inria.fr/projects/geogram/ Description: Geogram is a programming library of geometric algorithms. Build-Depends: openblas (!osx), clapack (!osx) diff --git a/ports/geogram/enable_openblas_compatibility.patch b/ports/geogram/enable_openblas_compatibility.patch deleted file mode 100644 index e6ab75a4c..000000000 --- a/ports/geogram/enable_openblas_compatibility.patch +++ /dev/null @@ -1,1008 +0,0 @@ -diff --git a/src/lib/third_party/numerics/ARPACK/arpack_cnames.h b/src/lib/third_party/numerics/ARPACK/arpack_cnames.h -new file mode 100644 -index 0000000..e6f2c48 ---- /dev/null -+++ b/src/lib/third_party/numerics/ARPACK/arpack_cnames.h -@@ -0,0 +1,105 @@ -+#ifndef __ARPACK_CNAMES -+#define __ARPACK_CNAMES -+ -+/* -+ * These defines set up the naming scheme required to have a fortran 77 -+ * routine call a C routine -+ * for following Fortran to C interface: -+ * FORTRAN CALL C DECLARATION -+ * call dgemm(...) void dgemm(...) -+ */ -+/* BLAS */ -+#define sswap_ sswap -+#define saxpy_ saxpy -+#define sasum_ sasum -+#define isamax_ isamax -+#define scopy_ scopy -+#define sscal_ sscal -+#define sger_ sger -+#define snrm2_ snrm2 -+#define ssymv_ ssymv -+#define sdot_ sdot -+#define saxpy_ saxpy -+#define ssyr2_ ssyr2 -+#define srot_ srot -+#define sgemv_ sgemv -+#define strsv_ strsv -+#define sgemm_ sgemm -+#define strsm_ strsm -+ -+#define dswap_ dswap -+#define daxpy_ daxpy -+#define dasum_ dasum -+#define idamax_ idamax -+#define dcopy_ dcopy -+#define dscal_ dscal -+#define dger_ dger -+#define dnrm2_ dnrm2 -+#define dsymv_ dsymv -+#define ddot_ ddot -+#define dsyr2_ dsyr2 -+#define drot_ drot -+#define dgemv_ dgemv -+#define dtrsv_ dtrsv -+#define dgemm_ dgemm -+#define dtrsm_ dtrsm -+ -+#define cswap_ cswap -+#define caxpy_ caxpy -+#define scasum_ scasum -+#define icamax_ icamax -+#define ccopy_ ccopy -+#define cscal_ cscal -+#define scnrm2_ scnrm2 -+#define cgemv_ cgemv -+#define ctrsv_ ctrsv -+#define cgemm_ cgemm -+#define ctrsm_ ctrsm -+#define cgerc_ cgerc -+#define chemv_ chemv -+#define cher2_ cher2 -+ -+#define zswap_ zswap -+#define zaxpy_ zaxpy -+#define dzasum_ dzasum -+#define izamax_ izamax -+#define zcopy_ zcopy -+#define zscal_ zscal -+#define dznrm2_ dznrm2 -+#define zgemv_ zgemv -+#define ztrsv_ ztrsv -+#define zgemm_ zgemm -+#define ztrsm_ ztrsm -+#define zgerc_ zgerc -+#define zhemv_ zhemv -+#define zher2_ zher2 -+ -+/* LAPACK */ -+#define dlacon_ dlacon -+#define slacon_ slacon -+#define icmax1_ icmax1 -+#define scsum1_ scsum1 -+#define clacon_ clacon -+#define dzsum1_ dzsum1 -+#define izmax1_ izmax1 -+#define zlacon_ zlacon -+ -+/* Fortran interface */ -+#define c_bridge_dgssv_ c_bridge_dgssv -+#define c_fortran_sgssv_ c_fortran_sgssv -+#define c_fortran_dgssv_ c_fortran_dgssv -+#define c_fortran_cgssv_ c_fortran_cgssv -+#define c_fortran_zgssv_ c_fortran_zgssv -+ -+#define cdotc_ cdotc -+#define csscal_ csscal -+#define zdscal_ zdscal -+#define zdotc_ zdotc -+#define ctrmm_ ctrmm -+#define dtrmm_ dtrmm -+#define strmm_ strmm -+#define ztrmm_ ztrmm -+#define cgeru_ cgeru -+#define zgeru_ zgeru -+ -+#endif /* __ARPACK_CNAMES */ -diff --git a/src/lib/third_party/numerics/ARPACK/cgetv0.c b/src/lib/third_party/numerics/ARPACK/cgetv0.c -index 48e8677..871d7b0 100755 ---- a/src/lib/third_party/numerics/ARPACK/cgetv0.c -+++ b/src/lib/third_party/numerics/ARPACK/cgetv0.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/cnaitr.c b/src/lib/third_party/numerics/ARPACK/cnaitr.c -index ee9318b..693f399 100755 ---- a/src/lib/third_party/numerics/ARPACK/cnaitr.c -+++ b/src/lib/third_party/numerics/ARPACK/cnaitr.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/cnapps.c b/src/lib/third_party/numerics/ARPACK/cnapps.c -index 0c4a6a2..4929fc1 100755 ---- a/src/lib/third_party/numerics/ARPACK/cnapps.c -+++ b/src/lib/third_party/numerics/ARPACK/cnapps.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/cnaup2.c b/src/lib/third_party/numerics/ARPACK/cnaup2.c -index 8322446..2d98e4b 100755 ---- a/src/lib/third_party/numerics/ARPACK/cnaup2.c -+++ b/src/lib/third_party/numerics/ARPACK/cnaup2.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/cnaupd.c b/src/lib/third_party/numerics/ARPACK/cnaupd.c -index e51f72e..4fe5dca 100755 ---- a/src/lib/third_party/numerics/ARPACK/cnaupd.c -+++ b/src/lib/third_party/numerics/ARPACK/cnaupd.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/cneigh.c b/src/lib/third_party/numerics/ARPACK/cneigh.c -index d96bebd..adfa279 100755 ---- a/src/lib/third_party/numerics/ARPACK/cneigh.c -+++ b/src/lib/third_party/numerics/ARPACK/cneigh.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/cneupd.c b/src/lib/third_party/numerics/ARPACK/cneupd.c -index 6a839e7..35fc426 100755 ---- a/src/lib/third_party/numerics/ARPACK/cneupd.c -+++ b/src/lib/third_party/numerics/ARPACK/cneupd.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/cngets.c b/src/lib/third_party/numerics/ARPACK/cngets.c -index 9788d00..663406f 100755 ---- a/src/lib/third_party/numerics/ARPACK/cngets.c -+++ b/src/lib/third_party/numerics/ARPACK/cngets.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/csortc.c b/src/lib/third_party/numerics/ARPACK/csortc.c -index 8c6cedb..0d330fe 100755 ---- a/src/lib/third_party/numerics/ARPACK/csortc.c -+++ b/src/lib/third_party/numerics/ARPACK/csortc.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* \BeginDoc */ - - /* \Name: csortc */ -diff --git a/src/lib/third_party/numerics/ARPACK/cstatn.c b/src/lib/third_party/numerics/ARPACK/cstatn.c -index 6fcde6d..4eb47dc 100755 ---- a/src/lib/third_party/numerics/ARPACK/cstatn.c -+++ b/src/lib/third_party/numerics/ARPACK/cstatn.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dgetv0.c b/src/lib/third_party/numerics/ARPACK/dgetv0.c -index 0f4c2bb..2206708 100755 ---- a/src/lib/third_party/numerics/ARPACK/dgetv0.c -+++ b/src/lib/third_party/numerics/ARPACK/dgetv0.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dlaqrb.c b/src/lib/third_party/numerics/ARPACK/dlaqrb.c -index baa4f12..d4275a7 100755 ---- a/src/lib/third_party/numerics/ARPACK/dlaqrb.c -+++ b/src/lib/third_party/numerics/ARPACK/dlaqrb.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Table of constant values */ - - static integer c__1 = 1; -diff --git a/src/lib/third_party/numerics/ARPACK/dnaitr.c b/src/lib/third_party/numerics/ARPACK/dnaitr.c -index 8fffe7f..74eca38 100755 ---- a/src/lib/third_party/numerics/ARPACK/dnaitr.c -+++ b/src/lib/third_party/numerics/ARPACK/dnaitr.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dnapps.c b/src/lib/third_party/numerics/ARPACK/dnapps.c -index 67dac36..b0083a1 100755 ---- a/src/lib/third_party/numerics/ARPACK/dnapps.c -+++ b/src/lib/third_party/numerics/ARPACK/dnapps.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dnaup2.c b/src/lib/third_party/numerics/ARPACK/dnaup2.c -index 28dabb6..8b48f33 100755 ---- a/src/lib/third_party/numerics/ARPACK/dnaup2.c -+++ b/src/lib/third_party/numerics/ARPACK/dnaup2.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dnaupd.c b/src/lib/third_party/numerics/ARPACK/dnaupd.c -index e20298c..dcfaf47 100755 ---- a/src/lib/third_party/numerics/ARPACK/dnaupd.c -+++ b/src/lib/third_party/numerics/ARPACK/dnaupd.c -@@ -11,7 +11,7 @@ - */ - - #include "protos.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dnconv.c b/src/lib/third_party/numerics/ARPACK/dnconv.c -index e2324b7..aa0bf91 100755 ---- a/src/lib/third_party/numerics/ARPACK/dnconv.c -+++ b/src/lib/third_party/numerics/ARPACK/dnconv.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dneigh.c b/src/lib/third_party/numerics/ARPACK/dneigh.c -index b7057eb..94e3680 100755 ---- a/src/lib/third_party/numerics/ARPACK/dneigh.c -+++ b/src/lib/third_party/numerics/ARPACK/dneigh.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dneupd.c b/src/lib/third_party/numerics/ARPACK/dneupd.c -index 141255d..067041b 100755 ---- a/src/lib/third_party/numerics/ARPACK/dneupd.c -+++ b/src/lib/third_party/numerics/ARPACK/dneupd.c -@@ -11,7 +11,7 @@ - */ - - #include "protos.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dngets.c b/src/lib/third_party/numerics/ARPACK/dngets.c -index 9b0ee73..e39848f 100755 ---- a/src/lib/third_party/numerics/ARPACK/dngets.c -+++ b/src/lib/third_party/numerics/ARPACK/dngets.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dsaitr.c b/src/lib/third_party/numerics/ARPACK/dsaitr.c -index 2f3df52..89a597a 100755 ---- a/src/lib/third_party/numerics/ARPACK/dsaitr.c -+++ b/src/lib/third_party/numerics/ARPACK/dsaitr.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dsapps.c b/src/lib/third_party/numerics/ARPACK/dsapps.c -index e87b27d..4a320c9 100755 ---- a/src/lib/third_party/numerics/ARPACK/dsapps.c -+++ b/src/lib/third_party/numerics/ARPACK/dsapps.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dsaup2.c b/src/lib/third_party/numerics/ARPACK/dsaup2.c -index e5f224f..b93e80b 100755 ---- a/src/lib/third_party/numerics/ARPACK/dsaup2.c -+++ b/src/lib/third_party/numerics/ARPACK/dsaup2.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dsaupd.c b/src/lib/third_party/numerics/ARPACK/dsaupd.c -index a9e456f..d20ebe2 100755 ---- a/src/lib/third_party/numerics/ARPACK/dsaupd.c -+++ b/src/lib/third_party/numerics/ARPACK/dsaupd.c -@@ -11,7 +11,7 @@ - */ - - #include "protos.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dsconv.c b/src/lib/third_party/numerics/ARPACK/dsconv.c -index 843ac29..25e3b8f 100755 ---- a/src/lib/third_party/numerics/ARPACK/dsconv.c -+++ b/src/lib/third_party/numerics/ARPACK/dsconv.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dseigt.c b/src/lib/third_party/numerics/ARPACK/dseigt.c -index c7e975b..ba74d2f 100755 ---- a/src/lib/third_party/numerics/ARPACK/dseigt.c -+++ b/src/lib/third_party/numerics/ARPACK/dseigt.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dsesrt.c b/src/lib/third_party/numerics/ARPACK/dsesrt.c -index 1bf99ee..8a2030f 100755 ---- a/src/lib/third_party/numerics/ARPACK/dsesrt.c -+++ b/src/lib/third_party/numerics/ARPACK/dsesrt.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Table of constant values */ - - static integer c__1 = 1; -diff --git a/src/lib/third_party/numerics/ARPACK/dseupd.c b/src/lib/third_party/numerics/ARPACK/dseupd.c -index 9b81477..065e4d8 100755 ---- a/src/lib/third_party/numerics/ARPACK/dseupd.c -+++ b/src/lib/third_party/numerics/ARPACK/dseupd.c -@@ -11,7 +11,7 @@ - */ - - #include "protos.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dsgets.c b/src/lib/third_party/numerics/ARPACK/dsgets.c -index 7983ec8..19a33d9 100755 ---- a/src/lib/third_party/numerics/ARPACK/dsgets.c -+++ b/src/lib/third_party/numerics/ARPACK/dsgets.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dsortc.c b/src/lib/third_party/numerics/ARPACK/dsortc.c -index 2170fcc..131ae2f 100755 ---- a/src/lib/third_party/numerics/ARPACK/dsortc.c -+++ b/src/lib/third_party/numerics/ARPACK/dsortc.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* ----------------------------------------------------------------------- */ - /* \BeginDoc */ - -diff --git a/src/lib/third_party/numerics/ARPACK/dsortr.c b/src/lib/third_party/numerics/ARPACK/dsortr.c -index 5f8dca8..335d9a9 100755 ---- a/src/lib/third_party/numerics/ARPACK/dsortr.c -+++ b/src/lib/third_party/numerics/ARPACK/dsortr.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* ----------------------------------------------------------------------- */ - /* \BeginDoc */ - -diff --git a/src/lib/third_party/numerics/ARPACK/dstatn.c b/src/lib/third_party/numerics/ARPACK/dstatn.c -index 50c15f2..1909d6d 100755 ---- a/src/lib/third_party/numerics/ARPACK/dstatn.c -+++ b/src/lib/third_party/numerics/ARPACK/dstatn.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dstats.c b/src/lib/third_party/numerics/ARPACK/dstats.c -index 4341eea..02f4024 100755 ---- a/src/lib/third_party/numerics/ARPACK/dstats.c -+++ b/src/lib/third_party/numerics/ARPACK/dstats.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/dstqrb.c b/src/lib/third_party/numerics/ARPACK/dstqrb.c -index 2a10880..c25f44d 100755 ---- a/src/lib/third_party/numerics/ARPACK/dstqrb.c -+++ b/src/lib/third_party/numerics/ARPACK/dstqrb.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Table of constant values */ - - static integer c__0 = 0; -diff --git a/src/lib/third_party/numerics/ARPACK/protos.h b/src/lib/third_party/numerics/ARPACK/protos.h -index 2e87fe7..09a89fc 100755 ---- a/src/lib/third_party/numerics/ARPACK/protos.h -+++ b/src/lib/third_party/numerics/ARPACK/protos.h -@@ -8,7 +8,7 @@ - - #include - #include "f2c.h" -- -+#include "arpack_cnames.h" - int NUMERICS_API dnaupd_( - integer *ido, char *bmat, integer *n, char * - which, integer *nev, doublereal *tol, doublereal *resid, integer *ncv, -diff --git a/src/lib/third_party/numerics/ARPACK/sgetv0.c b/src/lib/third_party/numerics/ARPACK/sgetv0.c -index 206122a..314252f 100755 ---- a/src/lib/third_party/numerics/ARPACK/sgetv0.c -+++ b/src/lib/third_party/numerics/ARPACK/sgetv0.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/slaqrb.c b/src/lib/third_party/numerics/ARPACK/slaqrb.c -index 335faa2..12cc92a 100755 ---- a/src/lib/third_party/numerics/ARPACK/slaqrb.c -+++ b/src/lib/third_party/numerics/ARPACK/slaqrb.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Table of constant values */ - - static integer c__1 = 1; -diff --git a/src/lib/third_party/numerics/ARPACK/snaitr.c b/src/lib/third_party/numerics/ARPACK/snaitr.c -index 5e24f6c..f3bc2fa 100755 ---- a/src/lib/third_party/numerics/ARPACK/snaitr.c -+++ b/src/lib/third_party/numerics/ARPACK/snaitr.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/snapps.c b/src/lib/third_party/numerics/ARPACK/snapps.c -index 37470fc..9ae03e4 100755 ---- a/src/lib/third_party/numerics/ARPACK/snapps.c -+++ b/src/lib/third_party/numerics/ARPACK/snapps.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/snaup2.c b/src/lib/third_party/numerics/ARPACK/snaup2.c -index 4028150..f893a8e 100755 ---- a/src/lib/third_party/numerics/ARPACK/snaup2.c -+++ b/src/lib/third_party/numerics/ARPACK/snaup2.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/snaupd.c b/src/lib/third_party/numerics/ARPACK/snaupd.c -index 88118f0..66fac19 100755 ---- a/src/lib/third_party/numerics/ARPACK/snaupd.c -+++ b/src/lib/third_party/numerics/ARPACK/snaupd.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/snconv.c b/src/lib/third_party/numerics/ARPACK/snconv.c -index 4984455..cb42561 100755 ---- a/src/lib/third_party/numerics/ARPACK/snconv.c -+++ b/src/lib/third_party/numerics/ARPACK/snconv.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/sneigh.c b/src/lib/third_party/numerics/ARPACK/sneigh.c -index 4ff7d7a..a8b3ffc 100755 ---- a/src/lib/third_party/numerics/ARPACK/sneigh.c -+++ b/src/lib/third_party/numerics/ARPACK/sneigh.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/sneupd.c b/src/lib/third_party/numerics/ARPACK/sneupd.c -index e2a7205..430f033 100755 ---- a/src/lib/third_party/numerics/ARPACK/sneupd.c -+++ b/src/lib/third_party/numerics/ARPACK/sneupd.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/sngets.c b/src/lib/third_party/numerics/ARPACK/sngets.c -index 5a13f94..1c34e92 100755 ---- a/src/lib/third_party/numerics/ARPACK/sngets.c -+++ b/src/lib/third_party/numerics/ARPACK/sngets.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/ssaitr.c b/src/lib/third_party/numerics/ARPACK/ssaitr.c -index 65a61f6..98fbb1c 100755 ---- a/src/lib/third_party/numerics/ARPACK/ssaitr.c -+++ b/src/lib/third_party/numerics/ARPACK/ssaitr.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/ssapps.c b/src/lib/third_party/numerics/ARPACK/ssapps.c -index 9537c2f..b979fb1 100755 ---- a/src/lib/third_party/numerics/ARPACK/ssapps.c -+++ b/src/lib/third_party/numerics/ARPACK/ssapps.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/ssaup2.c b/src/lib/third_party/numerics/ARPACK/ssaup2.c -index a5123dc..59e08aa 100755 ---- a/src/lib/third_party/numerics/ARPACK/ssaup2.c -+++ b/src/lib/third_party/numerics/ARPACK/ssaup2.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/ssaupd.c b/src/lib/third_party/numerics/ARPACK/ssaupd.c -index 5898148..32ba0b0 100755 ---- a/src/lib/third_party/numerics/ARPACK/ssaupd.c -+++ b/src/lib/third_party/numerics/ARPACK/ssaupd.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/ssconv.c b/src/lib/third_party/numerics/ARPACK/ssconv.c -index 0e1c9c2..90faa50 100755 ---- a/src/lib/third_party/numerics/ARPACK/ssconv.c -+++ b/src/lib/third_party/numerics/ARPACK/ssconv.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/sseigt.c b/src/lib/third_party/numerics/ARPACK/sseigt.c -index 6b9e407..6652b74 100755 ---- a/src/lib/third_party/numerics/ARPACK/sseigt.c -+++ b/src/lib/third_party/numerics/ARPACK/sseigt.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/ssesrt.c b/src/lib/third_party/numerics/ARPACK/ssesrt.c -index 9287d6a..d6bcd6d 100755 ---- a/src/lib/third_party/numerics/ARPACK/ssesrt.c -+++ b/src/lib/third_party/numerics/ARPACK/ssesrt.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Table of constant values */ - - static integer c__1 = 1; -diff --git a/src/lib/third_party/numerics/ARPACK/sseupd.c b/src/lib/third_party/numerics/ARPACK/sseupd.c -index 163df3a..b0e825f 100755 ---- a/src/lib/third_party/numerics/ARPACK/sseupd.c -+++ b/src/lib/third_party/numerics/ARPACK/sseupd.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/ssgets.c b/src/lib/third_party/numerics/ARPACK/ssgets.c -index 244f2ab..52127c2 100755 ---- a/src/lib/third_party/numerics/ARPACK/ssgets.c -+++ b/src/lib/third_party/numerics/ARPACK/ssgets.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/ssortc.c b/src/lib/third_party/numerics/ARPACK/ssortc.c -index aa836f7..38b5fbd 100755 ---- a/src/lib/third_party/numerics/ARPACK/ssortc.c -+++ b/src/lib/third_party/numerics/ARPACK/ssortc.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* ----------------------------------------------------------------------- */ - /* \BeginDoc */ - -diff --git a/src/lib/third_party/numerics/ARPACK/ssortr.c b/src/lib/third_party/numerics/ARPACK/ssortr.c -index e48fb1c..88db423 100755 ---- a/src/lib/third_party/numerics/ARPACK/ssortr.c -+++ b/src/lib/third_party/numerics/ARPACK/ssortr.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* ----------------------------------------------------------------------- */ - /* \BeginDoc */ - -diff --git a/src/lib/third_party/numerics/ARPACK/sstatn.c b/src/lib/third_party/numerics/ARPACK/sstatn.c -index fc899df..26d49b9 100755 ---- a/src/lib/third_party/numerics/ARPACK/sstatn.c -+++ b/src/lib/third_party/numerics/ARPACK/sstatn.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/sstats.c b/src/lib/third_party/numerics/ARPACK/sstats.c -index 6601d2e..61577e2 100755 ---- a/src/lib/third_party/numerics/ARPACK/sstats.c -+++ b/src/lib/third_party/numerics/ARPACK/sstats.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/sstqrb.c b/src/lib/third_party/numerics/ARPACK/sstqrb.c -index 4c7bf91..2a416e2 100755 ---- a/src/lib/third_party/numerics/ARPACK/sstqrb.c -+++ b/src/lib/third_party/numerics/ARPACK/sstqrb.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Table of constant values */ - - static integer c__0 = 0; -diff --git a/src/lib/third_party/numerics/ARPACK/zgetv0.c b/src/lib/third_party/numerics/ARPACK/zgetv0.c -index 96d3c48..d868c1f 100755 ---- a/src/lib/third_party/numerics/ARPACK/zgetv0.c -+++ b/src/lib/third_party/numerics/ARPACK/zgetv0.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/znaitr.c b/src/lib/third_party/numerics/ARPACK/znaitr.c -index 2ce6b9c..c8cf0f6 100755 ---- a/src/lib/third_party/numerics/ARPACK/znaitr.c -+++ b/src/lib/third_party/numerics/ARPACK/znaitr.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/znapps.c b/src/lib/third_party/numerics/ARPACK/znapps.c -index 732aed0..30f46e6 100755 ---- a/src/lib/third_party/numerics/ARPACK/znapps.c -+++ b/src/lib/third_party/numerics/ARPACK/znapps.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/znaup2.c b/src/lib/third_party/numerics/ARPACK/znaup2.c -index b7caa42..7164775 100755 ---- a/src/lib/third_party/numerics/ARPACK/znaup2.c -+++ b/src/lib/third_party/numerics/ARPACK/znaup2.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/znaupd.c b/src/lib/third_party/numerics/ARPACK/znaupd.c -index ed251ee..f960959 100755 ---- a/src/lib/third_party/numerics/ARPACK/znaupd.c -+++ b/src/lib/third_party/numerics/ARPACK/znaupd.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/zneigh.c b/src/lib/third_party/numerics/ARPACK/zneigh.c -index 4157ab3..4ee3c1e 100755 ---- a/src/lib/third_party/numerics/ARPACK/zneigh.c -+++ b/src/lib/third_party/numerics/ARPACK/zneigh.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/zneupd.c b/src/lib/third_party/numerics/ARPACK/zneupd.c -index 3f684f4..3ef32c1 100755 ---- a/src/lib/third_party/numerics/ARPACK/zneupd.c -+++ b/src/lib/third_party/numerics/ARPACK/zneupd.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/zngets.c b/src/lib/third_party/numerics/ARPACK/zngets.c -index a2e461b..97bbebd 100755 ---- a/src/lib/third_party/numerics/ARPACK/zngets.c -+++ b/src/lib/third_party/numerics/ARPACK/zngets.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { -diff --git a/src/lib/third_party/numerics/ARPACK/zsortc.c b/src/lib/third_party/numerics/ARPACK/zsortc.c -index a35748c..38dbc42 100755 ---- a/src/lib/third_party/numerics/ARPACK/zsortc.c -+++ b/src/lib/third_party/numerics/ARPACK/zsortc.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* \BeginDoc */ - - /* \Name: zsortc */ -diff --git a/src/lib/third_party/numerics/ARPACK/zstatn.c b/src/lib/third_party/numerics/ARPACK/zstatn.c -index d433e97..5a8bd1e 100755 ---- a/src/lib/third_party/numerics/ARPACK/zstatn.c -+++ b/src/lib/third_party/numerics/ARPACK/zstatn.c -@@ -11,7 +11,7 @@ - */ - - #include "f2c.h" -- -+#include "arpack_cnames.h" - /* Common Block Declarations */ - - struct { diff --git a/ports/geogram/fix_underscore.patch b/ports/geogram/fix_underscore.patch deleted file mode 100644 index eeb5a30cb..000000000 --- a/ports/geogram/fix_underscore.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h b/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h -index 68b3afe..0369a68 100755 ---- a/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h -+++ b/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h -@@ -1,4 +1,4 @@ --#define Add_ /* Bruno */ -+#define NoChange - - /*! \file - Copyright (c) 2003, The Regents of the University of California, through diff --git a/ports/geogram/portfile.cmake b/ports/geogram/portfile.cmake index 9584e6619..5da48ff89 100644 --- a/ports/geogram/portfile.cmake +++ b/ports/geogram/portfile.cmake @@ -8,17 +8,12 @@ vcpkg_download_distfile(ARCHIVE SHA512 1b5c7540bef734c1908f213f26780aba63b4911a8022d5eb3f7c90eabe2cb69efd1f298b30cdc8e2c636a5b37c8c25832dd4aad0b7c2ff5f0a5b5caa17970136 ) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(ADDITIONAL_PATCHES "fix_underscore.patch" "enable_openblas_compatibility.patch") -endif() - vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${GEOGRAM_VERSION} PATCHES fix-cmake-config-and-install.patch - ${ADDITIONAL_PATCHES} ) file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake) diff --git a/ports/mlpack/CONTROL b/ports/mlpack/CONTROL index 0902ce894..e76327ca5 100644 --- a/ports/mlpack/CONTROL +++ b/ports/mlpack/CONTROL @@ -1,5 +1,5 @@ Source: mlpack -Version: 3.1.1 +Version: 3.1.1-1 Description: mlpack is a fast, flexible machine learning library, written in C++, that aims to provide fast, extensible implementations of cutting-edge machine learning algorithms. Build-Depends: openblas (!osx), clapack (!osx), boost, armadillo, ensmallen diff --git a/ports/mlpack/blas_lapack.patch b/ports/mlpack/blas_lapack.patch new file mode 100644 index 000000000..2b9e44597 --- /dev/null +++ b/ports/mlpack/blas_lapack.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b158498..50f1def 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -286,7 +286,7 @@ if (WIN32) + find_package(LAPACK) + find_package(BLAS) + set(ARMADILLO_LIBRARIES +- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY}) ++ ${ARMADILLO_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) + endif () + + # Include directories for the previous dependencies. diff --git a/ports/mlpack/portfile.cmake b/ports/mlpack/portfile.cmake index 0a5bcb6d1..6bde064f4 100644 --- a/ports/mlpack/portfile.cmake +++ b/ports/mlpack/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( HEAD_REF master PATCHES cmakelists.patch + blas_lapack.patch ) file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake) diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index 1c01d8363..47b9430a9 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,4 +1,5 @@ Source: openblas -Version: 0.3.6-4 +Version: 0.3.6-5 Homepage: https://github.com/xianyi/OpenBLAS +Build-Depends: pthread (linux) Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/openblas/FindBLAS.cmake b/ports/openblas/FindBLAS.cmake new file mode 100644 index 000000000..164e79f3b --- /dev/null +++ b/ports/openblas/FindBLAS.cmake @@ -0,0 +1,816 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindBLAS +-------- + +Find Basic Linear Algebra Subprograms (BLAS) library + +This module finds an installed Fortran library that implements the +BLAS linear-algebra interface (see http://www.netlib.org/blas/). The +list of libraries searched for is taken from the ``autoconf`` macro file, +``acx_blas.m4`` (distributed at +http://ac-archive.sourceforge.net/ac-archive/acx_blas.html). + +Input Variables +^^^^^^^^^^^^^^^ + +The following variables may be set to influence this module's behavior: + +``BLA_STATIC`` + if ``ON`` use static linkage + +``BLA_VENDOR`` + If set, checks only the specified vendor, if not set checks all the + possibilities. List of vendors valid in this module: + + * Goto + * OpenBLAS + * FLAME + * ATLAS PhiPACK + * CXML + * DXML + * SunPerf + * SCSL + * SGIMATH + * IBMESSL + * Intel10_32 (intel mkl v10 32 bit) + * Intel10_64lp (intel mkl v10+ 64 bit, threaded code, lp64 model) + * Intel10_64lp_seq (intel mkl v10+ 64 bit, sequential code, lp64 model) + * Intel10_64ilp (intel mkl v10+ 64 bit, threaded code, ilp64 model) + * Intel10_64ilp_seq (intel mkl v10+ 64 bit, sequential code, ilp64 model) + * Intel (obsolete versions of mkl 32 and 64 bit) + * ACML + * ACML_MP + * ACML_GPU + * Apple + * NAS + * Generic + +``BLA_F95`` + if ``ON`` tries to find the BLAS95 interfaces + +``BLA_PREFER_PKGCONFIG`` + if set ``pkg-config`` will be used to search for a BLAS library first + and if one is found that is preferred + +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``BLAS_FOUND`` + library implementing the BLAS interface is found +``BLAS_LINKER_FLAGS`` + uncached list of required linker flags (excluding ``-l`` and ``-L``). +``BLAS_LIBRARIES`` + uncached list of libraries (using full path name) to link against + to use BLAS (may be empty if compiler implicitly links BLAS) +``BLAS95_LIBRARIES`` + uncached list of libraries (using full path name) to link against + to use BLAS95 interface +``BLAS95_FOUND`` + library implementing the BLAS95 interface is found + +.. note:: + + C or CXX must be enabled to use Intel Math Kernel Library (MKL) + + For example, to use Intel MKL libraries and/or Intel compiler: + + .. code-block:: cmake + + set(BLA_VENDOR Intel10_64lp) + find_package(BLAS) + +Hints +^^^^^ + +Set ``MKLROOT`` environment variable to a directory that contains an MKL +installation. + +#]=======================================================================] + +include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) +include(${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake) +include(${CMAKE_ROOT}/Modules/CMakePushCheckState.cmake) +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +cmake_push_check_state() +set(CMAKE_REQUIRED_QUIET ${BLAS_FIND_QUIETLY}) + +set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + +# Check the language being used +if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED) ) + if(BLAS_FIND_REQUIRED) + message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.") + else() + message(STATUS "Looking for BLAS... - NOT found (Unsupported languages)") + return() + endif() +endif() + +if(BLA_PREFER_PKGCONFIG) + find_package(PkgConfig) + pkg_check_modules(PKGC_BLAS blas) + if(PKGC_BLAS_FOUND) + set(BLAS_FOUND ${PKGC_BLAS_FOUND}) + set(BLAS_LIBRARIES "${PKGC_BLAS_LINK_LIBRARIES}") + return() + endif() +endif() + +macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) + # This macro checks for the existence of the combination of fortran libraries + # given by _list. If the combination is found, this macro checks (using the + # Check_Fortran_Function_Exists macro) whether can link against that library + # combination using the name of a routine given by _name using the linker + # flags given by _flags. If the combination of libraries is found and passes + # the link test, LIBRARIES is set to the list of complete library paths that + # have been found. Otherwise, LIBRARIES is set to FALSE. + + # N.B. _prefix is the prefix applied to the names of all cached variables that + # are generated internally and marked advanced by this macro. + + set(_libdir ${ARGN}) + + set(_libraries_work TRUE) + set(${LIBRARIES}) + set(_combined_name) + if (NOT _libdir) + if (WIN32) + set(_libdir ENV LIB) + elseif (APPLE) + set(_libdir ENV DYLD_LIBRARY_PATH) + else () + set(_libdir ENV LD_LIBRARY_PATH) + endif () + endif () + + list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + + foreach(_library ${_list}) + set(_combined_name ${_combined_name}_${_library}) + if(NOT "${_thread}" STREQUAL "") + set(_combined_name ${_combined_name}_thread) + endif() + if(_libraries_work) + if (BLA_STATIC) + if (WIN32) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif () + if (APPLE) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) + else () + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif () + else () + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + # for ubuntu's libblas3gf and liblapack3gf packages + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) + endif () + endif () + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS ${_libdir} + ) + mark_as_advanced(${_prefix}_${_library}_LIBRARY) + set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) + set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) + endif() + endforeach() + if(_libraries_work) + # Test this combination of libraries. + set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_thread}) + # message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") + if (CMAKE_Fortran_COMPILER_LOADED) + check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS) + else() + check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) + endif() + set(CMAKE_REQUIRED_LIBRARIES) + set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) + endif() + if(_libraries_work) + if("${_list}" STREQUAL "") + set(${LIBRARIES} "${LIBRARIES}-PLACEHOLDER-FOR-EMPTY-LIBRARIES") + else() + set(${LIBRARIES} ${${LIBRARIES}} ${_thread}) # for static link + endif() + else() + set(${LIBRARIES} FALSE) + endif() + #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") +endmacro() + +set(BLAS_LINKER_FLAGS) +set(BLAS_LIBRARIES) +set(BLAS95_LIBRARIES) +if (NOT $ENV{BLA_VENDOR} STREQUAL "") + set(BLA_VENDOR $ENV{BLA_VENDOR}) +else () + if(NOT BLA_VENDOR) + set(BLA_VENDOR "All") + endif() +endif () + +if (BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + # Implicitly linked BLAS libraries + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "" + "" + ) + endif() +endif () + +#BLAS in intel mkl 10+ library? (em64t 64bit) +if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") + if (NOT BLAS_LIBRARIES) + + # System-specific settings + if (WIN32) + if (BLA_STATIC) + set(BLAS_mkl_DLL_SUFFIX "") + else() + set(BLAS_mkl_DLL_SUFFIX "_dll") + endif() + else() + # Switch to GNU Fortran support layer if needed (but not on Apple, where MKL does not provide it) + if(CMAKE_Fortran_COMPILER_LOADED AND CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) + set(BLAS_mkl_INTFACE "gf") + set(BLAS_mkl_THREADING "gnu") + set(BLAS_mkl_OMP "gomp") + else() + set(BLAS_mkl_INTFACE "intel") + set(BLAS_mkl_THREADING "intel") + set(BLAS_mkl_OMP "iomp5") + endif() + set(BLAS_mkl_LM "-lm") + set(BLAS_mkl_LDL "-ldl") + endif() + + if (BLA_VENDOR MATCHES "_64ilp") + set(BLAS_mkl_ILP_MODE "ilp64") + else () + set(BLAS_mkl_ILP_MODE "lp64") + endif () + + if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) + if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) + find_package(Threads) + else() + find_package(Threads REQUIRED) + endif() + + set(BLAS_SEARCH_LIBS "") + + if(BLA_F95) + set(BLAS_mkl_SEARCH_SYMBOL sgemm_f95) + set(_LIBRARIES BLAS95_LIBRARIES) + if (WIN32) + # Find the main file (32-bit or 64-bit) + set(BLAS_SEARCH_LIBS_WIN_MAIN "") + if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN + "mkl_blas95${BLAS_mkl_DLL_SUFFIX} mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") + endif() + if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN + "mkl_blas95_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX} mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}") + endif () + + # Add threading/sequential libs + set(BLAS_SEARCH_LIBS_WIN_THREAD "") + if (BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "mkl_sequential${BLAS_mkl_DLL_SUFFIX}") + endif() + if (NOT BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") + # mkl >= 10.3 + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") + endif() + + # Cartesian product of the above + foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN}) + foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD}) + list(APPEND BLAS_SEARCH_LIBS + "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}") + endforeach() + endforeach() + else () + if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95 mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") + + # mkl >= 10.3 + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95 mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") + endif () + if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95 mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") + + # mkl >= 10.3 + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") + endif () + if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") + endif () + endif () + else () + set(BLAS_mkl_SEARCH_SYMBOL sgemm) + set(_LIBRARIES BLAS_LIBRARIES) + if (WIN32) + # Find the main file (32-bit or 64-bit) + set(BLAS_SEARCH_LIBS_WIN_MAIN "") + if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN + "mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") + endif() + if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN + "mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}") + endif () + + # Add threading/sequential libs + set(BLAS_SEARCH_LIBS_WIN_THREAD "") + if (NOT BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") + # mkl >= 10.3 + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") + endif() + if (BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "mkl_sequential${BLAS_mkl_DLL_SUFFIX}") + endif() + + # Cartesian product of the above + foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN}) + foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD}) + list(APPEND BLAS_SEARCH_LIBS + "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}") + endforeach() + endforeach() + else () + if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS + "mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") + + # mkl >= 10.3 + list(APPEND BLAS_SEARCH_LIBS + "mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") + endif () + if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS + "mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") + + # mkl >= 10.3 + list(APPEND BLAS_SEARCH_LIBS + "mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") + endif () + if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS + "mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") + endif () + + #older vesions of intel mkl libs + if (BLA_VENDOR STREQUAL "Intel" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS + "mkl") + list(APPEND BLAS_SEARCH_LIBS + "mkl_ia32") + list(APPEND BLAS_SEARCH_LIBS + "mkl_em64t") + endif () + endif () + endif () + + if (DEFINED ENV{MKLROOT}) + if (BLA_VENDOR STREQUAL "Intel10_32") + set(_BLAS_MKLROOT_LIB_DIR "$ENV{MKLROOT}/lib/ia32") + elseif (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$") + set(_BLAS_MKLROOT_LIB_DIR "$ENV{MKLROOT}/lib/intel64") + endif () + endif () + if (_BLAS_MKLROOT_LIB_DIR) + if (WIN32) + string(APPEND _BLAS_MKLROOT_LIB_DIR "_win") + elseif (APPLE) + string(APPEND _BLAS_MKLROOT_LIB_DIR "_mac") + else () + string(APPEND _BLAS_MKLROOT_LIB_DIR "_lin") + endif () + endif () + + foreach (IT ${BLAS_SEARCH_LIBS}) + string(REPLACE " " ";" SEARCH_LIBS ${IT}) + if (NOT ${_LIBRARIES}) + check_fortran_libraries( + ${_LIBRARIES} + BLAS + ${BLAS_mkl_SEARCH_SYMBOL} + "" + "${SEARCH_LIBS}" + "${CMAKE_THREAD_LIBS_INIT};${BLAS_mkl_LM};${BLAS_mkl_LDL}" + "${_BLAS_MKLROOT_LIB_DIR}" + ) + endif () + endforeach () + + endif () + unset(BLAS_mkl_ILP_MODE) + unset(BLAS_mkl_INTFACE) + unset(BLAS_mkl_THREADING) + unset(BLAS_mkl_OMP) + unset(BLAS_mkl_DLL_SUFFIX) + unset(BLAS_mkl_LM) + unset(BLAS_mkl_LDL) + endif () +endif () + +if(BLA_F95) + find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES) + set(BLAS95_FOUND ${BLAS_FOUND}) + if(BLAS_FOUND) + set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") + endif() +endif() + +if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + # gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "goto2" + "" + ) + endif() +endif () + +if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + # OpenBLAS (http://www.openblas.net) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "openblas" + "" + ) + endif() + if(NOT BLAS_LIBRARIES) + find_package(Threads) + # OpenBLAS (http://www.openblas.net) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "openblas" + "${CMAKE_THREAD_LIBS_INIT}" + ) + endif() +endif () + +if (BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + # FLAME's blis library (https://github.com/flame/blis) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "blis" + "" + ) + endif() +endif () + +if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + dgemm + "" + "f77blas;atlas" + "" + ) + endif() +endif () + +# BLAS in PhiPACK libraries? (requires generic BLAS lib, too) +if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "sgemm;dgemm;blas" + "" + ) + endif() +endif () + +# BLAS in Alpha CXML library? +if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "cxml" + "" + ) + endif() +endif () + +# BLAS in Alpha DXML library? (now called CXML, see above) +if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "dxml" + "" + ) + endif() +endif () + +# BLAS in Sun Performance library? +if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "-xlic_lib=sunperf" + "sunperf;sunmath" + "" + ) + if(BLAS_LIBRARIES) + set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf") + endif() + endif() +endif () + +# BLAS in SCSL library? (SGI/Cray Scientific Library) +if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "scsl" + "" + ) + endif() +endif () + +# BLAS in SGIMATH library? +if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "complib.sgimath" + "" + ) + endif() +endif () + +# BLAS in IBM ESSL library? (requires generic BLAS lib, too) +if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "essl;blas" + "" + ) + endif() +endif () + +#BLAS in acml library? +if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All") + if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR + ((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR + ((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS)) + ) + # try to find acml in "standard" paths + if( WIN32 ) + file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" ) + else() + file( GLOB _ACML_ROOT "/opt/acml*/ACML-EULA.txt" ) + endif() + if( WIN32 ) + file( GLOB _ACML_GPU_ROOT "C:/AMD/acml*/GPGPUexamples" ) + else() + file( GLOB _ACML_GPU_ROOT "/opt/acml*/GPGPUexamples" ) + endif() + list(GET _ACML_ROOT 0 _ACML_ROOT) + list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT) + if( _ACML_ROOT ) + get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH ) + if( SIZEOF_INTEGER EQUAL 8 ) + set( _ACML_PATH_SUFFIX "_int64" ) + else() + set( _ACML_PATH_SUFFIX "" ) + endif() + if( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" ) + set( _ACML_COMPILER32 "ifort32" ) + set( _ACML_COMPILER64 "ifort64" ) + elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro" ) + set( _ACML_COMPILER32 "sun32" ) + set( _ACML_COMPILER64 "sun64" ) + elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "PGI" ) + set( _ACML_COMPILER32 "pgi32" ) + if( WIN32 ) + set( _ACML_COMPILER64 "win64" ) + else() + set( _ACML_COMPILER64 "pgi64" ) + endif() + elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "Open64" ) + # 32 bit builds not supported on Open64 but for code simplicity + # We'll just use the same directory twice + set( _ACML_COMPILER32 "open64_64" ) + set( _ACML_COMPILER64 "open64_64" ) + elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" ) + set( _ACML_COMPILER32 "nag32" ) + set( _ACML_COMPILER64 "nag64" ) + else() + set( _ACML_COMPILER32 "gfortran32" ) + set( _ACML_COMPILER64 "gfortran64" ) + endif() + + if( BLA_VENDOR STREQUAL "ACML_MP" ) + set(_ACML_MP_LIB_DIRS + "${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib" + "${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" ) + else() + set(_ACML_LIB_DIRS + "${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib" + "${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" ) + endif() + endif() +elseif(BLAS_${BLA_VENDOR}_LIB_DIRS) + set(_${BLA_VENDOR}_LIB_DIRS ${BLAS_${BLA_VENDOR}_LIB_DIRS}) +endif() + +if( BLA_VENDOR STREQUAL "ACML_MP" ) + foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS}) + check_fortran_libraries ( + BLAS_LIBRARIES + BLAS + sgemm + "" "acml_mp;acml_mv" "" ${BLAS_ACML_MP_LIB_DIRS} + ) + if( BLAS_LIBRARIES ) + break() + endif() + endforeach() +elseif( BLA_VENDOR STREQUAL "ACML_GPU" ) + foreach( BLAS_ACML_GPU_LIB_DIRS ${_ACML_GPU_LIB_DIRS}) + check_fortran_libraries ( + BLAS_LIBRARIES + BLAS + sgemm + "" "acml;acml_mv;CALBLAS" "" ${BLAS_ACML_GPU_LIB_DIRS} + ) + if( BLAS_LIBRARIES ) + break() + endif() + endforeach() +else() + foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} ) + check_fortran_libraries ( + BLAS_LIBRARIES + BLAS + sgemm + "" "acml;acml_mv" "" ${BLAS_ACML_LIB_DIRS} + ) + if( BLAS_LIBRARIES ) + break() + endif() + endforeach() +endif() + +# Either acml or acml_mp should be in LD_LIBRARY_PATH but not both +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "acml;acml_mv" + "" + ) +endif() +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "acml_mp;acml_mv" + "" + ) +endif() +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "acml;acml_mv;CALBLAS" + "" + ) +endif() +endif () # ACML + +# Apple BLAS library? +if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + dgemm + "" + "Accelerate" + "" + ) + endif() +endif () + +if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") + if ( NOT BLAS_LIBRARIES ) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + dgemm + "" + "vecLib" + "" + ) + endif () +endif () + +# Generic BLAS library? +if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "blas" + "" + ) + endif() +endif () + +if(NOT BLA_F95) + find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS_LIBRARIES) +endif() + +# On compilers that implicitly link BLAS (such as ftn, cc, and CC on Cray HPC machines) +# we used a placeholder for empty BLAS_LIBRARIES to get through our logic above. +if (BLAS_LIBRARIES STREQUAL "BLAS_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES") + set(BLAS_LIBRARIES "") +endif() + +cmake_pop_check_state() +set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) diff --git a/ports/openblas/enable_underscore.patch b/ports/openblas/enable_underscore.patch deleted file mode 100644 index d2eb3ff22..000000000 --- a/ports/openblas/enable_underscore.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9696961..47ef712 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -29,7 +29,7 @@ option(BUILD_RELAPACK "Build with ReLAPACK (recursive implementation of several - # 64 bit integer interfaces in OpenBLAS. - - set(SYMBOLPREFIX "" CACHE STRING "Add a prefix to all exported symbol names in the shared library to avoid conflicts with other BLAS libraries" ) --set(SYMBOLSUFFIX "" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" ) -+set(SYMBOLSUFFIX "_" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" ) - ####### - if(BUILD_WITHOUT_LAPACK) - set(NO_LAPACK 1) -@@ -232,7 +232,7 @@ if (BUILD_SHARED_LIBS AND BUILD_RELAPACK) - endif() - endif() - --if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFIX} STREQUAL "") -+if (NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "") - if (NOT DEFINED ARCH) - set(ARCH_IN "x86_64") - else() -@@ -289,12 +289,14 @@ endif() - if (NOT ${SYMBOLSUFFIX} STREQUAL "") - message(STATUS "adding suffix ${SYMBOLSUFFIX} to names of exported symbols in ${OpenBLAS_LIBNAME}") - endif() -+if(BUILD_SHARED_LIBS) - add_custom_command(TARGET ${OpenBLAS_LIBNAME} POST_BUILD - COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BUILD_LAPACK_DEPRECATED}" > ${PROJECT_BINARY_DIR}/objcopy.def - COMMAND objcopy -v --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so - COMMENT "renaming symbols" - ) - endif() -+endif() - - - # Install project -@@ -385,4 +387,3 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake - install(EXPORT "${PN}${SUFFIX64}Targets" - NAMESPACE "${PN}${SUFFIX64}::" - DESTINATION ${CMAKECONFIG_INSTALL_DIR}) -- -diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake -index 259ef16..936fbf7 100644 ---- a/cmake/prebuild.cmake -+++ b/cmake/prebuild.cmake -@@ -58,10 +58,8 @@ endif () - set(TARGET_CONF_TEMP "${PROJECT_BINARY_DIR}/${TARGET_CONF}.tmp") - - # c_check --set(FU "") --if (APPLE OR (MSVC AND NOT ${CMAKE_C_COMPILER_ID} MATCHES "Clang")) -- set(FU "_") --endif() -+set(FU "") -+set(BU "") - - set(COMPILER_ID ${CMAKE_C_COMPILER_ID}) - if (${COMPILER_ID} STREQUAL "GNU") -@@ -75,7 +73,9 @@ file(WRITE ${TARGET_CONF_TEMP} - "#define ARCH_${UC_ARCH}\t1\n" - "#define C_${COMPILER_ID}\t1\n" - "#define __${BINARY}BIT__\t1\n" -- "#define FUNDERSCORE\t${FU}\n") -+ "#define FUNDERSCORE\t${FU}\n" -+ "#define BUNDERSCORE\t${BU}\n" -+ "//#define NEEDBUNDERSCORE 1\n") - - if (${HOST_OS} STREQUAL "WINDOWSSTORE") - file(APPEND ${TARGET_CONF_TEMP} diff --git a/ports/openblas/fix_space_path.patch b/ports/openblas/fix-space-path.patch similarity index 100% rename from ports/openblas/fix_space_path.patch rename to ports/openblas/fix-space-path.patch diff --git a/ports/openblas/openblas_common.h b/ports/openblas/openblas_common.h new file mode 100644 index 000000000..10b25d4c7 --- /dev/null +++ b/ports/openblas/openblas_common.h @@ -0,0 +1,72 @@ +#pragma once +#include "openblas_config.h" + +#if defined(OPENBLAS_OS_WINNT) || defined(OPENBLAS_OS_CYGWIN_NT) || defined(OPENBLAS_OS_INTERIX) +#define OPENBLAS_WINDOWS_ABI +#define OPENBLAS_OS_WINDOWS + +#ifdef DOUBLE +#define DOUBLE_DEFINED DOUBLE +#undef DOUBLE +#endif +#endif + +#ifdef NEEDBUNDERSCORE +#define BLASFUNC(FUNC) FUNC##_ +#else +#define BLASFUNC(FUNC) FUNC +#endif + + +#ifdef OPENBLAS_QUAD_PRECISION +typedef struct { + unsigned long x[2]; +} xdouble; +#elif defined OPENBLAS_EXPRECISION +#define xdouble long double +#else +#define xdouble double +#endif + +#if defined(OS_WINNT) && defined(__64BIT__) +typedef long long BLASLONG; +typedef unsigned long long BLASULONG; +#else +typedef long BLASLONG; +typedef unsigned long BLASULONG; +#endif + +#ifdef OPENBLAS_USE64BITINT +typedef BLASLONG blasint; +#else +typedef int blasint; +#endif + +#if defined(XDOUBLE) || defined(DOUBLE) +#define FLOATRET FLOAT +#else +#ifdef NEED_F2CCONV +#define FLOATRET double +#else +#define FLOATRET float +#endif +#endif + + +/* Inclusion of a standard header file is needed for definition of __STDC_* + predefined macros with some compilers (e.g. GCC 4.7 on Linux). This occurs + as a side effect of including either or . */ +#include +#define OPENBLAS_COMPLEX_STRUCT +typedef struct { float real, imag; } openblas_complex_float; +typedef struct { double real, imag; } openblas_complex_double; +typedef struct { xdouble real, imag; } openblas_complex_xdouble; +#define openblas_make_complex_float(real, imag) {(real), (imag)} +#define openblas_make_complex_double(real, imag) {(real), (imag)} +#define openblas_make_complex_xdouble(real, imag) {(real), (imag)} +#define openblas_complex_float_real(z) ((z).real) +#define openblas_complex_float_imag(z) ((z).imag) +#define openblas_complex_double_real(z) ((z).real) +#define openblas_complex_double_imag(z) ((z).imag) +#define openblas_complex_xdouble_real(z) ((z).real) +#define openblas_complex_xdouble_imag(z) ((z).imag) diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index 45260c78a..179491cc4 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -1,26 +1,9 @@ include(vcpkg_common_functions) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - message(WARNING "You do not need this package on macOS, since you already have the Accelerate Framework") - return() -endif() - if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") message(FATAL_ERROR "openblas can only be built for x64 currently") endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(ADDITIONAL_PATCH "enable_underscore.patch") -endif() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(NO_SHARED 1) -endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(NO_STATIC 1) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xianyi/OpenBLAS @@ -29,8 +12,7 @@ vcpkg_from_github( HEAD_REF develop PATCHES uwp.patch - fix_space_path.patch - ${ADDITIONAL_PATCH} + fix-space-path.patch ) find_program(GIT NAMES git git.cmd) @@ -77,7 +59,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS + OPTIONS ${COMMON_OPTIONS} -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DVS_WINRT_COMPONENT=TRUE @@ -85,29 +67,44 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") elseif(NOT VCPKG_CMAKE_SYSTEM_NAME) vcpkg_configure_cmake( + PREFER_NINJA SOURCE_PATH ${SOURCE_PATH} OPTIONS ${COMMON_OPTIONS}) else() + list(APPEND VCPKG_C_FLAGS "-DNEEDBUNDERSCORE") # Required to get common BLASFUNC to append extra _ + list(APPEND VCPKG_CXX_FLAGS "-DNEEDBUNDERSCORE") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS ${COMMON_OPTIONS} - -DTARGET=SANDYBRIDGE -DCMAKE_SYSTEM_PROCESSOR=AMD64 - -DBINARY=64 - -DNO_SHARED=${NO_SHARED} - -DNO_STATIC=${NO_STATIC} - -DNOFORTRAN=ON) + -DNOFORTRAN=ON + -DBU=_ #required for all blas functions to append extra _ using NAME + ) endif() vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/OpenBLAS) -#we install a cmake wrapper since the official FindBLAS thinks that OpenBLAS can solve also LAPACK libraries, while it cannot because we disabled it and we use CLAPACK... maybe we have to trigger finding one package when requesting the other and vice-versa. Wrappers should be ready also to avoid an infinite loop -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/blas) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/OpenBLAS TARGET_PATH share/openblas) +#maybe we need also to write a wrapper inside share/blas to search implicitly for openblas, whenever we feel it's ready for its own -config.cmake file + +# openblas do not make the config file , so I manually made this +# but I think in most case, libraries will not include these files, they define their own used function prototypes +# this is only to quite vcpkg +file(COPY ${CMAKE_CURRENT_LIST_DIR}/openblas_common.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(READ ${SOURCE_PATH}/cblas.h CBLAS_H) +string(REPLACE "#include \"common.h\"" "#include \"openblas_common.h\"" CBLAS_H "${CBLAS_H}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/cblas.h "${CBLAS_H}") + +# openblas is BSD +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/openblas/LICENSE ${CURRENT_PACKAGES_DIR}/share/openblas/copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/blas) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindBLAS.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/blas) + vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) - -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas RENAME copyright) diff --git a/ports/openblas/vcpkg-cmake-wrapper.cmake b/ports/openblas/vcpkg-cmake-wrapper.cmake index e0791bde8..fc074f33c 100644 --- a/ports/openblas/vcpkg-cmake-wrapper.cmake +++ b/ports/openblas/vcpkg-cmake-wrapper.cmake @@ -1,49 +1,2 @@ -list(REMOVE_ITEM ARGS "BLAS") -list(REMOVE_ITEM ARGS "blas") -list(REMOVE_ITEM ARGS "Blas") -list(REMOVE_ITEM ARGS "NO_MODULE") -list(REMOVE_ITEM ARGS "CONFIG") -list(REMOVE_ITEM ARGS "MODULE") -if(NOT BLAS_LIBRARY OR BLAS_LIBRARIES OR OpenBLAS_LIBRARY OR OpenBLAS_LIBRARIES OR BLAS_LIB OR BLAS_LIBS) - include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) - include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) - - _find_package(OpenBLAS CONFIG ${ARGS}) - - set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - _find_package(Threads) - - get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES) - set(BLAS_INCLUDE_DIR ${_loc}) - get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_RELEASE) - if(NOT _loc) - get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_RELEASE) - endif() - set(BLAS_LIBRARY_RELEASE ${_loc}) - get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_DEBUG) - if(NOT _loc) - get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_DEBUG) - endif() - set(BLAS_LIBRARY_DEBUG ${_loc}) - list(APPEND BLAS_LIBRARY_RELEASE Threads::Threads) - list(APPEND BLAS_LIBRARY_DEBUG Threads::Threads) - select_library_configurations(BLAS) - - set(BLAS_LIBRARY "${BLAS_LIBRARY}" CACHE STRING "" FORCE) - set(BLAS_LIBRARIES "${BLAS_LIBRARY}" CACHE STRING "" FORCE) - set(OpenBLAS_LIBRARY "${BLAS_LIBRARY}" CACHE STRING "" FORCE) - set(OpenBLAS_LIBRARIES "${BLAS_LIBRARY}" CACHE STRING "" FORCE) - set(BLAS_LIB "${BLAS_LIBRARY}" CACHE STRING "" FORCE) - set(BLAS_LIBS "${BLAS_LIBRARY}" CACHE STRING "" FORCE) - - set(BLAS_INCLUDE_DIR "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) - set(BLAS_INCLUDE_DIRS "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) - set(OpenBLAS_INCLUDE_DIR "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) - set(OpenBLAS_INCLUDE_DIRS "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) - set(BLAS_INC "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE) - - find_package_handle_standard_args(BLAS DEFAULT_MSG BLAS_LIBRARY BLAS_INCLUDE_DIR) - mark_as_advanced(BLAS_INCLUDE_DIR BLAS_LIBRARY) - find_package_handle_standard_args(OpenBLAS DEFAULT_MSG OpenBLAS_LIBRARY OpenBLAS_INCLUDE_DIR) - mark_as_advanced(OpenBLAS_INCLUDE_DIR OpenBLAS_LIBRARY) -endif() +message(STATUS "Using VCPKG FindBLAS. Remove if CMake has been updated to account for Threads in OpenBLAS!") +include(${CMAKE_CURRENT_LIST_DIR}/FindBLAS.cmake) From 9b5ee9941232dc3dd07085de747b1e95bb059525 Mon Sep 17 00:00:00 2001 From: Curtis J Bezault Date: Thu, 18 Jul 2019 16:20:00 -0700 Subject: [PATCH 0234/1066] Update VERSION.txt --- toolsrc/VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 6b2a31295..d7d695c69 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"2019.06.26" \ No newline at end of file +"2019.07.18" From fddebb75da034752fb267ba121497ba58157bb79 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Thu, 18 Jul 2019 16:40:52 -0700 Subject: [PATCH 0235/1066] clang-format all the things --- toolsrc/include/vcpkg/base/strings.h | 4 ++-- toolsrc/include/vcpkg/base/work_queue.h | 3 +-- toolsrc/src/tests.files.cpp | 16 ++++++++++------ toolsrc/src/tests.strings.cpp | 9 ++++++--- toolsrc/src/vcpkg/base/strings.cpp | 3 ++- toolsrc/src/vcpkg/build.cpp | 15 ++++++--------- 6 files changed, 27 insertions(+), 23 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index aa4c4d690..d7de9b0b2 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -186,7 +186,7 @@ namespace vcpkg::Strings bool contains(StringView haystack, StringView needle); // base 32 encoding, since base64 encoding requires lowercase letters, - // which are not distinct from uppercase letters on macOS or Windows filesystems. - // follows RFC 4648 + // which are not distinct from uppercase letters on macOS or Windows filesystems. + // follows RFC 4648 std::string b32_encode(std::uint64_t x) noexcept; } diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h index 69ca387f3..70142e110 100644 --- a/toolsrc/include/vcpkg/base/work_queue.h +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -98,8 +98,7 @@ namespace vcpkg if (!running_workers()) { m_cv.notify_one(); - - } + } } // wait for all threads to join diff --git a/toolsrc/src/tests.files.cpp b/toolsrc/src/tests.files.cpp index e60662fd9..482675c34 100644 --- a/toolsrc/src/tests.files.cpp +++ b/toolsrc/src/tests.files.cpp @@ -3,8 +3,8 @@ #include #include -#include #include // required for filesystem::create_{directory_}symlink +#include #include #include @@ -31,11 +31,11 @@ namespace UnitTest1 } else { - // if we get a permissions error, we still know that we're in developer mode + // if we get a permissions error, we still know that we're in developer mode ALLOW_SYMLINKS = true; } - if (status == ERROR_SUCCESS) RegCloseKey(key); + if (status == ERROR_SUCCESS) RegCloseKey(key); } private: @@ -105,13 +105,17 @@ namespace UnitTest1 // if we're at the max depth, we only want to build non-directories std::uint64_t file_type; - if (depth < max_depth) { + if (depth < max_depth) + { file_type = uid{directory_min_tag, regular_symlink_tag}(urbg); - } else { + } + else + { file_type = uid{regular_file_tag, regular_symlink_tag}(urbg); } - if (!ALLOW_SYMLINKS && file_type > regular_file_tag) { + if (!ALLOW_SYMLINKS && file_type > regular_file_tag) + { file_type = regular_file_tag; } diff --git a/toolsrc/src/tests.strings.cpp b/toolsrc/src/tests.strings.cpp index 6301ea05d..f541a203d 100644 --- a/toolsrc/src/tests.strings.cpp +++ b/toolsrc/src/tests.strings.cpp @@ -8,8 +8,10 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework; -namespace UnitTest1 { - class StringsTest : public TestClass { +namespace UnitTest1 +{ + class StringsTest : public TestClass + { TEST_METHOD(b64url_encode) { using u64 = std::uint64_t; @@ -29,7 +31,8 @@ namespace UnitTest1 { map.emplace_back(0xFFFF'FFFF'FFFF'FFFF, "777777777777P"); std::string result; - for (const auto& pr : map) { + for (const auto& pr : map) + { result = vcpkg::Strings::b32_encode(pr.first); Assert::AreEqual(result, pr.second); } diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 7970e1b46..46e78a363 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -301,7 +301,8 @@ namespace vcpkg::Strings auto value = static_cast(x); // 32 values, plus the implicit \0 - constexpr static char map[33] = "ABCDEFGHIJKLMNOP" "QRSTUVWXYZ234567"; + constexpr static char map[33] = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZ234567"; // log2(32) constexpr static int shift = 5; diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index c50acce7e..66d8dae2c 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -363,8 +363,7 @@ namespace vcpkg::Build const Triplet& triplet = spec.triplet(); const auto& triplet_file_path = paths.get_triplet_file_path(spec.triplet()).u8string(); - if (!Strings::case_insensitive_ascii_starts_with(triplet_file_path, - paths.triplets.u8string())) + if (!Strings::case_insensitive_ascii_starts_with(triplet_file_path, paths.triplets.u8string())) { System::printf("-- Loading triplet configuration from: %s\n", triplet_file_path); } @@ -431,12 +430,11 @@ namespace vcpkg::Build } command.append(cmd_launch_cmake); const auto timer = Chrono::ElapsedTimer::create_started(); - const int return_code = System::cmd_execute_clean( - command, - {} + const int return_code = System::cmd_execute_clean(command, + {} #ifdef _WIN32 - , - powershell_exe_path.parent_path().u8string() + ";" + , + powershell_exe_path.parent_path().u8string() + ";" #endif ); const auto buildtimeus = timer.microseconds(); @@ -1020,8 +1018,7 @@ namespace vcpkg::Build hash += "-"; hash += Hash::get_file_hash(fs, *p, "SHA1"); } - else if (pre_build_info.cmake_system_name.empty() || - pre_build_info.cmake_system_name == "WindowsStore") + else if (pre_build_info.cmake_system_name.empty() || pre_build_info.cmake_system_name == "WindowsStore") { hash += "-"; hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "windows.cmake", "SHA1"); From 825055378998ae6bc24e8cb0bce2e1fbf9a425da Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Thu, 18 Jul 2019 19:07:00 -0700 Subject: [PATCH 0236/1066] Rewrite the tests! now they're cross-platform! (#7315) * begin exploratory rewriting of tests * continue working on tests * more test work! holy butts vcpkg-tests/plan.cpp was a bunch of work * finish writing new tests - [x] write catch2 tests - [ ] rewrite/at least delete the VS project files - [ ] document running tests * Fix tests to work on WSL, rewrite test vcxproj still need to test on macOS also, delete tests.pch.h * Condense add_test calls --- toolsrc/.clang-format | 1 + toolsrc/CMakeLists.txt | 14 + toolsrc/include/tests.pch.h | 19 - toolsrc/include/tests.utils.h | 76 - toolsrc/include/vcpkg-tests/catch.h | 16865 +++++++++++++++++ toolsrc/include/vcpkg-tests/util.h | 33 + toolsrc/src/tests.arguments.cpp | 104 - toolsrc/src/tests.chrono.cpp | 41 - toolsrc/src/tests.dependencies.cpp | 110 - toolsrc/src/tests.packagespec.cpp | 136 - toolsrc/src/tests.paragraph.cpp | 441 - toolsrc/src/tests.pch.cpp | 1 - toolsrc/src/tests.plan.cpp | 1261 -- toolsrc/src/tests.statusparagraphs.cpp | 115 - toolsrc/src/tests.update.cpp | 106 - toolsrc/src/tests.utils.cpp | 42 - toolsrc/src/vcpkg-tests/arguments.cpp | 109 + toolsrc/src/vcpkg-tests/catch.cpp | 11 + toolsrc/src/vcpkg-tests/chrono.cpp | 34 + toolsrc/src/vcpkg-tests/dependencies.cpp | 28 + toolsrc/src/vcpkg-tests/paragraph.cpp | 445 + toolsrc/src/vcpkg-tests/plan.cpp | 1241 ++ toolsrc/src/vcpkg-tests/specifier.cpp | 134 + toolsrc/src/vcpkg-tests/statusparagraphs.cpp | 110 + toolsrc/src/vcpkg-tests/supports.cpp | 79 + toolsrc/src/vcpkg-tests/update.cpp | 102 + toolsrc/src/vcpkg-tests/util.cpp | 47 + toolsrc/vcpkgtest/vcpkgtest.vcxproj | 52 +- toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 27 +- 29 files changed, 19288 insertions(+), 2496 deletions(-) delete mode 100644 toolsrc/include/tests.pch.h delete mode 100644 toolsrc/include/tests.utils.h create mode 100644 toolsrc/include/vcpkg-tests/catch.h create mode 100644 toolsrc/include/vcpkg-tests/util.h delete mode 100644 toolsrc/src/tests.arguments.cpp delete mode 100644 toolsrc/src/tests.chrono.cpp delete mode 100644 toolsrc/src/tests.dependencies.cpp delete mode 100644 toolsrc/src/tests.packagespec.cpp delete mode 100644 toolsrc/src/tests.paragraph.cpp delete mode 100644 toolsrc/src/tests.pch.cpp delete mode 100644 toolsrc/src/tests.plan.cpp delete mode 100644 toolsrc/src/tests.statusparagraphs.cpp delete mode 100644 toolsrc/src/tests.update.cpp delete mode 100644 toolsrc/src/tests.utils.cpp create mode 100644 toolsrc/src/vcpkg-tests/arguments.cpp create mode 100644 toolsrc/src/vcpkg-tests/catch.cpp create mode 100644 toolsrc/src/vcpkg-tests/chrono.cpp create mode 100644 toolsrc/src/vcpkg-tests/dependencies.cpp create mode 100644 toolsrc/src/vcpkg-tests/paragraph.cpp create mode 100644 toolsrc/src/vcpkg-tests/plan.cpp create mode 100644 toolsrc/src/vcpkg-tests/specifier.cpp create mode 100644 toolsrc/src/vcpkg-tests/statusparagraphs.cpp create mode 100644 toolsrc/src/vcpkg-tests/supports.cpp create mode 100644 toolsrc/src/vcpkg-tests/update.cpp create mode 100644 toolsrc/src/vcpkg-tests/util.cpp diff --git a/toolsrc/.clang-format b/toolsrc/.clang-format index c14765672..4d2c34fc4 100644 --- a/toolsrc/.clang-format +++ b/toolsrc/.clang-format @@ -28,6 +28,7 @@ Cpp11BracedListStyle: true IndentCaseLabels: true KeepEmptyLinesAtTheStartOfBlocks: false NamespaceIndentation: All +ForEachMacros: [TEST_CASE, SECTION] PenaltyReturnTypeOnItsOwnLine: 1000 SpaceAfterTemplateKeyword: false SpaceBeforeCpp11BracedList: false diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index fccf2b7ad..ca23db413 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.3) project(vcpkg C CXX) +enable_testing() + OPTION(DEFINE_DISABLE_METRICS "Option for disabling metrics" OFF) OPTION(VCPKG_ALLOW_APPLE_CLANG "Option for allowing apple clang" OFF) @@ -33,6 +35,7 @@ if(GCC OR CLANG) endif() file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) +file(GLOB_RECURSE VCPKGTEST_SOURCES src/vcpkg-tests/*.cpp) if (DEFINE_DISABLE_METRICS) set(DISABLE_METRICS_VALUE "1") @@ -44,6 +47,15 @@ add_executable(vcpkg src/vcpkg.cpp ${VCPKGLIB_SOURCES}) target_compile_definitions(vcpkg PRIVATE -DDISABLE_METRICS=${DISABLE_METRICS_VALUE}) target_include_directories(vcpkg PRIVATE include) + +add_executable(vcpkg-test EXCLUDE_FROM_ALL ${VCPKGTEST_SOURCES} ${VCPKGLIB_SOURCES}) +target_compile_definitions(vcpkg-test PRIVATE -DDISABLE_METRICS=${DISABLE_METRICS_VALUE}) +target_include_directories(vcpkg-test PRIVATE include) + +foreach(TEST_NAME arguments chrono dependencies paragraph plan specifier supports) + add_test(${TEST_NAME} vcpkg-test [${TEST_NAME}]) +endforeach() + if(CLANG) include(CheckCXXSourceCompiles) check_cxx_source_compiles("#include @@ -57,8 +69,10 @@ endif() if(GCC OR (CLANG AND USES_LIBSTDCXX)) target_link_libraries(vcpkg PRIVATE stdc++fs) + target_link_libraries(vcpkg-test PRIVATE stdc++fs) elseif(CLANG) target_link_libraries(vcpkg PRIVATE c++fs) + target_link_libraries(vcpkg-test PRIVATE c++fs) endif() if(MSVC) diff --git a/toolsrc/include/tests.pch.h b/toolsrc/include/tests.pch.h deleted file mode 100644 index 5c00fca4a..000000000 --- a/toolsrc/include/tests.pch.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h deleted file mode 100644 index 3e8514e67..000000000 --- a/toolsrc/include/tests.utils.h +++ /dev/null @@ -1,76 +0,0 @@ -#pragma once - -#include - -#include -#include -#include -#include -#include - -#include - -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - template<> - inline std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) - { - switch (t) - { - case vcpkg::Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; - case vcpkg::Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; - case vcpkg::Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; - case vcpkg::Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; - default: return ToString(static_cast(t)); - } - } - - template<> - inline std::wstring ToString(const vcpkg::Dependencies::RequestType& t) - { - switch (t) - { - case vcpkg::Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; - case vcpkg::Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; - case vcpkg::Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; - default: return ToString(static_cast(t)); - } - } - - template<> - inline std::wstring ToString(const vcpkg::PackageSpecParseResult& t) - { - return ToString(static_cast(t)); - } - - template<> - inline std::wstring ToString(const vcpkg::PackageSpec& t) - { - return ToString(t.to_string()); - } -} - -std::unique_ptr make_status_pgh(const char* name, - const char* depends = "", - const char* default_features = "", - const char* triplet = "x86-windows"); -std::unique_ptr make_status_feature_pgh(const char* name, - const char* feature, - const char* depends = "", - const char* triplet = "x86-windows"); - -template -T&& unwrap(vcpkg::ExpectedT&& p) -{ - Assert::IsTrue(p.has_value()); - return std::move(*p.get()); -} - -template -T&& unwrap(vcpkg::Optional&& opt) -{ - Assert::IsTrue(opt.has_value()); - return std::move(*opt.get()); -} - -vcpkg::PackageSpec unsafe_pspec(std::string name, vcpkg::Triplet t = vcpkg::Triplet::X86_WINDOWS); diff --git a/toolsrc/include/vcpkg-tests/catch.h b/toolsrc/include/vcpkg-tests/catch.h new file mode 100644 index 000000000..303f664ff --- /dev/null +++ b/toolsrc/include/vcpkg-tests/catch.h @@ -0,0 +1,16865 @@ +/* + * Catch v2.9.1 + * Generated: 2019-06-17 11:59:24.363643 + * ---------------------------------------------------------- + * This file has been merged from multiple headers. Please don't edit it directly + * Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ +#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +// start catch.hpp + + +#define CATCH_VERSION_MAJOR 2 +#define CATCH_VERSION_MINOR 9 +#define CATCH_VERSION_PATCH 1 + +#ifdef __clang__ +# pragma clang system_header +#elif defined __GNUC__ +# pragma GCC system_header +#endif + +// start catch_suppress_warnings.h + +#ifdef __clang__ +# ifdef __ICC // icpc defines the __clang__ macro +# pragma warning(push) +# pragma warning(disable: 161 1682) +# else // __ICC +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wpadded" +# pragma clang diagnostic ignored "-Wswitch-enum" +# pragma clang diagnostic ignored "-Wcovered-switch-default" +# endif +#elif defined __GNUC__ + // Because REQUIREs trigger GCC's -Wparentheses, and because still + // supported version of g++ have only buggy support for _Pragmas, + // Wparentheses have to be suppressed globally. +# pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details + +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-variable" +# pragma GCC diagnostic ignored "-Wpadded" +#endif +// end catch_suppress_warnings.h +#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) +# define CATCH_IMPL +# define CATCH_CONFIG_ALL_PARTS +#endif + +// In the impl file, we want to have access to all parts of the headers +// Can also be used to sanely support PCHs +#if defined(CATCH_CONFIG_ALL_PARTS) +# define CATCH_CONFIG_EXTERNAL_INTERFACES +# if defined(CATCH_CONFIG_DISABLE_MATCHERS) +# undef CATCH_CONFIG_DISABLE_MATCHERS +# endif +# if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) +# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER +# endif +#endif + +#if !defined(CATCH_CONFIG_IMPL_ONLY) +// start catch_platform.h + +#ifdef __APPLE__ +# include +# if TARGET_OS_OSX == 1 +# define CATCH_PLATFORM_MAC +# elif TARGET_OS_IPHONE == 1 +# define CATCH_PLATFORM_IPHONE +# endif + +#elif defined(linux) || defined(__linux) || defined(__linux__) +# define CATCH_PLATFORM_LINUX + +#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) +# define CATCH_PLATFORM_WINDOWS +#endif + +// end catch_platform.h + +#ifdef CATCH_IMPL +# ifndef CLARA_CONFIG_MAIN +# define CLARA_CONFIG_MAIN_NOT_DEFINED +# define CLARA_CONFIG_MAIN +# endif +#endif + +// start catch_user_interfaces.h + +namespace Catch { + unsigned int rngSeed(); +} + +// end catch_user_interfaces.h +// start catch_tag_alias_autoregistrar.h + +// start catch_common.h + +// start catch_compiler_capabilities.h + +// Detect a number of compiler features - by compiler +// The following features are defined: +// +// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? +// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? +// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? +// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled? +// **************** +// Note to maintainers: if new toggles are added please document them +// in configuration.md, too +// **************** + +// In general each macro has a _NO_ form +// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. +// Many features, at point of detection, define an _INTERNAL_ macro, so they +// can be combined, en-mass, with the _NO_ forms later. + +#ifdef __cplusplus + +# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) +# define CATCH_CPP14_OR_GREATER +# endif + +# if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define CATCH_CPP17_OR_GREATER +# endif + +#endif + +#if defined(CATCH_CPP17_OR_GREATER) +# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +#endif + +#ifdef __clang__ + +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ + _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") +# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) +# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) +# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" ) +# define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + +#endif // __clang__ + +//////////////////////////////////////////////////////////////////////////////// +// Assume that non-Windows platforms support posix signals by default +#if !defined(CATCH_PLATFORM_WINDOWS) + #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS +#endif + +//////////////////////////////////////////////////////////////////////////////// +// We know some environments not to support full POSIX signals +#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) + #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +#endif + +#ifdef __OS400__ +# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +# define CATCH_CONFIG_COLOUR_NONE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Android somehow still does not support std::to_string +#if defined(__ANDROID__) +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Not all Windows environments support SEH properly +#if defined(__MINGW32__) +# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH +#endif + +//////////////////////////////////////////////////////////////////////////////// +// PS4 +#if defined(__ORBIS__) +# define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Cygwin +#ifdef __CYGWIN__ + +// Required for some versions of Cygwin to declare gettimeofday +// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin +# define _BSD_SOURCE +// some versions of cygwin (most) do not support std::to_string. Use the libstd check. +// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 +# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING + +# endif +#endif // __CYGWIN__ + +//////////////////////////////////////////////////////////////////////////////// +// Visual C++ +#ifdef _MSC_VER + +# if _MSC_VER >= 1900 // Visual Studio 2015 or newer +# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +# endif + +// Universal Windows platform does not support SEH +// Or console colours (or console at all...) +# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) +# define CATCH_CONFIG_COLOUR_NONE +# else +# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH +# endif + +// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ +// _MSVC_TRADITIONAL == 0 means new conformant preprocessor +// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor +# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) +# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +# endif +#endif // _MSC_VER + +#if defined(_REENTRANT) || defined(_MSC_VER) +// Enable async processing, as -pthread is specified or no additional linking is required +# define CATCH_INTERNAL_CONFIG_USE_ASYNC +#endif // _MSC_VER + +//////////////////////////////////////////////////////////////////////////////// +// Check if we are compiled with -fno-exceptions or equivalent +#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) +# define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED +#endif + +//////////////////////////////////////////////////////////////////////////////// +// DJGPP +#ifdef __DJGPP__ +# define CATCH_INTERNAL_CONFIG_NO_WCHAR +#endif // __DJGPP__ + +//////////////////////////////////////////////////////////////////////////////// +// Embarcadero C++Build +#if defined(__BORLANDC__) + #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN +#endif + +//////////////////////////////////////////////////////////////////////////////// + +// Use of __COUNTER__ is suppressed during code analysis in +// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly +// handled by it. +// Otherwise all supported compilers support COUNTER macro, +// but user still might want to turn it off +#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) + #define CATCH_INTERNAL_CONFIG_COUNTER +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Check if string_view is available and usable +// The check is split apart to work around v140 (VS2015) preprocessor issue... +#if defined(__has_include) +#if __has_include() && defined(CATCH_CPP17_OR_GREATER) +# define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW +#endif +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Check if optional is available and usable +#if defined(__has_include) +# if __has_include() && defined(CATCH_CPP17_OR_GREATER) +# define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL +# endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) +#endif // __has_include + +//////////////////////////////////////////////////////////////////////////////// +// Check if variant is available and usable +#if defined(__has_include) +# if __has_include() && defined(CATCH_CPP17_OR_GREATER) +# if defined(__clang__) && (__clang_major__ < 8) + // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 + // fix should be in clang 8, workaround in libstdc++ 8.2 +# include +# if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) +# define CATCH_CONFIG_NO_CPP17_VARIANT +# else +# define CATCH_INTERNAL_CONFIG_CPP17_VARIANT +# endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) +# else +# define CATCH_INTERNAL_CONFIG_CPP17_VARIANT +# endif // defined(__clang__) && (__clang_major__ < 8) +# endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) +#endif // __has_include + +#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) +# define CATCH_CONFIG_COUNTER +#endif +#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) +# define CATCH_CONFIG_WINDOWS_SEH +#endif +// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. +#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) +# define CATCH_CONFIG_POSIX_SIGNALS +#endif +// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions. +#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR) +# define CATCH_CONFIG_WCHAR +#endif + +#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) +# define CATCH_CONFIG_CPP11_TO_STRING +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) +# define CATCH_CONFIG_CPP17_OPTIONAL +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) +# define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) +# define CATCH_CONFIG_CPP17_STRING_VIEW +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) +# define CATCH_CONFIG_CPP17_VARIANT +#endif + +#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) +# define CATCH_INTERNAL_CONFIG_NEW_CAPTURE +#endif + +#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) +# define CATCH_CONFIG_NEW_CAPTURE +#endif + +#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +# define CATCH_CONFIG_DISABLE_EXCEPTIONS +#endif + +#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) +# define CATCH_CONFIG_POLYFILL_ISNAN +#endif + +#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC) +# define CATCH_CONFIG_USE_ASYNC +#endif + +#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS +#endif + +#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +#define CATCH_TRY if ((true)) +#define CATCH_CATCH_ALL if ((false)) +#define CATCH_CATCH_ANON(type) if ((false)) +#else +#define CATCH_TRY try +#define CATCH_CATCH_ALL catch (...) +#define CATCH_CATCH_ANON(type) catch (type) +#endif + +#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) +#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#endif + +// end catch_compiler_capabilities.h +#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line +#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) +#ifdef CATCH_CONFIG_COUNTER +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) +#else +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) +#endif + +#include +#include +#include + +// We need a dummy global operator<< so we can bring it into Catch namespace later +struct Catch_global_namespace_dummy {}; +std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); + +namespace Catch { + + struct CaseSensitive { enum Choice { + Yes, + No + }; }; + + class NonCopyable { + NonCopyable( NonCopyable const& ) = delete; + NonCopyable( NonCopyable && ) = delete; + NonCopyable& operator = ( NonCopyable const& ) = delete; + NonCopyable& operator = ( NonCopyable && ) = delete; + + protected: + NonCopyable(); + virtual ~NonCopyable(); + }; + + struct SourceLineInfo { + + SourceLineInfo() = delete; + SourceLineInfo( char const* _file, std::size_t _line ) noexcept + : file( _file ), + line( _line ) + {} + + SourceLineInfo( SourceLineInfo const& other ) = default; + SourceLineInfo& operator = ( SourceLineInfo const& ) = default; + SourceLineInfo( SourceLineInfo&& ) noexcept = default; + SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; + + bool empty() const noexcept; + bool operator == ( SourceLineInfo const& other ) const noexcept; + bool operator < ( SourceLineInfo const& other ) const noexcept; + + char const* file; + std::size_t line; + }; + + std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); + + // Bring in operator<< from global namespace into Catch namespace + // This is necessary because the overload of operator<< above makes + // lookup stop at namespace Catch + using ::operator<<; + + // Use this in variadic streaming macros to allow + // >> +StreamEndStop + // as well as + // >> stuff +StreamEndStop + struct StreamEndStop { + std::string operator+() const; + }; + template + T const& operator + ( T const& value, StreamEndStop ) { + return value; + } +} + +#define CATCH_INTERNAL_LINEINFO \ + ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) + +// end catch_common.h +namespace Catch { + + struct RegistrarForTagAliases { + RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); + }; + +} // end namespace Catch + +#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS + +// end catch_tag_alias_autoregistrar.h +// start catch_test_registry.h + +// start catch_interfaces_testcase.h + +#include + +namespace Catch { + + class TestSpec; + + struct ITestInvoker { + virtual void invoke () const = 0; + virtual ~ITestInvoker(); + }; + + class TestCase; + struct IConfig; + + struct ITestCaseRegistry { + virtual ~ITestCaseRegistry(); + virtual std::vector const& getAllTests() const = 0; + virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; + }; + + bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); + std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); + std::vector const& getAllTestCasesSorted( IConfig const& config ); + +} + +// end catch_interfaces_testcase.h +// start catch_stringref.h + +#include +#include +#include + +namespace Catch { + + /// A non-owning string class (similar to the forthcoming std::string_view) + /// Note that, because a StringRef may be a substring of another string, + /// it may not be null terminated. c_str() must return a null terminated + /// string, however, and so the StringRef will internally take ownership + /// (taking a copy), if necessary. In theory this ownership is not externally + /// visible - but it does mean (substring) StringRefs should not be shared between + /// threads. + class StringRef { + public: + using size_type = std::size_t; + + private: + friend struct StringRefTestAccess; + + char const* m_start; + size_type m_size; + + char* m_data = nullptr; + + void takeOwnership(); + + static constexpr char const* const s_empty = ""; + + public: // construction/ assignment + StringRef() noexcept + : StringRef( s_empty, 0 ) + {} + + StringRef( StringRef const& other ) noexcept + : m_start( other.m_start ), + m_size( other.m_size ) + {} + + StringRef( StringRef&& other ) noexcept + : m_start( other.m_start ), + m_size( other.m_size ), + m_data( other.m_data ) + { + other.m_data = nullptr; + } + + StringRef( char const* rawChars ) noexcept; + + StringRef( char const* rawChars, size_type size ) noexcept + : m_start( rawChars ), + m_size( size ) + {} + + StringRef( std::string const& stdString ) noexcept + : m_start( stdString.c_str() ), + m_size( stdString.size() ) + {} + + ~StringRef() noexcept { + delete[] m_data; + } + + auto operator = ( StringRef const &other ) noexcept -> StringRef& { + delete[] m_data; + m_data = nullptr; + m_start = other.m_start; + m_size = other.m_size; + return *this; + } + + operator std::string() const; + + void swap( StringRef& other ) noexcept; + + public: // operators + auto operator == ( StringRef const& other ) const noexcept -> bool; + auto operator != ( StringRef const& other ) const noexcept -> bool; + + auto operator[] ( size_type index ) const noexcept -> char; + + public: // named queries + auto empty() const noexcept -> bool { + return m_size == 0; + } + auto size() const noexcept -> size_type { + return m_size; + } + + auto numberOfCharacters() const noexcept -> size_type; + auto c_str() const -> char const*; + + public: // substrings and searches + auto substr( size_type start, size_type size ) const noexcept -> StringRef; + + // Returns the current start pointer. + // Note that the pointer can change when if the StringRef is a substring + auto currentData() const noexcept -> char const*; + + private: // ownership queries - may not be consistent between calls + auto isOwned() const noexcept -> bool; + auto isSubstring() const noexcept -> bool; + }; + + auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string; + auto operator + ( StringRef const& lhs, char const* rhs ) -> std::string; + auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string; + + auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&; + auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; + + inline auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { + return StringRef( rawChars, size ); + } + +} // namespace Catch + +inline auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { + return Catch::StringRef( rawChars, size ); +} + +// end catch_stringref.h +// start catch_type_traits.hpp + + +#include + +namespace Catch{ + +#ifdef CATCH_CPP17_OR_GREATER + template + inline constexpr auto is_unique = std::true_type{}; + + template + inline constexpr auto is_unique = std::bool_constant< + (!std::is_same_v && ...) && is_unique + >{}; +#else + +template +struct is_unique : std::true_type{}; + +template +struct is_unique : std::integral_constant +::value + && is_unique::value + && is_unique::value +>{}; + +#endif +} + +// end catch_type_traits.hpp +// start catch_preprocessor.hpp + + +#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ +#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) + +#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ +// MSVC needs more evaluations +#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) +#else +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) +#endif + +#define CATCH_REC_END(...) +#define CATCH_REC_OUT + +#define CATCH_EMPTY() +#define CATCH_DEFER(id) id CATCH_EMPTY() + +#define CATCH_REC_GET_END2() 0, CATCH_REC_END +#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 +#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 +#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT +#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) +#define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) + +#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) + +#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) + +// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, +// and passes userdata as the first parameter to each invocation, +// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) +#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param) +#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__ +#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__ +#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF +#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) +#else +// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF +#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) +#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) +#endif + +#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__ +#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name) + +#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__) + +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper()) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) +#else +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper())) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) +#endif + +#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\ + CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__) + +#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0) +#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1) +#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2) +#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) +#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) +#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) +#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6) +#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) +#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) +#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) +#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) + +#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N + +#define INTERNAL_CATCH_TYPE_GEN\ + template struct TypeList {};\ + template\ + constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ + \ + template class L1, typename...E1, template class L2, typename...E2> \ + constexpr auto append(L1, L2) noexcept -> L1 { return {}; }\ + template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ + constexpr auto append(L1, L2, Rest...) noexcept -> decltype(append(L1{}, Rest{}...)) { return {}; }\ + template< template class L1, typename...E1, typename...Rest>\ + constexpr auto append(L1, TypeList, Rest...) noexcept -> L1 { return {}; }\ + \ + template< template class Container, template class List, typename...elems>\ + constexpr auto rewrap(List) noexcept -> TypeList> { return {}; }\ + template< template class Container, template class List, class...Elems, typename...Elements>\ + constexpr auto rewrap(List,Elements...) noexcept -> decltype(append(TypeList>{}, rewrap(Elements{}...))) { return {}; }\ + \ + template